GstElement

GstElement is the abstract base class needed to construct an element that can be used in a GStreamer pipeline. Please refer to the plugin writers guide for more information on creating GstElement subclasses.

The name of a GstElement can be get with gst_element_get_name and set with gst_element_set_name. For speed, GST_ELEMENT_NAME can be used in the core when using the appropriate locking. Do not use this in plug-ins or applications in order to retain ABI compatibility.

Elements can have pads (of the type GstPad). These pads link to pads on other elements. GstBuffer flow between these linked pads. A GstElement has a GList of GstPad structures for all their input (or sink) and output (or source) pads. Core and plug-in writers can add and remove pads with gst_element_add_pad and gst_element_remove_pad.

An existing pad of an element can be retrieved by name with gst_element_get_static_pad. A new dynamic pad can be created using gst_element_request_pad with a GstPadTemplate. An iterator of all pads can be retrieved with gst_element_iterate_pads.

Elements can be linked through their pads. If the link is straightforward, use the gst_element_link convenience function to link two elements, or gst_element_link_many for more elements in a row. Use gst_element_link_filtered to link two elements constrained by a specified set of GstCaps. For finer control, use gst_element_link_pads and gst_element_link_pads_filtered to specify the pads to link on each element by name.

Each element has a state (see GstState). You can get and set the state of an element with gst_element_get_state and gst_element_set_state. Setting a state triggers a GstStateChange. To get a string representation of a GstState, use gst_element_state_get_name.

You can get and set a GstClock on an element using gst_element_get_clock and gst_element_set_clock. Some elements can provide a clock for the pipeline if the GST_ELEMENT_FLAG_PROVIDE_CLOCK flag is set. With the gst_element_provide_clock method one can retrieve the clock provided by such an element. Not all elements require a clock to operate correctly. If the GST_ELEMENT_FLAG_REQUIRE_CLOCK() flag is set, a clock should be set on the element with gst_element_set_clock.

Note that clock selection and distribution is normally handled by the toplevel GstPipeline so the clock functions are only to be used in very specific situations.

GstElement

GObject
    ╰──GInitiallyUnowned
        ╰──GstObject
            ╰──GstElement
                ╰──GstBin

GStreamer element abstract base class.

Members

object (GstObject) –
No description available
state_lock (GRecMutex) –

Used to serialize execution of gst_element_set_state

state_cond (GCond) –

Used to signal completion of a state change

state_cookie (guint32) –

Used to detect concurrent execution of gst_element_set_state and gst_element_get_state

target_state (GstState) –

the target state of an element as set by the application

current_state (GstState) –

the current state of an element

next_state (GstState) –

the next state of an element, can be GST_STATE_VOID_PENDING if the element is in the correct state.

pending_state (GstState) –

the final state the element should go to, can be GST_STATE_VOID_PENDING if the element is in the correct state

last_return (GstStateChangeReturn) –

the last return value of an element state change

bus (GstBus *) –

the bus of the element. This bus is provided to the element by the parent element or the application. A GstPipeline has a bus of its own.

clock (GstClock *) –

the clock of the element. This clock is usually provided to the element by the toplevel GstPipeline.

base_time (GstClockTimeDiff) –

the time of the clock right before the element is set to PLAYING. Subtracting base_time from the current clock time in the PLAYING state will yield the running_time against the clock.

start_time (GstClockTime) –

the running_time of the last PAUSED state

numpads (guint16) –

number of pads of the element, includes both source and sink pads.

pads (GList *) –

list of pads

numsrcpads (guint16) –

number of source pads of the element.

srcpads (GList *) –

list of source pads

numsinkpads (guint16) –

number of sink pads of the element.

sinkpads (GList *) –

list of sink pads

pads_cookie (guint32) –

updated whenever the a pad is added or removed

contexts (GList *) –

list of contexts


Class structure

GstElementClass

GStreamer element class. Override the vmethods to implement the element functionality.

Fields
parent_class (GstObjectClass) –

the parent class structure

metadata (gpointer) –

metadata for elements of this class

elementfactory (GstElementFactory *) –

the GstElementFactory that creates these elements

padtemplates (GList *) –

a GList of GstPadTemplate

numpadtemplates (gint) –

the number of padtemplates

pad_templ_cookie (guint32) –

changed whenever the padtemplates change


Gst.ElementClass

GStreamer element class. Override the vmethods to implement the element functionality.

Attributes
parent_class (Gst.ObjectClass) –

the parent class structure

metadata (Object) –

metadata for elements of this class

elementfactory (Gst.ElementFactory) –

the Gst.ElementFactory that creates these elements

padtemplates ([ Object ]) –

a GLib.List of Gst.PadTemplate

numpadtemplates (Number) –

the number of padtemplates

pad_templ_cookie (Number) –

changed whenever the padtemplates change


Gst.ElementClass

GStreamer element class. Override the vmethods to implement the element functionality.

Attributes
parent_class (Gst.ObjectClass) –

the parent class structure

metadata (object) –

metadata for elements of this class

elementfactory (Gst.ElementFactory) –

the Gst.ElementFactory that creates these elements

padtemplates ([ object ]) –

a GLib.List of Gst.PadTemplate

numpadtemplates (int) –

the number of padtemplates

pad_templ_cookie (int) –

changed whenever the padtemplates change


Gst.Element

GObject.Object
    ╰──GObject.InitiallyUnowned
        ╰──Gst.Object
            ╰──Gst.Element
                ╰──Gst.Bin

GStreamer element abstract base class.

Members

object (Gst.Object) –
No description available
state_lock (GLib.RecMutex) –

Used to serialize execution of Gst.Element.prototype.set_state

state_cond (GLib.Cond) –

Used to signal completion of a state change

state_cookie (Number) –

Used to detect concurrent execution of Gst.Element.prototype.set_state and Gst.Element.prototype.get_state

target_state (Gst.State) –

the target state of an element as set by the application

current_state (Gst.State) –

the current state of an element

next_state (Gst.State) –

the next state of an element, can be Gst.State.VOID_PENDING if the element is in the correct state.

pending_state (Gst.State) –

the final state the element should go to, can be Gst.State.VOID_PENDING if the element is in the correct state

last_return (Gst.StateChangeReturn) –

the last return value of an element state change

bus (Gst.Bus) –

the bus of the element. This bus is provided to the element by the parent element or the application. A Gst.Pipeline has a bus of its own.

clock (Gst.Clock) –

the clock of the element. This clock is usually provided to the element by the toplevel Gst.Pipeline.

base_time (Number) –

the time of the clock right before the element is set to PLAYING. Subtracting base_time from the current clock time in the PLAYING state will yield the running_time against the clock.

start_time (Number) –

the running_time of the last PAUSED state

numpads (Number) –

number of pads of the element, includes both source and sink pads.

pads ([ Gst.Pad ]) –

list of pads

numsrcpads (Number) –

number of source pads of the element.

srcpads ([ Gst.Pad ]) –

list of source pads

numsinkpads (Number) –

number of sink pads of the element.

sinkpads ([ Gst.Pad ]) –

list of sink pads

pads_cookie (Number) –

updated whenever the a pad is added or removed

contexts ([ Gst.Context ]) –

list of contexts


Gst.Element

GObject.Object
    ╰──GObject.InitiallyUnowned
        ╰──Gst.Object
            ╰──Gst.Element
                ╰──Gst.Bin

GStreamer element abstract base class.

Members

object (Gst.Object) –
No description available
state_lock (GLib.RecMutex) –

Used to serialize execution of Gst.Element.set_state

state_cond (GLib.Cond) –

Used to signal completion of a state change

state_cookie (int) –

Used to detect concurrent execution of Gst.Element.set_state and Gst.Element.get_state

target_state (Gst.State) –

the target state of an element as set by the application

current_state (Gst.State) –

the current state of an element

next_state (Gst.State) –

the next state of an element, can be Gst.State.VOID_PENDING if the element is in the correct state.

pending_state (Gst.State) –

the final state the element should go to, can be Gst.State.VOID_PENDING if the element is in the correct state

last_return (Gst.StateChangeReturn) –

the last return value of an element state change

bus (Gst.Bus) –

the bus of the element. This bus is provided to the element by the parent element or the application. A Gst.Pipeline has a bus of its own.

clock (Gst.Clock) –

the clock of the element. This clock is usually provided to the element by the toplevel Gst.Pipeline.

base_time (int) –

the time of the clock right before the element is set to PLAYING. Subtracting base_time from the current clock time in the PLAYING state will yield the running_time against the clock.

start_time (int) –

the running_time of the last PAUSED state

numpads (int) –

number of pads of the element, includes both source and sink pads.

pads ([ Gst.Pad ]) –

list of pads

numsrcpads (int) –

number of source pads of the element.

srcpads ([ Gst.Pad ]) –

list of source pads

numsinkpads (int) –

number of sink pads of the element.

sinkpads ([ Gst.Pad ]) –

list of sink pads

pads_cookie (int) –

updated whenever the a pad is added or removed

contexts ([ Gst.Context ]) –

list of contexts


Methods

gst_element_abort_state

gst_element_abort_state (GstElement * element)

Abort the state change of the element. This function is used by elements that do asynchronous state changes and find out something is wrong.

This function should be called with the STATE_LOCK held.

MT safe.

Parameters:

element

a GstElement to abort the state of.


Gst.Element.prototype.abort_state

function Gst.Element.prototype.abort_state(): {
    // javascript wrapper for 'gst_element_abort_state'
}

Abort the state change of the element. This function is used by elements that do asynchronous state changes and find out something is wrong.

This function should be called with the STATE_LOCK held.

MT safe.

Parameters:

element (Gst.Element)

a Gst.Element to abort the state of.


Gst.Element.abort_state

def Gst.Element.abort_state (self):
    #python wrapper for 'gst_element_abort_state'

Abort the state change of the element. This function is used by elements that do asynchronous state changes and find out something is wrong.

This function should be called with the STATE_LOCK held.

MT safe.

Parameters:

element (Gst.Element)

a Gst.Element to abort the state of.


gst_element_add_pad

gboolean
gst_element_add_pad (GstElement * element,
                     GstPad * pad)

Adds a pad (link point) to element. pad's parent will be set to element; see gst_object_set_parent for refcounting information.

Pads are automatically activated when added in the PAUSED or PLAYING state.

The pad and the element should be unlocked when calling this function.

This function will emit the pad-added signal on the element.

Parameters:

element

a GstElement to add the pad to.

pad ( [transfer: floating])

the GstPad to add to the element.

Returns

TRUE if the pad could be added. This function can fail when a pad with the same name already existed or the pad already had another parent.

MT safe.


Gst.Element.prototype.add_pad

function Gst.Element.prototype.add_pad(pad: Gst.Pad): {
    // javascript wrapper for 'gst_element_add_pad'
}

Adds a pad (link point) to element. pad's parent will be set to element; see Gst.Object.prototype.set_parent for refcounting information.

Pads are automatically activated when added in the PAUSED or PLAYING state.

The pad and the element should be unlocked when calling this function.

This function will emit the pad-added signal on the element.

Parameters:

element (Gst.Element)

a Gst.Element to add the pad to.

pad (Gst.Pad)

the Gst.Pad to add to the element.

Returns (Number)

true if the pad could be added. This function can fail when a pad with the same name already existed or the pad already had another parent.

MT safe.


Gst.Element.add_pad

def Gst.Element.add_pad (self, pad):
    #python wrapper for 'gst_element_add_pad'

Adds a pad (link point) to element. pad's parent will be set to element; see Gst.Object.set_parent for refcounting information.

Pads are automatically activated when added in the PAUSED or PLAYING state.

The pad and the element should be unlocked when calling this function.

This function will emit the pad-added signal on the element.

Parameters:

element (Gst.Element)

a Gst.Element to add the pad to.

pad (Gst.Pad)

the Gst.Pad to add to the element.

Returns (bool)

True if the pad could be added. This function can fail when a pad with the same name already existed or the pad already had another parent.

MT safe.


gst_element_add_property_deep_notify_watch

gulong
gst_element_add_property_deep_notify_watch (GstElement * element,
                                            const gchar * property_name,
                                            gboolean include_value)

Parameters:

element

a GstElement to watch (recursively) for property changes

property_name ( [allow-none])

name of property to watch for changes, or NULL to watch all properties

include_value

whether to include the new property value in the message

Returns

a watch id, which can be used in connection with gst_element_remove_property_notify_watch to remove the watch again.

Since : 1.10


Gst.Element.prototype.add_property_deep_notify_watch

function Gst.Element.prototype.add_property_deep_notify_watch(property_name: String, include_value: Number): {
    // javascript wrapper for 'gst_element_add_property_deep_notify_watch'
}

Parameters:

element (Gst.Element)

a Gst.Element to watch (recursively) for property changes

property_name (String)

name of property to watch for changes, or NULL to watch all properties

include_value (Number)

whether to include the new property value in the message

Returns (Number)

a watch id, which can be used in connection with Gst.Element.prototype.remove_property_notify_watch to remove the watch again.

Since : 1.10


Gst.Element.add_property_deep_notify_watch

def Gst.Element.add_property_deep_notify_watch (self, property_name, include_value):
    #python wrapper for 'gst_element_add_property_deep_notify_watch'

Parameters:

element (Gst.Element)

a Gst.Element to watch (recursively) for property changes

property_name (str)

name of property to watch for changes, or NULL to watch all properties

include_value (bool)

whether to include the new property value in the message

Returns (int)

a watch id, which can be used in connection with Gst.Element.remove_property_notify_watch to remove the watch again.

Since : 1.10


gst_element_add_property_notify_watch

gulong
gst_element_add_property_notify_watch (GstElement * element,
                                       const gchar * property_name,
                                       gboolean include_value)

Parameters:

element

a GstElement to watch for property changes

property_name ( [allow-none])

name of property to watch for changes, or NULL to watch all properties

include_value

whether to include the new property value in the message

Returns

a watch id, which can be used in connection with gst_element_remove_property_notify_watch to remove the watch again.

Since : 1.10


Gst.Element.prototype.add_property_notify_watch

function Gst.Element.prototype.add_property_notify_watch(property_name: String, include_value: Number): {
    // javascript wrapper for 'gst_element_add_property_notify_watch'
}

Parameters:

element (Gst.Element)

a Gst.Element to watch for property changes

property_name (String)

name of property to watch for changes, or NULL to watch all properties

include_value (Number)

whether to include the new property value in the message

Returns (Number)

a watch id, which can be used in connection with Gst.Element.prototype.remove_property_notify_watch to remove the watch again.

Since : 1.10


Gst.Element.add_property_notify_watch

def Gst.Element.add_property_notify_watch (self, property_name, include_value):
    #python wrapper for 'gst_element_add_property_notify_watch'

Parameters:

element (Gst.Element)

a Gst.Element to watch for property changes

property_name (str)

name of property to watch for changes, or NULL to watch all properties

include_value (bool)

whether to include the new property value in the message

Returns (int)

a watch id, which can be used in connection with Gst.Element.remove_property_notify_watch to remove the watch again.

Since : 1.10


gst_element_call_async

gst_element_call_async (GstElement * element,
                        GstElementCallAsyncFunc func,
                        gpointer user_data,
                        GDestroyNotify destroy_notify)

Calls func from another thread and passes user_data to it. This is to be used for cases when a state change has to be performed from a streaming thread, directly via gst_element_set_state or indirectly e.g. via SEEK events.

Calling those functions directly from the streaming thread will cause deadlocks in many situations, as they might involve waiting for the streaming thread to shut down from this very streaming thread.

MT safe.

Parameters:

element

a GstElement

func

Function to call asynchronously from another thread

user_data

Data to pass to func

destroy_notify

GDestroyNotify for user_data

Since : 1.10


Gst.Element.prototype.call_async

function Gst.Element.prototype.call_async(func: Gst.ElementCallAsyncFunc, user_data: Object): {
    // javascript wrapper for 'gst_element_call_async'
}

Calls func from another thread and passes user_data to it. This is to be used for cases when a state change has to be performed from a streaming thread, directly via Gst.Element.prototype.set_state or indirectly e.g. via SEEK events.

Calling those functions directly from the streaming thread will cause deadlocks in many situations, as they might involve waiting for the streaming thread to shut down from this very streaming thread.

MT safe.

Parameters:

element (Gst.Element)

a Gst.Element

Function to call asynchronously from another thread

user_data (Object)

Data to pass to func

Since : 1.10


Gst.Element.call_async

def Gst.Element.call_async (self, func, *user_data):
    #python wrapper for 'gst_element_call_async'

Calls func from another thread and passes user_data to it. This is to be used for cases when a state change has to be performed from a streaming thread, directly via Gst.Element.set_state or indirectly e.g. via SEEK events.

Calling those functions directly from the streaming thread will cause deadlocks in many situations, as they might involve waiting for the streaming thread to shut down from this very streaming thread.

MT safe.

Parameters:

element (Gst.Element)

a Gst.Element

Function to call asynchronously from another thread

user_data (variadic)

Data to pass to func

Since : 1.10


gst_element_change_state

GstStateChangeReturn
gst_element_change_state (GstElement * element,
                          GstStateChange transition)

Perform transition on element.

This function must be called with STATE_LOCK held and is mainly used internally.

Parameters:

element

a GstElement

transition

the requested transition

Returns

the GstStateChangeReturn of the state transition.


Gst.Element.prototype.change_state

function Gst.Element.prototype.change_state(transition: Gst.StateChange): {
    // javascript wrapper for 'gst_element_change_state'
}

Perform transition on element.

This function must be called with STATE_LOCK held and is mainly used internally.

Parameters:

element (Gst.Element)

a Gst.Element

transition (Gst.StateChange)

the requested transition

Returns (Gst.StateChangeReturn)

the Gst.StateChangeReturn of the state transition.


Gst.Element.change_state

def Gst.Element.change_state (self, transition):
    #python wrapper for 'gst_element_change_state'

Perform transition on element.

This function must be called with STATE_LOCK held and is mainly used internally.

Parameters:

element (Gst.Element)

a Gst.Element

transition (Gst.StateChange)

the requested transition

Returns (Gst.StateChangeReturn)

the Gst.StateChangeReturn of the state transition.


gst_element_continue_state

GstStateChangeReturn
gst_element_continue_state (GstElement * element,
                            GstStateChangeReturn ret)

Commit the state change of the element and proceed to the next pending state if any. This function is used by elements that do asynchronous state changes. The core will normally call this method automatically when an element returned GST_STATE_CHANGE_SUCCESS from the state change function.

If after calling this method the element still has not reached the pending state, the next state change is performed.

This method is used internally and should normally not be called by plugins or applications.

This function must be called with STATE_LOCK held.

Parameters:

element

a GstElement to continue the state change of.

ret

The previous state return value

Returns

The result of the commit state change.

MT safe.


Gst.Element.prototype.continue_state

function Gst.Element.prototype.continue_state(ret: Gst.StateChangeReturn): {
    // javascript wrapper for 'gst_element_continue_state'
}

Commit the state change of the element and proceed to the next pending state if any. This function is used by elements that do asynchronous state changes. The core will normally call this method automatically when an element returned Gst.StateChangeReturn.SUCCESS from the state change function.

If after calling this method the element still has not reached the pending state, the next state change is performed.

This method is used internally and should normally not be called by plugins or applications.

This function must be called with STATE_LOCK held.

Parameters:

element (Gst.Element)

a Gst.Element to continue the state change of.

The previous state return value

Returns (Gst.StateChangeReturn)

The result of the commit state change.

MT safe.


Gst.Element.continue_state

def Gst.Element.continue_state (self, ret):
    #python wrapper for 'gst_element_continue_state'

Commit the state change of the element and proceed to the next pending state if any. This function is used by elements that do asynchronous state changes. The core will normally call this method automatically when an element returned Gst.StateChangeReturn.SUCCESS from the state change function.

If after calling this method the element still has not reached the pending state, the next state change is performed.

This method is used internally and should normally not be called by plugins or applications.

This function must be called with STATE_LOCK held.

Parameters:

element (Gst.Element)

a Gst.Element to continue the state change of.

The previous state return value

Returns (Gst.StateChangeReturn)

The result of the commit state change.

MT safe.


gst_element_create_all_pads

gst_element_create_all_pads (GstElement * element)

Creates a pad for each pad template that is always available. This function is only useful during object initialization of subclasses of GstElement.

Parameters:

element ( [transfer: none])

a GstElement to create pads for


Gst.Element.prototype.create_all_pads

function Gst.Element.prototype.create_all_pads(): {
    // javascript wrapper for 'gst_element_create_all_pads'
}

Creates a pad for each pad template that is always available. This function is only useful during object initialization of subclasses of Gst.Element.

Parameters:

element (Gst.Element)

a Gst.Element to create pads for


Gst.Element.create_all_pads

def Gst.Element.create_all_pads (self):
    #python wrapper for 'gst_element_create_all_pads'

Creates a pad for each pad template that is always available. This function is only useful during object initialization of subclasses of Gst.Element.

Parameters:

element (Gst.Element)

a Gst.Element to create pads for


gst_element_decorate_stream_id

gchar *
gst_element_decorate_stream_id (GstElement * element,
                                const gchar * stream_id)

Creates a stream-id for element by combining the upstream information with the stream_id.

This function generates an unique stream-id by getting the upstream stream-start event stream ID and appending stream_id to it. If the element has no sinkpad it will generate an upstream stream-id by doing an URI query on the element and in the worst case just uses a random number. Source elements that don't implement the URI handler interface should ideally generate a unique, deterministic stream-id manually instead.

Since stream IDs are sorted alphabetically, any numbers in the stream ID should be printed with a fixed number of characters, preceded by 0's, such as by using the format %03u instead of %u.

Parameters:

element

The GstElement to create a stream-id for

stream_id ( [not nullable])

The stream-id

Returns ( [transfer: full])

A stream-id for element.

Since : 1.24


Gst.Element.prototype.decorate_stream_id

function Gst.Element.prototype.decorate_stream_id(stream_id: String): {
    // javascript wrapper for 'gst_element_decorate_stream_id'
}

Creates a stream-id for element by combining the upstream information with the stream_id.

This function generates an unique stream-id by getting the upstream stream-start event stream ID and appending stream_id to it. If the element has no sinkpad it will generate an upstream stream-id by doing an URI query on the element and in the worst case just uses a random number. Source elements that don't implement the URI handler interface should ideally generate a unique, deterministic stream-id manually instead.

Since stream IDs are sorted alphabetically, any numbers in the stream ID should be printed with a fixed number of characters, preceded by 0's, such as by using the format %03u instead of %u.

Parameters:

element (Gst.Element)

The Gst.Element to create a stream-id for

stream_id (String)

The stream-id

Returns (String)

A stream-id for element.

Since : 1.24


Gst.Element.decorate_stream_id

def Gst.Element.decorate_stream_id (self, stream_id):
    #python wrapper for 'gst_element_decorate_stream_id'

Creates a stream-id for element by combining the upstream information with the stream_id.

This function generates an unique stream-id by getting the upstream stream-start event stream ID and appending stream_id to it. If the element has no sinkpad it will generate an upstream stream-id by doing an URI query on the element and in the worst case just uses a random number. Source elements that don't implement the URI handler interface should ideally generate a unique, deterministic stream-id manually instead.

Since stream IDs are sorted alphabetically, any numbers in the stream ID should be printed with a fixed number of characters, preceded by 0's, such as by using the format %03u instead of %u.

Parameters:

element (Gst.Element)

The Gst.Element to create a stream-id for

stream_id (str)

The stream-id

Returns (str)

A stream-id for element.

Since : 1.24


gst_element_decorate_stream_id_printf

gchar *
gst_element_decorate_stream_id_printf (GstElement * element,
                                       const gchar * format,
                                       ... ...)

Creates a stream-id for element by combining the upstream information with the format.

