Commit aa737094 authored by He Junyan's avatar He Junyan Committed by Víctor Manuel Jáquez Leal

plugins: encode: h265: Add profile,level,tier to output caps.

Part-of: <gstreamer/gstreamer-vaapi!350>
parent 0932a450
Pipeline #171810 waiting for manual action with stages
in 37 seconds
......@@ -176,7 +176,12 @@ static GstCaps *
gst_vaapiencode_h265_get_caps (GstVaapiEncode * base_encode)
{
GstVaapiEncodeH265 *const encode = GST_VAAPIENCODE_H265_CAST (base_encode);
GstVaapiEncoderH265 *const encoder =
GST_VAAPI_ENCODER_H265 (base_encode->encoder);
GstCaps *caps, *allowed_caps;
GstVaapiProfile profile = GST_VAAPI_PROFILE_UNKNOWN;
GstVaapiLevelH265 level = 0;
GstVaapiTierH265 tier = GST_VAAPI_TIER_H265_UNKNOWN;
caps = gst_caps_from_string (GST_CODEC_CAPS);
......@@ -204,7 +209,22 @@ gst_vaapiencode_h265_get_caps (GstVaapiEncode * base_encode)
base_encode->need_codec_data = encode->is_hvc;
/* XXX: update profile and level information */
gst_vaapi_encoder_h265_get_profile_tier_level (encoder,
&profile, &tier, &level);
if (profile != GST_VAAPI_PROFILE_UNKNOWN) {
gst_caps_set_simple (caps, "profile", G_TYPE_STRING,
gst_vaapi_utils_h265_get_profile_string (profile), NULL);
if (level) {
gst_caps_set_simple (caps, "level", G_TYPE_STRING,
gst_vaapi_utils_h265_get_level_string (level), NULL);
if (tier != GST_VAAPI_TIER_H265_UNKNOWN)
gst_caps_set_simple (caps, "tier", G_TYPE_STRING,
gst_vaapi_utils_h265_get_tier_string (tier), NULL);
}
}
return caps;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment