[gst-cvs] gst-plugins-good: videobox: transform_caps : We can only convert AYUV to xRGB
Edward Hervey
bilboed at kemper.freedesktop.org
Wed Apr 14 09:27:43 PDT 2010
Module: gst-plugins-good
Branch: master
Commit: 146e50455b2b2901de623e65e27c347493005cff
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=146e50455b2b2901de623e65e27c347493005cff
Author: Edward Hervey <bilboed at bilboed.com>
Date: Wed Apr 14 18:13:56 2010 +0200
videobox: transform_caps : We can only convert AYUV to xRGB
We were previously stating that we could convert AYUV/I420/YV12 to xRGB.
---
gst/videobox/gstvideobox.c | 27 +++++++++++++++------------
1 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/gst/videobox/gstvideobox.c b/gst/videobox/gstvideobox.c
index 81931cf..d83481b 100644
--- a/gst/videobox/gstvideobox.c
+++ b/gst/videobox/gstvideobox.c
@@ -1576,18 +1576,21 @@ gst_video_box_transform_caps (GstBaseTransform * trans,
gst_structure_set_value (structure, "format", &list);
g_value_unset (&list);
- gst_structure_set_name (s2, "video/x-raw-rgb");
- g_value_init (&list, GST_TYPE_LIST);
- g_value_init (&val, G_TYPE_INT);
- g_value_set_int (&val, 32);
- gst_value_list_append_value (&list, &val);
- g_value_reset (&val);
- g_value_set_int (&val, 24);
- gst_value_list_append_value (&list, &val);
- g_value_unset (&val);
- gst_structure_set_value (s2, "depth", &list);
- gst_structure_set_value (s2, "bpp", &list);
- g_value_unset (&list);
+ /* We can only convert to RGB if input is AYUV */
+ if (fourcc == GST_STR_FOURCC ("AYUV")) {
+ gst_structure_set_name (s2, "video/x-raw-rgb");
+ g_value_init (&list, GST_TYPE_LIST);
+ g_value_init (&val, G_TYPE_INT);
+ g_value_set_int (&val, 32);
+ gst_value_list_append_value (&list, &val);
+ g_value_reset (&val);
+ g_value_set_int (&val, 24);
+ gst_value_list_append_value (&list, &val);
+ g_value_unset (&val);
+ gst_structure_set_value (s2, "depth", &list);
+ gst_structure_set_value (s2, "bpp", &list);
+ g_value_unset (&list);
+ }
gst_caps_append_structure (to, s2);
}
} else if (g_str_equal (name, "video/x-raw-rgb")) {
More information about the Gstreamer-commits
mailing list