[FFmpeg-cvslog] lavfi: remove old video sink API

Stefano Sabatini git at videolan.org
Tue Jun 26 11:44:51 CEST 2012


ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Mon Jun 25 20:24:50 2012 +0200| [8dd0e87d7b9b17d613c646c396c7b7c1a6293111] | committer: Stefano Sabatini

lavfi: remove old video sink API

It was deprecated since a long time and removed after the 2->3 major
bump.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8dd0e87d7b9b17d613c646c396c7b7c1a6293111
---

 ffplay.c                  |    6 ------
 libavdevice/lavfi.c       |    6 ------
 libavfilter/buffersink.h  |    9 ---------
 libavfilter/sink_buffer.c |   16 ++--------------
 libavfilter/version.h     |    3 ---
 5 files changed, 2 insertions(+), 38 deletions(-)

diff --git a/ffplay.c b/ffplay.c
index 6a49d85..afd65fc 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1572,16 +1572,10 @@ static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const c
                                             graph)) < 0)
         return ret;
 
-#if FF_API_OLD_VSINK_API
-    ret = avfilter_graph_create_filter(&filt_out,
-                                       avfilter_get_by_name("buffersink"),
-                                       "ffplay_buffersink", NULL, (void *)pix_fmts, graph);
-#else
     buffersink_params->pixel_fmts = pix_fmts;
     ret = avfilter_graph_create_filter(&filt_out,
                                        avfilter_get_by_name("buffersink"),
                                        "ffplay_buffersink", NULL, buffersink_params, graph);
-#endif
     av_freep(&buffersink_params);
     if (ret < 0)
         return ret;
diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c
index 5387a86..65632e3 100644
--- a/libavdevice/lavfi.c
+++ b/libavdevice/lavfi.c
@@ -191,16 +191,10 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx)
         if (type == AVMEDIA_TYPE_VIDEO) {
             AVBufferSinkParams *buffersink_params = av_buffersink_params_alloc();
 
-#if FF_API_OLD_VSINK_API
-            ret = avfilter_graph_create_filter(&sink, buffersink,
-                                               inout->name, NULL,
-                                               pix_fmts, lavfi->graph);
-#else
             buffersink_params->pixel_fmts = pix_fmts;
             ret = avfilter_graph_create_filter(&sink, buffersink,
                                                inout->name, NULL,
                                                buffersink_params, lavfi->graph);
-#endif
             av_freep(&buffersink_params);
 
             if (ret < 0)
diff --git a/libavfilter/buffersink.h b/libavfilter/buffersink.h
index 97729bc..93302e8 100644
--- a/libavfilter/buffersink.h
+++ b/libavfilter/buffersink.h
@@ -91,15 +91,6 @@ int av_buffersink_get_buffer_ref(AVFilterContext *buffer_sink,
  */
 int av_buffersink_poll_frame(AVFilterContext *ctx);
 
-#if FF_API_OLD_VSINK_API
-/**
- * @deprecated Use av_buffersink_get_buffer_ref() instead.
- */
-attribute_deprecated
-int av_vsink_buffer_get_video_buffer_ref(AVFilterContext *buffer_sink,
-                                         AVFilterBufferRef **picref, int flags);
-#endif
-
 /**
  * Get a buffer with filtered data from sink and put it in buf.
  *
diff --git a/libavfilter/sink_buffer.c b/libavfilter/sink_buffer.c
index c82bff0..b6410a2 100644
--- a/libavfilter/sink_buffer.c
+++ b/libavfilter/sink_buffer.c
@@ -161,32 +161,20 @@ int av_buffersink_poll_frame(AVFilterContext *ctx)
     return av_fifo_size(buf->fifo)/sizeof(AVFilterBufferRef *) + ff_poll_frame(inlink);
 }
 
-#if FF_API_OLD_VSINK_API
-int av_vsink_buffer_get_video_buffer_ref(AVFilterContext *ctx,
-                                         AVFilterBufferRef **picref, int flags)
-{
-    return av_buffersink_get_buffer_ref(ctx, picref, flags);
-}
-#endif
-
 #if CONFIG_BUFFERSINK_FILTER
 
 static av_cold int vsink_init(AVFilterContext *ctx, const char *args, void *opaque)
 {
     BufferSinkContext *buf = ctx->priv;
-    av_unused AVBufferSinkParams *params;
+    AVBufferSinkParams *params = (AVBufferSinkParams *)opaque;
 
     if (!opaque) {
         av_log(ctx, AV_LOG_WARNING,
                "No opaque field provided\n");
         buf->pixel_fmts = NULL;
     } else {
-#if FF_API_OLD_VSINK_API
-        const int *pixel_fmts = (const enum PixelFormat *)opaque;
-#else
-        params = (AVBufferSinkParams *)opaque;
         const int *pixel_fmts = params->pixel_fmts;
-#endif
+
         buf->pixel_fmts = ff_copy_int_list(pixel_fmts);
         if (!buf->pixel_fmts)
             return AVERROR(ENOMEM);
diff --git a/libavfilter/version.h b/libavfilter/version.h
index a3f6816..d4d952b 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -44,9 +44,6 @@
  * Those FF_API_* defines are not part of public API.
  * They may change, break or disappear at any time.
  */
-#ifndef FF_API_OLD_VSINK_API
-#define FF_API_OLD_VSINK_API        (LIBAVFILTER_VERSION_MAJOR < 3)
-#endif
 #ifndef FF_API_OLD_ALL_FORMATS_API
 #define FF_API_OLD_ALL_FORMATS_API (LIBAVFILTER_VERSION_MAJOR < 3)
 #endif



More information about the ffmpeg-cvslog mailing list