From dd6ba0b28ee06be15db53960a959b8b74fc47a6f Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Wed, 31 Dec 2003 11:08:01 +0000 Subject: [PATCH] gst/gstqueue.c: use gst_pad_proxy_getcaps() Original commit message from CVS: 2003-12-31 Ronald Bultje * gst/gstqueue.c: (gst_queue_init): use gst_pad_proxy_getcaps() --- ChangeLog | 5 +++++ gst/gstqueue.c | 16 ++-------------- plugins/elements/gstqueue.c | 16 ++-------------- 3 files changed, 9 insertions(+), 28 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4c3d09b0ec..ca0b493d89 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-12-31 Ronald Bultje + + * gst/gstqueue.c: (gst_queue_init): + use gst_pad_proxy_getcaps() + 2003-12-31 David Schleef * gst/elements/gstshaper.c: (gst_shaper_link): diff --git a/gst/gstqueue.c b/gst/gstqueue.c index d00ca1d403..46c0cf100a 100644 --- a/gst/gstqueue.c +++ b/gst/gstqueue.c @@ -83,7 +83,6 @@ static void gst_queue_get_property (GObject *object, GValue *value, GParamSpec *pspec); -static GstCaps *gst_queue_getcaps (GstPad *pad); static GstPadLinkReturn gst_queue_link (GstPad *pad, const GstCaps *caps); @@ -252,14 +251,14 @@ gst_queue_init (GstQueue *queue) gst_pad_set_chain_function (queue->sinkpad, GST_DEBUG_FUNCPTR (gst_queue_chain)); gst_element_add_pad (GST_ELEMENT (queue), queue->sinkpad); gst_pad_set_link_function (queue->sinkpad, GST_DEBUG_FUNCPTR (gst_queue_link)); - gst_pad_set_getcaps_function (queue->sinkpad, GST_DEBUG_FUNCPTR (gst_queue_getcaps)); + gst_pad_set_getcaps_function (queue->sinkpad, GST_DEBUG_FUNCPTR (gst_pad_proxy_getcaps)); gst_pad_set_active (queue->sinkpad, TRUE); queue->srcpad = gst_pad_new ("src", GST_PAD_SRC); gst_pad_set_get_function (queue->srcpad, GST_DEBUG_FUNCPTR (gst_queue_get)); gst_element_add_pad (GST_ELEMENT (queue), queue->srcpad); gst_pad_set_link_function (queue->srcpad, GST_DEBUG_FUNCPTR (gst_queue_link)); - gst_pad_set_getcaps_function (queue->srcpad, GST_DEBUG_FUNCPTR (gst_queue_getcaps)); + gst_pad_set_getcaps_function (queue->srcpad, GST_DEBUG_FUNCPTR (gst_pad_proxy_getcaps)); gst_pad_set_event_function (queue->srcpad, GST_DEBUG_FUNCPTR (gst_queue_handle_src_event)); gst_pad_set_active (queue->srcpad, TRUE); @@ -335,17 +334,6 @@ gst_queue_link (GstPad *pad, const GstCaps *caps) return gst_pad_try_set_caps (gst_queue_otherpad (pad), caps); } -static GstCaps * -gst_queue_getcaps (GstPad *pad) -{ - GstPad *otherpad = GST_PAD_PEER (gst_queue_otherpad (pad)); - - if (otherpad) - return gst_pad_get_caps (otherpad); - - return gst_caps_new_any (); -} - static void gst_queue_locked_flush (GstQueue *queue) { diff --git a/plugins/elements/gstqueue.c b/plugins/elements/gstqueue.c index d00ca1d403..46c0cf100a 100644 --- a/plugins/elements/gstqueue.c +++ b/plugins/elements/gstqueue.c @@ -83,7 +83,6 @@ static void gst_queue_get_property (GObject *object, GValue *value, GParamSpec *pspec); -static GstCaps *gst_queue_getcaps (GstPad *pad); static GstPadLinkReturn gst_queue_link (GstPad *pad, const GstCaps *caps); @@ -252,14 +251,14 @@ gst_queue_init (GstQueue *queue) gst_pad_set_chain_function (queue->sinkpad, GST_DEBUG_FUNCPTR (gst_queue_chain)); gst_element_add_pad (GST_ELEMENT (queue), queue->sinkpad); gst_pad_set_link_function (queue->sinkpad, GST_DEBUG_FUNCPTR (gst_queue_link)); - gst_pad_set_getcaps_function (queue->sinkpad, GST_DEBUG_FUNCPTR (gst_queue_getcaps)); + gst_pad_set_getcaps_function (queue->sinkpad, GST_DEBUG_FUNCPTR (gst_pad_proxy_getcaps)); gst_pad_set_active (queue->sinkpad, TRUE); queue->srcpad = gst_pad_new ("src", GST_PAD_SRC); gst_pad_set_get_function (queue->srcpad, GST_DEBUG_FUNCPTR (gst_queue_get)); gst_element_add_pad (GST_ELEMENT (queue), queue->srcpad); gst_pad_set_link_function (queue->srcpad, GST_DEBUG_FUNCPTR (gst_queue_link)); - gst_pad_set_getcaps_function (queue->srcpad, GST_DEBUG_FUNCPTR (gst_queue_getcaps)); + gst_pad_set_getcaps_function (queue->srcpad, GST_DEBUG_FUNCPTR (gst_pad_proxy_getcaps)); gst_pad_set_event_function (queue->srcpad, GST_DEBUG_FUNCPTR (gst_queue_handle_src_event)); gst_pad_set_active (queue->srcpad, TRUE); @@ -335,17 +334,6 @@ gst_queue_link (GstPad *pad, const GstCaps *caps) return gst_pad_try_set_caps (gst_queue_otherpad (pad), caps); } -static GstCaps * -gst_queue_getcaps (GstPad *pad) -{ - GstPad *otherpad = GST_PAD_PEER (gst_queue_otherpad (pad)); - - if (otherpad) - return gst_pad_get_caps (otherpad); - - return gst_caps_new_any (); -} - static void gst_queue_locked_flush (GstQueue *queue) { -- 2.34.1