]> git.sesse.net Git - ffmpeg/commitdiff
lavfi: remove avfilter_null_* from public API on next bump.
authorAnton Khirnov <anton@khirnov.net>
Sat, 19 May 2012 08:37:56 +0000 (10:37 +0200)
committerAnton Khirnov <anton@khirnov.net>
Tue, 22 May 2012 19:36:23 +0000 (21:36 +0200)
Those functions are only useful inside filters. It is better to not
support user filters until the API is more stable.

21 files changed:
libavfilter/avfilter.h
libavfilter/split.c
libavfilter/vf_aspect.c
libavfilter/vf_blackframe.c
libavfilter/vf_copy.c
libavfilter/vf_crop.c
libavfilter/vf_cropdetect.c
libavfilter/vf_delogo.c
libavfilter/vf_drawbox.c
libavfilter/vf_drawtext.c
libavfilter/vf_fade.c
libavfilter/vf_fifo.c
libavfilter/vf_format.c
libavfilter/vf_null.c
libavfilter/vf_select.c
libavfilter/vf_setpts.c
libavfilter/vf_settb.c
libavfilter/vf_showinfo.c
libavfilter/vf_slicify.c
libavfilter/video.c
libavfilter/video.h

index 0d40b7664c73b647aedf5f8d9548f0c7f2ecf134..54adc5cf3a76768fb4a0fc698346a1d0930812f7 100644 (file)
@@ -487,18 +487,24 @@ int avfilter_default_query_formats(AVFilterContext *ctx);
  */
 void avfilter_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats);
 
+#if FF_API_FILTERS_PUBLIC
 /** start_frame() handler for filters which simply pass video along */
+attribute_deprecated
 void avfilter_null_start_frame(AVFilterLink *link, AVFilterBufferRef *picref);
 
 /** draw_slice() handler for filters which simply pass video along */
+attribute_deprecated
 void avfilter_null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir);
 
 /** end_frame() handler for filters which simply pass video along */
+attribute_deprecated
 void avfilter_null_end_frame(AVFilterLink *link);
 
 /** get_video_buffer() handler for filters which simply pass video along */
+attribute_deprecated
 AVFilterBufferRef *avfilter_null_get_video_buffer(AVFilterLink *link,
                                                   int perms, int w, int h);
+#endif
 
 /**
  * Filter definition. This defines the pads a filter contains, and all the
index 83ad765081329b56a562760eef27543318225390..da33b7d183c89f807eb6e5aa3781844a43662615 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "avfilter.h"
 #include "audio.h"
+#include "video.h"
 
 static int split_init(AVFilterContext *ctx, const char *args, void *opaque)
 {
@@ -100,7 +101,7 @@ AVFilter avfilter_vf_split = {
 
     .inputs    = (AVFilterPad[]) {{ .name            = "default",
                                     .type            = AVMEDIA_TYPE_VIDEO,
-                                    .get_video_buffer= avfilter_null_get_video_buffer,
+                                    .get_video_buffer= ff_null_get_video_buffer,
                                     .start_frame     = start_frame,
                                     .draw_slice      = draw_slice,
                                     .end_frame       = end_frame, },
index 9db29c70f5c4569edd0a480cc2640bb165dfec9c..4e1fdac90eda7596024e4d24b479c64a81c8c66e 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "libavutil/mathematics.h"
 #include "avfilter.h"
+#include "video.h"
 
 typedef struct {
     AVRational aspect;
@@ -100,9 +101,9 @@ AVFilter avfilter_vf_setdar = {
     .inputs    = (AVFilterPad[]) {{ .name             = "default",
                                     .type             = AVMEDIA_TYPE_VIDEO,
                                     .config_props     = setdar_config_props,
-                                    .get_video_buffer = avfilter_null_get_video_buffer,
+                                    .get_video_buffer = ff_null_get_video_buffer,
                                     .start_frame      = start_frame,
-                                    .end_frame        = avfilter_null_end_frame },
+                                    .end_frame        = ff_null_end_frame },
                                   { .name = NULL}},
 
     .outputs   = (AVFilterPad[]) {{ .name             = "default",
@@ -133,9 +134,9 @@ AVFilter avfilter_vf_setsar = {
     .inputs    = (AVFilterPad[]) {{ .name             = "default",
                                     .type             = AVMEDIA_TYPE_VIDEO,
                                     .config_props     = setsar_config_props,
-                                    .get_video_buffer = avfilter_null_get_video_buffer,
+                                    .get_video_buffer = ff_null_get_video_buffer,
                                     .start_frame      = start_frame,
-                                    .end_frame        = avfilter_null_end_frame },
+                                    .end_frame        = ff_null_end_frame },
                                   { .name = NULL}},
 
     .outputs   = (AVFilterPad[]) {{ .name             = "default",
index 770eec94e0ed94be1047ef183f43e846d29272dc..7e69ccb1f6559edf410765de08c7d53f45b84a29 100644 (file)
@@ -28,6 +28,7 @@
  */
 
 #include "avfilter.h"
