GstPreset
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 gst_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 gst_preset_save_preset and gst_preset_delete_preset to NULL. Applications can use gst_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".
Methods
gst_preset_delete_preset
gboolean gst_preset_delete_preset (GstPreset * preset, const gchar * name)
Delete the given preset.
Gst.Preset.prototype.delete_preset
function Gst.Preset.prototype.delete_preset(name: String): {
// javascript wrapper for 'gst_preset_delete_preset'
}
Delete the given preset.
Gst.Preset.delete_preset
def Gst.Preset.delete_preset (self, name):
#python wrapper for 'gst_preset_delete_preset'
Delete the given preset.
gst_preset_get_meta
gboolean gst_preset_get_meta (GstPreset * preset, 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.
Parameters:
name
–
preset name
tag
–
meta data item name
value
(
[out])
–
value
Gst.Preset.prototype.get_meta
function Gst.Preset.prototype.get_meta(name: String, tag: String): {
// javascript wrapper for 'gst_preset_get_meta'
}
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.
Returns a tuple made of:
Gst.Preset.get_meta
def Gst.Preset.get_meta (self, name, tag):
#python wrapper for 'gst_preset_get_meta'
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.
Returns a tuple made of:
gst_preset_get_preset_names
gchar ** gst_preset_get_preset_names (GstPreset * preset)
Get a copy of preset names as a NULL terminated string array.
(transfer full) (array zero-terminated=1) (element-type utf8): list with names, use g_strfreev after usage.
Gst.Preset.prototype.get_preset_names
function Gst.Preset.prototype.get_preset_names(): {
// javascript wrapper for 'gst_preset_get_preset_names'
}
Get a copy of preset names as a null terminated string array.
Parameters:
a GObject.Object that implements Gst.Preset
(transfer full) (array zero-terminated=1) (element-type utf8): list with names, use GLib.prototype.strfreev after usage.
Gst.Preset.get_preset_names
def Gst.Preset.get_preset_names (self):
#python wrapper for 'gst_preset_get_preset_names'
Get a copy of preset names as a None terminated string array.
Parameters:
a GObject.Object that implements Gst.Preset
(transfer full) (array zero-terminated=1) (element-type utf8): list with names, use GLib.strfreev after usage.
gst_preset_get_property_names
gchar ** gst_preset_get_property_names (GstPreset * preset)
Get a the names of the GObject properties that can be used for presets.
an array of property names which should be freed with g_strfreev after use.
Gst.Preset.prototype.get_property_names
function Gst.Preset.prototype.get_property_names(): {
// javascript wrapper for 'gst_preset_get_property_names'
}
Get a the names of the GObject properties that can be used for presets.
Parameters:
a GObject.Object that implements Gst.Preset
an array of property names which should be freed with GLib.prototype.strfreev after use.
Gst.Preset.get_property_names
def Gst.Preset.get_property_names (self):
#python wrapper for 'gst_preset_get_property_names'
Get a the names of the GObject properties that can be used for presets.
Parameters:
a GObject.Object that implements Gst.Preset
an array of property names which should be freed with GLib.strfreev after use.
gst_preset_is_editable
gboolean gst_preset_is_editable (GstPreset * preset)
Check if one can add new presets, change existing ones and remove presets.
Since : 1.6
Gst.Preset.prototype.is_editable
function Gst.Preset.prototype.is_editable(): {
// javascript wrapper for 'gst_preset_is_editable'
}
Check if one can add new presets, change existing ones and remove presets.
Parameters:
a GObject.Object that implements Gst.Preset
Since : 1.6
Gst.Preset.is_editable
def Gst.Preset.is_editable (self):
#python wrapper for 'gst_preset_is_editable'
Check if one can add new presets, change existing ones and remove presets.
Parameters:
a GObject.Object that implements Gst.Preset
Since : 1.6
gst_preset_load_preset
gboolean gst_preset_load_preset (GstPreset * preset, const gchar * name)
Load the given preset.
Gst.Preset.prototype.load_preset
function Gst.Preset.prototype.load_preset(name: String): {
// javascript wrapper for 'gst_preset_load_preset'
}
Load the given preset.
Gst.Preset.load_preset
def Gst.Preset.load_preset (self, name):
#python wrapper for 'gst_preset_load_preset'
Load the given preset.
gst_preset_rename_preset
gboolean gst_preset_rename_preset (GstPreset * preset, const gchar * old_name, const gchar * new_name)
Renames a preset. If there is already a preset by the new_name it will be overwritten.
Parameters:
old_name
–
current preset name
new_name
–
new preset name
Gst.Preset.prototype.rename_preset
function Gst.Preset.prototype.rename_preset(old_name: String, new_name: String): {
// javascript wrapper for 'gst_preset_rename_preset'
}
Renames a preset. If there is already a preset by the new_name it will be overwritten.
Gst.Preset.rename_preset
def Gst.Preset.rename_preset (self, old_name, new_name):
#python wrapper for 'gst_preset_rename_preset'
Renames a preset. If there is already a preset by the new_name it will be overwritten.
gst_preset_save_preset
gboolean gst_preset_save_preset (GstPreset * preset, const gchar * name)
Save the current object settings as a preset under the given name. If there is already a preset by this name it will be overwritten.
Gst.Preset.prototype.save_preset
function Gst.Preset.prototype.save_preset(name: String): {
// javascript wrapper for 'gst_preset_save_preset'
}
Save the current object settings as a preset under the given name. If there is already a preset by this name it will be overwritten.
Gst.Preset.save_preset
def Gst.Preset.save_preset (self, name):
#python wrapper for 'gst_preset_save_preset'
Save the current object settings as a preset under the given name. If there is already a preset by this name it will be overwritten.
gst_preset_set_meta
gboolean gst_preset_set_meta (GstPreset * preset, const gchar * name, const gchar * tag, const 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.
Parameters:
name
–
preset name
tag
–
meta data item name
value
(
[allow-none])
–
new value
Gst.Preset.prototype.set_meta
function Gst.Preset.prototype.set_meta(name: String, tag: String, value: String): {
// javascript wrapper for 'gst_preset_set_meta'
}
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.
Gst.Preset.set_meta
def Gst.Preset.set_meta (self, name, tag, value):
#python wrapper for 'gst_preset_set_meta'
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 None for the value will unset an existing value.
Functions
gst_preset_get_app_dir
const gchar * gst_preset_get_app_dir ()
Gets the directory for application specific presets if set by the application.
the directory or NULL, don't free or modify the string
Gst.prototype.preset_get_app_dir
function Gst.prototype.preset_get_app_dir(): {
// javascript wrapper for 'gst_preset_get_app_dir'
}
Gets the directory for application specific presets if set by the application.
the directory or null, don't free or modify the string
gst_preset_set_app_dir
gboolean gst_preset_set_app_dir (const gchar * app_dir)
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.
Parameters:
app_dir
(
[typefilename])
–
the application specific preset dir
Gst.prototype.preset_set_app_dir
function Gst.prototype.preset_set_app_dir(app_dir: filename): {
// javascript wrapper for 'gst_preset_set_app_dir'
}
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.
Parameters:
app_dir
(filename)
–
the application specific preset dir
Gst.preset_set_app_dir
def Gst.preset_set_app_dir (app_dir):
#python wrapper for 'gst_preset_set_app_dir'
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.
Parameters:
the application specific preset dir
Virtual Methods
delete_preset
gboolean delete_preset (GstPreset * preset, const gchar * name)
virtual methods to remove a preset
Parameters:
preset
–
name
–
vfunc_delete_preset
function vfunc_delete_preset(preset: Gst.Preset, name: String): {
// javascript implementation of the 'delete_preset' virtual method
}
virtual methods to remove a preset
do_delete_preset
def do_delete_preset (preset, name):
#python implementation of the 'delete_preset' virtual method
virtual methods to remove a preset
get_meta
gboolean get_meta (GstPreset * preset, const gchar * name, const gchar * tag, gchar ** value)
virtual methods to get textual meta data from a preset
Parameters:
preset
–
name
–
tag
–
value
–
vfunc_get_meta
function vfunc_get_meta(preset: Gst.Preset, name: String, tag: String): {
// javascript implementation of the 'get_meta' virtual method
}
virtual methods to get textual meta data from a preset
Parameters:
Returns a tuple made of:
do_get_meta
def do_get_meta (preset, name, tag):
#python implementation of the 'get_meta' virtual method
virtual methods to get textual meta data from a preset
Parameters:
get_preset_names
gchar ** get_preset_names (GstPreset * preset)
virtual method to get list of presets
Parameters:
preset
–
vfunc_get_preset_names
function vfunc_get_preset_names(preset: Gst.Preset): {
// javascript implementation of the 'get_preset_names' virtual method
}
virtual method to get list of presets
Parameters:
do_get_preset_names
def do_get_preset_names (preset):
#python implementation of the 'get_preset_names' virtual method
virtual method to get list of presets
Parameters:
get_property_names
gchar ** get_property_names (GstPreset * preset)
virtual methods to get properties that are persistent
Parameters:
preset
–
vfunc_get_property_names
function vfunc_get_property_names(preset: Gst.Preset): {
// javascript implementation of the 'get_property_names' virtual method
}
virtual methods to get properties that are persistent
Parameters:
do_get_property_names
def do_get_property_names (preset):
#python implementation of the 'get_property_names' virtual method
virtual methods to get properties that are persistent
Parameters:
load_preset
gboolean load_preset (GstPreset * preset, const gchar * name)
virtual methods to load a preset into properties
Parameters:
preset
–
name
–
vfunc_load_preset
function vfunc_load_preset(preset: Gst.Preset, name: String): {
// javascript implementation of the 'load_preset' virtual method
}
virtual methods to load a preset into properties
do_load_preset
def do_load_preset (preset, name):
#python implementation of the 'load_preset' virtual method
virtual methods to load a preset into properties
rename_preset
gboolean rename_preset (GstPreset * preset, const gchar * old_name, const gchar * new_name)
virtual methods to rename a preset
Parameters:
preset
–
old_name
–
new_name
–
vfunc_rename_preset
function vfunc_rename_preset(preset: Gst.Preset, old_name: String, new_name: String): {
// javascript implementation of the 'rename_preset' virtual method
}
virtual methods to rename a preset
Parameters:
do_rename_preset
def do_rename_preset (preset, old_name, new_name):
#python implementation of the 'rename_preset' virtual method
virtual methods to rename a preset
Parameters:
save_preset
gboolean save_preset (GstPreset * preset, const gchar * name)
virtual methods to save properties into a preset
Parameters:
preset
–
name
–
vfunc_save_preset
function vfunc_save_preset(preset: Gst.Preset, name: String): {
// javascript implementation of the 'save_preset' virtual method
}
virtual methods to save properties into a preset
do_save_preset
def do_save_preset (preset, name):
#python implementation of the 'save_preset' virtual method
virtual methods to save properties into a preset
set_meta
gboolean set_meta (GstPreset * preset, const gchar * name, const gchar * tag, const gchar * value)
virtual methods to set textual meta data to a preset
Parameters:
preset
–
name
–
tag
–
value
–
vfunc_set_meta
function vfunc_set_meta(preset: Gst.Preset, name: String, tag: String, value: String): {
// javascript implementation of the 'set_meta' virtual method
}
virtual methods to set textual meta data to a preset
Parameters:
do_set_meta
def do_set_meta (preset, name, tag, value):
#python implementation of the 'set_meta' virtual method
virtual methods to set textual meta data to a preset
Parameters:
Function Macros
GST_PRESET_GET_INTERFACE
#define GST_PRESET_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GST_TYPE_PRESET, GstPresetInterface))
The results of the search are