This function generates an unique stream-id by getting the upstream stream-start event stream ID and appending the stream-id to it. If the element has no sinkpad it will generate an upstream stream-id by doing an URI query on the element and in the worst case just uses a random number. Source elements that don't implement the URI handler interface should ideally generate a unique, deterministic stream-id manually instead.

Since stream IDs are sorted alphabetically, any numbers in the stream ID should be printed with a fixed number of characters, preceded by 0's, such as by using the format %03u instead of %u.

Parameters:

element

The GstElement to create a stream-id for

format ( [not nullable])

The stream-id

...
No description available
Returns ( [transfer: full])

A stream-id for element.

Since : 1.24


gst_element_decorate_stream_id_printf_valist

gchar *
gst_element_decorate_stream_id_printf_valist (GstElement * element,
                                              const gchar * format,
                                              va_list var_args)

Creates a stream-id for element by combining the upstream information with the format.

This function generates an unique stream-id by getting the upstream stream-start event stream ID and appending format to it. If the element has no sinkpad it will generate an upstream stream-id by doing an URI query on the element and in the worst case just uses a random number. Source elements that don't implement the URI handler interface should ideally generate a unique, deterministic stream-id manually instead.

Since stream IDs are sorted alphabetically, any numbers in the stream ID should be printed with a fixed number of characters, preceded by 0's, such as by using the format %03u instead of %u.

Parameters:

element

The GstElement to create a stream-id for

format ( [not nullable])

The stream-id

var_args

parameters for the format string

Returns ( [transfer: full])

A stream-id for element.

Since : 1.24


gst_element_foreach_pad

gboolean
gst_element_foreach_pad (GstElement * element,
                         GstElementForeachPadFunc func,
                         gpointer user_data)

Call func with user_data for each of element's pads. func will be called exactly once for each pad that exists at the time of this call, unless one of the calls to func returns FALSE in which case we will stop iterating pads and return early. If new pads are added or pads are removed while pads are being iterated, this will not be taken into account until next time this function is used.

Parameters:

element

a GstElement to iterate pads of

func ( [scope call][closure])

function to call for each pad

user_data

user data passed to func

Returns

FALSE if element had no pads or if one of the calls to func returned FALSE.

Since : 1.14


Gst.Element.prototype.foreach_pad

function Gst.Element.prototype.foreach_pad(func: Gst.ElementForeachPadFunc, user_data: Object): {
    // javascript wrapper for 'gst_element_foreach_pad'
}

Call func with user_data for each of element's pads. func will be called exactly once for each pad that exists at the time of this call, unless one of the calls to func returns false in which case we will stop iterating pads and return early. If new pads are added or pads are removed while pads are being iterated, this will not be taken into account until next time this function is used.

Parameters:

element (Gst.Element)

a Gst.Element to iterate pads of

function to call for each pad

user_data (Object)

user data passed to func

Returns (Number)

false if element had no pads or if one of the calls to func returned false.

Since : 1.14


Gst.Element.foreach_pad

def Gst.Element.foreach_pad (self, func, *user_data):
    #python wrapper for 'gst_element_foreach_pad'

Call func with user_data for each of element's pads. func will be called exactly once for each pad that exists at the time of this call, unless one of the calls to func returns False in which case we will stop iterating pads and return early. If new pads are added or pads are removed while pads are being iterated, this will not be taken into account until next time this function is used.

Parameters:

element (Gst.Element)

a Gst.Element to iterate pads of

function to call for each pad

user_data (variadic)

user data passed to func

Returns (bool)

False if element had no pads or if one of the calls to func returned False.

Since : 1.14


gst_element_foreach_sink_pad

gboolean
gst_element_foreach_sink_pad (GstElement * element,
                              GstElementForeachPadFunc func,
                              gpointer user_data)

Call func with user_data for each of element's sink pads. func will be called exactly once for each sink pad that exists at the time of this call, unless one of the calls to func returns FALSE in which case we will stop iterating pads and return early. If new sink pads are added or sink pads are removed while the sink pads are being iterated, this will not be taken into account until next time this function is used.

Parameters:

element

a GstElement to iterate sink pads of

func ( [scope call][closure])

function to call for each sink pad

user_data

user data passed to func

Returns

FALSE if element had no sink pads or if one of the calls to func returned FALSE.

Since : 1.14


Gst.Element.prototype.foreach_sink_pad

function Gst.Element.prototype.foreach_sink_pad(func: Gst.ElementForeachPadFunc, user_data: Object): {
    // javascript wrapper for 'gst_element_foreach_sink_pad'
}

Call func with user_data for each of element's sink pads. func will be called exactly once for each sink pad that exists at the time of this call, unless one of the calls to func returns false in which case we will stop iterating pads and return early. If new sink pads are added or sink pads are removed while the sink pads are being iterated, this will not be taken into account until next time this function is used.

Parameters:

element (Gst.Element)

a Gst.Element to iterate sink pads of

function to call for each sink pad

user_data (Object)

user data passed to func

Returns (Number)

false if element had no sink pads or if one of the calls to func returned false.

Since : 1.14


Gst.Element.foreach_sink_pad

def Gst.Element.foreach_sink_pad (self, func, *user_data):
    #python wrapper for 'gst_element_foreach_sink_pad'

Call func with user_data for each of element's sink pads. func will be called exactly once for each sink pad that exists at the time of this call, unless one of the calls to func returns False in which case we will stop iterating pads and return early. If new sink pads are added or sink pads are removed while the sink pads are being iterated, this will not be taken into account until next time this function is used.

Parameters:

element (Gst.Element)

a Gst.Element to iterate sink pads of

function to call for each sink pad

user_data (variadic)

user data passed to func

Returns (bool)

False if element had no sink pads or if one of the calls to func returned False.

Since : 1.14


gst_element_foreach_src_pad

gboolean
gst_element_foreach_src_pad (GstElement * element,
                             GstElementForeachPadFunc func,
                             gpointer user_data)

Call func with user_data for each of element's source pads. func will be called exactly once for each source pad that exists at the time of this call, unless one of the calls to func returns FALSE in which case we will stop iterating pads and return early. If new source pads are added or source pads are removed while the source pads are being iterated, this will not be taken into account until next time this function is used.

Parameters:

element

a GstElement to iterate source pads of

func ( [scope call][closure])

function to call for each source pad

user_data

user data passed to func

Returns

FALSE if element had no source pads or if one of the calls to func returned FALSE.

Since : 1.14


Gst.Element.prototype.foreach_src_pad

function Gst.Element.prototype.foreach_src_pad(func: Gst.ElementForeachPadFunc, user_data: Object): {
    // javascript wrapper for 'gst_element_foreach_src_pad'
}

Call func with user_data for each of element's source pads. func will be called exactly once for each source pad that exists at the time of this call, unless one of the calls to func returns false in which case we will stop iterating pads and return early. If new source pads are added or source pads are removed while the source pads are being iterated, this will not be taken into account until next time this function is used.

Parameters:

element (Gst.Element)

a Gst.Element to iterate source pads of

function to call for each source pad

user_data (Object)

user data passed to func

Returns (Number)

false if element had no source pads or if one of the calls to func returned false.

Since : 1.14


Gst.Element.foreach_src_pad

def Gst.Element.foreach_src_pad (self, func, *user_data):
    #python wrapper for 'gst_element_foreach_src_pad'

Call func with user_data for each of element's source pads. func will be called exactly once for each source pad that exists at the time of this call, unless one of the calls to func returns False in which case we will stop iterating pads and return early. If new source pads are added or source pads are removed while the source pads are being iterated, this will not be taken into account until next time this function is used.

Parameters:

element (Gst.Element)

a Gst.Element to iterate source pads of

function to call for each source pad

user_data (variadic)

user data passed to func

Returns (bool)

False if element had no source pads or if one of the calls to func returned False.

Since : 1.14


gst_element_get_base_time

GstClockTime
gst_element_get_base_time (GstElement * element)

Returns the base time of the element. The base time is the absolute time of the clock when this element was last put to PLAYING. Subtracting the base time from the clock time gives the running time of the element.

Parameters:

element

a GstElement.

Returns

the base time of the element.

MT safe.


Gst.Element.prototype.get_base_time

function Gst.Element.prototype.get_base_time(): {
    // javascript wrapper for 'gst_element_get_base_time'
}

Returns the base time of the element. The base time is the absolute time of the clock when this element was last put to PLAYING. Subtracting the base time from the clock time gives the running time of the element.

Parameters:

element (Gst.Element)

a Gst.Element.

Returns (Number)

the base time of the element.

MT safe.


Gst.Element.get_base_time

def Gst.Element.get_base_time (self):
    #python wrapper for 'gst_element_get_base_time'

Returns the base time of the element. The base time is the absolute time of the clock when this element was last put to PLAYING. Subtracting the base time from the clock time gives the running time of the element.

Parameters:

element (Gst.Element)

a Gst.Element.

Returns (int)

the base time of the element.

MT safe.


gst_element_get_bus

GstBus *
gst_element_get_bus (GstElement * element)

Returns the bus of the element. Note that only a GstPipeline will provide a bus for the application.

Parameters:

element

a GstElement to get the bus of.

Returns ( [transfer: full][nullable])

the element's GstBus. unref after usage.

MT safe.


Gst.Element.prototype.get_bus

function Gst.Element.prototype.get_bus(): {
    // javascript wrapper for 'gst_element_get_bus'
}

Returns the bus of the element. Note that only a Gst.Pipeline will provide a bus for the application.

Parameters:

element (Gst.Element)

a Gst.Element to get the bus of.

Returns (Gst.Bus)

the element's Gst.Bus. unref after usage.

MT safe.


Gst.Element.get_bus

def Gst.Element.get_bus (self):
    #python wrapper for 'gst_element_get_bus'

Returns the bus of the element. Note that only a Gst.Pipeline will provide a bus for the application.

Parameters:

element (Gst.Element)

a Gst.Element to get the bus of.

Returns (Gst.Bus)

the element's Gst.Bus. unref after usage.

MT safe.


gst_element_get_clock

GstClock *
gst_element_get_clock (GstElement * element)

Gets the currently configured clock of the element. This is the clock as was last set with gst_element_set_clock.

Elements in a pipeline will only have their clock set when the pipeline is in the PLAYING state.

Parameters:

element

a GstElement to get the clock of.

Returns ( [transfer: full][nullable])

the GstClock of the element. unref after usage.

MT safe.


Gst.Element.prototype.get_clock

function Gst.Element.prototype.get_clock(): {
    // javascript wrapper for 'gst_element_get_clock'
}

Gets the currently configured clock of the element. This is the clock as was last set with Gst.Element.prototype.set_clock.

Elements in a pipeline will only have their clock set when the pipeline is in the PLAYING state.

Parameters:

element (Gst.Element)

a Gst.Element to get the clock of.

Returns (Gst.Clock)

the Gst.Clock of the element. unref after usage.

MT safe.


Gst.Element.get_clock

def Gst.Element.get_clock (self):
    #python wrapper for 'gst_element_get_clock'

Gets the currently configured clock of the element. This is the clock as was last set with Gst.Element.set_clock.

Elements in a pipeline will only have their clock set when the pipeline is in the PLAYING state.

Parameters:

element (Gst.Element)

a Gst.Element to get the clock of.

Returns (Gst.Clock)

the Gst.Clock of the element. unref after usage.

MT safe.


gst_element_get_compatible_pad

GstPad *
gst_element_get_compatible_pad (GstElement * element,
                                GstPad * pad,
                                GstCaps * caps)

Looks for an unlinked pad to which the given pad can link. It is not guaranteed that linking the pads will work, though it should work in most cases.

This function will first attempt to find a compatible unlinked ALWAYS pad, and if none can be found, it will request a compatible REQUEST pad by looking at the templates of element.

Parameters:

element ( [transfer: none])

a GstElement in which the pad should be found.

pad ( [transfer: none])

the GstPad to find a compatible one for.

caps ( [nullable])

the GstCaps to use as a filter.

Returns ( [transfer: full][nullable])

the GstPad to which a link can be made, or NULL if one cannot be found. gst_object_unref after usage.


Gst.Element.prototype.get_compatible_pad

function Gst.Element.prototype.get_compatible_pad(pad: Gst.Pad, caps: Gst.Caps): {
    // javascript wrapper for 'gst_element_get_compatible_pad'
}

Looks for an unlinked pad to which the given pad can link. It is not guaranteed that linking the pads will work, though it should work in most cases.

This function will first attempt to find a compatible unlinked ALWAYS pad, and if none can be found, it will request a compatible REQUEST pad by looking at the templates of element.

Parameters:

element (Gst.Element)

a Gst.Element in which the pad should be found.

pad (Gst.Pad)

the Gst.Pad to find a compatible one for.

caps (Gst.Caps)

the Gst.Caps to use as a filter.

Returns (Gst.Pad)

the Gst.Pad to which a link can be made, or null if one cannot be found. Gst.Object.prototype.unref after usage.


Gst.Element.get_compatible_pad

def Gst.Element.get_compatible_pad (self, pad, caps):
    #python wrapper for 'gst_element_get_compatible_pad'

Looks for an unlinked pad to which the given pad can link. It is not guaranteed that linking the pads will work, though it should work in most cases.

This function will first attempt to find a compatible unlinked ALWAYS pad, and if none can be found, it will request a compatible REQUEST pad by looking at the templates of element.

Parameters:

element (Gst.Element)

a Gst.Element in which the pad should be found.

pad (Gst.Pad)

the Gst.Pad to find a compatible one for.

caps (Gst.Caps)

the Gst.Caps to use as a filter.

Returns (Gst.Pad)

the Gst.Pad to which a link can be made, or None if one cannot be found. Gst.Object.unref after usage.


gst_element_get_compatible_pad_template

GstPadTemplate *
gst_element_get_compatible_pad_template (GstElement * element,
                                         GstPadTemplate * compattempl)

Retrieves a pad template from element that is compatible with compattempl. Pads from compatible templates can be linked together.

Parameters:

element ( [transfer: none])

a GstElement to get a compatible pad template for

compattempl ( [transfer: none])

the GstPadTemplate to find a compatible template for

Returns ( [transfer: none][nullable])

a compatible GstPadTemplate, or NULL if none was found. No unreferencing is necessary.


Gst.Element.prototype.get_compatible_pad_template

function Gst.Element.prototype.get_compatible_pad_template(compattempl: Gst.PadTemplate): {
    // javascript wrapper for 'gst_element_get_compatible_pad_template'
}

Retrieves a pad template from element that is compatible with compattempl. Pads from compatible templates can be linked together.

Parameters:

element (Gst.Element)

a Gst.Element to get a compatible pad template for

compattempl (Gst.PadTemplate)

the Gst.PadTemplate to find a compatible template for

Returns (Gst.PadTemplate)

a compatible Gst.PadTemplate, or null if none was found. No unreferencing is necessary.


Gst.Element.get_compatible_pad_template

def Gst.Element.get_compatible_pad_template (self, compattempl):
    #python wrapper for 'gst_element_get_compatible_pad_template'

Retrieves a pad template from element that is compatible with compattempl. Pads from compatible templates can be linked together.

Parameters:

element (Gst.Element)

a Gst.Element to get a compatible pad template for

compattempl (Gst.PadTemplate)

the Gst.PadTemplate to find a compatible template for

Returns (Gst.PadTemplate)

a compatible Gst.PadTemplate, or None if none was found. No unreferencing is necessary.


gst_element_get_context

GstContext *
gst_element_get_context (GstElement * element,
                         const gchar * context_type)

Gets the context with context_type set on the element or NULL.

MT safe.

Parameters:

element

a GstElement to get the context of.

context_type

a name of a context to retrieve

Returns ( [transfer: full][nullable])

A GstContext or NULL

Since : 1.8


Gst.Element.prototype.get_context

function Gst.Element.prototype.get_context(context_type: String): {
    // javascript wrapper for 'gst_element_get_context'
}

Gets the context with context_type set on the element or NULL.

MT safe.

Parameters:

element (Gst.Element)

a Gst.Element to get the context of.

context_type (String)

a name of a context to retrieve

Returns (Gst.Context)

A Gst.Context or NULL

Since : 1.8


Gst.Element.get_context

def Gst.Element.get_context (self, context_type):
    #python wrapper for 'gst_element_get_context'

Gets the context with context_type set on the element or NULL.

MT safe.

Parameters:

element (Gst.Element)

a Gst.Element to get the context of.

context_type (str)

a name of a context to retrieve

Returns (Gst.Context)

A Gst.Context or NULL

Since : 1.8


gst_element_get_context_unlocked

GstContext *
gst_element_get_context_unlocked (GstElement * element,
                                  const gchar * context_type)

Gets the context with context_type set on the element or NULL.

Parameters:

element

a GstElement to get the context of.

context_type

a name of a context to retrieve

Returns ( [transfer: full][nullable])

A GstContext or NULL

Since : 1.8


Gst.Element.prototype.get_context_unlocked

function Gst.Element.prototype.get_context_unlocked(context_type: String): {
    // javascript wrapper for 'gst_element_get_context_unlocked'
}

Gets the context with context_type set on the element or NULL.

Parameters:

element (Gst.Element)

a Gst.Element to get the context of.

context_type (String)

a name of a context to retrieve

Returns (Gst.Context)

A Gst.Context or NULL

Since : 1.8


Gst.Element.get_context_unlocked

def Gst.Element.get_context_unlocked (self, context_type):
    #python wrapper for 'gst_element_get_context_unlocked'

Gets the context with context_type set on the element or NULL.

Parameters:

element (Gst.Element)

a Gst.Element to get the context of.

context_type (str)

a name of a context to retrieve

Returns (Gst.Context)

A Gst.Context or NULL

Since : 1.8


gst_element_get_contexts

GList *
gst_element_get_contexts (GstElement * element)

Gets the contexts set on the element.

MT safe.

Parameters:

element

a GstElement to set the context of.

Returns ( [element-typeGst.Context][transfer: full])

List of GstContext

Since : 1.8


Gst.Element.prototype.get_contexts

function Gst.Element.prototype.get_contexts(): {
    // javascript wrapper for 'gst_element_get_contexts'
}

Gets the contexts set on the element.

MT safe.

Parameters:

element (Gst.Element)

a Gst.Element to set the context of.

Returns ([ Gst.Context ])

List of Gst.Context

Since : 1.8


Gst.Element.get_contexts

def Gst.Element.get_contexts (self):
    #python wrapper for 'gst_element_get_contexts'

Gets the contexts set on the element.

MT safe.

Parameters:

element (Gst.Element)

a Gst.Element to set the context of.

Returns ([ Gst.Context ])

List of Gst.Context

Since : 1.8


gst_element_get_current_clock_time

GstClockTime
gst_element_get_current_clock_time (GstElement * element)

Returns the current clock time of the element, as in, the time of the element's clock, or GST_CLOCK_TIME_NONE if there is no clock.

Parameters:

element

a GstElement.

Returns

the clock time of the element, or GST_CLOCK_TIME_NONE if there is no clock.

Since : 1.18


Gst.Element.prototype.get_current_clock_time

function Gst.Element.prototype.get_current_clock_time(): {
    // javascript wrapper for 'gst_element_get_current_clock_time'
}

Returns the current clock time of the element, as in, the time of the element's clock, or GST_CLOCK_TIME_NONE if there is no clock.

Parameters:

element (Gst.Element)

a Gst.Element.

Returns (Number)

the clock time of the element, or GST_CLOCK_TIME_NONE if there is no clock.

Since : 1.18


Gst.Element.get_current_clock_time

def Gst.Element.get_current_clock_time (self):
    #python wrapper for 'gst_element_get_current_clock_time'

Returns the current clock time of the element, as in, the time of the element's clock, or GST_CLOCK_TIME_NONE if there is no clock.

Parameters:

element (Gst.Element)

a Gst.Element.

Returns (int)

the clock time of the element, or GST_CLOCK_TIME_NONE if there is no clock.

Since : 1.18


gst_element_get_current_running_time

GstClockTime
gst_element_get_current_running_time (GstElement * element)

Returns the running time of the element. The running time is the element's clock time minus its base time. Will return GST_CLOCK_TIME_NONE if the element has no clock, or if its base time has not been set.

Parameters:

element

a GstElement.

Returns

the running time of the element, or GST_CLOCK_TIME_NONE if the element has no clock or its base time has not been set.

Since : 1.18


Gst.Element.prototype.get_current_running_time

function Gst.Element.prototype.get_current_running_time(): {
    // javascript wrapper for 'gst_element_get_current_running_time'
}

Returns the running time of the element. The running time is the element's clock time minus its base time. Will return GST_CLOCK_TIME_NONE if the element has no clock, or if its base time has not been set.

Parameters:

element (Gst.Element)

a Gst.Element.

Returns (Number)

the running time of the element, or GST_CLOCK_TIME_NONE if the element has no clock or its base time has not been set.

Since : 1.18


Gst.Element.get_current_running_time

def Gst.Element.get_current_running_time (self):
    #python wrapper for 'gst_element_get_current_running_time'

Returns the running time of the element. The running time is the element's clock time minus its base time. Will return GST_CLOCK_TIME_NONE if the element has no clock, or if its base time has not been set.

Parameters:

element (Gst.Element)

a Gst.Element.

Returns (int)

the running time of the element, or GST_CLOCK_TIME_NONE if the element has no clock or its base time has not been set.

Since : 1.18


gst_element_get_factory

GstElementFactory *
gst_element_get_factory (GstElement * element)

Retrieves the factory that was used to create this element.

Parameters:

element

a GstElement to request the element factory of.

Returns ( [transfer: none][nullable])

the GstElementFactory used for creating this element or NULL if element has not been registered (static element). no refcounting is needed.


Gst.Element.prototype.get_factory

function Gst.Element.prototype.get_factory(): {
    // javascript wrapper for 'gst_element_get_factory'
}

Retrieves the factory that was used to create this element.

Parameters:

element (Gst.Element)

a Gst.Element to request the element factory of.

Returns (Gst.ElementFactory)

the Gst.ElementFactory used for creating this element or null if element has not been registered (static element). no refcounting is needed.


Gst.Element.get_factory

def Gst.Element.get_factory (self):
    #python wrapper for 'gst_element_get_factory'

Retrieves the factory that was used to create this element.

Parameters:

element (Gst.Element)

a Gst.Element to request the element factory of.

Returns (Gst.ElementFactory)

the Gst.ElementFactory used for creating this element or None if element has not been registered (static element). no refcounting is needed.


gst_element_get_metadata

const gchar *
gst_element_get_metadata (GstElement * element,
                          const gchar * key)

Get metadata with key in klass.

Parameters:

element

class to get metadata for

key

the key to get

Returns

the metadata for key.

Since : 1.14


Gst.Element.prototype.get_metadata

function Gst.Element.prototype.get_metadata(key: String): {
    // javascript wrapper for 'gst_element_get_metadata'
}

Get metadata with key in klass.

Parameters:

element (Gst.Element)

class to get metadata for

key (String)

the key to get

Returns (String)

the metadata for key.

Since : 1.14


Gst.Element.get_metadata

def Gst.Element.get_metadata (self, key):
    #python wrapper for 'gst_element_get_metadata'

Get metadata with key in klass.

Parameters:

element (Gst.Element)

class to get metadata for

key (str)

the key to get

Returns (str)

the metadata for key.

Since : 1.14


gst_element_get_pad_template

GstPadTemplate *
gst_element_get_pad_template (GstElement * element,
                              const gchar * name)

Retrieves a padtemplate from element with the given name.

Parameters:

element

a GstElement to get the pad template of.

name

the name of the GstPadTemplate to get.

Returns ( [transfer: none][nullable])

the GstPadTemplate with the given name, or NULL if none was found. No unreferencing is necessary.

Since : 1.14


Gst.Element.prototype.get_pad_template

function Gst.Element.prototype.get_pad_template(name: String): {
    // javascript wrapper for 'gst_element_get_pad_template'
}

Retrieves a padtemplate from element with the given name.

Parameters:

element (Gst.Element)

a Gst.Element to get the pad template of.

name (String)

the name of the Gst.PadTemplate to get.

Returns (Gst.PadTemplate)

the Gst.PadTemplate with the given name, or null if none was found. No unreferencing is necessary.

Since : 1.14


Gst.Element.get_pad_template

def Gst.Element.get_pad_template (self, name):
    #python wrapper for 'gst_element_get_pad_template'

Retrieves a padtemplate from element with the given name.

Parameters:

element (Gst.Element)

a Gst.Element to get the pad template of.

name (str)

the name of the Gst.PadTemplate to get.

Returns (Gst.PadTemplate)

the Gst.PadTemplate with the given name, or None if none was found. No unreferencing is necessary.

Since : 1.14


gst_element_get_pad_template_list

GList *
gst_element_get_pad_template_list (GstElement * element)

Retrieves a list of the pad templates associated with element. The list must not be modified by the calling code.

Parameters:

element

a GstElement to get pad templates of.

Returns ( [transfer: none][element-typeGst.PadTemplate])

the GList of pad templates.

Since : 1.14


Gst.Element.prototype.get_pad_template_list

function Gst.Element.prototype.get_pad_template_list(): {
    // javascript wrapper for 'gst_element_get_pad_template_list'
}

Retrieves a list of the pad templates associated with element. The list must not be modified by the calling code.

Parameters:

element (Gst.Element)

a Gst.Element to get pad templates of.

Returns ([ Gst.PadTemplate ])

the GLib.List of pad templates.

Since : 1.14


Gst.Element.get_pad_template_list

def Gst.Element.get_pad_template_list (self):
    #python wrapper for 'gst_element_get_pad_template_list'

Retrieves a list of the pad templates associated with element. The list must not be modified by the calling code.

Parameters:

element (Gst.Element)

a Gst.Element to get pad templates of.

Returns ([ Gst.PadTemplate ])

the GLib.List of pad templates.

Since : 1.14


gst_element_get_request_pad

GstPad *
gst_element_get_request_pad (GstElement * element,
                             const gchar * name)

The name of this function is confusing to people learning GStreamer. gst_element_request_pad_simple aims at making it more explicit it is a simplified gst_element_request_pad.

Parameters:

element

a GstElement to find a request pad of.

name

the name of the request GstPad to retrieve.

Returns ( [transfer: full][nullable])

requested GstPad if found, otherwise NULL. Release after usage.

deprecated : 1.20: Prefer using gst_element_request_pad_simple() which provides the exact same functionality.


Gst.Element.prototype.get_request_pad

function Gst.Element.prototype.get_request_pad(name: String): {
    // javascript wrapper for 'gst_element_get_request_pad'
}

The name of this function is confusing to people learning GStreamer. Gst.Element.prototype.request_pad_simple aims at making it more explicit it is a simplified Gst.Element.prototype.request_pad.

Parameters:

element (Gst.Element)

a Gst.Element to find a request pad of.

name (String)

the name of the request Gst.Pad to retrieve.

Returns (Gst.Pad)

requested Gst.Pad if found, otherwise null. Release after usage.

deprecated : 1.20: Prefer using gst_element_request_pad_simple() which provides the exact same functionality.


Gst.Element.get_request_pad

def Gst.Element.get_request_pad (self, name):
    #python wrapper for 'gst_element_get_request_pad'

The name of this function is confusing to people learning GStreamer. Gst.Element.request_pad_simple aims at making it more explicit it is a simplified Gst.Element.request_pad.

Parameters:

element (Gst.Element)

a Gst.Element to find a request pad of.

name (str)

the name of the request Gst.Pad to retrieve.

Returns (Gst.Pad)

requested Gst.Pad if found, otherwise None. Release after usage.

deprecated : 1.20: Prefer using gst_element_request_pad_simple() which provides the exact same functionality.


gst_element_get_start_time

GstClockTime
gst_element_get_start_time (GstElement * element)

Returns the start time of the element. The start time is the running time of the clock when this element was last put to PAUSED.

Usually the start_time is managed by a toplevel element such as GstPipeline.

MT safe.

Parameters:

element

a GstElement.

Returns

the start time of the element.


Gst.Element.prototype.get_start_time

function Gst.Element.prototype.get_start_time(): {
    // javascript wrapper for 'gst_element_get_start_time'
}

Returns the start time of the element. The start time is the running time of the clock when this element was last put to PAUSED.

Usually the start_time is managed by a toplevel element such as Gst.Pipeline.

MT safe.

Parameters:

element (Gst.Element)

a Gst.Element.

Returns (Number)

the start time of the element.


Gst.Element.get_start_time

def Gst.Element.get_start_time (self):
    #python wrapper for 'gst_element_get_start_time'

Returns the start time of the element. The start time is the running time of the clock when this element was last put to PAUSED.

Usually the start_time is managed by a toplevel element such as Gst.Pipeline.

MT safe.

Parameters:

element (Gst.Element)

a Gst.Element.

Returns (int)

the start time of the element.


gst_element_get_state

GstStateChangeReturn
gst_element_get_state (GstElement * element,
                       GstState * state,
                       GstState * pending,
                       GstClockTime timeout)

Gets the state of the element.

For elements that performed an ASYNC state change, as reported by gst_element_set_state, this function will block up to the specified timeout value for the state change to complete. If the element completes the state change or goes into an error, this function returns immediately with a return value of GST_STATE_CHANGE_SUCCESS or GST_STATE_CHANGE_FAILURE respectively.

For elements that did not return GST_STATE_CHANGE_ASYNC, this function returns the current and pending state immediately.

This function returns GST_STATE_CHANGE_NO_PREROLL if the element successfully changed its state but is not able to provide data yet. This mostly happens for live sources that only produce data in GST_STATE_PLAYING. While the state change return is equivalent to GST_STATE_CHANGE_SUCCESS, it is returned to the application to signal that some sink elements might not be able to complete their state change because an element is not producing data to complete the preroll. When setting the element to playing, the preroll will complete and playback will start.

Parameters:

element

a GstElement to get the state of.

state ( [out][allow-none])

a pointer to GstState to hold the state. Can be NULL.

pending ( [out][allow-none])

a pointer to GstState to hold the pending state. Can be NULL.

timeout

a GstClockTime to specify the timeout for an async state change or GST_CLOCK_TIME_NONE for infinite timeout.

Returns

GST_STATE_CHANGE_SUCCESS if the element has no more pending state and the last state change succeeded, GST_STATE_CHANGE_ASYNC if the element is still performing a state change or GST_STATE_CHANGE_FAILURE if the last state change failed.

MT safe.


Gst.Element.prototype.get_state

function Gst.Element.prototype.get_state(timeout: Number): {
    // javascript wrapper for 'gst_element_get_state'
}

Gets the state of the element.

For elements that performed an ASYNC state change, as reported by Gst.Element.prototype.set_state, this function will block up to the specified timeout value for the state change to complete. If the element completes the state change or goes into an error, this function returns immediately with a return value of Gst.StateChangeReturn.SUCCESS or Gst.StateChangeReturn.FAILURE respectively.

For elements that did not return Gst.StateChangeReturn.ASYNC, this function returns the current and pending state immediately.

This function returns Gst.StateChangeReturn.NO_PREROLL if the element successfully changed its state but is not able to provide data yet. This mostly happens for live sources that only produce data in Gst.State.PLAYING. While the state change return is equivalent to Gst.StateChangeReturn.SUCCESS, it is returned to the application to signal that some sink elements might not be able to complete their state change because an element is not producing data to complete the preroll. When setting the element to playing, the preroll will complete and playback will start.

Parameters:

element (Gst.Element)

a Gst.Element to get the state of.

timeout (Number)

a Number to specify the timeout for an async state change or Gst.CLOCK_TIME_NONE for infinite timeout.

Returns a tuple made of:

Gst.StateChangeReturn.SUCCESS if the element has no more pending state and the last state change succeeded, Gst.StateChangeReturn.ASYNC if the element is still performing a state change or Gst.StateChangeReturn.FAILURE if the last state change failed.

MT safe.

state (Gst.State )

Gst.StateChangeReturn.SUCCESS if the element has no more pending state and the last state change succeeded, Gst.StateChangeReturn.ASYNC if the element is still performing a state change or Gst.StateChangeReturn.FAILURE if the last state change failed.

MT safe.

pending (Gst.State )

Gst.StateChangeReturn.SUCCESS if the element has no more pending state and the last state change succeeded, Gst.StateChangeReturn.ASYNC if the element is still performing a state change or Gst.StateChangeReturn.FAILURE if the last state change failed.

MT safe.


Gst.Element.get_state

def Gst.Element.get_state (self, timeout):
    #python wrapper for 'gst_element_get_state'

Gets the state of the element.

For elements that performed an ASYNC state change, as reported by Gst.Element.set_state, this function will block up to the specified timeout value for the state change to complete. If the element completes the state change or goes into an error, this function returns immediately with a return value of Gst.StateChangeReturn.SUCCESS or Gst.StateChangeReturn.FAILURE respectively.

For elements that did not return Gst.StateChangeReturn.ASYNC, this function returns the current and pending state immediately.

This function returns Gst.StateChangeReturn.NO_PREROLL if the element successfully changed its state but is not able to provide data yet. This mostly happens for live sources that only produce data in Gst.State.PLAYING. While the state change return is equivalent to Gst.StateChangeReturn.SUCCESS, it is returned to the application to signal that some sink elements might not be able to complete their state change because an element is not producing data to complete the preroll. When setting the element to playing, the preroll will complete and playback will start.

Parameters:

element (Gst.Element)

a Gst.Element to get the state of.

timeout (int)

a int to specify the timeout for an async state change or Gst.CLOCK_TIME_NONE for infinite timeout.

Returns a tuple made of:

Gst.StateChangeReturn.SUCCESS if the element has no more pending state and the last state change succeeded, Gst.StateChangeReturn.ASYNC if the element is still performing a state change or Gst.StateChangeReturn.FAILURE if the last state change failed.

MT safe.

state (Gst.State )

Gst.StateChangeReturn.SUCCESS if the element has no more pending state and the last state change succeeded, Gst.StateChangeReturn.ASYNC if the element is still performing a state change or Gst.StateChangeReturn.FAILURE if the last state change failed.

MT safe.

pending (Gst.State )

Gst.StateChangeReturn.SUCCESS if the element has no more pending state and the last state change succeeded, Gst.StateChangeReturn.ASYNC if the element is still performing a state change or Gst.StateChangeReturn.FAILURE if the last state change failed.

MT safe.


gst_element_get_static_pad

GstPad *
gst_element_get_static_pad (GstElement * element,
                            const gchar * name)

Retrieves a pad from element by name. This version only retrieves already-existing (i.e. 'static') pads.

Parameters:

element

a GstElement to find a static pad of.

name

the name of the static GstPad to retrieve.

Returns ( [transfer: full][nullable])

the requested GstPad if found, otherwise NULL. unref after usage.

MT safe.


Gst.Element.prototype.get_static_pad

function Gst.Element.prototype.get_static_pad(name: String): {
    // javascript wrapper for 'gst_element_get_static_pad'
}

Retrieves a pad from element by name. This version only retrieves already-existing (i.e. 'static') pads.

Parameters:

element (Gst.Element)

a Gst.Element to find a static pad of.

name (String)

the name of the static Gst.Pad to retrieve.

Returns (Gst.Pad)

the requested Gst.Pad if found, otherwise null. unref after usage.

MT safe.


Gst.Element.get_static_pad

def Gst.Element.get_static_pad (self, name):
    #python wrapper for 'gst_element_get_static_pad'

Retrieves a pad from element by name. This version only retrieves already-existing (i.e. 'static') pads.

Parameters:

element (Gst.Element)

a Gst.Element to find a static pad of.

name (str)

the name of the static Gst.Pad to retrieve.

Returns (Gst.Pad)

the requested Gst.Pad if found, otherwise None. unref after usage.

MT safe.


gst_element_is_locked_state

gboolean
gst_element_is_locked_state (GstElement * element)

Checks if the state of an element is locked. If the state of an element is locked, state changes of the parent don't affect the element. This way you can leave currently unused elements inside bins. Just lock their state before changing the state from GST_STATE_NULL.

MT safe.

Parameters:

element

a GstElement.

Returns

TRUE, if the element's state is locked.


Gst.Element.prototype.is_locked_state

function Gst.Element.prototype.is_locked_state(): {
    // javascript wrapper for 'gst_element_is_locked_state'
}

Checks if the state of an element is locked. If the state of an element is locked, state changes of the parent don't affect the element. This way you can leave currently unused elements inside bins. Just lock their state before changing the state from Gst.State.NULL.

MT safe.

Parameters:

element (Gst.Element)

a Gst.Element.

Returns (Number)

true, if the element's state is locked.


Gst.Element.is_locked_state

def Gst.Element.is_locked_state (self):
    #python wrapper for 'gst_element_is_locked_state'

Checks if the state of an element is locked. If the state of an element is locked, state changes of the parent don't affect the element. This way you can leave currently unused elements inside bins. Just lock their state before changing the state from Gst.State.NULL.

MT safe.

Parameters:

element (Gst.Element)

a Gst.Element.

Returns (bool)

True, if the element's state is locked.


gst_element_iterate_pads

GstIterator *
gst_element_iterate_pads (GstElement * element)

Retrieves an iterator of element's pads. The iterator should be freed after usage. Also more specialized iterators exists such as gst_element_iterate_src_pads or gst_element_iterate_sink_pads.

The order of pads returned by the iterator will be the order in which the pads were added to the element.

Parameters:

element

a GstElement to iterate pads of.

Returns ( [transfer: full])

the GstIterator of GstPad.

MT safe.


Gst.Element.prototype.iterate_pads

function Gst.Element.prototype.iterate_pads(): {
    // javascript wrapper for 'gst_element_iterate_pads'
}

Retrieves an iterator of element's pads. The iterator should be freed after usage. Also more specialized iterators exists such as Gst.Element.prototype.iterate_src_pads or Gst.Element.prototype.iterate_sink_pads.

The order of pads returned by the iterator will be the order in which the pads were added to the element.

Parameters:

element (Gst.Element)

a Gst.Element to iterate pads of.

Returns (Gst.Iterator)

the Gst.Iterator of Gst.Pad.

MT safe.


Gst.Element.iterate_pads

def Gst.Element.iterate_pads (self):
    #python wrapper for 'gst_element_iterate_pads'

Retrieves an iterator of element's pads. The iterator should be freed after usage. Also more specialized iterators exists such as Gst.Element.iterate_src_pads or Gst.Element.iterate_sink_pads.

The order of pads returned by the iterator will be the order in which the pads were added to the element.

Parameters:

element (Gst.Element)

a Gst.Element to iterate pads of.

Returns (Gst.Iterator)

the Gst.Iterator of Gst.Pad.

MT safe.


gst_element_iterate_sink_pads

GstIterator *
gst_element_iterate_sink_pads (GstElement * element)

Retrieves an iterator of element's sink pads.

The order of pads returned by the iterator will be the order in which the pads were added to the element.

Parameters:

element

a GstElement.

Returns ( [transfer: full])

the GstIterator of GstPad.

MT safe.


Gst.Element.prototype.iterate_sink_pads

function Gst.Element.prototype.iterate_sink_pads(): {
    // javascript wrapper for 'gst_element_iterate_sink_pads'
}

Retrieves an iterator of element's sink pads.

The order of pads returned by the iterator will be the order in which the pads were added to the element.

Parameters:

element (Gst.Element)

a Gst.Element.

Returns (Gst.Iterator)

the Gst.Iterator of Gst.Pad.

MT safe.


Gst.Element.iterate_sink_pads

def Gst.Element.iterate_sink_pads (self):
    #python wrapper for 'gst_element_iterate_sink_pads'

Retrieves an iterator of element's sink pads.

The order of pads returned by the iterator will be the order in which the pads were added to the element.

Parameters:

element (Gst.Element)

a Gst.Element.

Returns (Gst.Iterator)

the Gst.Iterator of Gst.Pad.

MT safe.


gst_element_iterate_src_pads

GstIterator *
gst_element_iterate_src_pads (GstElement * element)

Retrieves an iterator of element's source pads.

The order of pads returned by the iterator will be the order in which the pads were added to the element.

Parameters:

element

a GstElement.

Returns ( [transfer: full])

the GstIterator of GstPad.

MT safe.


Gst.Element.prototype.iterate_src_pads

function Gst.Element.prototype.iterate_src_pads(): {
    // javascript wrapper for 'gst_element_iterate_src_pads'
}

Retrieves an iterator of element's source pads.

The order of pads returned by the iterator will be the order in which the pads were added to the element.

Parameters:

element (Gst.Element)

a Gst.Element.

Returns (Gst.Iterator)

the Gst.Iterator of Gst.Pad.

MT safe.


Gst.Element.iterate_src_pads

def Gst.Element.iterate_src_pads (self):
    #python wrapper for 'gst_element_iterate_src_pads'

Retrieves an iterator of element's source pads.

The order of pads returned by the iterator will be the order in which the pads were added to the element.

Parameters:

element (Gst.Element)

a Gst.Element.

Returns (Gst.Iterator)

the Gst.Iterator of Gst.Pad.

MT safe.


gst_element_lost_state

gst_element_lost_state (GstElement * element)

Brings the element to the lost state. The current state of the element is copied to the pending state so that any call to gst_element_get_state will return GST_STATE_CHANGE_ASYNC.

An ASYNC_START message is posted. If the element was PLAYING, it will go to PAUSED. The element will be restored to its PLAYING state by the parent pipeline when it prerolls again.

This is mostly used for elements that lost their preroll buffer in the GST_STATE_PAUSED or GST_STATE_PLAYING state after a flush, they will go to their pending state again when a new preroll buffer is queued. This function can only be called when the element is currently not in error or an async state change.

This function is used internally and should normally not be called from plugins or applications.

Parameters:

element

a GstElement the state is lost of


Gst.Element.prototype.lost_state

function Gst.Element.prototype.lost_state(): {
    // javascript wrapper for 'gst_element_lost_state'
}

Brings the element to the lost state. The current state of the element is copied to the pending state so that any call to Gst.Element.prototype.get_state will return Gst.StateChangeReturn.ASYNC.

An ASYNC_START message is posted. If the element was PLAYING, it will go to PAUSED. The element will be restored to its PLAYING state by the parent pipeline when it prerolls again.

This is mostly used for elements that lost their preroll buffer in the Gst.State.PAUSED or Gst.State.PLAYING state after a flush, they will go to their pending state again when a new preroll buffer is queued. This function can only be called when the element is currently not in error or an async state change.

This function is used internally and should normally not be called from plugins or applications.

Parameters:

element (Gst.Element)

a Gst.Element the state is lost of


Gst.Element.lost_state

def Gst.Element.lost_state (self):
    #python wrapper for 'gst_element_lost_state'

Brings the element to the lost state. The current state of the element is copied to the pending state so that any call to Gst.Element.get_state will return Gst.StateChangeReturn.ASYNC.

An ASYNC_START message is posted. If the element was PLAYING, it will go to PAUSED. The element will be restored to its PLAYING state by the parent pipeline when it prerolls again.

This is mostly used for elements that lost their preroll buffer in the Gst.State.PAUSED or Gst.State.PLAYING state after a flush, they will go to their pending state again when a new preroll buffer is queued. This function can only be called when the element is currently not in error or an async state change.

This function is used internally and should normally not be called from plugins or applications.

Parameters:

element (Gst.Element)

a Gst.Element the state is lost of


gst_element_message_full

gst_element_message_full (GstElement * element,
                          GstMessageType type,
                          GQuark domain,
                          gint code,
                          gchar * text,
                          gchar * debug,
                          const gchar * file,
                          const gchar * function,
                          gint line)

Post an error, warning or info message on the bus from inside an element.

type must be of GST_MESSAGE_ERROR, GST_MESSAGE_WARNING or GST_MESSAGE_INFO.

MT safe.

Parameters:

element

a GstElement to send message from

type

the GstMessageType

domain

the GStreamer GError domain this message belongs to

code

the GError code belonging to the domain

text ( [allow-none][transfer: full])

an allocated text string to be used as a replacement for the default message connected to code, or NULL

debug ( [allow-none][transfer: full])

an allocated debug message to be used as a replacement for the default debugging information, or NULL

file

the source code file where the error was generated

function

the source code function where the error was generated

line

the source code line where the error was generated


Gst.Element.prototype.message_full

function Gst.Element.prototype.message_full(type: Gst.MessageType, domain: GLib.Quark, code: Number, text: String, debug: String, file: String, function: String, line: Number): {
    // javascript wrapper for 'gst_element_message_full'
}

Post an error, warning or info message on the bus from inside an element.

type must be of Gst.MessageType.ERROR, Gst.MessageType.WARNING or Gst.MessageType.INFO.

MT safe.

Parameters:

element (Gst.Element)

a Gst.Element to send message from

domain (GLib.Quark)

the GStreamer GError domain this message belongs to

code (Number)

the GError code belonging to the domain

text (String)

an allocated text string to be used as a replacement for the default message connected to code, or null

debug (String)

an allocated debug message to be used as a replacement for the default debugging information, or null

file (String)

the source code file where the error was generated

function (String)

the source code function where the error was generated

line (Number)

the source code line where the error was generated


Gst.Element.message_full

def Gst.Element.message_full (self, type, domain, code, text, debug, file, function, line):
    #python wrapper for 'gst_element_message_full'

Post an error, warning or info message on the bus from inside an element.

type must be of Gst.MessageType.ERROR, Gst.MessageType.WARNING or Gst.MessageType.INFO.

MT safe.

Parameters:

element (Gst.Element)

a Gst.Element to send message from

domain (GLib.Quark)

the GStreamer GError domain this message belongs to

code (int)

the GError code belonging to the domain

text (str)

an allocated text string to be used as a replacement for the default message connected to code, or None

debug (str)

an allocated debug message to be used as a replacement for the default debugging information, or None

file (str)

the source code file where the error was generated

function (str)

the source code function where the error was generated

line (int)

the source code line where the error was generated


gst_element_message_full_with_details

gst_element_message_full_with_details (GstElement * element,
                                       GstMessageType type,
                                       GQuark domain,
                                       gint code,
                                       gchar * text,
                                       gchar * debug,
                                       const gchar * file,
                                       const gchar * function,
                                       gint line,
                                       GstStructure * structure)

Post an error, warning or info message on the bus from inside an element.

type must be of GST_MESSAGE_ERROR, GST_MESSAGE_WARNING or GST_MESSAGE_INFO.

Parameters:

element

a GstElement to send message from

type

the GstMessageType

domain

the GStreamer GError domain this message belongs to

code

the GError code belonging to the domain

text ( [allow-none][transfer: full])

an allocated text string to be used as a replacement for the default message connected to code, or NULL

debug ( [allow-none][transfer: full])

an allocated debug message to be used as a replacement for the default debugging information, or NULL

file

the source code file where the error was generated

function

the source code function where the error was generated

line

the source code line where the error was generated

structure ( [transfer: full])

optional details structure

Since : 1.10


Gst.Element.prototype.message_full_with_details

function Gst.Element.prototype.message_full_with_details(type: Gst.MessageType, domain: GLib.Quark, code: Number, text: String, debug: String, file: String, function: String, line: Number, structure: Gst.Structure): {
    // javascript wrapper for 'gst_element_message_full_with_details'
}

Post an error, warning or info message on the bus from inside an element.

type must be of Gst.MessageType.ERROR, Gst.MessageType.WARNING or Gst.MessageType.INFO.