+#include "video.h"
 
 typedef struct {
     unsigned int bamount; ///< black amount
@@ -118,8 +119,8 @@ AVFilter avfilter_vf_blackframe = {
     .inputs    = (AVFilterPad[]) {{ .name = "default",
                                     .type             = AVMEDIA_TYPE_VIDEO,
                                     .draw_slice       = draw_slice,
-                                    .get_video_buffer = avfilter_null_get_video_buffer,
-                                    .start_frame      = avfilter_null_start_frame,
+                                    .get_video_buffer = ff_null_get_video_buffer,
+                                    .start_frame      = ff_null_start_frame,
                                     .end_frame        = end_frame, },
                                   { .name = NULL}},
 
index 705ad1e2e667b9e3c8f82550176571b5c802d95d..271a729211f320114865baa0ab07ca1b6b948b3f 100644 (file)
@@ -22,6 +22,7 @@
  */
 
 #include "avfilter.h"
+#include "video.h"
 
 AVFilter avfilter_vf_copy = {
     .name      = "copy",
@@ -29,9 +30,9 @@ AVFilter avfilter_vf_copy = {
 
     .inputs    = (AVFilterPad[]) {{ .name             = "default",
                                     .type             = AVMEDIA_TYPE_VIDEO,
-                                    .get_video_buffer = avfilter_null_get_video_buffer,
-                                    .start_frame      = avfilter_null_start_frame,
-                                    .end_frame        = avfilter_null_end_frame,
+                                    .get_video_buffer = ff_null_get_video_buffer,
+                                    .start_frame      = ff_null_start_frame,
+                                    .end_frame        = ff_null_end_frame,
                                     .rej_perms        = ~0 },
                                   { .name = NULL}},
     .outputs   = (AVFilterPad[]) {{ .name             = "default",
index d3b5a090605ef21ca99d40d1524507579ebafd51..5452601068a73a0181c119ec0d75ced977bd05f9 100644 (file)
@@ -26,6 +26,7 @@
 /* #define DEBUG */
 
 #include "avfilter.h"
+#include "video.h"
 #include "libavutil/eval.h"
 #include "libavutil/avstring.h"
 #include "libavutil/libm.h"
@@ -333,7 +334,7 @@ AVFilter avfilter_vf_crop = {
                                     .start_frame      = start_frame,
                                     .draw_slice       = draw_slice,
                                     .end_frame        = end_frame,
-                                    .get_video_buffer = avfilter_null_get_video_buffer,
+                                    .get_video_buffer = ff_null_get_video_buffer,
                                     .config_props     = config_input, },
                                   { .name = NULL}},
     .outputs   = (AVFilterPad[]) {{ .name             = "default",
index 34b5dc9a2a28792f134691155cdc7590c96453e1..d321afdd40cf660ec4db0deab2990c21d9b5c519 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "libavutil/imgutils.h"
 #include "avfilter.h"
+#include "video.h"
 
 typedef struct {
     int x1, y1, x2, y2;
@@ -203,8 +204,8 @@ AVFilter avfilter_vf_cropdetect = {
     .inputs    = (AVFilterPad[]) {{ .name = "default",
                                     .type             = AVMEDIA_TYPE_VIDEO,
                                     .config_props     = config_input,
-                                    .get_video_buffer = avfilter_null_get_video_buffer,
-                                    .start_frame      = avfilter_null_start_frame,
+                                    .get_video_buffer = ff_null_get_video_buffer,
+                                    .start_frame      = ff_null_start_frame,
                                     .end_frame        = end_frame, },
                                   { .name = NULL}},
 
index ca3156814b90503b10fdaeaae498b9fd26b15324..a54abe1a79add4a2d7850545958a9edc691ef9c2 100644 (file)
@@ -29,6 +29,7 @@
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "video.h"
 
 /**
  * Apply a simple delogo algorithm to the image in dst and put the
@@ -271,7 +272,7 @@ AVFilter avfilter_vf_delogo = {
 
     .inputs    = (AVFilterPad[]) {{ .name             = "default",
                                     .type             = AVMEDIA_TYPE_VIDEO,
-                                    .get_video_buffer = avfilter_null_get_video_buffer,
+                                    .get_video_buffer = ff_null_get_video_buffer,
                                     .start_frame      = start_frame,
                                     .draw_slice       = null_draw_slice,
                                     .end_frame        = end_frame,
index ab5cb0341578003f53c025e11a37aecdfe7d906d..fc80402f60e89ea7e3a4ddb459b5a956925041b1 100644 (file)
@@ -28,6 +28,7 @@
 #include "libavutil/pixdesc.h"
 #include "libavutil/parseutils.h"
 #include "avfilter.h"
+#include "video.h"
 
 enum { Y, U, V, A };
 
@@ -130,10 +131,10 @@ AVFilter avfilter_vf_drawbox = {
     .inputs    = (AVFilterPad[]) {{ .name             = "default",
                                     .type             = AVMEDIA_TYPE_VIDEO,
                                     .config_props     = config_input,
-                                    .get_video_buffer = avfilter_null_get_video_buffer,
-                                    .start_frame      = avfilter_null_start_frame,
+                                    .get_video_buffer = ff_null_get_video_buffer,
+                                    .start_frame      = ff_null_start_frame,
                                     .draw_slice       = draw_slice,
-                                    .end_frame        = avfilter_null_end_frame,
+                                    .end_frame        = ff_null_end_frame,
                                     .min_perms        = AV_PERM_WRITE | AV_PERM_READ,
                                     .rej_perms        = AV_PERM_PRESERVE },
                                   { .name = NULL}},
index 4846716fe097fc5ccff7c43209f7166fb1010ea9..5ef0d8c1ca217aa91ad31b38580635ac8a5c982c 100644 (file)
@@ -41,6 +41,7 @@
 #include "libavutil/lfg.h"
 #include "avfilter.h"
 #include "drawutils.h"
+#include "video.h"
 
 #undef time
 
@@ -875,7 +876,7 @@ AVFilter avfilter_vf_drawtext = {
 
     .inputs    = (AVFilterPad[]) {{ .name             = "default",
                                     .type             = AVMEDIA_TYPE_VIDEO,
-                                    .get_video_buffer = avfilter_null_get_video_buffer,
+                                    .get_video_buffer = ff_null_get_video_buffer,
                                     .start_frame      = start_frame,
                                     .draw_slice       = null_draw_slice,
                                     .end_frame        = end_frame,
index 9f748b88821f09a661d2df42df807e0f4ff1a78f..a0f37d2ad5920531214ce65bd4c174c98d7dd497 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "video.h"
 
 typedef struct {
     int factor, fade_per_frame;
@@ -157,8 +158,8 @@ AVFilter avfilter_vf_fade = {
     .inputs    = (AVFilterPad[]) {{ .name            = "default",
                                     .type            = AVMEDIA_TYPE_VIDEO,
                                     .config_props    = config_props,
-                                    .get_video_buffer = avfilter_null_get_video_buffer,
-                                    .start_frame      = avfilter_null_start_frame,
+                                    .get_video_buffer = ff_null_get_video_buffer,
+                                    .start_frame      = ff_null_start_frame,
                                     .draw_slice      = draw_slice,
                                     .end_frame       = end_frame,
                                     .min_perms       = AV_PERM_READ | AV_PERM_WRITE,
index 836cce28b5bad0f6607bb9bacee71e7f4fe224c3..b99cec38dc52f0e8cad3ff6127ac69fde4938357 100644 (file)
@@ -24,6 +24,7 @@
  */
 
 #include "avfilter.h"
+#include "video.h"
 
 typedef struct BufPic {
     AVFilterBufferRef *picref;
@@ -106,7 +107,7 @@ AVFilter avfilter_vf_fifo = {
 
     .inputs    = (AVFilterPad[]) {{ .name            = "default",
                                     .type            = AVMEDIA_TYPE_VIDEO,
-                                    .get_video_buffer= avfilter_null_get_video_buffer,
+                                    .get_video_buffer= ff_null_get_video_buffer,
                                     .start_frame     = start_frame,
                                     .draw_slice      = draw_slice,
                                     .end_frame       = end_frame,
index 9c1e0d4266c58f32e15ccac212f3d491d2759088..aaaca277df447606a32e196d3590ba0190043a7c 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "video.h"
 
 typedef struct {
     /**
@@ -104,10 +105,10 @@ AVFilter avfilter_vf_format = {
 
     .inputs    = (AVFilterPad[]) {{ .name            = "default",
                                     .type            = AVMEDIA_TYPE_VIDEO,
-                                    .get_video_buffer= avfilter_null_get_video_buffer,
-                                    .start_frame     = avfilter_null_start_frame,
-                                    .draw_slice      = avfilter_null_draw_slice,
-                                    .end_frame       = avfilter_null_end_frame, },
+                                    .get_video_buffer= ff_null_get_video_buffer,
+                                    .start_frame     = ff_null_start_frame,
+                                    .draw_slice      = ff_null_draw_slice,
+                                    .end_frame       = ff_null_end_frame, },
                                   { .name = NULL}},
     .outputs   = (AVFilterPad[]) {{ .name            = "default",
                                     .type            = AVMEDIA_TYPE_VIDEO },
@@ -134,10 +135,10 @@ AVFilter avfilter_vf_noformat = {
 
     .inputs    = (AVFilterPad[]) {{ .name            = "default",
                                     .type            = AVMEDIA_TYPE_VIDEO,
-                                    .get_video_buffer= avfilter_null_get_video_buffer,
-                                    .start_frame     = avfilter_null_start_frame,
-                                    .draw_slice      = avfilter_null_draw_slice,
-                                    .end_frame       = avfilter_null_end_frame, },
+                                    .get_video_buffer= ff_null_get_video_buffer,
+                                    .start_frame     = ff_null_start_frame,
+                                    .draw_slice      = ff_null_draw_slice,
+                                    .end_frame       = ff_null_end_frame, },
                                   { .name = NULL}},
     .outputs   = (AVFilterPad[]) {{ .name            = "default",
                                     .type            = AVMEDIA_TYPE_VIDEO },
index 8414c5f4fa07b0187b92937b10db3e0868d07bb1..470c3d28a50ac098c83ae8f8e8624c43633ade19 100644 (file)
@@ -22,6 +22,7 @@
  */
 
 #include "avfilter.h"
+#include "video.h"
 
 AVFilter avfilter_vf_null = {
     .name      = "null",
@@ -31,9 +32,9 @@ AVFilter avfilter_vf_null = {
 
     .inputs    = (AVFilterPad[]) {{ .name             = "default",
                                     .type             = AVMEDIA_TYPE_VIDEO,
-                                    .get_video_buffer = avfilter_null_get_video_buffer,
-                                    .start_frame      = avfilter_null_start_frame,
-                                    .end_frame        = avfilter_null_end_frame },
+                                    .get_video_buffer = ff_null_get_video_buffer,
+                                    .start_frame      = ff_null_start_frame,
+                                    .end_frame        = ff_null_end_frame },
                                   { .name = NULL}},
 
     .outputs   = (AVFilterPad[]) {{ .name             = "default",
index 13ec0407d5011ed1f4ca35af500bdcb3a645306d..2b6b49c15386da6d1871278c0150734a41c7b7a7 100644 (file)
@@ -27,6 +27,7 @@
 #include "libavutil/fifo.h"
 #include "libavutil/mathematics.h"
 #include "avfilter.h"
+#include "video.h"
 
 static const char *const var_names[] = {
     "E",                 ///< Euler number
@@ -339,7 +340,7 @@ AVFilter avfilter_vf_select = {
 
     .inputs    = (AVFilterPad[]) {{ .name             = "default",
                                     .type             = AVMEDIA_TYPE_VIDEO,
-                                    .get_video_buffer = avfilter_null_get_video_buffer,
+                                    .get_video_buffer = ff_null_get_video_buffer,
                                     .config_props     = config_input,
                                     .start_frame      = start_frame,
                                     .draw_slice       = draw_slice,
index b49ca5eb57621d1715a7d910f875172d10b29124..103f2657821dc089d3b77094eafd0611d05815fb 100644 (file)
@@ -29,6 +29,7 @@
 #include "libavutil/eval.h"
 #include "libavutil/mathematics.h"
 #include "avfilter.h"
+#include "video.h"
 
 static const char *const var_names[] = {
     "E",           ///< Euler number
@@ -148,7 +149,7 @@ AVFilter avfilter_vf_setpts = {
 
     .inputs    = (AVFilterPad[]) {{ .name             = "default",
                                     .type             = AVMEDIA_TYPE_VIDEO,
-                                    .get_video_buffer = avfilter_null_get_video_buffer,
+                                    .get_video_buffer = ff_null_get_video_buffer,
                                     .config_props     = config_input,
                                     .start_frame      = start_frame, },
                                   { .name = NULL }},
index 49f7a57d723354474bb2056e89a569756ca200c4..b40ede87cb074d4304ac958799450ece7d70aad2 100644 (file)
@@ -29,6 +29,7 @@
 #include "libavutil/rational.h"
 #include "avfilter.h"
 #include "internal.h"
+#include "video.h"
 
 static const char *const var_names[] = {
     "E",
@@ -130,9 +131,9 @@ AVFilter avfilter_vf_settb = {
 
     .inputs    = (AVFilterPad[]) {{ .name             = "default",
                                     .type             = AVMEDIA_TYPE_VIDEO,
-                                    .get_video_buffer = avfilter_null_get_video_buffer,
+                                    .get_video_buffer = ff_null_get_video_buffer,
                                     .start_frame      = start_frame,
-                                    .end_frame        = avfilter_null_end_frame },
+                                    .end_frame        = ff_null_end_frame },
                                   { .name = NULL }},
 
     .outputs   = (AVFilterPad[]) {{ .name            = "default",
index aa2a7f16f9e66ae3ed83842900a25f5b06d80a35..0475f9bf90d6c9dd2dc4360cf5a7be9a0ef0e50e 100644 (file)
@@ -26,6 +26,7 @@
 #include "libavutil/imgutils.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "video.h"
 
 typedef struct {
     unsigned int frame;
@@ -86,8 +87,8 @@ AVFilter avfilter_vf_showinfo = {
 
     .inputs    = (AVFilterPad[]) {{ .name = "default",
                                     .type             = AVMEDIA_TYPE_VIDEO,
-                                    .get_video_buffer = avfilter_null_get_video_buffer,
-                                    .start_frame      = avfilter_null_start_frame,
+                                    .get_video_buffer = ff_null_get_video_buffer,
+                                    .start_frame      = ff_null_start_frame,
                                     .end_frame        = end_frame,
                                     .min_perms        = AV_PERM_READ, },
                                   { .name = NULL}},
index cc56fe857c55ef5cac52056d60c096a6c8f770b6..31d74979af97c060cb10764c7e32fb7f4bd35d10 100644 (file)
@@ -24,6 +24,7 @@
  */
 
 #include "avfilter.h"
+#include "video.h"
 #include "libavutil/pixdesc.h"
 
 typedef struct {
@@ -105,11 +106,11 @@ AVFilter avfilter_vf_slicify = {
 
     .inputs    = (AVFilterPad[]) {{ .name             = "default",
                                     .type             = AVMEDIA_TYPE_VIDEO,
-                                    .get_video_buffer = avfilter_null_get_video_buffer,
+                                    .get_video_buffer = ff_null_get_video_buffer,
                                     .start_frame      = start_frame,
                                     .draw_slice       = draw_slice,
                                     .config_props     = config_props,
-                                    .end_frame        = avfilter_null_end_frame, },
+                                    .end_frame        = ff_null_end_frame, },
                                   { .name = NULL}},
     .outputs   = (AVFilterPad[]) {{ .name            = "default",
                                     .type            = AVMEDIA_TYPE_VIDEO, },
index 74b08379bf45dc8966f3e6c44967338a4174b157..6a19388f6eb5ce25582cd76812bca327b544258d 100644 (file)
@@ -65,7 +65,7 @@ static void ff_dlog_ref(void *ctx, AVFilterBufferRef *ref, int end)
     av_dlog(ctx, "]%s", end ? "\n" : "");
 }
 
-AVFilterBufferRef *avfilter_null_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
+AVFilterBufferRef *ff_null_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
 {
     return avfilter_get_video_buffer(link->dst->outputs[0], perms, w, h);
 }
@@ -160,7 +160,7 @@ AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int
     return ret;
 }
 
-void avfilter_null_start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
+void ff_null_start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
 {
     avfilter_start_frame(link->dst->outputs[0], picref);
 }
@@ -211,7 +211,7 @@ void avfilter_start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
     start_frame(link, link->cur_buf);
 }
 
-void avfilter_null_end_frame(AVFilterLink *link)
+void ff_null_end_frame(AVFilterLink *link)
 {
     avfilter_end_frame(link->dst->outputs[0]);
 }
@@ -252,7 +252,7 @@ void avfilter_end_frame(AVFilterLink *link)
     }
 }
 
-void avfilter_null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
+void ff_null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
 {
     avfilter_draw_slice(link->dst->outputs[0], y, h, slice_dir);
 }
@@ -326,4 +326,20 @@ void avfilter_default_draw_slice(AVFilterLink *inlink, int y, int h, int slice_d
 {
     default_draw_slice(inlink, y, h, slice_dir);
 }
+AVFilterBufferRef *avfilter_null_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
+{
+    return ff_null_get_video_buffer(link, perms, w, h);
+}
+void avfilter_null_start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
+{
+    ff_null_start_frame(link, picref);
+}
+void avfilter_null_end_frame(AVFilterLink *link)
+{
+    ff_null_end_frame(link);
+}
+void avfilter_null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
+{
+    ff_null_draw_slice(link, y, h, slice_dir);
+}
 #endif
index 99f84ecde84ff440f4c0ea9aea76641629b60bb6..f20f30b27c3fe3b16688ac1fb4fe021260febdc3 100644 (file)
 
 AVFilterBufferRef *ff_default_get_video_buffer(AVFilterLink *link,
                                                int perms, int w, int h);
+AVFilterBufferRef *ff_null_get_video_buffer(AVFilterLink *link, int perms, int w, int h);
+
+void ff_null_start_frame(AVFilterLink *link, AVFilterBufferRef *picref);
+void ff_null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir);
+void ff_null_end_frame(AVFilterLink *link);
+
 #endif /* AVFILTER_VIDEO_H */