From: Víctor Manuel Jáquez Leal Date: Fri, 25 Aug 2017 14:22:59 +0000 (+0200) Subject: libs: encoder: h264: handle deprecated enum X-Git-Tag: 1.19.3~503^2~879 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b942f9e17f8c9aa82d817749970544dd6d303d74;p=platform%2Fupstream%2Fgstreamer.git libs: encoder: h264: handle deprecated enum In VA-API 1.0 the enum VAEncPackedHeaderH264_SEI is deprecated, and instead VAEncPackedHeaderRawData should be used. This patch creates a compatibility symbol, VA_ENC_PACKED_HEADER_H264_SEI, to expose the used enum according the VA-API version. https://bugzilla.gnome.org/show_bug.cgi?id=784398 --- diff --git a/gst-libs/gst/vaapi/gstvaapicompat.h b/gst-libs/gst/vaapi/gstvaapicompat.h index 493cadc..b87df0e 100644 --- a/gst-libs/gst/vaapi/gstvaapicompat.h +++ b/gst-libs/gst/vaapi/gstvaapicompat.h @@ -39,8 +39,10 @@ #if VA_CHECK_VERSION(1,0,0) #define VA_ROI_RC_QP_DELTA_SUPPORT(x) x->bits.roi_rc_qp_delta_support +#define VA_ENC_PACKED_HEADER_H264_SEI VAEncPackedHeaderRawData #else #define VA_ROI_RC_QP_DELTA_SUPPORT(x) x->bits.roi_rc_qp_delat_support +#define VA_ENC_PACKED_HEADER_H264_SEI VAEncPackedHeaderH264_SEI #endif /* Compatibility glue with VA-API 0.34 */ diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_h264.c b/gst-libs/gst/vaapi/gstvaapiencoder_h264.c index ab89852..ddf5ded 100644 --- a/gst-libs/gst/vaapi/gstvaapiencoder_h264.c +++ b/gst-libs/gst/vaapi/gstvaapiencoder_h264.c @@ -1601,7 +1601,7 @@ add_packed_sei_header (GstVaapiEncoderH264 * encoder, data_bit_size = GST_BIT_WRITER_BIT_SIZE (&bs); data = GST_BIT_WRITER_DATA (&bs); - packed_sei_param.type = VAEncPackedHeaderH264_SEI; + packed_sei_param.type = VA_ENC_PACKED_HEADER_H264_SEI; packed_sei_param.bit_length = data_bit_size; packed_sei_param.has_emulation_bytes = 0;