[Cogl] [PATCH 01/13] cogl-gst: video-sink: rework caps exposure

Lionel Landwerlin llandwerlin at gmail.com
Mon Dec 9 03:17:48 PST 2013


---
 cogl-gst/cogl-gst-video-sink.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/cogl-gst/cogl-gst-video-sink.c b/cogl-gst/cogl-gst-video-sink.c
index d7e8b61..bcbef35 100644
--- a/cogl-gst/cogl-gst-video-sink.c
+++ b/cogl-gst/cogl-gst-video-sink.c
@@ -57,8 +57,6 @@
                        "RGB," \
                        "BGR }"
 
-#define SINK_CAPS GST_VIDEO_CAPS_MAKE (BASE_SINK_CAPS)
-
 #define COGL_GST_PARAM_STATIC        \
   (G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)
 
@@ -71,11 +69,14 @@
 #define COGL_GST_PARAM_READWRITE     \
   (G_PARAM_READABLE | G_PARAM_WRITABLE | COGL_GST_PARAM_STATIC)
 
+static const char cogl_gst_video_sink_caps_str[] =
+  GST_VIDEO_CAPS_MAKE_WITH_FEATURES("memory:SystemMemory", BASE_SINK_CAPS);
+
 static GstStaticPadTemplate sinktemplate_all =
   GST_STATIC_PAD_TEMPLATE ("sink",
                            GST_PAD_SINK,
                            GST_PAD_ALWAYS,
-                           GST_STATIC_CAPS (SINK_CAPS));
+                           GST_STATIC_CAPS (cogl_gst_video_sink_caps_str));
 
 G_DEFINE_TYPE (CoglGstVideoSink, cogl_gst_video_sink, GST_TYPE_BASE_SINK);
 
@@ -557,7 +558,7 @@ static CoglGstRenderer rgb24_renderer =
   "RGB 24",
   COGL_GST_RGB24,
   0,
-  GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ RGB, BGR }")),
+  GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES ("memory:SystemMemory", "{ RGB, BGR }")),
   1, /* n_layers */
   cogl_gst_rgb_setup_pipeline,
   cogl_gst_rgb24_upload,
@@ -603,7 +604,7 @@ static CoglGstRenderer rgb32_renderer =
   "RGB 32",
   COGL_GST_RGB32,
   0,
-  GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ RGBA, BGRA }")),
+  GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES("memory:SystemMemory", "{ RGBA, BGRA }")),
   1, /* n_layers */
   cogl_gst_rgb_setup_pipeline,
   cogl_gst_rgb32_upload,
@@ -700,7 +701,7 @@ static CoglGstRenderer yv12_glsl_renderer =
   "YV12 glsl",
   COGL_GST_YV12,
   COGL_GST_RENDERER_NEEDS_GLSL,
-  GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("YV12")),
+  GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES("memory:SystemMemory", "YV12")),
   3, /* n_layers */
   cogl_gst_yv12_glsl_setup_pipeline,
   cogl_gst_yv12_upload,
@@ -711,7 +712,7 @@ static CoglGstRenderer i420_glsl_renderer =
   "I420 glsl",
   COGL_GST_I420,
   COGL_GST_RENDERER_NEEDS_GLSL,
-  GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("I420")),
+  GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES("memory:SystemMemory", "I420")),
   3, /* n_layers */
   cogl_gst_yv12_glsl_setup_pipeline,
   cogl_gst_yv12_upload,
@@ -789,7 +790,7 @@ static CoglGstRenderer ayuv_glsl_renderer =
   "AYUV glsl",
   COGL_GST_AYUV,
   COGL_GST_RENDERER_NEEDS_GLSL,
-  GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("AYUV")),
+  GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES("memory:SystemMemory", "AYUV")),
   3, /* n_layers */
   cogl_gst_ayuv_glsl_setup_pipeline,
   cogl_gst_ayuv_upload,
-- 
1.8.5



More information about the Cogl mailing list