Parameters:

element (Gst.Element)

a Gst.Element to send message from

domain (GLib.Quark)

the GStreamer GError domain this message belongs to

code (Number)

the GError code belonging to the domain

text (String)

an allocated text string to be used as a replacement for the default message connected to code, or null

debug (String)

an allocated debug message to be used as a replacement for the default debugging information, or null

file (String)

the source code file where the error was generated

function (String)

the source code function where the error was generated

line (Number)

the source code line where the error was generated

structure (Gst.Structure)

optional details structure

Since : 1.10


Gst.Element.message_full_with_details

def Gst.Element.message_full_with_details (self, type, domain, code, text, debug, file, function, line, structure):
    #python wrapper for 'gst_element_message_full_with_details'

Post an error, warning or info message on the bus from inside an element.

type must be of Gst.MessageType.ERROR, Gst.MessageType.WARNING or Gst.MessageType.INFO.

Parameters:

element (Gst.Element)

a Gst.Element to send message from

domain (GLib.Quark)

the GStreamer GError domain this message belongs to

code (int)

the GError code belonging to the domain

text (str)

an allocated text string to be used as a replacement for the default message connected to code, or None

debug (str)

an allocated debug message to be used as a replacement for the default debugging information, or None

file (str)

the source code file where the error was generated

function (str)

the source code function where the error was generated

line (int)

the source code line where the error was generated

structure (Gst.Structure)

optional details structure

Since : 1.10


gst_element_no_more_pads

gst_element_no_more_pads (GstElement * element)

Use this function to signal that the element does not expect any more pads to show up in the current pipeline. This function should be called whenever pads have been added by the element itself. Elements with GST_PAD_SOMETIMES pad templates use this in combination with autopluggers to figure out that the element is done initializing its pads.

This function emits the no-more-pads signal.

MT safe.

Parameters:

element

a GstElement


Gst.Element.prototype.no_more_pads

function Gst.Element.prototype.no_more_pads(): {
    // javascript wrapper for 'gst_element_no_more_pads'
}

Use this function to signal that the element does not expect any more pads to show up in the current pipeline. This function should be called whenever pads have been added by the element itself. Elements with Gst.PadPresence.SOMETIMES pad templates use this in combination with autopluggers to figure out that the element is done initializing its pads.

This function emits the no-more-pads signal.

MT safe.

Parameters:

element (Gst.Element)

a Gst.Element


Gst.Element.no_more_pads

def Gst.Element.no_more_pads (self):
    #python wrapper for 'gst_element_no_more_pads'

Use this function to signal that the element does not expect any more pads to show up in the current pipeline. This function should be called whenever pads have been added by the element itself. Elements with Gst.PadPresence.SOMETIMES pad templates use this in combination with autopluggers to figure out that the element is done initializing its pads.

This function emits the no-more-pads signal.

MT safe.

Parameters:

element (Gst.Element)

a Gst.Element


gst_element_post_message

gboolean
gst_element_post_message (GstElement * element,
                          GstMessage * message)

Post a message on the element's GstBus. This function takes ownership of the message; if you want to access the message after this call, you should add an additional reference before calling.

Parameters:

element

a GstElement posting the message

message ( [transfer: full])

a GstMessage to post

Returns

TRUE if the message was successfully posted. The function returns FALSE if the element did not have a bus.

MT safe.


Gst.Element.prototype.post_message

function Gst.Element.prototype.post_message(message: Gst.Message): {
    // javascript wrapper for 'gst_element_post_message'
}

Post a message on the element's Gst.Bus. This function takes ownership of the message; if you want to access the message after this call, you should add an additional reference before calling.

Parameters:

element (Gst.Element)

a Gst.Element posting the message

message (Gst.Message)

a Gst.Message to post

Returns (Number)

true if the message was successfully posted. The function returns false if the element did not have a bus.

MT safe.


Gst.Element.post_message

def Gst.Element.post_message (self, message):
    #python wrapper for 'gst_element_post_message'

Post a message on the element's Gst.Bus. This function takes ownership of the message; if you want to access the message after this call, you should add an additional reference before calling.

Parameters:

element (Gst.Element)

a Gst.Element posting the message

message (Gst.Message)

a Gst.Message to post

Returns (bool)

True if the message was successfully posted. The function returns False if the element did not have a bus.

MT safe.


gst_element_provide_clock

GstClock *
gst_element_provide_clock (GstElement * element)

Get the clock provided by the given element.

An element is only required to provide a clock in the PAUSED state. Some elements can provide a clock in other states.

Parameters:

element

a GstElement to query

Returns ( [transfer: full][nullable])

the GstClock provided by the element or NULL if no clock could be provided. Unref after usage.

MT safe.


Gst.Element.prototype.provide_clock

function Gst.Element.prototype.provide_clock(): {
    // javascript wrapper for 'gst_element_provide_clock'
}

Get the clock provided by the given element.

An element is only required to provide a clock in the PAUSED state. Some elements can provide a clock in other states.

Parameters:

element (Gst.Element)

a Gst.Element to query

Returns (Gst.Clock)

the GstClock provided by the element or null if no clock could be provided. Unref after usage.

MT safe.


Gst.Element.provide_clock

def Gst.Element.provide_clock (self):
    #python wrapper for 'gst_element_provide_clock'

Get the clock provided by the given element.

An element is only required to provide a clock in the PAUSED state. Some elements can provide a clock in other states.

Parameters:

element (Gst.Element)

a Gst.Element to query

Returns (Gst.Clock)

the GstClock provided by the element or None if no clock could be provided. Unref after usage.

MT safe.


gst_element_query

gboolean
gst_element_query (GstElement * element,
                   GstQuery * query)

Performs a query on the given element.

For elements that don't implement a query handler, this function forwards the query to a random srcpad or to the peer of a random linked sinkpad of this element.

Please note that some queries might need a running pipeline to work.

Parameters:

element

a GstElement to perform the query on.

query ( [transfer: none])

the GstQuery.

Returns

TRUE if the query could be performed.

MT safe.


Gst.Element.prototype.query

function Gst.Element.prototype.query(query: Gst.Query): {
    // javascript wrapper for 'gst_element_query'
}

Performs a query on the given element.

For elements that don't implement a query handler, this function forwards the query to a random srcpad or to the peer of a random linked sinkpad of this element.

Please note that some queries might need a running pipeline to work.

Parameters:

element (Gst.Element)

a Gst.Element to perform the query on.

query (Gst.Query)

the Gst.Query.

Returns (Number)

true if the query could be performed.

MT safe.


Gst.Element.query

def Gst.Element.query (self, query):
    #python wrapper for 'gst_element_query'

Performs a query on the given element.

For elements that don't implement a query handler, this function forwards the query to a random srcpad or to the peer of a random linked sinkpad of this element.

Please note that some queries might need a running pipeline to work.

Parameters:

element (Gst.Element)

a Gst.Element to perform the query on.

query (Gst.Query)

the Gst.Query.

Returns (bool)

True if the query could be performed.

MT safe.


gst_element_query_convert

gboolean
gst_element_query_convert (GstElement * element,
                           GstFormat src_format,
                           gint64 src_val,
                           GstFormat dest_format,
                           gint64 * dest_val)

Queries an element to convert src_val in src_format to dest_format.

Parameters:

element

a GstElement to invoke the convert query on.

src_format

a GstFormat to convert from.

src_val

a value to convert.

dest_format

the GstFormat to convert to.

dest_val ( [out])

a pointer to the result.

Returns

TRUE if the query could be performed.


Gst.Element.prototype.query_convert

function Gst.Element.prototype.query_convert(src_format: Gst.Format, src_val: Number, dest_format: Gst.Format): {
    // javascript wrapper for 'gst_element_query_convert'
}

Queries an element to convert src_val in src_format to dest_format.

Parameters:

element (Gst.Element)

a Gst.Element to invoke the convert query on.

src_format (Gst.Format)

a Gst.Format to convert from.

src_val (Number)

a value to convert.

dest_format (Gst.Format)

the Gst.Format to convert to.

Returns a tuple made of:

(Number )

true if the query could be performed.

dest_val (Number )

true if the query could be performed.


Gst.Element.query_convert

def Gst.Element.query_convert (self, src_format, src_val, dest_format):
    #python wrapper for 'gst_element_query_convert'

Queries an element to convert src_val in src_format to dest_format.

Parameters:

element (Gst.Element)

a Gst.Element to invoke the convert query on.

src_format (Gst.Format)

a Gst.Format to convert from.

src_val (int)

a value to convert.

dest_format (Gst.Format)

the Gst.Format to convert to.

Returns a tuple made of:

(bool )

True if the query could be performed.

dest_val (int )

True if the query could be performed.


gst_element_query_duration

gboolean
gst_element_query_duration (GstElement * element,
                            GstFormat format,
                            gint64 * duration)

Queries an element (usually top-level pipeline or playbin element) for the total stream duration in nanoseconds. This query will only work once the pipeline is prerolled (i.e. reached PAUSED or PLAYING state). The application will receive an ASYNC_DONE message on the pipeline bus when that is the case.

If the duration changes for some reason, you will get a DURATION_CHANGED message on the pipeline bus, in which case you should re-query the duration using this function.

Parameters:

element

a GstElement to invoke the duration query on.

format

the GstFormat requested

duration ( [out][optional])

A location in which to store the total duration, or NULL.

Returns

TRUE if the query could be performed.


Gst.Element.prototype.query_duration

function Gst.Element.prototype.query_duration(format: Gst.Format): {
    // javascript wrapper for 'gst_element_query_duration'
}

Queries an element (usually top-level pipeline or playbin element) for the total stream duration in nanoseconds. This query will only work once the pipeline is prerolled (i.e. reached PAUSED or PLAYING state). The application will receive an ASYNC_DONE message on the pipeline bus when that is the case.

If the duration changes for some reason, you will get a DURATION_CHANGED message on the pipeline bus, in which case you should re-query the duration using this function.

Parameters:

element (Gst.Element)

a Gst.Element to invoke the duration query on.

format (Gst.Format)

the Gst.Format requested

Returns a tuple made of:

(Number )

true if the query could be performed.

duration (Number )

true if the query could be performed.


Gst.Element.query_duration

def Gst.Element.query_duration (self, format):
    #python wrapper for 'gst_element_query_duration'

Queries an element (usually top-level pipeline or playbin element) for the total stream duration in nanoseconds. This query will only work once the pipeline is prerolled (i.e. reached PAUSED or PLAYING state). The application will receive an ASYNC_DONE message on the pipeline bus when that is the case.

If the duration changes for some reason, you will get a DURATION_CHANGED message on the pipeline bus, in which case you should re-query the duration using this function.

Parameters:

element (Gst.Element)

a Gst.Element to invoke the duration query on.

format (Gst.Format)

the Gst.Format requested

Returns a tuple made of:

(bool )

True if the query could be performed.

duration (int )

True if the query could be performed.


gst_element_query_position

gboolean
gst_element_query_position (GstElement * element,
                            GstFormat format,
                            gint64 * cur)

Queries an element (usually top-level pipeline or playbin element) for the stream position in nanoseconds. This will be a value between 0 and the stream duration (if the stream duration is known). This query will usually only work once the pipeline is prerolled (i.e. reached PAUSED or PLAYING state). The application will receive an ASYNC_DONE message on the pipeline bus when that is the case.

If one repeatedly calls this function one can also create a query and reuse it in gst_element_query.

Parameters:

element

a GstElement to invoke the position query on.

format

the GstFormat requested

cur ( [out][optional])

a location in which to store the current position, or NULL.

Returns

TRUE if the query could be performed.


Gst.Element.prototype.query_position

function Gst.Element.prototype.query_position(format: Gst.Format): {
    // javascript wrapper for 'gst_element_query_position'
}

Queries an element (usually top-level pipeline or playbin element) for the stream position in nanoseconds. This will be a value between 0 and the stream duration (if the stream duration is known). This query will usually only work once the pipeline is prerolled (i.e. reached PAUSED or PLAYING state). The application will receive an ASYNC_DONE message on the pipeline bus when that is the case.

If one repeatedly calls this function one can also create a query and reuse it in Gst.Element.prototype.query.

Parameters:

element (Gst.Element)

a Gst.Element to invoke the position query on.

format (Gst.Format)

the Gst.Format requested

Returns a tuple made of:

(Number )

true if the query could be performed.

cur (Number )

true if the query could be performed.


Gst.Element.query_position

def Gst.Element.query_position (self, format):
    #python wrapper for 'gst_element_query_position'

Queries an element (usually top-level pipeline or playbin element) for the stream position in nanoseconds. This will be a value between 0 and the stream duration (if the stream duration is known). This query will usually only work once the pipeline is prerolled (i.e. reached PAUSED or PLAYING state). The application will receive an ASYNC_DONE message on the pipeline bus when that is the case.

If one repeatedly calls this function one can also create a query and reuse it in Gst.Element.query.

Parameters:

element (Gst.Element)

a Gst.Element to invoke the position query on.

format (Gst.Format)

the Gst.Format requested

Returns a tuple made of:

(bool )

True if the query could be performed.

cur (int )

True if the query could be performed.


gst_element_release_request_pad

gst_element_release_request_pad (GstElement * element,
                                 GstPad * pad)

Makes the element free the previously requested pad as obtained with gst_element_request_pad.

This does not unref the pad. If the pad was created by using gst_element_request_pad, gst_element_release_request_pad needs to be followed by gst_object_unref to free the pad.

MT safe.

Parameters:

element

a GstElement to release the request pad of.

pad

the GstPad to release.


Gst.Element.prototype.release_request_pad

function Gst.Element.prototype.release_request_pad(pad: Gst.Pad): {
    // javascript wrapper for 'gst_element_release_request_pad'
}

Makes the element free the previously requested pad as obtained with Gst.Element.prototype.request_pad.

This does not unref the pad. If the pad was created by using Gst.Element.prototype.request_pad, Gst.Element.prototype.release_request_pad needs to be followed by Gst.Object.prototype.unref to free the pad.

MT safe.

Parameters:

element (Gst.Element)

a Gst.Element to release the request pad of.

pad (Gst.Pad)

the Gst.Pad to release.


Gst.Element.release_request_pad

def Gst.Element.release_request_pad (self, pad):
    #python wrapper for 'gst_element_release_request_pad'

Makes the element free the previously requested pad as obtained with Gst.Element.request_pad.

This does not unref the pad. If the pad was created by using Gst.Element.request_pad, Gst.Element.release_request_pad needs to be followed by Gst.Object.unref to free the pad.

MT safe.

Parameters:

element (Gst.Element)

a Gst.Element to release the request pad of.

pad (Gst.Pad)

the Gst.Pad to release.


gst_element_remove_pad

gboolean
gst_element_remove_pad (GstElement * element,
                        GstPad * pad)

Removes pad from element. pad will be destroyed if it has not been referenced elsewhere using gst_object_unparent.

This function is used by plugin developers and should not be used by applications. Pads that were dynamically requested from elements with gst_element_request_pad should be released with the gst_element_release_request_pad function instead.

Pads are not automatically deactivated so elements should perform the needed steps to deactivate the pad in case this pad is removed in the PAUSED or PLAYING state. See gst_pad_set_active for more information about deactivating pads.

The pad and the element should be unlocked when calling this function.

This function will emit the pad-removed signal on the element.

Parameters:

element

a GstElement to remove pad from.

pad ( [transfer: none])

the GstPad to remove from the element.

Returns

TRUE if the pad could be removed. Can return FALSE if the pad does not belong to the provided element.

MT safe.


Gst.Element.prototype.remove_pad

function Gst.Element.prototype.remove_pad(pad: Gst.Pad): {
    // javascript wrapper for 'gst_element_remove_pad'
}

Removes pad from element. pad will be destroyed if it has not been referenced elsewhere using Gst.Object.prototype.unparent.

This function is used by plugin developers and should not be used by applications. Pads that were dynamically requested from elements with Gst.Element.prototype.request_pad should be released with the Gst.Element.prototype.release_request_pad function instead.

Pads are not automatically deactivated so elements should perform the needed steps to deactivate the pad in case this pad is removed in the PAUSED or PLAYING state. See Gst.Pad.prototype.set_active for more information about deactivating pads.

The pad and the element should be unlocked when calling this function.

This function will emit the pad-removed signal on the element.

Parameters:

element (Gst.Element)

a Gst.Element to remove pad from.

pad (Gst.Pad)

the Gst.Pad to remove from the element.

Returns (Number)

true if the pad could be removed. Can return false if the pad does not belong to the provided element.

MT safe.


Gst.Element.remove_pad

def Gst.Element.remove_pad (self, pad):
    #python wrapper for 'gst_element_remove_pad'

Removes pad from element. pad will be destroyed if it has not been referenced elsewhere using Gst.Object.unparent.

This function is used by plugin developers and should not be used by applications. Pads that were dynamically requested from elements with Gst.Element.request_pad should be released with the Gst.Element.release_request_pad function instead.

Pads are not automatically deactivated so elements should perform the needed steps to deactivate the pad in case this pad is removed in the PAUSED or PLAYING state. See Gst.Pad.set_active for more information about deactivating pads.

The pad and the element should be unlocked when calling this function.

This function will emit the pad-removed signal on the element.

Parameters:

element (Gst.Element)

a Gst.Element to remove pad from.

pad (Gst.Pad)

the Gst.Pad to remove from the element.

Returns (bool)

True if the pad could be removed. Can return False if the pad does not belong to the provided element.

MT safe.


gst_element_remove_property_notify_watch

gst_element_remove_property_notify_watch (GstElement * element,
                                          gulong watch_id)

Parameters:

element

a GstElement being watched for property changes

watch_id

watch id to remove

Since : 1.10


Gst.Element.prototype.remove_property_notify_watch

function Gst.Element.prototype.remove_property_notify_watch(watch_id: Number): {
    // javascript wrapper for 'gst_element_remove_property_notify_watch'
}

Parameters:

element (Gst.Element)

a Gst.Element being watched for property changes

watch_id (Number)

watch id to remove

Since : 1.10


Gst.Element.remove_property_notify_watch

def Gst.Element.remove_property_notify_watch (self, watch_id):
    #python wrapper for 'gst_element_remove_property_notify_watch'

Parameters:

element (Gst.Element)

a Gst.Element being watched for property changes

watch_id (int)

watch id to remove

Since : 1.10


gst_element_request_pad

GstPad *
gst_element_request_pad (GstElement * element,
                         GstPadTemplate * templ,
                         const gchar * name,
                         const GstCaps * caps)

Retrieves a request pad from the element according to the provided template. Pad templates can be looked up using gst_element_factory_get_static_pad_templates.

The pad should be released with gst_element_release_request_pad.

Parameters:

element

a GstElement to find a request pad of.

templ

a GstPadTemplate of which we want a pad of.

name ( [transfer: none][allow-none])

the name of the request GstPad to retrieve. Can be NULL.

caps ( [transfer: none][allow-none])

the caps of the pad we want to request. Can be NULL.

Returns ( [transfer: full][nullable])

requested GstPad if found, otherwise NULL. Release after usage.


Gst.Element.prototype.request_pad

function Gst.Element.prototype.request_pad(templ: Gst.PadTemplate, name: String, caps: Gst.Caps): {
    // javascript wrapper for 'gst_element_request_pad'
}

Retrieves a request pad from the element according to the provided template. Pad templates can be looked up using Gst.ElementFactory.prototype.get_static_pad_templates.

The pad should be released with Gst.Element.prototype.release_request_pad.

Parameters:

element (Gst.Element)

a Gst.Element to find a request pad of.

templ (Gst.PadTemplate)

a Gst.PadTemplate of which we want a pad of.

name (String)

the name of the request Gst.Pad to retrieve. Can be null.

caps (Gst.Caps)

the caps of the pad we want to request. Can be null.

Returns (Gst.Pad)

requested Gst.Pad if found, otherwise null. Release after usage.


Gst.Element.request_pad

def Gst.Element.request_pad (self, templ, name, caps):
    #python wrapper for 'gst_element_request_pad'

Retrieves a request pad from the element according to the provided template. Pad templates can be looked up using Gst.ElementFactory.get_static_pad_templates.

The pad should be released with Gst.Element.release_request_pad.

Parameters:

element (Gst.Element)

a Gst.Element to find a request pad of.

templ (Gst.PadTemplate)

a Gst.PadTemplate of which we want a pad of.

name (str)

the name of the request Gst.Pad to retrieve. Can be None.

caps (Gst.Caps)

the caps of the pad we want to request. Can be None.

Returns (Gst.Pad)

requested Gst.Pad if found, otherwise None. Release after usage.


gst_element_request_pad_simple

GstPad *
gst_element_request_pad_simple (GstElement * element,
                                const gchar * name)

Retrieves a pad from the element by name (e.g. "src_%d"). This version only retrieves request pads. The pad should be released with gst_element_release_request_pad.

This method is slower than manually getting the pad template and calling gst_element_request_pad if the pads should have a specific name (e.g. name is "src_1" instead of "src_%u").

Note that this function was introduced in GStreamer 1.20 in order to provide a better name to gst_element_get_request_pad. Prior to 1.20, users should use gst_element_get_request_pad which provides the same functionality.

Parameters:

element

a GstElement to find a request pad of.

name

the name of the request GstPad to retrieve.

Returns ( [transfer: full][nullable])

requested GstPad if found, otherwise NULL. Release after usage.

Since : 1.20


Gst.Element.prototype.request_pad_simple

function Gst.Element.prototype.request_pad_simple(name: String): {
    // javascript wrapper for 'gst_element_request_pad_simple'
}

Retrieves a pad from the element by name (e.g. "src_%d"). This version only retrieves request pads. The pad should be released with Gst.Element.prototype.release_request_pad.

This method is slower than manually getting the pad template and calling Gst.Element.prototype.request_pad if the pads should have a specific name (e.g. name is "src_1" instead of "src_%u").

Note that this function was introduced in GStreamer 1.20 in order to provide a better name to Gst.Element.prototype.get_request_pad. Prior to 1.20, users should use Gst.Element.prototype.get_request_pad which provides the same functionality.

Parameters:

element (Gst.Element)

a Gst.Element to find a request pad of.

name (String)

the name of the request Gst.Pad to retrieve.

Returns (Gst.Pad)

requested Gst.Pad if found, otherwise null. Release after usage.

Since : 1.20


Gst.Element.request_pad_simple

def Gst.Element.request_pad_simple (self, name):
    #python wrapper for 'gst_element_request_pad_simple'

Retrieves a pad from the element by name (e.g. "src_%d"). This version only retrieves request pads. The pad should be released with Gst.Element.release_request_pad.

This method is slower than manually getting the pad template and calling Gst.Element.request_pad if the pads should have a specific name (e.g. name is "src_1" instead of "src_%u").

Note that this function was introduced in GStreamer 1.20 in order to provide a better name to Gst.Element.get_request_pad. Prior to 1.20, users should use Gst.Element.get_request_pad which provides the same functionality.

Parameters:

element (Gst.Element)

a Gst.Element to find a request pad of.

name (str)

the name of the request Gst.Pad to retrieve.

Returns (Gst.Pad)

requested Gst.Pad if found, otherwise None. Release after usage.

Since : 1.20


gst_element_seek

gboolean
gst_element_seek (GstElement * element,
                  gdouble rate,
                  GstFormat format,
                  GstSeekFlags flags,
                  GstSeekType start_type,
                  gint64 start,
                  GstSeekType stop_type,
                  gint64 stop)

Sends a seek event to an element. See gst_event_new_seek for the details of the parameters. The seek event is sent to the element using gst_element_send_event.

MT safe.

Parameters:

element

a GstElement to send the event to.

rate

The new playback rate

format

The format of the seek values

flags

The optional seek flags.

start_type

The type and flags for the new start position

start

The value of the new start position

stop_type

The type and flags for the new stop position

stop

The value of the new stop position

Returns

TRUE if the event was handled. Flushing seeks will trigger a preroll, which will emit GST_MESSAGE_ASYNC_DONE.


Gst.Element.prototype.seek

function Gst.Element.prototype.seek(rate: Number, format: Gst.Format, flags: Gst.SeekFlags, start_type: Gst.SeekType, start: Number, stop_type: Gst.SeekType, stop: Number): {
    // javascript wrapper for 'gst_element_seek'
}

Sends a seek event to an element. See Gst.Event.prototype.new_seek for the details of the parameters. The seek event is sent to the element using Gst.Element.prototype.send_event.

MT safe.

Parameters:

element (Gst.Element)

a Gst.Element to send the event to.

rate (Number)

The new playback rate

format (Gst.Format)

The format of the seek values

flags (Gst.SeekFlags)

The optional seek flags.

start_type (Gst.SeekType)

The type and flags for the new start position

start (Number)

The value of the new start position

stop_type (Gst.SeekType)

The type and flags for the new stop position

stop (Number)

The value of the new stop position

Returns (Number)

true if the event was handled. Flushing seeks will trigger a preroll, which will emit Gst.MessageType.ASYNC_DONE.


Gst.Element.seek

def Gst.Element.seek (self, rate, format, flags, start_type, start, stop_type, stop):
    #python wrapper for 'gst_element_seek'

Sends a seek event to an element. See Gst.Event.new_seek for the details of the parameters. The seek event is sent to the element using Gst.Element.send_event.

MT safe.

Parameters:

element (Gst.Element)

a Gst.Element to send the event to.

rate (float)

The new playback rate

format (Gst.Format)

The format of the seek values

flags (Gst.SeekFlags)

The optional seek flags.

start_type (Gst.SeekType)

The type and flags for the new start position

start (int)

The value of the new start position

stop_type (Gst.SeekType)

The type and flags for the new stop position

stop (int)

The value of the new stop position

Returns (bool)

True if the event was handled. Flushing seeks will trigger a preroll, which will emit Gst.MessageType.ASYNC_DONE.


gst_element_seek_simple

gboolean
gst_element_seek_simple (GstElement * element,
                         GstFormat format,
                         GstSeekFlags seek_flags,
                         gint64 seek_pos)

Simple API to perform a seek on the given element, meaning it just seeks to the given position relative to the start of the stream. For more complex operations like segment seeks (e.g. for looping) or changing the playback rate or seeking relative to the last configured playback segment you should use gst_element_seek.

In a completely prerolled PAUSED or PLAYING pipeline, seeking is always guaranteed to return TRUE on a seekable media type or FALSE when the media type is certainly not seekable (such as a live stream).

Some elements allow for seeking in the READY state, in this case they will store the seek event and execute it when they are put to PAUSED. If the element supports seek in READY, it will always return TRUE when it receives the event in the READY state.

Parameters:

element

a GstElement to seek on

format

a GstFormat to execute the seek in, such as GST_FORMAT_TIME

seek_flags

seek options; playback applications will usually want to use GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT here

seek_pos

position to seek to (relative to the start); if you are doing a seek in GST_FORMAT_TIME this value is in nanoseconds - multiply with GST_SECOND to convert seconds to nanoseconds or with GST_MSECOND to convert milliseconds to nanoseconds.

Returns

TRUE if the seek operation succeeded. Flushing seeks will trigger a preroll, which will emit GST_MESSAGE_ASYNC_DONE.


Gst.Element.prototype.seek_simple

function Gst.Element.prototype.seek_simple(format: Gst.Format, seek_flags: Gst.SeekFlags, seek_pos: Number): {
    // javascript wrapper for 'gst_element_seek_simple'
}

Simple API to perform a seek on the given element, meaning it just seeks to the given position relative to the start of the stream. For more complex operations like segment seeks (e.g. for looping) or changing the playback rate or seeking relative to the last configured playback segment you should use Gst.Element.prototype.seek.

In a completely prerolled PAUSED or PLAYING pipeline, seeking is always guaranteed to return true on a seekable media type or false when the media type is certainly not seekable (such as a live stream).

Some elements allow for seeking in the READY state, in this case they will store the seek event and execute it when they are put to PAUSED. If the element supports seek in READY, it will always return true when it receives the event in the READY state.

Parameters:

element (Gst.Element)

a Gst.Element to seek on

format (Gst.Format)

a Gst.Format to execute the seek in, such as Gst.Format.TIME

seek_flags (Gst.SeekFlags)

seek options; playback applications will usually want to use GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT here

seek_pos (Number)

position to seek to (relative to the start); if you are doing a seek in Gst.Format.TIME this value is in nanoseconds - multiply with Gst.SECOND to convert seconds to nanoseconds or with Gst.MSECOND to convert milliseconds to nanoseconds.

Returns (Number)

true if the seek operation succeeded. Flushing seeks will trigger a preroll, which will emit Gst.MessageType.ASYNC_DONE.


Gst.Element.seek_simple

def Gst.Element.seek_simple (self, format, seek_flags, seek_pos):
    #python wrapper for 'gst_element_seek_simple'

Simple API to perform a seek on the given element, meaning it just seeks to the given position relative to the start of the stream. For more complex operations like segment seeks (e.g. for looping) or changing the playback rate or seeking relative to the last configured playback segment you should use Gst.Element.seek.

In a completely prerolled PAUSED or PLAYING pipeline, seeking is always guaranteed to return True on a seekable media type or False when the media type is certainly not seekable (such as a live stream).

Some elements allow for seeking in the READY state, in this case they will store the seek event and execute it when they are put to PAUSED. If the element supports seek in READY, it will always return True when it receives the event in the READY state.

Parameters:

element (Gst.Element)

a Gst.Element to seek on

format (Gst.Format)

a Gst.Format to execute the seek in, such as Gst.Format.TIME

seek_flags (Gst.SeekFlags)

seek options; playback applications will usually want to use GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT here

seek_pos (int)

position to seek to (relative to the start); if you are doing a seek in Gst.Format.TIME this value is in nanoseconds - multiply with Gst.SECOND to convert seconds to nanoseconds or with Gst.MSECOND to convert milliseconds to nanoseconds.

Returns (bool)

True if the seek operation succeeded. Flushing seeks will trigger a preroll, which will emit Gst.MessageType.ASYNC_DONE.


gst_element_send_event

gboolean
gst_element_send_event (GstElement * element,
                        GstEvent * event)

Sends an event to an element. If the element doesn't implement an event handler, the event will be pushed on a random linked sink pad for downstream events or a random linked source pad for upstream events.

This function takes ownership of the provided event so you should gst_event_ref it if you want to reuse the event after this call.

MT safe.

Parameters:

element

a GstElement to send the event to.

event ( [transfer: full])

the GstEvent to send to the element.

Returns

TRUE if the event was handled. Events that trigger a preroll (such as flushing seeks and steps) will emit GST_MESSAGE_ASYNC_DONE.


Gst.Element.prototype.send_event

function Gst.Element.prototype.send_event(event: Gst.Event): {
    // javascript wrapper for 'gst_element_send_event'
}

Sends an event to an element. If the element doesn't implement an event handler, the event will be pushed on a random linked sink pad for downstream events or a random linked source pad for upstream events.

This function takes ownership of the provided event so you should gst_event_ref (not introspectable) it if you want to reuse the event after this call.

MT safe.

Parameters:

element (Gst.Element)

a Gst.Element to send the event to.

event (Gst.Event)

the Gst.Event to send to the element.

Returns (Number)

true if the event was handled. Events that trigger a preroll (such as flushing seeks and steps) will emit Gst.MessageType.ASYNC_DONE.


Gst.Element.send_event

def Gst.Element.send_event (self, event):
    #python wrapper for 'gst_element_send_event'

Sends an event to an element. If the element doesn't implement an event handler, the event will be pushed on a random linked sink pad for downstream events or a random linked source pad for upstream events.

This function takes ownership of the provided event so you should gst_event_ref (not introspectable) it if you want to reuse the event after this call.

MT safe.

Parameters:

element (Gst.Element)

a Gst.Element to send the event to.

event (Gst.Event)

the Gst.Event to send to the element.

Returns (bool)

True if the event was handled. Events that trigger a preroll (such as flushing seeks and steps) will emit Gst.MessageType.ASYNC_DONE.


gst_element_set_base_time

gst_element_set_base_time (GstElement * element,
                           GstClockTime time)

Set the base time of an element. See gst_element_get_base_time.

MT safe.

Parameters:

element

a GstElement.

time

the base time to set.


Gst.Element.prototype.set_base_time

function Gst.Element.prototype.set_base_time(time: Number): {
    // javascript wrapper for 'gst_element_set_base_time'
}

Set the base time of an element. See Gst.Element.prototype.get_base_time.

MT safe.

Parameters:

element (Gst.Element)

a Gst.Element.

time (Number)

the base time to set.


Gst.Element.set_base_time

def Gst.Element.set_base_time (self, time):
    #python wrapper for 'gst_element_set_base_time'

Set the base time of an element. See Gst.Element.get_base_time.

MT safe.

Parameters:

element (Gst.Element)

a Gst.Element.

time (int)

the base time to set.


gst_element_set_bus

gst_element_set_bus (GstElement * element,
                     GstBus * bus)

Sets the bus of the element. Increases the refcount on the bus. For internal use only, unless you're testing elements.

MT safe.

Parameters:

element

a GstElement to set the bus of.

bus ( [transfer: none][allow-none])

the GstBus to set.


Gst.Element.prototype.set_bus

function Gst.Element.prototype.set_bus(bus: Gst.Bus): {
    // javascript wrapper for 'gst_element_set_bus'
}

Sets the bus of the element. Increases the refcount on the bus. For internal use only, unless you're testing elements.

MT safe.

Parameters:

element (Gst.Element)

a Gst.Element to set the bus of.

bus (Gst.Bus)

the Gst.Bus to set.


Gst.Element.set_bus

def Gst.Element.set_bus (self, bus):
    #python wrapper for 'gst_element_set_bus'

Sets the bus of the element. Increases the refcount on the bus. For internal use only, unless you're testing elements.

MT safe.

Parameters:

element (Gst.Element)

a Gst.Element to set the bus of.

bus (Gst.Bus)

the Gst.Bus to set.


gst_element_set_clock

gboolean
gst_element_set_clock (GstElement * element,
                       GstClock * clock)

Sets the clock for the element. This function increases the refcount on the clock. Any previously set clock on the object is unreffed.

Parameters:

element

a GstElement to set the clock for.

clock ( [transfer: none][nullable])

the GstClock to set for the element.

Returns

TRUE if the element accepted the clock. An element can refuse a clock when it, for example, is not able to slave its internal clock to the clock or when it requires a specific clock to operate.

MT safe.


Gst.Element.prototype.set_clock

function Gst.Element.prototype.set_clock(clock: Gst.Clock): {
    // javascript wrapper for 'gst_element_set_clock'
}

Sets the clock for the element. This function increases the refcount on the clock. Any previously set clock on the object is unreffed.

Parameters:

element (Gst.Element)

a Gst.Element to set the clock for.

clock (Gst.Clock)

the Gst.Clock to set for the element.

Returns (Number)

true if the element accepted the clock. An element can refuse a clock when it, for example, is not able to slave its internal clock to the clock or when it requires a specific clock to operate.

MT safe.


Gst.Element.set_clock

def Gst.Element.set_clock (self, clock):
    #python wrapper for 'gst_element_set_clock'

Sets the clock for the element. This function increases the refcount on the clock. Any previously set clock on the object is unreffed.

Parameters:

element (Gst.Element)

a Gst.Element to set the clock for.

clock (Gst.Clock)

the Gst.Clock to set for the element.

Returns (bool)

True if the element accepted the clock. An element can refuse a clock when it, for example, is not able to slave its internal clock to the clock or when it requires a specific clock to operate.

MT safe.


gst_element_set_context

gst_element_set_context (GstElement * element,
                         GstContext * context)

Sets the context of the element. Increases the refcount of the context.

MT safe.

Parameters:

element

a GstElement to set the context of.

context ( [transfer: none])

the GstContext to set.


Gst.Element.prototype.set_context

function Gst.Element.prototype.set_context(context: Gst.Context): {
    // javascript wrapper for 'gst_element_set_context'
}

Sets the context of the element. Increases the refcount of the context.

MT safe.

Parameters:

element (Gst.Element)

a Gst.Element to set the context of.

context (Gst.Context)

the Gst.Context to set.


Gst.Element.set_context

def Gst.Element.set_context (self, context):
    #python wrapper for 'gst_element_set_context'

Sets the context of the element. Increases the refcount of the context.

MT safe.

Parameters:

element (Gst.Element)

a Gst.Element to set the context of.

context (Gst.Context)

the Gst.Context to set.


gst_element_set_locked_state

gboolean
gst_element_set_locked_state (GstElement * element,
                              gboolean locked_state)

Locks the state of an element, so state changes of the parent don't affect this element anymore.

Note that this is racy if the state lock of the parent bin is not taken. The parent bin might've just checked the flag in another thread and as the next step proceed to change the child element's state.

MT safe.

Parameters:

element

a GstElement

locked_state

TRUE to lock the element's state

Returns

TRUE if the state was changed, FALSE if bad parameters were given or the elements state-locking needed no change.


Gst.Element.prototype.set_locked_state

function Gst.Element.prototype.set_locked_state(locked_state: Number): {
    // javascript wrapper for 'gst_element_set_locked_state'
}

Locks the state of an element, so state changes of the parent don't affect this element anymore.

Note that this is racy if the state lock of the parent bin is not taken. The parent bin might've just checked the flag in another thread and as the next step proceed to change the child element's state.

MT safe.

Parameters:

element (Gst.Element)

a Gst.Element

locked_state (Number)

true to lock the element's state

Returns (Number)

true if the state was changed, false if bad parameters were given or the elements state-locking needed no change.


Gst.Element.set_locked_state

def Gst.Element.set_locked_state (self, locked_state):
    #python wrapper for 'gst_element_set_locked_state'

Locks the state of an element, so state changes of the parent don't affect this element anymore.

Note that this is racy if the state lock of the parent bin is not taken. The parent bin might've just checked the flag in another thread and as the next step proceed to change the child element's state.

MT safe.

Parameters:

element (Gst.Element)

a Gst.Element

locked_state (bool)

True to lock the element's state

Returns (bool)

True if the state was changed, False if bad parameters were given or the elements state-locking needed no change.


gst_element_set_start_time

gst_element_set_start_time (GstElement * element,
                            GstClockTime time)

Set the start time of an element. The start time of the element is the running time of the element when it last went to the PAUSED state. In READY or after a flushing seek, it is set to 0.

Toplevel elements like GstPipeline will manage the start_time and base_time on its children. Setting the start_time to GST_CLOCK_TIME_NONE on such a toplevel element will disable the distribution of the base_time to the children and can be useful if the application manages the base_time itself, for example if you want to synchronize capture from multiple pipelines, and you can also ensure that the pipelines have the same clock.

MT safe.

Parameters:

element

a GstElement.

time

the base time to set.


Gst.Element.prototype.set_start_time

function Gst.Element.prototype.set_start_time(time: Number): {
    // javascript wrapper for 'gst_element_set_start_time'
}

Set the start time of an element. The start time of the element is the running time of the element when it last went to the PAUSED state. In READY or after a flushing seek, it is set to 0.

Toplevel elements like Gst.Pipeline will manage the start_time and base_time on its children. Setting the start_time to Gst.CLOCK_TIME_NONE on such a toplevel element will disable the distribution of the base_time to the children and can be useful if the application manages the base_time itself, for example if you want to synchronize capture from multiple pipelines, and you can also ensure that the pipelines have the same clock.

MT safe.

Parameters:

element (Gst.Element)

a Gst.Element.

time (Number)

the base time to set.


Gst.Element.set_start_time

def Gst.Element.set_start_time (self, time):
    #python wrapper for 'gst_element_set_start_time'

Set the start time of an element. The start time of the element is the running time of the element when it last went to the PAUSED state. In READY or after a flushing seek, it is set to 0.

Toplevel elements like Gst.Pipeline will manage the start_time and base_time on its children. Setting the start_time to Gst.CLOCK_TIME_NONE on such a toplevel element will disable the distribution of the base_time to the children and can be useful if the application manages the base_time itself, for example if you want to synchronize capture from multiple pipelines, and you can also ensure that the pipelines have the same clock.

MT safe.

Parameters:

element (Gst.Element)

a Gst.Element.

time (int)

the base time to set.


gst_element_set_state

GstStateChangeReturn
gst_element_set_state (GstElement * element,
                       GstState state)

Sets the state of the element. This function will try to set the requested state by going through all the intermediary states and calling the class's state change function for each.

This function can return GST_STATE_CHANGE_ASYNC, in which case the element will perform the remainder of the state change asynchronously in another thread. An application can use gst_element_get_state to wait for the completion of the state change or it can wait for a GST_MESSAGE_ASYNC_DONE or GST_MESSAGE_STATE_CHANGED on the bus.

State changes to GST_STATE_READY or GST_STATE_NULL never return GST_STATE_CHANGE_ASYNC.

Parameters:

element

a GstElement to change state of.

state

the element's new GstState.

Returns

Result of the state change using GstStateChangeReturn.

MT safe.


Gst.Element.prototype.set_state

function Gst.Element.prototype.set_state(state: Gst.State): {
    // javascript wrapper for 'gst_element_set_state'
}

Sets the state of the element. This function will try to set the requested state by going through all the intermediary states and calling the class's state change function for each.

This function can return Gst.StateChangeReturn.ASYNC, in which case the element will perform the remainder of the state change asynchronously in another thread. An application can use Gst.Element.prototype.get_state to wait for the completion of the state change or it can wait for a Gst.MessageType.ASYNC_DONE or Gst.MessageType.STATE_CHANGED on the bus.

State changes to Gst.State.READY or Gst.State.NULL never return Gst.StateChangeReturn.ASYNC.

Parameters:

element (Gst.Element)

a Gst.Element to change state of.

state (Gst.State)

the element's new Gst.State.

Returns (Gst.StateChangeReturn)

Result of the state change using Gst.StateChangeReturn.

MT safe.


Gst.Element.set_state

def Gst.Element.set_state (self, state):
    #python wrapper for 'gst_element_set_state'

Sets the state of the element. This function will try to set the requested state by going through all the intermediary states and calling the class's state change function for each.

This function can return Gst.StateChangeReturn.ASYNC, in which case the element will perform the remainder of the state change asynchronously in another thread. An application can use Gst.Element.get_state to wait for the completion of the state change or it can wait for a Gst.MessageType.ASYNC_DONE or Gst.MessageType.STATE_CHANGED on the bus.

State changes to Gst.State.READY or Gst.State.NULL never return Gst.StateChangeReturn.ASYNC.

Parameters:

element (Gst.Element)

a Gst.Element to change state of.

state (Gst.State)

the element's new Gst.State.

Returns (Gst.StateChangeReturn)

Result of the state change using Gst.StateChangeReturn.

MT safe.


gst_element_sync_state_with_parent

gboolean
gst_element_sync_state_with_parent (GstElement * element)

Tries to change the state of the element to the same as its parent. If this function returns FALSE, the state of element is undefined.

Parameters:

element

a GstElement.

Returns

TRUE, if the element's state could be synced to the parent's state.

MT safe.


Gst.Element.prototype.sync_state_with_parent

function Gst.Element.prototype.sync_state_with_parent(): {
    // javascript wrapper for 'gst_element_sync_state_with_parent'
}

Tries to change the state of the element to the same as its parent. If this function returns false, the state of element is undefined.

Parameters:

element (Gst.Element)

a Gst.Element.

Returns (Number)

true, if the element's state could be synced to the parent's state.

MT safe.


Gst.Element.sync_state_with_parent

def Gst.Element.sync_state_with_parent (self):
    #python wrapper for 'gst_element_sync_state_with_parent'

Tries to change the state of the element to the same as its parent. If this function returns False, the state of element is undefined.

Parameters:

element (Gst.Element)

a Gst.Element.

Returns (bool)

True, if the element's state could be synced to the parent's state.

MT safe.


Class Methods

gst_element_class_add_metadata

gst_element_class_add_metadata (GstElementClass * klass,
                                const gchar * key,
                                const gchar * value)

Set key with value as metadata in klass.

Parameters:

klass

class to set metadata for

key

the key to set

value

the value to set


Gst.ElementClass.prototype.add_metadata

function Gst.ElementClass.prototype.add_metadata(klass: Gst.ElementClass, key: String, value: String): {
    // javascript wrapper for 'gst_element_class_add_metadata'
}

Set key with value as metadata in klass.

Parameters:

klass (Gst.ElementClass)

class to set metadata for

key (String)

the key to set

value (String)

the value to set


gst_element_class_add_pad_template

gst_element_class_add_pad_template (GstElementClass * klass,
                                    GstPadTemplate * templ)

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)

Parameters:

klass

the GstElementClass to add the pad template to.

templ ( [transfer: floating])

a GstPadTemplate to add to the element class.


Gst.ElementClass.prototype.add_pad_template

function Gst.ElementClass.prototype.add_pad_template(klass: Gst.ElementClass, templ: Gst.PadTemplate): {
    // javascript wrapper for 'gst_element_class_add_pad_template'
}

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 (not introspectable))

Parameters:

klass (Gst.ElementClass)

the Gst.ElementClass to add the pad template to.

templ (Gst.PadTemplate)

a Gst.PadTemplate to add to the element class.


gst_element_class_add_static_metadata

gst_element_class_add_static_metadata (GstElementClass * klass,
                                       const gchar * key,
                                       const gchar * value)

Set key with value as metadata in klass.

Same as gst_element_class_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.)

Parameters:

klass

class to set metadata for

key

the key to set

value

the value to set


Gst.ElementClass.prototype.add_static_metadata

function Gst.ElementClass.prototype.add_static_metadata(klass: Gst.ElementClass, key: String, value: String): {
    // javascript wrapper for 'gst_element_class_add_static_metadata'
}

Set key with value as metadata in klass.

Same as Gst.ElementClass.prototype.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.)

Parameters:

klass (Gst.ElementClass)

class to set metadata for

key (String)

the key to set

value (String)

the value to set


gst_element_class_add_static_pad_template

gst_element_class_add_static_pad_template (GstElementClass * klass,
                                           GstStaticPadTemplate * static_templ)

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.

Parameters:

klass

the GstElementClass to add the pad template to.

static_templ

GstStaticPadTemplate to add as pad template to the element class.

Since : 1.8


Gst.ElementClass.prototype.add_static_pad_template

function Gst.ElementClass.prototype.add_static_pad_template(klass: Gst.ElementClass, static_templ: Gst.StaticPadTemplate): {
    // javascript wrapper for 'gst_element_class_add_static_pad_template'
}

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.

Parameters:

klass (Gst.ElementClass)

the Gst.ElementClass to add the pad template to.

static_templ (Gst.StaticPadTemplate)

Gst.StaticPadTemplate to add as pad template to the element class.

Since : 1.8


gst_element_class_add_static_pad_template_with_gtype

gst_element_class_add_static_pad_template_with_gtype (GstElementClass * klass,
                                                      GstStaticPadTemplate * static_templ,
                                                      GType pad_type)

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.

Parameters:

klass

the GstElementClass to add the pad template to.

static_templ

GstStaticPadTemplate to add as pad template to the element class.

pad_type

The GType of the pad to create

Since : 1.14


Gst.ElementClass.prototype.add_static_pad_template_with_gtype

function Gst.ElementClass.prototype.add_static_pad_template_with_gtype(klass: Gst.ElementClass, static_templ: Gst.StaticPadTemplate, pad_type: GObject.Type): {
    // javascript wrapper for 'gst_element_class_add_static_pad_template_with_gtype'
}

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.

