From 267422dde51e1c332b77d8b0a89255305485aec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Thu, 19 Mar 2015 21:20:26 +0100 Subject: [PATCH] remove the video converter from vaapi buffer meta Since all the video converter were deprecated in gstreamer-1.2, we don't need to handle them anymore in the vaapi's buffer meta. This patch removes its usage and the buffer meta's API for that. https://bugzilla.gnome.org/show_bug.cgi?id=745728 --- gst/vaapi/gstvaapivideobuffer.c | 26 ++------------------------ gst/vaapi/gstvaapivideometa.c | 32 -------------------------------- gst/vaapi/gstvaapivideometa.h | 9 --------- 3 files changed, 2 insertions(+), 65 deletions(-) diff --git a/gst/vaapi/gstvaapivideobuffer.c b/gst/vaapi/gstvaapivideobuffer.c index 9d047e73ff..af79338b6e 100644 --- a/gst/vaapi/gstvaapivideobuffer.c +++ b/gst/vaapi/gstvaapivideobuffer.c @@ -33,25 +33,6 @@ #include "gstcompat.h" #include "gstvaapivideobuffer.h" -static inline GstBuffer * -gst_surface_buffer_new (void) -{ - return gst_buffer_new (); -} - -static GFunc -get_surface_converter (GstVaapiDisplay * display) -{ - GFunc func; - - switch (gst_vaapi_display_get_class_type (display)) { - default: - func = NULL; - break; - } - return func; -} - static GstBuffer * new_vbuffer (GstVaapiVideoMeta * meta) { @@ -59,10 +40,7 @@ new_vbuffer (GstVaapiVideoMeta * meta) g_return_val_if_fail (meta != NULL, NULL); - gst_vaapi_video_meta_set_surface_converter (meta, - get_surface_converter (gst_vaapi_video_meta_get_display (meta))); - - buffer = gst_surface_buffer_new (); + buffer = gst_buffer_new (); if (buffer) gst_buffer_set_vaapi_video_meta (buffer, meta); gst_vaapi_video_meta_unref (meta); @@ -80,7 +58,7 @@ gst_vaapi_video_buffer_new (GstVaapiVideoMeta * meta) GstBuffer * gst_vaapi_video_buffer_new_empty (void) { - return gst_surface_buffer_new (); + return gst_buffer_new (); } GstBuffer * diff --git a/gst/vaapi/gstvaapivideometa.c b/gst/vaapi/gstvaapivideometa.c index ca5333bcca..a8ddf0501f 100644 --- a/gst/vaapi/gstvaapivideometa.c +++ b/gst/vaapi/gstvaapivideometa.c @@ -588,38 +588,6 @@ gst_vaapi_video_meta_set_surface_proxy (GstVaapiVideoMeta * meta, } } -/** - * gst_vaapi_video_meta_get_surface_converter: - * @meta: a #GstVaapiVideoMeta - * - * Retrieves the surface converter bound to the @meta. - * - * Return value: the surface converter associated with the video @meta - */ -GFunc -gst_vaapi_video_meta_get_surface_converter (GstVaapiVideoMeta * meta) -{ - g_return_val_if_fail (GST_VAAPI_IS_VIDEO_META (meta), NULL); - - return meta->converter; -} - -/** - * gst_vaapi_video_meta_set_surface_converter: - * @meta: a #GstVaapiVideoMeta - * @func: a pointer to the surface converter function - * - * Sets the @meta surface converter function to @func. - */ -void -gst_vaapi_video_meta_set_surface_converter (GstVaapiVideoMeta * meta, - GFunc func) -{ - g_return_if_fail (GST_VAAPI_IS_VIDEO_META (meta)); - - meta->converter = func; -} - /** * gst_vaapi_video_meta_get_render_flags: * @meta: a #GstVaapiVideoMeta diff --git a/gst/vaapi/gstvaapivideometa.h b/gst/vaapi/gstvaapivideometa.h index 62f4322ebd..c88abfd454 100644 --- a/gst/vaapi/gstvaapivideometa.h +++ b/gst/vaapi/gstvaapivideometa.h @@ -106,15 +106,6 @@ void gst_vaapi_video_meta_set_surface_proxy (GstVaapiVideoMeta * meta, GstVaapiSurfaceProxy * proxy); -G_GNUC_INTERNAL -GFunc -gst_vaapi_video_meta_get_surface_converter (GstVaapiVideoMeta * meta); - -G_GNUC_INTERNAL -void -gst_vaapi_video_meta_set_surface_converter (GstVaapiVideoMeta * meta, - GFunc func); - G_GNUC_INTERNAL guint gst_vaapi_video_meta_get_render_flags (GstVaapiVideoMeta * meta);