Pad

Description A GstElement is linked to other elements via "pads", which are extremely light-weight generic link points. After two pads are retrieved from an element with gst_element_get_pad(), the pads can be link with gst_pad_link(). (For quick links, you can also use gst_element_link(), which will make the obvious link for you if it's straightforward.) Pads are typically created from a GstPadTemplate with gst_pad_new_from_template(). Pads have GstCaps attached to it to describe the media type they are capable of dealing with. gst_pad_get_caps() and gst_pad_set_caps() are used to manipulate the caps of the pads. Pads created from a pad template cannot set capabilities that are incompatible with the pad template capabilities. Pads without pad templates can be created with gst_pad_new(), which takes a direction and a name as an argument. If the name is NULL, then a guaranteed unique name will be assigned to it. gst_pad_get_parent() will retrieve the GstElement that owns the pad. A GstElement creating a pad will typically use the various gst_pad_set_*_function() calls to register callbacks for various events on the pads. GstElements will use gst_pad_push() and gst_pad_pull_range() to push out or pull in a buffer. To send a GstEvent on a pad, use gst_pad_send_event() and gst_pad_push_event(). Last reviewed on 2006-07-06 (0.10.9)

class Pad : ObjectGst {}

Constructors

this
this(GstPad* gstPad)

Sets our main struct and passes it to the parent class

this
this(GObject* gstPad)

Sets our main struct and passes it to the parent class. This one is additional to make gstreamer.Element addOnPadAdded() working without changes.

this
this(string name, GstPadDirection direction)

Creates a new pad with the given name in the given direction. If name is NULL, a guaranteed unique name (across all pads) will be assigned. This function makes a copy of the name so you can safely free the name.

this
this(PadTemplate templ, string name)

Creates a new pad with the given name from the given template. If name is NULL, a guaranteed unique name (across all pads) will be assigned. This function makes a copy of the name so you can safely free the name.

this
this(GstStaticPadTemplate* templ, string name)

Creates a new pad with the given name from the given static template. If name is NULL, a guaranteed unique name (across all pads) will be assigned. This function makes a copy of the name so you can safely free the name.

Members

Functions

acceptCaps
int acceptCaps(Caps caps)

Check if the given pad accepts the caps.

activatePull
int activatePull(int active)

Activates or deactivates the given pad in pull mode via dispatching to the pad's activatepullfunc. For use from within pad activation functions only. When called on sink pads, will first proxy the call to the peer pad, which is expected to activate its internally linked pads from within its activate_pull function. If you don't know what this is, you probably don't want to call it.

activatePush
int activatePush(int active)

Activates or deactivates the given pad in push mode via dispatching to the pad's activatepushfunc. For use from within pad activation functions only. If you don't know what this is, you probably don't want to call it.

addBufferProbe
gulong addBufferProbe(GCallback handler, void* data)

Adds a probe that will be called for all buffers passing through a pad. See gst_pad_add_data_probe() for more information.

addDataProbe
gulong addDataProbe(GCallback handler, void* data)

Adds a "data probe" to a pad. This function will be called whenever data passes through a pad. In this case data means both events and buffers. The probe will be called with the data as an argument, meaning handler should have the same callback signature as the 'have-data' signal of GstPad. Note that the data will have a reference count greater than 1, so it will be immutable -- you must not change it. For source pads, the probe will be called after the blocking function, if any (see gst_pad_set_blocked_async()), but before looking up the peer to chain to. For sink pads, the probe function will be called before configuring the sink with new caps, if any, and before calling the pad's chain function. Your data probe should return TRUE to let the data continue to flow, or FALSE to drop it. Dropping data is rarely useful, but occasionally comes in handy with events. Although probes are implemented internally by connecting handler to the have-data signal on the pad, if you want to remove a probe it is insufficient to only call g_signal_handler_disconnect on the returned handler id. To remove a probe, use the appropriate function, such as gst_pad_remove_data_probe().

addEventProbe
gulong addEventProbe(GCallback handler, void* data)

Adds a probe that will be called for all events passing through a pad. See gst_pad_add_data_probe() for more information.

addOnHaveData
void addOnHaveData(bool delegate(MiniObject, Pad) dlg, ConnectFlags connectFlags)

Signals that new data is available on the pad. This signal is used internally for implementing pad probes. See gst_pad_add_*_probe functions.

addOnLinked
void addOnLinked(void delegate(Pad, Pad) dlg, ConnectFlags connectFlags)

Signals that a pad has been linked to the peer pad.

addOnRequestLink
void addOnRequestLink(void delegate(Pad) dlg, ConnectFlags connectFlags)

Signals that a pad connection has been requested.

addOnUnlinked
void addOnUnlinked(void delegate(Pad, Pad) dlg, ConnectFlags connectFlags)

Signals that a pad has been unlinked from the peer pad. See Also GstPadTemplate, GstElement, GstEvent

allocBuffer
GstFlowReturn allocBuffer(ulong offset, int size, Caps caps, Buffer buf)

Allocates a new, empty buffer optimized to push to pad pad. This function only works if pad is a source pad and has a peer. A new, empty GstBuffer will be put in the buf argument. You need to check the caps of the buffer after performing this function and renegotiate to the format if needed.

allocBufferAndSetCaps
GstFlowReturn allocBufferAndSetCaps(ulong offset, int size, Caps caps, Buffer buf)

In addition to the function gst_pad_alloc_buffer(), this function automatically calls gst_pad_set_caps() when the caps of the newly allocated buffer are different from the pad caps.

canLink
int canLink(Pad sinkpad)

Checks if the source pad and the sink pad can be linked. Both srcpad and sinkpad must be unlinked.

chain
GstFlowReturn chain(Buffer buffer)

Chain a buffer to pad. The function returns GST_FLOW_WRONG_STATE if the pad was flushing. If the caps on buffer are different from the current caps on pad, this function will call any setcaps function (see gst_pad_set_setcaps_function()) installed on pad. If the new caps are not acceptable for pad, this function returns GST_FLOW_NOT_NEGOTIATED. The function proceeds calling the chain function installed on pad (see gst_pad_set_chain_function()) and the return value of that function is returned to the caller. GST_FLOW_NOT_SUPPORTED is returned if pad has no chain function. In all cases, success or failure, the caller loses its reference to buffer after calling this function.

checkPullRange
int checkPullRange()

Checks if a gst_pad_pull_range() can be performed on the peer source pad. This function is used by plugins that want to check if they can use random access on the peer source pad. The peer sourcepad can implement a custom GstPadCheckGetRangeFunction if it needs to perform some logic to determine if pull_range is possible.

dispatcher
int dispatcher(GstPadDispatcherFunction dispatch, void* data)

Invokes the given dispatcher function on each respective peer of all pads that are internally linked to the given pad. The GstPadDispatcherFunction should return TRUE when no further pads need to be processed.

eventDefault
int eventDefault(Event event)

Invokes the default event handler for the given pad. End-of-stream and discontinuity events are handled specially, and then the event is sent to all pads internally linked to pad. Note that if there are many possible sink pads that are internally linked to pad, only one will be sent an event. Multi-sinkpad elements should implement custom event handlers.

fixateCaps
void fixateCaps(Caps caps)

Fixate a caps on the given pad. Modifies the caps in place, so you should make sure that the caps are actually writable (see gst_caps_make_writable()).

getAllowedCaps
Caps getAllowedCaps()

Gets the capabilities of the allowed media types that can flow through pad and its peer. The allowed capabilities is calculated as the intersection of the results of calling gst_pad_get_caps() on pad and its peer. The caller owns a reference on the resulting caps.

getCaps
Caps getCaps()

Gets the capabilities this pad can produce or consume. Note that this method doesn't necessarily return the caps set by gst_pad_set_caps() - use GST_PAD_CAPS for that instead. gst_pad_get_caps returns all possible caps a pad can operate with, using the pad's get_caps function; this returns the pad template caps if not explicitly set.

getDirection
GstPadDirection getDirection()

Gets the direction of the pad. The direction of the pad is decided at construction time so this function does not take the LOCK.

getElementPrivate
void* getElementPrivate()

Gets the private data of a pad. No locking is performed in this function.

getFixedCapsFunc
Caps getFixedCapsFunc()

A helper function you can use as a GetCaps function that will return the currently negotiated caps or the padtemplate when NULL.

getInternalLinks
ListG getInternalLinks()

Gets a list of pads to which the given pad is linked to inside of the parent element. The caller must free this list after use.

getInternalLinksDefault
ListG getInternalLinksDefault()

Gets a list of pads to which the given pad is linked to inside of the parent element. This is the default handler, and thus returns a list of all of the pads inside the parent element with opposite direction. The caller must free this list after use.

getNegotiatedCaps
Caps getNegotiatedCaps()

Gets the capabilities of the media type that currently flows through pad and its peer. This function can be used on both src and sinkpads. Note that srcpads are always negotiated before sinkpads so it is possible that the negotiated caps on the srcpad do not match the negotiated caps of the peer.

getPadStruct
GstPad* getPadStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getPadTemplate
PadTemplate getPadTemplate()

Gets the template for pad.

getPadTemplateCaps
Caps getPadTemplateCaps()

Gets the capabilities for pad's template.

getParentElement
Element getParentElement()

Gets the parent of pad, cast to a GstElement. If a pad has no parent or its parent is not an element, return NULL.

getPeer
Pad getPeer()

Gets the peer of pad. This function refs the peer pad so you need to unref it after use.

getQueryTypes
GstQueryType* getQueryTypes()

Get an array of supported queries that can be performed on this pad.

getQueryTypesDefault
GstQueryType* getQueryTypesDefault()

Invoke the default dispatcher for the query types on the pad.

getRange
GstFlowReturn getRange(ulong offset, uint size, Buffer buffer)

When pad is flushing this function returns GST_FLOW_WRONG_STATE immediatly. Calls the getrange function of pad, see GstPadGetRangeFunction for a description of a getrange function. If pad has no getrange function installed (see gst_pad_set_getrange_function()) this function returns GST_FLOW_NOT_SUPPORTED. buffer's caps must either be unset or the same as what is already configured on pad. Renegotiation within a running pull-mode pipeline is not supported. This is a lowlevel function. Usualy gst_pad_pull_range() is used.

getStruct
void* getStruct()

the main Gtk struct as a void*

isActive
int isActive()

Query if a pad is active

isBlocked
int isBlocked()

Checks if the pad is blocked or not. This function returns the last requested state of the pad. It is not certain that the pad is actually blocking at this point (see gst_pad_is_blocking()).

isBlocking
int isBlocking()

Checks if the pad is blocking or not. This is a guaranteed state of whether the pad is actually blocking on a GstBuffer or a GstEvent.

isLinked
int isLinked()

Checks if a pad is linked to another pad or not.

link
GstPadLinkReturn link(Pad sinkpad)

Links the source pad and the sink pad.

pauseTask
int pauseTask()

Pause the task of pad. This function will also make sure that the function executed by the task will effectively stop.

peerAcceptCaps
int peerAcceptCaps(Caps caps)

Check if the peer of pad accepts caps. If pad has no peer, this function returns TRUE.

peerGetCaps
Caps peerGetCaps()

Gets the capabilities of the peer connected to this pad.

proxyGetcaps
Caps proxyGetcaps()

Calls gst_pad_get_allowed_caps() for every other pad belonging to the same element as pad, and returns the intersection of the results. This function is useful as a default getcaps function for an element that can handle any stream format, but requires all its pads to have the same caps. Two such elements are tee and aggregator.

proxySetcaps
int proxySetcaps(Caps caps)

Calls gst_pad_set_caps() for every other pad belonging to the same element as pad. If gst_pad_set_caps() fails on any pad, the proxy setcaps fails. May be used only during negotiation.

pullRange
GstFlowReturn pullRange(ulong offset, uint size, Buffer buffer)

Pulls a buffer from the peer pad. This function will first trigger the pad block signal if it was installed. When pad is not linked GST_FLOW_NOT_LINKED is returned else this function returns the result of gst_pad_get_range() on the peer pad. See gst_pad_get_range() for a list of return values and for the semantics of the arguments of this function. buffer's caps must either be unset or the same as what is already configured on pad. Renegotiation within a running pull-mode pipeline is not supported.

push
GstFlowReturn push(Buffer buffer)

Pushes a buffer to the peer of pad. This function will call an installed pad block before triggering any installed pad probes. If the caps on buffer are different from the currently configured caps on pad, this function will call any installed setcaps function on pad (see gst_pad_set_setcaps_function()). In case of failure to renegotiate the new format, this function returns GST_FLOW_NOT_NEGOTIATED. The function proceeds calling gst_pad_chain() on the peer pad and returns the value from that function. If pad has no peer, GST_FLOW_NOT_LINKED will be returned. In all cases, success or failure, the caller loses its reference to buffer after calling this function.

pushEvent
int pushEvent(Event event)

Sends the event to the peer of the given pad. This function is mainly used by elements to send events to their peer elements. This function takes owership of the provided event so you should gst_event_ref() it if you want to reuse the event after this call.

query
int query(Query query)

Dispatches a query to a pad. The query should have been allocated by the caller via one of the type-specific allocation functions in gstquery.h. The element is responsible for filling the query with an appropriate response, which should then be parsed with a type-specific query parsing function. Again, the caller is responsible for both the allocation and deallocation of the query structure.

queryConvert
int queryConvert(GstFormat srcFormat, long srcVal, GstFormat destFormat, long destVal)

Queries a pad to convert src_val in src_format to dest_format.

queryDefault
int queryDefault(Query query)

Invokes the default query handler for the given pad. The query is sent to all pads internally linked to pad. Note that if there are many possible sink pads that are internally linked to pad, only one will be sent the query. Multi-sinkpad elements should implement custom query handlers.

queryDuration
long queryDuration()

Queries a pad for the stream duration. This is a convenience function for gstreamerD.

queryDuration
int queryDuration(GstFormat format, long duration)

Queries a pad for the total stream duration.

queryPeerConvert
int queryPeerConvert(GstFormat srcFormat, long srcVal, GstFormat destFormat, long destVal)

Queries the peer pad of a given sink pad to convert src_val in src_format to dest_format.

queryPeerDuration
int queryPeerDuration(GstFormat format, long duration)

Queries the peer pad of a given sink pad for the total stream duration.

queryPeerPosition
int queryPeerPosition(GstFormat format, long cur)

Queries the peer of a given sink pad for the stream position.

queryPosition
long queryPosition()

Queries a pad for the stream position. This is a convenience function for gstreamerD.

queryPosition
int queryPosition(GstFormat format, long cur)

Queries a pad for the stream position.

removeBufferProbe
void removeBufferProbe(uint handlerId)

Removes a buffer probe from pad.

removeDataProbe
void removeDataProbe(uint handlerId)

Removes a data probe from pad.

removeEventProbe
void removeEventProbe(uint handlerId)

Removes an event probe from pad.

sendEvent
int sendEvent(Event event)

Sends the event to the pad. This function can be used by applications to send events in the pipeline. If pad is a source pad, event should be an upstream event. If pad is a sink pad, event should be a downstream event. For example, you would not send a GST_EVENT_EOS on a src pad; EOS events only propagate downstream. Furthermore, some downstream events have to be serialized with data flow, like EOS, while some can travel out-of-band, like GST_EVENT_FLUSH_START. If the event needs to be serialized with data flow, this function will take the pad's stream lock while calling its event function. To find out whether an event type is upstream, downstream, or downstream and serialized, see GstEventTypeFlags, gst_event_type_get_flags(), GST_EVENT_IS_UPSTREAM, GST_EVENT_IS_DOWNSTREAM, and GST_EVENT_IS_SERIALIZED. Note that in practice that an application or plugin doesn't need to bother itself with this information; the core handles all necessary locks and checks. This function takes owership of the provided event so you should gst_event_ref() it if you want to reuse the event after this call.

setAcceptcapsFunction
void setAcceptcapsFunction(GstPadAcceptCapsFunction acceptcaps)

Sets the given acceptcaps function for the pad. The acceptcaps function will be called to check if the pad can accept the given caps. Setting the acceptcaps function to NULL restores the default behaviour of allowing any caps that matches the caps from gst_pad_get_caps.

setActivateFunction
void setActivateFunction(GstPadActivateFunction activate)

Sets the given activate function for pad. The activate function will dispatch to gst_pad_activate_push() or gst_pad_activate_pull() to perform the actual activation. Only makes sense to set on sink pads. Call this function if your sink pad can start a pull-based task.

setActivatepullFunction
void setActivatepullFunction(GstPadActivateModeFunction activatepull)

Sets the given activate_pull function for the pad. An activate_pull function prepares the element and any upstream connections for pulling. See XXX part-activation.txt for details.

setActivatepushFunction
void setActivatepushFunction(GstPadActivateModeFunction activatepush)

Sets the given activate_push function for the pad. An activate_push function prepares the element for pushing. See XXX part-activation.txt for details.

setActive
int setActive(int active)

Activates or deactivates the given pad. Normally called from within core state change functions. If active, makes sure the pad is active. If it is already active, either in push or pull mode, just return. Otherwise dispatches to the pad's activate function to perform the actual activation. If not active, checks the pad's current mode and calls gst_pad_activate_push() or gst_pad_activate_pull(), as appropriate, with a FALSE argument.

setBlocked
int setBlocked(int blocked)

Blocks or unblocks the dataflow on a pad. This function is a shortcut for gst_pad_set_blocked_async() with a NULL callback.

setBlockedAsync
int setBlockedAsync(int blocked, GstPadBlockCallback callback, void* userData)

Blocks or unblocks the dataflow on a pad. The provided callback is called when the operation succeeds; this happens right before the next attempt at pushing a buffer on the pad. This can take a while as the pad can only become blocked when real dataflow is happening. When the pipeline is stalled, for example in PAUSED, this can take an indeterminate amount of time. You can pass NULL as the callback to make this call block. Be careful with this blocking call as it might not return for reasons stated above.

setBufferallocFunction
void setBufferallocFunction(GstPadBufferAllocFunction bufalloc)

Sets the given bufferalloc function for the pad. Note that the bufferalloc function can only be set on sinkpads.

setCaps
int setCaps(Caps caps)

Sets the capabilities of this pad. The caps must be fixed. Any previous caps on the pad will be unreffed. This function refs the caps so you should unref if as soon as you don't need it anymore. It is possible to set NULL caps, which will make the pad unnegotiated again.

setChainFunction
void setChainFunction(GstPadChainFunction chain)

Sets the given chain function for the pad. The chain function is called to process a GstBuffer input buffer. see GstPadChainFunction for more details.

setCheckgetrangeFunction
void setCheckgetrangeFunction(GstPadCheckGetRangeFunction check)

Sets the given checkgetrange function for the pad. Implement this function on a pad if you dynamically support getrange based scheduling on the pad.

setElementPrivate
void setElementPrivate(void* priv)

Set the given private data gpointer on the pad. This function can only be used by the element that owns the pad. No locking is performed in this function.

setEventFunction
void setEventFunction(GstPadEventFunction event)

Sets the given event handler for the pad.

setFixatecapsFunction
void setFixatecapsFunction(GstPadFixateCapsFunction fixatecaps)

Sets the given fixatecaps function for the pad. The fixatecaps function will be called whenever the default values for a GstCaps needs to be filled in.

setGetcapsFunction
void setGetcapsFunction(GstPadGetCapsFunction getcaps)

Sets the given getcaps function for the pad. getcaps should return the allowable caps for a pad in the context of the element's state, its link to other elements, and the devices or files it has opened. These caps must be a subset of the pad template caps. In the NULL state with no links, getcaps should ideally return the same caps as the pad template. In rare circumstances, an object property can affect the caps returned by getcaps, but this is discouraged. You do not need to call this function if pad's allowed caps are always the same as the pad template caps. This can only be true if the padtemplate has fixed simple caps. For most filters, the caps returned by getcaps is directly affected by the allowed caps on other pads. For demuxers and decoders, the caps returned by the srcpad's getcaps function is directly related to the stream data. Again, getcaps should return the most specific caps it reasonably can, since this helps with autoplugging. Note that the return value from getcaps is owned by the caller, so the caller should unref the caps after usage.

setGetrangeFunction
void setGetrangeFunction(GstPadGetRangeFunction get)

Sets the given getrange function for the pad. The getrange function is called to produce a new GstBuffer to start the processing pipeline. see GstPadGetRangeFunction for a description of the getrange function.

setInternalLinkFunction
void setInternalLinkFunction(GstPadIntLinkFunction intlink)

Sets the given internal link function for the pad.

setLinkFunction
void setLinkFunction(GstPadLinkFunction link)

Sets the given link function for the pad. It will be called when the pad is linked with another pad. The return value GST_PAD_LINK_OK should be used when the connection can be made. The return value GST_PAD_LINK_REFUSED should be used when the connection cannot be made for some reason. If link is installed on a source pad, it should call the GstPadLinkFunction of the peer sink pad, if present.

setQueryFunction
void setQueryFunction(GstPadQueryFunction query)

Set the given query function for the pad.

setQueryTypeFunction
void setQueryTypeFunction(GstPadQueryTypeFunction typeFunc)

Set the given query type function for the pad.

setSetcapsFunction
void setSetcapsFunction(GstPadSetCapsFunction setcaps)

Sets the given setcaps function for the pad. The setcaps function will be called whenever a buffer with a new media type is pushed or pulled from the pad. The pad/element needs to update its internal structures to process the new media type. If this new type is not acceptable, the setcaps function should return FALSE.

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.
setUnlinkFunction
void setUnlinkFunction(GstPadUnlinkFunction unlink)

Sets the given unlink function for the pad. It will be called when the pad is unlinked.

startTask
int startTask(GstTaskFunction func, void* data)

Starts a task that repeatedly calls func with data. This function is mostly used in pad activation functions to start the dataflow. The GST_PAD_STREAM_LOCK of pad will automatically be acquired before func is called.

stopTask
int stopTask()

Stop the task of pad. This function will also make sure that the function executed by the task will effectively stop if not called from the GstTaskFunction. This function will deadlock if called from the GstTaskFunction of the task. Use gst_task_pause() instead. Regardless of whether the pad has a task, the stream lock is acquired and released so as to ensure that streaming through this pad has finished.

unlink
int unlink(Pad sinkpad)

Unlinks the source pad from the sink pad. Will emit the "unlinked" signal on both pads.

useFixedCaps
void useFixedCaps()

A helper function you can use that sets the gst_pad_get_fixed_caps_func as the getcaps function for the pad. This way the function will always return the negotiated caps or in case the pad is not negotiated, the padtemplate caps. Use this function on a pad that, once _set_caps() has been called on it, cannot be renegotiated to something else.

Static functions

callBackHaveData
gboolean callBackHaveData(GstPad* padStruct, GstMiniObject* miniObj, Pad _pad)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackLinked
void callBackLinked(GstPad* padStruct, GstPad* peer, Pad _pad)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackRequestLink
void callBackRequestLink(GstPad* padStruct, Pad _pad)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackUnlinked
void callBackUnlinked(GstPad* padStruct, GstPad* peer, Pad _pad)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

connectedSignals
int[string] connectedSignals;
gstPad
GstPad* gstPad;

the main Gtk struct

onHaveDataListeners
bool delegate(MiniObject, Pad)[] onHaveDataListeners;
Undocumented in source.
onLinkedListeners
void delegate(Pad, Pad)[] onLinkedListeners;
Undocumented in source.
onRequestLinkListeners
void delegate(Pad)[] onRequestLinkListeners;
Undocumented in source.
onUnlinkedListeners
void delegate(Pad, Pad)[] onUnlinkedListeners;
Undocumented in source.

Inherited Members

From ObjectGst

gstObject
GstObject* gstObject;

the main Gtk struct

getObjectGstStruct
GstObject* getObjectGstStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getStruct
void* getStruct()

the main Gtk struct as a void*

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.
connectedSignals
int[string] connectedSignals;
onDeepNotifyListeners
void delegate(ObjectGst, ParamSpec, ObjectGst)[] onDeepNotifyListeners;
Undocumented in source.
addOnDeepNotify
void addOnDeepNotify(void delegate(ObjectGst, ParamSpec, ObjectGst) dlg, ConnectFlags connectFlags)

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.

callBackDeepNotify
void callBackDeepNotify(GstObject* gstobjectStruct, GstObject* propObject, GParamSpec* prop, ObjectGst _objectGst)
Undocumented in source. Be warned that the author may not have intended to support it.
onObjectSavedListeners
void delegate(void*, ObjectGst)[] onObjectSavedListeners;
Undocumented in source.
addOnObjectSaved
void addOnObjectSaved(void delegate(void*, ObjectGst) dlg, ConnectFlags connectFlags)

Trigered whenever a new object is saved to XML. You can connect to this signal to insert custom XML tags into the core XML.

callBackObjectSaved
void callBackObjectSaved(GstObject* gstobjectStruct, void* xmlNode, ObjectGst _objectGst)
Undocumented in source. Be warned that the author may not have intended to support it.
onParentSetListeners
void delegate(ObjectG, ObjectGst)[] onParentSetListeners;
Undocumented in source.
addOnParentSet
void addOnParentSet(void delegate(ObjectG, ObjectGst) dlg, ConnectFlags connectFlags)

Emitted when the parent of an object is set.

callBackParentSet
void callBackParentSet(GstObject* gstobjectStruct, GObject* parent, ObjectGst _objectGst)
Undocumented in source. Be warned that the author may not have intended to support it.
onParentUnsetListeners
void delegate(ObjectG, ObjectGst)[] onParentUnsetListeners;
Undocumented in source.
addOnParentUnset
void addOnParentUnset(void delegate(ObjectG, ObjectGst) dlg, ConnectFlags connectFlags)

Emitted when the parent of an object is unset.

callBackParentUnset
void callBackParentUnset(GstObject* gstobjectStruct, GObject* parent, ObjectGst _objectGst)
Undocumented in source. Be warned that the author may not have intended to support it.
setName
int setName(string name)

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.

getName
string getName()

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.

setParent
int setParent(ObjectGst parent)

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_sink()). This function causes the parent-set signal to be emitted when the parent was successfully set.

getParent
ObjectGst getParent()

Returns the parent of object. This function increases the refcount of the parent object so you should gst_object_unref() it after usage.

unparent
void unparent()

Clear the parent of object, removing the associated reference. This function decreases the refcount of object. MT safe. Grabs and releases object's lock.

getNamePrefix
string getNamePrefix()

Returns a copy of the name prefix of object. Caller should g_free() the return value after usage. For a prefixless object, this returns NULL, which you can safely g_free() as well.

setNamePrefix
void setNamePrefix(string namePrefix)

Sets the name prefix of object to name_prefix. This function makes a copy of the provided name prefix, so the caller retains ownership of the name prefix it sent. MT safe. This function grabs and releases object's LOCK.

defaultDeepNotify
void defaultDeepNotify(ObjectG object, ObjectGst orig, ParamSpec pspec, string[] excludedProps)

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. MT safe. This function grabs and releases object's LOCK for getting its path string.

defaultError
void defaultError(ErrorG error, string dbug)

A default error function. The default handler will simply print the error string using g_print.

checkUniqueness
int checkUniqueness(ListG list, string name)

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 carefull when passing a list with a locked object.

hasAncestor
int hasAncestor(ObjectGst ancestor)

Check if object has an ancestor ancestor somewhere up in the hierarchy.

doref
void* doref(void* object)

Increments the refence count on object. This function does not take the lock on object because it relies on atomic refcounting. This object returns the input parameter to ease writing

unref
void unref(void* object)

Decrements the refence 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 unref method should never be called with the LOCK held since this might deadlock the dispose function.

sink
void sink(void* object)

If object was floating, the GST_OBJECT_FLOATING flag is removed and object is unreffed. When object was not floating, this function does nothing. Any newly created object has a refcount of 1 and is floating. This function should be used when creating a new object to symbolically 'take ownership' of object. This done by first doing a gst_object_ref() to keep a reference to object and then gst_object_sink() to remove and unref any floating references to object. Use gst_object_set_parent() to have this done for you. MT safe. This function grabs and releases object lock.

replace
void replace(ObjectGst oldobj, ObjectGst newobj)

Unrefs the GstObject pointed to by oldobj, refs newobj and puts newobj in *oldobj. Be carefull when calling this function, it does not take any locks. You might want to lock the object owning oldobj pointer before calling this function. Make sure not to LOCK oldobj because it might be unreffed which could cause a deadlock when it is disposed.

getPathString
string getPathString()

Generates a string describing the path of object in the object hierarchy. Only useful (or used) for debugging.

Meta