if (profile == GST_VAAPI_PROFILE_UNKNOWN)
goto fail;
+ /* if allwed caps request baseline (which is deprecated), the
+ * encoder will try with constrained baseline which is
+ * compatible. */
+ if (profile == GST_VAAPI_PROFILE_H264_BASELINE)
+ profile = GST_VAAPI_PROFILE_H264_CONSTRAINED_BASELINE;
+
tmp_caps = gst_caps_from_string (GST_CODEC_CAPS);
gst_caps_set_simple (tmp_caps, "profile", G_TYPE_STRING,
gst_vaapi_profile_get_name (profile), NULL);
if (!gst_caps_can_intersect (allowed_caps, tmp_caps)) {
if (profile == GST_VAAPI_PROFILE_H264_CONSTRAINED_BASELINE) {
profile = GST_VAAPI_PROFILE_H264_BASELINE;
+ GST_INFO ("user might requested baseline profile, "
+ "trying constrained-baseline instead");
goto retry;
}
} else {
const gchar *str = g_value_get_string (value);
if (str) {
profile = func (str);
+ if (profile == GST_VAAPI_PROFILE_H264_BASELINE)
+ profile = GST_VAAPI_PROFILE_H264_CONSTRAINED_BASELINE;
if (profile != GST_VAAPI_PROFILE_UNKNOWN)
g_array_append_val (profiles, profile);
}