Sets our main struct and passes it to the parent class.
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 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.
a new gstreamer.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 Element.setState or Element.syncStateWithParent.
a gstreamer.Pad has been removed from the element
Adds a pad (link point) to element. pad's parent will be set to element; see gst_object_set_parent() for refcounting information.
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 Element.setState or indirectly e.g. via SEEK events.
Set the caps property of an Element.
Perform transition on element.
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.
Creates a pad for each pad template that is always available. This function is only useful during object initialization of subclasses of gstreamer.Element
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.
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.
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.
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.
Returns the bus of the element. Note that only a gstreamer.Pipeline will provide a bus for the application.
Gets the currently configured clock of the element. This is the clock as was last set with Element.setClock.
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.
Retrieves a pad template from element that is compatible with compattempl. Pads from compatible templates can be linked together.
Gets the context with context_type set on the element or NULL.
Gets the context with context_type set on the element or NULL.
Gets the contexts set on the element.
Get the main Gtk struct
Retrieves the factory that was used to create this element.
Get metadata with key in klass.
Retrieves a padtemplate from element with the given name.
Retrieves a list of the pad templates associated with element. The list must not be modified by the calling code.
Retrieves a pad from the element by name (e.g. "src_\d"). This version only retrieves request pads. The pad should be released with Element.releaseRequestPad.
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.
Gets the state of the element.
Retrieves a pad from element by name. This version only retrieves already-existing (i.e. 'static') pads.
the main Gtk struct as a void*
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
Retrieves an iterator of element's pads. The iterator should be freed after usage. Also more specialized iterators exists such as Element.iterateSrcPads or Element.iterateSinkPads.
Retrieves an iterator of element's sink pads.
Retrieves an iterator of element's source pads.
Links src to dest. The link must be from source to destination; the other direction will not be tried. The function looks for existing pads that aren't linked yet. It will request new pads if necessary. Such pads need to be released manually when unlinking. If multiple links are possible, only one is established.
Links src to dest using the given caps as filtercaps. The link must be from source to destination; the other direction will not be tried. The function looks for existing pads that aren't linked yet. It will request new pads if necessary. If multiple links are possible, only one is established.
Links the two named pads of the source and destination elements. Side effect is that if one of the pads has no parent, it becomes a child of the parent of the other element. If they have different parents, the link fails.
Links the two named pads of the source and destination elements. Side effect is that if one of the pads has no parent, it becomes a child of the parent of the other element. If they have different parents, the link fails. If caps is not NULL, makes sure that the caps of the link is a subset of caps.
Links the two named pads of the source and destination elements. Side effect is that if one of the pads has no parent, it becomes a child of the parent of the other element. If they have different parents, the link fails.
This set's the filename for a filesrc 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 Element.getState will return GST_STATE_CHANGE_ASYNC.
Post an error, warning or info message on the bus from inside an element.
Post an error, warning or info message on the bus from inside an 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.
Get's all the pads from an element in a Pad[].
Post a message on the element's gstreamer.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.
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.
Performs a query on the given element.
Queries an element to convert src_val in src_format to dest_format.
Queries an element for the stream duration. This is a convenience function for gstreamerD.
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.
Queries an element for the stream position. This is a convenience function for gstreamerD.
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.
Makes the element free the previously requested pad as obtained with Element.requestPad.
Removes pad from element. pad will be destroyed if it has not been referenced elsewhere using gst_object_unparent().
Retrieves a request pad from the element according to the provided template. Pad templates can be looked up using Element.factoryGetStaticPadTemplates.
For your convenience in gstreamerD: you can seek to the position of the pipeline measured in time_nanoseconds.
Sends a seek event to an element. See Event.newSeek for the details of the parameters. The seek event is sent to the element using Element.sendEvent.
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 Element.seek.
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.
Set the base time of an element. See Element.getBaseTime.
Sets the bus of the element. Increases the refcount on the bus. For internal use only, unless you're testing elements.
Sets the clock for the element. This function increases the refcount on the clock. Any previously set clock on the object is unreffed.
Sets the context of the element. Increases the refcount of the context.
Locks the state of an element, so state changes of the parent don't affect this element anymore.
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.
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.
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.
Unlinks all source pads of the source element with all sink pads of the sink element to which they are linked.
Unlinks the two named pads of the source and destination elements.
Creates an element for handling the given URI.
Create a new elementfactory capable of instantiating objects of the type and add the factory to plugin.
Gets a string representing the given state change result.
Gets a string representing the given state.
the main Gtk struct
the main Gtk struct
Get the main Gtk struct
the main Gtk struct as a void*
Checks to see if there is any object named name in list. This function does not do any locking of any kind. You might want to protect the provided list with the lock of the owner of the list. This function will lock each GstObject in the list to compare the name, so be careful when passing a list with a locked object.
A default deep_notify signal callback for an object. The user data should contain a pointer to an array of strings that should be excluded from the notify. The default handler will print the new value of the property using g_print.
Increase the reference count of object, and possibly remove the floating reference, if object has a floating reference.
Atomically modifies a pointer to point to a new object. The reference count of oldobj is decreased and the reference count of newobj is increased.
Attach the gstreamer.ControlBinding to the object. If there already was a gstreamer.ControlBinding for this property it will be replaced.
A default error function that uses g_printerr() to display the error message and the optional debug string..
Gets the corresponding gstreamer.ControlBinding for the property. This should be unreferenced again after use.
Obtain the control-rate for this object. Audio processing gstreamer.Element objects will use this rate to sub-divide their processing loop and call gst_object_sync_values() in between. The length of the processing segment should be up to control-rate nanoseconds.
Gets a number of gobject.Values for the given controlled property starting at the requested time. The array values need to hold enough space for n_values of gobject.Value
Returns a copy of the name of object. Caller should g_free() the return value after usage. For a nameless object, this returns NULL, which you can safely g_free() as well.
Returns the parent of object. This function increases the refcount of the parent object so you should gst_object_unref() it after usage.
Generates a string describing the path of object in the object hierarchy. Only useful (or used) for debugging.
Gets the value for the given controlled property at the requested time.
Gets a number of values for the given controlled property starting at the requested time. The array values need to hold enough space for n_values of the same type as the objects property's type.
Check if the object has active controlled properties.
Check if object has an ancestor ancestor somewhere up in the hierarchy. One can e.g. check if a gstreamer.Element is inside a gstreamer.Pipeline
Check if object has an ancestor ancestor somewhere up in the hierarchy. One can e.g. check if a gstreamer.Element is inside a gstreamer.Pipeline
Check if parent is the parent of object. E.g. a gstreamer.Element can check if it owns a given gstreamer.Pad
Increments the reference count on object. This function does not take the lock on object because it relies on atomic refcounting.
Removes the corresponding gstreamer.ControlBinding If it was the last ref of the binding, it will be disposed.
This function is used to disable the control bindings on a property for some time, i.e. gst_object_sync_values() will do nothing for the property.
This function is used to disable all controlled properties of the object for some time, i.e. gst_object_sync_values() will do nothing.
Change the control-rate for this object. Audio processing gstreamer.Element objects will use this rate to sub-divide their processing loop and call gst_object_sync_values() in between. The length of the processing segment should be up to control-rate nanoseconds.
Sets the name of object, or gives object a guaranteed unique name (if name is NULL). This function makes a copy of the provided name, so the caller retains ownership of the name it sent.
Sets the parent of object to parent. The object's reference count will be incremented, and any floating reference will be removed (see gst_object_ref_sink()).
Returns a suggestion for timestamps where buffers should be split to get best controller results.
Sets the properties of the object, according to the gstreamer.ControlSources that (maybe) handle them and for the given timestamp.
Clear the parent of object, removing the associated reference. This function decreases the refcount of object.
Decrements the reference count on object. If reference count hits zero, destroy object. This function does not take the lock on object as it relies on atomic refcounting.
The deep notify signal is used to be notified of property changes. It is typically attached to the toplevel bin to receive notifications from all the elements contained in that bin.
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 gstreamer.Element subclasses.
The name of a gstreamer.Element can be get with Element.getName and set with Element.setName. 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 gstreamer.Pad). These pads link to pads on other elements. gstreamer.Buffer flow between these linked pads. A gstreamer.Element has a GList of gstreamer.Pad structures for all their input (or sink) and output (or source) pads. Core and plug-in writers can add and remove pads with Element.addPad and Element.removePad.
An existing pad of an element can be retrieved by name with Element.getStaticPad. A new dynamic pad can be created using Element.requestPad with a gstreamer.PadTemplate An iterator of all pads can be retrieved with Element.iteratePads.
Elements can be linked through their pads. If the link is straightforward, use the Element.link convenience function to link two elements, or Element.linkMany for more elements in a row. Use Element.linkFiltered to link two elements constrained by a specified set of gstreamer.Caps For finer control, use Element.linkPads and Element.linkPadsFiltered 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 Element.getState and Element.setState. Setting a state triggers a GstStateChange To get a string representation of a GstState, use Element.stateGetName.
You can get and set a gstreamer.Clock on an element using Element.getClock and Element.setClock. Some elements can provide a clock for the pipeline if the GST_ELEMENT_FLAG_PROVIDE_CLOCK flag is set. With the Element.provideClock 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|GST_ELEMENT_FLAG_REQUIRE_CLOCK flag is set, a clock should be set on the element with Element.setClock.
Note that clock selection and distribution is normally handled by the toplevel gstreamer.Pipeline so the clock functions are only to be used in very specific situations.