Parameters:

klass (Gst.ElementClass)

the Gst.ElementClass to add the pad template to.

static_templ (Gst.StaticPadTemplate)

Gst.StaticPadTemplate to add as pad template to the element class.

pad_type (GObject.Type)

The GObject.Type of the pad to create

Since : 1.14


gst_element_class_get_metadata

const gchar *
gst_element_class_get_metadata (GstElementClass * klass,
                                const gchar * key)

Get metadata with key in klass.

Parameters:

klass

class to get metadata for

key

the key to get

Returns

the metadata for key.


Gst.ElementClass.prototype.get_metadata

function Gst.ElementClass.prototype.get_metadata(klass: Gst.ElementClass, key: String): {
    // javascript wrapper for 'gst_element_class_get_metadata'
}

Get metadata with key in klass.

Parameters:

klass (Gst.ElementClass)

class to get metadata for

key (String)

the key to get

Returns (String)

the metadata for key.


gst_element_class_get_pad_template

GstPadTemplate *
gst_element_class_get_pad_template (GstElementClass * element_class,
                                    const gchar * name)

Retrieves a padtemplate from element_class with the given name.

If you use this function in the GInstanceInitFunc of an object class that has subclasses, make sure to pass the g_class parameter of the GInstanceInitFunc here.

Parameters:

element_class

a GstElementClass to get the pad template of.

name

the name of the GstPadTemplate to get.

Returns ( [transfer: none][nullable])

the GstPadTemplate with the given name, or NULL if none was found. No unreferencing is necessary.


Gst.ElementClass.prototype.get_pad_template

function Gst.ElementClass.prototype.get_pad_template(element_class: Gst.ElementClass, name: String): {
    // javascript wrapper for 'gst_element_class_get_pad_template'
}

Retrieves a padtemplate from element_class with the given name.

If you use this function in the GInstanceInitFunc of an object class that has subclasses, make sure to pass the g_class parameter of the GInstanceInitFunc here.

Parameters:

element_class (Gst.ElementClass)

a Gst.ElementClass to get the pad template of.

name (String)

the name of the Gst.PadTemplate to get.

Returns (Gst.PadTemplate)

the Gst.PadTemplate with the given name, or null if none was found. No unreferencing is necessary.


gst_element_class_get_pad_template_list

GList *
gst_element_class_get_pad_template_list (GstElementClass * element_class)

Retrieves a list of the pad templates associated with element_class. The list must not be modified by the calling code.

If you use this function in the GInstanceInitFunc of an object class that has subclasses, make sure to pass the g_class parameter of the GInstanceInitFunc here.

Parameters:

element_class

a GstElementClass to get pad templates of.

Returns ( [transfer: none][element-typeGst.PadTemplate])

the GList of pad templates.


Gst.ElementClass.prototype.get_pad_template_list

function Gst.ElementClass.prototype.get_pad_template_list(element_class: Gst.ElementClass): {
    // javascript wrapper for 'gst_element_class_get_pad_template_list'
}

Retrieves a list of the pad templates associated with element_class. The list must not be modified by the calling code.

If you use this function in the GInstanceInitFunc of an object class that has subclasses, make sure to pass the g_class parameter of the GInstanceInitFunc here.

Parameters:

element_class (Gst.ElementClass)

a Gst.ElementClass to get pad templates of.

Returns ([ Gst.PadTemplate ])

the GLib.List of pad templates.


gst_element_class_set_metadata

gst_element_class_set_metadata (GstElementClass * klass,
                                const gchar * longname,
                                const gchar * classification,
                                const gchar * description,
                                const gchar * author)

Sets the detailed information for a GstElementClass.

This function is for use in _class_init functions only.

Parameters:

klass

class to set metadata for

longname

The long English name of the element. E.g. "File Sink"

classification

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

Sentence describing the purpose of the element. E.g: "Write stream to a file"

author

Name and contact details of the author(s). Use \n to separate multiple author metadata. E.g: "Joe Bloggs <joe.blogs at foo.com>"


Gst.ElementClass.prototype.set_metadata

function Gst.ElementClass.prototype.set_metadata(klass: Gst.ElementClass, longname: String, classification: String, description: String, author: String): {
    // javascript wrapper for 'gst_element_class_set_metadata'
}

Sets the detailed information for a Gst.ElementClass.

This function is for use in _class_init functions only.

Parameters:

klass (Gst.ElementClass)

class to set metadata for

longname (String)

The long English name of the element. E.g. "File Sink"

classification (String)

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 (String)

Sentence describing the purpose of the element. E.g: "Write stream to a file"

author (String)

Name and contact details of the author(s). Use \n to separate multiple author metadata. E.g: "Joe Bloggs <joe.blogs at foo.com>"


gst_element_class_set_static_metadata

gst_element_class_set_static_metadata (GstElementClass * klass,
                                       const gchar * longname,
                                       const gchar * classification,
                                       const gchar * description,
                                       const gchar * author)

Sets the detailed information for a GstElementClass.

This function is for use in _class_init functions only.

Same as gst_element_class_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.)

Parameters:

klass

class to set metadata for

longname

The long English name of the element. E.g. "File Sink"

classification

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

Sentence describing the purpose of the element. E.g: "Write stream to a file"

author

Name and contact details of the author(s). Use \n to separate multiple author metadata. E.g: "Joe Bloggs <joe.blogs at foo.com>"


Gst.ElementClass.prototype.set_static_metadata

function Gst.ElementClass.prototype.set_static_metadata(klass: Gst.ElementClass, longname: String, classification: String, description: String, author: String): {
    // javascript wrapper for 'gst_element_class_set_static_metadata'
}

Sets the detailed information for a Gst.ElementClass.

This function is for use in _class_init functions only.

Same as Gst.ElementClass.prototype.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.)

Parameters:

klass (Gst.ElementClass)

class to set metadata for

longname (String)

The long English name of the element. E.g. "File Sink"

classification (String)

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 (String)

Sentence describing the purpose of the element. E.g: "Write stream to a file"

author (String)

Name and contact details of the author(s). Use \n to separate multiple author metadata. E.g: "Joe Bloggs <joe.blogs at foo.com>"


Functions

gst_element_make_from_uri

GstElement *
gst_element_make_from_uri (const GstURIType type,
                           const gchar * uri,
                           const gchar * elementname,
                           GError ** error)

Creates an element for handling the given URI.

Parameters:

type

Whether to create a source or a sink

uri

URI to create an element for

elementname ( [nullable])

Name of created element, can be NULL.

error

address where to store error information, or NULL.

Returns ( [transfer: floating])

a new element or NULL if none could be created


Gst.Element.prototype.make_from_uri

function Gst.Element.prototype.make_from_uri(type: Gst.URIType, uri: String, elementname: String): {
    // javascript wrapper for 'gst_element_make_from_uri'
}

Creates an element for handling the given URI.

Parameters:

type (Gst.URIType)

Whether to create a source or a sink

uri (String)

URI to create an element for

elementname (String)

Name of created element, can be null.

Returns (Gst.Element)

a new element or null if none could be created


Gst.Element.make_from_uri

@raises(GLib.GError)
def Gst.Element.make_from_uri (type, uri, elementname):
    #python wrapper for 'gst_element_make_from_uri'

Creates an element for handling the given URI.

Parameters:

type (Gst.URIType)

Whether to create a source or a sink

uri (str)

URI to create an element for

elementname (str)

Name of created element, can be None.

Returns (Gst.Element)

a new element or None if none could be created


gst_element_register

gboolean
gst_element_register (GstPlugin * plugin,
                      const gchar * name,
                      guint rank,
                      GType type)

Create a new elementfactory capable of instantiating objects of the type and add the factory to plugin.

Parameters:

plugin ( [allow-none])

GstPlugin to register the element with, or NULL for a static element.

name

name of elements of this type

rank

rank of element (higher rank means more importance when autoplugging)

type

GType of element to register

Returns

TRUE, if the registering succeeded, FALSE on error


Gst.Element.prototype.register

function Gst.Element.prototype.register(plugin: Gst.Plugin, name: String, rank: Number, type: GObject.Type): {
    // javascript wrapper for 'gst_element_register'
}

Create a new elementfactory capable of instantiating objects of the type and add the factory to plugin.

Parameters:

plugin (Gst.Plugin)

Gst.Plugin to register the element with, or null for a static element.

name (String)

name of elements of this type

rank (Number)

rank of element (higher rank means more importance when autoplugging)

type (GObject.Type)

GType of element to register

Returns (Number)

true, if the registering succeeded, false on error


Gst.Element.register

def Gst.Element.register (plugin, name, rank, type):
    #python wrapper for 'gst_element_register'

Create a new elementfactory capable of instantiating objects of the type and add the factory to plugin.

Parameters:

plugin (Gst.Plugin)

Gst.Plugin to register the element with, or None for a static element.

name (str)

name of elements of this type

rank (int)

rank of element (higher rank means more importance when autoplugging)

type (GObject.Type)

GType of element to register

Returns (bool)

True, if the registering succeeded, False on error


gst_element_state_change_return_get_name

const gchar *
gst_element_state_change_return_get_name (GstStateChangeReturn state_ret)

Gets a string representing the given state change result.

Parameters:

state_ret

a GstStateChangeReturn to get the name of.

Returns ( [transfer: none])

a string with the name of the state result.


Gst.Element.prototype.state_change_return_get_name

function Gst.Element.prototype.state_change_return_get_name(state_ret: Gst.StateChangeReturn): {
    // javascript wrapper for 'gst_element_state_change_return_get_name'
}

Gets a string representing the given state change result.

Parameters:

state_ret (Gst.StateChangeReturn)

a Gst.StateChangeReturn to get the name of.

Returns (String)

a string with the name of the state result.


Gst.Element.state_change_return_get_name

def Gst.Element.state_change_return_get_name (state_ret):
    #python wrapper for 'gst_element_state_change_return_get_name'

Gets a string representing the given state change result.

Parameters:

state_ret (Gst.StateChangeReturn)

a Gst.StateChangeReturn to get the name of.

Returns (str)

a string with the name of the state result.


gst_element_state_get_name

const gchar *
gst_element_state_get_name (GstState state)

Gets a string representing the given state.

Parameters:

state

a GstState to get the name of.

Returns ( [transfer: none])

a string with the name of the state.


Gst.Element.prototype.state_get_name

function Gst.Element.prototype.state_get_name(state: Gst.State): {
    // javascript wrapper for 'gst_element_state_get_name'
}

Gets a string representing the given state.

Parameters:

state (Gst.State)

a Gst.State to get the name of.

Returns (String)

a string with the name of the state.


Gst.Element.state_get_name

def Gst.Element.state_get_name (state):
    #python wrapper for 'gst_element_state_get_name'

Gets a string representing the given state.

Parameters:

state (Gst.State)

a Gst.State to get the name of.

Returns (str)

a string with the name of the state.


gst_element_type_set_skip_documentation

gst_element_type_set_skip_documentation (GType type)

Marks type as "documentation should be skipped". Can be useful for dynamically registered element to be excluded from plugin documentation system.

Example:

GType my_type;
GTypeInfo my_type_info;

// Fill "my_type_info"
...

my_type = g_type_register_static (GST_TYPE_MY_ELEMENT, "my-type-name",
   &my_type_info, 0);
gst_element_type_set_skip_documentation (my_type);
gst_element_register (plugin, "my-plugin-feature-name", rank, my_type);

Parameters:

type

a GType of element

Since : 1.20


Gst.Element.prototype.type_set_skip_documentation

function Gst.Element.prototype.type_set_skip_documentation(type: GObject.Type): {
    // javascript wrapper for 'gst_element_type_set_skip_documentation'
}

Marks type as "documentation should be skipped". Can be useful for dynamically registered element to be excluded from plugin documentation system.

Example:

GType my_type;
GTypeInfo my_type_info;

// Fill "my_type_info"
...

my_type = g_type_register_static (GST_TYPE_MY_ELEMENT, "my-type-name",
   &my_type_info, 0);
gst_element_type_set_skip_documentation (my_type);
gst_element_register (plugin, "my-plugin-feature-name", rank, my_type);

Parameters:

type (GObject.Type)

a GObject.Type of element

Since : 1.20


Gst.Element.type_set_skip_documentation

def Gst.Element.type_set_skip_documentation (type):
    #python wrapper for 'gst_element_type_set_skip_documentation'

Marks type as "documentation should be skipped". Can be useful for dynamically registered element to be excluded from plugin documentation system.

Example:

GType my_type;
GTypeInfo my_type_info;

// Fill "my_type_info"
...

my_type = g_type_register_static (GST_TYPE_MY_ELEMENT, "my-type-name",
   &my_type_info, 0);
gst_element_type_set_skip_documentation (my_type);
gst_element_register (plugin, "my-plugin-feature-name", rank, my_type);

Parameters:

type (GObject.Type)

a GObject.Type of element

Since : 1.20


Signals

no-more-pads

no_more_pads_callback (GstElement * self,
                       gpointer user_data)

This signals that the element will not generate more dynamic pads. Note that this signal will usually be emitted from the context of the streaming thread.

Parameters:

self
No description available
user_data
No description available

Flags: Run Last


no-more-pads

function no_more_pads_callback(self: Gst.Element, user_data: Object): {
    // javascript callback for the 'no-more-pads' signal
}

This signals that the element will not generate more dynamic pads. Note that this signal will usually be emitted from the context of the streaming thread.

Parameters:

self (Gst.Element)
No description available
user_data (Object)
No description available

Flags: Run Last


no-more-pads

def no_more_pads_callback (self, *user_data):
    #python callback for the 'no-more-pads' signal

This signals that the element will not generate more dynamic pads. Note that this signal will usually be emitted from the context of the streaming thread.

Parameters:

self (Gst.Element)
No description available
user_data (variadic)
No description available

Flags: Run Last


pad-added

pad_added_callback (GstElement * self,
                    GstPad * new_pad,
                    gpointer user_data)

a new GstPad has been added to the element. Note that this signal will usually be emitted from the context of the streaming thread. Also keep in mind that if you add new elements to the pipeline in the signal handler you will need to set them to the desired target state with gst_element_set_state or gst_element_sync_state_with_parent.

Parameters:

self
No description available
new_pad

the pad that has been added

user_data
No description available

Flags: Run Last


pad-added

function pad_added_callback(self: Gst.Element, new_pad: Gst.Pad, user_data: Object): {
    // javascript callback for the 'pad-added' signal
}

a new Gst.Pad has been added to the element. Note that this signal will usually be emitted from the context of the streaming thread. Also keep in mind that if you add new elements to the pipeline in the signal handler you will need to set them to the desired target state with Gst.Element.prototype.set_state or Gst.Element.prototype.sync_state_with_parent.

Parameters:

self (Gst.Element)
No description available
new_pad (Gst.Pad)

the pad that has been added

user_data (Object)
No description available

Flags: Run Last


pad-added

def pad_added_callback (self, new_pad, *user_data):
    #python callback for the 'pad-added' signal

a new Gst.Pad has been added to the element. Note that this signal will usually be emitted from the context of the streaming thread. Also keep in mind that if you add new elements to the pipeline in the signal handler you will need to set them to the desired target state with Gst.Element.set_state or Gst.Element.sync_state_with_parent.

Parameters:

self (Gst.Element)
No description available
new_pad (Gst.Pad)

the pad that has been added

user_data (variadic)
No description available

Flags: Run Last


pad-removed

pad_removed_callback (GstElement * self,
                      GstPad * old_pad,
                      gpointer user_data)

a GstPad has been removed from the element

Parameters:

self
No description available
old_pad

the pad that has been removed

user_data
No description available

Flags: Run Last


pad-removed

function pad_removed_callback(self: Gst.Element, old_pad: Gst.Pad, user_data: Object): {
    // javascript callback for the 'pad-removed' signal
}

a Gst.Pad has been removed from the element

Parameters:

self (Gst.Element)
No description available
old_pad (Gst.Pad)

the pad that has been removed

user_data (Object)
No description available

Flags: Run Last


pad-removed

def pad_removed_callback (self, old_pad, *user_data):
    #python callback for the 'pad-removed' signal

a Gst.Pad has been removed from the element

Parameters:

self (Gst.Element)
No description available
old_pad (Gst.Pad)

the pad that has been removed

user_data (variadic)
No description available

Flags: Run Last


Virtual Methods

change_state

GstStateChangeReturn
change_state (GstElement * element,
              GstStateChange transition)

called by set_state to perform an incremental state change

Parameters:

element
No description available
transition
No description available
Returns
No description available

vfunc_change_state

function vfunc_change_state(element: Gst.Element, transition: Gst.StateChange): {
    // javascript implementation of the 'change_state' virtual method
}

called by set_state to perform an incremental state change

Parameters:

element (Gst.Element)
No description available
transition (Gst.StateChange)
No description available
Returns (Gst.StateChangeReturn)
No description available

do_change_state

def do_change_state (element, transition):
    #python implementation of the 'change_state' virtual method

called by set_state to perform an incremental state change

Parameters:

element (Gst.Element)
No description available
transition (Gst.StateChange)
No description available
Returns (Gst.StateChangeReturn)
No description available

get_state

GstStateChangeReturn
get_state (GstElement * element,
           GstState * state,
           GstState * pending,
           GstClockTime timeout)

get the state of the element

Parameters:

element
No description available
state
No description available
pending
No description available
timeout
No description available
Returns
No description available

vfunc_get_state

function vfunc_get_state(element: Gst.Element, timeout: Number): {
    // javascript implementation of the 'get_state' virtual method
}

get the state of the element

Parameters:

element (Gst.Element)
No description available
timeout (Number)
No description available

Returns a tuple made of:

No description available
state (Gst.State )
No description available
pending (Gst.State )
No description available

do_get_state

def do_get_state (element, timeout):
    #python implementation of the 'get_state' virtual method

get the state of the element

Parameters:

element (Gst.Element)
No description available
timeout (int)
No description available

Returns a tuple made of:

No description available
state (Gst.State )
No description available
pending (Gst.State )
No description available

no_more_pads

no_more_pads (GstElement * element)

Parameters:

element
No description available

vfunc_no_more_pads

function vfunc_no_more_pads(element: Gst.Element): {
    // javascript implementation of the 'no_more_pads' virtual method
}

Parameters:

element (Gst.Element)
No description available

do_no_more_pads

def do_no_more_pads (element):
    #python implementation of the 'no_more_pads' virtual method

Parameters:

element (Gst.Element)
No description available

pad_added

pad_added (GstElement * element,
           GstPad * pad)

Parameters:

element
No description available
pad
No description available

vfunc_pad_added

function vfunc_pad_added(element: Gst.Element, pad: Gst.Pad): {
    // javascript implementation of the 'pad_added' virtual method
}

Parameters:

element (Gst.Element)
No description available
pad (Gst.Pad)
No description available

do_pad_added

def do_pad_added (element, pad):
    #python implementation of the 'pad_added' virtual method

Parameters:

element (Gst.Element)
No description available
pad (Gst.Pad)
No description available

pad_removed

pad_removed (GstElement * element,
             GstPad * pad)

Parameters:

element
No description available
pad
No description available

vfunc_pad_removed

function vfunc_pad_removed(element: Gst.Element, pad: Gst.Pad): {
    // javascript implementation of the 'pad_removed' virtual method
}

Parameters:

element (Gst.Element)
No description available
pad (Gst.Pad)
No description available

do_pad_removed

def do_pad_removed (element, pad):
    #python implementation of the 'pad_removed' virtual method

Parameters:

element (Gst.Element)
No description available
pad (Gst.Pad)
No description available

post_message

gboolean
post_message (GstElement * element,
              GstMessage * message)

called when a message is posted on the element. Chain up to the parent class' handler to have it posted on the bus.

Parameters:

element
No description available
message
No description available
Returns
No description available

vfunc_post_message

function vfunc_post_message(element: Gst.Element, message: Gst.Message): {
    // javascript implementation of the 'post_message' virtual method
}

called when a message is posted on the element. Chain up to the parent class' handler to have it posted on the bus.

Parameters:

element (Gst.Element)
No description available
message (Gst.Message)
No description available
Returns (Number)
No description available

do_post_message

def do_post_message (element, message):
    #python implementation of the 'post_message' virtual method

called when a message is posted on the element. Chain up to the parent class' handler to have it posted on the bus.

Parameters:

element (Gst.Element)
No description available
message (Gst.Message)
No description available
Returns (bool)
No description available

provide_clock

GstClock *
provide_clock (GstElement * element)

gets the GstClock provided by the element

Parameters:

element
No description available
Returns
No description available

vfunc_provide_clock

function vfunc_provide_clock(element: Gst.Element): {
    // javascript implementation of the 'provide_clock' virtual method
}

gets the Gst.Clock provided by the element

Parameters:

element (Gst.Element)
No description available
Returns (Gst.Clock)
No description available

do_provide_clock

def do_provide_clock (element):
    #python implementation of the 'provide_clock' virtual method

gets the Gst.Clock provided by the element

Parameters:

element (Gst.Element)
No description available
Returns (Gst.Clock)
No description available

query

gboolean
query (GstElement * element,
       GstQuery * query)

perform a GstQuery on the element

Parameters:

element
No description available
query
No description available
Returns
No description available

vfunc_query

function vfunc_query(element: Gst.Element, query: Gst.Query): {
    // javascript implementation of the 'query' virtual method
}

perform a Gst.Query on the element

Parameters:

element (Gst.Element)
No description available
query (Gst.Query)
No description available
Returns (Number)
No description available

do_query

def do_query (element, query):
    #python implementation of the 'query' virtual method

perform a Gst.Query on the element

Parameters:

element (Gst.Element)
No description available
query (Gst.Query)
No description available
Returns (bool)
No description available

release_pad

release_pad (GstElement * element,
             GstPad * pad)

called when a request pad is to be released

Parameters:

element
No description available
pad
No description available

vfunc_release_pad

function vfunc_release_pad(element: Gst.Element, pad: Gst.Pad): {
    // javascript implementation of the 'release_pad' virtual method
}

called when a request pad is to be released

Parameters:

element (Gst.Element)
No description available
pad (Gst.Pad)
No description available

do_release_pad

def do_release_pad (element, pad):
    #python implementation of the 'release_pad' virtual method

called when a request pad is to be released

Parameters:

element (Gst.Element)
No description available
pad (Gst.Pad)
No description available

request_new_pad

GstPad *
request_new_pad (GstElement * element,
                 GstPadTemplate * templ,
                 const gchar * name,
                 const GstCaps * caps)

called when a new pad is requested

Parameters:

element
No description available
templ
No description available
name
No description available
caps
No description available
Returns
No description available

vfunc_request_new_pad

function vfunc_request_new_pad(element: Gst.Element, templ: Gst.PadTemplate, name: String, caps: Gst.Caps): {
    // javascript implementation of the 'request_new_pad' virtual method
}

called when a new pad is requested

Parameters:

element (Gst.Element)
No description available
templ (Gst.PadTemplate)
No description available
name (String)
No description available
caps (Gst.Caps)
No description available
Returns (Gst.Pad)
No description available

do_request_new_pad

def do_request_new_pad (element, templ, name, caps):
    #python implementation of the 'request_new_pad' virtual method

called when a new pad is requested

Parameters:

element (Gst.Element)
No description available
templ (Gst.PadTemplate)
No description available
name (str)
No description available
caps (Gst.Caps)
No description available
Returns (Gst.Pad)
No description available

send_event

gboolean
send_event (GstElement * element,
            GstEvent * event)

send a GstEvent to the element

Parameters:

element
No description available
event
No description available
Returns
No description available

vfunc_send_event

function vfunc_send_event(element: Gst.Element, event: Gst.Event): {
    // javascript implementation of the 'send_event' virtual method
}

send a Gst.Event to the element

Parameters:

element (Gst.Element)
No description available
event (Gst.Event)
No description available
Returns (Number)
No description available

do_send_event

def do_send_event (element, event):
    #python implementation of the 'send_event' virtual method

send a Gst.Event to the element

Parameters:

element (Gst.Element)
No description available
event (Gst.Event)
No description available
Returns (bool)
No description available

set_bus

set_bus (GstElement * element,
         GstBus * bus)

set a GstBus on the element

Parameters:

element
No description available
bus
No description available

vfunc_set_bus

function vfunc_set_bus(element: Gst.Element, bus: Gst.Bus): {
    // javascript implementation of the 'set_bus' virtual method
}

set a Gst.Bus on the element

Parameters:

element (Gst.Element)
No description available
bus (Gst.Bus)
No description available

do_set_bus

def do_set_bus (element, bus):
    #python implementation of the 'set_bus' virtual method

set a Gst.Bus on the element

Parameters:

element (Gst.Element)
No description available
bus (Gst.Bus)
No description available

set_clock

gboolean
set_clock (GstElement * element,
           GstClock * clock)

set the GstClock on the element

Parameters:

element
No description available
clock
No description available
Returns
No description available

vfunc_set_clock

function vfunc_set_clock(element: Gst.Element, clock: Gst.Clock): {
    // javascript implementation of the 'set_clock' virtual method
}

set the Gst.Clock on the element

Parameters:

element (Gst.Element)
No description available
clock (Gst.Clock)
No description available
Returns (Number)
No description available

do_set_clock

def do_set_clock (element, clock):
    #python implementation of the 'set_clock' virtual method

set the Gst.Clock on the element

Parameters:

element (Gst.Element)
No description available
clock (Gst.Clock)
No description available
Returns (bool)
No description available

set_context

set_context (GstElement * element,
             GstContext * context)

set a GstContext on the element

Parameters:

element
No description available
context
No description available

vfunc_set_context

function vfunc_set_context(element: Gst.Element, context: Gst.Context): {
    // javascript implementation of the 'set_context' virtual method
}

set a Gst.Context on the element

Parameters:

element (Gst.Element)
No description available
context (Gst.Context)
No description available

do_set_context

def do_set_context (element, context):
    #python implementation of the 'set_context' virtual method

set a Gst.Context on the element

Parameters:

element (Gst.Element)
No description available
context (Gst.Context)
No description available

set_state

GstStateChangeReturn
set_state (GstElement * element,
           GstState state)

set a new state on the element

Parameters:

element
No description available
state
No description available
Returns
No description available

vfunc_set_state

function vfunc_set_state(element: Gst.Element, state: Gst.State): {
    // javascript implementation of the 'set_state' virtual method
}

set a new state on the element

Parameters:

element (Gst.Element)
No description available
state (Gst.State)
No description available
Returns (Gst.StateChangeReturn)
No description available

do_set_state

def do_set_state (element, state):
    #python implementation of the 'set_state' virtual method

set a new state on the element

Parameters:

element (Gst.Element)
No description available
state (Gst.State)
No description available
Returns (Gst.StateChangeReturn)
No description available

state_changed

state_changed (GstElement * element,
               GstState oldstate,
               GstState newstate,
               GstState pending)

called immediately after a new state was set.

Parameters:

element
No description available
oldstate
No description available
newstate
No description available
pending
No description available

vfunc_state_changed

function vfunc_state_changed(element: Gst.Element, oldstate: Gst.State, newstate: Gst.State, pending: Gst.State): {
    // javascript implementation of the 'state_changed' virtual method
}

called immediately after a new state was set.

Parameters:

element (Gst.Element)
No description available
oldstate (Gst.State)
No description available
newstate (Gst.State)
No description available
pending (Gst.State)
No description available

do_state_changed

def do_state_changed (element, oldstate, newstate, pending):
    #python implementation of the 'state_changed' virtual method

called immediately after a new state was set.

Parameters:

element (Gst.Element)
No description available
oldstate (Gst.State)
No description available
newstate (Gst.State)
No description available
pending (Gst.State)
No description available

Functions

gst_make_element_message_details

GstStructure *
gst_make_element_message_details (const char* name,
                                  ... ...)

Create a GstStructure to be used with gst_element_message_full_with_details. NULL terminator required.

Parameters:

name

Name of the first field to set

...

variable arguments in the same form as GstStructure

Returns
No description available

Since : 1.10


Function Macros

GST_ELEMENT_BUS

#define GST_ELEMENT_BUS(elem)                   (GST_ELEMENT_CAST(elem)->bus)

Get the message bus of this element. This is not thread-safe by default (i.e. you will have to make sure the object lock is taken yourself). If in doubt use gst_element_get_bus instead.

Parameters:

elem

A GstElement to query


GST_ELEMENT_CAST

#define GST_ELEMENT_CAST(obj)           ((GstElement*)(obj))

GST_ELEMENT_CLOCK

#define GST_ELEMENT_CLOCK(elem)                 (GST_ELEMENT_CAST(elem)->clock)

Get the clock of this element.This is not thread-safe by default (i.e. you will have to make sure it is safe yourself). If in doubt use gst_element_get_clock instead.

Parameters:

elem

A GstElement to query


GST_ELEMENT_ERROR

#define GST_ELEMENT_ERROR(el,domain,code,text,debug)                    \
G_STMT_START {                                                          \
  gchar *__txt = _gst_element_error_printf text;                        \
  gchar *__dbg = _gst_element_error_printf debug;                       \
  if (__txt)                                                            \
    GST_WARNING_OBJECT (el, "error: %s", __txt);                        \
  if (__dbg)                                                            \
    GST_WARNING_OBJECT (el, "error: %s", __dbg);                        \
  gst_element_message_full (GST_ELEMENT(el),                            \
    GST_MESSAGE_ERROR, GST_ ## domain ## _ERROR,                        \
      GST_ ## domain ## _ERROR_ ## code, __txt, __dbg, __FILE__,        \
      GST_FUNCTION, __LINE__);                                          \
} G_STMT_END

Utility function that elements can use in case they encountered a fatal data processing error. The pipeline will post an error message and the application will be requested to stop further media processing.

Parameters:

el

the element that generates the error

domain

like CORE, LIBRARY, RESOURCE or STREAM (see GstGError)

code

error code defined for that domain (see GstGError)

text

the message to display (format string and args enclosed in parentheses)

debug

debugging information for the message (format string and args enclosed in parentheses)


GST_ELEMENT_ERROR_WITH_DETAILS

#define GST_ELEMENT_ERROR_WITH_DETAILS(el,domain,code,text,debug,args)  \
G_STMT_START {                                                          \
  gchar *__txt = _gst_element_error_printf text;                        \
  gchar *__dbg = _gst_element_error_printf debug;                       \
  if (__txt)                                                            \
    GST_WARNING_OBJECT (el, "error: %s", __txt);                        \
  if (__dbg)                                                            \
    GST_WARNING_OBJECT (el, "error: %s", __dbg);                        \
  gst_element_message_full_with_details (GST_ELEMENT(el),               \
    GST_MESSAGE_ERROR, GST_ ## domain ## _ERROR,                        \
      GST_ ## domain ## _ERROR_ ## code, __txt, __dbg, __FILE__,        \
      GST_FUNCTION, __LINE__, GST_ELEMENT_MESSAGE_MAKE_DETAILS(args));  \
} G_STMT_END

Utility function that elements can use in case they encountered a fatal data processing error. The pipeline will post an error message and the application will be requested to stop further media processing.

Parameters:

el

the element that generates the error

domain

like CORE, LIBRARY, RESOURCE or STREAM (see GstGError)

code

error code defined for that domain (see GstGError)

text

the message to display (format string and args enclosed in parentheses)

debug

debugging information for the message (format string and args enclosed in parentheses)

args

optional name, type, value triplets, which will be stored in the associated GstStructure. NULL terminator required. Must be enclosed within parentheses.

Since : 1.10


GST_ELEMENT_FLOW_ERROR

#define GST_ELEMENT_FLOW_ERROR(el,flow_return)  \
G_STMT_START {                                                          \
  GST_ELEMENT_ERROR_WITH_DETAILS (el, STREAM, FAILED, \
      ("Internal data stream error."), \
      ("streaming stopped, reason %s (%d)", gst_flow_get_name (flow_return), flow_return), \
      ("flow-return", G_TYPE_INT, flow_return, NULL));\
} G_STMT_END

Utility function that elements can use in case they encountered a fatal data processing error due to wrong flow processing.

Parameters:

el

the element that generates the error

flow_return

the GstFlowReturn leading to that ERROR message

Since : 1.10


GST_ELEMENT_INFO

#define GST_ELEMENT_INFO(el, domain, code, text, debug)                 \
G_STMT_START {                                                          \
  gchar *__txt = _gst_element_error_printf text;                        \
  gchar *__dbg = _gst_element_error_printf debug;                       \
  if (__txt)                                                            \
    GST_INFO_OBJECT (el, "info: %s", __txt);                            \
  if (__dbg)                                                            \
    GST_INFO_OBJECT (el, "info: %s", __dbg);                            \
  gst_element_message_full (GST_ELEMENT(el),                            \
    GST_MESSAGE_INFO, GST_ ## domain ## _ERROR,                         \
    GST_ ## domain ## _ERROR_ ## code, __txt, __dbg, __FILE__,          \
    GST_FUNCTION, __LINE__);                                            \
} G_STMT_END

Utility function that elements can use in case they want to inform the application of something noteworthy that is not an error. The pipeline will post a info message and the application will be informed.

Parameters:

el

the element that generates the information

domain

like CORE, LIBRARY, RESOURCE or STREAM (see GstGError)

code

error code defined for that domain (see GstGError)

text

the message to display (format string and args enclosed in parentheses)

debug

debugging information for the message (format string and args enclosed in parentheses)


GST_ELEMENT_INFO_WITH_DETAILS

#define GST_ELEMENT_INFO_WITH_DETAILS(el, domain, code, text, debug, args)   \
G_STMT_START {                                                          \
  gchar *__txt = _gst_element_error_printf text;                        \
  gchar *__dbg = _gst_element_error_printf debug;                       \
  if (__txt)                                                            \
    GST_INFO_OBJECT (el, "info: %s", __txt);                            \
  if (__dbg)                                                            \
    GST_INFO_OBJECT (el, "info: %s", __dbg);                            \
  gst_element_message_full_with_details (GST_ELEMENT(el),               \
    GST_MESSAGE_INFO, GST_ ## domain ## _ERROR,                         \
    GST_ ## domain ## _ERROR_ ## code, __txt, __dbg, __FILE__,          \
    GST_FUNCTION, __LINE__, GST_ELEMENT_MESSAGE_MAKE_DETAILS(args));    \
} G_STMT_END

Utility function that elements can use in case they want to inform the application of something noteworthy that is not an error. The pipeline will post a info message and the application will be informed. Optional name, type, value triplets may be supplied, and will be stored in the associated GstStructure. NULL terminator required.

Parameters:

el

the element that generates the information

domain

like CORE, LIBRARY, RESOURCE or STREAM (see GstGError)

code

error code defined for that domain (see GstGError)

text

the message to display (format string and args enclosed in parentheses)

debug

debugging information for the message (format string and args enclosed in parentheses)

args

optional name, type, value triplets, which will be stored in the associated GstStructure. NULL terminator required. Must be enclosed within parentheses.

Since : 1.10


GST_ELEMENT_IS_LOCKED_STATE

#define GST_ELEMENT_IS_LOCKED_STATE(elem)        (GST_OBJECT_FLAG_IS_SET(elem,GST_ELEMENT_FLAG_LOCKED_STATE))

Check if the element is in the locked state and therefore will ignore state changes from its parent object.

Parameters:

elem

A GstElement to query


GST_ELEMENT_MESSAGE_MAKE_DETAILS

#define GST_ELEMENT_MESSAGE_MAKE_DETAILS(args) gst_make_element_message_details args

GST_ELEMENT_NAME

#define GST_ELEMENT_NAME(elem)                  (GST_OBJECT_NAME(elem))

Gets the name of this element. This is not thread-safe by default (i.e. you will have to make sure the object lock is taken yourself). If in doubt use gst_element_get_name instead.

Parameters:

elem

A GstElement to query


GST_ELEMENT_PADS

#define GST_ELEMENT_PADS(elem)                  (GST_ELEMENT_CAST(elem)->pads)

Get the pads of this elements.

Parameters:

elem

A GstElement to query


GST_ELEMENT_PARENT

#define GST_ELEMENT_PARENT(elem)                (GST_ELEMENT_CAST(GST_OBJECT_PARENT(elem)))

Get the parent object of this element. This is not thread-safe by default (i.e. you will have to make sure the object lock is taken yourself). If in doubt use gst_object_get_parent instead.

Parameters:

elem

A GstElement to query


GST_ELEMENT_REGISTER

#define GST_ELEMENT_REGISTER(element, plugin) G_PASTE(gst_element_register_, element) (plugin)

This macro can be used to register an element into a GstPlugin. This method will be usually called in the plugin init function but can also be called with a NULL plugin, for example with a static registration of the element. It has to be used in combination with GST_ELEMENT_REGISTER_DECLARE.

GstPlugin* plugin;

...

GST_ELEMENT_REGISTER (stream_filter, plugin);

Parameters:

element

The element name in lower case, with words separated by '_'.

plugin

The GstPlugin where to register the element.

Since : 1.20


GST_ELEMENT_REGISTER_DECLARE

#define GST_ELEMENT_REGISTER_DECLARE(element) \
G_BEGIN_DECLS \
gboolean G_PASTE(gst_element_register_, element) (GstPlugin * plugin); \
G_END_DECLS

This macro can be used to declare a new element. It has to be used in combination with GST_ELEMENT_REGISTER_DEFINE macros and must be placed outside any block to declare the element registration function. As an example, you may declare the element named "stream-filter" with the namespace my as following:

GST_ELEMENT_REGISTER_DECLARE (stream_filter)

Parameters:

element

The element name in lower case, with words separated by '_'.

Since : 1.20


GST_ELEMENT_REGISTER_DEFINE

#define GST_ELEMENT_REGISTER_DEFINE(e, e_n, r, t) _GST_ELEMENT_REGISTER_DEFINE_BEGIN(e) _GST_ELEMENT_REGISTER_DEFINE_END(e_n, r, t)

A convenience macro to define the entry point of an element gst_element_register_*(GstPlugin* plugin). As an example, you may define the element named "streamer-filter" with the namespace my as following:

GST_ELEMENT_REGISTER_REGISTER_DEFINE (stream_filter, "stream-filter", GST_RANK_PRIMARY, MY_TYPE_STREAM_FILTER)

Parameters:

e

The element name in lower case, with words separated by '_'. Used to generate gst_element_register_*(GstPlugin* plugin).

e_n

The public name of the element

r

The GstRank of the element (higher rank means more importance when autoplugging, see GstRank)

t

The GType of the element.

Since : 1.20


GST_ELEMENT_REGISTER_DEFINE_CUSTOM

#define GST_ELEMENT_REGISTER_DEFINE_CUSTOM(element, register_func) \
G_BEGIN_DECLS \
gboolean G_PASTE (gst_element_register_, element) (GstPlugin * plugin) \
{ \
  return register_func (plugin); \
} \
G_END_DECLS

A convenience macro to define the entry point of an element gst_element_register_*(GstPlugin* plugin) which uses register_func as the main registration method for the element. As an example, you may define the element named "streamer-filter" with the namespace my as following using element_register_custom:

GST_ELEMENT_REGISTER_DEFINE_CUSTOM (my_element, element_register_custom)

Parameters:

element

The element name in lower case, with words separated by '_'. Used to generate gst_element_register_*(GstPlugin* plugin).

register_func

pointer to a method with the format: gboolean register_func (GstPlugin* plugin);

Since : 1.20


GST_ELEMENT_REGISTER_DEFINE_WITH_CODE

#define GST_ELEMENT_REGISTER_DEFINE_WITH_CODE(e, e_n, r, t, _c_) _GST_ELEMENT_REGISTER_DEFINE_BEGIN(e) {_c_;} _GST_ELEMENT_REGISTER_DEFINE_END(e_n, r, t)

A convenience macro to define the entry point of an element gst_element_register_*(GstPlugin* plugin) executing code before gst_element_register in gst_element_register_*(GstPlugin* plugin).

As an example, you may define the element named "stream-filter" with the namespace my as following:

#define _pre_register_init \
  my_stream_filter_pre_register (plugin);
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (stream_filter, "stream-filter", GST_RANK_PRIMARY, MY_TYPE_STREAM_FILTER, _pre_register_init)

Parameters:

e

The element name in lower case, with words separated by '_'. Used to generate gst_element_register_*(GstPlugin* plugin).

e_n

The public name of the element

r

The GstRank of the element (higher rank means more importance when autoplugging, see GstRank)

t

The GType of the element.

_c_

Custom code that gets inserted in the gst_element_register_*() function.

Since : 1.20


GST_ELEMENT_START_TIME

#define GST_ELEMENT_START_TIME(elem)            (GST_ELEMENT_CAST(elem)->start_time)

This macro returns the start_time of the elem. The start_time is the running_time of the pipeline when the element went to PAUSED.

Parameters:

elem

a GstElement to return the start time for.


GST_ELEMENT_WARNING

#define GST_ELEMENT_WARNING(el, domain, code, text, debug)              \
G_STMT_START {                                                          \
  gchar *__txt = _gst_element_error_printf text;                        \
  gchar *__dbg = _gst_element_error_printf debug;                       \
  if (__txt)                                                            \
    GST_WARNING_OBJECT (el, "warning: %s", __txt);                      \
  if (__dbg)                                                            \
    GST_WARNING_OBJECT (el, "warning: %s", __dbg);                      \
  gst_element_message_full (GST_ELEMENT(el),                            \
    GST_MESSAGE_WARNING, GST_ ## domain ## _ERROR,                      \
    GST_ ## domain ## _ERROR_ ## code, __txt, __dbg, __FILE__,          \
    GST_FUNCTION, __LINE__);                                            \
} G_STMT_END

Utility function that elements can use in case they encountered a non-fatal data processing problem. The pipeline will post a warning message and the application will be informed.

Parameters:

el

the element that generates the warning

domain

like CORE, LIBRARY, RESOURCE or STREAM (see GstGError)

code

error code defined for that domain (see GstGError)

text

the message to display (format string and args enclosed in parentheses)

debug

debugging information for the message (format string and args enclosed in parentheses)


GST_ELEMENT_WARNING_WITH_DETAILS

#define GST_ELEMENT_WARNING_WITH_DETAILS(el, domain, code, text, debug, args)\
G_STMT_START {                                                          \
  gchar *__txt = _gst_element_error_printf text;                        \
  gchar *__dbg = _gst_element_error_printf debug;                       \
  if (__txt)                                                            \
    GST_WARNING_OBJECT (el, "warning: %s", __txt);                      \
  if (__dbg)                                                            \
    GST_WARNING_OBJECT (el, "warning: %s", __dbg);                      \
  gst_element_message_full_with_details (GST_ELEMENT(el),               \
    GST_MESSAGE_WARNING, GST_ ## domain ## _ERROR,                      \
    GST_ ## domain ## _ERROR_ ## code, __txt, __dbg, __FILE__,          \
    GST_FUNCTION, __LINE__, GST_ELEMENT_MESSAGE_MAKE_DETAILS(args));    \
} G_STMT_END

Utility function that elements can use in case they encountered a non-fatal data processing problem. The pipeline will post a warning message and the application will be informed.

Parameters:

el

the element that generates the warning

domain

like CORE, LIBRARY, RESOURCE or STREAM (see GstGError)

code

error code defined for that domain (see GstGError)

text

the message to display (format string and args enclosed in parentheses)

debug

debugging information for the message (format string and args enclosed in parentheses)

args

optional name, type, value triplets, which will be stored in the associated GstStructure. NULL terminator required. Must be enclosed within parentheses.

Since : 1.10


GST_STATE

#define GST_STATE(elem)                 (GST_ELEMENT_CAST(elem)->current_state)

This macro returns the current GstState of the element.

Parameters:

elem

a GstElement to return state for.


GST_STATE_BROADCAST

#define GST_STATE_BROADCAST(elem)              g_cond_broadcast (GST_STATE_GET_COND (elem));

GST_STATE_GET_COND

#define GST_STATE_GET_COND(elem)               (&GST_ELEMENT_CAST(elem)->state_cond)

Get the conditional used to signal the completion of a state change.

Parameters:

elem

a GstElement


GST_STATE_GET_LOCK

#define GST_STATE_GET_LOCK(elem)               (&(GST_ELEMENT_CAST(elem)->state_lock))

Get a reference to the state lock of elem. This lock is used by the core. It is taken while getting or setting the state, during state changes, and while finalizing.

Parameters:

elem

a GstElement


GST_STATE_GET_NEXT

#define GST_STATE_GET_NEXT(cur,pending)         ((GstState)((cur) + __GST_SIGN ((gint)(pending) - (gint)(cur))))

Given a current state cur and a target state pending, calculate the next (intermediate) GstState.

Parameters:

cur

A starting GstState

pending

A target GstState


GST_STATE_LOCK

#define GST_STATE_LOCK(elem)                   g_rec_mutex_lock(GST_STATE_GET_LOCK(elem))

GST_STATE_NEXT

#define GST_STATE_NEXT(elem)            (GST_ELEMENT_CAST(elem)->next_state)

This macro returns the next GstState of the element.

Parameters:

elem

a GstElement to return the next state for.


GST_STATE_PENDING

#define GST_STATE_PENDING(elem)         (GST_ELEMENT_CAST(elem)->pending_state)

This macro returns the currently pending GstState of the element.

Parameters:

elem

a GstElement to return the pending state for.


GST_STATE_RETURN

#define GST_STATE_RETURN(elem)          (GST_ELEMENT_CAST(elem)->last_return)

This macro returns the last GstStateChangeReturn value.

Parameters:

elem

a GstElement to return the last state result for.


GST_STATE_SIGNAL

#define GST_STATE_SIGNAL(elem)                 g_cond_signal (GST_STATE_GET_COND (elem));

GST_STATE_TARGET

#define GST_STATE_TARGET(elem)          (GST_ELEMENT_CAST(elem)->target_state)

This macro returns the target GstState of the element.

Parameters:

elem

a GstElement to return the target state for.


GST_STATE_TRANSITION

#define GST_STATE_TRANSITION(cur,next)          ((GstStateChange)(((cur)<<3)|(next)))

Given a current state cur and a next state next, calculate the associated GstStateChange transition.

Parameters:

cur

A current state

next

A next state


GST_STATE_TRANSITION_CURRENT

#define GST_STATE_TRANSITION_CURRENT(trans)     ((GstState)((trans)>>3))

Given a state transition trans, extract the current GstState.

Parameters:

trans

A GstStateChange


GST_STATE_TRANSITION_NEXT

#define GST_STATE_TRANSITION_NEXT(trans)        ((GstState)((trans)&0x7))

Given a state transition trans, extract the next GstState.

Parameters:

trans

A GstStateChange


GST_STATE_TRYLOCK

#define GST_STATE_TRYLOCK(elem)                g_rec_mutex_trylock(GST_STATE_GET_LOCK(elem))

GST_STATE_UNLOCK

#define GST_STATE_UNLOCK(elem)                 g_rec_mutex_unlock(GST_STATE_GET_LOCK(elem))

GST_STATE_WAIT

#define GST_STATE_WAIT(elem)                   g_cond_wait (GST_STATE_GET_COND (elem), \
                                                        GST_OBJECT_GET_LOCK (elem))

GST_STATE_WAIT_UNTIL

#define GST_STATE_WAIT_UNTIL(elem, end_time)   g_cond_wait_until (GST_STATE_GET_COND (elem), \
                                                        GST_OBJECT_GET_LOCK (elem), end_time)

__GST_SIGN

#define __GST_SIGN(val)                 ((val) < 0 ? -1 : ((val) > 0 ? 1 : 0))

gst_element_get_name

#define gst_element_get_name(elem)      gst_object_get_name(GST_OBJECT_CAST(elem))

Returns a copy of the name of elem. Caller should g_free the return value after usage. For a nameless element, this returns NULL, which you can safely g_free as well.

Parameters:

elem

a GstElement to get the name of elem.

Returns ( [transfer: full][nullable])

the name of elem. g_free after usage. MT safe.


gst_element_get_parent

#define gst_element_get_parent(elem)    gst_object_get_parent(GST_OBJECT_CAST(elem))

Get the parent of an element.

Parameters:

elem

a GstElement to get the parent of.

Returns ( [transfer: full])

the parent of an element.


gst_element_set_name

#define gst_element_set_name(elem,name) gst_object_set_name(GST_OBJECT_CAST(elem),name)

Sets the name of the element, getting rid of the old name if there was one.

Parameters:

elem

a GstElement to set the name of.

name

the new name


gst_element_set_parent

#define gst_element_set_parent(elem,parent)     gst_object_set_parent(GST_OBJECT_CAST(elem),parent)

Sets the parent of an element.

Parameters:

elem

a GstElement to set the parent of.

parent

the new parent GstObject of the element.


Enumerations

GstElementFlags

The standard flags that an element may have.

Members
GST_ELEMENT_FLAG_LOCKED_STATE (16) –

ignore state changes from parent

GST_ELEMENT_FLAG_SINK (32) –

the element is a sink

GST_ELEMENT_FLAG_SOURCE (64) –

the element is a source.

GST_ELEMENT_FLAG_PROVIDE_CLOCK (128) –

the element can provide a clock

GST_ELEMENT_FLAG_REQUIRE_CLOCK (256) –

the element requires a clock

GST_ELEMENT_FLAG_INDEXABLE (512) –

the element can use an index

GST_ELEMENT_FLAG_LAST (16384) –

offset to define more flags


Gst.ElementFlags

The standard flags that an element may have.

Members
Gst.ElementFlags.LOCKED_STATE (16) –

ignore state changes from parent

Gst.ElementFlags.SINK (32) –

the element is a sink

Gst.ElementFlags.SOURCE (64) –

the element is a source.

Gst.ElementFlags.PROVIDE_CLOCK (128) –

the element can provide a clock

Gst.ElementFlags.REQUIRE_CLOCK (256) –

the element requires a clock

Gst.ElementFlags.INDEXABLE (512) –

the element can use an index

Gst.ElementFlags.LAST (16384) –

offset to define more flags


Gst.ElementFlags

The standard flags that an element may have.

Members
Gst.ElementFlags.LOCKED_STATE (16) –

ignore state changes from parent

Gst.ElementFlags.SINK (32) –

the element is a sink

Gst.ElementFlags.SOURCE (64) –

the element is a source.

Gst.ElementFlags.PROVIDE_CLOCK (128) –

the element can provide a clock

Gst.ElementFlags.REQUIRE_CLOCK (256) –

the element requires a clock

Gst.ElementFlags.INDEXABLE (512) –

the element can use an index

Gst.ElementFlags.LAST (16384) –

offset to define more flags


GstState

The possible states an element can be in. States can be changed using gst_element_set_state and checked using gst_element_get_state.

Members
GST_STATE_VOID_PENDING (0) –

no pending state.

GST_STATE_NULL (1) –

the NULL state or initial state of an element.

GST_STATE_READY (2) –

the element is ready to go to PAUSED.

GST_STATE_PAUSED (3) –

the element is PAUSED, it is ready to accept and process data. Sink elements however only accept one buffer and then block.

GST_STATE_PLAYING (4) –

the element is PLAYING, the GstClock is running and the data is flowing.


Gst.State

The possible states an element can be in. States can be changed using Gst.Element.prototype.set_state and checked using Gst.Element.prototype.get_state.

Members
Gst.State.VOID_PENDING (0) –

no pending state.

Gst.State.NULL (1) –

the NULL state or initial state of an element.

Gst.State.READY (2) –

the element is ready to go to PAUSED.

Gst.State.PAUSED (3) –

the element is PAUSED, it is ready to accept and process data. Sink elements however only accept one buffer and then block.

Gst.State.PLAYING (4) –

the element is PLAYING, the Gst.Clock is running and the data is flowing.


Gst.State

The possible states an element can be in. States can be changed using Gst.Element.set_state and checked using Gst.Element.get_state.

Members
Gst.State.VOID_PENDING (0) –

no pending state.

Gst.State.NULL (1) –

the NULL state or initial state of an element.

Gst.State.READY (2) –

the element is ready to go to PAUSED.

Gst.State.PAUSED (3) –

the element is PAUSED, it is ready to accept and process data. Sink elements however only accept one buffer and then block.

Gst.State.PLAYING (4) –

the element is PLAYING, the Gst.Clock is running and the data is flowing.


GstStateChange

These are the different state changes an element goes through. GST_STATE_NULLGST_STATE_PLAYING is called an upwards state change and GST_STATE_PLAYINGGST_STATE_NULL a downwards state change.

Members
GST_STATE_CHANGE_NULL_TO_READY (10) –

state change from NULL to READY.

  • The element must check if the resources it needs are available. Device sinks and -sources typically try to probe the device to constrain their caps.
  • The element opens the device (in case feature need to be probed).
GST_STATE_CHANGE_READY_TO_PAUSED (19) –

state change from READY to PAUSED.

  • The element pads are activated in order to receive data in PAUSED. Streaming threads are started.
  • Some elements might need to return GST_STATE_CHANGE_ASYNC and complete the state change when they have enough information. It is a requirement for sinks to return GST_STATE_CHANGE_ASYNC and complete the state change when they receive the first buffer or GST_EVENT_EOS (preroll). Sinks also block the dataflow when in PAUSED.
  • A pipeline resets the running_time to 0.
  • Live sources return GST_STATE_CHANGE_NO_PREROLL and don't generate data.
GST_STATE_CHANGE_PAUSED_TO_PLAYING (28) –

state change from PAUSED to PLAYING.

  • Most elements ignore this state change.
  • The pipeline selects a GstClock and distributes this to all the children before setting them to PLAYING. This means that it is only allowed to synchronize on the GstClock in the PLAYING state.
  • The pipeline uses the GstClock and the running_time to calculate the base_time. The base_time is distributed to all children when performing the state change.
  • Sink elements stop blocking on the preroll buffer or event and start rendering the data.
  • Sinks can post GST_MESSAGE_EOS in the PLAYING state. It is not allowed to post GST_MESSAGE_EOS when not in the PLAYING state.
  • While streaming in PAUSED or PLAYING elements can create and remove sometimes pads.
  • Live sources start generating data and return GST_STATE_CHANGE_SUCCESS.
GST_STATE_CHANGE_PLAYING_TO_PAUSED (35) –

state change from PLAYING to PAUSED.

  • Most elements ignore this state change.
  • The pipeline calculates the running_time based on the last selected GstClock and the base_time. It stores this information to continue playback when going back to the PLAYING state.
  • Sinks unblock any GstClock wait calls.
  • When a sink does not have a pending buffer to play, it returns GST_STATE_CHANGE_ASYNC from this state change and completes the state change when it receives a new buffer or an GST_EVENT_EOS.
  • Any queued GST_MESSAGE_EOS items are removed since they will be reposted when going back to the PLAYING state. The EOS messages are queued in GstBin containers.
  • Live sources stop generating data and return GST_STATE_CHANGE_NO_PREROLL.
GST_STATE_CHANGE_PAUSED_TO_READY (26) –

state change from PAUSED to READY.

  • Sinks unblock any waits in the preroll.
  • Elements unblock any waits on devices
  • Chain or get_range functions return GST_FLOW_FLUSHING.
  • The element pads are deactivated so that streaming becomes impossible and all streaming threads are stopped.
  • The sink forgets all negotiated formats
  • Elements remove all sometimes pads
GST_STATE_CHANGE_READY_TO_NULL (17) –

state change from READY to NULL.

  • Elements close devices
  • Elements reset any internal state.
GST_STATE_CHANGE_NULL_TO_NULL (9) –

state change from NULL to NULL. (Since: 1.14)

GST_STATE_CHANGE_READY_TO_READY (18) –

state change from READY to READY, This might happen when going to PAUSED asynchronously failed, in that case elements should make sure they are in a proper, coherent READY state. (Since: 1.14)

GST_STATE_CHANGE_PAUSED_TO_PAUSED (27) –

state change from PAUSED to PAUSED. This might happen when elements were in PLAYING state and 'lost state', they should make sure to go back to real 'PAUSED' state (prerolling for example). (Since: 1.14)

GST_STATE_CHANGE_PLAYING_TO_PLAYING (36) –

state change from PLAYING to PLAYING. (Since: 1.14)


Gst.StateChange

These are the different state changes an element goes through. Gst.State.NULLGst.State.PLAYING is called an upwards state change and Gst.State.PLAYINGGst.State.NULL a downwards state change.

Members
Gst.StateChange.NULL_TO_READY (10) –

state change from NULL to READY.

  • The element must check if the resources it needs are available. Device sinks and -sources typically try to probe the device to constrain their caps.
  • The element opens the device (in case feature need to be probed).
Gst.StateChange.READY_TO_PAUSED (19) –

state change from READY to PAUSED.

  • The element pads are activated in order to receive data in PAUSED. Streaming threads are started.
  • Some elements might need to return Gst.StateChangeReturn.ASYNC and complete the state change when they have enough information. It is a requirement for sinks to return Gst.StateChangeReturn.ASYNC and complete the state change when they receive the first buffer or Gst.EventType.EOS (preroll). Sinks also block the dataflow when in PAUSED.
  • A pipeline resets the running_time to 0.
  • Live sources return Gst.StateChangeReturn.NO_PREROLL and don't generate data.
Gst.StateChange.PAUSED_TO_PLAYING (28) –

state change from PAUSED to PLAYING.

  • Most elements ignore this state change.
  • The pipeline selects a Gst.Clock and distributes this to all the children before setting them to PLAYING. This means that it is only allowed to synchronize on the Gst.Clock in the PLAYING state.
  • The pipeline uses the Gst.Clock and the running_time to calculate the base_time. The base_time is distributed to all children when performing the state change.
  • Sink elements stop blocking on the preroll buffer or event and start rendering the data.
  • Sinks can post Gst.MessageType.EOS in the PLAYING state. It is not allowed to post Gst.MessageType.EOS when not in the PLAYING state.
  • While streaming in PAUSED or PLAYING elements can create and remove sometimes pads.
  • Live sources start generating data and return Gst.StateChangeReturn.SUCCESS.
Gst.StateChange.PLAYING_TO_PAUSED (35) –

state change from PLAYING to PAUSED.

  • Most elements ignore this state change.
  • The pipeline calculates the running_time based on the last selected Gst.Clock and the base_time. It stores this information to continue playback when going back to the PLAYING state.
  • Sinks unblock any Gst.Clock wait calls.
  • When a sink does not have a pending buffer to play, it returns Gst.StateChangeReturn.ASYNC from this state change and completes the state change when it receives a new buffer or an Gst.EventType.EOS.
  • Any queued Gst.MessageType.EOS items are removed since they will be reposted when going back to the PLAYING state. The EOS messages are queued in Gst.Bin containers.
  • Live sources stop generating data and return Gst.StateChangeReturn.NO_PREROLL.
Gst.StateChange.PAUSED_TO_READY (26) –

state change from PAUSED to READY.

  • Sinks unblock any waits in the preroll.
  • Elements unblock any waits on devices
  • Chain or get_range functions return Gst.FlowReturn.FLUSHING.
  • The element pads are deactivated so that streaming becomes impossible and all streaming threads are stopped.
  • The sink forgets all negotiated formats
  • Elements remove all sometimes pads
Gst.StateChange.READY_TO_NULL (17) –

state change from READY to NULL.

  • Elements close devices
  • Elements reset any internal state.
Gst.StateChange.NULL_TO_NULL (9) –

state change from NULL to NULL. (Since: 1.14)

Gst.StateChange.READY_TO_READY (18) –

state change from READY to READY, This might happen when going to PAUSED asynchronously failed, in that case elements should make sure they are in a proper, coherent READY state. (Since: 1.14)

Gst.StateChange.PAUSED_TO_PAUSED (27) –

state change from PAUSED to PAUSED. This might happen when elements were in PLAYING state and 'lost state', they should make sure to go back to real 'PAUSED' state (prerolling for example). (Since: 1.14)

Gst.StateChange.PLAYING_TO_PLAYING (36) –

state change from PLAYING to PLAYING. (Since: 1.14)


Gst.StateChange

These are the different state changes an element goes through. Gst.State.NULLGst.State.PLAYING is called an upwards state change and Gst.State.PLAYINGGst.State.NULL a downwards state change.

Members
Gst.StateChange.NULL_TO_READY (10) –

state change from NULL to READY.

  • The element must check if the resources it needs are available. Device sinks and -sources typically try to probe the device to constrain their caps.
  • The element opens the device (in case feature need to be probed).
Gst.StateChange.READY_TO_PAUSED (19) –

state change from READY to PAUSED.

  • The element pads are activated in order to receive data in PAUSED. Streaming threads are started.
  • Some elements might need to return Gst.StateChangeReturn.ASYNC and complete the state change when they have enough information. It is a requirement for sinks to return Gst.StateChangeReturn.ASYNC and complete the state change when they receive the first buffer or Gst.EventType.EOS (preroll). Sinks also block the dataflow when in PAUSED.
  • A pipeline resets the running_time to 0.
  • Live sources return Gst.StateChangeReturn.NO_PREROLL and don't generate data.
Gst.StateChange.PAUSED_TO_PLAYING (28) –

state change from PAUSED to PLAYING.

  • Most elements ignore this state change.
  • The pipeline selects a Gst.Clock and distributes this to all the children before setting them to PLAYING. This means that it is only allowed to synchronize on the Gst.Clock in the PLAYING state.
  • The pipeline uses the Gst.Clock and the running_time to calculate the base_time. The base_time is distributed to all children when performing the state change.
  • Sink elements stop blocking on the preroll buffer or event and start rendering the data.
  • Sinks can post Gst.MessageType.EOS in the PLAYING state. It is not allowed to post Gst.MessageType.EOS when not in the PLAYING state.
  • While streaming in PAUSED or PLAYING elements can create and remove sometimes pads.
  • Live sources start generating data and return Gst.StateChangeReturn.SUCCESS.
Gst.StateChange.PLAYING_TO_PAUSED (35) –

state change from PLAYING to PAUSED.

  • Most elements ignore this state change.
  • The pipeline calculates the running_time based on the last selected Gst.Clock and the base_time. It stores this information to continue playback when going back to the PLAYING state.
  • Sinks unblock any Gst.Clock wait calls.
  • When a sink does not have a pending buffer to play, it returns Gst.StateChangeReturn.ASYNC from this state change and completes the state change when it receives a new buffer or an Gst.EventType.EOS.
  • Any queued Gst.MessageType.EOS items are removed since they will be reposted when going back to the PLAYING state. The EOS messages are queued in Gst.Bin containers.
  • Live sources stop generating data and return Gst.StateChangeReturn.NO_PREROLL.
Gst.StateChange.PAUSED_TO_READY (26) –

state change from PAUSED to READY.

  • Sinks unblock any waits in the preroll.
  • Elements unblock any waits on devices
  • Chain or get_range functions return Gst.FlowReturn.FLUSHING.
  • The element pads are deactivated so that streaming becomes impossible and all streaming threads are stopped.
  • The sink forgets all negotiated formats
  • Elements remove all sometimes pads
Gst.StateChange.READY_TO_NULL (17) –

state change from READY to NULL.

  • Elements close devices
  • Elements reset any internal state.
Gst.StateChange.NULL_TO_NULL (9) –

state change from NULL to NULL. (Since: 1.14)

Gst.StateChange.READY_TO_READY (18) –

state change from READY to READY, This might happen when going to PAUSED asynchronously failed, in that case elements should make sure they are in a proper, coherent READY state. (Since: 1.14)

Gst.StateChange.PAUSED_TO_PAUSED (27) –

state change from PAUSED to PAUSED. This might happen when elements were in PLAYING state and 'lost state', they should make sure to go back to real 'PAUSED' state (prerolling for example). (Since: 1.14)

Gst.StateChange.PLAYING_TO_PLAYING (36) –

state change from PLAYING to PLAYING. (Since: 1.14)


GstStateChangeReturn

The possible return values from a state change function such as gst_element_set_state. Only GST_STATE_CHANGE_FAILURE is a real failure.

Members
GST_STATE_CHANGE_FAILURE (0) –

the state change failed

GST_STATE_CHANGE_SUCCESS (1) –

the state change succeeded

GST_STATE_CHANGE_ASYNC (2) –

the state change will happen asynchronously

GST_STATE_CHANGE_NO_PREROLL (3) –

the state change succeeded but the element cannot produce data in GST_STATE_PAUSED. This typically happens with live sources.


Gst.StateChangeReturn

The possible return values from a state change function such as Gst.Element.prototype.set_state. Only GST_STATE_CHANGE_FAILURE is a real failure.

Members
Gst.StateChangeReturn.FAILURE (0) –

the state change failed

Gst.StateChangeReturn.SUCCESS (1) –

the state change succeeded

Gst.StateChangeReturn.ASYNC (2) –

the state change will happen asynchronously

Gst.StateChangeReturn.NO_PREROLL (3) –

the state change succeeded but the element cannot produce data in Gst.State.PAUSED. This typically happens with live sources.


Gst.StateChangeReturn

The possible return values from a state change function such as Gst.Element.set_state. Only GST_STATE_CHANGE_FAILURE is a real failure.

Members
Gst.StateChangeReturn.FAILURE (0) –

the state change failed

Gst.StateChangeReturn.SUCCESS (1) –

the state change succeeded

Gst.StateChangeReturn.ASYNC (2) –

the state change will happen asynchronously

Gst.StateChangeReturn.NO_PREROLL (3) –

the state change succeeded but the element cannot produce data in Gst.State.PAUSED. This typically happens with live sources.


Constants

GST_ELEMENT_METADATA_AUTHOR

#define GST_ELEMENT_METADATA_AUTHOR        "author"

Name and contact details of the author(s). Use \n to separate multiple author details. E.g: "Joe Bloggs <joe.blogs at foo.com>"


Gst.ELEMENT_METADATA_AUTHOR

Name and contact details of the author(s). Use \n to separate multiple author details. E.g: "Joe Bloggs <joe.blogs at foo.com>"


Gst.ELEMENT_METADATA_AUTHOR

Name and contact details of the author(s). Use \n to separate multiple author details. E.g: "Joe Bloggs <joe.blogs at foo.com>"


GST_ELEMENT_METADATA_DESCRIPTION

#define GST_ELEMENT_METADATA_DESCRIPTION   "description"

Sentence describing the purpose of the element. E.g: "Write stream to a file"


Gst.ELEMENT_METADATA_DESCRIPTION

Sentence describing the purpose of the element. E.g: "Write stream to a file"


Gst.ELEMENT_METADATA_DESCRIPTION

Sentence describing the purpose of the element. E.g: "Write stream to a file"


GST_ELEMENT_METADATA_DOC_URI

#define GST_ELEMENT_METADATA_DOC_URI       "doc-uri"

Set uri pointing to user documentation. Applications can use this to show help for e.g. effects to users.


Gst.ELEMENT_METADATA_DOC_URI

Set uri pointing to user documentation. Applications can use this to show help for e.g. effects to users.


Gst.ELEMENT_METADATA_DOC_URI

Set uri pointing to user documentation. Applications can use this to show help for e.g. effects to users.


GST_ELEMENT_METADATA_ICON_NAME

#define GST_ELEMENT_METADATA_ICON_NAME     "icon-name"

Elements that bridge to certain other products can include an icon of that used product. Application can show the icon in menus/selectors to help identifying specific elements.


Gst.ELEMENT_METADATA_ICON_NAME

Elements that bridge to certain other products can include an icon of that used product. Application can show the icon in menus/selectors to help identifying specific elements.


Gst.ELEMENT_METADATA_ICON_NAME

Elements that bridge to certain other products can include an icon of that used product. Application can show the icon in menus/selectors to help identifying specific elements.


GST_ELEMENT_METADATA_KLASS

#define GST_ELEMENT_METADATA_KLASS         "klass"

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"


Gst.ELEMENT_METADATA_KLASS

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"


Gst.ELEMENT_METADATA_KLASS

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"


GST_ELEMENT_METADATA_LONGNAME

#define GST_ELEMENT_METADATA_LONGNAME      "long-name"

The long English name of the element. E.g. "File Sink"


Gst.ELEMENT_METADATA_LONGNAME

The long English name of the element. E.g. "File Sink"


Gst.ELEMENT_METADATA_LONGNAME

The long English name of the element. E.g. "File Sink"


Callbacks

GstElementCallAsyncFunc

(*GstElementCallAsyncFunc) (GstElement * element,
                            gpointer user_data)

Callback prototype used in gst_element_call_async

Parameters:

element

The GstElement this function has been called against

user_data

Data passed in the function where that callback has been passed


Gst.ElementCallAsyncFunc

function Gst.ElementCallAsyncFunc(element: Gst.Element, user_data: Object): {
    // javascript wrapper for 'GstElementCallAsyncFunc'
}

Callback prototype used in Gst.Element.prototype.call_async

Parameters:

element (Gst.Element)

The Gst.Element this function has been called against

user_data (Object)

Data passed in the function where that callback has been passed


Gst.ElementCallAsyncFunc

def Gst.ElementCallAsyncFunc (element, *user_data):
    #python wrapper for 'GstElementCallAsyncFunc'

Callback prototype used in Gst.Element.call_async

Parameters:

element (Gst.Element)

The Gst.Element this function has been called against

user_data (variadic)

Data passed in the function where that callback has been passed


GstElementForeachPadFunc

gboolean
(*GstElementForeachPadFunc) (GstElement * element,
                             GstPad * pad,
                             gpointer user_data)

Function called for each pad when using gst_element_foreach_sink_pad, gst_element_foreach_src_pad, or gst_element_foreach_pad.

Parameters:

element

the GstElement

pad

a GstPad

user_data

user data passed to the foreach function

Returns

FALSE to stop iterating pads, TRUE to continue

Since : 1.14


Gst.ElementForeachPadFunc

function Gst.ElementForeachPadFunc(element: Gst.Element, pad: Gst.Pad, user_data: Object): {
    // javascript wrapper for 'GstElementForeachPadFunc'
}

Function called for each pad when using Gst.Element.prototype.foreach_sink_pad, Gst.Element.prototype.foreach_src_pad, or Gst.Element.prototype.foreach_pad.

Parameters:

element (Gst.Element)

the Gst.Element

pad (Gst.Pad)

a Gst.Pad

user_data (Object)

user data passed to the foreach function

Returns (Number)

false to stop iterating pads, true to continue

Since : 1.14


Gst.ElementForeachPadFunc

def Gst.ElementForeachPadFunc (element, pad, *user_data):
    #python wrapper for 'GstElementForeachPadFunc'

Function called for each pad when using Gst.Element.foreach_sink_pad, Gst.Element.foreach_src_pad, or Gst.Element.foreach_pad.

Parameters:

element (Gst.Element)

the Gst.Element

pad (Gst.Pad)

a Gst.Pad

user_data (variadic)

user data passed to the foreach function

Returns (bool)

False to stop iterating pads, True to continue

Since : 1.14


The results of the search are