mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 07:16:55 +00:00
videotestsrc: Only set color-matrix and chroma-site for relevant formats
The color-matrix only makes sense for colorful formats, i.e. not Y800 and the chroma-site only for non-4:4:4(:4) formats.
This commit is contained in:
parent
9c8c93806d
commit
08589317f8
1 changed files with 21 additions and 14 deletions
|
@ -679,6 +679,7 @@ paint_get_structure (struct fourcc_list_struct * format)
|
||||||
structure = gst_structure_new ("video/x-raw-yuv",
|
structure = gst_structure_new ("video/x-raw-yuv",
|
||||||
"format", GST_TYPE_FOURCC, fourcc, NULL);
|
"format", GST_TYPE_FOURCC, fourcc, NULL);
|
||||||
|
|
||||||
|
if (fourcc != GST_STR_FOURCC ("Y800")) {
|
||||||
g_value_init (&value_list, GST_TYPE_LIST);
|
g_value_init (&value_list, GST_TYPE_LIST);
|
||||||
|
|
||||||
g_value_init (&value, G_TYPE_STRING);
|
g_value_init (&value, G_TYPE_STRING);
|
||||||
|
@ -691,6 +692,10 @@ paint_get_structure (struct fourcc_list_struct * format)
|
||||||
gst_structure_set_value (structure, "color-matrix", &value_list);
|
gst_structure_set_value (structure, "color-matrix", &value_list);
|
||||||
g_value_reset (&value_list);
|
g_value_reset (&value_list);
|
||||||
|
|
||||||
|
if (fourcc != GST_STR_FOURCC ("AYUV") &&
|
||||||
|
fourcc != GST_STR_FOURCC ("v308") &&
|
||||||
|
fourcc != GST_STR_FOURCC ("v410") &&
|
||||||
|
fourcc != GST_STR_FOURCC ("Y444")) {
|
||||||
g_value_set_static_string (&value, "mpeg2");
|
g_value_set_static_string (&value, "mpeg2");
|
||||||
gst_value_list_append_value (&value_list, &value);
|
gst_value_list_append_value (&value_list, &value);
|
||||||
|
|
||||||
|
@ -698,8 +703,10 @@ paint_get_structure (struct fourcc_list_struct * format)
|
||||||
gst_value_list_append_value (&value_list, &value);
|
gst_value_list_append_value (&value_list, &value);
|
||||||
|
|
||||||
gst_structure_set_value (structure, "chroma-site", &value_list);
|
gst_structure_set_value (structure, "chroma-site", &value_list);
|
||||||
|
}
|
||||||
g_value_unset (&value_list);
|
g_value_unset (&value_list);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case VTS_BAYER:
|
case VTS_BAYER:
|
||||||
structure = gst_structure_new ("video/x-raw-bayer", NULL);
|
structure = gst_structure_new ("video/x-raw-bayer", NULL);
|
||||||
|
|
Loading…
Reference in a new issue