diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-05-23 21:41:13 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-05-23 21:48:31 +0200 |
commit | d0ad91c258821708ce21b4ae53018922ef1f5614 (patch) | |
tree | 95332c7c22137cedd30a84bcc51cf6924ee2d631 /libavfilter/video.c | |
parent | d0f78e77e1cde44532d613525a4f521e8effe3ed (diff) | |
parent | 3f9d6e423978f5e905def374e9c2e9166e3ebb2c (diff) | |
download | ffmpeg-d0ad91c258821708ce21b4ae53018922ef1f5614.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
os_support: Define SHUT_RD, SHUT_WR and SHUT_RDWR on OS/2
http: Add support for reading http POST reply headers
http: Add http_shutdown() for ending writing of posts
tcp: Allow signalling end of reading/writing
avio: Add a function for signalling end of reading/writing
lavfi: fix comment, audio is supported now.
lavfi: fix incorrect comment.
lavfi: remove avfilter_null_* from public API on next bump.
lavfi: remove avfilter_default_* from public API on next bump.
lavfi: deprecate default config_props() callback and refactor avfilter_config_links()
avfiltergraph: smarter sample format selection.
avconv: rename transcode_audio/video to decode_audio/video.
asyncts: reset delta to 0 when it's not used.
x86: lavc: use %if HAVE_AVX guards around AVX functions in yasm code.
dwt: return errors from ff_slice_buffer_init()
Conflicts:
ffmpeg.c
libavfilter/avfilter.c
libavfilter/avfilter.h
libavfilter/formats.c
libavfilter/version.h
libavfilter/vf_blackframe.c
libavfilter/vf_drawtext.c
libavfilter/vf_fade.c
libavfilter/vf_format.c
libavfilter/vf_showinfo.c
libavfilter/video.c
libavfilter/video.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/video.c')
-rw-r--r-- | libavfilter/video.c | 59 |
1 files changed, 47 insertions, 12 deletions
diff --git a/libavfilter/video.c b/libavfilter/video.c index 6dbc8cb4cf..5c750ff96a 100644 --- a/libavfilter/video.c +++ b/libavfilter/video.c @@ -20,6 +20,7 @@ #include "avfilter.h" #include "internal.h" +#include "video.h" static char *ff_get_ref_perms_string(char *buf, size_t buf_size, int perms) { @@ -61,12 +62,12 @@ 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); } -AVFilterBufferRef *avfilter_default_get_video_buffer(AVFilterLink *link, int perms, int w, int h) +AVFilterBufferRef *ff_default_get_video_buffer(AVFilterLink *link, int perms, int w, int h) { int linesize[4]; uint8_t *data[4]; @@ -174,7 +175,7 @@ AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int ret = link->dstpad->get_video_buffer(link, perms, w, h); if (!ret) - ret = avfilter_default_get_video_buffer(link, perms, w, h); + ret = ff_default_get_video_buffer(link, perms, w, h); if (ret) ret->type = AVMEDIA_TYPE_VIDEO; @@ -184,12 +185,12 @@ 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); } -void avfilter_default_start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref) +static void default_start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref) { AVFilterLink *outlink = NULL; @@ -215,7 +216,7 @@ void avfilter_start_frame(AVFilterLink *link, AVFilterBufferRef *picref) FF_DPRINTF_START(NULL, start_frame); ff_dlog_link(NULL, link, 0); av_dlog(NULL, " "); ff_dlog_ref(NULL, picref, 1); if (!(start_frame = dst->start_frame)) - start_frame = avfilter_default_start_frame; + start_frame = default_start_frame; if (picref->linesize[0] < 0) perms |= AV_PERM_NEG_LINESIZES; @@ -246,12 +247,12 @@ void avfilter_start_frame(AVFilterLink *link, AVFilterBufferRef *picref) ff_update_link_current_pts(link, link->cur_buf->pts); } -void avfilter_null_end_frame(AVFilterLink *link) +void ff_null_end_frame(AVFilterLink *link) { avfilter_end_frame(link->dst->outputs[0]); } -void avfilter_default_end_frame(AVFilterLink *inlink) +static void default_end_frame(AVFilterLink *inlink) { AVFilterLink *outlink = NULL; @@ -275,7 +276,7 @@ void avfilter_end_frame(AVFilterLink *link) void (*end_frame)(AVFilterLink *); if (!(end_frame = link->dstpad->end_frame)) - end_frame = avfilter_default_end_frame; + end_frame = default_end_frame; end_frame(link); @@ -287,12 +288,12 @@ 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); } -void avfilter_default_draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) +static void default_draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) { AVFilterLink *outlink = NULL; @@ -340,7 +341,41 @@ void avfilter_draw_slice(AVFilterLink *link, int y, int h, int slice_dir) } if (!(draw_slice = link->dstpad->draw_slice)) - draw_slice = avfilter_default_draw_slice; + draw_slice = default_draw_slice; draw_slice(link, y, h, slice_dir); } +#if FF_API_FILTERS_PUBLIC +AVFilterBufferRef *avfilter_default_get_video_buffer(AVFilterLink *link, int perms, int w, int h) +{ + return ff_default_get_video_buffer(link, perms, w, h); +} +void avfilter_default_start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref) +{ + default_start_frame(inlink, picref); +} +void avfilter_default_end_frame(AVFilterLink *inlink) +{ + default_end_frame(inlink); +} +void avfilter_default_draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) +{ + 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 |