[]Struct gstreamer::Preset

pub struct Preset(_, _);

This interface offers methods to query and manipulate parameter preset sets. A preset is a bunch of property settings, together with meta data and a name. The name of a preset serves as key for subsequent method calls to manipulate single presets. All instances of one type will share the list of presets. The list is created on demand, if presets are not used, the list is not created.

The interface comes with a default implementation that serves most plugins. Wrapper plugins will override most methods to implement support for the native preset format of those wrapped plugins. One method that is useful to be overridden is Preset::get_property_names. With that one can control which properties are saved and in which order. When implementing support for read-only presets, one should set the vmethods for Preset::save_preset and Preset::delete_preset to None. Applications can use Preset::is_editable to check for that.

The default implementation supports presets located in a system directory, application specific directory and in the users home directory. When getting a list of presets individual presets are read and overlaid in 1) system, 2) application and 3) user order. Whenever an earlier entry is newer, the later entries will be updated. Since 1.8 you can also provide extra paths where to find presets through the GST_PRESET_PATH environment variable. Presets found in those paths will be considered as "app presets".

Implements

PresetExt

Methods

impl Preset[src]

pub fn get_app_dir() -> Option<PathBuf>[src]

Gets the directory for application specific presets if set by the application.

Returns

the directory or None, don't free or modify the string

pub fn set_app_dir<P: AsRef<Path>>(app_dir: P) -> Result<(), BoolError>[src]

Sets an extra directory as an absolute path that should be considered when looking for presets. Any presets in the application dir will shadow the system presets.

app_dir

the application specific preset dir

Returns

true for success, false if the dir already has been set

Trait Implementations

impl Clone for Preset

impl Debug for Preset

impl Eq for Preset

impl Hash for Preset

impl<T: ObjectSubclass + PresetImpl> IsImplementable<T> for Preset[src]

impl Ord for Preset

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

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

impl Send for Preset[src]

impl StaticType for Preset

impl Sync for Preset[src]

Auto Trait Implementations

impl RefUnwindSafe for Preset

impl Unpin for Preset

impl UnwindSafe for Preset

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<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.