mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-13 15:12:58 +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:
|
||||
* @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.
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
gboolean
|
||||
gst_proxy_pad_event_default (GstPad * pad, GstEvent * event)
|
||||
gst_proxy_pad_event_default (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
gboolean res;
|
||||
GstPad *internal;
|
||||
|
@ -264,6 +265,7 @@ gst_proxy_pad_iterate_internal_links_default (GstPad * pad, GstObject * parent)
|
|||
/**
|
||||
* gst_proxy_pad_chain_default:
|
||||
* @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
|
||||
* if not.
|
||||
*
|
||||
|
@ -274,7 +276,8 @@ gst_proxy_pad_iterate_internal_links_default (GstPad * pad, GstObject * parent)
|
|||
* Since: 0.10.36
|
||||
*/
|
||||
GstFlowReturn
|
||||
gst_proxy_pad_chain_default (GstPad * pad, GstBuffer * buffer)
|
||||
gst_proxy_pad_chain_default (GstPad * pad, GstObject * parent,
|
||||
GstBuffer * buffer)
|
||||
{
|
||||
GstFlowReturn res;
|
||||
GstPad *internal;
|
||||
|
@ -291,6 +294,7 @@ gst_proxy_pad_chain_default (GstPad * pad, GstBuffer * buffer)
|
|||
/**
|
||||
* gst_proxy_pad_chain_list_default:
|
||||
* @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
|
||||
* if not.
|
||||
*
|
||||
|
@ -301,7 +305,8 @@ gst_proxy_pad_chain_default (GstPad * pad, GstBuffer * buffer)
|
|||
* Since: 0.10.36
|
||||
*/
|
||||
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;
|
||||
GstPad *internal;
|
||||
|
@ -330,8 +335,8 @@ gst_proxy_pad_chain_list_default (GstPad * pad, GstBufferList * list)
|
|||
* Since: 0.10.36
|
||||
*/
|
||||
GstFlowReturn
|
||||
gst_proxy_pad_getrange_default (GstPad * pad, guint64 offset, guint size,
|
||||
GstBuffer ** buffer)
|
||||
gst_proxy_pad_getrange_default (GstPad * pad, GstObject * parent,
|
||||
guint64 offset, guint size, GstBuffer ** buffer)
|
||||
{
|
||||
GstFlowReturn res;
|
||||
GstPad *internal;
|
||||
|
|
|
@ -62,13 +62,18 @@ GType gst_proxy_pad_get_type (void);
|
|||
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,
|
||||
GstQuery *query);
|
||||
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_list_default (GstPad *pad, GstBufferList *list);
|
||||
GstFlowReturn gst_proxy_pad_getrange_default (GstPad *pad, guint64 offset, guint size, GstBuffer **buffer);
|
||||
GstFlowReturn gst_proxy_pad_chain_default (GstPad *pad, GstObject *parent,
|
||||
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);
|
||||
|
||||
#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 gboolean gst_pad_activate_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 };
|
||||
|
||||
|
@ -2141,7 +2141,7 @@ gst_pad_set_caps (GstPad * pad, GstCaps * caps)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
do_event_function (GstPad * pad, GstEvent * event,
|
||||
do_event_function (GstPad * pad, GstObject * parent, GstEvent * event,
|
||||
GstPadEventFunction eventfunc, gboolean * caps_notify)
|
||||
{
|
||||
gboolean result = TRUE, call_event = TRUE;
|
||||
|
@ -2174,7 +2174,7 @@ do_event_function (GstPad * pad, GstEvent * event,
|
|||
|
||||
if (call_event) {
|
||||
GST_DEBUG_OBJECT (pad, "calling event function with event %p", event);
|
||||
result = eventfunc (pad, event);
|
||||
result = eventfunc (pad, parent, event);
|
||||
} else {
|
||||
gst_event_unref (event);
|
||||
}
|
||||
|
@ -2237,7 +2237,7 @@ gst_pad_update_events (GstPad * pad)
|
|||
gst_event_ref (event);
|
||||
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);
|
||||
|
||||
|
@ -2603,6 +2603,7 @@ event_forward_func (GstPad * pad, EventData * data)
|
|||
/**
|
||||
* gst_pad_event_default:
|
||||
* @pad: a #GstPad to call the default event handler on.
|
||||
* @parent: the parent of @pad or NULL
|
||||
* @event: (transfer full): the #GstEvent to handle.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
gboolean
|
||||
gst_pad_event_default (GstPad * pad, GstEvent * event)
|
||||
gst_pad_event_default (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
gboolean result, forward = TRUE;
|
||||
|
||||
|
@ -3211,6 +3212,7 @@ no_parent:
|
|||
no_func:
|
||||
{
|
||||
GST_DEBUG_OBJECT (pad, "had no query function");
|
||||
RELEASE_PARENT (parent);
|
||||
return FALSE;
|
||||
}
|
||||
query_failed:
|
||||
|
@ -3316,6 +3318,7 @@ static inline GstFlowReturn
|
|||
gst_pad_chain_data_unchecked (GstPad * pad, GstPadProbeType type, void *data)
|
||||
{
|
||||
GstFlowReturn ret;
|
||||
GstObject *parent;
|
||||
gboolean needs_events;
|
||||
|
||||
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);
|
||||
|
||||
parent = GST_OBJECT_PARENT (pad);
|
||||
GST_OBJECT_UNLOCK (pad);
|
||||
|
||||
/* 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,
|
||||
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,
|
||||
"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",
|
||||
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,
|
||||
"called chainlistfunction &%s, returned %s",
|
||||
|
@ -3421,7 +3425,7 @@ no_function:
|
|||
gst_mini_object_unref (GST_MINI_OBJECT_CAST (data));
|
||||
GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad,
|
||||
"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",
|
||||
GST_DEBUG_PAD_NAME (pad)));
|
||||
GST_PAD_STREAM_UNLOCK (pad);
|
||||
|
@ -3467,7 +3471,8 @@ gst_pad_chain (GstPad * pad, GstBuffer * buffer)
|
|||
}
|
||||
|
||||
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;
|
||||
GstBuffer *buffer;
|
||||
|
@ -3681,6 +3686,7 @@ gst_pad_get_range_unchecked (GstPad * pad, guint64 offset, guint size,
|
|||
{
|
||||
GstFlowReturn ret;
|
||||
GstPadGetRangeFunction getrangefunc;
|
||||
GstObject *parent;
|
||||
|
||||
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 */
|
||||
PROBE_PRE_PULL (pad, GST_PAD_PROBE_TYPE_PULL | GST_PAD_PROBE_TYPE_BLOCK,
|
||||
*buffer, offset, size, probe_stopped, probed_data, GST_FLOW_OK);
|
||||
|
||||
ACQUIRE_PARENT (pad, parent, no_parent);
|
||||
GST_OBJECT_UNLOCK (pad);
|
||||
|
||||
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",
|
||||
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))
|
||||
goto get_range_failed;
|
||||
|
@ -3727,11 +3737,19 @@ flushing:
|
|||
GST_PAD_STREAM_UNLOCK (pad);
|
||||
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:
|
||||
{
|
||||
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",
|
||||
GST_DEBUG_PAD_NAME (pad)));
|
||||
RELEASE_PARENT (parent);
|
||||
GST_PAD_STREAM_UNLOCK (pad);
|
||||
return GST_FLOW_NOT_SUPPORTED;
|
||||
}
|
||||
|
@ -4314,7 +4332,7 @@ gst_pad_send_event (GstPad * pad, GstEvent * event)
|
|||
ACQUIRE_PARENT (pad, parent, no_parent);
|
||||
GST_OBJECT_UNLOCK (pad);
|
||||
|
||||
result = eventfunc (pad, event);
|
||||
result = eventfunc (pad, parent, event);
|
||||
|
||||
RELEASE_PARENT (parent);
|
||||
}
|
||||
|
|
29
gst/gstpad.h
29
gst/gstpad.h
|
@ -256,6 +256,9 @@ typedef gboolean (*GstPadActivateModeFunction) (GstPad *pad, gboolean active);
|
|||
/**
|
||||
* GstPadChainFunction:
|
||||
* @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.
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
typedef GstFlowReturn (*GstPadChainFunction) (GstPad *pad, GstBuffer *buffer);
|
||||
typedef GstFlowReturn (*GstPadChainFunction) (GstPad *pad, GstObject *parent,
|
||||
GstBuffer *buffer);
|
||||
|
||||
/**
|
||||
* GstPadChainListFunction:
|
||||
* @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.
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
typedef GstFlowReturn (*GstPadChainListFunction) (GstPad *pad, GstBufferList *list);
|
||||
typedef GstFlowReturn (*GstPadChainListFunction) (GstPad *pad, GstObject *parent,
|
||||
GstBufferList *list);
|
||||
|
||||
/**
|
||||
* GstPadGetRangeFunction:
|
||||
* @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
|
||||
* @length: the length of the range
|
||||
* @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
|
||||
* return value leaves @buffer undefined.
|
||||
*/
|
||||
typedef GstFlowReturn (*GstPadGetRangeFunction) (GstPad *pad, guint64 offset,
|
||||
guint length, GstBuffer **buffer);
|
||||
typedef GstFlowReturn (*GstPadGetRangeFunction) (GstPad *pad, GstObject *parent,
|
||||
guint64 offset, guint length,
|
||||
GstBuffer **buffer);
|
||||
|
||||
/**
|
||||
* GstPadEventFunction:
|
||||
* @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.
|
||||
*
|
||||
* Function signature to handle an event for the pad.
|
||||
*
|
||||
* 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 */
|
||||
|
@ -860,7 +876,8 @@ GstFlowReturn gst_pad_push_list (GstPad *pad, GstBufferList *list);
|
|||
GstFlowReturn gst_pad_pull_range (GstPad *pad, guint64 offset, guint size,
|
||||
GstBuffer **buffer);
|
||||
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 */
|
||||
GstFlowReturn gst_pad_chain (GstPad *pad, GstBuffer *buffer);
|
||||
|
|
|
@ -383,15 +383,18 @@ static gboolean gst_base_parse_handle_seek (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,
|
||||
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,
|
||||
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 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.
|
||||
*/
|
||||
static gboolean
|
||||
gst_base_parse_sink_event (GstPad * pad, GstEvent * event)
|
||||
gst_base_parse_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
GstBaseParse *parse;
|
||||
GstBaseParseClass *bclass;
|
||||
gboolean handled = FALSE;
|
||||
gboolean ret = TRUE;
|
||||
|
||||
parse = GST_BASE_PARSE (gst_pad_get_parent (pad));
|
||||
parse = GST_BASE_PARSE (parent);
|
||||
bclass = GST_BASE_PARSE_GET_CLASS (parse);
|
||||
|
||||
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);
|
||||
|
||||
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");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -1168,14 +1171,14 @@ gst_base_parse_sink_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
|||
* Returns: TRUE if the event was handled.
|
||||
*/
|
||||
static gboolean
|
||||
gst_base_parse_src_event (GstPad * pad, GstEvent * event)
|
||||
gst_base_parse_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
GstBaseParse *parse;
|
||||
GstBaseParseClass *bclass;
|
||||
gboolean handled = FALSE;
|
||||
gboolean ret = TRUE;
|
||||
|
||||
parse = GST_BASE_PARSE (gst_pad_get_parent (pad));
|
||||
parse = GST_BASE_PARSE (parent);
|
||||
bclass = GST_BASE_PARSE_GET_CLASS (parse);
|
||||
|
||||
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);
|
||||
|
||||
if (!handled)
|
||||
ret = gst_pad_event_default (pad, event);
|
||||
ret = gst_pad_event_default (pad, parent, event);
|
||||
|
||||
gst_object_unref (parse);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -2058,7 +2060,8 @@ gst_base_parse_drain (GstBaseParse * parse)
|
|||
if (!avail)
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -2245,7 +2248,7 @@ gst_base_parse_check_sync (GstBaseParse * parse)
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_base_parse_chain (GstPad * pad, GstBuffer * buffer)
|
||||
gst_base_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||
{
|
||||
GstBaseParseClass *bclass;
|
||||
GstBaseParse *parse;
|
||||
|
@ -2259,7 +2262,7 @@ gst_base_parse_chain (GstPad * pad, GstBuffer * buffer)
|
|||
GstClockTime timestamp;
|
||||
GstBaseParseFrame *frame;
|
||||
|
||||
parse = GST_BASE_PARSE (GST_OBJECT_PARENT (pad));
|
||||
parse = GST_BASE_PARSE (parent);
|
||||
bclass = GST_BASE_PARSE_GET_CLASS (parse);
|
||||
|
||||
if (parse->priv->detecting) {
|
||||
|
@ -2298,7 +2301,7 @@ gst_base_parse_chain (GstPad * pad, GstBuffer * buffer)
|
|||
if (ret == GST_FLOW_OK && !parse->priv->flushing)
|
||||
ret =
|
||||
gst_base_parse_chain (GST_BASE_PARSE_SINK_PAD (parse),
|
||||
GST_BUFFER_CAST (l->data));
|
||||
parent, GST_BUFFER_CAST (l->data));
|
||||
else
|
||||
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,
|
||||
GstQuery * query);
|
||||
static GstFlowReturn gst_base_sink_chain (GstPad * pad, GstBuffer * buffer);
|
||||
static GstFlowReturn gst_base_sink_chain_list (GstPad * pad,
|
||||
static GstFlowReturn gst_base_sink_chain (GstPad * pad, GstObject * parent,
|
||||
GstBuffer * buffer);
|
||||
static GstFlowReturn gst_base_sink_chain_list (GstPad * pad, GstObject * parent,
|
||||
GstBufferList * list);
|
||||
|
||||
static void gst_base_sink_loop (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_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);
|
||||
|
||||
|
@ -2057,8 +2059,8 @@ gst_base_sink_wait_clock (GstBaseSink * sink, GstClockTime time,
|
|||
/* FIXME: Casting to GstClockEntry only works because the types
|
||||
* are the same */
|
||||
if (G_LIKELY (sink->priv->cached_clock_id != NULL
|
||||
&& GST_CLOCK_ENTRY_CLOCK ((GstClockEntry *) sink->priv->
|
||||
cached_clock_id) == clock)) {
|
||||
&& GST_CLOCK_ENTRY_CLOCK ((GstClockEntry *) sink->
|
||||
priv->cached_clock_id) == clock)) {
|
||||
if (!gst_clock_single_shot_id_reinit (clock, sink->priv->cached_clock_id,
|
||||
time)) {
|
||||
gst_clock_id_unref (sink->priv->cached_clock_id);
|
||||
|
@ -3301,18 +3303,13 @@ gst_base_sink_flush_stop (GstBaseSink * basesink, GstPad * pad,
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_base_sink_event (GstPad * pad, GstEvent * event)
|
||||
gst_base_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
GstBaseSink *basesink;
|
||||
gboolean result = TRUE;
|
||||
GstBaseSinkClass *bclass;
|
||||
|
||||
basesink = GST_BASE_SINK (gst_pad_get_parent (pad));
|
||||
if (G_UNLIKELY (basesink == NULL)) {
|
||||
gst_event_unref (event);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
basesink = GST_BASE_SINK (parent);
|
||||
bclass = GST_BASE_SINK_GET_CLASS (basesink);
|
||||
|
||||
GST_DEBUG_OBJECT (basesink, "received event %p %" GST_PTR_FORMAT, event,
|
||||
|
@ -3429,8 +3426,6 @@ gst_base_sink_event (GstPad * pad, GstEvent * event)
|
|||
break;
|
||||
}
|
||||
done:
|
||||
gst_object_unref (basesink);
|
||||
|
||||
return result;
|
||||
|
||||
/* ERRORS */
|
||||
|
@ -3633,23 +3628,24 @@ wrong_mode:
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_base_sink_chain (GstPad * pad, GstBuffer * buf)
|
||||
gst_base_sink_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_base_sink_chain_list (GstPad * pad, GstBufferList * list)
|
||||
gst_base_sink_chain_list (GstPad * pad, GstObject * parent,
|
||||
GstBufferList * list)
|
||||
{
|
||||
GstBaseSink *basesink;
|
||||
GstBaseSinkClass *bclass;
|
||||
GstFlowReturn result;
|
||||
|
||||
basesink = GST_BASE_SINK (GST_OBJECT_PARENT (pad));
|
||||
basesink = GST_BASE_SINK (parent);
|
||||
bclass = GST_BASE_SINK_GET_CLASS (basesink);
|
||||
|
||||
if (G_LIKELY (bclass->render_list)) {
|
||||
|
@ -3979,13 +3975,15 @@ gst_base_sink_perform_step (GstBaseSink * sink, GstPad * pad, GstEvent * event)
|
|||
static void
|
||||
gst_base_sink_loop (GstPad * pad)
|
||||
{
|
||||
GstObject *parent;
|
||||
GstBaseSink *basesink;
|
||||
GstBuffer *buf = NULL;
|
||||
GstFlowReturn result;
|
||||
guint blocksize;
|
||||
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);
|
||||
|
||||
|
@ -4029,7 +4027,7 @@ paused:
|
|||
gst_message_new_segment_done (GST_OBJECT_CAST (basesink),
|
||||
basesink->segment.format, basesink->segment.position));
|
||||
} 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) {
|
||||
/* for fatal errors we post an error message, post the error
|
||||
|
@ -4041,7 +4039,7 @@ paused:
|
|||
GST_ELEMENT_ERROR (basesink, STREAM, FAILED,
|
||||
(_("Internal data stream error.")),
|
||||
("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;
|
||||
}
|
||||
|
|
|
@ -290,7 +290,8 @@ static void gst_base_src_set_property (GObject * object, guint prop_id,
|
|||
const GValue * value, GParamSpec * pspec);
|
||||
static void gst_base_src_get_property (GObject * object, guint prop_id,
|
||||
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_default_event (GstBaseSrc * src, GstEvent * event);
|
||||
|
||||
|
@ -319,8 +320,8 @@ static GstStateChangeReturn gst_base_src_change_state (GstElement * element,
|
|||
GstStateChange transition);
|
||||
|
||||
static void gst_base_src_loop (GstPad * pad);
|
||||
static GstFlowReturn gst_base_src_pad_get_range (GstPad * pad, guint64 offset,
|
||||
guint length, GstBuffer ** buf);
|
||||
static GstFlowReturn gst_base_src_getrange (GstPad * pad, GstObject * parent,
|
||||
guint64 offset, guint length, GstBuffer ** buf);
|
||||
static GstFlowReturn gst_base_src_get_range (GstBaseSrc * src, guint64 offset,
|
||||
guint length, GstBuffer ** buf);
|
||||
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 */
|
||||
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_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_pad_get_range);
|
||||
GST_DEBUG_REGISTER_FUNCPTR (gst_base_src_getrange);
|
||||
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_pad_set_activatepush_function (pad, gst_base_src_activate_push);
|
||||
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_getrange_function (pad, gst_base_src_pad_get_range);
|
||||
gst_pad_set_getrange_function (pad, gst_base_src_getrange);
|
||||
|
||||
/* hold pointer to pad */
|
||||
basesrc->srcpad = pad;
|
||||
|
@ -1814,18 +1815,13 @@ not_seekable:
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_base_src_event_handler (GstPad * pad, GstEvent * event)
|
||||
gst_base_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
GstBaseSrc *src;
|
||||
GstBaseSrcClass *bclass;
|
||||
gboolean result = FALSE;
|
||||
|
||||
src = GST_BASE_SRC (gst_pad_get_parent (pad));
|
||||
if (G_UNLIKELY (src == NULL)) {
|
||||
gst_event_unref (event);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
src = GST_BASE_SRC (parent);
|
||||
bclass = GST_BASE_SRC_GET_CLASS (src);
|
||||
|
||||
if (bclass->event) {
|
||||
|
@ -1835,7 +1831,6 @@ gst_base_src_event_handler (GstPad * pad, GstEvent * event)
|
|||
|
||||
done:
|
||||
gst_event_unref (event);
|
||||
gst_object_unref (src);
|
||||
|
||||
return result;
|
||||
|
||||
|
@ -2331,13 +2326,13 @@ eos:
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_base_src_pad_get_range (GstPad * pad, guint64 offset, guint length,
|
||||
GstBuffer ** buf)
|
||||
gst_base_src_getrange (GstPad * pad, GstObject * parent, guint64 offset,
|
||||
guint length, GstBuffer ** buf)
|
||||
{
|
||||
GstBaseSrc *src;
|
||||
GstFlowReturn res;
|
||||
|
||||
src = GST_BASE_SRC_CAST (gst_object_ref (GST_OBJECT_PARENT (pad)));
|
||||
src = GST_BASE_SRC_CAST (parent);
|
||||
|
||||
GST_LIVE_LOCK (src);
|
||||
if (G_UNLIKELY (src->priv->flushing))
|
||||
|
@ -2348,8 +2343,6 @@ gst_base_src_pad_get_range (GstPad * pad, guint64 offset, guint length,
|
|||
done:
|
||||
GST_LIVE_UNLOCK (src);
|
||||
|
||||
gst_object_unref (src);
|
||||
|
||||
return res;
|
||||
|
||||
/* ERRORS */
|
||||
|
|
|
@ -307,15 +307,17 @@ static gboolean gst_base_transform_activate (GstBaseTransform * trans,
|
|||
static gboolean gst_base_transform_get_unit_size (GstBaseTransform * trans,
|
||||
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,
|
||||
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,
|
||||
GstEvent * event);
|
||||
static GstFlowReturn gst_base_transform_getrange (GstPad * pad, guint64 offset,
|
||||
guint length, GstBuffer ** buffer);
|
||||
static GstFlowReturn gst_base_transform_chain (GstPad * pad,
|
||||
static GstFlowReturn gst_base_transform_getrange (GstPad * pad,
|
||||
GstObject * parent, guint64 offset, guint length, GstBuffer ** buffer);
|
||||
static GstFlowReturn gst_base_transform_chain (GstPad * pad, GstObject * parent,
|
||||
GstBuffer * buffer);
|
||||
static GstCaps *gst_base_transform_default_transform_caps (GstBaseTransform *
|
||||
trans, GstPadDirection direction, GstCaps * caps, GstCaps * filter);
|
||||
|
@ -1565,17 +1567,14 @@ gst_base_transform_get_unit_size (GstBaseTransform * trans, GstCaps * caps,
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_base_transform_sink_event (GstPad * pad, GstEvent * event)
|
||||
gst_base_transform_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event)
|
||||
{
|
||||
GstBaseTransform *trans;
|
||||
GstBaseTransformClass *bclass;
|
||||
gboolean ret = TRUE;
|
||||
|
||||
trans = GST_BASE_TRANSFORM (gst_pad_get_parent (pad));
|
||||
if (G_UNLIKELY (trans == NULL)) {
|
||||
gst_event_unref (event);
|
||||
return FALSE;
|
||||
}
|
||||
trans = GST_BASE_TRANSFORM (parent);
|
||||
bclass = GST_BASE_TRANSFORM_GET_CLASS (trans);
|
||||
|
||||
if (bclass->sink_event)
|
||||
|
@ -1583,8 +1582,6 @@ gst_base_transform_sink_event (GstPad * pad, GstEvent * event)
|
|||
else
|
||||
gst_event_unref (event);
|
||||
|
||||
gst_object_unref (trans);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -1646,18 +1643,14 @@ gst_base_transform_sink_eventfunc (GstBaseTransform * trans, GstEvent * event)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_base_transform_src_event (GstPad * pad, GstEvent * event)
|
||||
gst_base_transform_src_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event)
|
||||
{
|
||||
GstBaseTransform *trans;
|
||||
GstBaseTransformClass *bclass;
|
||||
gboolean ret = TRUE;
|
||||
|
||||
trans = GST_BASE_TRANSFORM (gst_pad_get_parent (pad));
|
||||
if (G_UNLIKELY (trans == NULL)) {
|
||||
gst_event_unref (event);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
trans = GST_BASE_TRANSFORM (parent);
|
||||
bclass = GST_BASE_TRANSFORM_GET_CLASS (trans);
|
||||
|
||||
if (bclass->src_event)
|
||||
|
@ -1665,8 +1658,6 @@ gst_base_transform_src_event (GstPad * pad, GstEvent * event)
|
|||
else
|
||||
gst_event_unref (event);
|
||||
|
||||
gst_object_unref (trans);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -1947,7 +1938,7 @@ no_buffer:
|
|||
* end based on the transform_size result.
|
||||
*/
|
||||
static GstFlowReturn
|
||||
gst_base_transform_getrange (GstPad * pad, guint64 offset,
|
||||
gst_base_transform_getrange (GstPad * pad, GstObject * parent, guint64 offset,
|
||||
guint length, GstBuffer ** buffer)
|
||||
{
|
||||
GstBaseTransform *trans;
|
||||
|
@ -1955,7 +1946,7 @@ gst_base_transform_getrange (GstPad * pad, guint64 offset,
|
|||
GstFlowReturn ret;
|
||||
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);
|
||||
if (G_UNLIKELY (ret != GST_FLOW_OK))
|
||||
|
@ -1970,8 +1961,6 @@ gst_base_transform_getrange (GstPad * pad, guint64 offset,
|
|||
GST_BASE_TRANSFORM_UNLOCK (trans);
|
||||
|
||||
done:
|
||||
gst_object_unref (trans);
|
||||
|
||||
return ret;
|
||||
|
||||
/* ERRORS */
|
||||
|
@ -1984,7 +1973,7 @@ pull_error:
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_base_transform_chain (GstPad * pad, GstBuffer * buffer)
|
||||
gst_base_transform_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||
{
|
||||
GstBaseTransform *trans;
|
||||
GstBaseTransformClass *klass;
|
||||
|
@ -1993,7 +1982,7 @@ gst_base_transform_chain (GstPad * pad, GstBuffer * buffer)
|
|||
GstClockTime timestamp, duration;
|
||||
GstBuffer *outbuf = NULL;
|
||||
|
||||
trans = GST_BASE_TRANSFORM (GST_OBJECT_PARENT (pad));
|
||||
trans = GST_BASE_TRANSFORM (parent);
|
||||
|
||||
timestamp = GST_BUFFER_TIMESTAMP (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,
|
||||
GstCollectData * data);
|
||||
static GstFlowReturn gst_collect_pads_chain (GstPad * pad, GstBuffer * buffer);
|
||||
static gboolean gst_collect_pads_event (GstPad * pad, GstEvent * event);
|
||||
static GstFlowReturn gst_collect_pads_chain (GstPad * pad, GstObject * parent,
|
||||
GstBuffer * buffer);
|
||||
static gboolean gst_collect_pads_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
static void gst_collect_pads_finalize (GObject * object);
|
||||
static void ref_data (GstCollectData * data);
|
||||
static void unref_data (GstCollectData * data);
|
||||
|
@ -1062,7 +1064,7 @@ gst_collect_pads_check_collected (GstCollectPads * pads)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_collect_pads_event (GstPad * pad, GstEvent * event)
|
||||
gst_collect_pads_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
gboolean res;
|
||||
GstCollectData *data;
|
||||
|
@ -1087,7 +1089,7 @@ gst_collect_pads_event (GstPad * pad, GstEvent * event)
|
|||
case GST_EVENT_FLUSH_START:
|
||||
{
|
||||
/* forward event to unblock check_collected */
|
||||
gst_pad_event_default (pad, event);
|
||||
gst_pad_event_default (pad, parent, event);
|
||||
|
||||
/* now unblock the chain function.
|
||||
* no cond per pad, so they all unblock,
|
||||
|
@ -1176,7 +1178,7 @@ gst_collect_pads_event (GstPad * pad, GstEvent * event)
|
|||
forward:
|
||||
GST_DEBUG_OBJECT (pads, "forward unhandled event: %s",
|
||||
GST_EVENT_TYPE_NAME (event));
|
||||
res = gst_pad_event_default (pad, event);
|
||||
res = gst_pad_event_default (pad, parent, event);
|
||||
|
||||
done:
|
||||
unref_data (data);
|
||||
|
@ -1198,7 +1200,7 @@ pad_removed:
|
|||
* collected
|
||||
*/
|
||||
static GstFlowReturn
|
||||
gst_collect_pads_chain (GstPad * pad, GstBuffer * buffer)
|
||||
gst_collect_pads_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||
{
|
||||
GstCollectData *data;
|
||||
GstCollectPads *pads;
|
||||
|
|
|
@ -92,8 +92,10 @@ G_DEFINE_TYPE (GstCollectPads2, gst_collect_pads2, GST_TYPE_OBJECT);
|
|||
|
||||
static void gst_collect_pads2_clear (GstCollectPads2 * pads,
|
||||
GstCollectData2 * data);
|
||||
static GstFlowReturn gst_collect_pads2_chain (GstPad * pad, GstBuffer * buffer);
|
||||
static gboolean gst_collect_pads2_event (GstPad * pad, GstEvent * event);
|
||||
static GstFlowReturn gst_collect_pads2_chain (GstPad * pad, GstObject * parent,
|
||||
GstBuffer * buffer);
|
||||
static gboolean gst_collect_pads2_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
static void gst_collect_pads2_finalize (GObject * object);
|
||||
static GstFlowReturn gst_collect_pads2_default_collected (GstCollectPads2 *
|
||||
pads, gpointer user_data);
|
||||
|
@ -1536,7 +1538,7 @@ gst_collect_pads2_default_compare_func (GstCollectPads2 * pads,
|
|||
}
|
||||
|
||||
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;
|
||||
GstCollectData2 *data;
|
||||
|
@ -1573,7 +1575,7 @@ gst_collect_pads2_event (GstPad * pad, GstEvent * event)
|
|||
if (event_func)
|
||||
res = event_func (pads, data, event, event_user_data);
|
||||
if (!res)
|
||||
res = gst_pad_event_default (pad, event);
|
||||
res = gst_pad_event_default (pad, parent, event);
|
||||
|
||||
/* now unblock the chain function.
|
||||
* no cond per pad, so they all unblock,
|
||||
|
@ -1702,7 +1704,7 @@ forward_or_default:
|
|||
if (event_func)
|
||||
res = event_func (pads, data, event, event_user_data);
|
||||
if (!res)
|
||||
res = gst_pad_event_default (pad, event);
|
||||
res = gst_pad_event_default (pad, parent, event);
|
||||
if (need_unlock)
|
||||
GST_COLLECT_PADS2_STREAM_UNLOCK (pads);
|
||||
goto done;
|
||||
|
@ -1742,7 +1744,7 @@ pad_removed:
|
|||
* collected
|
||||
*/
|
||||
static GstFlowReturn
|
||||
gst_collect_pads2_chain (GstPad * pad, GstBuffer * buffer)
|
||||
gst_collect_pads2_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||
{
|
||||
GstCollectData2 *data;
|
||||
GstCollectPads2 *pads;
|
||||
|
|
|
@ -160,9 +160,9 @@ gst_check_message_error (GstMessage * message, GstMessageType type,
|
|||
|
||||
/* helper functions */
|
||||
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);
|
||||
|
||||
g_mutex_lock (check_mutex);
|
||||
|
|
|
@ -64,7 +64,7 @@ GstCheckABIStruct;
|
|||
|
||||
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,
|
||||
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);
|
||||
static void gst_funnel_release_pad (GstElement * element, GstPad * pad);
|
||||
|
||||
static GstFlowReturn gst_funnel_sink_chain (GstPad * pad, GstBuffer * buffer);
|
||||
static gboolean gst_funnel_sink_event (GstPad * pad, GstEvent * event);
|
||||
static GstFlowReturn gst_funnel_sink_chain (GstPad * pad, GstObject * parent,
|
||||
GstBuffer * buffer);
|
||||
static gboolean gst_funnel_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
static gboolean gst_funnel_sink_query (GstPad * pad, GstObject * parent,
|
||||
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
|
||||
gst_funnel_dispose (GObject * object)
|
||||
|
@ -213,10 +216,10 @@ gst_funnel_release_pad (GstElement * element, GstPad * pad)
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_funnel_sink_chain (GstPad * pad, GstBuffer * buffer)
|
||||
gst_funnel_sink_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||
{
|
||||
GstFlowReturn res;
|
||||
GstFunnel *funnel = GST_FUNNEL (GST_PAD_PARENT (pad));
|
||||
GstFunnel *funnel = GST_FUNNEL (parent);
|
||||
GstFunnelPad *fpad = GST_FUNNEL_PAD_CAST (pad);
|
||||
GstEvent *event = NULL;
|
||||
GstClockTime newts;
|
||||
|
@ -281,9 +284,9 @@ out:
|
|||
}
|
||||
|
||||
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);
|
||||
gboolean forward = TRUE;
|
||||
gboolean res = TRUE;
|
||||
|
@ -332,7 +335,7 @@ gst_funnel_sink_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_funnel_src_event (GstPad * pad, GstEvent * event)
|
||||
gst_funnel_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
GstElement *funnel;
|
||||
GstIterator *iter;
|
||||
|
@ -341,7 +344,7 @@ gst_funnel_src_event (GstPad * pad, GstEvent * event)
|
|||
gboolean done = FALSE;
|
||||
GValue value = { 0, };
|
||||
|
||||
funnel = GST_ELEMENT_CAST (GST_PAD_PARENT (pad));
|
||||
funnel = GST_ELEMENT_CAST (parent);
|
||||
|
||||
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);
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
if (identity->single_segment && (GST_EVENT_TYPE (event) == GST_EVENT_SEGMENT)) {
|
||||
/* eat up segments */
|
||||
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 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,
|
||||
GstQuery * query);
|
||||
static GstIterator *gst_selector_pad_iterate_linked_pads (GstPad * pad,
|
||||
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);
|
||||
|
||||
|
@ -353,7 +355,7 @@ gst_selector_pad_iterate_linked_pads (GstPad * pad, GstObject * parent)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_selector_pad_event (GstPad * pad, GstEvent * event)
|
||||
gst_selector_pad_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
gboolean res = TRUE;
|
||||
gboolean forward;
|
||||
|
@ -362,7 +364,7 @@ gst_selector_pad_event (GstPad * pad, GstEvent * event)
|
|||
GstPad *prev_active_sinkpad;
|
||||
GstPad *active_sinkpad;
|
||||
|
||||
sel = GST_INPUT_SELECTOR (GST_PAD_PARENT (pad));
|
||||
sel = GST_INPUT_SELECTOR (parent);
|
||||
selpad = GST_SELECTOR_PAD_CAST (pad);
|
||||
|
||||
GST_INPUT_SELECTOR_LOCK (sel);
|
||||
|
@ -610,7 +612,7 @@ gst_input_selector_wait_running_time (GstInputSelector * sel,
|
|||
|
||||
|
||||
static GstFlowReturn
|
||||
gst_selector_pad_chain (GstPad * pad, GstBuffer * buf)
|
||||
gst_selector_pad_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
|
||||
{
|
||||
GstInputSelector *sel;
|
||||
GstFlowReturn res;
|
||||
|
@ -621,7 +623,7 @@ gst_selector_pad_chain (GstPad * pad, GstBuffer * buf)
|
|||
GstSegment *seg;
|
||||
GstEvent *start_event = NULL;
|
||||
|
||||
sel = GST_INPUT_SELECTOR (GST_PAD_PARENT (pad));
|
||||
sel = GST_INPUT_SELECTOR (parent);
|
||||
selpad = GST_SELECTOR_PAD_CAST (pad);
|
||||
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 *
|
||||
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,
|
||||
GstQuery * query);
|
||||
static gint64 gst_input_selector_block (GstInputSelector * self);
|
||||
|
@ -1026,7 +1029,7 @@ gst_input_selector_get_linked_pad (GstInputSelector * sel, GstPad * pad,
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_input_selector_event (GstPad * pad, GstEvent * event)
|
||||
gst_input_selector_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
GstInputSelector *sel;
|
||||
gboolean result = FALSE;
|
||||
|
@ -1036,7 +1039,7 @@ gst_input_selector_event (GstPad * pad, GstEvent * event)
|
|||
GstPad *eventpad;
|
||||
GList *pushed_pads = NULL;
|
||||
|
||||
sel = GST_INPUT_SELECTOR (GST_PAD_PARENT (pad));
|
||||
sel = GST_INPUT_SELECTOR (parent);
|
||||
/* Send upstream events to all sinkpads */
|
||||
iter = gst_element_iterate_sink_pads (GST_ELEMENT_CAST (sel));
|
||||
|
||||
|
|
|
@ -1330,7 +1330,7 @@ out_flushing:
|
|||
* _ we push with a unique id (curid)
|
||||
*/
|
||||
static GstFlowReturn
|
||||
gst_multi_queue_chain (GstPad * pad, GstBuffer * buffer)
|
||||
gst_multi_queue_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||
{
|
||||
GstSingleQueue *sq;
|
||||
GstMultiQueue *mq;
|
||||
|
@ -1400,7 +1400,7 @@ gst_multi_queue_sink_activate_push (GstPad * pad, gboolean active)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_multi_queue_sink_event (GstPad * pad, GstEvent * event)
|
||||
gst_multi_queue_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
GstSingleQueue *sq;
|
||||
GstMultiQueue *mq;
|
||||
|
@ -1411,7 +1411,7 @@ gst_multi_queue_sink_event (GstPad * pad, GstEvent * event)
|
|||
GstEvent *sref = NULL;
|
||||
|
||||
sq = (GstSingleQueue *) gst_pad_get_element_private (pad);
|
||||
mq = (GstMultiQueue *) GST_PAD_PARENT (pad);
|
||||
mq = (GstMultiQueue *) parent;
|
||||
|
||||
type = GST_EVENT_TYPE (event);
|
||||
|
||||
|
@ -1541,7 +1541,7 @@ gst_multi_queue_src_activate_push (GstPad * pad, gboolean active)
|
|||
}
|
||||
|
||||
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);
|
||||
|
||||
|
|
|
@ -102,10 +102,12 @@ static GstPad *gst_output_selector_request_new_pad (GstElement * element,
|
|||
GstPadTemplate * templ, const gchar * unused, const GstCaps * caps);
|
||||
static void gst_output_selector_release_pad (GstElement * element,
|
||||
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 *
|
||||
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,
|
||||
GstQuery * query);
|
||||
static void gst_output_selector_switch_pad_negotiation_mode (GstOutputSelector *
|
||||
|
@ -416,13 +418,13 @@ gst_output_selector_switch (GstOutputSelector * osel)
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_output_selector_chain (GstPad * pad, GstBuffer * buf)
|
||||
gst_output_selector_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
|
||||
{
|
||||
GstFlowReturn res;
|
||||
GstOutputSelector *osel;
|
||||
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.
|
||||
|
@ -500,13 +502,13 @@ gst_output_selector_change_state (GstElement * element,
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_output_selector_event (GstPad * pad, GstEvent * event)
|
||||
gst_output_selector_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
gboolean res = TRUE;
|
||||
GstOutputSelector *sel;
|
||||
GstPad *active = NULL;
|
||||
|
||||
sel = GST_OUTPUT_SELECTOR (GST_PAD_PARENT (pad));
|
||||
sel = GST_OUTPUT_SELECTOR (parent);
|
||||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_CAPS:
|
||||
|
@ -514,7 +516,7 @@ gst_output_selector_event (GstPad * pad, GstEvent * event)
|
|||
switch (sel->pad_negotiation_mode) {
|
||||
case GST_OUTPUT_SELECTOR_PAD_NEGOTIATION_MODE_ALL:
|
||||
/* Send caps to all src pads */
|
||||
res = gst_pad_event_default (pad, event);
|
||||
res = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
case GST_OUTPUT_SELECTOR_PAD_NEGOTIATION_MODE_NONE:
|
||||
gst_event_unref (event);
|
||||
|
@ -539,12 +541,12 @@ gst_output_selector_event (GstPad * pad, GstEvent * event)
|
|||
&sel->segment);
|
||||
|
||||
/* Send newsegment to all src pads */
|
||||
res = gst_pad_event_default (pad, event);
|
||||
res = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
}
|
||||
case GST_EVENT_EOS:
|
||||
/* Send eos to all src pads */
|
||||
res = gst_pad_event_default (pad, event);
|
||||
res = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
default:
|
||||
{
|
||||
|
|
|
@ -192,15 +192,18 @@ static void gst_queue_set_property (GObject * object,
|
|||
static void gst_queue_get_property (GObject * object,
|
||||
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 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,
|
||||
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,
|
||||
GstQuery * query);
|
||||
|
||||
|
@ -726,11 +729,11 @@ no_item:
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_queue_handle_sink_event (GstPad * pad, GstEvent * event)
|
||||
gst_queue_handle_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
GstQueue *queue;
|
||||
|
||||
queue = GST_QUEUE (GST_PAD_PARENT (pad));
|
||||
queue = GST_QUEUE (parent);
|
||||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_FLUSH_START:
|
||||
|
@ -875,12 +878,12 @@ gst_queue_leak_downstream (GstQueue * queue)
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_queue_chain (GstPad * pad, GstBuffer * buffer)
|
||||
gst_queue_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||
{
|
||||
GstQueue *queue;
|
||||
GstClockTime duration, timestamp;
|
||||
|
||||
queue = (GstQueue *) GST_OBJECT_PARENT (pad);
|
||||
queue = GST_QUEUE_CAST (parent);
|
||||
|
||||
/* we have to lock the queue since we span threads */
|
||||
GST_QUEUE_MUTEX_LOCK_CHECK (queue, out_flushing);
|
||||
|
@ -1195,10 +1198,10 @@ out_flushing:
|
|||
}
|
||||
|
||||
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;
|
||||
GstQueue *queue = GST_QUEUE (GST_PAD_PARENT (pad));
|
||||
GstQueue *queue = GST_QUEUE (parent);
|
||||
|
||||
#ifndef GST_DISABLE_GST_DEBUG
|
||||
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))
|
||||
#define GST_IS_QUEUE_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_QUEUE))
|
||||
#define GST_QUEUE_CAST(obj) \
|
||||
((GstQueue *)(obj))
|
||||
|
||||
typedef struct _GstQueue GstQueue;
|
||||
typedef struct _GstQueueSize GstQueueSize;
|
||||
|
|
|
@ -223,22 +223,25 @@ static void gst_queue2_set_property (GObject * object,
|
|||
static void gst_queue2_get_property (GObject * object,
|
||||
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 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,
|
||||
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,
|
||||
GstQuery * query);
|
||||
static gboolean gst_queue2_handle_query (GstElement * element,
|
||||
GstQuery * query);
|
||||
|
||||
static GstFlowReturn gst_queue2_get_range (GstPad * pad, guint64 offset,
|
||||
guint length, GstBuffer ** buffer);
|
||||
static GstFlowReturn gst_queue2_get_range (GstPad * pad, GstObject * parent,
|
||||
guint64 offset, guint length, GstBuffer ** buffer);
|
||||
|
||||
static gboolean gst_queue2_src_activate_pull (GstPad * pad, gboolean active);
|
||||
static gboolean gst_queue2_src_activate_push (GstPad * pad, gboolean active);
|
||||
|
@ -1911,11 +1914,12 @@ no_item:
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_queue2_handle_sink_event (GstPad * pad, GstEvent * event)
|
||||
gst_queue2_handle_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event)
|
||||
{
|
||||
GstQueue2 *queue;
|
||||
|
||||
queue = GST_QUEUE2 (GST_OBJECT_PARENT (pad));
|
||||
queue = GST_QUEUE2 (parent);
|
||||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_FLUSH_START:
|
||||
|
@ -2091,11 +2095,11 @@ gst_queue2_is_filled (GstQueue2 * queue)
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_queue2_chain (GstPad * pad, GstBuffer * buffer)
|
||||
gst_queue2_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||
{
|
||||
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 %"
|
||||
G_GSIZE_FORMAT ", time %" GST_TIME_FORMAT ", duration %"
|
||||
|
@ -2322,10 +2326,10 @@ out_flushing:
|
|||
}
|
||||
|
||||
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;
|
||||
GstQueue2 *queue = GST_QUEUE2 (GST_PAD_PARENT (pad));
|
||||
GstQueue2 *queue = GST_QUEUE2 (parent);
|
||||
|
||||
#ifndef GST_DISABLE_GST_DEBUG
|
||||
GST_CAT_DEBUG_OBJECT (queue_dataflow, queue, "got event %p (%s)",
|
||||
|
@ -2596,13 +2600,13 @@ gst_queue2_update_upstream_size (GstQueue2 * queue)
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_queue2_get_range (GstPad * pad, guint64 offset, guint length,
|
||||
GstBuffer ** buffer)
|
||||
gst_queue2_get_range (GstPad * pad, GstObject * parent, guint64 offset,
|
||||
guint length, GstBuffer ** buffer)
|
||||
{
|
||||
GstQueue2 *queue;
|
||||
GstFlowReturn ret;
|
||||
|
||||
queue = GST_QUEUE2_CAST (GST_PAD_PARENT (pad));
|
||||
queue = GST_QUEUE2_CAST (parent);
|
||||
|
||||
length = (length == -1) ? DEFAULT_BUFFER_SIZE : length;
|
||||
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);
|
||||
static void gst_tee_dispose (GObject * object);
|
||||
|
||||
static GstFlowReturn gst_tee_chain (GstPad * pad, GstBuffer * buffer);
|
||||
static GstFlowReturn gst_tee_chain_list (GstPad * pad, GstBufferList * list);
|
||||
static gboolean gst_tee_sink_event (GstPad * pad, GstEvent * event);
|
||||
static GstFlowReturn gst_tee_chain (GstPad * pad, GstObject * parent,
|
||||
GstBuffer * buffer);
|
||||
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,
|
||||
GstQuery * query);
|
||||
static gboolean gst_tee_sink_activate_push (GstPad * pad, gboolean active);
|
||||
static gboolean gst_tee_src_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
static gboolean gst_tee_src_activate_pull (GstPad * pad, gboolean active);
|
||||
static GstFlowReturn gst_tee_src_get_range (GstPad * pad, guint64 offset,
|
||||
guint length, GstBuffer ** buf);
|
||||
static GstFlowReturn gst_tee_src_get_range (GstPad * pad, GstObject * parent,
|
||||
guint64 offset, guint length, GstBuffer ** buf);
|
||||
|
||||
static void
|
||||
gst_tee_dispose (GObject * object)
|
||||
|
@ -480,13 +483,13 @@ gst_tee_get_property (GObject * object, guint prop_id, GValue * value,
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_tee_sink_event (GstPad * pad, GstEvent * event)
|
||||
gst_tee_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
gboolean res;
|
||||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
default:
|
||||
res = gst_pad_event_default (pad, event);
|
||||
res = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -688,12 +691,12 @@ error:
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_tee_chain (GstPad * pad, GstBuffer * buffer)
|
||||
gst_tee_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||
{
|
||||
GstFlowReturn res;
|
||||
GstTee *tee;
|
||||
|
||||
tee = GST_TEE_CAST (GST_OBJECT_PARENT (pad));
|
||||
tee = GST_TEE_CAST (parent);
|
||||
|
||||
GST_DEBUG_OBJECT (tee, "received buffer %p", buffer);
|
||||
|
||||
|
@ -705,12 +708,12 @@ gst_tee_chain (GstPad * pad, GstBuffer * buffer)
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_tee_chain_list (GstPad * pad, GstBufferList * list)
|
||||
gst_tee_chain_list (GstPad * pad, GstObject * parent, GstBufferList * list)
|
||||
{
|
||||
GstFlowReturn res;
|
||||
GstTee *tee;
|
||||
|
||||
tee = GST_TEE_CAST (GST_PAD_PARENT (pad));
|
||||
tee = GST_TEE_CAST (parent);
|
||||
|
||||
GST_DEBUG_OBJECT (tee, "received list %p", list);
|
||||
|
||||
|
@ -877,13 +880,13 @@ gst_tee_pull_eos (GstTee * tee)
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_tee_src_get_range (GstPad * pad, guint64 offset, guint length,
|
||||
GstBuffer ** buf)
|
||||
gst_tee_src_get_range (GstPad * pad, GstObject * parent, guint64 offset,
|
||||
guint length, GstBuffer ** buf)
|
||||
{
|
||||
GstTee *tee;
|
||||
GstFlowReturn ret;
|
||||
|
||||
tee = GST_TEE (GST_PAD_PARENT (pad));
|
||||
tee = GST_TEE (parent);
|
||||
|
||||
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
|
||||
|
||||
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,
|
||||
GstObject * parent, GstQuery * query);
|
||||
|
||||
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,
|
||||
GstCaps * caps);
|
||||
static GstFlowReturn gst_type_find_element_chain (GstPad * sinkpad,
|
||||
GstBuffer * buffer);
|
||||
GstObject * parent, GstBuffer * buffer);
|
||||
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
|
||||
gst_type_find_element_change_state (GstElement * element,
|
||||
|
@ -426,9 +426,10 @@ gst_type_find_element_src_event_mask (GstPad * pad)
|
|||
#endif
|
||||
|
||||
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) {
|
||||
/* need to do more? */
|
||||
|
@ -514,10 +515,11 @@ no_data:
|
|||
}
|
||||
|
||||
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;
|
||||
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_EVENT_TYPE_NAME (event), typefind->mode);
|
||||
|
@ -726,12 +728,13 @@ gst_type_find_guess_by_extension (GstTypeFindElement * typefind, GstPad * pad,
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_type_find_element_chain (GstPad * pad, GstBuffer * buffer)
|
||||
gst_type_find_element_chain (GstPad * pad, GstObject * parent,
|
||||
GstBuffer * buffer)
|
||||
{
|
||||
GstTypeFindElement *typefind;
|
||||
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);
|
||||
|
||||
|
@ -854,13 +857,13 @@ low_probability:
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_type_find_element_getrange (GstPad * srcpad,
|
||||
gst_type_find_element_getrange (GstPad * srcpad, GstObject * parent,
|
||||
guint64 offset, guint length, GstBuffer ** buffer)
|
||||
{
|
||||
GstTypeFindElement *typefind;
|
||||
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);
|
||||
|
||||
|
|
|
@ -72,8 +72,10 @@ static void gst_valve_set_property (GObject * object,
|
|||
static void gst_valve_get_property (GObject * object,
|
||||
guint prop_id, GValue * value, GParamSpec * pspec);
|
||||
|
||||
static GstFlowReturn gst_valve_chain (GstPad * pad, GstBuffer * buffer);
|
||||
static gboolean gst_valve_sink_event (GstPad * pad, GstEvent * event);
|
||||
static GstFlowReturn gst_valve_chain (GstPad * pad, GstObject * parent,
|
||||
GstBuffer * buffer);
|
||||
static gboolean gst_valve_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
static gboolean gst_valve_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
|
||||
|
@ -164,9 +166,9 @@ gst_valve_get_property (GObject * object,
|
|||
}
|
||||
|
||||
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;
|
||||
|
||||
if (g_atomic_int_get (&valve->drop)) {
|
||||
|
@ -194,12 +196,12 @@ gst_valve_chain (GstPad * pad, GstBuffer * buffer)
|
|||
|
||||
|
||||
static gboolean
|
||||
gst_valve_sink_event (GstPad * pad, GstEvent * event)
|
||||
gst_valve_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
GstValve *valve;
|
||||
gboolean ret = TRUE;
|
||||
|
||||
valve = GST_VALVE (GST_PAD_PARENT (pad));
|
||||
valve = GST_VALVE (parent);
|
||||
|
||||
if (g_atomic_int_get (&valve->drop))
|
||||
gst_event_unref (event);
|
||||
|
|
|
@ -34,7 +34,7 @@ static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
|||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
static gboolean
|
||||
event_func (GstPad * pad, GstEvent * event)
|
||||
event_func (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) {
|
||||
have_eos = TRUE;
|
||||
|
|
|
@ -37,7 +37,7 @@ static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
|||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
static gboolean
|
||||
event_func (GstPad * pad, GstEvent * event)
|
||||
event_func (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) {
|
||||
have_eos = TRUE;
|
||||
|
|
|
@ -37,7 +37,7 @@ static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
|||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
static gboolean
|
||||
event_func (GstPad * pad, GstEvent * event)
|
||||
event_func (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
gboolean res = TRUE;
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ static gint bufcount = 0;
|
|||
static gint alloccount = 0;
|
||||
|
||||
static GstFlowReturn
|
||||
chain_ok (GstPad * pad, GstBuffer * buffer)
|
||||
chain_ok (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||
{
|
||||
bufcount++;
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
|
|||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
static gboolean
|
||||
event_func (GstPad * pad, GstEvent * event)
|
||||
event_func (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) {
|
||||
have_eos = TRUE;
|
||||
|
|
|
@ -326,7 +326,7 @@ struct PadData
|
|||
};
|
||||
|
||||
static GstFlowReturn
|
||||
mq_dummypad_chain (GstPad * sinkpad, GstBuffer * buf)
|
||||
mq_dummypad_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf)
|
||||
{
|
||||
guint32 cur_id;
|
||||
struct PadData *pad_data;
|
||||
|
@ -377,7 +377,7 @@ mq_dummypad_chain (GstPad * sinkpad, GstBuffer * buf)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
mq_dummypad_event (GstPad * sinkpad, GstEvent * event)
|
||||
mq_dummypad_event (GstPad * sinkpad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
struct PadData *pad_data;
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ queue_underrun (GstElement * queue, gpointer user_data)
|
|||
}
|
||||
|
||||
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)));
|
||||
events = g_list_append (events, event);
|
||||
|
|
|
@ -441,14 +441,14 @@ GST_START_TEST (test_internal_links)
|
|||
GST_END_TEST;
|
||||
|
||||
static GstFlowReturn
|
||||
_fake_chain (GstPad * pad, GstBuffer * buffer)
|
||||
_fake_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||
{
|
||||
gst_buffer_unref (buffer);
|
||||
return GST_FLOW_OK;
|
||||
}
|
||||
|
||||
static GstFlowReturn
|
||||
_fake_chain_error (GstPad * pad, GstBuffer * buffer)
|
||||
_fake_chain_error (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||
{
|
||||
gst_buffer_unref (buffer);
|
||||
return GST_FLOW_ERROR;
|
||||
|
|
|
@ -40,7 +40,7 @@ gboolean event_received = FALSE;
|
|||
gboolean buffer_allocated = FALSE;
|
||||
|
||||
static gboolean
|
||||
event_func (GstPad * pad, GstEvent * event)
|
||||
event_func (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
event_received = TRUE;
|
||||
gst_event_unref (event);
|
||||
|
|
|
@ -221,7 +221,7 @@ GST_END_TEST;
|
|||
static GstCaps *event_caps = NULL;
|
||||
|
||||
static gboolean
|
||||
sticky_event (GstPad * pad, GstEvent * event)
|
||||
sticky_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
GstCaps *caps;
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ gst_test_trans_set_data (GstTestTrans * this, TestTransData * data)
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
result_sink_chain (GstPad * pad, GstBuffer * buffer)
|
||||
result_sink_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||
{
|
||||
TestTransData *data;
|
||||
|
||||
|
|
Loading…
Reference in a new issue