From: Wim Taymans Date: Wed, 17 Aug 2011 15:16:21 +0000 (+0200) Subject: basesrc: add default fixate function X-Git-Tag: RELEASE-0.11.1~39 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6b876ebf82acffc573fba07598ea14d0de7abb0a;p=platform%2Fupstream%2Fgstreamer.git basesrc: add default fixate function Add a default fixate function which does gst_caps_fixate() because gst_pad_fixate() does not do that anymore. --- diff --git a/libs/gst/base/gstbasesrc.c b/libs/gst/base/gstbasesrc.c index 4ca2e92..ef64843 100644 --- a/libs/gst/base/gstbasesrc.c +++ b/libs/gst/base/gstbasesrc.c @@ -279,6 +279,7 @@ gst_base_src_get_type (void) } static GstCaps *gst_base_src_getcaps (GstPad * pad, GstCaps * filter); +static void gst_base_src_default_fixate (GstBaseSrc * src, GstCaps * caps); static void gst_base_src_fixate (GstPad * pad, GstCaps * caps); static gboolean gst_base_src_is_random_access (GstBaseSrc * src); @@ -375,6 +376,7 @@ gst_base_src_class_init (GstBaseSrcClass * klass) klass->query = GST_DEBUG_FUNCPTR (gst_base_src_default_query); klass->prepare_seek_segment = GST_DEBUG_FUNCPTR (gst_base_src_default_prepare_seek_segment); + klass->fixate = GST_DEBUG_FUNCPTR (gst_base_src_default_fixate); klass->create = GST_DEBUG_FUNCPTR (gst_base_src_default_create); klass->alloc = GST_DEBUG_FUNCPTR (gst_base_src_default_alloc); @@ -842,6 +844,13 @@ gst_base_src_getcaps (GstPad * pad, GstCaps * filter) } static void +gst_base_src_default_fixate (GstBaseSrc * src, GstCaps * caps) +{ + GST_DEBUG_OBJECT (src, "using default caps fixate function"); + gst_caps_fixate (caps); +} + +static void gst_base_src_fixate (GstPad * pad, GstCaps * caps) { GstBaseSrcClass *bclass; @@ -2784,6 +2793,7 @@ gst_base_src_default_negotiate (GstBaseSrc * basesrc) /* now fixate */ GST_DEBUG_OBJECT (basesrc, "have caps: %" GST_PTR_FORMAT, caps); if (gst_caps_is_any (caps)) { + GST_DEBUG_OBJECT (basesrc, "any caps, we stop"); /* hmm, still anything, so element can do anything and * nego is not needed */ result = TRUE;