summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2010-06-25 17:03:27 (GMT)
committerWim Taymans <wim.taymans@collabora.co.uk>2010-06-29 07:57:41 (GMT)
commit808298833aab4076aef7ffb93c072c174e64ba92 (patch)
tree0eac45e65fbc8c3679c2fef73db28cdeaa00a016
parent9300c5b29b4a78cda99effc4b675b224994be4cb (diff)
multiqueue: implement acceptcaps function
Our acceptcaps function can simply forward the query.
-rw-r--r--plugins/elements/gstmultiqueue.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/plugins/elements/gstmultiqueue.c b/plugins/elements/gstmultiqueue.c
index 6a11431..b9fa663 100644
--- a/plugins/elements/gstmultiqueue.c
+++ b/plugins/elements/gstmultiqueue.c
@@ -1315,6 +1315,22 @@ gst_multi_queue_getcaps (GstPad * pad)
return result;
}
+static gboolean
+gst_multi_queue_acceptcaps (GstPad * pad, GstCaps * caps)
+{
+ GstSingleQueue *sq = gst_pad_get_element_private (pad);
+ GstPad *otherpad;
+ gboolean result;
+
+ otherpad = (pad == sq->srcpad) ? sq->sinkpad : sq->srcpad;
+
+ GST_LOG_OBJECT (otherpad, "Accept caps from the peer of this pad");
+
+ result = gst_pad_peer_accept_caps (otherpad, caps);
+
+ return result;
+}
+
static GstFlowReturn
gst_multi_queue_bufferalloc (GstPad * pad, guint64 offset, guint size,
GstCaps * caps, GstBuffer ** buf)
@@ -1652,6 +1668,8 @@ gst_single_queue_new (GstMultiQueue * mqueue)
GST_DEBUG_FUNCPTR (gst_multi_queue_sink_event));
gst_pad_set_getcaps_function (sq->sinkpad,
GST_DEBUG_FUNCPTR (gst_multi_queue_getcaps));
+ gst_pad_set_acceptcaps_function (sq->sinkpad,
+ GST_DEBUG_FUNCPTR (gst_multi_queue_acceptcaps));
gst_pad_set_bufferalloc_function (sq->sinkpad,
GST_DEBUG_FUNCPTR (gst_multi_queue_bufferalloc));
gst_pad_set_iterate_internal_links_function (sq->sinkpad,
@@ -1665,6 +1683,8 @@ gst_single_queue_new (GstMultiQueue * mqueue)
GST_DEBUG_FUNCPTR (gst_multi_queue_src_activate_push));
gst_pad_set_getcaps_function (sq->srcpad,
GST_DEBUG_FUNCPTR (gst_multi_queue_getcaps));
+ gst_pad_set_acceptcaps_function (sq->srcpad,
+ GST_DEBUG_FUNCPTR (gst_multi_queue_acceptcaps));
gst_pad_set_event_function (sq->srcpad,
GST_DEBUG_FUNCPTR (gst_multi_queue_src_event));
gst_pad_set_query_function (sq->srcpad,