Gst.ElementClass¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
change_state |
r |
called by set_state to perform an incremental state change |
|
elementfactory |
r |
the |
|
get_state |
r |
get the state of the element |
|
metadata |
r |
metadata for elements of this class |
|
no_more_pads |
r |
||
numpadtemplates |
r |
the number of padtemplates |
|
pad_added |
r |
||
pad_removed |
r |
||
pad_templ_cookie |
r |
changed whenever the padtemplates change |
|
padtemplates |
[ |
r |
a |
parent_class |
r |
the parent class structure |
|
post_message |
r |
called when a message is posted on the element. Chain up to the parent class’ handler to have it posted on the bus. |
|
provide_clock |
r |
gets the |
|
query |
r |
perform a |
|
release_pad |
r |
called when a request pad is to be released |
|
request_new_pad |
r |
called when a new pad is requested |
|
send_event |
r |
send a |
|
set_bus |
r |
set a |
|
set_clock |
r |
set the |
|
set_context |
r |
set a |
|
set_state |
r |
set a new state on the element |
|
state_changed |
r |
called immediately after a new state was set. |
Methods¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class Gst.ElementClass¶
GStreamer element class. Override the vmethods to implement the element functionality.
- add_pad_template(templ)[source]¶
- Parameters:
templ (
Gst.PadTemplate
) – aGst.PadTemplate
to add to the element class.
Adds a padtemplate to an element class. This is mainly used in the _class_init functions of classes. If a pad template with the same name as an already existing one is added the old one is replaced by the new one.
templ's reference count will be incremented, and any floating reference will be removed (see gst_object_ref_sink())
- add_static_metadata(key, value)[source]¶
-
Set key with value as metadata in self.
Same as
Gst.ElementClass.add_metadata
(), but value must be a static string or an inlined string, as it will not be copied. (GStreamer plugins will be made resident once loaded, so this function can be used even from dynamically loaded plugins.)
- add_static_pad_template(static_templ)[source]¶
- Parameters:
static_templ (
Gst.StaticPadTemplate
) –Gst.StaticPadTemplate
to add as pad template to the element class.
Adds a pad template to an element class based on the static pad template templ. This is mainly used in the _class_init functions of element implementations. If a pad template with the same name already exists, the old one is replaced by the new one.
New in version 1.8.
- add_static_pad_template_with_gtype(static_templ, pad_type)[source]¶
- Parameters:
static_templ (
Gst.StaticPadTemplate
) –Gst.StaticPadTemplate
to add as pad template to the element class.pad_type (
GObject.GType
) – TheGObject.GType
of the pad to create
Adds a pad template to an element class based on the static pad template templ. This is mainly used in the _class_init functions of element implementations. If a pad template with the same name already exists, the old one is replaced by the new one.
New in version 1.14.
- get_pad_template(name)[source]¶
- Parameters:
name (
str
) – the name of theGst.PadTemplate
to get.- Returns:
the
Gst.PadTemplate
with the given name, orNone
if none was found. No unreferencing is necessary.- Return type:
Retrieves a padtemplate from self with the given name.
If you use this function in the
GObject.InstanceInitFunc
of an object class that has subclasses, make sure to pass the g_class parameter of theGObject.InstanceInitFunc
here.
- get_pad_template_list()[source]¶
- Returns:
the
GLib.List
of pad templates.- Return type:
Retrieves a list of the pad templates associated with self. The list must not be modified by the calling code.
If you use this function in the
GObject.InstanceInitFunc
of an object class that has subclasses, make sure to pass the g_class parameter of theGObject.InstanceInitFunc
here.
- set_metadata(longname, classification, description, author)[source]¶
- Parameters:
longname (
str
) – The long English name of the element. E.g. “File Sink”classification (
str
) – String describing the type of element, as an unordered list separated with slashes (‘/’). See draft-klass.txt of the design docs for more details and common types. E.g: “Sink/File”description (
str
) – Sentence describing the purpose of the element. E.g: “Write stream to a file”author (
str
) – Name and contact details of the author(s). Use \n to separate multiple author metadata. E.g: “Joe Bloggs <joe.blogs at foo.com>”
Sets the detailed information for a
Gst.ElementClass
.This function is for use in _class_init functions only.
- set_static_metadata(longname, classification, description, author)[source]¶
- Parameters:
longname (
str
) – The long English name of the element. E.g. “File Sink”classification (
str
) – String describing the type of element, as an unordered list separated with slashes (‘/’). See draft-klass.txt of the design docs for more details and common types. E.g: “Sink/File”description (
str
) – Sentence describing the purpose of the element. E.g: “Write stream to a file”author (
str
) – Name and contact details of the author(s). Use \n to separate multiple author metadata. E.g: “Joe Bloggs <joe.blogs at foo.com>”
Sets the detailed information for a
Gst.ElementClass
.This function is for use in _class_init functions only.
Same as
Gst.ElementClass.set_metadata
(), but longname, classification, description, and author must be static strings or inlined strings, as they will not be copied. (GStreamer plugins will be made resident once loaded, so this function can be used even from dynamically loaded plugins.)