summaryrefslogtreecommitdiff
path: root/gst/vaapi
diff options
context:
space:
mode:
Diffstat (limited to 'gst/vaapi')
-rw-r--r--gst/vaapi/gstcompat.h23
-rw-r--r--gst/vaapi/gstvaapi.c2
-rw-r--r--gst/vaapi/gstvaapidecode.c59
-rw-r--r--gst/vaapi/gstvaapiencode.c32
-rw-r--r--gst/vaapi/gstvaapipluginbase.c9
-rw-r--r--gst/vaapi/gstvaapipluginbase.h5
-rw-r--r--gst/vaapi/gstvaapipluginutil.c6
-rw-r--r--gst/vaapi/gstvaapisink.c2
8 files changed, 1 insertions, 137 deletions
diff --git a/gst/vaapi/gstcompat.h b/gst/vaapi/gstcompat.h
index 17bd3e6e..c953783f 100644
--- a/gst/vaapi/gstcompat.h
+++ b/gst/vaapi/gstcompat.h
@@ -25,27 +25,4 @@
#include "gst/vaapi/sysdeps.h"
-#if !GST_CHECK_VERSION (1,5,0)
-static inline GstBuffer *
-gst_buffer_copy_deep (const GstBuffer * buffer)
-{
- GstBuffer *copy;
-
- g_return_val_if_fail (buffer != NULL, NULL);
-
- copy = gst_buffer_new ();
-
- if (!gst_buffer_copy_into (copy, (GstBuffer *) buffer,
- GST_BUFFER_COPY_ALL | GST_BUFFER_COPY_DEEP, 0, -1))
- gst_buffer_replace (&copy, NULL);
-
-#if GST_CHECK_VERSION (1,4,0)
- if (copy)
- GST_BUFFER_FLAG_UNSET (copy, GST_BUFFER_FLAG_TAG_MEMORY);
-#endif
-
- return copy;
-}
-#endif
-
#endif /* GST_COMPAT_H */
diff --git a/gst/vaapi/gstvaapi.c b/gst/vaapi/gstvaapi.c
index 3ad0ec0f..a64cb645 100644
--- a/gst/vaapi/gstvaapi.c
+++ b/gst/vaapi/gstvaapi.c
@@ -79,10 +79,8 @@ plugin_init (GstPlugin * plugin)
GST_RANK_PRIMARY, GST_TYPE_VAAPIENCODE_H265);
#endif
-#if GST_CHECK_VERSION(1,4,0)
gst_element_register (plugin, "vaapidecodebin",
GST_RANK_PRIMARY + 2, GST_TYPE_VAAPI_DECODE_BIN);
-#endif
return TRUE;
}
diff --git a/gst/vaapi/gstvaapidecode.c b/gst/vaapi/gstvaapidecode.c
index 60ce3297..45003e8e 100644
--- a/gst/vaapi/gstvaapidecode.c
+++ b/gst/vaapi/gstvaapidecode.c
@@ -222,12 +222,10 @@ gst_vaapidecode_update_src_caps (GstVaapiDecode * decode)
(GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META, NULL);
break;
#endif
-#if GST_CHECK_VERSION(1,3,1)
case GST_VAAPI_CAPS_FEATURE_VAAPI_SURFACE:
features =
gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_VAAPI_SURFACE, NULL);
break;
-#endif
default:
break;
}
@@ -313,13 +311,10 @@ gst_vaapidecode_push_decoded_frame (GstVideoDecoder * vdec,
}
GST_BUFFER_FLAG_SET (out_frame->output_buffer, out_flags);
-#if GST_CHECK_VERSION(1,5,0)
- /* First-in-bundle flag only appeared in 1.5 dev */
if (flags & GST_VAAPI_SURFACE_PROXY_FLAG_FFB) {
GST_BUFFER_FLAG_SET (out_frame->output_buffer,
GST_VIDEO_BUFFER_FLAG_FIRST_IN_BUNDLE);
}
-#endif
crop_rect = gst_vaapi_surface_proxy_get_crop_rect (proxy);
if (crop_rect) {
@@ -523,7 +518,6 @@ not_negotiated:
}
}
-#if GST_CHECK_VERSION(1,5,0)
static GstFlowReturn
gst_vaapidecode_drain (GstVideoDecoder * vdec)
{
@@ -534,7 +528,6 @@ gst_vaapidecode_drain (GstVideoDecoder * vdec)
return gst_vaapidecode_push_all_decoded_frames (decode);
}
-#endif
static gboolean
gst_vaapidecode_internal_flush (GstVideoDecoder * vdec)
@@ -923,15 +916,11 @@ gst_vaapidecode_class_init (GstVaapiDecodeClass * klass)
vdec_class->parse = GST_DEBUG_FUNCPTR (gst_vaapidecode_parse);
vdec_class->handle_frame = GST_DEBUG_FUNCPTR (gst_vaapidecode_handle_frame);
vdec_class->finish = GST_DEBUG_FUNCPTR (gst_vaapidecode_finish);
-#if GST_CHECK_VERSION(1,5,0)
vdec_class->drain = GST_DEBUG_FUNCPTR (gst_vaapidecode_drain);
-#endif
vdec_class->decide_allocation =
GST_DEBUG_FUNCPTR (gst_vaapidecode_decide_allocation);
-#if GST_CHECK_VERSION(1,4,0)
vdec_class->src_query = GST_DEBUG_FUNCPTR (gst_vaapidecode_src_query);
vdec_class->sink_query = GST_DEBUG_FUNCPTR (gst_vaapidecode_sink_query);
-#endif
gst_element_class_set_static_metadata (element_class,
"VA-API decoder",
@@ -1031,28 +1020,6 @@ bail:
return gst_caps_ref (decode->allowed_caps);
}
-#if !GST_CHECK_VERSION(1,4,0)
-static gboolean
-gst_vaapidecode_query (GstPad * pad, GstObject * parent, GstQuery * query)
-{
- GstVaapiDecode *const decode =
- GST_VAAPIDECODE (gst_pad_get_parent_element (pad));
- GstVideoDecoder *const vdec = GST_VIDEO_DECODER (decode);
- gboolean res;
-
- GST_INFO_OBJECT (decode, "query type %s on %s pad",
- GST_QUERY_TYPE_NAME (query), GST_PAD_IS_SINK (pad) ? "sink" : "src");
-
- if (GST_PAD_IS_SINK (pad))
- res = gst_vaapidecode_sink_query (vdec, query);
- else
- res = gst_vaapidecode_src_query (vdec, query);
-
- gst_object_unref (vdec);
- return res;
-}
-#endif
-
static gboolean
gst_vaapidecode_sink_query (GstVideoDecoder * vdec, GstQuery * query)
{
@@ -1083,16 +1050,8 @@ gst_vaapidecode_sink_query (GstVideoDecoder * vdec, GstQuery * query)
break;
}
default:{
-#if GST_CHECK_VERSION(1,4,0)
ret = GST_VIDEO_DECODER_CLASS (gst_vaapidecode_parent_class)->sink_query
(vdec, query);
-#else
- GstPad *pad = GST_VIDEO_DECODER_SINK_PAD (vdec);
- GstObject *parent = gst_pad_get_parent (pad);
- ret = plugin->sinkpad_query (pad, parent, query);
- if (parent)
- gst_object_unref (parent);
-#endif
break;
}
}
@@ -1130,16 +1089,8 @@ gst_vaapidecode_src_query (GstVideoDecoder * vdec, GstQuery * query)
break;
}
default:{
-#if GST_CHECK_VERSION(1,4,0)
ret = GST_VIDEO_DECODER_CLASS (gst_vaapidecode_parent_class)->src_query
(vdec, query);
-#else
- GstPad *pad = GST_VIDEO_DECODER_SRC_PAD (vdec);
- GstObject *parent = gst_pad_get_parent (pad);
- ret = plugin->srcpad_query (pad, parent, query);
- if (parent)
- gst_object_unref (parent);
-#endif
break;
}
}
@@ -1162,14 +1113,4 @@ gst_vaapidecode_init (GstVaapiDecode * decode)
g_cond_init (&decode->surface_ready);
gst_video_decoder_set_packetized (vdec, FALSE);
-
-#if !GST_CHECK_VERSION(1,4,0)
- /* Pad through which data comes in to the element */
- GstPad *pad = GST_VAAPI_PLUGIN_BASE_SINK_PAD (decode);
- gst_pad_set_query_function (pad, GST_DEBUG_FUNCPTR (gst_vaapidecode_query));
-
- /* Pad through which data goes out of the element */
- pad = GST_VAAPI_PLUGIN_BASE_SRC_PAD (decode);
- gst_pad_set_query_function (pad, GST_DEBUG_FUNCPTR (gst_vaapidecode_query));
-#endif
}
diff --git a/gst/vaapi/gstvaapiencode.c b/gst/vaapi/gstvaapiencode.c
index a9b8b3d6..a9a47705 100644
--- a/gst/vaapi/gstvaapiencode.c
+++ b/gst/vaapi/gstvaapiencode.c
@@ -57,7 +57,6 @@ ensure_display (GstVaapiEncode * encode)
return gst_vaapi_plugin_base_ensure_display (GST_VAAPI_PLUGIN_BASE (encode));
}
-#if GST_CHECK_VERSION(1,4,0)
static gboolean
gst_vaapiencode_sink_query (GstVideoEncoder * encoder, GstQuery * query)
{
@@ -95,27 +94,6 @@ gst_vaapiencode_src_query (GstVideoEncoder * encoder, GstQuery * query)
return ret;
}
-#else
-static gboolean
-gst_vaapiencode_query (GstPad * pad, GstObject * parent, GstQuery * query)
-{
- GstVaapiPluginBase *const plugin =
- GST_VAAPI_PLUGIN_BASE (gst_pad_get_parent_element (pad));
- gboolean success;
-
- GST_INFO_OBJECT (plugin, "query type %s", GST_QUERY_TYPE_NAME (query));
-
- if (GST_QUERY_TYPE (query) == GST_QUERY_CONTEXT)
- success = gst_vaapi_handle_context_query (query, plugin->display);
- else if (GST_PAD_IS_SINK (pad))
- success = plugin->sinkpad_query (plugin->sinkpad, parent, query);
- else
- success = plugin->srcpad_query (plugin->srcpad, parent, query);
-
- gst_object_unref (plugin);
- return success;
-}
-#endif
typedef struct
{
@@ -649,11 +627,6 @@ gst_vaapiencode_init (GstVaapiEncode * encode)
GstVaapiPluginBase *const plugin = GST_VAAPI_PLUGIN_BASE (encode);
gst_vaapi_plugin_base_init (GST_VAAPI_PLUGIN_BASE (encode), GST_CAT_DEFAULT);
-
-#if !GST_CHECK_VERSION(1,4,0)
- gst_pad_set_query_function (plugin->sinkpad, gst_vaapiencode_query);
- gst_pad_set_query_function (plugin->srcpad, gst_vaapiencode_query);
-#endif
gst_pad_use_fixed_caps (plugin->srcpad);
}
@@ -687,13 +660,8 @@ gst_vaapiencode_class_init (GstVaapiEncodeClass * klass)
klass->set_property = gst_vaapiencode_default_set_property;
klass->alloc_buffer = gst_vaapiencode_default_alloc_buffer;
-#if GST_CHECK_VERSION(1,4,0)
venc_class->src_query = GST_DEBUG_FUNCPTR (gst_vaapiencode_src_query);
venc_class->sink_query = GST_DEBUG_FUNCPTR (gst_vaapiencode_sink_query);
-#else
- /* Registering debug symbols for function pointers */
- GST_DEBUG_REGISTER_FUNCPTR (gst_vaapiencode_query);
-#endif
}
static inline GPtrArray *
diff --git a/gst/vaapi/gstvaapipluginbase.c b/gst/vaapi/gstvaapipluginbase.c
index 41ffa775..45c32b59 100644
--- a/gst/vaapi/gstvaapipluginbase.c
+++ b/gst/vaapi/gstvaapipluginbase.c
@@ -200,17 +200,10 @@ gst_vaapi_plugin_base_init (GstVaapiPluginBase * plugin,
/* sink pad */
plugin->sinkpad = gst_element_get_static_pad (GST_ELEMENT (plugin), "sink");
gst_video_info_init (&plugin->sinkpad_info);
-#if !GST_CHECK_VERSION(1,4,0)
- plugin->sinkpad_query = GST_PAD_QUERYFUNC (plugin->sinkpad);
-#endif
/* src pad */
- if (!(GST_OBJECT_FLAGS (plugin) & GST_ELEMENT_FLAG_SINK)) {
+ if (!(GST_OBJECT_FLAGS (plugin) & GST_ELEMENT_FLAG_SINK))
plugin->srcpad = gst_element_get_static_pad (GST_ELEMENT (plugin), "src");
-#if !GST_CHECK_VERSION(1,4,0)
- plugin->srcpad_query = GST_PAD_QUERYFUNC (plugin->srcpad);
-#endif
- }
gst_video_info_init (&plugin->srcpad_info);
}
diff --git a/gst/vaapi/gstvaapipluginbase.h b/gst/vaapi/gstvaapipluginbase.h
index 40f2d123..24252e11 100644
--- a/gst/vaapi/gstvaapipluginbase.h
+++ b/gst/vaapi/gstvaapipluginbase.h
@@ -130,11 +130,6 @@ struct _GstVaapiPluginBase
GstVideoInfo srcpad_info;
GstBufferPool *srcpad_buffer_pool;
-#if !GST_CHECK_VERSION(1,4,0)
- GstPadQueryFunction srcpad_query;
- GstPadQueryFunction sinkpad_query;
-#endif
-
GstVaapiDisplay *display;
GstVaapiDisplayType display_type;
GstVaapiDisplayType display_type_req;
diff --git a/gst/vaapi/gstvaapipluginutil.c b/gst/vaapi/gstvaapipluginutil.c
index 74f311b2..e07d2b61 100644
--- a/gst/vaapi/gstvaapipluginutil.c
+++ b/gst/vaapi/gstvaapipluginutil.c
@@ -482,11 +482,9 @@ gst_vaapi_find_preferred_caps_feature (GstPad * pad, GstVideoFormat format,
GstCapsFeatures *const features = gst_caps_get_features (out_caps, i);
GstStructure *const structure = gst_caps_get_structure (out_caps, i);
-#if GST_CHECK_VERSION(1,3,0)
/* Skip ANY features, we need an exact match for correct evaluation */
if (gst_caps_features_is_any (features))
continue;
-#endif
caps = gst_caps_new_full (gst_structure_copy (structure), NULL);
if (!caps)
@@ -504,12 +502,10 @@ gst_vaapi_find_preferred_caps_feature (GstPad * pad, GstVideoFormat format,
feature = GST_VAAPI_CAPS_FEATURE_SYSTEM_MEMORY;
gst_caps_replace (&caps, NULL);
-#if GST_CHECK_VERSION(1,3,0)
/* Stop at the first match, the caps should already be sorted out
by preference order from downstream elements */
if (feature != GST_VAAPI_CAPS_FEATURE_SYSTEM_MEMORY)
break;
-#endif
}
if (out_format_ptr) {
@@ -651,12 +647,10 @@ gst_video_info_change_format (GstVideoInfo * vip, GstVideoFormat format,
vip->fps_n = vi.fps_n;
vip->fps_d = vi.fps_d;
-#if GST_CHECK_VERSION(1,5,0)
GST_VIDEO_INFO_MULTIVIEW_MODE (vip) =
GST_VIDEO_INFO_MULTIVIEW_MODE (&vi);
GST_VIDEO_INFO_MULTIVIEW_FLAGS (vip) =
GST_VIDEO_INFO_MULTIVIEW_FLAGS (&vi);
-#endif
}
/**
diff --git a/gst/vaapi/gstvaapisink.c b/gst/vaapi/gstvaapisink.c
index f52c4da8..75c588bf 100644
--- a/gst/vaapi/gstvaapisink.c
+++ b/gst/vaapi/gstvaapisink.c
@@ -58,7 +58,6 @@ GST_DEBUG_CATEGORY_STATIC (gst_debug_vaapisink);
/* *INDENT-OFF* */
static const char gst_vaapisink_sink_caps_str[] =
GST_VAAPI_MAKE_ENC_SURFACE_CAPS ";"
-#if GST_CHECK_VERSION(1,3,1)
GST_VIDEO_CAPS_MAKE_WITH_FEATURES (
GST_CAPS_FEATURE_MEMORY_VAAPI_SURFACE ","
GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION,
@@ -66,7 +65,6 @@ static const char gst_vaapisink_sink_caps_str[] =
GST_VIDEO_CAPS_MAKE_WITH_FEATURES (
GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION,
GST_VIDEO_FORMATS_ALL) ";"
-#endif
GST_VIDEO_CAPS_MAKE (GST_VIDEO_FORMATS_ALL);
/* *INDENT-ON* */