gst/gstqueue.c: use gst_pad_proxy_getcaps()

Original commit message from CVS:
2003-12-31  Ronald Bultje  <rbultje@ronald.bitfreak.net>

* gst/gstqueue.c: (gst_queue_init):
use gst_pad_proxy_getcaps()
This commit is contained in:
Ronald S. Bultje 2003-12-31 11:08:01 +00:00
parent 2ecb08f2bd
commit dd6ba0b28e
3 changed files with 9 additions and 28 deletions

View file

@ -1,3 +1,8 @@
2003-12-31 Ronald Bultje <rbultje@ronald.bitfreak.net>
* gst/gstqueue.c: (gst_queue_init):
use gst_pad_proxy_getcaps()
2003-12-31 David Schleef <ds@schleef.org> 2003-12-31 David Schleef <ds@schleef.org>
* gst/elements/gstshaper.c: (gst_shaper_link): * gst/elements/gstshaper.c: (gst_shaper_link):

View file

@ -83,7 +83,6 @@ static void gst_queue_get_property (GObject *object,
GValue *value, GValue *value,
GParamSpec *pspec); GParamSpec *pspec);
static GstCaps *gst_queue_getcaps (GstPad *pad);
static GstPadLinkReturn static GstPadLinkReturn
gst_queue_link (GstPad *pad, gst_queue_link (GstPad *pad,
const GstCaps *caps); 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_pad_set_chain_function (queue->sinkpad, GST_DEBUG_FUNCPTR (gst_queue_chain));
gst_element_add_pad (GST_ELEMENT (queue), queue->sinkpad); 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_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); gst_pad_set_active (queue->sinkpad, TRUE);
queue->srcpad = gst_pad_new ("src", GST_PAD_SRC); queue->srcpad = gst_pad_new ("src", GST_PAD_SRC);
gst_pad_set_get_function (queue->srcpad, GST_DEBUG_FUNCPTR (gst_queue_get)); gst_pad_set_get_function (queue->srcpad, GST_DEBUG_FUNCPTR (gst_queue_get));
gst_element_add_pad (GST_ELEMENT (queue), queue->srcpad); 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_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_event_function (queue->srcpad, GST_DEBUG_FUNCPTR (gst_queue_handle_src_event));
gst_pad_set_active (queue->srcpad, TRUE); 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); 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 static void
gst_queue_locked_flush (GstQueue *queue) gst_queue_locked_flush (GstQueue *queue)
{ {

View file

@ -83,7 +83,6 @@ static void gst_queue_get_property (GObject *object,
GValue *value, GValue *value,
GParamSpec *pspec); GParamSpec *pspec);
static GstCaps *gst_queue_getcaps (GstPad *pad);
static GstPadLinkReturn static GstPadLinkReturn
gst_queue_link (GstPad *pad, gst_queue_link (GstPad *pad,
const GstCaps *caps); 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_pad_set_chain_function (queue->sinkpad, GST_DEBUG_FUNCPTR (gst_queue_chain));
gst_element_add_pad (GST_ELEMENT (queue), queue->sinkpad); 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_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); gst_pad_set_active (queue->sinkpad, TRUE);
queue->srcpad = gst_pad_new ("src", GST_PAD_SRC); queue->srcpad = gst_pad_new ("src", GST_PAD_SRC);
gst_pad_set_get_function (queue->srcpad, GST_DEBUG_FUNCPTR (gst_queue_get)); gst_pad_set_get_function (queue->srcpad, GST_DEBUG_FUNCPTR (gst_queue_get));
gst_element_add_pad (GST_ELEMENT (queue), queue->srcpad); 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_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_event_function (queue->srcpad, GST_DEBUG_FUNCPTR (gst_queue_handle_src_event));
gst_pad_set_active (queue->srcpad, TRUE); 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); 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 static void
gst_queue_locked_flush (GstQueue *queue) gst_queue_locked_flush (GstQueue *queue)
{ {