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

GstPreset

Opaque GstPreset data structure.


GstPreset

Opaque GstPreset data structure.


GstPreset

Opaque GstPreset data structure.


Methods

gst_preset_delete_preset

gboolean
gst_preset_delete_preset (GstPreset * preset,
                          const gchar * name)

Delete the given preset.

Parameters:

preset

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

function Gst.Preset.prototype.delete_preset(name: String): {
    // javascript wrapper for 'gst_preset_delete_preset'
}

Delete the given preset.

Parameters:

preset ( Gst.Preset ) –

a GObject.Object that implements Gst.Preset

name ( String ) –

preset name to remove

Returns ( Number ) –

true for success, false if e.g. there is no preset with that name


Gst.Preset.delete_preset

def Gst.Preset.delete_preset (self, name):
    #python wrapper for 'gst_preset_delete_preset'

Delete the given preset.

Parameters:

preset ( Gst.Preset ) –

a GObject.Object that implements Gst.Preset

name ( str ) –

preset name to remove

Returns ( bool ) –

True for success, False if e.g. there is no preset with that name


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:

preset

a GObject that implements GstPreset

name

preset name

tag

meta data item name

value ( [out] ) –

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

Parameters:

preset ( Gst.Preset ) –

a GObject.Object that implements Gst.Preset

name ( String ) –

preset name

tag ( String ) –

meta data item name

Returns a tuple made of:

( Number ) –

true for success, false if e.g. there is no preset with that name or no value for the given tag

value ( String ) –

true for success, false if e.g. there is no preset with that name or no value for the given tag


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.

Parameters:

preset ( Gst.Preset ) –

a GObject.Object that implements Gst.Preset

name ( str ) –

preset name

tag ( str ) –

meta data item name

Returns a tuple made of:

( bool ) –

True for success, False if e.g. there is no preset with that name or no value for the given tag

value ( str ) –

True for success, False if e.g. there is no preset with that name or no value for the given tag


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.

Parameters:

preset

a GObject that implements GstPreset

Returns

(transfer full) (array zero-terminated=1) (element-type gchar*): 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:

preset ( Gst.Preset ) –

a GObject.Object that implements Gst.Preset

Returns ( [ String ] ) –

(transfer full) (array zero-terminated=1) (element-type gchar*): 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:

preset ( Gst.Preset ) –

a GObject.Object that implements Gst.Preset

Returns ( [ str ] ) –

(transfer full) (array zero-terminated=1) (element-type gchar*): 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.

Parameters:

preset

a GObject that implements GstPreset

Returns ( [transfer: full] [array zero-terminated=1] [element-type gchar*] ) –

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:

preset ( Gst.Preset ) –

a GObject.Object that implements Gst.Preset

Returns ( [ String ] ) –

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:

preset ( Gst.Preset ) –

a GObject.Object that implements Gst.Preset

Returns ( [ str ] ) –

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.

Parameters:

preset

a GObject that implements GstPreset

Returns

TRUE if presets are editable or FALSE if they are static

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:

preset ( Gst.Preset ) –

a GObject.Object that implements Gst.Preset

Returns ( Number ) –

true if presets are editable or false if they are static

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:

preset ( Gst.Preset ) –

a GObject.Object that implements Gst.Preset

Returns ( bool ) –

True if presets are editable or False if they are static

Since : 1.6


gst_preset_load_preset

gboolean
gst_preset_load_preset (GstPreset * preset,
                        const gchar * name)

Load the given preset.

Parameters:

preset

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

function Gst.Preset.prototype.load_preset(name: String): {
    // javascript wrapper for 'gst_preset_load_preset'
}

Load the given preset.

Parameters:

preset ( Gst.Preset ) –

a GObject.Object that implements Gst.Preset

name ( String ) –

preset name to load

Returns ( Number ) –

true for success, false if e.g. there is no preset with that name


Gst.Preset.load_preset

def Gst.Preset.load_preset (self, name):
    #python wrapper for 'gst_preset_load_preset'

Load the given preset.

Parameters:

preset ( Gst.Preset ) –

a GObject.Object that implements Gst.Preset

name ( str ) –

preset name to load

Returns ( bool ) –

True for success, False if e.g. there is no preset with that name


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:

preset

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

Parameters:

preset ( Gst.Preset ) –

a GObject.Object that implements Gst.Preset

old_name ( String ) –

current preset name

new_name ( String ) –

new preset name

Returns ( Number ) –

true for success, false if e.g. there is no preset with old_name


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.

Parameters:

preset ( Gst.Preset ) –

a GObject.Object that implements Gst.Preset

old_name ( str ) –

current preset name

new_name ( str ) –

new preset name

Returns ( bool ) –

True for success, False if e.g. there is no preset with old_name


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.

Parameters:

preset

a GObject that implements GstPreset

name

preset name to save

Returns

TRUE for success, FALSE


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.

Parameters:

preset ( Gst.Preset ) –

a GObject.Object that implements Gst.Preset

name ( String ) –

preset name to save

Returns ( Number ) –

true for success, false


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.

Parameters:

preset ( Gst.Preset ) –

a GObject.Object that implements Gst.Preset

name ( str ) –

preset name to save

Returns ( bool ) –

True for success, False


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:

preset

a GObject that implements GstPreset

name

preset name

tag

meta data item name

value ( [allow-none] ) –

new value

Returns

TRUE for success, FALSE if e.g. there is no preset with that name


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.

Parameters:

preset ( Gst.Preset ) –

a GObject.Object that implements Gst.Preset

name ( String ) –

preset name

tag ( String ) –

meta data item name

value ( String ) –

new value

Returns ( Number ) –

true for success, false if e.g. there is no preset with that name


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.

Parameters:

preset ( Gst.Preset ) –

a GObject.Object that implements Gst.Preset

name ( str ) –

preset name

tag ( str ) –

meta data item name

value ( str ) –

new value

Returns ( bool ) –

True for success, False if e.g. there is no preset with that name


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.

Returns ( [nullable] [type filename] ) –

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.

Returns ( filename ) –

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


Gst.preset_get_app_dir

def Gst.preset_get_app_dir ():
    #python wrapper for 'gst_preset_get_app_dir'

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

Returns ( str ) –

the directory or None, 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 ( [type filename] ) –

the application specific preset dir

Returns

TRUE for success, FALSE if the dir already has been set


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

Returns ( Number ) –

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


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:

app_dir ( str ) –

the application specific preset dir

Returns ( bool ) –

True for success, False if the dir already has been set


Virtual Methods

delete_preset

gboolean
delete_preset (GstPreset * preset,
               const gchar * name)

virtual methods to remove a preset

Parameters:

preset
No description available
name
No description available
Returns
No description available

delete_preset

function delete_preset(preset: Gst.Preset, name: String): {
    // javascript implementation of the 'delete_preset' virtual method
}

virtual methods to remove a preset

Parameters:

preset ( Gst.Preset ) –
No description available
name ( String ) –
No description available
Returns ( Number ) –
No description available

delete_preset

def delete_preset (preset, name):
    #python implementation of the 'delete_preset' virtual method

virtual methods to remove a preset

Parameters:

preset ( Gst.Preset ) –
No description available
name ( str ) –
No description available
Returns ( bool ) –
No description available

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
No description available
name
No description available
tag
No description available
value
No description available
Returns
No description available

get_meta

function 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:

preset ( Gst.Preset ) –
No description available
name ( String ) –
No description available
tag ( String ) –
No description available

Returns a tuple made of:

( Number ) –
No description available
value ( String ) –
No description available

get_meta

def get_meta (preset, name, tag):
    #python implementation of the 'get_meta' virtual method

virtual methods to get textual meta data from a preset

Parameters:

preset ( Gst.Preset ) –
No description available
name ( str ) –
No description available
tag ( str ) –
No description available

Returns a tuple made of:

( bool ) –
No description available
value ( str ) –
No description available

get_preset_names

gchar **
get_preset_names (GstPreset * preset)

virtual method to get list of presets

Parameters:

preset
No description available
Returns
No description available

get_preset_names

function get_preset_names(preset: Gst.Preset): {
    // javascript implementation of the 'get_preset_names' virtual method
}

virtual method to get list of presets

Parameters:

preset ( Gst.Preset ) –
No description available
Returns ( [ String ] ) –
No description available

get_preset_names

def get_preset_names (preset):
    #python implementation of the 'get_preset_names' virtual method

virtual method to get list of presets

Parameters:

preset ( Gst.Preset ) –
No description available
Returns ( [ str ] ) –
No description available

get_property_names

gchar **
get_property_names (GstPreset * preset)

virtual methods to get properties that are persistent

Parameters:

preset
No description available
Returns
No description available

get_property_names

function get_property_names(preset: Gst.Preset): {
    // javascript implementation of the 'get_property_names' virtual method
}

virtual methods to get properties that are persistent

Parameters:

preset ( Gst.Preset ) –
No description available
Returns ( [ String ] ) –
No description available

get_property_names

def get_property_names (preset):
    #python implementation of the 'get_property_names' virtual method

virtual methods to get properties that are persistent

Parameters:

preset ( Gst.Preset ) –
No description available
Returns ( [ str ] ) –
No description available

load_preset

gboolean
load_preset (GstPreset * preset,
             const gchar * name)

virtual methods to load a preset into properties

Parameters:

preset
No description available
name
No description available
Returns
No description available

load_preset

function load_preset(preset: Gst.Preset, name: String): {
    // javascript implementation of the 'load_preset' virtual method
}

virtual methods to load a preset into properties

Parameters:

preset ( Gst.Preset ) –
No description available
name ( String ) –
No description available
Returns ( Number ) –
No description available

load_preset

def load_preset (preset, name):
    #python implementation of the 'load_preset' virtual method

virtual methods to load a preset into properties

Parameters:

preset ( Gst.Preset ) –
No description available
name ( str ) –
No description available
Returns ( bool ) –
No description available

rename_preset

gboolean
rename_preset (GstPreset * preset,
               const gchar * old_name,
               const gchar * new_name)

virtual methods to rename a preset

Parameters:

preset
No description available
old_name
No description available
new_name
No description available
Returns
No description available

rename_preset

function 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:

preset ( Gst.Preset ) –
No description available
old_name ( String ) –
No description available
new_name ( String ) –
No description available
Returns ( Number ) –
No description available

rename_preset

def rename_preset (preset, old_name, new_name):
    #python implementation of the 'rename_preset' virtual method

virtual methods to rename a preset

Parameters:

preset ( Gst.Preset ) –
No description available
old_name ( str ) –
No description available
new_name ( str ) –
No description available
Returns ( bool ) –
No description available

save_preset

gboolean
save_preset (GstPreset * preset,
             const gchar * name)

virtual methods to save properties into a preset

Parameters:

preset
No description available
name
No description available
Returns
No description available

save_preset

function save_preset(preset: Gst.Preset, name: String): {
    // javascript implementation of the 'save_preset' virtual method
}

virtual methods to save properties into a preset

Parameters:

preset ( Gst.Preset ) –
No description available
name ( String ) –
No description available
Returns ( Number ) –
No description available

save_preset

def save_preset (preset, name):
    #python implementation of the 'save_preset' virtual method

virtual methods to save properties into a preset

Parameters:

preset ( Gst.Preset ) –
No description available
name ( str ) –
No description available
Returns ( bool ) –
No description available

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
No description available
name
No description available
tag
No description available
value
No description available
Returns
No description available

set_meta

function 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:

preset ( Gst.Preset ) –
No description available
name ( String ) –
No description available
tag ( String ) –
No description available
value ( String ) –
No description available
Returns ( Number ) –
No description available

set_meta

def 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:

preset ( Gst.Preset ) –
No description available
name ( str ) –
No description available
tag ( str ) –
No description available
value ( str ) –
No description available
Returns ( bool ) –
No description available

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