mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-05 06:58:49 +00:00
vajpegdec: simply fixup src caps for iHD
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4044>
This commit is contained in:
parent
64d821af24
commit
4583d8c0e8
1 changed files with 23 additions and 19 deletions
|
@ -543,33 +543,37 @@ _fixup_src_caps (GstVaDisplay * display, GstCaps * caps)
|
||||||
{
|
{
|
||||||
if (GST_VA_DISPLAY_IS_IMPLEMENTATION (display, INTEL_IHD)) {
|
if (GST_VA_DISPLAY_IS_IMPLEMENTATION (display, INTEL_IHD)) {
|
||||||
GstCaps *ret;
|
GstCaps *ret;
|
||||||
GstStructure *s;
|
|
||||||
GstCapsFeatures *f;
|
|
||||||
guint i, len;
|
guint i, len;
|
||||||
|
|
||||||
ret = gst_caps_copy (caps);
|
ret = gst_caps_copy (caps);
|
||||||
|
|
||||||
len = gst_caps_get_size (ret);
|
len = gst_caps_get_size (ret);
|
||||||
for (i = 0; i < len; i++) {
|
for (i = 0; i < len; i++) {
|
||||||
s = gst_caps_get_structure (ret, i);
|
guint j, size;
|
||||||
f = gst_caps_get_features (ret, i);
|
|
||||||
if (gst_caps_features_is_equal (f,
|
|
||||||
GST_CAPS_FEATURES_MEMORY_SYSTEM_MEMORY)) {
|
|
||||||
/* rgbp is not correctly mapped into memory */
|
|
||||||
guint i, size;
|
|
||||||
GValue out = G_VALUE_INIT;
|
GValue out = G_VALUE_INIT;
|
||||||
const GValue *in = gst_structure_get_value (s, "format");
|
const GValue *in;
|
||||||
|
GstStructure *s;
|
||||||
|
GstCapsFeatures *f;
|
||||||
|
|
||||||
|
f = gst_caps_get_features (ret, i);
|
||||||
|
if (!gst_caps_features_is_equal (f,
|
||||||
|
GST_CAPS_FEATURES_MEMORY_SYSTEM_MEMORY))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
s = gst_caps_get_structure (ret, i);
|
||||||
|
|
||||||
|
in = gst_structure_get_value (s, "format");
|
||||||
|
|
||||||
size = gst_value_list_get_size (in);
|
size = gst_value_list_get_size (in);
|
||||||
gst_value_list_init (&out, size);
|
gst_value_list_init (&out, size);
|
||||||
for (i = 0; i < size; i++) {
|
for (j = 0; j < size; j++) {
|
||||||
const GValue *fmt = gst_value_list_get_value (in, i);
|
const GValue *fmt = gst_value_list_get_value (in, j);
|
||||||
|
|
||||||
|
/* rgbp is not correctly mapped into memory */
|
||||||
if (g_strcmp0 (g_value_get_string (fmt), "RGBP") != 0)
|
if (g_strcmp0 (g_value_get_string (fmt), "RGBP") != 0)
|
||||||
gst_value_list_append_value (&out, fmt);
|
gst_value_list_append_value (&out, fmt);
|
||||||
}
|
}
|
||||||
gst_structure_set_value (s, "format", &out);
|
gst_structure_take_value (s, "format", &out);
|
||||||
g_value_unset (&out);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue