History

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

Originally committed as revision 22594 to svn://svn.ffmpeg.org/ffmpeg/trunk

Bobby Bingham committed 16 years ago

Commit 91d1c741 parent 22e82222 files · +33 −0Browse files

Unified · Split

2 files
  1. libavfilter/avfilter.h +13 −0
  2. libavfilter/defaults.c +20 −0
libavfilter/avfilter.h+13−0
@@ -395,6 +395,19 @@ void avfilter_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats) · 394 unmodified lines
395395 /** Default handler for query_formats() */
396396 int avfilter_default_query_formats(AVFilterContext *ctx);
397397
398+/** start_frame() handler for filters which simply pass video along */
399+void avfilter_null_start_frame(AVFilterLink *link, AVFilterPicRef *picref);
400+
401+/** draw_slice() handler for filters which simply pass video along */
402+void avfilter_null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir);
403+
404+/** end_frame() handler for filters which simply pass video along */
405+void avfilter_null_end_frame(AVFilterLink *link);
406+
407+/** get_video_buffer() handler for filters which simply pass video along */
408+AVFilterPicRef *avfilter_null_get_video_buffer(AVFilterLink *link,
409+ int perms, int w, int h);
410+
398411 /**
399412 * Filter definition. This defines the pads a filter contains, and all the
400413 * callback functions used to interact with the filter.
libavfilter/defaults.c+20−0
@@ -165,3 +165,23 @@ int avfilter_default_query_formats(AVFilterContext *ctx) · 164 unmodified lines
165165 return 0;
166166 }
167167
168+void avfilter_null_start_frame(AVFilterLink *link, AVFilterPicRef *picref)
169+{
170+ avfilter_start_frame(link->dst->outputs[0], picref);
171+}
172+
173+void avfilter_null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
174+{
175+ avfilter_draw_slice(link->dst->outputs[0], y, h, slice_dir);
176+}
177+
178+void avfilter_null_end_frame(AVFilterLink *link)
179+{
180+ avfilter_end_frame(link->dst->outputs[0]);
181+}
182+
183+AVFilterPicRef *avfilter_null_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
184+{
185+ return avfilter_get_video_buffer(link->dst->outputs[0], perms, w, h);
186+}
187+

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t