</para>
+<!-- ##### SIGNAL GstBin::element-added ##### -->
+<para>
+
+</para>
+
+@gstbin: the object which received the signal.
+@arg1: the element that was added to the bin
+
+<!-- ##### SIGNAL GstBin::element-removed ##### -->
+<para>
+
+</para>
+
+@gstbin: the object which received the signal.
+@arg1: the element that was removed from the bin
+
+<!-- ##### SIGNAL GstBin::iterate ##### -->
+<para>
+This signal is emitted when a bin iterates, either automatically or
+due to a #gst_bin_iterate() call. The return value is used to
+determine if the object method handler processed any data.
+In most normal cases, a user-provided signal handler should return
+FALSE.
+</para>
+
+@gstbin: the object which received the signal.
+@Returns: TRUE if the state of the bin was advanced.
+
<!-- ##### USER_FUNCTION GstBinPrePostIterateFunction ##### -->
<para>
The signature of the callback for the post and pre iterate function as set with
@clock:
-<!-- ##### SIGNAL GstBin::element-added ##### -->
-<para>
-
-</para>
-
-@gstbin: the object which received the signal.
-@arg1: the element that was added to the bin
-
-<!-- ##### SIGNAL GstBin::element-removed ##### -->
-<para>
-
-</para>
-
-@gstbin: the object which received the signal.
-@arg1: the element that was removed from the bin
-
-<!-- ##### SIGNAL GstBin::iterate ##### -->
-<para>
-This signal is emitted when a bin iterates, either automatically or
-due to a #gst_bin_iterate() call. The return value is used to
-determine if the object method handler processed any data.
-In most normal cases, a user-provided signal handler should return
-FALSE.
-</para>
-
-@gstbin: the object which received the signal.
-@Returns: TRUE if the state of the bin was advanced.
-
@offset_end:
@pool:
@pool_private:
+@_gst_reserved:
<!-- ##### FUNCTION gst_buffer_new ##### -->
<para>
@buffer_copy:
@buffer_free:
@user_data:
+@_gst_reserved:
<!-- ##### USER_FUNCTION GstBufferPoolBufferNewFunction ##### -->
<para>
</para>
+<!-- ##### ARG GstClock:max-diff ##### -->
+<para>
+Maximum allowed diff for clock sync requests against the real time.
+</para>
+
+<!-- ##### ARG GstClock:stats ##### -->
+<para>
+Boolean property to activate stat generation on the clock.
+</para>
+
<!-- ##### FUNCTION gst_clock_set_speed ##### -->
<para>
@id:
-<!-- ##### ARG GstClock:max-diff ##### -->
-<para>
-Maximum allowed diff for clock sync requests against the real time.
-</para>
-
-<!-- ##### ARG GstClock:stats ##### -->
-<para>
-Boolean property to activate stat generation on the clock.
-</para>
-
@flags: The flags of this GstData
@free: A pointer to a custom free function
@copy: A pointer to a custom copy function
+@_gst_reserved:
<!-- ##### USER_FUNCTION GstDataFreeFunction ##### -->
<para>
</para>
+<!-- ##### SIGNAL GstElement::eos ##### -->
+<para>
+Signal emited when the element goes to PAUSED due to an end-of-stream
+condition.
+</para>
+
+@gstelement: the object which received the signal.
+
+<!-- ##### SIGNAL GstElement::error ##### -->
+<para>
+Is triggered whenever an error occured.
+
+</para>
+
+@gstelement: the object which received the signal.
+@arg1: the error message
+@arg2:
+
+<!-- ##### SIGNAL GstElement::found-tag ##### -->
+<para>
+
+</para>
+
+@gstelement: the object which received the signal.
+@arg1:
+@arg2:
+
+<!-- ##### SIGNAL GstElement::new-pad ##### -->
+<para>
+Is triggered whenever a new pad is added to an element.
+</para>
+
+@gstelement: the object which received the signal.
+@arg1: the new pad that was added
+
+<!-- ##### SIGNAL GstElement::pad-removed ##### -->
+<para>
+Is triggered whenever a pad has been removed from the element.
+</para>
+
+@gstelement: the object which received the signal.
+@arg1: The pad that was removed.
+
+<!-- ##### SIGNAL GstElement::state-change ##### -->
+<para>
+Is triggered whenever the state of an element changes.
+</para>
+
+@gstelement: the object which received the signal.
+@arg1: the new state of the object
+@arg2:
+
<!-- ##### MACRO gst_element_get_name ##### -->
<para>
Gets the name of the element.
@...: list of query types.
-<!-- ##### SIGNAL GstElement::eos ##### -->
-<para>
-Signal emited when the element goes to PAUSED due to an end-of-stream
-condition.
-</para>
-
-@gstelement: the object which received the signal.
-
-<!-- ##### SIGNAL GstElement::error ##### -->
-<para>
-Is triggered whenever an error occured.
-
-</para>
-
-@gstelement: the object which received the signal.
-@arg1: the error message
-@arg2:
-
-<!-- ##### SIGNAL GstElement::found-tag ##### -->
-<para>
-
-</para>
-
-@gstelement: the object which received the signal.
-@arg1:
-@arg2:
-
-<!-- ##### SIGNAL GstElement::new-pad ##### -->
-<para>
-Is triggered whenever a new pad is added to an element.
-</para>
-
-@gstelement: the object which received the signal.
-@arg1: the new pad that was added
-
-<!-- ##### SIGNAL GstElement::pad-removed ##### -->
-<para>
-Is triggered whenever a pad has been removed from the element.
-</para>
-
-@gstelement: the object which received the signal.
-@arg1: The pad that was removed.
-
-<!-- ##### SIGNAL GstElement::state-change ##### -->
-<para>
-Is triggered whenever the state of an element changes.
-</para>
-
-@gstelement: the object which received the signal.
-@arg1: the new state of the object
-@arg2:
-
@klass:
@description:
@author:
+@_gst_reserved:
<!-- ##### FUNCTION gst_element_factory_find ##### -->
<para>
</para>
+<!-- ##### SIGNAL GstIndex::entry-added ##### -->
+<para>
+Is emited when a new entry is added to the index.
+</para>
+
+@gstindex: the object which received the signal.
+@arg1: The entry added to the index.
+
+<!-- ##### ARG GstIndex:resolver ##### -->
+<para>
+
+</para>
+
<!-- ##### FUNCTION gst_index_new ##### -->
<para>
@id:
-<!-- ##### SIGNAL GstIndex::entry-added ##### -->
-<para>
-Is emited when a new entry is added to the index.
-</para>
-
-@gstindex: the object which received the signal.
-@arg1: The entry added to the index.
-
-<!-- ##### ARG GstIndex:resolver ##### -->
-<para>
-
-</para>
-
</para>
+<!-- ##### SIGNAL GstObject::deep-notify ##### -->
+<para>
+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.
+</para>
+
+@gstobject: the object which received the signal.
+@arg1: the object that originated the signal
+@arg2: the property that changed
+
+<!-- ##### SIGNAL GstObject::object-saved ##### -->
+<para>
+Is trigered whenever a new object is saved to XML. You can connect to
+this signal to insert custom XML tags into the core XML.
+</para>
+
+@gstobject: the object which received the signal.
+@arg1: the xmlNodePtr of the parent node
+
+<!-- ##### SIGNAL GstObject::parent-set ##### -->
+<para>
+Is emitted when the parent of an object is set.
+</para>
+
+@gstobject: the object which received the signal.
+@arg1: the new parent
+
+<!-- ##### SIGNAL GstObject::parent-unset ##### -->
+<para>
+Is emitted when the parent of an object is unset.
+</para>
+
+@gstobject: the object which received the signal.
+@arg1: the old parent
+
+<!-- ##### ARG GstObject:name ##### -->
+<para>
+The name of the object
+</para>
+
<!-- ##### MACRO GST_FLAGS ##### -->
<para>
This macro returns the entire set of flags for the object.
@Returns:
-<!-- ##### SIGNAL GstObject::deep-notify ##### -->
-<para>
-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.
-</para>
-
-@gstobject: the object which received the signal.
-@arg1: the object that originated the signal
-@arg2: the property that changed
-
-<!-- ##### SIGNAL GstObject::object-saved ##### -->
-<para>
-Is trigered whenever a new object is saved to XML. You can connect to
-this signal to insert custom XML tags into the core XML.
-</para>
-
-@gstobject: the object which received the signal.
-@arg1: the xmlNodePtr of the parent node
-
-<!-- ##### SIGNAL GstObject::parent-set ##### -->
-<para>
-Is emitted when the parent of an object is set.
-</para>
-
-@gstobject: the object which received the signal.
-@arg1: the new parent
-
-<!-- ##### SIGNAL GstObject::parent-unset ##### -->
-<para>
-Is emitted when the parent of an object is unset.
-</para>
-
-@gstobject: the object which received the signal.
-@arg1: the old parent
-
-<!-- ##### ARG GstObject:name ##### -->
-<para>
-The name of the object
-</para>
-
@intlinkfunc:
@bufferpoolfunc:
@probedisp:
+@_gst_reserved:
<!-- ##### MACRO GST_RPAD_DIRECTION ##### -->
<para>
</para>
+<!-- ##### SIGNAL GstPadTemplate::pad-created ##### -->
+<para>
+This signal is fired when an element creates a pad from this
+template.
+</para>
+
+@gstpadtemplate: the object which received the signal.
+@arg1: The pad that was created.
+
<!-- ##### ENUM GstPadTemplateFlags ##### -->
<para>
Flags for the padtemplate
@Returns:
-<!-- ##### SIGNAL GstPadTemplate::pad-created ##### -->
-<para>
-This signal is fired when an element creates a pad from this
-template.
-</para>
-
-@gstpadtemplate: the object which received the signal.
-@arg1: The pad that was created.
-
@numfeatures:
@manager:
@module:
+@_gst_reserved:
<!-- ##### USER_FUNCTION GstPluginInitFunc ##### -->
<para>
@license:
@package:
@origin:
+@_gst_reserved:
<!-- ##### FUNCTION gst_plugin_set_name ##### -->
<para>
</para>
+<!-- ##### SIGNAL GstXML::object-loaded ##### -->
+<para>
+
+</para>
+
+@gstxml: the object which received the signal.
+@arg1:
+@arg2:
+
<!-- ##### USER_FUNCTION GstXMLRegistryAddPathList ##### -->
<para>
@loaded:
@plugins:
@paths:
+@_gst_reserved:
<!-- ##### FUNCTION gst_registry_load ##### -->
<para>
</para>
-<!-- ##### FUNCTION gst_thread_new ##### -->
-<para>
-
-</para>
-
-@name:
-@Returns:
-
-
<!-- ##### SIGNAL GstThread::shutdown ##### -->
<para>
The thread priority
</para>
+<!-- ##### FUNCTION gst_thread_new ##### -->
+<para>
+
+</para>
+
+@name:
+@Returns:
+
+
@Returns:
-<!-- ##### SIGNAL GstXML::object-loaded ##### -->
-<para>
-
-</para>
-
-@:
-@:
-@:
-
-@gstxml: the object which received the signal.
-@arg1:
-@arg2:
-
-<!-- ##### SIGNAL GstXML::object-loaded ##### -->
-<para>
-
-</para>
-
-@gstxml: the object which received the signal.
-@arg1:
-@arg2:
-
pads = gst_element_get_pad_list (GST_ELEMENT (tee));
while (pads) {
- GstPad *srcpad = GST_PAD_CAST (pads->data);
+ GstPad *srcpad = GST_PAD (pads->data);
GstPad *peer;
GstCaps *peercaps;
GstCaps *newcaps;
#define GST_IS_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_BIN))
#define GST_IS_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_BIN))
#define GST_BIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_BIN, GstBinClass))
-
-#define GST_BIN_CAST(obj) ((GstBin*)(obj))
-#define GST_BIN_CLASS_CAST(klass) ((GstBinClass*)(klass))
-
-#ifdef GST_TYPE_PARANOID
-# define GST_BIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_BIN, GstBin))
-# define GST_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_BIN, GstBinClass))
-#else
-# define GST_BIN GST_BIN_CAST
-# define GST_BIN_CLASS GST_BIN_CLASS_CAST
-#endif
+#define GST_BIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_BIN, GstBin))
+#define GST_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_BIN, GstBinClass))
typedef void (*GstBinPrePostIterateFunction) (GstBin *bin, gpointer user_data);
srcpads = gst_element_get_pad_list (src);
while (srcpads) {
- pad = GST_PAD_CAST (srcpads->data);
+ pad = GST_PAD (srcpads->data);
/* we only care about real src pads */
if (GST_IS_REAL_PAD (pad) && GST_PAD_IS_SRC (pad)) {
GList *pads = element->pads;
GST_CAT_DEBUG (GST_CAT_ELEMENT_PADS, "getting a random pad");
while (pads) {
- GstPad *pad = GST_PAD_CAST (pads->data);
+ GstPad *pad = GST_PAD (pads->data);
GST_CAT_DEBUG (GST_CAT_ELEMENT_PADS, "checking pad %s:%s",
GST_DEBUG_PAD_NAME (pad));
GList *pads = element->pads;
while (pads) {
- GstPad *pad = GST_PAD_CAST (pads->data);
+ GstPad *pad = GST_PAD (pads->data);
pads = g_list_next (pads);
if (!GST_IS_REAL_PAD (pad))
g_return_val_if_fail (element != NULL, NULL);
- bin = GST_BIN (gst_object_get_parent (GST_OBJECT_CAST (element)));
+ bin = GST_BIN (gst_object_get_parent (GST_OBJECT (element)));
- while (bin && !GST_FLAG_IS_SET (GST_OBJECT_CAST (bin), GST_BIN_FLAG_MANAGER))
- bin = GST_BIN (gst_object_get_parent (GST_OBJECT_CAST (bin)));
+ while (bin && !GST_FLAG_IS_SET (GST_OBJECT (bin), GST_BIN_FLAG_MANAGER))
+ bin = GST_BIN (gst_object_get_parent (GST_OBJECT (bin)));
return bin;
}
extern GType _gst_element_type;
#define GST_TYPE_ELEMENT (_gst_element_type)
-
-#define GST_ELEMENT_CAST(obj) ((GstElement*)(obj))
-#define GST_ELEMENT_CLASS_CAST(klass) ((GstElementClass*)(klass))
#define GST_IS_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_ELEMENT))
#define GST_IS_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_ELEMENT))
#define GST_ELEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_ELEMENT, GstElementClass))
-
-#ifdef GST_TYPE_PARANOID
-# define GST_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_ELEMENT, GstElement))
-# define GST_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_ELEMENT, GstElementClass))
-#else
-# define GST_ELEMENT GST_ELEMENT_CAST
-# define GST_ELEMENT_CLASS GST_ELEMENT_CLASS_CAST
-#endif
+#define GST_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_ELEMENT, GstElement))
+#define GST_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_ELEMENT, GstElementClass))
/* convenience functions */
#ifdef G_HAVE_ISO_VARARGS
extern GType _gst_object_type;
-#define GST_TYPE_OBJECT (_gst_object_type)
-#define GST_IS_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_OBJECT))
-#define GST_IS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_OBJECT))
-#define GST_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_OBJECT, GstObjectClass))
-
-#define GST_OBJECT_CAST(obj) ((GstObject*)(obj))
-#define GST_OBJECT_CLASS_CAST(klass) ((GstObjectClass*)(klass))
-
-#ifdef GST_TYPE_PARANOID
-# define GST_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_OBJECT, GstObject))
-# define GST_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_OBJECT, GstObjectClass))
-#else
-# define GST_OBJECT GST_OBJECT_CAST
-# define GST_OBJECT_CLASS GST_OBJECT_CLASS_CAST
-#endif
+#define GST_TYPE_OBJECT (_gst_object_type)
+#define GST_IS_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_OBJECT))
+#define GST_IS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_OBJECT))
+#define GST_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_OBJECT, GstObjectClass))
+#define GST_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_OBJECT, GstObject))
+#define GST_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_OBJECT, GstObjectClass))
/* make sure we don't change the object size but stil make it compile
* without libxml */
gpointer _gst_reserved[GST_PADDING];
};
-#define GST_FLAGS(obj) (GST_OBJECT_CAST (obj)->flags)
+#define GST_FLAGS(obj) (GST_OBJECT (obj)->flags)
#define GST_FLAG_IS_SET(obj,flag) (GST_FLAGS (obj) & (1<<(flag)))
#define GST_FLAG_SET(obj,flag) G_STMT_START{ (GST_FLAGS (obj) |= (1<<(flag))); }G_STMT_END
#define GST_FLAG_UNSET(obj,flag) G_STMT_START{ (GST_FLAGS (obj) &= ~(1<<(flag))); }G_STMT_END
#define GST_OBJECT_FLOATING(obj) (GST_FLAG_IS_SET (obj, GST_FLOATING))
/* CR1: object locking - GObject 2.0 doesn't have threadsafe locking */
-#define GST_LOCK(obj) (g_mutex_lock(GST_OBJECT_CAST(obj)->lock))
-#define GST_TRYLOCK(obj) (g_mutex_trylock(GST_OBJECT_CAST(obj)->lock))
-#define GST_UNLOCK(obj) (g_mutex_unlock(GST_OBJECT_CAST(obj)->lock))
-#define GST_GET_LOCK(obj) (GST_OBJECT_CAST(obj)->lock)
+#define GST_LOCK(obj) (g_mutex_lock(GST_OBJECT(obj)->lock))
+#define GST_TRYLOCK(obj) (g_mutex_trylock(GST_OBJECT(obj)->lock))
+#define GST_UNLOCK(obj) (g_mutex_unlock(GST_OBJECT(obj)->lock))
+#define GST_GET_LOCK(obj) (GST_OBJECT(obj)->lock)
/* normal GObject stuff */
g_return_val_if_fail (rpad, FALSE);
if (GST_RPAD_EVENTMASKFUNC (rpad))
- return GST_RPAD_EVENTMASKFUNC (rpad) (GST_PAD_CAST (pad));
+ return GST_RPAD_EVENTMASKFUNC (rpad) (GST_PAD (pad));
return NULL;
}
g_return_val_if_fail (rpad, FALSE);
if (GST_RPAD_QUERYTYPEFUNC (rpad))
- return GST_RPAD_QUERYTYPEFUNC (rpad) (GST_PAD_CAST (pad));
+ return GST_RPAD_QUERYTYPEFUNC (rpad) (GST_PAD (pad));
return NULL;
}
(GST_RPAD_DIRECTION (realsink) == GST_PAD_SINK));
if (GST_RPAD_UNLINKFUNC (realsrc)) {
- GST_RPAD_UNLINKFUNC (realsrc) (GST_PAD_CAST (realsrc));
+ GST_RPAD_UNLINKFUNC (realsrc) (GST_PAD (realsrc));
}
if (GST_RPAD_UNLINKFUNC (realsink)) {
- GST_RPAD_UNLINKFUNC (realsink) (GST_PAD_CAST (realsink));
+ GST_RPAD_UNLINKFUNC (realsink) (GST_PAD (realsink));
}
/* get the schedulers before we unlink */
- src_sched = gst_pad_get_scheduler (GST_PAD_CAST (realsrc));
- sink_sched = gst_pad_get_scheduler (GST_PAD_CAST (realsink));
+ src_sched = gst_pad_get_scheduler (GST_PAD (realsrc));
+ sink_sched = gst_pad_get_scheduler (GST_PAD (realsink));
/* first clear peers */
GST_RPAD_PEER (realsrc) = NULL;
/* now tell the scheduler */
if (src_sched && src_sched == sink_sched) {
gst_scheduler_pad_unlink (src_sched,
- GST_PAD_CAST (realsrc),
- GST_PAD_CAST (realsink));
+ GST_PAD (realsrc),
+ GST_PAD (realsink));
}
/* hold a reference, as they can go away in the signal handlers */
GstScheduler *src_sched, *sink_sched;
gint num_decoupled = 0;
- src_sched = gst_pad_get_scheduler (GST_PAD_CAST (realsrc));
- sink_sched = gst_pad_get_scheduler (GST_PAD_CAST (realsink));
+ src_sched = gst_pad_get_scheduler (GST_PAD (realsrc));
+ sink_sched = gst_pad_get_scheduler (GST_PAD (realsink));
if (src_sched && sink_sched) {
if (GST_FLAG_IS_SET (GST_PAD_PARENT (realsrc), GST_ELEMENT_DECOUPLED))
g_signal_emit (G_OBJECT (realsink), gst_real_pad_signals[REAL_LINKED],
0, realsrc);
- src_sched = gst_pad_get_scheduler (GST_PAD_CAST (realsrc));
- sink_sched = gst_pad_get_scheduler (GST_PAD_CAST (realsink));
+ src_sched = gst_pad_get_scheduler (GST_PAD (realsrc));
+ sink_sched = gst_pad_get_scheduler (GST_PAD (realsink));
/* now tell the scheduler */
if (src_sched && src_sched == sink_sched) {
gst_scheduler_pad_link (src_sched,
- GST_PAD_CAST (realsrc), GST_PAD_CAST (realsink));
+ GST_PAD (realsrc), GST_PAD (realsink));
}
else {
GST_CAT_INFO (GST_CAT_PADS, "not telling link to scheduler %s:%s and %s:%s, %p %p",
GstRealPad *peer = GST_RPAD_PEER (pad);
if (peer) {
- scheduler = gst_element_get_scheduler (gst_pad_get_parent (GST_PAD_CAST (peer)));
+ scheduler = gst_element_get_scheduler (gst_pad_get_parent (GST_PAD (peer)));
}
}
else {
* going to unref it later on */
if (!(allowed = gst_caps_ref (GST_RPAD_FILTER (pad)))) {
/* no filter, make sure we check against the padtemplate then */
- if ((template = gst_pad_get_pad_template (GST_PAD_CAST (pad)))) {
+ if ((template = gst_pad_get_pad_template (GST_PAD (pad)))) {
allowed = gst_pad_template_get_caps (template);
}
}
GstCaps *caps;
GST_CAT_DEBUG (GST_CAT_CAPS, "using pad get function");
- caps = GST_RPAD_GETCAPSFUNC (realpad) (GST_PAD_CAST (realpad), NULL);
+ caps = GST_RPAD_GETCAPSFUNC (realpad) (GST_PAD (realpad), NULL);
if(caps)g_return_val_if_fail(caps->refcount > 0, NULL);
return caps;
if (!gst_probe_dispatcher_dispatch (&peer->probedisp, &data))
return;
- (peer->chainhandler) (GST_PAD_CAST (peer), data);
+ (peer->chainhandler) (GST_PAD (peer), data);
return;
}
else {
GST_DEBUG_FUNCPTR_NAME (peer->gethandler),
GST_DEBUG_PAD_NAME (peer));
- data = (peer->gethandler) (GST_PAD_CAST (peer));
+ data = (peer->gethandler) (GST_PAD (peer));
if (data) {
if (!gst_probe_dispatcher_dispatch (&peer->probedisp, &data))
rpad = GST_PAD_REALIZE (pad);
if (GST_RPAD_INTLINKFUNC (rpad))
- res = GST_RPAD_INTLINKFUNC (rpad) (GST_PAD_CAST (rpad));
+ res = GST_RPAD_INTLINKFUNC (rpad) (GST_PAD (rpad));
return res;
}
gst_pad_push (eventpad, GST_DATA (event));
}
else {
- GstPad *peerpad = GST_PAD_CAST (GST_RPAD_PEER (eventpad));
+ GstPad *peerpad = GST_PAD (GST_RPAD_PEER (eventpad));
/* we only send the event on one pad, multi-sinkpad elements
* should implement a handler */
GstRealPad *int_peer = GST_RPAD_PEER (int_rpad);
if (int_peer) {
- res = dispatch (GST_PAD_CAST (int_peer), data);
+ res = dispatch (GST_PAD (int_peer), data);
if (res)
break;
}
GST_EVENT_TYPE (event), GST_DEBUG_PAD_NAME (rpad));
if (GST_RPAD_EVENTHANDLER (rpad))
- success = GST_RPAD_EVENTHANDLER (rpad) (GST_PAD_CAST (rpad), event);
+ success = GST_RPAD_EVENTHANDLER (rpad) (GST_PAD (rpad), event);
else {
g_warning ("pad %s:%s has no event handler", GST_DEBUG_PAD_NAME (rpad));
gst_event_unref (event);
rpad = GST_PAD_REALIZE (pad);
if (GST_RPAD_CONVERTFUNC (rpad)) {
- return GST_RPAD_CONVERTFUNC (rpad) (GST_PAD_CAST (rpad), src_format,
+ return GST_RPAD_CONVERTFUNC (rpad) (GST_PAD (rpad), src_format,
src_value, dest_format, dest_value);
}
g_return_val_if_fail (rpad, FALSE);
if (GST_RPAD_QUERYFUNC (rpad))
- return GST_RPAD_QUERYFUNC (rpad) (GST_PAD_CAST (pad), type, format, value);
+ return GST_RPAD_QUERYFUNC (rpad) (GST_PAD (pad), type, format, value);
return FALSE;
}
rpad = GST_PAD_REALIZE (pad);
if (GST_RPAD_FORMATSFUNC (rpad))
- return GST_RPAD_FORMATSFUNC (rpad) (GST_PAD_CAST (pad));
+ return GST_RPAD_FORMATSFUNC (rpad) (GST_PAD (pad));
return NULL;
}
extern GType _gst_real_pad_type;
extern GType _gst_ghost_pad_type;
-#define GST_TYPE_PARANOID
-
/*
* Pad base class
*/
#define GST_TYPE_PAD (_gst_pad_type)
-
-#define GST_PAD_CAST(obj) ((GstPad*)(obj))
-#define GST_PAD_CLASS_CAST(klass) ((GstPadClass*)(klass))
#define GST_IS_PAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PAD))
#define GST_IS_PAD_FAST(obj) (G_OBJECT_TYPE(obj) == GST_TYPE_REAL_PAD || \
G_OBJECT_TYPE(obj) == GST_TYPE_GHOST_PAD)
#define GST_IS_PAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PAD))
-
-#ifdef GST_TYPE_PARANOID
-# define GST_PAD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PAD, GstPad))
-# define GST_PAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_PAD, GstPadClass))
-#else
-# define GST_PAD GST_PAD_CAST
-# define GST_PAD_CLASS GST_PAD_CLASS_CAST
-#endif
+#define GST_PAD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PAD, GstPad))
+#define GST_PAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_PAD, GstPadClass))
/*
* Real Pads
*/
#define GST_TYPE_REAL_PAD (_gst_real_pad_type)
-
-#define GST_REAL_PAD_CAST(obj) ((GstRealPad*)(obj))
-#define GST_REAL_PAD_CLASS_CAST(klass) ((GstRealPadClass*)(klass))
#define GST_IS_REAL_PAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_REAL_PAD))
#define GST_IS_REAL_PAD_FAST(obj) (G_OBJECT_TYPE(obj) == GST_TYPE_REAL_PAD)
#define GST_IS_REAL_PAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_REAL_PAD))
-
-#ifdef GST_TYPE_PARANOID
-# define GST_REAL_PAD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_REAL_PAD, GstRealPad))
-# define GST_REAL_PAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_REAL_PAD, GstRealPadClass))
-#else
-# define GST_REAL_PAD GST_REAL_PAD_CAST
-# define GST_REAL_PAD_CLASS GST_REAL_PAD_CLASS_CAST
-#endif
+#define GST_REAL_PAD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_REAL_PAD, GstRealPad))
+#define GST_REAL_PAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_REAL_PAD, GstRealPadClass))
/*
* Ghost Pads
*/
#define GST_TYPE_GHOST_PAD (_gst_ghost_pad_type)
-
-#define GST_GHOST_PAD_CAST(obj) ((GstGhostPad*)(obj))
-#define GST_GHOST_PAD_CLASS_CAST(klass) ((GstGhostPadClass*)(klass))
#define GST_IS_GHOST_PAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_GHOST_PAD))
#define GST_IS_GHOST_PAD_FAST(obj) (G_OBJECT_TYPE(obj) == GST_TYPE_GHOST_PAD)
#define GST_IS_GHOST_PAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_GHOST_PAD))
-
-#ifdef GST_TYPE_PARANOID
-# define GST_GHOST_PAD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_GHOST_PAD, GstGhostPad))
-# define GST_GHOST_PAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_GHOST_PAD, GstGhostPadClass))
-#else
-# define GST_GHOST_PAD GST_GHOST_PAD_CAST
-# define GST_GHOST_PAD_CLASS GST_GHOST_PAD_CLASS_CAST
-#endif
+#define GST_GHOST_PAD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_GHOST_PAD, GstGhostPad))
+#define GST_GHOST_PAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_GHOST_PAD, GstGhostPadClass))
/*typedef struct _GstPad GstPad; */
#define GST_PAD_REALIZE(pad) (GST_IS_REAL_PAD(pad) ? ((GstRealPad *)(pad)) : GST_GPAD_REALPAD(pad))
#define GST_PAD_DIRECTION(pad) GST_RPAD_DIRECTION(GST_PAD_REALIZE(pad))
#define GST_PAD_CAPS(pad) GST_RPAD_CAPS(GST_PAD_REALIZE(pad))
-#define GST_PAD_PEER(pad) GST_PAD_CAST(GST_RPAD_PEER(GST_PAD_REALIZE(pad)))
+#define GST_PAD_PEER(pad) GST_PAD(GST_RPAD_PEER(GST_PAD_REALIZE(pad)))
/* Some check functions (unused?) */
#define GST_PAD_IS_LINKED(pad) (GST_PAD_PEER(pad) != NULL)
else {
GstScheduler *src_sched, *sink_sched;
- src_sched = gst_pad_get_scheduler (GST_PAD_CAST (queue->srcpad));
- sink_sched = gst_pad_get_scheduler (GST_PAD_CAST (queue->sinkpad));
+ src_sched = gst_pad_get_scheduler (GST_PAD (queue->srcpad));
+ sink_sched = gst_pad_get_scheduler (GST_PAD (queue->sinkpad));
if (src_sched == sink_sched) {
GST_CAT_DEBUG_OBJECT (GST_CAT_STATES, queue, "queue %s does not connect different schedulers",
factory_parent_class = g_type_class_ref (GST_TYPE_PLUGIN_FEATURE);
- if (!_default_name)
- _default_name = g_strdup (GST_SCHEDULER_DEFAULT_NAME);
+ if (!_default_name) {
+ if (g_getenv ("GST_SCHEDULER")) {
+ _default_name = g_strdup (g_getenv ("GST_SCHEDULER"));
+ } else {
+ _default_name = g_strdup (GST_SCHEDULER_DEFAULT_NAME);
+ }
+ }
+ g_assert (_default_name);
}
static void
typedef struct _GstSchedulerChain GstSchedulerChain;
-#define GST_ELEMENT_THREADSTATE(elem) (cothread*) (GST_ELEMENT_CAST (elem)->sched_private)
-#define GST_RPAD_BUFPEN(pad) (GstData*) (GST_REAL_PAD_CAST(pad)->sched_private)
+#define GST_ELEMENT_THREADSTATE(elem) (cothread*) (GST_ELEMENT (elem)->sched_private)
+#define GST_RPAD_BUFPEN(pad) (GstData*) (GST_REAL_PAD(pad)->sched_private)
#define GST_ELEMENT_COTHREAD_STOPPING GST_ELEMENT_SCHEDULER_PRIVATE1
#define GST_ELEMENT_IS_COTHREAD_STOPPING(element) GST_FLAG_IS_SET((element), GST_ELEMENT_COTHREAD_STOPPING)
#define GST_IS_BASIC_SCHEDULER_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_BASIC_SCHEDULER))
-#define GST_BASIC_SCHEDULER_CAST(sched) ((GstBasicScheduler *)(sched))
-#define SCHED(element) GST_BASIC_SCHEDULER_CAST (GST_ELEMENT_SCHED (element))
+#define SCHED(element) GST_BASIC_SCHEDULER (GST_ELEMENT_SCHED (element))
typedef enum {
GST_BASIC_SCHEDULER_STATE_NONE,
static int
gst_basic_scheduler_loopfunc_wrapper (int argc, char **argv)
{
- GstElement *element = GST_ELEMENT_CAST (argv);
+ GstElement *element = GST_ELEMENT (argv);
G_GNUC_UNUSED const gchar *name = GST_ELEMENT_NAME (element);
GST_DEBUG("entering loopfunc wrapper of %s", name);
gst_basic_scheduler_chain_wrapper (int argc, char **argv)
{
GSList *already_iterated = NULL;
- GstElement *element = GST_ELEMENT_CAST (argv);
+ GstElement *element = GST_ELEMENT (argv);
G_GNUC_UNUSED const gchar *name = GST_ELEMENT_NAME (element);
GST_DEBUG ("entered chain wrapper of element %s", name);
static int
gst_basic_scheduler_src_wrapper (int argc, char **argv)
{
- GstElement *element = GST_ELEMENT_CAST (argv);
+ GstElement *element = GST_ELEMENT (argv);
GList *pads;
GstRealPad *realpad;
GstData *data = NULL;
if (!GST_IS_REAL_PAD (pads->data))
continue;
- realpad = GST_REAL_PAD_CAST (pads->data);
+ realpad = GST_REAL_PAD (pads->data);
pads = g_list_next (pads);
if (GST_RPAD_DIRECTION (realpad) == GST_PAD_SRC && GST_PAD_IS_USABLE (realpad)) {
GST_CAT_DEBUG (debug_dataflow, "calling _getfunc for %s:%s", GST_DEBUG_PAD_NAME (realpad));
g_return_val_if_fail (GST_RPAD_GETFUNC (realpad) != NULL, 0);
- data = GST_RPAD_GETFUNC (realpad) (GST_PAD_CAST (realpad));
+ data = GST_RPAD_GETFUNC (realpad) (GST_PAD (realpad));
if (data) {
GST_CAT_DEBUG (debug_dataflow, "calling gst_pad_push on pad %s:%s %p",
GST_DEBUG_PAD_NAME (realpad), data);
- gst_pad_push (GST_PAD_CAST (realpad), data);
+ gst_pad_push (GST_PAD (realpad), data);
}
}
}
while (elements) {
gboolean decoupled;
- element = GST_ELEMENT_CAST (elements->data);
+ element = GST_ELEMENT (elements->data);
elements = g_list_next (elements);
decoupled = GST_FLAG_IS_SET (element, GST_ELEMENT_DECOUPLED);
peerpad = GST_PAD_PEER (pad);
if (peerpad) {
- GstElement *peerelement = GST_ELEMENT_CAST (GST_PAD_PARENT (peerpad));
+ GstElement *peerelement = GST_ELEMENT (GST_PAD_PARENT (peerpad));
gboolean different_sched = (peerelement->sched != GST_SCHEDULER (chain->sched));
gboolean peer_decoupled = GST_FLAG_IS_SET (peerelement, GST_ELEMENT_DECOUPLED);
gst_basic_scheduler_setup (GstScheduler *sched)
{
/* first create thread context */
- if (GST_BASIC_SCHEDULER_CAST (sched)->context == NULL) {
+ if (GST_BASIC_SCHEDULER (sched)->context == NULL) {
GST_DEBUG ("initializing cothread context");
- GST_BASIC_SCHEDULER_CAST (sched)->context = do_cothread_context_init ();
+ GST_BASIC_SCHEDULER (sched)->context = do_cothread_context_init ();
}
}
gst_basic_scheduler_reset (GstScheduler *sched)
{
cothread_context *ctx;
- GList *elements = GST_BASIC_SCHEDULER_CAST (sched)->elements;
+ GList *elements = GST_BASIC_SCHEDULER (sched)->elements;
while (elements) {
GstElement *element = GST_ELEMENT (elements->data);
elements = g_list_next (elements);
}
- ctx = GST_BASIC_SCHEDULER_CAST (sched)->context;
+ ctx = GST_BASIC_SCHEDULER (sched)->context;
do_cothread_context_destroy (ctx);
- GST_BASIC_SCHEDULER_CAST (sched)->context = NULL;
+ GST_BASIC_SCHEDULER (sched)->context = NULL;
}
static void
GST_DEBUG_PAD_NAME (srcpad), GST_DEBUG_PAD_NAME (sinkpad));
/* we need to have the parent elements of each pad */
- element1 = GST_ELEMENT_CAST (GST_PAD_PARENT (srcpad));
- element2 = GST_ELEMENT_CAST (GST_PAD_PARENT (sinkpad));
+ element1 = GST_ELEMENT (GST_PAD_PARENT (srcpad));
+ element2 = GST_ELEMENT (GST_PAD_PARENT (sinkpad));
/* first task is to remove the old chain they belonged to.
* this can be accomplished by taking either of the elements,
GST_DEBUG ("there are %d elements in this chain", chain->num_elements);
elements = chain->elements;
while (elements) {
- entry = GST_ELEMENT_CAST (elements->data);
+ entry = GST_ELEMENT (elements->data);
elements = g_list_next (elements);
if (GST_FLAG_IS_SET (entry, GST_ELEMENT_DECOUPLED)) {
GST_DEBUG ("entry \"%s\" is DECOUPLED, skipping",
# define COTHREADS_NAME ""
#endif
-#define GST_ELEMENT_SCHED_CONTEXT(elem) ((GstOptSchedulerCtx*) (GST_ELEMENT_CAST (elem)->sched_private))
+#define GST_ELEMENT_SCHED_CONTEXT(elem) ((GstOptSchedulerCtx*) (GST_ELEMENT (elem)->sched_private))
#define GST_ELEMENT_SCHED_GROUP(elem) (GST_ELEMENT_SCHED_CONTEXT (elem)->group)
-#define GST_PAD_BUFLIST(pad) ((GList*) (GST_REAL_PAD_CAST(pad)->sched_private))
+#define GST_PAD_BUFLIST(pad) ((GList*) (GST_REAL_PAD(pad)->sched_private))
#define GST_ELEMENT_COTHREAD_STOPPING GST_ELEMENT_SCHEDULER_PRIVATE1
#define GST_ELEMENT_IS_COTHREAD_STOPPING(element) GST_FLAG_IS_SET((element), GST_ELEMENT_COTHREAD_STOPPING)
#define GST_IS_OPT_SCHEDULER_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_OPT_SCHEDULER))
-#define GST_OPT_SCHEDULER_CAST(sched) ((GstOptScheduler *)(sched))
-
typedef enum {
GST_OPT_SCHEDULER_STATE_NONE,
GST_OPT_SCHEDULER_STATE_STOPPED,
while (pads) {
GstData *data;
- GstPad *pad = GST_PAD_CAST (pads->data);
+ GstPad *pad = GST_PAD (pads->data);
pads = g_list_next (pads);
/* skip sinks and ghostpads */
static GstElementStateReturn
gst_opt_scheduler_state_transition (GstScheduler *sched, GstElement *element, gint transition)
{
- GstOptScheduler *osched = GST_OPT_SCHEDULER_CAST (sched);
+ GstOptScheduler *osched = GST_OPT_SCHEDULER (sched);
GstOptSchedulerGroup *group;
GstElementStateReturn res = GST_STATE_SUCCESS;
gst_opt_scheduler_setup (GstScheduler *sched)
{
#ifdef USE_COTHREADS
- GstOptScheduler *osched = GST_OPT_SCHEDULER_CAST (sched);
+ GstOptScheduler *osched = GST_OPT_SCHEDULER (sched);
/* first create thread context */
if (osched->context == NULL) {
gst_opt_scheduler_reset (GstScheduler *sched)
{
#ifdef USE_COTHREADS
- GstOptScheduler *osched = GST_OPT_SCHEDULER_CAST (sched);
+ GstOptScheduler *osched = GST_OPT_SCHEDULER (sched);
GSList *chains = osched->chains;
while (chains) {
static void
gst_opt_scheduler_add_element (GstScheduler *sched, GstElement *element)
{
- GstOptScheduler *osched = GST_OPT_SCHEDULER_CAST (sched);
+ GstOptScheduler *osched = GST_OPT_SCHEDULER (sched);
GstOptSchedulerCtx *ctx;
const GList *pads;
static void
gst_opt_scheduler_lock_element (GstScheduler *sched, GstElement *element)
{
- //GstOptScheduler *osched = GST_OPT_SCHEDULER_CAST (sched);
+ //GstOptScheduler *osched = GST_OPT_SCHEDULER (sched);
g_warning ("lock element, implement me");
}
static void
gst_opt_scheduler_unlock_element (GstScheduler *sched, GstElement *element)
{
- //GstOptScheduler *osched = GST_OPT_SCHEDULER_CAST (sched);
+ //GstOptScheduler *osched = GST_OPT_SCHEDULER (sched);
g_warning ("unlock element, implement me");
}
return FALSE;
#else
{
- GstOptScheduler *osched = GST_OPT_SCHEDULER_CAST (sched);
+ GstOptScheduler *osched = GST_OPT_SCHEDULER (sched);
GST_INFO ( "scheduler set interrupted state");
osched->state = GST_OPT_SCHEDULER_STATE_INTERRUPTED;
static void
gst_opt_scheduler_error (GstScheduler *sched, GstElement *element)
{
- GstOptScheduler *osched = GST_OPT_SCHEDULER_CAST (sched);
+ GstOptScheduler *osched = GST_OPT_SCHEDULER (sched);
GstOptSchedulerGroup *group;
get_group (element, &group);
if (group)
static void
gst_opt_scheduler_pad_link (GstScheduler *sched, GstPad *srcpad, GstPad *sinkpad)
{
- GstOptScheduler *osched = GST_OPT_SCHEDULER_CAST (sched);
+ GstOptScheduler *osched = GST_OPT_SCHEDULER (sched);
LinkType type = GST_OPT_INVALID;
GstElement *element1, *element2;
/* see if the element has no more links to the peer group */
pads = gst_element_get_pad_list (element);
while (pads && !linked) {
- GstPad *pad = GST_PAD_CAST (pads->data);
+ GstPad *pad = GST_PAD (pads->data);
pads = g_list_next (pads);
/* we only operate on real pads and on the pad that is not broken */
static void
gst_opt_scheduler_pad_unlink (GstScheduler *sched, GstPad *srcpad, GstPad *sinkpad)
{
- GstOptScheduler *osched = GST_OPT_SCHEDULER_CAST (sched);
+ GstOptScheduler *osched = GST_OPT_SCHEDULER (sched);
GstElement *element1, *element2;
GstOptSchedulerGroup *group1, *group2;
static void
gst_opt_scheduler_pad_select (GstScheduler *sched, GList *padlist)
{
- //GstOptScheduler *osched = GST_OPT_SCHEDULER_CAST (sched);
+ //GstOptScheduler *osched = GST_OPT_SCHEDULER (sched);
g_warning ("pad select, implement me");
}
gst_opt_scheduler_iterate (GstScheduler *sched)
{
GstSchedulerState state = GST_SCHEDULER_STATE_STOPPED;
- GstOptScheduler *osched = GST_OPT_SCHEDULER_CAST (sched);
+ GstOptScheduler *osched = GST_OPT_SCHEDULER (sched);
gint iterations = osched->iterations;
osched->state = GST_OPT_SCHEDULER_STATE_RUNNING;
static void
gst_opt_scheduler_show (GstScheduler *sched)
{
- GstOptScheduler *osched = GST_OPT_SCHEDULER_CAST (sched);
+ GstOptScheduler *osched = GST_OPT_SCHEDULER (sched);
GSList *chains;
g_print ("iterations: %d\n", osched->iterations);
g_return_if_fail (GST_IS_OPT_SCHEDULER (object));
- osched = GST_OPT_SCHEDULER_CAST (object);
+ osched = GST_OPT_SCHEDULER (object);
switch (prop_id) {
case ARG_ITERATIONS:
g_return_if_fail (GST_IS_OPT_SCHEDULER (object));
- osched = GST_OPT_SCHEDULER_CAST (object);
+ osched = GST_OPT_SCHEDULER (object);
switch (prop_id) {
case ARG_ITERATIONS:
else {
GstScheduler *src_sched, *sink_sched;
- src_sched = gst_pad_get_scheduler (GST_PAD_CAST (queue->srcpad));
- sink_sched = gst_pad_get_scheduler (GST_PAD_CAST (queue->sinkpad));
+ src_sched = gst_pad_get_scheduler (GST_PAD (queue->srcpad));
+ sink_sched = gst_pad_get_scheduler (GST_PAD (queue->sinkpad));
if (src_sched == sink_sched) {
GST_CAT_DEBUG_OBJECT (GST_CAT_STATES, queue, "queue %s does not connect different schedulers",
pads = gst_element_get_pad_list (GST_ELEMENT (tee));
while (pads) {
- GstPad *srcpad = GST_PAD_CAST (pads->data);
+ GstPad *srcpad = GST_PAD (pads->data);
GstPad *peer;
GstCaps *peercaps;
GstCaps *newcaps;