[]Struct gstreamer_pbutils::EncodingTarget

pub struct EncodingTarget(_, _);

Collection of EncodingProfile for a specific target or use-case.

When being stored/loaded, targets come from a specific category, like GST_ENCODING_CATEGORY_DEVICE.

Implements

glib::object::ObjectExt

Methods

impl EncodingTarget[src]

pub fn new(
    name: &str,
    category: &str,
    description: &str,
    profiles: &[EncodingProfile]
) -> EncodingTarget
[src]

Creates a new EncodingTarget.

The name and category can only consist of lowercase ASCII letters for the first character, followed by either lowercase ASCII letters, digits or hyphens ('-').

The category <emphasis>should</emphasis> be one of the existing well-defined categories, like GST_ENCODING_CATEGORY_DEVICE, but it <emphasis>can</emphasis> be a application or user specific category if needed.

name

The name of the target.

category

The name of the category to which this target belongs. For example: GST_ENCODING_CATEGORY_DEVICE.

description

A description of EncodingTarget in the current locale.

profiles

A glib::List of EncodingProfile.

Returns

The newly created EncodingTarget or None if there was an error.

pub fn get_category(&self) -> GString[src]

Returns

The category of the self. For example: GST_ENCODING_CATEGORY_DEVICE.

pub fn get_description(&self) -> GString[src]

Returns

The description of the self.

pub fn get_name(&self) -> GString[src]

Returns

The name of the self.

pub fn get_profile(&self, name: &str) -> Option<EncodingProfile>[src]

name

the name of the profile to retrieve

Returns

The matching EncodingProfile, or None.

pub fn get_profiles(&self) -> Vec<EncodingProfile>[src]

Returns

A list of EncodingProfile(s) this self handles.

pub fn save(&self) -> Result<(), Error>[src]

Saves the self to a default user-local directory.

Returns

true if the target was correctly saved, else false.

pub fn save_to_file<P: AsRef<Path>>(&self, filepath: P) -> Result<(), Error>[src]

Saves the self to the provided file location.

filepath

the location to store the self at.

Returns

true if the target was correctly saved, else false.

pub fn load(name: &str, category: Option<&str>) -> Result<EncodingTarget, Error>[src]

Searches for the EncodingTarget with the given name, loads it and returns it.

If the category name is specified only targets from that category will be searched for.

name

the name of the EncodingTarget to load (automatically converted to lower case internally as capital letters are not valid for target names).

category

the name of the target category, like GST_ENCODING_CATEGORY_DEVICE. Can be None

Returns

The EncodingTarget if available, else None.

pub fn load_from_file<P: AsRef<Path>>(
    filepath: P
) -> Result<EncodingTarget, Error>
[src]

Opens the provided file and returns the contained EncodingTarget.

filepath

The file location to load the EncodingTarget from

Returns

The EncodingTarget contained in the file, else None

Trait Implementations

impl Clone for EncodingTarget

impl Debug for EncodingTarget

impl Eq for EncodingTarget

impl Hash for EncodingTarget

impl Ord for EncodingTarget

impl<T: ObjectType> PartialEq<T> for EncodingTarget

impl<T: ObjectType> PartialOrd<T> for EncodingTarget

impl Send for EncodingTarget[src]

impl StaticType for EncodingTarget

impl Sync for EncodingTarget[src]

Auto Trait Implementations

impl RefUnwindSafe for EncodingTarget

impl Unpin for EncodingTarget

impl UnwindSafe for EncodingTarget

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Super, Sub> CanDowncast<Sub> for Super where
    Sub: IsA<Super>,
    Super: IsA<Super>, 
[src]

impl<T> Cast for T where
    T: ObjectType
[src]

impl<T> From<T> for T[src]

impl<O> GObjectExtManualGst for O where
    O: IsA<Object>, 
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ObjectExt for T where
    T: ObjectType
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *const GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *const GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToSendValue for T where
    T: ToValue + SetValue + Send + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.