summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2017-06-15 13:24:56 +0200
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2017-06-15 13:24:56 +0200
commit3ed2023c2ce2df591bf149e9a2e680fd7be5fa5f (patch)
tree0da2ae8bbadfd5861501d18c7de93d70bf80a447 /gst-libs
parent595f8b7d4baf118eb6b7bf0efbcf02ce0fead225 (diff)
libs: encoder: fix compilation with old versions of libva
There are some symbols that are not used when compiling with old version of libva and those generates a compilation error. Original-patch-by: Matt Staples <staples255@gmail.com>
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/vaapi/gstvaapiencoder.c5
-rw-r--r--gst-libs/gst/vaapi/gstvaapiencoder_h264.c5
2 files changed, 7 insertions, 3 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder.c b/gst-libs/gst/vaapi/gstvaapiencoder.c
index 4aeccc5b..bdb8d9ef 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder.c
+++ b/gst-libs/gst/vaapi/gstvaapiencoder.c
@@ -803,8 +803,11 @@ gst_vaapi_encoder_reconfigure_internal (GstVaapiEncoder * encoder)
GstVideoInfo *const vip = GST_VAAPI_ENCODER_VIDEO_INFO (encoder);
GstVaapiEncoderStatus status;
GstVaapiVideoPool *pool;
- guint codedbuf_size, target_percentage, quality_level_max = 0;
+ guint codedbuf_size, target_percentage;
guint fps_d, fps_n;
+#if VA_CHECK_VERSION(0,36,0)
+ guint quality_level_max = 0;
+#endif
fps_d = GST_VIDEO_INFO_FPS_D (vip);
fps_n = GST_VIDEO_INFO_FPS_N (vip);
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_h264.c b/gst-libs/gst/vaapi/gstvaapiencoder_h264.c
index b76ccb63..42a05db3 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder_h264.c
+++ b/gst-libs/gst/vaapi/gstvaapiencoder_h264.c
@@ -2179,8 +2179,10 @@ static gboolean
ensure_misc_params (GstVaapiEncoderH264 * encoder, GstVaapiEncPicture * picture)
{
GstVaapiEncoder *const base_encoder = GST_VAAPI_ENCODER_CAST (encoder);
+#if VA_CHECK_VERSION(0,39,1)
GstVaapiEncMiscParam *misc;
guint num_roi;
+#endif
if (!gst_vaapi_encoder_ensure_param_control_rate (base_encoder, picture))
return FALSE;
@@ -2203,11 +2205,10 @@ ensure_misc_params (GstVaapiEncoderH264 * encoder, GstVaapiEncPicture * picture)
goto error_create_packed_sei_hdr;
}
}
-
+#if VA_CHECK_VERSION(0,39,1)
/* region-of-interest params */
num_roi = base_encoder->roi_regions ?
g_list_length (base_encoder->roi_regions) : 0;
-#if VA_CHECK_VERSION(0,39,1)
if (num_roi > 0) {
/* ROI(Region of Interest) params */
VAEncMiscParameterBufferROI *roi_param;