mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
pad: add parent to other functions
Add parent to chain, chain_list, getrange and event functions.
This commit is contained in:
parent
009d799087
commit
612b1fbb14
34 changed files with 283 additions and 227 deletions
|
@ -69,6 +69,7 @@ static GstPad *gst_proxy_pad_get_target (GstPad * pad);
|
||||||
/**
|
/**
|
||||||
* gst_proxy_pad_event_default:
|
* gst_proxy_pad_event_default:
|
||||||
* @pad: a #GstPad to push the event to.
|
* @pad: a #GstPad to push the event to.
|
||||||
|
* @parent: the parent of @pad or NULL
|
||||||
* @event: (transfer full): the #GstEvent to send to the pad.
|
* @event: (transfer full): the #GstEvent to send to the pad.
|
||||||
*
|
*
|
||||||
* Invoke the default event of the proxy pad.
|
* Invoke the default event of the proxy pad.
|
||||||
|
@ -78,7 +79,7 @@ static GstPad *gst_proxy_pad_get_target (GstPad * pad);
|
||||||
* Since: 0.10.36
|
* Since: 0.10.36
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gst_proxy_pad_event_default (GstPad * pad, GstEvent * event)
|
gst_proxy_pad_event_default (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
{
|
{
|
||||||
gboolean res;
|
gboolean res;
|
||||||
GstPad *internal;
|
GstPad *internal;
|
||||||
|
@ -264,6 +265,7 @@ gst_proxy_pad_iterate_internal_links_default (GstPad * pad, GstObject * parent)
|
||||||
/**
|
/**
|
||||||
* gst_proxy_pad_chain_default:
|
* gst_proxy_pad_chain_default:
|
||||||
* @pad: a sink #GstPad, returns GST_FLOW_ERROR if not.
|
* @pad: a sink #GstPad, returns GST_FLOW_ERROR if not.
|
||||||
|
* @parent: the parent of @pad or NULL
|
||||||
* @buffer: (transfer full): the #GstBuffer to send, return GST_FLOW_ERROR
|
* @buffer: (transfer full): the #GstBuffer to send, return GST_FLOW_ERROR
|
||||||
* if not.
|
* if not.
|
||||||
*
|
*
|
||||||
|
@ -274,7 +276,8 @@ gst_proxy_pad_iterate_internal_links_default (GstPad * pad, GstObject * parent)
|
||||||
* Since: 0.10.36
|
* Since: 0.10.36
|
||||||
*/
|
*/
|
||||||
GstFlowReturn
|
GstFlowReturn
|
||||||
gst_proxy_pad_chain_default (GstPad * pad, GstBuffer * buffer)
|
gst_proxy_pad_chain_default (GstPad * pad, GstObject * parent,
|
||||||
|
GstBuffer * buffer)
|
||||||
{
|
{
|
||||||
GstFlowReturn res;
|
GstFlowReturn res;
|
||||||
GstPad *internal;
|
GstPad *internal;
|
||||||
|
@ -291,6 +294,7 @@ gst_proxy_pad_chain_default (GstPad * pad, GstBuffer * buffer)
|
||||||
/**
|
/**
|
||||||
* gst_proxy_pad_chain_list_default:
|
* gst_proxy_pad_chain_list_default:
|
||||||
* @pad: a sink #GstPad, returns GST_FLOW_ERROR if not.
|
* @pad: a sink #GstPad, returns GST_FLOW_ERROR if not.
|
||||||
|
* @parent: the parent of @pad or NULL
|
||||||
* @list: (transfer full): the #GstBufferList to send, return GST_FLOW_ERROR
|
* @list: (transfer full): the #GstBufferList to send, return GST_FLOW_ERROR
|
||||||
* if not.
|
* if not.
|
||||||
*
|
*
|
||||||
|
@ -301,7 +305,8 @@ gst_proxy_pad_chain_default (GstPad * pad, GstBuffer * buffer)
|
||||||
* Since: 0.10.36
|
* Since: 0.10.36
|
||||||
*/
|
*/
|
||||||
GstFlowReturn
|
GstFlowReturn
|
||||||
gst_proxy_pad_chain_list_default (GstPad * pad, GstBufferList * list)
|
gst_proxy_pad_chain_list_default (GstPad * pad, GstObject * parent,
|
||||||
|
GstBufferList * list)
|
||||||
{
|
{
|
||||||
GstFlowReturn res;
|
GstFlowReturn res;
|
||||||
GstPad *internal;
|
GstPad *internal;
|
||||||
|
@ -330,8 +335,8 @@ gst_proxy_pad_chain_list_default (GstPad * pad, GstBufferList * list)
|
||||||
* Since: 0.10.36
|
* Since: 0.10.36
|
||||||
*/
|
*/
|
||||||
GstFlowReturn
|
GstFlowReturn
|
||||||
gst_proxy_pad_getrange_default (GstPad * pad, guint64 offset, guint size,
|
gst_proxy_pad_getrange_default (GstPad * pad, GstObject * parent,
|
||||||
GstBuffer ** buffer)
|
guint64 offset, guint size, GstBuffer ** buffer)
|
||||||
{
|
{
|
||||||
GstFlowReturn res;
|
GstFlowReturn res;
|
||||||
GstPad *internal;
|
GstPad *internal;
|
||||||
|
|
|
@ -62,13 +62,18 @@ GType gst_proxy_pad_get_type (void);
|
||||||
GstProxyPad* gst_proxy_pad_get_internal (GstProxyPad *pad);
|
GstProxyPad* gst_proxy_pad_get_internal (GstProxyPad *pad);
|
||||||
|
|
||||||
|
|
||||||
gboolean gst_proxy_pad_event_default (GstPad *pad, GstEvent *event);
|
gboolean gst_proxy_pad_event_default (GstPad *pad, GstObject *parent,
|
||||||
|
GstEvent *event);
|
||||||
gboolean gst_proxy_pad_query_default (GstPad *pad, GstObject *parent,
|
gboolean gst_proxy_pad_query_default (GstPad *pad, GstObject *parent,
|
||||||
GstQuery *query);
|
GstQuery *query);
|
||||||
GstIterator* gst_proxy_pad_iterate_internal_links_default (GstPad *pad, GstObject *parent);
|
GstIterator* gst_proxy_pad_iterate_internal_links_default (GstPad *pad, GstObject *parent);
|
||||||
GstFlowReturn gst_proxy_pad_chain_default (GstPad *pad, GstBuffer *buffer);
|
GstFlowReturn gst_proxy_pad_chain_default (GstPad *pad, GstObject *parent,
|
||||||
GstFlowReturn gst_proxy_pad_chain_list_default (GstPad *pad, GstBufferList *list);
|
GstBuffer *buffer);
|
||||||
GstFlowReturn gst_proxy_pad_getrange_default (GstPad *pad, guint64 offset, guint size, GstBuffer **buffer);
|
GstFlowReturn gst_proxy_pad_chain_list_default (GstPad *pad, GstObject *parent,
|
||||||
|
GstBufferList *list);
|
||||||
|
GstFlowReturn gst_proxy_pad_getrange_default (GstPad *pad, GstObject *parent,
|
||||||
|
guint64 offset, guint size,
|
||||||
|
GstBuffer **buffer);
|
||||||
void gst_proxy_pad_unlink_default (GstPad * pad);
|
void gst_proxy_pad_unlink_default (GstPad * pad);
|
||||||
|
|
||||||
#define GST_TYPE_GHOST_PAD (gst_ghost_pad_get_type ())
|
#define GST_TYPE_GHOST_PAD (gst_ghost_pad_get_type ())
|
||||||
|
|
42
gst/gstpad.c
42
gst/gstpad.c
|
@ -142,7 +142,7 @@ static void gst_pad_get_property (GObject * object, guint prop_id,
|
||||||
static void gst_pad_set_pad_template (GstPad * pad, GstPadTemplate * templ);
|
static void gst_pad_set_pad_template (GstPad * pad, GstPadTemplate * templ);
|
||||||
static gboolean gst_pad_activate_default (GstPad * pad);
|
static gboolean gst_pad_activate_default (GstPad * pad);
|
||||||
static GstFlowReturn gst_pad_chain_list_default (GstPad * pad,
|
static GstFlowReturn gst_pad_chain_list_default (GstPad * pad,
|
||||||
GstBufferList * list);
|
GstObject * parent, GstBufferList * list);
|
||||||
|
|
||||||
static guint gst_pad_signals[LAST_SIGNAL] = { 0 };
|
static guint gst_pad_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
|
@ -2141,7 +2141,7 @@ gst_pad_set_caps (GstPad * pad, GstCaps * caps)
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
do_event_function (GstPad * pad, GstEvent * event,
|
do_event_function (GstPad * pad, GstObject * parent, GstEvent * event,
|
||||||
GstPadEventFunction eventfunc, gboolean * caps_notify)
|
GstPadEventFunction eventfunc, gboolean * caps_notify)
|
||||||
{
|
{
|
||||||
gboolean result = TRUE, call_event = TRUE;
|
gboolean result = TRUE, call_event = TRUE;
|
||||||
|
@ -2174,7 +2174,7 @@ do_event_function (GstPad * pad, GstEvent * event,
|
||||||
|
|
||||||
if (call_event) {
|
if (call_event) {
|
||||||
GST_DEBUG_OBJECT (pad, "calling event function with event %p", event);
|
GST_DEBUG_OBJECT (pad, "calling event function with event %p", event);
|
||||||
result = eventfunc (pad, event);
|
result = eventfunc (pad, parent, event);
|
||||||
} else {
|
} else {
|
||||||
gst_event_unref (event);
|
gst_event_unref (event);
|
||||||
}
|
}
|
||||||
|
@ -2237,7 +2237,7 @@ gst_pad_update_events (GstPad * pad)
|
||||||
gst_event_ref (event);
|
gst_event_ref (event);
|
||||||
GST_OBJECT_UNLOCK (pad);
|
GST_OBJECT_UNLOCK (pad);
|
||||||
|
|
||||||
res = do_event_function (pad, event, eventfunc, &caps_notify);
|
res = do_event_function (pad, parent, event, eventfunc, &caps_notify);
|
||||||
|
|
||||||
RELEASE_PARENT (parent);
|
RELEASE_PARENT (parent);
|
||||||
|
|
||||||
|
@ -2603,6 +2603,7 @@ event_forward_func (GstPad * pad, EventData * data)
|
||||||
/**
|
/**
|
||||||
* gst_pad_event_default:
|
* gst_pad_event_default:
|
||||||
* @pad: a #GstPad to call the default event handler on.
|
* @pad: a #GstPad to call the default event handler on.
|
||||||
|
* @parent: the parent of @pad or NULL
|
||||||
* @event: (transfer full): the #GstEvent to handle.
|
* @event: (transfer full): the #GstEvent to handle.
|
||||||
*
|
*
|
||||||
* Invokes the default event handler for the given pad.
|
* Invokes the default event handler for the given pad.
|
||||||
|
@ -2616,7 +2617,7 @@ event_forward_func (GstPad * pad, EventData * data)
|
||||||
* Returns: TRUE if the event was sent successfully.
|
* Returns: TRUE if the event was sent successfully.
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gst_pad_event_default (GstPad * pad, GstEvent * event)
|
gst_pad_event_default (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
{
|
{
|
||||||
gboolean result, forward = TRUE;
|
gboolean result, forward = TRUE;
|
||||||
|
|
||||||
|
@ -3211,6 +3212,7 @@ no_parent:
|
||||||
no_func:
|
no_func:
|
||||||
{
|
{
|
||||||
GST_DEBUG_OBJECT (pad, "had no query function");
|
GST_DEBUG_OBJECT (pad, "had no query function");
|
||||||
|
RELEASE_PARENT (parent);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
query_failed:
|
query_failed:
|
||||||
|
@ -3316,6 +3318,7 @@ static inline GstFlowReturn
|
||||||
gst_pad_chain_data_unchecked (GstPad * pad, GstPadProbeType type, void *data)
|
gst_pad_chain_data_unchecked (GstPad * pad, GstPadProbeType type, void *data)
|
||||||
{
|
{
|
||||||
GstFlowReturn ret;
|
GstFlowReturn ret;
|
||||||
|
GstObject *parent;
|
||||||
gboolean needs_events;
|
gboolean needs_events;
|
||||||
|
|
||||||
GST_PAD_STREAM_LOCK (pad);
|
GST_PAD_STREAM_LOCK (pad);
|
||||||
|
@ -3338,6 +3341,7 @@ gst_pad_chain_data_unchecked (GstPad * pad, GstPadProbeType type, void *data)
|
||||||
|
|
||||||
PROBE_PUSH (pad, type, data, probe_stopped);
|
PROBE_PUSH (pad, type, data, probe_stopped);
|
||||||
|
|
||||||
|
parent = GST_OBJECT_PARENT (pad);
|
||||||
GST_OBJECT_UNLOCK (pad);
|
GST_OBJECT_UNLOCK (pad);
|
||||||
|
|
||||||
/* NOTE: we read the chainfunc unlocked.
|
/* NOTE: we read the chainfunc unlocked.
|
||||||
|
@ -3355,7 +3359,7 @@ gst_pad_chain_data_unchecked (GstPad * pad, GstPadProbeType type, void *data)
|
||||||
"calling chainfunction &%s with buffer %" GST_PTR_FORMAT,
|
"calling chainfunction &%s with buffer %" GST_PTR_FORMAT,
|
||||||
GST_DEBUG_FUNCPTR_NAME (chainfunc), GST_BUFFER (data));
|
GST_DEBUG_FUNCPTR_NAME (chainfunc), GST_BUFFER (data));
|
||||||
|
|
||||||
ret = chainfunc (pad, GST_BUFFER_CAST (data));
|
ret = chainfunc (pad, parent, GST_BUFFER_CAST (data));
|
||||||
|
|
||||||
GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad,
|
GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad,
|
||||||
"called chainfunction &%s with buffer %p, returned %s",
|
"called chainfunction &%s with buffer %p, returned %s",
|
||||||
|
@ -3370,7 +3374,7 @@ gst_pad_chain_data_unchecked (GstPad * pad, GstPadProbeType type, void *data)
|
||||||
"calling chainlistfunction &%s",
|
"calling chainlistfunction &%s",
|
||||||
GST_DEBUG_FUNCPTR_NAME (chainlistfunc));
|
GST_DEBUG_FUNCPTR_NAME (chainlistfunc));
|
||||||
|
|
||||||
ret = chainlistfunc (pad, GST_BUFFER_LIST_CAST (data));
|
ret = chainlistfunc (pad, parent, GST_BUFFER_LIST_CAST (data));
|
||||||
|
|
||||||
GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad,
|
GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad,
|
||||||
"called chainlistfunction &%s, returned %s",
|
"called chainlistfunction &%s, returned %s",
|
||||||
|
@ -3421,7 +3425,7 @@ no_function:
|
||||||
gst_mini_object_unref (GST_MINI_OBJECT_CAST (data));
|
gst_mini_object_unref (GST_MINI_OBJECT_CAST (data));
|
||||||
GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad,
|
GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad,
|
||||||
"pushing, but not chainhandler");
|
"pushing, but not chainhandler");
|
||||||
GST_ELEMENT_ERROR (GST_PAD_PARENT (pad), CORE, PAD, (NULL),
|
GST_ELEMENT_ERROR (parent, CORE, PAD, (NULL),
|
||||||
("push on pad %s:%s but it has no chainfunction",
|
("push on pad %s:%s but it has no chainfunction",
|
||||||
GST_DEBUG_PAD_NAME (pad)));
|
GST_DEBUG_PAD_NAME (pad)));
|
||||||
GST_PAD_STREAM_UNLOCK (pad);
|
GST_PAD_STREAM_UNLOCK (pad);
|
||||||
|
@ -3467,7 +3471,8 @@ gst_pad_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_pad_chain_list_default (GstPad * pad, GstBufferList * list)
|
gst_pad_chain_list_default (GstPad * pad, GstObject * parent,
|
||||||
|
GstBufferList * list)
|
||||||
{
|
{
|
||||||
guint i, len;
|
guint i, len;
|
||||||
GstBuffer *buffer;
|
GstBuffer *buffer;
|
||||||
|
@ -3681,6 +3686,7 @@ gst_pad_get_range_unchecked (GstPad * pad, guint64 offset, guint size,
|
||||||
{
|
{
|
||||||
GstFlowReturn ret;
|
GstFlowReturn ret;
|
||||||
GstPadGetRangeFunction getrangefunc;
|
GstPadGetRangeFunction getrangefunc;
|
||||||
|
GstObject *parent;
|
||||||
|
|
||||||
GST_PAD_STREAM_LOCK (pad);
|
GST_PAD_STREAM_LOCK (pad);
|
||||||
|
|
||||||
|
@ -3692,6 +3698,8 @@ gst_pad_get_range_unchecked (GstPad * pad, guint64 offset, guint size,
|
||||||
* skip calling the getrange function */
|
* skip calling the getrange function */
|
||||||
PROBE_PRE_PULL (pad, GST_PAD_PROBE_TYPE_PULL | GST_PAD_PROBE_TYPE_BLOCK,
|
PROBE_PRE_PULL (pad, GST_PAD_PROBE_TYPE_PULL | GST_PAD_PROBE_TYPE_BLOCK,
|
||||||
*buffer, offset, size, probe_stopped, probed_data, GST_FLOW_OK);
|
*buffer, offset, size, probe_stopped, probed_data, GST_FLOW_OK);
|
||||||
|
|
||||||
|
ACQUIRE_PARENT (pad, parent, no_parent);
|
||||||
GST_OBJECT_UNLOCK (pad);
|
GST_OBJECT_UNLOCK (pad);
|
||||||
|
|
||||||
if (G_UNLIKELY ((getrangefunc = GST_PAD_GETRANGEFUNC (pad)) == NULL))
|
if (G_UNLIKELY ((getrangefunc = GST_PAD_GETRANGEFUNC (pad)) == NULL))
|
||||||
|
@ -3702,7 +3710,9 @@ gst_pad_get_range_unchecked (GstPad * pad, guint64 offset, guint size,
|
||||||
G_GUINT64_FORMAT ", size %u",
|
G_GUINT64_FORMAT ", size %u",
|
||||||
GST_DEBUG_FUNCPTR_NAME (getrangefunc), offset, size);
|
GST_DEBUG_FUNCPTR_NAME (getrangefunc), offset, size);
|
||||||
|
|
||||||
ret = getrangefunc (pad, offset, size, buffer);
|
ret = getrangefunc (pad, parent, offset, size, buffer);
|
||||||
|
|
||||||
|
RELEASE_PARENT (parent);
|
||||||
|
|
||||||
if (G_UNLIKELY (ret != GST_FLOW_OK))
|
if (G_UNLIKELY (ret != GST_FLOW_OK))
|
||||||
goto get_range_failed;
|
goto get_range_failed;
|
||||||
|
@ -3727,11 +3737,19 @@ flushing:
|
||||||
GST_PAD_STREAM_UNLOCK (pad);
|
GST_PAD_STREAM_UNLOCK (pad);
|
||||||
return GST_FLOW_WRONG_STATE;
|
return GST_FLOW_WRONG_STATE;
|
||||||
}
|
}
|
||||||
|
no_parent:
|
||||||
|
{
|
||||||
|
GST_DEBUG_OBJECT (pad, "no parent");
|
||||||
|
GST_OBJECT_UNLOCK (pad);
|
||||||
|
GST_PAD_STREAM_UNLOCK (pad);
|
||||||
|
return GST_FLOW_WRONG_STATE;
|
||||||
|
}
|
||||||
no_function:
|
no_function:
|
||||||
{
|
{
|
||||||
GST_ELEMENT_ERROR (GST_PAD_PARENT (pad), CORE, PAD, (NULL),
|
GST_ELEMENT_ERROR (parent, CORE, PAD, (NULL),
|
||||||
("getrange on pad %s:%s but it has no getrangefunction",
|
("getrange on pad %s:%s but it has no getrangefunction",
|
||||||
GST_DEBUG_PAD_NAME (pad)));
|
GST_DEBUG_PAD_NAME (pad)));
|
||||||
|
RELEASE_PARENT (parent);
|
||||||
GST_PAD_STREAM_UNLOCK (pad);
|
GST_PAD_STREAM_UNLOCK (pad);
|
||||||
return GST_FLOW_NOT_SUPPORTED;
|
return GST_FLOW_NOT_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
@ -4314,7 +4332,7 @@ gst_pad_send_event (GstPad * pad, GstEvent * event)
|
||||||
ACQUIRE_PARENT (pad, parent, no_parent);
|
ACQUIRE_PARENT (pad, parent, no_parent);
|
||||||
GST_OBJECT_UNLOCK (pad);
|
GST_OBJECT_UNLOCK (pad);
|
||||||
|
|
||||||
result = eventfunc (pad, event);
|
result = eventfunc (pad, parent, event);
|
||||||
|
|
||||||
RELEASE_PARENT (parent);
|
RELEASE_PARENT (parent);
|
||||||
}
|
}
|
||||||
|
|
29
gst/gstpad.h
29
gst/gstpad.h
|
@ -256,6 +256,9 @@ typedef gboolean (*GstPadActivateModeFunction) (GstPad *pad, gboolean active);
|
||||||
/**
|
/**
|
||||||
* GstPadChainFunction:
|
* GstPadChainFunction:
|
||||||
* @pad: the sink #GstPad that performed the chain.
|
* @pad: the sink #GstPad that performed the chain.
|
||||||
|
* @parent: the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT flag is set,
|
||||||
|
* @parent is guaranteed to be not-NULL and remain valid during the
|
||||||
|
* execution of this function.
|
||||||
* @buffer: the #GstBuffer that is chained, not %NULL.
|
* @buffer: the #GstBuffer that is chained, not %NULL.
|
||||||
*
|
*
|
||||||
* A function that will be called on sinkpads when chaining buffers.
|
* A function that will be called on sinkpads when chaining buffers.
|
||||||
|
@ -270,11 +273,15 @@ typedef gboolean (*GstPadActivateModeFunction) (GstPad *pad, gboolean active);
|
||||||
*
|
*
|
||||||
* Returns: #GST_FLOW_OK for success
|
* Returns: #GST_FLOW_OK for success
|
||||||
*/
|
*/
|
||||||
typedef GstFlowReturn (*GstPadChainFunction) (GstPad *pad, GstBuffer *buffer);
|
typedef GstFlowReturn (*GstPadChainFunction) (GstPad *pad, GstObject *parent,
|
||||||
|
GstBuffer *buffer);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GstPadChainListFunction:
|
* GstPadChainListFunction:
|
||||||
* @pad: the sink #GstPad that performed the chain.
|
* @pad: the sink #GstPad that performed the chain.
|
||||||
|
* @parent: the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT flag is set,
|
||||||
|
* @parent is guaranteed to be not-NULL and remain valid during the
|
||||||
|
* execution of this function.
|
||||||
* @list: the #GstBufferList that is chained, not %NULL.
|
* @list: the #GstBufferList that is chained, not %NULL.
|
||||||
*
|
*
|
||||||
* A function that will be called on sinkpads when chaining buffer lists.
|
* A function that will be called on sinkpads when chaining buffer lists.
|
||||||
|
@ -289,11 +296,15 @@ typedef GstFlowReturn (*GstPadChainFunction) (GstPad *pad, GstBuffer *buffer);
|
||||||
*
|
*
|
||||||
* Returns: #GST_FLOW_OK for success
|
* Returns: #GST_FLOW_OK for success
|
||||||
*/
|
*/
|
||||||
typedef GstFlowReturn (*GstPadChainListFunction) (GstPad *pad, GstBufferList *list);
|
typedef GstFlowReturn (*GstPadChainListFunction) (GstPad *pad, GstObject *parent,
|
||||||
|
GstBufferList *list);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GstPadGetRangeFunction:
|
* GstPadGetRangeFunction:
|
||||||
* @pad: the src #GstPad to perform the getrange on.
|
* @pad: the src #GstPad to perform the getrange on.
|
||||||
|
* @parent: the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT flag is set,
|
||||||
|
* @parent is guaranteed to be not-NULL and remain valid during the
|
||||||
|
* execution of this function.
|
||||||
* @offset: the offset of the range
|
* @offset: the offset of the range
|
||||||
* @length: the length of the range
|
* @length: the length of the range
|
||||||
* @buffer: a memory location to hold the result buffer, cannot be NULL.
|
* @buffer: a memory location to hold the result buffer, cannot be NULL.
|
||||||
|
@ -334,19 +345,24 @@ typedef GstFlowReturn (*GstPadChainListFunction) (GstPad *pad, GstBufferList *l
|
||||||
* Returns: #GST_FLOW_OK for success and a valid buffer in @buffer. Any other
|
* Returns: #GST_FLOW_OK for success and a valid buffer in @buffer. Any other
|
||||||
* return value leaves @buffer undefined.
|
* return value leaves @buffer undefined.
|
||||||
*/
|
*/
|
||||||
typedef GstFlowReturn (*GstPadGetRangeFunction) (GstPad *pad, guint64 offset,
|
typedef GstFlowReturn (*GstPadGetRangeFunction) (GstPad *pad, GstObject *parent,
|
||||||
guint length, GstBuffer **buffer);
|
guint64 offset, guint length,
|
||||||
|
GstBuffer **buffer);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GstPadEventFunction:
|
* GstPadEventFunction:
|
||||||
* @pad: the #GstPad to handle the event.
|
* @pad: the #GstPad to handle the event.
|
||||||
|
* @parent: the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT flag is set,
|
||||||
|
* @parent is guaranteed to be not-NULL and remain valid during the
|
||||||
|
* execution of this function.
|
||||||
* @event: the #GstEvent to handle.
|
* @event: the #GstEvent to handle.
|
||||||
*
|
*
|
||||||
* Function signature to handle an event for the pad.
|
* Function signature to handle an event for the pad.
|
||||||
*
|
*
|
||||||
* Returns: TRUE if the pad could handle the event.
|
* Returns: TRUE if the pad could handle the event.
|
||||||
*/
|
*/
|
||||||
typedef gboolean (*GstPadEventFunction) (GstPad *pad, GstEvent *event);
|
typedef gboolean (*GstPadEventFunction) (GstPad *pad, GstObject *parent,
|
||||||
|
GstEvent *event);
|
||||||
|
|
||||||
|
|
||||||
/* internal links */
|
/* internal links */
|
||||||
|
@ -860,7 +876,8 @@ GstFlowReturn gst_pad_push_list (GstPad *pad, GstBufferList *list);
|
||||||
GstFlowReturn gst_pad_pull_range (GstPad *pad, guint64 offset, guint size,
|
GstFlowReturn gst_pad_pull_range (GstPad *pad, guint64 offset, guint size,
|
||||||
GstBuffer **buffer);
|
GstBuffer **buffer);
|
||||||
gboolean gst_pad_push_event (GstPad *pad, GstEvent *event);
|
gboolean gst_pad_push_event (GstPad *pad, GstEvent *event);
|
||||||
gboolean gst_pad_event_default (GstPad *pad, GstEvent *event);
|
gboolean gst_pad_event_default (GstPad *pad, GstObject *parent,
|
||||||
|
GstEvent *event);
|
||||||
|
|
||||||
/* data passing functions on pad */
|
/* data passing functions on pad */
|
||||||
GstFlowReturn gst_pad_chain (GstPad *pad, GstBuffer *buffer);
|
GstFlowReturn gst_pad_chain (GstPad *pad, GstBuffer *buffer);
|
||||||
|
|
|
@ -383,15 +383,18 @@ static gboolean gst_base_parse_handle_seek (GstBaseParse * parse,
|
||||||
GstEvent * event);
|
GstEvent * event);
|
||||||
static void gst_base_parse_handle_tag (GstBaseParse * parse, GstEvent * event);
|
static void gst_base_parse_handle_tag (GstBaseParse * parse, GstEvent * event);
|
||||||
|
|
||||||
static gboolean gst_base_parse_src_event (GstPad * pad, GstEvent * event);
|
static gboolean gst_base_parse_src_event (GstPad * pad, GstObject * parent,
|
||||||
|
GstEvent * event);
|
||||||
static gboolean gst_base_parse_src_query (GstPad * pad, GstObject * parent,
|
static gboolean gst_base_parse_src_query (GstPad * pad, GstObject * parent,
|
||||||
GstQuery * query);
|
GstQuery * query);
|
||||||
|
|
||||||
static gboolean gst_base_parse_sink_event (GstPad * pad, GstEvent * event);
|
static gboolean gst_base_parse_sink_event (GstPad * pad, GstObject * parent,
|
||||||
|
GstEvent * event);
|
||||||
static gboolean gst_base_parse_sink_query (GstPad * pad, GstObject * parent,
|
static gboolean gst_base_parse_sink_query (GstPad * pad, GstObject * parent,
|
||||||
GstQuery * query);
|
GstQuery * query);
|
||||||
|
|
||||||
static GstFlowReturn gst_base_parse_chain (GstPad * pad, GstBuffer * buffer);
|
static GstFlowReturn gst_base_parse_chain (GstPad * pad, GstObject * parent,
|
||||||
|
GstBuffer * buffer);
|
||||||
static void gst_base_parse_loop (GstPad * pad);
|
static void gst_base_parse_loop (GstPad * pad);
|
||||||
|
|
||||||
static gboolean gst_base_parse_check_frame (GstBaseParse * parse,
|
static gboolean gst_base_parse_check_frame (GstBaseParse * parse,
|
||||||
|
@ -865,14 +868,14 @@ gst_base_parse_convert (GstBaseParse * parse,
|
||||||
* Returns: TRUE if the event was handled.
|
* Returns: TRUE if the event was handled.
|
||||||
*/
|
*/
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_base_parse_sink_event (GstPad * pad, GstEvent * event)
|
gst_base_parse_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
{
|
{
|
||||||
GstBaseParse *parse;
|
GstBaseParse *parse;
|
||||||
GstBaseParseClass *bclass;
|
GstBaseParseClass *bclass;
|
||||||
gboolean handled = FALSE;
|
gboolean handled = FALSE;
|
||||||
gboolean ret = TRUE;
|
gboolean ret = TRUE;
|
||||||
|
|
||||||
parse = GST_BASE_PARSE (gst_pad_get_parent (pad));
|
parse = GST_BASE_PARSE (parent);
|
||||||
bclass = GST_BASE_PARSE_GET_CLASS (parse);
|
bclass = GST_BASE_PARSE_GET_CLASS (parse);
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (parse, "handling event %d, %s", GST_EVENT_TYPE (event),
|
GST_DEBUG_OBJECT (parse, "handling event %d, %s", GST_EVENT_TYPE (event),
|
||||||
|
@ -906,11 +909,11 @@ gst_base_parse_sink_event (GstPad * pad, GstEvent * event)
|
||||||
handled = gst_base_parse_sink_eventfunc (parse, event);
|
handled = gst_base_parse_sink_eventfunc (parse, event);
|
||||||
|
|
||||||
if (!handled)
|
if (!handled)
|
||||||
ret = gst_pad_event_default (pad, event);
|
ret = gst_pad_event_default (pad, parent, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_object_unref (parse);
|
|
||||||
GST_DEBUG_OBJECT (parse, "event handled");
|
GST_DEBUG_OBJECT (parse, "event handled");
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1168,14 +1171,14 @@ gst_base_parse_sink_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
||||||
* Returns: TRUE if the event was handled.
|
* Returns: TRUE if the event was handled.
|
||||||
*/
|
*/
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_base_parse_src_event (GstPad * pad, GstEvent * event)
|
gst_base_parse_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
{
|
{
|
||||||
GstBaseParse *parse;
|
GstBaseParse *parse;
|
||||||
GstBaseParseClass *bclass;
|
GstBaseParseClass *bclass;
|
||||||
gboolean handled = FALSE;
|
gboolean handled = FALSE;
|
||||||
gboolean ret = TRUE;
|
gboolean ret = TRUE;
|
||||||
|
|
||||||
parse = GST_BASE_PARSE (gst_pad_get_parent (pad));
|
parse = GST_BASE_PARSE (parent);
|
||||||
bclass = GST_BASE_PARSE_GET_CLASS (parse);
|
bclass = GST_BASE_PARSE_GET_CLASS (parse);
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (parse, "event %d, %s", GST_EVENT_TYPE (event),
|
GST_DEBUG_OBJECT (parse, "event %d, %s", GST_EVENT_TYPE (event),
|
||||||
|
@ -1185,9 +1188,8 @@ gst_base_parse_src_event (GstPad * pad, GstEvent * event)
|
||||||
handled = bclass->src_event (parse, event);
|
handled = bclass->src_event (parse, event);
|
||||||
|
|
||||||
if (!handled)
|
if (!handled)
|
||||||
ret = gst_pad_event_default (pad, event);
|
ret = gst_pad_event_default (pad, parent, event);
|
||||||
|
|
||||||
gst_object_unref (parse);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2058,7 +2060,8 @@ gst_base_parse_drain (GstBaseParse * parse)
|
||||||
if (!avail)
|
if (!avail)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (gst_base_parse_chain (parse->sinkpad, NULL) != GST_FLOW_OK) {
|
if (gst_base_parse_chain (parse->sinkpad, GST_OBJECT_CAST (parse),
|
||||||
|
NULL) != GST_FLOW_OK) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2245,7 +2248,7 @@ gst_base_parse_check_sync (GstBaseParse * parse)
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_base_parse_chain (GstPad * pad, GstBuffer * buffer)
|
gst_base_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||||
{
|
{
|
||||||
GstBaseParseClass *bclass;
|
GstBaseParseClass *bclass;
|
||||||
GstBaseParse *parse;
|
GstBaseParse *parse;
|
||||||
|
@ -2259,7 +2262,7 @@ gst_base_parse_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
GstClockTime timestamp;
|
GstClockTime timestamp;
|
||||||
GstBaseParseFrame *frame;
|
GstBaseParseFrame *frame;
|
||||||
|
|
||||||
parse = GST_BASE_PARSE (GST_OBJECT_PARENT (pad));
|
parse = GST_BASE_PARSE (parent);
|
||||||
bclass = GST_BASE_PARSE_GET_CLASS (parse);
|
bclass = GST_BASE_PARSE_GET_CLASS (parse);
|
||||||
|
|
||||||
if (parse->priv->detecting) {
|
if (parse->priv->detecting) {
|
||||||
|
@ -2298,7 +2301,7 @@ gst_base_parse_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
if (ret == GST_FLOW_OK && !parse->priv->flushing)
|
if (ret == GST_FLOW_OK && !parse->priv->flushing)
|
||||||
ret =
|
ret =
|
||||||
gst_base_parse_chain (GST_BASE_PARSE_SINK_PAD (parse),
|
gst_base_parse_chain (GST_BASE_PARSE_SINK_PAD (parse),
|
||||||
GST_BUFFER_CAST (l->data));
|
parent, GST_BUFFER_CAST (l->data));
|
||||||
else
|
else
|
||||||
gst_buffer_unref (GST_BUFFER_CAST (l->data));
|
gst_buffer_unref (GST_BUFFER_CAST (l->data));
|
||||||
}
|
}
|
||||||
|
|
|
@ -387,15 +387,17 @@ static GstStateChangeReturn gst_base_sink_change_state (GstElement * element,
|
||||||
|
|
||||||
static gboolean gst_base_sink_sink_query (GstPad * pad, GstObject * parent,
|
static gboolean gst_base_sink_sink_query (GstPad * pad, GstObject * parent,
|
||||||
GstQuery * query);
|
GstQuery * query);
|
||||||
static GstFlowReturn gst_base_sink_chain (GstPad * pad, GstBuffer * buffer);
|
static GstFlowReturn gst_base_sink_chain (GstPad * pad, GstObject * parent,
|
||||||
static GstFlowReturn gst_base_sink_chain_list (GstPad * pad,
|
GstBuffer * buffer);
|
||||||
|
static GstFlowReturn gst_base_sink_chain_list (GstPad * pad, GstObject * parent,
|
||||||
GstBufferList * list);
|
GstBufferList * list);
|
||||||
|
|
||||||
static void gst_base_sink_loop (GstPad * pad);
|
static void gst_base_sink_loop (GstPad * pad);
|
||||||
static gboolean gst_base_sink_pad_activate (GstPad * pad);
|
static gboolean gst_base_sink_pad_activate (GstPad * pad);
|
||||||
static gboolean gst_base_sink_pad_activate_push (GstPad * pad, gboolean active);
|
static gboolean gst_base_sink_pad_activate_push (GstPad * pad, gboolean active);
|
||||||
static gboolean gst_base_sink_pad_activate_pull (GstPad * pad, gboolean active);
|
static gboolean gst_base_sink_pad_activate_pull (GstPad * pad, gboolean active);
|
||||||
static gboolean gst_base_sink_event (GstPad * pad, GstEvent * event);
|
static gboolean gst_base_sink_event (GstPad * pad, GstObject * parent,
|
||||||
|
GstEvent * event);
|
||||||
|
|
||||||
static gboolean default_sink_query (GstBaseSink * sink, GstQuery * query);
|
static gboolean default_sink_query (GstBaseSink * sink, GstQuery * query);
|
||||||
|
|
||||||
|
@ -2057,8 +2059,8 @@ gst_base_sink_wait_clock (GstBaseSink * sink, GstClockTime time,
|
||||||
/* FIXME: Casting to GstClockEntry only works because the types
|
/* FIXME: Casting to GstClockEntry only works because the types
|
||||||
* are the same */
|
* are the same */
|
||||||
if (G_LIKELY (sink->priv->cached_clock_id != NULL
|
if (G_LIKELY (sink->priv->cached_clock_id != NULL
|
||||||
&& GST_CLOCK_ENTRY_CLOCK ((GstClockEntry *) sink->priv->
|
&& GST_CLOCK_ENTRY_CLOCK ((GstClockEntry *) sink->
|
||||||
cached_clock_id) == clock)) {
|
priv->cached_clock_id) == clock)) {
|
||||||
if (!gst_clock_single_shot_id_reinit (clock, sink->priv->cached_clock_id,
|
if (!gst_clock_single_shot_id_reinit (clock, sink->priv->cached_clock_id,
|
||||||
time)) {
|
time)) {
|
||||||
gst_clock_id_unref (sink->priv->cached_clock_id);
|
gst_clock_id_unref (sink->priv->cached_clock_id);
|
||||||
|
@ -3301,18 +3303,13 @@ gst_base_sink_flush_stop (GstBaseSink * basesink, GstPad * pad,
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_base_sink_event (GstPad * pad, GstEvent * event)
|
gst_base_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
{
|
{
|
||||||
GstBaseSink *basesink;
|
GstBaseSink *basesink;
|
||||||
gboolean result = TRUE;
|
gboolean result = TRUE;
|
||||||
GstBaseSinkClass *bclass;
|
GstBaseSinkClass *bclass;
|
||||||
|
|
||||||
basesink = GST_BASE_SINK (gst_pad_get_parent (pad));
|
basesink = GST_BASE_SINK (parent);
|
||||||
if (G_UNLIKELY (basesink == NULL)) {
|
|
||||||
gst_event_unref (event);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
bclass = GST_BASE_SINK_GET_CLASS (basesink);
|
bclass = GST_BASE_SINK_GET_CLASS (basesink);
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (basesink, "received event %p %" GST_PTR_FORMAT, event,
|
GST_DEBUG_OBJECT (basesink, "received event %p %" GST_PTR_FORMAT, event,
|
||||||
|
@ -3429,8 +3426,6 @@ gst_base_sink_event (GstPad * pad, GstEvent * event)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
done:
|
done:
|
||||||
gst_object_unref (basesink);
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
|
@ -3633,23 +3628,24 @@ wrong_mode:
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_base_sink_chain (GstPad * pad, GstBuffer * buf)
|
gst_base_sink_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
|
||||||
{
|
{
|
||||||
GstBaseSink *basesink;
|
GstBaseSink *basesink;
|
||||||
|
|
||||||
basesink = GST_BASE_SINK (GST_OBJECT_PARENT (pad));
|
basesink = GST_BASE_SINK (parent);
|
||||||
|
|
||||||
return gst_base_sink_chain_main (basesink, pad, _PR_IS_BUFFER, buf);
|
return gst_base_sink_chain_main (basesink, pad, _PR_IS_BUFFER, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_base_sink_chain_list (GstPad * pad, GstBufferList * list)
|
gst_base_sink_chain_list (GstPad * pad, GstObject * parent,
|
||||||
|
GstBufferList * list)
|
||||||
{
|
{
|
||||||
GstBaseSink *basesink;
|
GstBaseSink *basesink;
|
||||||
GstBaseSinkClass *bclass;
|
GstBaseSinkClass *bclass;
|
||||||
GstFlowReturn result;
|
GstFlowReturn result;
|
||||||
|
|
||||||
basesink = GST_BASE_SINK (GST_OBJECT_PARENT (pad));
|
basesink = GST_BASE_SINK (parent);
|
||||||
bclass = GST_BASE_SINK_GET_CLASS (basesink);
|
bclass = GST_BASE_SINK_GET_CLASS (basesink);
|
||||||
|
|
||||||
if (G_LIKELY (bclass->render_list)) {
|
if (G_LIKELY (bclass->render_list)) {
|
||||||
|
@ -3979,13 +3975,15 @@ gst_base_sink_perform_step (GstBaseSink * sink, GstPad * pad, GstEvent * event)
|
||||||
static void
|
static void
|
||||||
gst_base_sink_loop (GstPad * pad)
|
gst_base_sink_loop (GstPad * pad)
|
||||||
{
|
{
|
||||||
|
GstObject *parent;
|
||||||
GstBaseSink *basesink;
|
GstBaseSink *basesink;
|
||||||
GstBuffer *buf = NULL;
|
GstBuffer *buf = NULL;
|
||||||
GstFlowReturn result;
|
GstFlowReturn result;
|
||||||
guint blocksize;
|
guint blocksize;
|
||||||
guint64 offset;
|
guint64 offset;
|
||||||
|
|
||||||
basesink = GST_BASE_SINK (GST_OBJECT_PARENT (pad));
|
parent = GST_OBJECT_PARENT (pad);
|
||||||
|
basesink = GST_BASE_SINK (parent);
|
||||||
|
|
||||||
g_assert (basesink->pad_mode == GST_PAD_ACTIVATE_PULL);
|
g_assert (basesink->pad_mode == GST_PAD_ACTIVATE_PULL);
|
||||||
|
|
||||||
|
@ -4029,7 +4027,7 @@ paused:
|
||||||
gst_message_new_segment_done (GST_OBJECT_CAST (basesink),
|
gst_message_new_segment_done (GST_OBJECT_CAST (basesink),
|
||||||
basesink->segment.format, basesink->segment.position));
|
basesink->segment.format, basesink->segment.position));
|
||||||
} else {
|
} else {
|
||||||
gst_base_sink_event (pad, gst_event_new_eos ());
|
gst_base_sink_event (pad, parent, gst_event_new_eos ());
|
||||||
}
|
}
|
||||||
} else if (result == GST_FLOW_NOT_LINKED || result <= GST_FLOW_EOS) {
|
} else if (result == GST_FLOW_NOT_LINKED || result <= GST_FLOW_EOS) {
|
||||||
/* for fatal errors we post an error message, post the error
|
/* for fatal errors we post an error message, post the error
|
||||||
|
@ -4041,7 +4039,7 @@ paused:
|
||||||
GST_ELEMENT_ERROR (basesink, STREAM, FAILED,
|
GST_ELEMENT_ERROR (basesink, STREAM, FAILED,
|
||||||
(_("Internal data stream error.")),
|
(_("Internal data stream error.")),
|
||||||
("stream stopped, reason %s", gst_flow_get_name (result)));
|
("stream stopped, reason %s", gst_flow_get_name (result)));
|
||||||
gst_base_sink_event (pad, gst_event_new_eos ());
|
gst_base_sink_event (pad, parent, gst_event_new_eos ());
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -290,7 +290,8 @@ static void gst_base_src_set_property (GObject * object, guint prop_id,
|
||||||
const GValue * value, GParamSpec * pspec);
|
const GValue * value, GParamSpec * pspec);
|
||||||
static void gst_base_src_get_property (GObject * object, guint prop_id,
|
static void gst_base_src_get_property (GObject * object, guint prop_id,
|
||||||
GValue * value, GParamSpec * pspec);
|
GValue * value, GParamSpec * pspec);
|
||||||
static gboolean gst_base_src_event_handler (GstPad * pad, GstEvent * event);
|
static gboolean gst_base_src_event (GstPad * pad, GstObject * parent,
|
||||||
|
GstEvent * event);
|
||||||
static gboolean gst_base_src_send_event (GstElement * elem, GstEvent * event);
|
static gboolean gst_base_src_send_event (GstElement * elem, GstEvent * event);
|
||||||
static gboolean gst_base_src_default_event (GstBaseSrc * src, GstEvent * event);
|
static gboolean gst_base_src_default_event (GstBaseSrc * src, GstEvent * event);
|
||||||
|
|
||||||
|
@ -319,8 +320,8 @@ static GstStateChangeReturn gst_base_src_change_state (GstElement * element,
|
||||||
GstStateChange transition);
|
GstStateChange transition);
|
||||||
|
|
||||||
static void gst_base_src_loop (GstPad * pad);
|
static void gst_base_src_loop (GstPad * pad);
|
||||||
static GstFlowReturn gst_base_src_pad_get_range (GstPad * pad, guint64 offset,
|
static GstFlowReturn gst_base_src_getrange (GstPad * pad, GstObject * parent,
|
||||||
guint length, GstBuffer ** buf);
|
guint64 offset, guint length, GstBuffer ** buf);
|
||||||
static GstFlowReturn gst_base_src_get_range (GstBaseSrc * src, guint64 offset,
|
static GstFlowReturn gst_base_src_get_range (GstBaseSrc * src, guint64 offset,
|
||||||
guint length, GstBuffer ** buf);
|
guint length, GstBuffer ** buf);
|
||||||
static gboolean gst_base_src_seekable (GstBaseSrc * src);
|
static gboolean gst_base_src_seekable (GstBaseSrc * src);
|
||||||
|
@ -383,9 +384,9 @@ gst_base_src_class_init (GstBaseSrcClass * klass)
|
||||||
/* Registering debug symbols for function pointers */
|
/* Registering debug symbols for function pointers */
|
||||||
GST_DEBUG_REGISTER_FUNCPTR (gst_base_src_activate_push);
|
GST_DEBUG_REGISTER_FUNCPTR (gst_base_src_activate_push);
|
||||||
GST_DEBUG_REGISTER_FUNCPTR (gst_base_src_activate_pull);
|
GST_DEBUG_REGISTER_FUNCPTR (gst_base_src_activate_pull);
|
||||||
GST_DEBUG_REGISTER_FUNCPTR (gst_base_src_event_handler);
|
GST_DEBUG_REGISTER_FUNCPTR (gst_base_src_event);
|
||||||
GST_DEBUG_REGISTER_FUNCPTR (gst_base_src_query);
|
GST_DEBUG_REGISTER_FUNCPTR (gst_base_src_query);
|
||||||
GST_DEBUG_REGISTER_FUNCPTR (gst_base_src_pad_get_range);
|
GST_DEBUG_REGISTER_FUNCPTR (gst_base_src_getrange);
|
||||||
GST_DEBUG_REGISTER_FUNCPTR (gst_base_src_fixate);
|
GST_DEBUG_REGISTER_FUNCPTR (gst_base_src_fixate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -415,9 +416,9 @@ gst_base_src_init (GstBaseSrc * basesrc, gpointer g_class)
|
||||||
GST_DEBUG_OBJECT (basesrc, "setting functions on src pad");
|
GST_DEBUG_OBJECT (basesrc, "setting functions on src pad");
|
||||||
gst_pad_set_activatepush_function (pad, gst_base_src_activate_push);
|
gst_pad_set_activatepush_function (pad, gst_base_src_activate_push);
|
||||||
gst_pad_set_activatepull_function (pad, gst_base_src_activate_pull);
|
gst_pad_set_activatepull_function (pad, gst_base_src_activate_pull);
|
||||||
gst_pad_set_event_function (pad, gst_base_src_event_handler);
|
gst_pad_set_event_function (pad, gst_base_src_event);
|
||||||
gst_pad_set_query_function (pad, gst_base_src_query);
|
gst_pad_set_query_function (pad, gst_base_src_query);
|
||||||
gst_pad_set_getrange_function (pad, gst_base_src_pad_get_range);
|
gst_pad_set_getrange_function (pad, gst_base_src_getrange);
|
||||||
|
|
||||||
/* hold pointer to pad */
|
/* hold pointer to pad */
|
||||||
basesrc->srcpad = pad;
|
basesrc->srcpad = pad;
|
||||||
|
@ -1814,18 +1815,13 @@ not_seekable:
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_base_src_event_handler (GstPad * pad, GstEvent * event)
|
gst_base_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
{
|
{
|
||||||
GstBaseSrc *src;
|
GstBaseSrc *src;
|
||||||
GstBaseSrcClass *bclass;
|
GstBaseSrcClass *bclass;
|
||||||
gboolean result = FALSE;
|
gboolean result = FALSE;
|
||||||
|
|
||||||
src = GST_BASE_SRC (gst_pad_get_parent (pad));
|
src = GST_BASE_SRC (parent);
|
||||||
if (G_UNLIKELY (src == NULL)) {
|
|
||||||
gst_event_unref (event);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
bclass = GST_BASE_SRC_GET_CLASS (src);
|
bclass = GST_BASE_SRC_GET_CLASS (src);
|
||||||
|
|
||||||
if (bclass->event) {
|
if (bclass->event) {
|
||||||
|
@ -1835,7 +1831,6 @@ gst_base_src_event_handler (GstPad * pad, GstEvent * event)
|
||||||
|
|
||||||
done:
|
done:
|
||||||
gst_event_unref (event);
|
gst_event_unref (event);
|
||||||
gst_object_unref (src);
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
|
@ -2331,13 +2326,13 @@ eos:
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_base_src_pad_get_range (GstPad * pad, guint64 offset, guint length,
|
gst_base_src_getrange (GstPad * pad, GstObject * parent, guint64 offset,
|
||||||
GstBuffer ** buf)
|
guint length, GstBuffer ** buf)
|
||||||
{
|
{
|
||||||
GstBaseSrc *src;
|
GstBaseSrc *src;
|
||||||
GstFlowReturn res;
|
GstFlowReturn res;
|
||||||
|
|
||||||
src = GST_BASE_SRC_CAST (gst_object_ref (GST_OBJECT_PARENT (pad)));
|
src = GST_BASE_SRC_CAST (parent);
|
||||||
|
|
||||||
GST_LIVE_LOCK (src);
|
GST_LIVE_LOCK (src);
|
||||||
if (G_UNLIKELY (src->priv->flushing))
|
if (G_UNLIKELY (src->priv->flushing))
|
||||||
|
@ -2348,8 +2343,6 @@ gst_base_src_pad_get_range (GstPad * pad, guint64 offset, guint length,
|
||||||
done:
|
done:
|
||||||
GST_LIVE_UNLOCK (src);
|
GST_LIVE_UNLOCK (src);
|
||||||
|
|
||||||
gst_object_unref (src);
|
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
|
|
|
@ -307,15 +307,17 @@ static gboolean gst_base_transform_activate (GstBaseTransform * trans,
|
||||||
static gboolean gst_base_transform_get_unit_size (GstBaseTransform * trans,
|
static gboolean gst_base_transform_get_unit_size (GstBaseTransform * trans,
|
||||||
GstCaps * caps, gsize * size);
|
GstCaps * caps, gsize * size);
|
||||||
|
|
||||||
static gboolean gst_base_transform_src_event (GstPad * pad, GstEvent * event);
|
static gboolean gst_base_transform_src_event (GstPad * pad, GstObject * parent,
|
||||||
|
GstEvent * event);
|
||||||
static gboolean gst_base_transform_src_eventfunc (GstBaseTransform * trans,
|
static gboolean gst_base_transform_src_eventfunc (GstBaseTransform * trans,
|
||||||
GstEvent * event);
|
GstEvent * event);
|
||||||
static gboolean gst_base_transform_sink_event (GstPad * pad, GstEvent * event);
|
static gboolean gst_base_transform_sink_event (GstPad * pad, GstObject * parent,
|
||||||
|
GstEvent * event);
|
||||||
static gboolean gst_base_transform_sink_eventfunc (GstBaseTransform * trans,
|
static gboolean gst_base_transform_sink_eventfunc (GstBaseTransform * trans,
|
||||||
GstEvent * event);
|
GstEvent * event);
|
||||||
static GstFlowReturn gst_base_transform_getrange (GstPad * pad, guint64 offset,
|
static GstFlowReturn gst_base_transform_getrange (GstPad * pad,
|
||||||
guint length, GstBuffer ** buffer);
|
GstObject * parent, guint64 offset, guint length, GstBuffer ** buffer);
|
||||||
static GstFlowReturn gst_base_transform_chain (GstPad * pad,
|
static GstFlowReturn gst_base_transform_chain (GstPad * pad, GstObject * parent,
|
||||||
GstBuffer * buffer);
|
GstBuffer * buffer);
|
||||||
static GstCaps *gst_base_transform_default_transform_caps (GstBaseTransform *
|
static GstCaps *gst_base_transform_default_transform_caps (GstBaseTransform *
|
||||||
trans, GstPadDirection direction, GstCaps * caps, GstCaps * filter);
|
trans, GstPadDirection direction, GstCaps * caps, GstCaps * filter);
|
||||||
|
@ -1565,17 +1567,14 @@ gst_base_transform_get_unit_size (GstBaseTransform * trans, GstCaps * caps,
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_base_transform_sink_event (GstPad * pad, GstEvent * event)
|
gst_base_transform_sink_event (GstPad * pad, GstObject * parent,
|
||||||
|
GstEvent * event)
|
||||||
{
|
{
|
||||||
GstBaseTransform *trans;
|
GstBaseTransform *trans;
|
||||||
GstBaseTransformClass *bclass;
|
GstBaseTransformClass *bclass;
|
||||||
gboolean ret = TRUE;
|
gboolean ret = TRUE;
|
||||||
|
|
||||||
trans = GST_BASE_TRANSFORM (gst_pad_get_parent (pad));
|
trans = GST_BASE_TRANSFORM (parent);
|
||||||
if (G_UNLIKELY (trans == NULL)) {
|
|
||||||
gst_event_unref (event);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
bclass = GST_BASE_TRANSFORM_GET_CLASS (trans);
|
bclass = GST_BASE_TRANSFORM_GET_CLASS (trans);
|
||||||
|
|
||||||
if (bclass->sink_event)
|
if (bclass->sink_event)
|
||||||
|
@ -1583,8 +1582,6 @@ gst_base_transform_sink_event (GstPad * pad, GstEvent * event)
|
||||||
else
|
else
|
||||||
gst_event_unref (event);
|
gst_event_unref (event);
|
||||||
|
|
||||||
gst_object_unref (trans);
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1646,18 +1643,14 @@ gst_base_transform_sink_eventfunc (GstBaseTransform * trans, GstEvent * event)
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_base_transform_src_event (GstPad * pad, GstEvent * event)
|
gst_base_transform_src_event (GstPad * pad, GstObject * parent,
|
||||||
|
GstEvent * event)
|
||||||
{
|
{
|
||||||
GstBaseTransform *trans;
|
GstBaseTransform *trans;
|
||||||
GstBaseTransformClass *bclass;
|
GstBaseTransformClass *bclass;
|
||||||
gboolean ret = TRUE;
|
gboolean ret = TRUE;
|
||||||
|
|
||||||
trans = GST_BASE_TRANSFORM (gst_pad_get_parent (pad));
|
trans = GST_BASE_TRANSFORM (parent);
|
||||||
if (G_UNLIKELY (trans == NULL)) {
|
|
||||||
gst_event_unref (event);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
bclass = GST_BASE_TRANSFORM_GET_CLASS (trans);
|
bclass = GST_BASE_TRANSFORM_GET_CLASS (trans);
|
||||||
|
|
||||||
if (bclass->src_event)
|
if (bclass->src_event)
|
||||||
|
@ -1665,8 +1658,6 @@ gst_base_transform_src_event (GstPad * pad, GstEvent * event)
|
||||||
else
|
else
|
||||||
gst_event_unref (event);
|
gst_event_unref (event);
|
||||||
|
|
||||||
gst_object_unref (trans);
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1947,7 +1938,7 @@ no_buffer:
|
||||||
* end based on the transform_size result.
|
* end based on the transform_size result.
|
||||||
*/
|
*/
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_base_transform_getrange (GstPad * pad, guint64 offset,
|
gst_base_transform_getrange (GstPad * pad, GstObject * parent, guint64 offset,
|
||||||
guint length, GstBuffer ** buffer)
|
guint length, GstBuffer ** buffer)
|
||||||
{
|
{
|
||||||
GstBaseTransform *trans;
|
GstBaseTransform *trans;
|
||||||
|
@ -1955,7 +1946,7 @@ gst_base_transform_getrange (GstPad * pad, guint64 offset,
|
||||||
GstFlowReturn ret;
|
GstFlowReturn ret;
|
||||||
GstBuffer *inbuf;
|
GstBuffer *inbuf;
|
||||||
|
|
||||||
trans = GST_BASE_TRANSFORM (gst_pad_get_parent (pad));
|
trans = GST_BASE_TRANSFORM (parent);
|
||||||
|
|
||||||
ret = gst_pad_pull_range (trans->sinkpad, offset, length, &inbuf);
|
ret = gst_pad_pull_range (trans->sinkpad, offset, length, &inbuf);
|
||||||
if (G_UNLIKELY (ret != GST_FLOW_OK))
|
if (G_UNLIKELY (ret != GST_FLOW_OK))
|
||||||
|
@ -1970,8 +1961,6 @@ gst_base_transform_getrange (GstPad * pad, guint64 offset,
|
||||||
GST_BASE_TRANSFORM_UNLOCK (trans);
|
GST_BASE_TRANSFORM_UNLOCK (trans);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
gst_object_unref (trans);
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
|
@ -1984,7 +1973,7 @@ pull_error:
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_base_transform_chain (GstPad * pad, GstBuffer * buffer)
|
gst_base_transform_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||||
{
|
{
|
||||||
GstBaseTransform *trans;
|
GstBaseTransform *trans;
|
||||||
GstBaseTransformClass *klass;
|
GstBaseTransformClass *klass;
|
||||||
|
@ -1993,7 +1982,7 @@ gst_base_transform_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
GstClockTime timestamp, duration;
|
GstClockTime timestamp, duration;
|
||||||
GstBuffer *outbuf = NULL;
|
GstBuffer *outbuf = NULL;
|
||||||
|
|
||||||
trans = GST_BASE_TRANSFORM (GST_OBJECT_PARENT (pad));
|
trans = GST_BASE_TRANSFORM (parent);
|
||||||
|
|
||||||
timestamp = GST_BUFFER_TIMESTAMP (buffer);
|
timestamp = GST_BUFFER_TIMESTAMP (buffer);
|
||||||
duration = GST_BUFFER_DURATION (buffer);
|
duration = GST_BUFFER_DURATION (buffer);
|
||||||
|
|
|
@ -91,8 +91,10 @@ G_DEFINE_TYPE (GstCollectPads, gst_collect_pads, GST_TYPE_OBJECT);
|
||||||
|
|
||||||
static void gst_collect_pads_clear (GstCollectPads * pads,
|
static void gst_collect_pads_clear (GstCollectPads * pads,
|
||||||
GstCollectData * data);
|
GstCollectData * data);
|
||||||
static GstFlowReturn gst_collect_pads_chain (GstPad * pad, GstBuffer * buffer);
|
static GstFlowReturn gst_collect_pads_chain (GstPad * pad, GstObject * parent,
|
||||||
static gboolean gst_collect_pads_event (GstPad * pad, GstEvent * event);
|
GstBuffer * buffer);
|
||||||
|
static gboolean gst_collect_pads_event (GstPad * pad, GstObject * parent,
|
||||||
|
GstEvent * event);
|
||||||
static void gst_collect_pads_finalize (GObject * object);
|
static void gst_collect_pads_finalize (GObject * object);
|
||||||
static void ref_data (GstCollectData * data);
|
static void ref_data (GstCollectData * data);
|
||||||
static void unref_data (GstCollectData * data);
|
static void unref_data (GstCollectData * data);
|
||||||
|
@ -1062,7 +1064,7 @@ gst_collect_pads_check_collected (GstCollectPads * pads)
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_collect_pads_event (GstPad * pad, GstEvent * event)
|
gst_collect_pads_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
{
|
{
|
||||||
gboolean res;
|
gboolean res;
|
||||||
GstCollectData *data;
|
GstCollectData *data;
|
||||||
|
@ -1087,7 +1089,7 @@ gst_collect_pads_event (GstPad * pad, GstEvent * event)
|
||||||
case GST_EVENT_FLUSH_START:
|
case GST_EVENT_FLUSH_START:
|
||||||
{
|
{
|
||||||
/* forward event to unblock check_collected */
|
/* forward event to unblock check_collected */
|
||||||
gst_pad_event_default (pad, event);
|
gst_pad_event_default (pad, parent, event);
|
||||||
|
|
||||||
/* now unblock the chain function.
|
/* now unblock the chain function.
|
||||||
* no cond per pad, so they all unblock,
|
* no cond per pad, so they all unblock,
|
||||||
|
@ -1176,7 +1178,7 @@ gst_collect_pads_event (GstPad * pad, GstEvent * event)
|
||||||
forward:
|
forward:
|
||||||
GST_DEBUG_OBJECT (pads, "forward unhandled event: %s",
|
GST_DEBUG_OBJECT (pads, "forward unhandled event: %s",
|
||||||
GST_EVENT_TYPE_NAME (event));
|
GST_EVENT_TYPE_NAME (event));
|
||||||
res = gst_pad_event_default (pad, event);
|
res = gst_pad_event_default (pad, parent, event);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
unref_data (data);
|
unref_data (data);
|
||||||
|
@ -1198,7 +1200,7 @@ pad_removed:
|
||||||
* collected
|
* collected
|
||||||
*/
|
*/
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_collect_pads_chain (GstPad * pad, GstBuffer * buffer)
|
gst_collect_pads_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||||
{
|
{
|
||||||
GstCollectData *data;
|
GstCollectData *data;
|
||||||
GstCollectPads *pads;
|
GstCollectPads *pads;
|
||||||
|
|
|
@ -92,8 +92,10 @@ G_DEFINE_TYPE (GstCollectPads2, gst_collect_pads2, GST_TYPE_OBJECT);
|
||||||
|
|
||||||
static void gst_collect_pads2_clear (GstCollectPads2 * pads,
|
static void gst_collect_pads2_clear (GstCollectPads2 * pads,
|
||||||
GstCollectData2 * data);
|
GstCollectData2 * data);
|
||||||
static GstFlowReturn gst_collect_pads2_chain (GstPad * pad, GstBuffer * buffer);
|
static GstFlowReturn gst_collect_pads2_chain (GstPad * pad, GstObject * parent,
|
||||||
static gboolean gst_collect_pads2_event (GstPad * pad, GstEvent * event);
|
GstBuffer * buffer);
|
||||||
|
static gboolean gst_collect_pads2_event (GstPad * pad, GstObject * parent,
|
||||||
|
GstEvent * event);
|
||||||
static void gst_collect_pads2_finalize (GObject * object);
|
static void gst_collect_pads2_finalize (GObject * object);
|
||||||
static GstFlowReturn gst_collect_pads2_default_collected (GstCollectPads2 *
|
static GstFlowReturn gst_collect_pads2_default_collected (GstCollectPads2 *
|
||||||
pads, gpointer user_data);
|
pads, gpointer user_data);
|
||||||
|
@ -1536,7 +1538,7 @@ gst_collect_pads2_default_compare_func (GstCollectPads2 * pads,
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_collect_pads2_event (GstPad * pad, GstEvent * event)
|
gst_collect_pads2_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
{
|
{
|
||||||
gboolean res = FALSE, need_unlock = FALSE;
|
gboolean res = FALSE, need_unlock = FALSE;
|
||||||
GstCollectData2 *data;
|
GstCollectData2 *data;
|
||||||
|
@ -1573,7 +1575,7 @@ gst_collect_pads2_event (GstPad * pad, GstEvent * event)
|
||||||
if (event_func)
|
if (event_func)
|
||||||
res = event_func (pads, data, event, event_user_data);
|
res = event_func (pads, data, event, event_user_data);
|
||||||
if (!res)
|
if (!res)
|
||||||
res = gst_pad_event_default (pad, event);
|
res = gst_pad_event_default (pad, parent, event);
|
||||||
|
|
||||||
/* now unblock the chain function.
|
/* now unblock the chain function.
|
||||||
* no cond per pad, so they all unblock,
|
* no cond per pad, so they all unblock,
|
||||||
|
@ -1702,7 +1704,7 @@ forward_or_default:
|
||||||
if (event_func)
|
if (event_func)
|
||||||
res = event_func (pads, data, event, event_user_data);
|
res = event_func (pads, data, event, event_user_data);
|
||||||
if (!res)
|
if (!res)
|
||||||
res = gst_pad_event_default (pad, event);
|
res = gst_pad_event_default (pad, parent, event);
|
||||||
if (need_unlock)
|
if (need_unlock)
|
||||||
GST_COLLECT_PADS2_STREAM_UNLOCK (pads);
|
GST_COLLECT_PADS2_STREAM_UNLOCK (pads);
|
||||||
goto done;
|
goto done;
|
||||||
|
@ -1742,7 +1744,7 @@ pad_removed:
|
||||||
* collected
|
* collected
|
||||||
*/
|
*/
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_collect_pads2_chain (GstPad * pad, GstBuffer * buffer)
|
gst_collect_pads2_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||||
{
|
{
|
||||||
GstCollectData2 *data;
|
GstCollectData2 *data;
|
||||||
GstCollectPads2 *pads;
|
GstCollectPads2 *pads;
|
||||||
|
|
|
@ -160,9 +160,9 @@ gst_check_message_error (GstMessage * message, GstMessageType type,
|
||||||
|
|
||||||
/* helper functions */
|
/* helper functions */
|
||||||
GstFlowReturn
|
GstFlowReturn
|
||||||
gst_check_chain_func (GstPad * pad, GstBuffer * buffer)
|
gst_check_chain_func (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||||
{
|
{
|
||||||
GST_DEBUG ("chain_func: received buffer %p", buffer);
|
GST_DEBUG_OBJECT (pad, "chain_func: received buffer %p", buffer);
|
||||||
buffers = g_list_append (buffers, buffer);
|
buffers = g_list_append (buffers, buffer);
|
||||||
|
|
||||||
g_mutex_lock (check_mutex);
|
g_mutex_lock (check_mutex);
|
||||||
|
|
|
@ -64,7 +64,7 @@ GstCheckABIStruct;
|
||||||
|
|
||||||
void gst_check_init (int *argc, char **argv[]);
|
void gst_check_init (int *argc, char **argv[]);
|
||||||
|
|
||||||
GstFlowReturn gst_check_chain_func (GstPad * pad, GstBuffer * buffer);
|
GstFlowReturn gst_check_chain_func (GstPad * pad, GstObject * parent, GstBuffer * buffer);
|
||||||
|
|
||||||
void gst_check_message_error (GstMessage * message, GstMessageType type,
|
void gst_check_message_error (GstMessage * message, GstMessageType type,
|
||||||
GQuark domain, gint code);
|
GQuark domain, gint code);
|
||||||
|
|
|
@ -116,12 +116,15 @@ static GstPad *gst_funnel_request_new_pad (GstElement * element,
|
||||||
GstPadTemplate * templ, const gchar * name, const GstCaps * caps);
|
GstPadTemplate * templ, const gchar * name, const GstCaps * caps);
|
||||||
static void gst_funnel_release_pad (GstElement * element, GstPad * pad);
|
static void gst_funnel_release_pad (GstElement * element, GstPad * pad);
|
||||||
|
|
||||||
static GstFlowReturn gst_funnel_sink_chain (GstPad * pad, GstBuffer * buffer);
|
static GstFlowReturn gst_funnel_sink_chain (GstPad * pad, GstObject * parent,
|
||||||
static gboolean gst_funnel_sink_event (GstPad * pad, GstEvent * event);
|
GstBuffer * buffer);
|
||||||
|
static gboolean gst_funnel_sink_event (GstPad * pad, GstObject * parent,
|
||||||
|
GstEvent * event);
|
||||||
static gboolean gst_funnel_sink_query (GstPad * pad, GstObject * parent,
|
static gboolean gst_funnel_sink_query (GstPad * pad, GstObject * parent,
|
||||||
GstQuery * query);
|
GstQuery * query);
|
||||||
|
|
||||||
static gboolean gst_funnel_src_event (GstPad * pad, GstEvent * event);
|
static gboolean gst_funnel_src_event (GstPad * pad, GstObject * parent,
|
||||||
|
GstEvent * event);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_funnel_dispose (GObject * object)
|
gst_funnel_dispose (GObject * object)
|
||||||
|
@ -213,10 +216,10 @@ gst_funnel_release_pad (GstElement * element, GstPad * pad)
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_funnel_sink_chain (GstPad * pad, GstBuffer * buffer)
|
gst_funnel_sink_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||||
{
|
{
|
||||||
GstFlowReturn res;
|
GstFlowReturn res;
|
||||||
GstFunnel *funnel = GST_FUNNEL (GST_PAD_PARENT (pad));
|
GstFunnel *funnel = GST_FUNNEL (parent);
|
||||||
GstFunnelPad *fpad = GST_FUNNEL_PAD_CAST (pad);
|
GstFunnelPad *fpad = GST_FUNNEL_PAD_CAST (pad);
|
||||||
GstEvent *event = NULL;
|
GstEvent *event = NULL;
|
||||||
GstClockTime newts;
|
GstClockTime newts;
|
||||||
|
@ -281,9 +284,9 @@ out:
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_funnel_sink_event (GstPad * pad, GstEvent * event)
|
gst_funnel_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
{
|
{
|
||||||
GstFunnel *funnel = GST_FUNNEL (GST_PAD_PARENT (pad));
|
GstFunnel *funnel = GST_FUNNEL (parent);
|
||||||
GstFunnelPad *fpad = GST_FUNNEL_PAD_CAST (pad);
|
GstFunnelPad *fpad = GST_FUNNEL_PAD_CAST (pad);
|
||||||
gboolean forward = TRUE;
|
gboolean forward = TRUE;
|
||||||
gboolean res = TRUE;
|
gboolean res = TRUE;
|
||||||
|
@ -332,7 +335,7 @@ gst_funnel_sink_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_funnel_src_event (GstPad * pad, GstEvent * event)
|
gst_funnel_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
{
|
{
|
||||||
GstElement *funnel;
|
GstElement *funnel;
|
||||||
GstIterator *iter;
|
GstIterator *iter;
|
||||||
|
@ -341,7 +344,7 @@ gst_funnel_src_event (GstPad * pad, GstEvent * event)
|
||||||
gboolean done = FALSE;
|
gboolean done = FALSE;
|
||||||
GValue value = { 0, };
|
GValue value = { 0, };
|
||||||
|
|
||||||
funnel = GST_ELEMENT_CAST (GST_PAD_PARENT (pad));
|
funnel = GST_ELEMENT_CAST (parent);
|
||||||
|
|
||||||
iter = gst_element_iterate_sink_pads (funnel);
|
iter = gst_element_iterate_sink_pads (funnel);
|
||||||
|
|
||||||
|
|
|
@ -361,7 +361,7 @@ gst_identity_sink_event (GstBaseTransform * trans, GstEvent * event)
|
||||||
gst_segment_init (&segment, segment.format);
|
gst_segment_init (&segment, segment.format);
|
||||||
news = gst_event_new_segment (&segment);
|
news = gst_event_new_segment (&segment);
|
||||||
|
|
||||||
gst_pad_event_default (trans->sinkpad, news);
|
gst_pad_event_default (trans->sinkpad, GST_OBJECT_CAST (trans), news);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -372,7 +372,6 @@ gst_identity_sink_event (GstBaseTransform * trans, GstEvent * event)
|
||||||
identity->prev_offset = identity->prev_offset_end = GST_BUFFER_OFFSET_NONE;
|
identity->prev_offset = identity->prev_offset_end = GST_BUFFER_OFFSET_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (identity->single_segment && (GST_EVENT_TYPE (event) == GST_EVENT_SEGMENT)) {
|
if (identity->single_segment && (GST_EVENT_TYPE (event) == GST_EVENT_SEGMENT)) {
|
||||||
/* eat up segments */
|
/* eat up segments */
|
||||||
gst_event_unref (event);
|
gst_event_unref (event);
|
||||||
|
|
|
@ -178,12 +178,14 @@ static void gst_selector_pad_set_property (GObject * object,
|
||||||
|
|
||||||
static gint64 gst_selector_pad_get_running_time (GstSelectorPad * pad);
|
static gint64 gst_selector_pad_get_running_time (GstSelectorPad * pad);
|
||||||
static void gst_selector_pad_reset (GstSelectorPad * pad);
|
static void gst_selector_pad_reset (GstSelectorPad * pad);
|
||||||
static gboolean gst_selector_pad_event (GstPad * pad, GstEvent * event);
|
static gboolean gst_selector_pad_event (GstPad * pad, GstObject * parent,
|
||||||
|
GstEvent * event);
|
||||||
static gboolean gst_selector_pad_query (GstPad * pad, GstObject * parent,
|
static gboolean gst_selector_pad_query (GstPad * pad, GstObject * parent,
|
||||||
GstQuery * query);
|
GstQuery * query);
|
||||||
static GstIterator *gst_selector_pad_iterate_linked_pads (GstPad * pad,
|
static GstIterator *gst_selector_pad_iterate_linked_pads (GstPad * pad,
|
||||||
GstObject * parent);
|
GstObject * parent);
|
||||||
static GstFlowReturn gst_selector_pad_chain (GstPad * pad, GstBuffer * buf);
|
static GstFlowReturn gst_selector_pad_chain (GstPad * pad, GstObject * parent,
|
||||||
|
GstBuffer * buf);
|
||||||
|
|
||||||
G_DEFINE_TYPE (GstSelectorPad, gst_selector_pad, GST_TYPE_PAD);
|
G_DEFINE_TYPE (GstSelectorPad, gst_selector_pad, GST_TYPE_PAD);
|
||||||
|
|
||||||
|
@ -353,7 +355,7 @@ gst_selector_pad_iterate_linked_pads (GstPad * pad, GstObject * parent)
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_selector_pad_event (GstPad * pad, GstEvent * event)
|
gst_selector_pad_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
{
|
{
|
||||||
gboolean res = TRUE;
|
gboolean res = TRUE;
|
||||||
gboolean forward;
|
gboolean forward;
|
||||||
|
@ -362,7 +364,7 @@ gst_selector_pad_event (GstPad * pad, GstEvent * event)
|
||||||
GstPad *prev_active_sinkpad;
|
GstPad *prev_active_sinkpad;
|
||||||
GstPad *active_sinkpad;
|
GstPad *active_sinkpad;
|
||||||
|
|
||||||
sel = GST_INPUT_SELECTOR (GST_PAD_PARENT (pad));
|
sel = GST_INPUT_SELECTOR (parent);
|
||||||
selpad = GST_SELECTOR_PAD_CAST (pad);
|
selpad = GST_SELECTOR_PAD_CAST (pad);
|
||||||
|
|
||||||
GST_INPUT_SELECTOR_LOCK (sel);
|
GST_INPUT_SELECTOR_LOCK (sel);
|
||||||
|
@ -610,7 +612,7 @@ gst_input_selector_wait_running_time (GstInputSelector * sel,
|
||||||
|
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_selector_pad_chain (GstPad * pad, GstBuffer * buf)
|
gst_selector_pad_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
|
||||||
{
|
{
|
||||||
GstInputSelector *sel;
|
GstInputSelector *sel;
|
||||||
GstFlowReturn res;
|
GstFlowReturn res;
|
||||||
|
@ -621,7 +623,7 @@ gst_selector_pad_chain (GstPad * pad, GstBuffer * buf)
|
||||||
GstSegment *seg;
|
GstSegment *seg;
|
||||||
GstEvent *start_event = NULL;
|
GstEvent *start_event = NULL;
|
||||||
|
|
||||||
sel = GST_INPUT_SELECTOR (GST_PAD_PARENT (pad));
|
sel = GST_INPUT_SELECTOR (parent);
|
||||||
selpad = GST_SELECTOR_PAD_CAST (pad);
|
selpad = GST_SELECTOR_PAD_CAST (pad);
|
||||||
seg = &selpad->segment;
|
seg = &selpad->segment;
|
||||||
|
|
||||||
|
@ -754,7 +756,8 @@ static void gst_input_selector_release_pad (GstElement * element, GstPad * pad);
|
||||||
static GstStateChangeReturn gst_input_selector_change_state (GstElement *
|
static GstStateChangeReturn gst_input_selector_change_state (GstElement *
|
||||||
element, GstStateChange transition);
|
element, GstStateChange transition);
|
||||||
|
|
||||||
static gboolean gst_input_selector_event (GstPad * pad, GstEvent * event);
|
static gboolean gst_input_selector_event (GstPad * pad, GstObject * parent,
|
||||||
|
GstEvent * event);
|
||||||
static gboolean gst_input_selector_query (GstPad * pad, GstObject * parent,
|
static gboolean gst_input_selector_query (GstPad * pad, GstObject * parent,
|
||||||
GstQuery * query);
|
GstQuery * query);
|
||||||
static gint64 gst_input_selector_block (GstInputSelector * self);
|
static gint64 gst_input_selector_block (GstInputSelector * self);
|
||||||
|
@ -1026,7 +1029,7 @@ gst_input_selector_get_linked_pad (GstInputSelector * sel, GstPad * pad,
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_input_selector_event (GstPad * pad, GstEvent * event)
|
gst_input_selector_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
{
|
{
|
||||||
GstInputSelector *sel;
|
GstInputSelector *sel;
|
||||||
gboolean result = FALSE;
|
gboolean result = FALSE;
|
||||||
|
@ -1036,7 +1039,7 @@ gst_input_selector_event (GstPad * pad, GstEvent * event)
|
||||||
GstPad *eventpad;
|
GstPad *eventpad;
|
||||||
GList *pushed_pads = NULL;
|
GList *pushed_pads = NULL;
|
||||||
|
|
||||||
sel = GST_INPUT_SELECTOR (GST_PAD_PARENT (pad));
|
sel = GST_INPUT_SELECTOR (parent);
|
||||||
/* Send upstream events to all sinkpads */
|
/* Send upstream events to all sinkpads */
|
||||||
iter = gst_element_iterate_sink_pads (GST_ELEMENT_CAST (sel));
|
iter = gst_element_iterate_sink_pads (GST_ELEMENT_CAST (sel));
|
||||||
|
|
||||||
|
|
|
@ -1330,7 +1330,7 @@ out_flushing:
|
||||||
* _ we push with a unique id (curid)
|
* _ we push with a unique id (curid)
|
||||||
*/
|
*/
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_multi_queue_chain (GstPad * pad, GstBuffer * buffer)
|
gst_multi_queue_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||||
{
|
{
|
||||||
GstSingleQueue *sq;
|
GstSingleQueue *sq;
|
||||||
GstMultiQueue *mq;
|
GstMultiQueue *mq;
|
||||||
|
@ -1400,7 +1400,7 @@ gst_multi_queue_sink_activate_push (GstPad * pad, gboolean active)
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_multi_queue_sink_event (GstPad * pad, GstEvent * event)
|
gst_multi_queue_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
{
|
{
|
||||||
GstSingleQueue *sq;
|
GstSingleQueue *sq;
|
||||||
GstMultiQueue *mq;
|
GstMultiQueue *mq;
|
||||||
|
@ -1411,7 +1411,7 @@ gst_multi_queue_sink_event (GstPad * pad, GstEvent * event)
|
||||||
GstEvent *sref = NULL;
|
GstEvent *sref = NULL;
|
||||||
|
|
||||||
sq = (GstSingleQueue *) gst_pad_get_element_private (pad);
|
sq = (GstSingleQueue *) gst_pad_get_element_private (pad);
|
||||||
mq = (GstMultiQueue *) GST_PAD_PARENT (pad);
|
mq = (GstMultiQueue *) parent;
|
||||||
|
|
||||||
type = GST_EVENT_TYPE (event);
|
type = GST_EVENT_TYPE (event);
|
||||||
|
|
||||||
|
@ -1541,7 +1541,7 @@ gst_multi_queue_src_activate_push (GstPad * pad, gboolean active)
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_multi_queue_src_event (GstPad * pad, GstEvent * event)
|
gst_multi_queue_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
{
|
{
|
||||||
GstSingleQueue *sq = gst_pad_get_element_private (pad);
|
GstSingleQueue *sq = gst_pad_get_element_private (pad);
|
||||||
|
|
||||||
|
|
|
@ -102,10 +102,12 @@ static GstPad *gst_output_selector_request_new_pad (GstElement * element,
|
||||||
GstPadTemplate * templ, const gchar * unused, const GstCaps * caps);
|
GstPadTemplate * templ, const gchar * unused, const GstCaps * caps);
|
||||||
static void gst_output_selector_release_pad (GstElement * element,
|
static void gst_output_selector_release_pad (GstElement * element,
|
||||||
GstPad * pad);
|
GstPad * pad);
|
||||||
static GstFlowReturn gst_output_selector_chain (GstPad * pad, GstBuffer * buf);
|
static GstFlowReturn gst_output_selector_chain (GstPad * pad,
|
||||||
|
GstObject * parent, GstBuffer * buf);
|
||||||
static GstStateChangeReturn gst_output_selector_change_state (GstElement *
|
static GstStateChangeReturn gst_output_selector_change_state (GstElement *
|
||||||
element, GstStateChange transition);
|
element, GstStateChange transition);
|
||||||
static gboolean gst_output_selector_event (GstPad * pad, GstEvent * event);
|
static gboolean gst_output_selector_event (GstPad * pad, GstObject * parent,
|
||||||
|
GstEvent * event);
|
||||||
static gboolean gst_output_selector_query (GstPad * pad, GstObject * parent,
|
static gboolean gst_output_selector_query (GstPad * pad, GstObject * parent,
|
||||||
GstQuery * query);
|
GstQuery * query);
|
||||||
static void gst_output_selector_switch_pad_negotiation_mode (GstOutputSelector *
|
static void gst_output_selector_switch_pad_negotiation_mode (GstOutputSelector *
|
||||||
|
@ -416,13 +418,13 @@ gst_output_selector_switch (GstOutputSelector * osel)
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_output_selector_chain (GstPad * pad, GstBuffer * buf)
|
gst_output_selector_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
|
||||||
{
|
{
|
||||||
GstFlowReturn res;
|
GstFlowReturn res;
|
||||||
GstOutputSelector *osel;
|
GstOutputSelector *osel;
|
||||||
GstClockTime position, duration;
|
GstClockTime position, duration;
|
||||||
|
|
||||||
osel = GST_OUTPUT_SELECTOR (GST_PAD_PARENT (pad));
|
osel = GST_OUTPUT_SELECTOR (parent);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The _switch function might push a buffer if 'resend-latest' is true.
|
* The _switch function might push a buffer if 'resend-latest' is true.
|
||||||
|
@ -500,13 +502,13 @@ gst_output_selector_change_state (GstElement * element,
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_output_selector_event (GstPad * pad, GstEvent * event)
|
gst_output_selector_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
{
|
{
|
||||||
gboolean res = TRUE;
|
gboolean res = TRUE;
|
||||||
GstOutputSelector *sel;
|
GstOutputSelector *sel;
|
||||||
GstPad *active = NULL;
|
GstPad *active = NULL;
|
||||||
|
|
||||||
sel = GST_OUTPUT_SELECTOR (GST_PAD_PARENT (pad));
|
sel = GST_OUTPUT_SELECTOR (parent);
|
||||||
|
|
||||||
switch (GST_EVENT_TYPE (event)) {
|
switch (GST_EVENT_TYPE (event)) {
|
||||||
case GST_EVENT_CAPS:
|
case GST_EVENT_CAPS:
|
||||||
|
@ -514,7 +516,7 @@ gst_output_selector_event (GstPad * pad, GstEvent * event)
|
||||||
switch (sel->pad_negotiation_mode) {
|
switch (sel->pad_negotiation_mode) {
|
||||||
case GST_OUTPUT_SELECTOR_PAD_NEGOTIATION_MODE_ALL:
|
case GST_OUTPUT_SELECTOR_PAD_NEGOTIATION_MODE_ALL:
|
||||||
/* Send caps to all src pads */
|
/* Send caps to all src pads */
|
||||||
res = gst_pad_event_default (pad, event);
|
res = gst_pad_event_default (pad, parent, event);
|
||||||
break;
|
break;
|
||||||
case GST_OUTPUT_SELECTOR_PAD_NEGOTIATION_MODE_NONE:
|
case GST_OUTPUT_SELECTOR_PAD_NEGOTIATION_MODE_NONE:
|
||||||
gst_event_unref (event);
|
gst_event_unref (event);
|
||||||
|
@ -539,12 +541,12 @@ gst_output_selector_event (GstPad * pad, GstEvent * event)
|
||||||
&sel->segment);
|
&sel->segment);
|
||||||
|
|
||||||
/* Send newsegment to all src pads */
|
/* Send newsegment to all src pads */
|
||||||
res = gst_pad_event_default (pad, event);
|
res = gst_pad_event_default (pad, parent, event);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GST_EVENT_EOS:
|
case GST_EVENT_EOS:
|
||||||
/* Send eos to all src pads */
|
/* Send eos to all src pads */
|
||||||
res = gst_pad_event_default (pad, event);
|
res = gst_pad_event_default (pad, parent, event);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
|
|
|
@ -192,15 +192,18 @@ static void gst_queue_set_property (GObject * object,
|
||||||
static void gst_queue_get_property (GObject * object,
|
static void gst_queue_get_property (GObject * object,
|
||||||
guint prop_id, GValue * value, GParamSpec * pspec);
|
guint prop_id, GValue * value, GParamSpec * pspec);
|
||||||
|
|
||||||
static GstFlowReturn gst_queue_chain (GstPad * pad, GstBuffer * buffer);
|
static GstFlowReturn gst_queue_chain (GstPad * pad, GstObject * parent,
|
||||||
|
GstBuffer * buffer);
|
||||||
static GstFlowReturn gst_queue_push_one (GstQueue * queue);
|
static GstFlowReturn gst_queue_push_one (GstQueue * queue);
|
||||||
static void gst_queue_loop (GstPad * pad);
|
static void gst_queue_loop (GstPad * pad);
|
||||||
|
|
||||||
static gboolean gst_queue_handle_sink_event (GstPad * pad, GstEvent * event);
|
static gboolean gst_queue_handle_sink_event (GstPad * pad, GstObject * parent,
|
||||||
|
GstEvent * event);
|
||||||
static gboolean gst_queue_handle_sink_query (GstPad * pad, GstObject * parent,
|
static gboolean gst_queue_handle_sink_query (GstPad * pad, GstObject * parent,
|
||||||
GstQuery * query);
|
GstQuery * query);
|
||||||
|
|
||||||
static gboolean gst_queue_handle_src_event (GstPad * pad, GstEvent * event);
|
static gboolean gst_queue_handle_src_event (GstPad * pad, GstObject * parent,
|
||||||
|
GstEvent * event);
|
||||||
static gboolean gst_queue_handle_src_query (GstPad * pad, GstObject * parent,
|
static gboolean gst_queue_handle_src_query (GstPad * pad, GstObject * parent,
|
||||||
GstQuery * query);
|
GstQuery * query);
|
||||||
|
|
||||||
|
@ -726,11 +729,11 @@ no_item:
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_queue_handle_sink_event (GstPad * pad, GstEvent * event)
|
gst_queue_handle_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
{
|
{
|
||||||
GstQueue *queue;
|
GstQueue *queue;
|
||||||
|
|
||||||
queue = GST_QUEUE (GST_PAD_PARENT (pad));
|
queue = GST_QUEUE (parent);
|
||||||
|
|
||||||
switch (GST_EVENT_TYPE (event)) {
|
switch (GST_EVENT_TYPE (event)) {
|
||||||
case GST_EVENT_FLUSH_START:
|
case GST_EVENT_FLUSH_START:
|
||||||
|
@ -875,12 +878,12 @@ gst_queue_leak_downstream (GstQueue * queue)
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_queue_chain (GstPad * pad, GstBuffer * buffer)
|
gst_queue_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||||
{
|
{
|
||||||
GstQueue *queue;
|
GstQueue *queue;
|
||||||
GstClockTime duration, timestamp;
|
GstClockTime duration, timestamp;
|
||||||
|
|
||||||
queue = (GstQueue *) GST_OBJECT_PARENT (pad);
|
queue = GST_QUEUE_CAST (parent);
|
||||||
|
|
||||||
/* we have to lock the queue since we span threads */
|
/* we have to lock the queue since we span threads */
|
||||||
GST_QUEUE_MUTEX_LOCK_CHECK (queue, out_flushing);
|
GST_QUEUE_MUTEX_LOCK_CHECK (queue, out_flushing);
|
||||||
|
@ -1195,10 +1198,10 @@ out_flushing:
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_queue_handle_src_event (GstPad * pad, GstEvent * event)
|
gst_queue_handle_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
{
|
{
|
||||||
gboolean res = TRUE;
|
gboolean res = TRUE;
|
||||||
GstQueue *queue = GST_QUEUE (GST_PAD_PARENT (pad));
|
GstQueue *queue = GST_QUEUE (parent);
|
||||||
|
|
||||||
#ifndef GST_DISABLE_GST_DEBUG
|
#ifndef GST_DISABLE_GST_DEBUG
|
||||||
GST_CAT_DEBUG_OBJECT (queue_dataflow, queue, "got event %p (%d)",
|
GST_CAT_DEBUG_OBJECT (queue_dataflow, queue, "got event %p (%d)",
|
||||||
|
|
|
@ -38,6 +38,8 @@ G_BEGIN_DECLS
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_QUEUE))
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_QUEUE))
|
||||||
#define GST_IS_QUEUE_CLASS(klass) \
|
#define GST_IS_QUEUE_CLASS(klass) \
|
||||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_QUEUE))
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_QUEUE))
|
||||||
|
#define GST_QUEUE_CAST(obj) \
|
||||||
|
((GstQueue *)(obj))
|
||||||
|
|
||||||
typedef struct _GstQueue GstQueue;
|
typedef struct _GstQueue GstQueue;
|
||||||
typedef struct _GstQueueSize GstQueueSize;
|
typedef struct _GstQueueSize GstQueueSize;
|
||||||
|
|
|
@ -223,22 +223,25 @@ static void gst_queue2_set_property (GObject * object,
|
||||||
static void gst_queue2_get_property (GObject * object,
|
static void gst_queue2_get_property (GObject * object,
|
||||||
guint prop_id, GValue * value, GParamSpec * pspec);
|
guint prop_id, GValue * value, GParamSpec * pspec);
|
||||||
|
|
||||||
static GstFlowReturn gst_queue2_chain (GstPad * pad, GstBuffer * buffer);
|
static GstFlowReturn gst_queue2_chain (GstPad * pad, GstObject * parent,
|
||||||
|
GstBuffer * buffer);
|
||||||
static GstFlowReturn gst_queue2_push_one (GstQueue2 * queue);
|
static GstFlowReturn gst_queue2_push_one (GstQueue2 * queue);
|
||||||
static void gst_queue2_loop (GstPad * pad);
|
static void gst_queue2_loop (GstPad * pad);
|
||||||
|
|
||||||
static gboolean gst_queue2_handle_sink_event (GstPad * pad, GstEvent * event);
|
static gboolean gst_queue2_handle_sink_event (GstPad * pad, GstObject * parent,
|
||||||
|
GstEvent * event);
|
||||||
static gboolean gst_queue2_handle_sink_query (GstPad * pad, GstObject * parent,
|
static gboolean gst_queue2_handle_sink_query (GstPad * pad, GstObject * parent,
|
||||||
GstQuery * query);
|
GstQuery * query);
|
||||||
|
|
||||||
static gboolean gst_queue2_handle_src_event (GstPad * pad, GstEvent * event);
|
static gboolean gst_queue2_handle_src_event (GstPad * pad, GstObject * parent,
|
||||||
|
GstEvent * event);
|
||||||
static gboolean gst_queue2_handle_src_query (GstPad * pad, GstObject * parent,
|
static gboolean gst_queue2_handle_src_query (GstPad * pad, GstObject * parent,
|
||||||
GstQuery * query);
|
GstQuery * query);
|
||||||
static gboolean gst_queue2_handle_query (GstElement * element,
|
static gboolean gst_queue2_handle_query (GstElement * element,
|
||||||
GstQuery * query);
|
GstQuery * query);
|
||||||
|
|
||||||
static GstFlowReturn gst_queue2_get_range (GstPad * pad, guint64 offset,
|
static GstFlowReturn gst_queue2_get_range (GstPad * pad, GstObject * parent,
|
||||||
guint length, GstBuffer ** buffer);
|
guint64 offset, guint length, GstBuffer ** buffer);
|
||||||
|
|
||||||
static gboolean gst_queue2_src_activate_pull (GstPad * pad, gboolean active);
|
static gboolean gst_queue2_src_activate_pull (GstPad * pad, gboolean active);
|
||||||
static gboolean gst_queue2_src_activate_push (GstPad * pad, gboolean active);
|
static gboolean gst_queue2_src_activate_push (GstPad * pad, gboolean active);
|
||||||
|
@ -1911,11 +1914,12 @@ no_item:
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_queue2_handle_sink_event (GstPad * pad, GstEvent * event)
|
gst_queue2_handle_sink_event (GstPad * pad, GstObject * parent,
|
||||||
|
GstEvent * event)
|
||||||
{
|
{
|
||||||
GstQueue2 *queue;
|
GstQueue2 *queue;
|
||||||
|
|
||||||
queue = GST_QUEUE2 (GST_OBJECT_PARENT (pad));
|
queue = GST_QUEUE2 (parent);
|
||||||
|
|
||||||
switch (GST_EVENT_TYPE (event)) {
|
switch (GST_EVENT_TYPE (event)) {
|
||||||
case GST_EVENT_FLUSH_START:
|
case GST_EVENT_FLUSH_START:
|
||||||
|
@ -2091,11 +2095,11 @@ gst_queue2_is_filled (GstQueue2 * queue)
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_queue2_chain (GstPad * pad, GstBuffer * buffer)
|
gst_queue2_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||||
{
|
{
|
||||||
GstQueue2 *queue;
|
GstQueue2 *queue;
|
||||||
|
|
||||||
queue = GST_QUEUE2 (GST_OBJECT_PARENT (pad));
|
queue = GST_QUEUE2 (parent);
|
||||||
|
|
||||||
GST_CAT_LOG_OBJECT (queue_dataflow, queue, "received buffer %p of size %"
|
GST_CAT_LOG_OBJECT (queue_dataflow, queue, "received buffer %p of size %"
|
||||||
G_GSIZE_FORMAT ", time %" GST_TIME_FORMAT ", duration %"
|
G_GSIZE_FORMAT ", time %" GST_TIME_FORMAT ", duration %"
|
||||||
|
@ -2322,10 +2326,10 @@ out_flushing:
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_queue2_handle_src_event (GstPad * pad, GstEvent * event)
|
gst_queue2_handle_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
{
|
{
|
||||||
gboolean res = TRUE;
|
gboolean res = TRUE;
|
||||||
GstQueue2 *queue = GST_QUEUE2 (GST_PAD_PARENT (pad));
|
GstQueue2 *queue = GST_QUEUE2 (parent);
|
||||||
|
|
||||||
#ifndef GST_DISABLE_GST_DEBUG
|
#ifndef GST_DISABLE_GST_DEBUG
|
||||||
GST_CAT_DEBUG_OBJECT (queue_dataflow, queue, "got event %p (%s)",
|
GST_CAT_DEBUG_OBJECT (queue_dataflow, queue, "got event %p (%s)",
|
||||||
|
@ -2596,13 +2600,13 @@ gst_queue2_update_upstream_size (GstQueue2 * queue)
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_queue2_get_range (GstPad * pad, guint64 offset, guint length,
|
gst_queue2_get_range (GstPad * pad, GstObject * parent, guint64 offset,
|
||||||
GstBuffer ** buffer)
|
guint length, GstBuffer ** buffer)
|
||||||
{
|
{
|
||||||
GstQueue2 *queue;
|
GstQueue2 *queue;
|
||||||
GstFlowReturn ret;
|
GstFlowReturn ret;
|
||||||
|
|
||||||
queue = GST_QUEUE2_CAST (GST_PAD_PARENT (pad));
|
queue = GST_QUEUE2_CAST (parent);
|
||||||
|
|
||||||
length = (length == -1) ? DEFAULT_BUFFER_SIZE : length;
|
length = (length == -1) ? DEFAULT_BUFFER_SIZE : length;
|
||||||
GST_QUEUE2_MUTEX_LOCK_CHECK (queue, queue->srcresult, out_flushing);
|
GST_QUEUE2_MUTEX_LOCK_CHECK (queue, queue->srcresult, out_flushing);
|
||||||
|
|
|
@ -136,17 +136,20 @@ static void gst_tee_get_property (GObject * object, guint prop_id,
|
||||||
GValue * value, GParamSpec * pspec);
|
GValue * value, GParamSpec * pspec);
|
||||||
static void gst_tee_dispose (GObject * object);
|
static void gst_tee_dispose (GObject * object);
|
||||||
|
|
||||||
static GstFlowReturn gst_tee_chain (GstPad * pad, GstBuffer * buffer);
|
static GstFlowReturn gst_tee_chain (GstPad * pad, GstObject * parent,
|
||||||
static GstFlowReturn gst_tee_chain_list (GstPad * pad, GstBufferList * list);
|
GstBuffer * buffer);
|
||||||
static gboolean gst_tee_sink_event (GstPad * pad, GstEvent * event);
|
static GstFlowReturn gst_tee_chain_list (GstPad * pad, GstObject * parent,
|
||||||
|
GstBufferList * list);
|
||||||
|
static gboolean gst_tee_sink_event (GstPad * pad, GstObject * parent,
|
||||||
|
GstEvent * event);
|
||||||
static gboolean gst_tee_sink_query (GstPad * pad, GstObject * parent,
|
static gboolean gst_tee_sink_query (GstPad * pad, GstObject * parent,
|
||||||
GstQuery * query);
|
GstQuery * query);
|
||||||
static gboolean gst_tee_sink_activate_push (GstPad * pad, gboolean active);
|
static gboolean gst_tee_sink_activate_push (GstPad * pad, gboolean active);
|
||||||
static gboolean gst_tee_src_query (GstPad * pad, GstObject * parent,
|
static gboolean gst_tee_src_query (GstPad * pad, GstObject * parent,
|
||||||
GstQuery * query);
|
GstQuery * query);
|
||||||
static gboolean gst_tee_src_activate_pull (GstPad * pad, gboolean active);
|
static gboolean gst_tee_src_activate_pull (GstPad * pad, gboolean active);
|
||||||
static GstFlowReturn gst_tee_src_get_range (GstPad * pad, guint64 offset,
|
static GstFlowReturn gst_tee_src_get_range (GstPad * pad, GstObject * parent,
|
||||||
guint length, GstBuffer ** buf);
|
guint64 offset, guint length, GstBuffer ** buf);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_tee_dispose (GObject * object)
|
gst_tee_dispose (GObject * object)
|
||||||
|
@ -480,13 +483,13 @@ gst_tee_get_property (GObject * object, guint prop_id, GValue * value,
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_tee_sink_event (GstPad * pad, GstEvent * event)
|
gst_tee_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
{
|
{
|
||||||
gboolean res;
|
gboolean res;
|
||||||
|
|
||||||
switch (GST_EVENT_TYPE (event)) {
|
switch (GST_EVENT_TYPE (event)) {
|
||||||
default:
|
default:
|
||||||
res = gst_pad_event_default (pad, event);
|
res = gst_pad_event_default (pad, parent, event);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -688,12 +691,12 @@ error:
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_tee_chain (GstPad * pad, GstBuffer * buffer)
|
gst_tee_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||||
{
|
{
|
||||||
GstFlowReturn res;
|
GstFlowReturn res;
|
||||||
GstTee *tee;
|
GstTee *tee;
|
||||||
|
|
||||||
tee = GST_TEE_CAST (GST_OBJECT_PARENT (pad));
|
tee = GST_TEE_CAST (parent);
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (tee, "received buffer %p", buffer);
|
GST_DEBUG_OBJECT (tee, "received buffer %p", buffer);
|
||||||
|
|
||||||
|
@ -705,12 +708,12 @@ gst_tee_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_tee_chain_list (GstPad * pad, GstBufferList * list)
|
gst_tee_chain_list (GstPad * pad, GstObject * parent, GstBufferList * list)
|
||||||
{
|
{
|
||||||
GstFlowReturn res;
|
GstFlowReturn res;
|
||||||
GstTee *tee;
|
GstTee *tee;
|
||||||
|
|
||||||
tee = GST_TEE_CAST (GST_PAD_PARENT (pad));
|
tee = GST_TEE_CAST (parent);
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (tee, "received list %p", list);
|
GST_DEBUG_OBJECT (tee, "received list %p", list);
|
||||||
|
|
||||||
|
@ -877,13 +880,13 @@ gst_tee_pull_eos (GstTee * tee)
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_tee_src_get_range (GstPad * pad, guint64 offset, guint length,
|
gst_tee_src_get_range (GstPad * pad, GstObject * parent, guint64 offset,
|
||||||
GstBuffer ** buf)
|
guint length, GstBuffer ** buf)
|
||||||
{
|
{
|
||||||
GstTee *tee;
|
GstTee *tee;
|
||||||
GstFlowReturn ret;
|
GstFlowReturn ret;
|
||||||
|
|
||||||
tee = GST_TEE (GST_PAD_PARENT (pad));
|
tee = GST_TEE (parent);
|
||||||
|
|
||||||
ret = gst_pad_pull_range (tee->sinkpad, offset, length, buf);
|
ret = gst_pad_pull_range (tee->sinkpad, offset, length, buf);
|
||||||
|
|
||||||
|
|
|
@ -141,18 +141,18 @@ static const GstEventMask *gst_type_find_element_src_event_mask (GstPad * pad);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static gboolean gst_type_find_element_src_event (GstPad * pad,
|
static gboolean gst_type_find_element_src_event (GstPad * pad,
|
||||||
GstEvent * event);
|
GstObject * parent, GstEvent * event);
|
||||||
static gboolean gst_type_find_handle_src_query (GstPad * pad,
|
static gboolean gst_type_find_handle_src_query (GstPad * pad,
|
||||||
GstObject * parent, GstQuery * query);
|
GstObject * parent, GstQuery * query);
|
||||||
|
|
||||||
static gboolean gst_type_find_element_sink_event (GstPad * pad,
|
static gboolean gst_type_find_element_sink_event (GstPad * pad,
|
||||||
GstEvent * event);
|
GstObject * parent, GstEvent * event);
|
||||||
static gboolean gst_type_find_element_setcaps (GstTypeFindElement * typefind,
|
static gboolean gst_type_find_element_setcaps (GstTypeFindElement * typefind,
|
||||||
GstCaps * caps);
|
GstCaps * caps);
|
||||||
static GstFlowReturn gst_type_find_element_chain (GstPad * sinkpad,
|
static GstFlowReturn gst_type_find_element_chain (GstPad * sinkpad,
|
||||||
GstBuffer * buffer);
|
GstObject * parent, GstBuffer * buffer);
|
||||||
static GstFlowReturn gst_type_find_element_getrange (GstPad * srcpad,
|
static GstFlowReturn gst_type_find_element_getrange (GstPad * srcpad,
|
||||||
guint64 offset, guint length, GstBuffer ** buffer);
|
GstObject * parent, guint64 offset, guint length, GstBuffer ** buffer);
|
||||||
|
|
||||||
static GstStateChangeReturn
|
static GstStateChangeReturn
|
||||||
gst_type_find_element_change_state (GstElement * element,
|
gst_type_find_element_change_state (GstElement * element,
|
||||||
|
@ -426,9 +426,10 @@ gst_type_find_element_src_event_mask (GstPad * pad)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_type_find_element_src_event (GstPad * pad, GstEvent * event)
|
gst_type_find_element_src_event (GstPad * pad, GstObject * parent,
|
||||||
|
GstEvent * event)
|
||||||
{
|
{
|
||||||
GstTypeFindElement *typefind = GST_TYPE_FIND_ELEMENT (GST_PAD_PARENT (pad));
|
GstTypeFindElement *typefind = GST_TYPE_FIND_ELEMENT (parent);
|
||||||
|
|
||||||
if (typefind->mode != MODE_NORMAL) {
|
if (typefind->mode != MODE_NORMAL) {
|
||||||
/* need to do more? */
|
/* need to do more? */
|
||||||
|
@ -514,10 +515,11 @@ no_data:
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_type_find_element_sink_event (GstPad * pad, GstEvent * event)
|
gst_type_find_element_sink_event (GstPad * pad, GstObject * parent,
|
||||||
|
GstEvent * event)
|
||||||
{
|
{
|
||||||
gboolean res = FALSE;
|
gboolean res = FALSE;
|
||||||
GstTypeFindElement *typefind = GST_TYPE_FIND_ELEMENT (GST_PAD_PARENT (pad));
|
GstTypeFindElement *typefind = GST_TYPE_FIND_ELEMENT (parent);
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (typefind, "got %s event in mode %d",
|
GST_DEBUG_OBJECT (typefind, "got %s event in mode %d",
|
||||||
GST_EVENT_TYPE_NAME (event), typefind->mode);
|
GST_EVENT_TYPE_NAME (event), typefind->mode);
|
||||||
|
@ -726,12 +728,13 @@ gst_type_find_guess_by_extension (GstTypeFindElement * typefind, GstPad * pad,
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_type_find_element_chain (GstPad * pad, GstBuffer * buffer)
|
gst_type_find_element_chain (GstPad * pad, GstObject * parent,
|
||||||
|
GstBuffer * buffer)
|
||||||
{
|
{
|
||||||
GstTypeFindElement *typefind;
|
GstTypeFindElement *typefind;
|
||||||
GstFlowReturn res = GST_FLOW_OK;
|
GstFlowReturn res = GST_FLOW_OK;
|
||||||
|
|
||||||
typefind = GST_TYPE_FIND_ELEMENT (GST_PAD_PARENT (pad));
|
typefind = GST_TYPE_FIND_ELEMENT (parent);
|
||||||
|
|
||||||
GST_LOG_OBJECT (typefind, "handling buffer in mode %d", typefind->mode);
|
GST_LOG_OBJECT (typefind, "handling buffer in mode %d", typefind->mode);
|
||||||
|
|
||||||
|
@ -854,13 +857,13 @@ low_probability:
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_type_find_element_getrange (GstPad * srcpad,
|
gst_type_find_element_getrange (GstPad * srcpad, GstObject * parent,
|
||||||
guint64 offset, guint length, GstBuffer ** buffer)
|
guint64 offset, guint length, GstBuffer ** buffer)
|
||||||
{
|
{
|
||||||
GstTypeFindElement *typefind;
|
GstTypeFindElement *typefind;
|
||||||
GstFlowReturn ret;
|
GstFlowReturn ret;
|
||||||
|
|
||||||
typefind = GST_TYPE_FIND_ELEMENT (GST_PAD_PARENT (srcpad));
|
typefind = GST_TYPE_FIND_ELEMENT (parent);
|
||||||
|
|
||||||
ret = gst_pad_pull_range (typefind->sink, offset, length, buffer);
|
ret = gst_pad_pull_range (typefind->sink, offset, length, buffer);
|
||||||
|
|
||||||
|
|
|
@ -72,8 +72,10 @@ static void gst_valve_set_property (GObject * object,
|
||||||
static void gst_valve_get_property (GObject * object,
|
static void gst_valve_get_property (GObject * object,
|
||||||
guint prop_id, GValue * value, GParamSpec * pspec);
|
guint prop_id, GValue * value, GParamSpec * pspec);
|
||||||
|
|
||||||
static GstFlowReturn gst_valve_chain (GstPad * pad, GstBuffer * buffer);
|
static GstFlowReturn gst_valve_chain (GstPad * pad, GstObject * parent,
|
||||||
static gboolean gst_valve_sink_event (GstPad * pad, GstEvent * event);
|
GstBuffer * buffer);
|
||||||
|
static gboolean gst_valve_sink_event (GstPad * pad, GstObject * parent,
|
||||||
|
GstEvent * event);
|
||||||
static gboolean gst_valve_query (GstPad * pad, GstObject * parent,
|
static gboolean gst_valve_query (GstPad * pad, GstObject * parent,
|
||||||
GstQuery * query);
|
GstQuery * query);
|
||||||
|
|
||||||
|
@ -164,9 +166,9 @@ gst_valve_get_property (GObject * object,
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_valve_chain (GstPad * pad, GstBuffer * buffer)
|
gst_valve_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||||
{
|
{
|
||||||
GstValve *valve = GST_VALVE (GST_OBJECT_PARENT (pad));
|
GstValve *valve = GST_VALVE (parent);
|
||||||
GstFlowReturn ret = GST_FLOW_OK;
|
GstFlowReturn ret = GST_FLOW_OK;
|
||||||
|
|
||||||
if (g_atomic_int_get (&valve->drop)) {
|
if (g_atomic_int_get (&valve->drop)) {
|
||||||
|
@ -194,12 +196,12 @@ gst_valve_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_valve_sink_event (GstPad * pad, GstEvent * event)
|
gst_valve_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
{
|
{
|
||||||
GstValve *valve;
|
GstValve *valve;
|
||||||
gboolean ret = TRUE;
|
gboolean ret = TRUE;
|
||||||
|
|
||||||
valve = GST_VALVE (GST_PAD_PARENT (pad));
|
valve = GST_VALVE (parent);
|
||||||
|
|
||||||
if (g_atomic_int_get (&valve->drop))
|
if (g_atomic_int_get (&valve->drop))
|
||||||
gst_event_unref (event);
|
gst_event_unref (event);
|
||||||
|
|
|
@ -34,7 +34,7 @@ static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
GST_STATIC_CAPS_ANY);
|
GST_STATIC_CAPS_ANY);
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
event_func (GstPad * pad, GstEvent * event)
|
event_func (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
{
|
{
|
||||||
if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) {
|
if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) {
|
||||||
have_eos = TRUE;
|
have_eos = TRUE;
|
||||||
|
|
|
@ -37,7 +37,7 @@ static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
GST_STATIC_CAPS_ANY);
|
GST_STATIC_CAPS_ANY);
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
event_func (GstPad * pad, GstEvent * event)
|
event_func (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
{
|
{
|
||||||
if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) {
|
if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) {
|
||||||
have_eos = TRUE;
|
have_eos = TRUE;
|
||||||
|
|
|
@ -37,7 +37,7 @@ static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
GST_STATIC_CAPS_ANY);
|
GST_STATIC_CAPS_ANY);
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
event_func (GstPad * pad, GstEvent * event)
|
event_func (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
{
|
{
|
||||||
gboolean res = TRUE;
|
gboolean res = TRUE;
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,7 @@ static gint bufcount = 0;
|
||||||
static gint alloccount = 0;
|
static gint alloccount = 0;
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
chain_ok (GstPad * pad, GstBuffer * buffer)
|
chain_ok (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||||
{
|
{
|
||||||
bufcount++;
|
bufcount++;
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
GST_STATIC_CAPS_ANY);
|
GST_STATIC_CAPS_ANY);
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
event_func (GstPad * pad, GstEvent * event)
|
event_func (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
{
|
{
|
||||||
if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) {
|
if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) {
|
||||||
have_eos = TRUE;
|
have_eos = TRUE;
|
||||||
|
|
|
@ -326,7 +326,7 @@ struct PadData
|
||||||
};
|
};
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
mq_dummypad_chain (GstPad * sinkpad, GstBuffer * buf)
|
mq_dummypad_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf)
|
||||||
{
|
{
|
||||||
guint32 cur_id;
|
guint32 cur_id;
|
||||||
struct PadData *pad_data;
|
struct PadData *pad_data;
|
||||||
|
@ -377,7 +377,7 @@ mq_dummypad_chain (GstPad * sinkpad, GstBuffer * buf)
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
mq_dummypad_event (GstPad * sinkpad, GstEvent * event)
|
mq_dummypad_event (GstPad * sinkpad, GstObject * parent, GstEvent * event)
|
||||||
{
|
{
|
||||||
struct PadData *pad_data;
|
struct PadData *pad_data;
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ queue_underrun (GstElement * queue, gpointer user_data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
event_func (GstPad * pad, GstEvent * event)
|
event_func (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
{
|
{
|
||||||
GST_DEBUG ("%s event", gst_event_type_get_name (GST_EVENT_TYPE (event)));
|
GST_DEBUG ("%s event", gst_event_type_get_name (GST_EVENT_TYPE (event)));
|
||||||
events = g_list_append (events, event);
|
events = g_list_append (events, event);
|
||||||
|
|
|
@ -441,14 +441,14 @@ GST_START_TEST (test_internal_links)
|
||||||
GST_END_TEST;
|
GST_END_TEST;
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
_fake_chain (GstPad * pad, GstBuffer * buffer)
|
_fake_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||||
{
|
{
|
||||||
gst_buffer_unref (buffer);
|
gst_buffer_unref (buffer);
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
_fake_chain_error (GstPad * pad, GstBuffer * buffer)
|
_fake_chain_error (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||||
{
|
{
|
||||||
gst_buffer_unref (buffer);
|
gst_buffer_unref (buffer);
|
||||||
return GST_FLOW_ERROR;
|
return GST_FLOW_ERROR;
|
||||||
|
|
|
@ -40,7 +40,7 @@ gboolean event_received = FALSE;
|
||||||
gboolean buffer_allocated = FALSE;
|
gboolean buffer_allocated = FALSE;
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
event_func (GstPad * pad, GstEvent * event)
|
event_func (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
{
|
{
|
||||||
event_received = TRUE;
|
event_received = TRUE;
|
||||||
gst_event_unref (event);
|
gst_event_unref (event);
|
||||||
|
|
|
@ -221,7 +221,7 @@ GST_END_TEST;
|
||||||
static GstCaps *event_caps = NULL;
|
static GstCaps *event_caps = NULL;
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
sticky_event (GstPad * pad, GstEvent * event)
|
sticky_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
{
|
{
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,7 @@ gst_test_trans_set_data (GstTestTrans * this, TestTransData * data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
result_sink_chain (GstPad * pad, GstBuffer * buffer)
|
result_sink_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||||
{
|
{
|
||||||
TestTransData *data;
|
TestTransData *data;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue