omx: Add more constraints to the default sink template caps
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 19 Mar 2013 12:27:35 +0000 (13:27 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 19 Mar 2013 12:28:30 +0000 (13:28 +0100)
config/rpi/gstomx.conf
omx/gstomxh263dec.c
omx/gstomxh264dec.c
omx/gstomxmjpegdec.c
omx/gstomxmpeg2videodec.c
omx/gstomxmpeg4videodec.c
omx/gstomxtheoradec.c
omx/gstomxvideodec.c
omx/gstomxvp8dec.c
omx/gstomxwmvdec.c

index 43667f4..ee1da9d 100644 (file)
@@ -69,7 +69,7 @@ rank=256
 in-port-index=200
 out-port-index=201
 hacks=no-component-role
-sink-template-caps=video/x-wmv,wmvversion=(int)3,format=(string){WMV3,WVC1}
+sink-template-caps=video/x-wmv,wmvversion=(int)3,format=(string){WMV3,WVC1},width=(int)[1,MAX],height=(int)[1,MAX]
 
 [omxh264enc]
 type-name=GstOMXH264Enc
index 5db50c3..134995b 100644 (file)
@@ -60,7 +60,8 @@ gst_omx_h263_dec_class_init (GstOMXH263DecClass * klass)
   videodec_class->set_format = GST_DEBUG_FUNCPTR (gst_omx_h263_dec_set_format);
 
   videodec_class->cdata.default_sink_template_caps = "video/x-h263, "
-      "parsed=(boolean) true";
+      "variant=(string) itu, "
+      "parsed=(boolean) true, " "width=(int) [1,MAX], " "height=(int) [1,MAX]";
 
   gst_element_class_set_static_metadata (element_class,
       "OpenMAX H.263 Video Decoder",
index b760d20..2581889 100644 (file)
@@ -61,7 +61,9 @@ gst_omx_h264_dec_class_init (GstOMXH264DecClass * klass)
 
   videodec_class->cdata.default_sink_template_caps = "video/x-h264, "
       "parsed=(boolean) true, "
-      "alignment=(string)au, " "stream-format=(string) byte-stream";
+      "alignment=(string) au, "
+      "stream-format=(string) byte-stream, "
+      "width=(int) [1,MAX], " "height=(int) [1,MAX]";
 
   gst_element_class_set_static_metadata (element_class,
       "OpenMAX H.264 Video Decoder",
index 402e51b..8e704ae 100644 (file)
@@ -59,7 +59,8 @@ gst_omx_mjpeg_dec_class_init (GstOMXMJPEGDecClass * klass)
       GST_DEBUG_FUNCPTR (gst_omx_mjpeg_dec_is_format_change);
   videodec_class->set_format = GST_DEBUG_FUNCPTR (gst_omx_mjpeg_dec_set_format);
 
-  videodec_class->cdata.default_sink_template_caps = "image/jpeg";
+  videodec_class->cdata.default_sink_template_caps = "image/jpeg, "
+      "width=(int) [1,MAX], " "height=(int) [1,MAX]";
 
   gst_element_class_set_static_metadata (element_class,
       "OpenMAX MJPEG Video Decoder",
index a3cfd83..7eaaf8b 100644 (file)
@@ -62,7 +62,8 @@ gst_omx_mpeg2_video_dec_class_init (GstOMXMPEG2VideoDecClass * klass)
 
   videodec_class->cdata.default_sink_template_caps = "video/mpeg, "
       "mpegversion=(int) [1, 2], "
-      "systemstream=(boolean) false, " "parsed=(boolean) true";
+      "systemstream=(boolean) false, "
+      "parsed=(boolean) true, " "width=(int) [1,MAX], " "height=(int) [1,MAX]";
 
   gst_element_class_set_static_metadata (element_class,
       "OpenMAX MPEG2 Video Decoder",
index 04ddc78..d912d74 100644 (file)
@@ -63,7 +63,8 @@ gst_omx_mpeg4_video_dec_class_init (GstOMXMPEG4VideoDecClass * klass)
 
   videodec_class->cdata.default_sink_template_caps = "video/mpeg, "
       "mpegversion=(int) 4, "
-      "systemstream=(boolean) false, " "parsed=(boolean) true";
+      "systemstream=(boolean) false, "
+      "parsed=(boolean) true, " "width=(int) [1,MAX], " "height=(int) [1,MAX]";
 
   gst_element_class_set_static_metadata (element_class,
       "OpenMAX MPEG4 Video Decoder",
index e1410df..6d8ca5c 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * Copyright (C) 2011, Hewlett-Packard Development Company, L.P.
- *   Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>, Collabora Ltd.
+ * Copyright (C) 2013, Collabora Ltd.
+ *   Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -64,15 +64,16 @@ gst_omx_theora_dec_class_init (GstOMXTheoraDecClass * klass)
   videodec_class->set_format =
       GST_DEBUG_FUNCPTR (gst_omx_theora_dec_set_format);
 
-  videodec_class->cdata.default_sink_template_caps = "video/x-theora";
+  videodec_class->cdata.default_sink_template_caps = "video/x-theora, "
+      "width=(int) [1,MAX], " "height=(int) [1,MAX]";
 
   gstvideodec_class->handle_frame = gst_omx_theora_dec_handle_frame;
   gstvideodec_class->stop = gst_omx_theora_dec_stop;
 
   gst_element_class_set_static_metadata (element_class,
-      "OpenMAX THEORA Video Decoder",
+      "OpenMAX Theora Video Decoder",
       "Codec/Decoder/Video",
-      "Decode THEORA video streams",
+      "Decode Theora video streams",
       "Sebastian Dröge <sebastian.droege@collabora.co.uk>");
 
   gst_omx_set_default_role (&videodec_class->cdata, "video_decoder.theora");
index b4ebab7..976f58e 100644 (file)
@@ -1,6 +1,8 @@
 /*
  * Copyright (C) 2011, Hewlett-Packard Development Company, L.P.
  *   Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>, Collabora Ltd.
+ * Copyright (C) 2013, Collabora Ltd.
+ *   Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
index 0d5a60d..61886b8 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * Copyright (C) 2011, Hewlett-Packard Development Company, L.P.
- *   Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>, Collabora Ltd.
+ * Copyright (C) 2013, Collabora Ltd.
+ *   Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -59,7 +59,8 @@ gst_omx_vp8_dec_class_init (GstOMXVP8DecClass * klass)
       GST_DEBUG_FUNCPTR (gst_omx_vp8_dec_is_format_change);
   videodec_class->set_format = GST_DEBUG_FUNCPTR (gst_omx_vp8_dec_set_format);
 
-  videodec_class->cdata.default_sink_template_caps = "video/x-vp8";
+  videodec_class->cdata.default_sink_template_caps = "video/x-vp8, "
+      "width=(int) [1,MAX], " "height=(int) [1,MAX]";
 
   gst_element_class_set_static_metadata (element_class,
       "OpenMAX VP8 Video Decoder",
index 28c60f7..64460d9 100644 (file)
@@ -59,8 +59,8 @@ gst_omx_wmv_dec_class_init (GstOMXWMVDecClass * klass)
       GST_DEBUG_FUNCPTR (gst_omx_wmv_dec_is_format_change);
   videodec_class->set_format = GST_DEBUG_FUNCPTR (gst_omx_wmv_dec_set_format);
 
-  videodec_class->cdata.default_sink_template_caps = "video/x-wmv";
-
+  videodec_class->cdata.default_sink_template_caps = "video/x-wmv, "
+      "width=(int) [1,MAX], " "height=(int) [1,MAX]";
 
   gst_element_class_set_static_metadata (element_class,
       "OpenMAX WMV Video Decoder",