GstPreset

GstPreset — helper interface for element presets

Synopsis




                    GstPreset;
GList*              gst_preset_get_preset_names         (GstPreset *self);
gboolean            gst_preset_load_preset              (GstPreset *self,
                                                         const gchar *name);
gboolean            gst_preset_save_preset              (GstPreset *self,
                                                         const gchar *name);
gboolean            gst_preset_rename_preset            (GstPreset *self,
                                                         const gchar *old_name,
                                                         const gchar *new_name);
gboolean            gst_preset_delete_preset            (GstPreset *self,
                                                         const gchar *name);
gboolean            gst_preset_set_meta                 (GstPreset *self,
                                                         const gchar *name,
                                                         const gchar *tag,
                                                         gchar *value);
gboolean            gst_preset_get_meta                 (GstPreset *self,
                                                         const gchar *name,
                                                         const gchar *tag,
                                                         gchar **value);
void                gst_preset_create_preset            (GstPreset *self);

Object Hierarchy


  GInterface
   +----GstPreset

Known Implementations

GstPreset is implemented by GstSimSyn.

Description

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.

Details

GstPreset

typedef struct _GstPreset GstPreset;


gst_preset_get_preset_names ()

GList*              gst_preset_get_preset_names         (GstPreset *self);

Get a copy of the preset list names. Free list when done.

self : a GObject that implements GstPreset
Returns : list with names

gst_preset_load_preset ()

gboolean            gst_preset_load_preset              (GstPreset *self,
                                                         const gchar *name);

Load the given preset.

self : a GObject that implements GstPreset
name : preset name to load
Returns : TRUE for success, FALSE if e.g. there is no preset with that name

gst_preset_save_preset ()

gboolean            gst_preset_save_preset              (GstPreset *self,
                                                         const gchar *name);

Save the current preset under the given name. If there is already a preset by this name it will be overwritten.

self : a GObject that implements GstPreset
name : preset name to save
Returns : TRUE for success, FALSE

gst_preset_rename_preset ()

gboolean            gst_preset_rename_preset            (GstPreset *self,
                                                         const gchar *old_name,
                                                         const gchar *new_name);

Renames a preset. If there is already a preset by thr new_name it will be overwritten.

self : a GObject that implements GstPreset
old_name : current preset name
new_name : new preset name
Returns : TRUE for success, FALSE if e.g. there is no preset with old_name

gst_preset_delete_preset ()

gboolean            gst_preset_delete_preset            (GstPreset *self,
                                                         const gchar *name);

Delete the given preset.

self : a GObject that implements GstPreset
name : preset name to remove
Returns : TRUE for success, FALSE if e.g. there is no preset with that name

gst_preset_set_meta ()

gboolean            gst_preset_set_meta                 (GstPreset *self,
                                                         const gchar *name,
                                                         const gchar *tag,
                                                         gchar *value);

Sets a new value for an existing meta data item or adds a new item. Meta data tag names can be something like e.g. "comment". Supplying NULL for the value will unset an existing value.

self : a GObject that implements GstPreset
name : preset name
tag : meta data item name
value : new value
Returns : TRUE for success, FALSE if e.g. there is no preset with that name

gst_preset_get_meta ()

gboolean            gst_preset_get_meta                 (GstPreset *self,
                                                         const gchar *name,
                                                         const gchar *tag,
                                                         gchar **value);

Gets the value for an existing meta data tag. Meta data tag names can be something like e.g. "comment". Returned values need to be released when done.

self : a GObject that implements GstPreset
name : preset name
tag : meta data item name
value : value
Returns : TRUE for success, FALSE if e.g. there is no preset with that name or no value for the given tag

gst_preset_create_preset ()

void                gst_preset_create_preset            (GstPreset *self);

Create a new randomized preset. This method is optional. If not implemented true randomization will be applied.

self : a GObject that implements GstPreset