libs: encoder: h264: handle deprecated enum
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Fri, 25 Aug 2017 14:22:59 +0000 (16:22 +0200)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Fri, 25 Aug 2017 14:44:27 +0000 (16:44 +0200)
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

gst-libs/gst/vaapi/gstvaapicompat.h
gst-libs/gst/vaapi/gstvaapiencoder_h264.c

index 493cadc..b87df0e 100644 (file)
 
 #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 */
index ab89852..ddf5ded 100644 (file)
@@ -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;