mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
vaapidecode: only expose supported profiles when needed.
JPEG and VP8 codecs do not really support the concept of "profile". So, don't try to expose any set that wouldn't be supported by jpegparse, or ivfparse for instance. https://bugzilla.gnome.org/show_bug.cgi?id=739713 https://bugzilla.gnome.org/show_bug.cgi?id=739714
This commit is contained in:
parent
8f71f74c5d
commit
d1b7dc21f8
2 changed files with 9 additions and 8 deletions
|
@ -131,12 +131,13 @@ static const GstVaapiProfileMap gst_vaapi_profiles[] = {
|
|||
},
|
||||
#if VA_CHECK_VERSION(0,32,0)
|
||||
{ GST_VAAPI_PROFILE_JPEG_BASELINE, VAProfileJPEGBaseline,
|
||||
"image/jpeg", "baseline"
|
||||
"image/jpeg", NULL
|
||||
},
|
||||
#endif
|
||||
#if VA_CHECK_VERSION(0,35,0)
|
||||
{GST_VAAPI_PROFILE_VP8, VAProfileVP8Version0_3,
|
||||
"video/x-vp8", "Version0_3"},
|
||||
{ GST_VAAPI_PROFILE_VP8, VAProfileVP8Version0_3,
|
||||
"video/x-vp8", NULL
|
||||
},
|
||||
#endif
|
||||
{ 0, }
|
||||
};
|
||||
|
|
|
@ -924,15 +924,15 @@ gst_vaapidecode_ensure_allowed_caps(GstVaapiDecode *decode)
|
|||
if (!media_type_name)
|
||||
continue;
|
||||
|
||||
profile_name = gst_vaapi_profile_get_name(profile);
|
||||
if (!profile_name)
|
||||
continue;
|
||||
|
||||
caps = gst_caps_from_string(media_type_name);
|
||||
if (!caps)
|
||||
continue;
|
||||
structure = gst_caps_get_structure (caps, 0);
|
||||
gst_structure_set (structure, "profile", G_TYPE_STRING, profile_name, NULL);
|
||||
|
||||
profile_name = gst_vaapi_profile_get_name(profile);
|
||||
if (profile_name)
|
||||
gst_structure_set(structure, "profile", G_TYPE_STRING,
|
||||
profile_name, NULL);
|
||||
|
||||
allowed_caps = gst_caps_merge(allowed_caps, caps);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue