libs: encoder: h264: Add gst_vaapi_encoder_h264_supports_avc()

AVC output requires packed header support in the driver.
This commit is contained in:
Philipp Zabel 2020-01-08 17:16:35 +01:00 committed by Víctor Manuel Jáquez Leal
parent 38d7297bb6
commit 209e1b5bf0
2 changed files with 11 additions and 0 deletions

View file

@ -4124,3 +4124,11 @@ gst_vaapi_encoder_h264_get_profile_and_level (GstVaapiEncoderH264 * encoder,
*out_level_ptr = encoder->level;
return TRUE;
}
gboolean
gst_vaapi_encoder_h264_supports_avc (GstVaapiEncoderH264 * encoder)
{
return ((GST_VAAPI_ENCODER_PACKED_HEADERS (encoder) &
(VA_ENC_PACKED_HEADER_SEQUENCE | VA_ENC_PACKED_HEADER_PICTURE)) ==
(VA_ENC_PACKED_HEADER_SEQUENCE | VA_ENC_PACKED_HEADER_PICTURE));
}

View file

@ -53,6 +53,9 @@ gboolean
gst_vaapi_encoder_h264_get_profile_and_level (GstVaapiEncoderH264 * encoder,
GstVaapiProfile * out_profile_ptr, GstVaapiLevelH264 * out_level_ptr);
gboolean
gst_vaapi_encoder_h264_supports_avc (GstVaapiEncoderH264 * encoder);
G_END_DECLS
#endif /*GST_VAAPI_ENCODER_H264_H */