GstPbutils.EncodingTarget

g GObject.Object GObject.Object GstPbutils.EncodingTarget GstPbutils.EncodingTarget GObject.Object->GstPbutils.EncodingTarget

Subclasses:None

Methods

Inherited:GObject.Object (37)
Structs:GObject.ObjectClass (5)
class load (name, category)
class load_from_file (filepath)
class new (name, category, description, profiles)
  add_profile (profile)
  get_category ()
  get_description ()
  get_name ()
  get_path ()
  get_profile (name)
  get_profiles ()
  save ()
  save_to_file (filepath)

Virtual Methods

Inherited:GObject.Object (7)

Properties

None

Signals

Inherited:GObject.Object (1)

Fields

Inherited:GObject.Object (1)

Class Details

class GstPbutils.EncodingTarget(**kwargs)
Bases:GObject.Object
Abstract:No

Collection of GstPbutils.EncodingProfile for a specific target or use-case.

When being stored/loaded, targets come from a specific category, like GstPbutils.ENCODING_CATEGORY_DEVICE.

classmethod load(name, category)[source]
Parameters:
Raises:

GLib.Error

Returns:

The GstPbutils.EncodingTarget if available, else None.

Return type:

GstPbutils.EncodingTarget

Searches for the GstPbutils.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.

classmethod load_from_file(filepath)[source]
Parameters:filepath (str) – The file location to load the GstPbutils.EncodingTarget from
Raises:GLib.Error
Returns:The GstPbutils.EncodingTarget contained in the file, else None
Return type:GstPbutils.EncodingTarget

Opens the provided file and returns the contained GstPbutils.EncodingTarget.

classmethod new(name, category, description, profiles)[source]
Parameters:
Returns:

The newly created GstPbutils.EncodingTarget or None if there was an error.

Return type:

GstPbutils.EncodingTarget

Creates a new GstPbutils.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 *should* be one of the existing well-defined categories, like GstPbutils.ENCODING_CATEGORY_DEVICE, but it *can* be a application or user specific category if needed.

add_profile(profile)[source]
Parameters:profile (GstPbutils.EncodingProfile) – the GstPbutils.EncodingProfile to add
Returns:True if the profile was added, else False.
Return type:bool

Adds the given profile to the self. Each added profile must have a unique name within the profile.

The self will steal a reference to the profile. If you wish to use the profile after calling this method, you should increase its reference count.

get_category()[source]
Returns:The category of the self. For example: GstPbutils.ENCODING_CATEGORY_DEVICE.
Return type:str
get_description()[source]
Returns:The description of the self.
Return type:str
get_name()[source]
Returns:The name of the self.
Return type:str
get_path()[source]
Returns:The path to the self file.
Return type:str

New in version 1.18.

get_profile(name)[source]
Parameters:name (str) – the name of the profile to retrieve
Returns:The matching GstPbutils.EncodingProfile, or None.
Return type:GstPbutils.EncodingProfile
get_profiles()[source]
Returns:A list of GstPbutils.EncodingProfile(s) this self handles.
Return type:[GstPbutils.EncodingProfile]
save()[source]
Raises:GLib.Error
Returns:True if the target was correctly saved, else False.
Return type:bool

Saves the self to a default user-local directory.

save_to_file(filepath)[source]
Parameters:filepath (str) – the location to store the self at.
Raises:GLib.Error
Returns:True if the target was correctly saved, else False.
Return type:bool

Saves the self to the provided file location.