[0.10] gst-plugins-base: appsrc: implement get_caps vfunc

Tim Müller tpm at kemper.freedesktop.org
Thu Jan 5 13:10:27 PST 2012


Module: gst-plugins-base
Branch: 0.10
Commit: e51b5d2763d22a0fa58c74c5d1609d575b82aa14
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=e51b5d2763d22a0fa58c74c5d1609d575b82aa14

Author: Havard Graff <havard.graff at tandberg.com>
Date:   Sat Oct 22 16:41:23 2011 +0200

appsrc: implement get_caps vfunc

This allows downstream elements to query what caps are available.

https://bugzilla.gnome.org/show_bug.cgi?id=667312

---

 gst-libs/gst/app/gstappsrc.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/gst-libs/gst/app/gstappsrc.c b/gst-libs/gst/app/gstappsrc.c
index 543a2ad..24686b9 100644
--- a/gst-libs/gst/app/gstappsrc.c
+++ b/gst-libs/gst/app/gstappsrc.c
@@ -219,6 +219,7 @@ static void gst_app_src_get_property (GObject * object, guint prop_id,
 static void gst_app_src_set_latencies (GstAppSrc * appsrc,
     gboolean do_min, guint64 min, gboolean do_max, guint64 max);
 
+static GstCaps *gst_app_src_internal_get_caps (GstBaseSrc * bsrc);
 static GstFlowReturn gst_app_src_create (GstBaseSrc * bsrc,
     guint64 offset, guint size, GstBuffer ** buf);
 static gboolean gst_app_src_start (GstBaseSrc * bsrc);
@@ -485,6 +486,7 @@ gst_app_src_class_init (GstAppSrcClass * klass)
           end_of_stream), NULL, NULL, __gst_app_marshal_ENUM__VOID,
       GST_TYPE_FLOW_RETURN, 0, G_TYPE_NONE);
 
+  basesrc_class->get_caps = gst_app_src_internal_get_caps;
   basesrc_class->create = gst_app_src_create;
   basesrc_class->start = gst_app_src_start;
   basesrc_class->stop = gst_app_src_stop;
@@ -567,6 +569,12 @@ gst_app_src_finalize (GObject * obj)
   G_OBJECT_CLASS (parent_class)->finalize (obj);
 }
 
+static GstCaps *
+gst_app_src_internal_get_caps (GstBaseSrc * bsrc)
+{
+  return gst_app_src_get_caps (GST_APP_SRC_CAST (bsrc));
+}
+
 static void
 gst_app_src_set_property (GObject * object, guint prop_id,
     const GValue * value, GParamSpec * pspec)



More information about the gstreamer-commits mailing list