From df3d415906c9df32eaba5dbf42647c4b5cc16323 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Mon, 11 May 2015 15:02:02 -0400 Subject: [PATCH] gltestsrc: Use default get_caps implementation The custom code is wrong as it ignores the templates, which leads to missing fields in the result. Instead, simply use the default get_caps implementation which does it correctly (get the template, intersect with filter and return). https://bugzilla.gnome.org/show_bug.cgi?id=749237 --- ext/gl/gstgltestsrc.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/ext/gl/gstgltestsrc.c b/ext/gl/gstgltestsrc.c index 100ecaae23..eba66b043a 100644 --- a/ext/gl/gstgltestsrc.c +++ b/ext/gl/gstgltestsrc.c @@ -82,7 +82,6 @@ static void gst_gl_test_src_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); static gboolean gst_gl_test_src_setcaps (GstBaseSrc * bsrc, GstCaps * caps); -static GstCaps *gst_gl_test_src_getcaps (GstBaseSrc * bsrc, GstCaps * filter); static GstCaps *gst_gl_test_src_fixate (GstBaseSrc * bsrc, GstCaps * caps); static gboolean gst_gl_test_src_is_seekable (GstBaseSrc * psrc); @@ -181,7 +180,6 @@ gst_gl_test_src_class_init (GstGLTestSrcClass * klass) element_class->change_state = gst_gl_test_src_change_state; gstbasesrc_class->set_caps = gst_gl_test_src_setcaps; - gstbasesrc_class->get_caps = gst_gl_test_src_getcaps; gstbasesrc_class->is_seekable = gst_gl_test_src_is_seekable; gstbasesrc_class->do_seek = gst_gl_test_src_do_seek; gstbasesrc_class->query = gst_gl_test_src_query; @@ -451,24 +449,6 @@ wrong_caps: } } -static GstCaps * -gst_gl_test_src_getcaps (GstBaseSrc * bsrc, GstCaps * filter) -{ - GstCaps *tmp = NULL; - GstCaps *result = - gst_caps_from_string ("video/x-raw(memory:GLMemory),format=RGBA"); - - if (filter) { - tmp = gst_caps_intersect_full (filter, result, GST_CAPS_INTERSECT_FIRST); - gst_caps_unref (result); - result = tmp; - } - - GST_DEBUG_OBJECT (bsrc, "returning caps: %" GST_PTR_FORMAT, result); - - return result; -} - static void gst_gl_test_src_set_context (GstElement * element, GstContext * context) {