appsrc: implement get_caps vfunc

This allows downstream elements to query what caps are available.

https://bugzilla.gnome.org/show_bug.cgi?id=667312
This commit is contained in:
Havard Graff 2011-10-22 16:41:23 +02:00 committed by Tim-Philipp Müller
parent 19d17b8f24
commit b11d516c46

View file

@ -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)