[FFmpeg-cvslog] r22594 - in trunk/libavfilter: avfilter.h defaults.c

koorogi subversion
Fri Mar 19 00:12:48 CET 2010


Author: koorogi
Date: Fri Mar 19 00:12:48 2010
New Revision: 22594

Log:
Create a set of null callback functions.
These are useful for filters which don't modify the image data.

Modified:
   trunk/libavfilter/avfilter.h
   trunk/libavfilter/defaults.c

Modified: trunk/libavfilter/avfilter.h
==============================================================================
--- trunk/libavfilter/avfilter.h	Thu Mar 18 16:00:17 2010	(r22593)
+++ trunk/libavfilter/avfilter.h	Fri Mar 19 00:12:48 2010	(r22594)
@@ -395,6 +395,19 @@ void avfilter_set_common_formats(AVFilte
 /** Default handler for query_formats() */
 int avfilter_default_query_formats(AVFilterContext *ctx);
 
+/** start_frame() handler for filters which simply pass video along */
+void avfilter_null_start_frame(AVFilterLink *link, AVFilterPicRef *picref);
+
+/** draw_slice() handler for filters which simply pass video along */
+void avfilter_null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir);
+
+/** end_frame() handler for filters which simply pass video along */
+void avfilter_null_end_frame(AVFilterLink *link);
+
+/** get_video_buffer() handler for filters which simply pass video along */
+AVFilterPicRef *avfilter_null_get_video_buffer(AVFilterLink *link,
+                                                  int perms, int w, int h);
+
 /**
  * Filter definition. This defines the pads a filter contains, and all the
  * callback functions used to interact with the filter.

Modified: trunk/libavfilter/defaults.c
==============================================================================
--- trunk/libavfilter/defaults.c	Thu Mar 18 16:00:17 2010	(r22593)
+++ trunk/libavfilter/defaults.c	Fri Mar 19 00:12:48 2010	(r22594)
@@ -165,3 +165,23 @@ int avfilter_default_query_formats(AVFil
     return 0;
 }
 
+void avfilter_null_start_frame(AVFilterLink *link, AVFilterPicRef *picref)
+{
+    avfilter_start_frame(link->dst->outputs[0], picref);
+}
+
+void avfilter_null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
+{
+    avfilter_draw_slice(link->dst->outputs[0], y, h, slice_dir);
+}
+
+void avfilter_null_end_frame(AVFilterLink *link)
+{
+    avfilter_end_frame(link->dst->outputs[0]);
+}
+
+AVFilterPicRef *avfilter_null_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
+{
+    return avfilter_get_video_buffer(link->dst->outputs[0], perms, w, h);
+}
+



More information about the ffmpeg-cvslog mailing list