[FFmpeg-soc] [soc]: r5691 - in libavfilter: vf_drawbox.c vf_fifo.c vf_fps.c vf_split.c

koorogi subversion at mplayerhq.hu
Sun Mar 21 01:00:04 CET 2010


Author: koorogi
Date: Sun Mar 21 01:00:03 2010
New Revision: 5691

Log:
Use null callback functions to simplify filters.

Modified:
   libavfilter/vf_drawbox.c
   libavfilter/vf_fifo.c
   libavfilter/vf_fps.c
   libavfilter/vf_split.c

Modified: libavfilter/vf_drawbox.c
==============================================================================
--- libavfilter/vf_drawbox.c	Sat Mar 20 16:45:48 2010	(r5690)
+++ libavfilter/vf_drawbox.c	Sun Mar 21 01:00:03 2010	(r5691)
@@ -92,18 +92,6 @@ static int config_input(AVFilterLink *li
     return 0;
 }
 
-static AVFilterPicRef *get_video_buffer(AVFilterLink *link, int perms,
-                                        int w, int h)
-{
-    return avfilter_get_video_buffer(link->dst->outputs[0], perms, w, h);
-}
-
-static void start_frame(AVFilterLink *link, AVFilterPicRef *picref)
-{
-    avfilter_start_frame(link->dst->outputs[0], picref);
-}
-
-
 static void draw_box(AVFilterPicRef *pic, BoxContext* context, box_color color)
 {
     int x, y;
@@ -150,8 +138,8 @@ AVFilter avfilter_vf_drawbox=
     .query_formats   = query_formats,
     .inputs    = (AVFilterPad[]) {{ .name            = "default",
                                     .type            = CODEC_TYPE_VIDEO,
-                                    .get_video_buffer= get_video_buffer,
-                                    .start_frame     = start_frame,
+                                    .get_video_buffer= avfilter_null_get_video_buffer,
+                                    .start_frame     = avfilter_null_start_frame,
                                     .end_frame       = end_frame,
                                     .config_props    = config_input,
                                     .min_perms       = AV_PERM_WRITE |

Modified: libavfilter/vf_fifo.c
==============================================================================
--- libavfilter/vf_fifo.c	Sat Mar 20 16:45:48 2010	(r5690)
+++ libavfilter/vf_fifo.c	Sun Mar 21 01:00:03 2010	(r5691)
@@ -53,12 +53,6 @@ static av_cold void uninit(AVFilterConte
     }
 }
 
-static AVFilterPicRef *get_video_buffer(AVFilterLink *link, int perms,
-                                        int w, int h)
-{
-    return avfilter_get_video_buffer(link->dst->outputs[0], perms, w, h);
-}
-
 static void start_frame(AVFilterLink *link, AVFilterPicRef *picref)
 {
     BufferContext *buf = link->dst->priv;
@@ -113,7 +107,7 @@ AVFilter avfilter_vf_fifo =
 
     .inputs    = (AVFilterPad[]) {{ .name            = "default",
                                     .type            = CODEC_TYPE_VIDEO,
-                                    .get_video_buffer= get_video_buffer,
+                                    .get_video_buffer= avfilter_null_get_video_buffer,
                                     .start_frame     = start_frame,
                                     .draw_slice      = draw_slice,
                                     .end_frame       = end_frame,

Modified: libavfilter/vf_fps.c
==============================================================================
--- libavfilter/vf_fps.c	Sat Mar 20 16:45:48 2010	(r5690)
+++ libavfilter/vf_fps.c	Sun Mar 21 01:00:03 2010	(r5691)
@@ -54,12 +54,6 @@ static av_cold void uninit(AVFilterConte
     if(fps->pic) avfilter_unref_pic(fps->pic);
 }
 
-static AVFilterPicRef *get_video_buffer(AVFilterLink *link, int perms,
-                                        int w, int h)
-{
-    return avfilter_get_video_buffer(link->dst->outputs[0], perms, w, h);
-}
-
 static void start_frame(AVFilterLink *link, AVFilterPicRef *picref)
 {
     FPSContext *fps = link->dst->priv;
@@ -124,7 +118,7 @@ AVFilter avfilter_vf_fps =
 
     .inputs    = (AVFilterPad[]) {{ .name            = "default",
                                     .type            = CODEC_TYPE_VIDEO,
-                                    .get_video_buffer= get_video_buffer,
+                                    .get_video_buffer= avfilter_null_get_video_buffer,
                                     .start_frame     = start_frame,
                                     .end_frame       = end_frame, },
                                   { .name = NULL}},

Modified: libavfilter/vf_split.c
==============================================================================
--- libavfilter/vf_split.c	Sat Mar 20 16:45:48 2010	(r5690)
+++ libavfilter/vf_split.c	Sun Mar 21 01:00:03 2010	(r5691)
@@ -21,12 +21,6 @@
 
 #include "avfilter.h"
 
-static AVFilterPicRef *get_video_buffer(AVFilterLink *link, int perms,
-                                        int w, int h)
-{
-    return avfilter_get_video_buffer(link->dst->outputs[0], perms, w, h);
-}
-
 static void start_frame(AVFilterLink *link, AVFilterPicRef *picref)
 {
     avfilter_start_frame(link->dst->outputs[0],
@@ -55,7 +49,7 @@ AVFilter avfilter_vf_split =
 
     .inputs    = (AVFilterPad[]) {{ .name            = "default",
                                     .type            = CODEC_TYPE_VIDEO,
-                                    .get_video_buffer= get_video_buffer,
+                                    .get_video_buffer= avfilter_null_get_video_buffer,
                                     .start_frame     = start_frame,
                                     .draw_slice      = draw_slice,
                                     .end_frame       = end_frame, },


More information about the FFmpeg-soc mailing list