mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-06 14:32:31 +00:00
Remove old gst version guards
As gstreamer-vaapi now only supports from GStreamer 1.6, this patch removes all the old GStreamer version guards. Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
This commit is contained in:
parent
28caa20167
commit
1c722efe54
13 changed files with 1 additions and 158 deletions
|
@ -924,7 +924,6 @@ gst_vaapi_decoder_set_interlaced (GstVaapiDecoder * decoder,
|
||||||
GST_VIDEO_INTERLACE_MODE_PROGRESSIVE));
|
GST_VIDEO_INTERLACE_MODE_PROGRESSIVE));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if GST_CHECK_VERSION(1,5,0)
|
|
||||||
void
|
void
|
||||||
gst_vaapi_decoder_set_multiview_mode (GstVaapiDecoder * decoder,
|
gst_vaapi_decoder_set_multiview_mode (GstVaapiDecoder * decoder,
|
||||||
gint views, GstVideoMultiviewMode mv_mode, GstVideoMultiviewFlags mv_flags)
|
gint views, GstVideoMultiviewMode mv_mode, GstVideoMultiviewFlags mv_flags)
|
||||||
|
@ -951,7 +950,6 @@ gst_vaapi_decoder_set_multiview_mode (GstVaapiDecoder * decoder,
|
||||||
notify_codec_state_changed (decoder);
|
notify_codec_state_changed (decoder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
gst_vaapi_decoder_ensure_context (GstVaapiDecoder * decoder,
|
gst_vaapi_decoder_ensure_context (GstVaapiDecoder * decoder,
|
||||||
|
|
|
@ -1448,8 +1448,6 @@ ensure_context(GstVaapiDecoderH264 *decoder, GstH264SPS *sps)
|
||||||
priv->profile = profile;
|
priv->profile = profile;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if GST_CHECK_VERSION(1,5,0)
|
|
||||||
/* Multiview flags only available in >= 1.5 */
|
|
||||||
if (reset_context) {
|
if (reset_context) {
|
||||||
switch (num_views) {
|
switch (num_views) {
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -1476,7 +1474,6 @@ ensure_context(GstVaapiDecoderH264 *decoder, GstH264SPS *sps)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
chroma_type = gst_vaapi_utils_h264_get_chroma_type(sps->chroma_format_idc);
|
chroma_type = gst_vaapi_utils_h264_get_chroma_type(sps->chroma_format_idc);
|
||||||
if (!chroma_type) {
|
if (!chroma_type) {
|
||||||
|
|
|
@ -263,12 +263,10 @@ void
|
||||||
gst_vaapi_decoder_set_interlaced (GstVaapiDecoder * decoder,
|
gst_vaapi_decoder_set_interlaced (GstVaapiDecoder * decoder,
|
||||||
gboolean interlaced);
|
gboolean interlaced);
|
||||||
|
|
||||||
#if GST_CHECK_VERSION(1,5,0)
|
|
||||||
G_GNUC_INTERNAL
|
G_GNUC_INTERNAL
|
||||||
void
|
void
|
||||||
gst_vaapi_decoder_set_multiview_mode (GstVaapiDecoder * decoder,
|
gst_vaapi_decoder_set_multiview_mode (GstVaapiDecoder * decoder,
|
||||||
gint views, GstVideoMultiviewMode mv_mode, GstVideoMultiviewFlags mv_flags);
|
gint views, GstVideoMultiviewMode mv_mode, GstVideoMultiviewFlags mv_flags);
|
||||||
#endif
|
|
||||||
|
|
||||||
G_GNUC_INTERNAL
|
G_GNUC_INTERNAL
|
||||||
gboolean
|
gboolean
|
||||||
|
|
|
@ -2793,12 +2793,10 @@ gst_vaapi_encoder_h264_reconfigure (GstVaapiEncoder * base_encoder)
|
||||||
encoder->config_changed = TRUE;
|
encoder->config_changed = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if GST_CHECK_VERSION(1,5,0)
|
|
||||||
/* Take number of MVC views from input caps if provided */
|
/* Take number of MVC views from input caps if provided */
|
||||||
if (GST_VIDEO_INFO_MULTIVIEW_MODE (vip) == GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME ||
|
if (GST_VIDEO_INFO_MULTIVIEW_MODE (vip) == GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME ||
|
||||||
GST_VIDEO_INFO_MULTIVIEW_MODE (vip) == GST_VIDEO_MULTIVIEW_MODE_MULTIVIEW_FRAME_BY_FRAME)
|
GST_VIDEO_INFO_MULTIVIEW_MODE (vip) == GST_VIDEO_MULTIVIEW_MODE_MULTIVIEW_FRAME_BY_FRAME)
|
||||||
encoder->num_views = GST_VIDEO_INFO_VIEWS (vip);
|
encoder->num_views = GST_VIDEO_INFO_VIEWS (vip);
|
||||||
#endif
|
|
||||||
|
|
||||||
encoder->is_mvc = encoder->num_views > 1;
|
encoder->is_mvc = encoder->num_views > 1;
|
||||||
|
|
||||||
|
|
|
@ -122,7 +122,6 @@ static const GstVaapiProfileMap gst_vaapi_profiles[] = {
|
||||||
"video/x-h264", "stereo-high"
|
"video/x-h264", "stereo-high"
|
||||||
},
|
},
|
||||||
#endif
|
#endif
|
||||||
#if GST_CHECK_VERSION(1,5,0)
|
|
||||||
{ GST_VAAPI_PROFILE_VC1_SIMPLE, VAProfileVC1Simple,
|
{ GST_VAAPI_PROFILE_VC1_SIMPLE, VAProfileVC1Simple,
|
||||||
"video/x-wmv, wmvversion=3", "simple"
|
"video/x-wmv, wmvversion=3", "simple"
|
||||||
},
|
},
|
||||||
|
@ -132,17 +131,6 @@ static const GstVaapiProfileMap gst_vaapi_profiles[] = {
|
||||||
{ GST_VAAPI_PROFILE_VC1_ADVANCED, VAProfileVC1Advanced,
|
{ GST_VAAPI_PROFILE_VC1_ADVANCED, VAProfileVC1Advanced,
|
||||||
"video/x-wmv, wmvversion=3, format=(string)WVC1", "advanced"
|
"video/x-wmv, wmvversion=3, format=(string)WVC1", "advanced"
|
||||||
},
|
},
|
||||||
#else
|
|
||||||
{ GST_VAAPI_PROFILE_VC1_SIMPLE, VAProfileVC1Simple,
|
|
||||||
"video/x-wmv, wmvversion=3", NULL
|
|
||||||
},
|
|
||||||
{ GST_VAAPI_PROFILE_VC1_MAIN, VAProfileVC1Main,
|
|
||||||
"video/x-wmv, wmvversion=3", NULL
|
|
||||||
},
|
|
||||||
{ GST_VAAPI_PROFILE_VC1_ADVANCED, VAProfileVC1Advanced,
|
|
||||||
"video/x-wmv, wmvversion=3, format=(string)WVC1", NULL
|
|
||||||
},
|
|
||||||
#endif
|
|
||||||
#if VA_CHECK_VERSION(0,32,0)
|
#if VA_CHECK_VERSION(0,32,0)
|
||||||
{ GST_VAAPI_PROFILE_JPEG_BASELINE, VAProfileJPEGBaseline,
|
{ GST_VAAPI_PROFILE_JPEG_BASELINE, VAProfileJPEGBaseline,
|
||||||
"image/jpeg", NULL
|
"image/jpeg", NULL
|
||||||
|
|
|
@ -25,27 +25,4 @@
|
||||||
|
|
||||||
#include "gst/vaapi/sysdeps.h"
|
#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 (©, 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 */
|
#endif /* GST_COMPAT_H */
|
||||||
|
|
|
@ -79,10 +79,8 @@ plugin_init (GstPlugin * plugin)
|
||||||
GST_RANK_PRIMARY, GST_TYPE_VAAPIENCODE_H265);
|
GST_RANK_PRIMARY, GST_TYPE_VAAPIENCODE_H265);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if GST_CHECK_VERSION(1,4,0)
|
|
||||||
gst_element_register (plugin, "vaapidecodebin",
|
gst_element_register (plugin, "vaapidecodebin",
|
||||||
GST_RANK_PRIMARY + 2, GST_TYPE_VAAPI_DECODE_BIN);
|
GST_RANK_PRIMARY + 2, GST_TYPE_VAAPI_DECODE_BIN);
|
||||||
#endif
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -222,12 +222,10 @@ gst_vaapidecode_update_src_caps (GstVaapiDecode * decode)
|
||||||
(GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META, NULL);
|
(GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META, NULL);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#if GST_CHECK_VERSION(1,3,1)
|
|
||||||
case GST_VAAPI_CAPS_FEATURE_VAAPI_SURFACE:
|
case GST_VAAPI_CAPS_FEATURE_VAAPI_SURFACE:
|
||||||
features =
|
features =
|
||||||
gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_VAAPI_SURFACE, NULL);
|
gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_VAAPI_SURFACE, NULL);
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -313,13 +311,10 @@ gst_vaapidecode_push_decoded_frame (GstVideoDecoder * vdec,
|
||||||
}
|
}
|
||||||
GST_BUFFER_FLAG_SET (out_frame->output_buffer, out_flags);
|
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) {
|
if (flags & GST_VAAPI_SURFACE_PROXY_FLAG_FFB) {
|
||||||
GST_BUFFER_FLAG_SET (out_frame->output_buffer,
|
GST_BUFFER_FLAG_SET (out_frame->output_buffer,
|
||||||
GST_VIDEO_BUFFER_FLAG_FIRST_IN_BUNDLE);
|
GST_VIDEO_BUFFER_FLAG_FIRST_IN_BUNDLE);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
crop_rect = gst_vaapi_surface_proxy_get_crop_rect (proxy);
|
crop_rect = gst_vaapi_surface_proxy_get_crop_rect (proxy);
|
||||||
if (crop_rect) {
|
if (crop_rect) {
|
||||||
|
@ -523,7 +518,6 @@ not_negotiated:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if GST_CHECK_VERSION(1,5,0)
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_vaapidecode_drain (GstVideoDecoder * vdec)
|
gst_vaapidecode_drain (GstVideoDecoder * vdec)
|
||||||
{
|
{
|
||||||
|
@ -534,7 +528,6 @@ gst_vaapidecode_drain (GstVideoDecoder * vdec)
|
||||||
|
|
||||||
return gst_vaapidecode_push_all_decoded_frames (decode);
|
return gst_vaapidecode_push_all_decoded_frames (decode);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_vaapidecode_internal_flush (GstVideoDecoder * vdec)
|
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->parse = GST_DEBUG_FUNCPTR (gst_vaapidecode_parse);
|
||||||
vdec_class->handle_frame = GST_DEBUG_FUNCPTR (gst_vaapidecode_handle_frame);
|
vdec_class->handle_frame = GST_DEBUG_FUNCPTR (gst_vaapidecode_handle_frame);
|
||||||
vdec_class->finish = GST_DEBUG_FUNCPTR (gst_vaapidecode_finish);
|
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);
|
vdec_class->drain = GST_DEBUG_FUNCPTR (gst_vaapidecode_drain);
|
||||||
#endif
|
|
||||||
vdec_class->decide_allocation =
|
vdec_class->decide_allocation =
|
||||||
GST_DEBUG_FUNCPTR (gst_vaapidecode_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->src_query = GST_DEBUG_FUNCPTR (gst_vaapidecode_src_query);
|
||||||
vdec_class->sink_query = GST_DEBUG_FUNCPTR (gst_vaapidecode_sink_query);
|
vdec_class->sink_query = GST_DEBUG_FUNCPTR (gst_vaapidecode_sink_query);
|
||||||
#endif
|
|
||||||
|
|
||||||
gst_element_class_set_static_metadata (element_class,
|
gst_element_class_set_static_metadata (element_class,
|
||||||
"VA-API decoder",
|
"VA-API decoder",
|
||||||
|
@ -1031,28 +1020,6 @@ bail:
|
||||||
return gst_caps_ref (decode->allowed_caps);
|
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
|
static gboolean
|
||||||
gst_vaapidecode_sink_query (GstVideoDecoder * vdec, GstQuery * query)
|
gst_vaapidecode_sink_query (GstVideoDecoder * vdec, GstQuery * query)
|
||||||
{
|
{
|
||||||
|
@ -1083,16 +1050,8 @@ gst_vaapidecode_sink_query (GstVideoDecoder * vdec, GstQuery * query)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:{
|
default:{
|
||||||
#if GST_CHECK_VERSION(1,4,0)
|
|
||||||
ret = GST_VIDEO_DECODER_CLASS (gst_vaapidecode_parent_class)->sink_query
|
ret = GST_VIDEO_DECODER_CLASS (gst_vaapidecode_parent_class)->sink_query
|
||||||
(vdec, 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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1130,16 +1089,8 @@ gst_vaapidecode_src_query (GstVideoDecoder * vdec, GstQuery * query)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:{
|
default:{
|
||||||
#if GST_CHECK_VERSION(1,4,0)
|
|
||||||
ret = GST_VIDEO_DECODER_CLASS (gst_vaapidecode_parent_class)->src_query
|
ret = GST_VIDEO_DECODER_CLASS (gst_vaapidecode_parent_class)->src_query
|
||||||
(vdec, 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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1162,14 +1113,4 @@ gst_vaapidecode_init (GstVaapiDecode * decode)
|
||||||
g_cond_init (&decode->surface_ready);
|
g_cond_init (&decode->surface_ready);
|
||||||
|
|
||||||
gst_video_decoder_set_packetized (vdec, FALSE);
|
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
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,6 @@ ensure_display (GstVaapiEncode * encode)
|
||||||
return gst_vaapi_plugin_base_ensure_display (GST_VAAPI_PLUGIN_BASE (encode));
|
return gst_vaapi_plugin_base_ensure_display (GST_VAAPI_PLUGIN_BASE (encode));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if GST_CHECK_VERSION(1,4,0)
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_vaapiencode_sink_query (GstVideoEncoder * encoder, GstQuery * query)
|
gst_vaapiencode_sink_query (GstVideoEncoder * encoder, GstQuery * query)
|
||||||
{
|
{
|
||||||
|
@ -95,27 +94,6 @@ gst_vaapiencode_src_query (GstVideoEncoder * encoder, GstQuery * query)
|
||||||
|
|
||||||
return ret;
|
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
|
typedef struct
|
||||||
{
|
{
|
||||||
|
@ -649,11 +627,6 @@ gst_vaapiencode_init (GstVaapiEncode * encode)
|
||||||
GstVaapiPluginBase *const plugin = GST_VAAPI_PLUGIN_BASE (encode);
|
GstVaapiPluginBase *const plugin = GST_VAAPI_PLUGIN_BASE (encode);
|
||||||
|
|
||||||
gst_vaapi_plugin_base_init (GST_VAAPI_PLUGIN_BASE (encode), GST_CAT_DEFAULT);
|
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);
|
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->set_property = gst_vaapiencode_default_set_property;
|
||||||
klass->alloc_buffer = gst_vaapiencode_default_alloc_buffer;
|
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->src_query = GST_DEBUG_FUNCPTR (gst_vaapiencode_src_query);
|
||||||
venc_class->sink_query = GST_DEBUG_FUNCPTR (gst_vaapiencode_sink_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 *
|
static inline GPtrArray *
|
||||||
|
|
|
@ -200,17 +200,10 @@ gst_vaapi_plugin_base_init (GstVaapiPluginBase * plugin,
|
||||||
/* sink pad */
|
/* sink pad */
|
||||||
plugin->sinkpad = gst_element_get_static_pad (GST_ELEMENT (plugin), "sink");
|
plugin->sinkpad = gst_element_get_static_pad (GST_ELEMENT (plugin), "sink");
|
||||||
gst_video_info_init (&plugin->sinkpad_info);
|
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 */
|
/* 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");
|
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);
|
gst_video_info_init (&plugin->srcpad_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -130,11 +130,6 @@ struct _GstVaapiPluginBase
|
||||||
GstVideoInfo srcpad_info;
|
GstVideoInfo srcpad_info;
|
||||||
GstBufferPool *srcpad_buffer_pool;
|
GstBufferPool *srcpad_buffer_pool;
|
||||||
|
|
||||||
#if !GST_CHECK_VERSION(1,4,0)
|
|
||||||
GstPadQueryFunction srcpad_query;
|
|
||||||
GstPadQueryFunction sinkpad_query;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
GstVaapiDisplay *display;
|
GstVaapiDisplay *display;
|
||||||
GstVaapiDisplayType display_type;
|
GstVaapiDisplayType display_type;
|
||||||
GstVaapiDisplayType display_type_req;
|
GstVaapiDisplayType display_type_req;
|
||||||
|
|
|
@ -482,11 +482,9 @@ gst_vaapi_find_preferred_caps_feature (GstPad * pad, GstVideoFormat format,
|
||||||
GstCapsFeatures *const features = gst_caps_get_features (out_caps, i);
|
GstCapsFeatures *const features = gst_caps_get_features (out_caps, i);
|
||||||
GstStructure *const structure = gst_caps_get_structure (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 */
|
/* Skip ANY features, we need an exact match for correct evaluation */
|
||||||
if (gst_caps_features_is_any (features))
|
if (gst_caps_features_is_any (features))
|
||||||
continue;
|
continue;
|
||||||
#endif
|
|
||||||
|
|
||||||
caps = gst_caps_new_full (gst_structure_copy (structure), NULL);
|
caps = gst_caps_new_full (gst_structure_copy (structure), NULL);
|
||||||
if (!caps)
|
if (!caps)
|
||||||
|
@ -504,12 +502,10 @@ gst_vaapi_find_preferred_caps_feature (GstPad * pad, GstVideoFormat format,
|
||||||
feature = GST_VAAPI_CAPS_FEATURE_SYSTEM_MEMORY;
|
feature = GST_VAAPI_CAPS_FEATURE_SYSTEM_MEMORY;
|
||||||
gst_caps_replace (&caps, NULL);
|
gst_caps_replace (&caps, NULL);
|
||||||
|
|
||||||
#if GST_CHECK_VERSION(1,3,0)
|
|
||||||
/* Stop at the first match, the caps should already be sorted out
|
/* Stop at the first match, the caps should already be sorted out
|
||||||
by preference order from downstream elements */
|
by preference order from downstream elements */
|
||||||
if (feature != GST_VAAPI_CAPS_FEATURE_SYSTEM_MEMORY)
|
if (feature != GST_VAAPI_CAPS_FEATURE_SYSTEM_MEMORY)
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (out_format_ptr) {
|
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_n = vi.fps_n;
|
||||||
vip->fps_d = vi.fps_d;
|
vip->fps_d = vi.fps_d;
|
||||||
|
|
||||||
#if GST_CHECK_VERSION(1,5,0)
|
|
||||||
GST_VIDEO_INFO_MULTIVIEW_MODE (vip) =
|
GST_VIDEO_INFO_MULTIVIEW_MODE (vip) =
|
||||||
GST_VIDEO_INFO_MULTIVIEW_MODE (&vi);
|
GST_VIDEO_INFO_MULTIVIEW_MODE (&vi);
|
||||||
GST_VIDEO_INFO_MULTIVIEW_FLAGS (vip) =
|
GST_VIDEO_INFO_MULTIVIEW_FLAGS (vip) =
|
||||||
GST_VIDEO_INFO_MULTIVIEW_FLAGS (&vi);
|
GST_VIDEO_INFO_MULTIVIEW_FLAGS (&vi);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -58,7 +58,6 @@ GST_DEBUG_CATEGORY_STATIC (gst_debug_vaapisink);
|
||||||
/* *INDENT-OFF* */
|
/* *INDENT-OFF* */
|
||||||
static const char gst_vaapisink_sink_caps_str[] =
|
static const char gst_vaapisink_sink_caps_str[] =
|
||||||
GST_VAAPI_MAKE_ENC_SURFACE_CAPS ";"
|
GST_VAAPI_MAKE_ENC_SURFACE_CAPS ";"
|
||||||
#if GST_CHECK_VERSION(1,3,1)
|
|
||||||
GST_VIDEO_CAPS_MAKE_WITH_FEATURES (
|
GST_VIDEO_CAPS_MAKE_WITH_FEATURES (
|
||||||
GST_CAPS_FEATURE_MEMORY_VAAPI_SURFACE ","
|
GST_CAPS_FEATURE_MEMORY_VAAPI_SURFACE ","
|
||||||
GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION,
|
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_VIDEO_CAPS_MAKE_WITH_FEATURES (
|
||||||
GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION,
|
GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION,
|
||||||
GST_VIDEO_FORMATS_ALL) ";"
|
GST_VIDEO_FORMATS_ALL) ";"
|
||||||
#endif
|
|
||||||
GST_VIDEO_CAPS_MAKE (GST_VIDEO_FORMATS_ALL);
|
GST_VIDEO_CAPS_MAKE (GST_VIDEO_FORMATS_ALL);
|
||||||
/* *INDENT-ON* */
|
/* *INDENT-ON* */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue