[−]Struct gstreamer_pbutils::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
Methods
impl EncodingTarget
[src][−]
pub fn new(
name: &str,
category: &str,
description: &str,
profiles: &[EncodingProfile]
) -> EncodingTarget
[src][−]
name: &str,
category: &str,
description: &str,
profiles: &[EncodingProfile]
) -> EncodingTarget
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][−]
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][−]
filepath: P
) -> Result<EncodingTarget, Error>
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][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<Super, Sub> CanDowncast<Sub> for Super where
Sub: IsA<Super>,
Super: IsA<Super>,
[src]
Sub: IsA<Super>,
Super: IsA<Super>,
impl<T> Cast for T where
T: ObjectType,
[src][+]
T: ObjectType,
impl<T> From<T> for T
[src][+]
impl<O> GObjectExtManualGst for O where
O: IsA<Object>,
[src][+]
O: IsA<Object>,
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> ObjectExt for T where
T: ObjectType,
[src][+]
T: ObjectType,
impl<'a, T> ToGlibContainerFromSlice<'a, *const GList> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
[src][+]
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
impl<'a, T> ToGlibContainerFromSlice<'a, *const GPtrArray> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
[src][+]
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
impl<'a, T> ToGlibContainerFromSlice<'a, *mut GArray> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
[src][+]
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
impl<'a, T> ToGlibContainerFromSlice<'a, *mut GList> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
[src][+]
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
impl<'a, T> ToGlibContainerFromSlice<'a, *mut GPtrArray> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
[src][+]
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T> ToSendValue for T where
T: ToValue + SetValue + Send + ?Sized,
[src][+]
T: ToValue + SetValue + Send + ?Sized,
impl<T> ToValue for T where
T: SetValue + ?Sized,
[src][+]
T: SetValue + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,