Commit d0ad91c2 authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents d0f78e77 3f9d6e42
......@@ -2538,7 +2538,7 @@ static int guess_input_channel_layout(InputStream *ist)
return 1;
}
static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output)
static int decode_audio(InputStream *ist, AVPacket *pkt, int *got_output)
{
AVFrame *decoded_frame;
AVCodecContext *avctx = ist->st->codec;
......@@ -2639,7 +2639,7 @@ static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output)
return ret;
}
static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output)
static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output)
{
AVFrame *decoded_frame;
void *buffer_to_free = NULL;
......@@ -2824,10 +2824,10 @@ static int output_packet(InputStream *ist, const AVPacket *pkt)
switch (ist->st->codec->codec_type) {
case AVMEDIA_TYPE_AUDIO:
ret = transcode_audio (ist, &avpkt, &got_output);
ret = decode_audio (ist, &avpkt, &got_output);
break;
case AVMEDIA_TYPE_VIDEO:
ret = transcode_video (ist, &avpkt, &got_output);
ret = decode_video (ist, &avpkt, &got_output);
if (avpkt.duration) {
duration = av_rescale_q(avpkt.duration, ist->st->time_base, AV_TIME_BASE_Q);
} else if(ist->st->codec->time_base.num != 0 && ist->st->codec->time_base.den != 0) {
......
......@@ -24,9 +24,9 @@
#include "dwt.h"
#include "libavcodec/x86/dwt.h"
void ff_slice_buffer_init(slice_buffer *buf, int line_count,
int max_allocated_lines, int line_width,
IDWTELEM *base_buffer)
int ff_slice_buffer_init(slice_buffer *buf, int line_count,
int max_allocated_lines, int line_width,
IDWTELEM *base_buffer)
{
int i;
......@@ -55,6 +55,7 @@ void ff_slice_buffer_init(slice_buffer *buf, int line_count,
}
buf->data_stack_top = max_allocated_lines - 1;
return 0;
}
IDWTELEM *ff_slice_buffer_load_line(slice_buffer *buf, int line)
......
......@@ -228,9 +228,9 @@ void ff_spatial_idwt_slice2(DWTContext *d, int y);
: ff_slice_buffer_load_line((slice_buf), \
(line_num)))
void ff_slice_buffer_init(slice_buffer *buf, int line_count,
int max_allocated_lines, int line_width,
IDWTELEM *base_buffer);
int ff_slice_buffer_init(slice_buffer *buf, int line_count,
int max_allocated_lines, int line_width,
IDWTELEM *base_buffer);
void ff_slice_buffer_release(slice_buffer *buf, int line);
void ff_slice_buffer_flush(slice_buffer *buf);
void ff_slice_buffer_destroy(slice_buffer *buf);
......
......@@ -396,7 +396,12 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
// realloc slice buffer for the case that spatial_decomposition_count changed
ff_slice_buffer_destroy(&s->sb);
ff_slice_buffer_init(&s->sb, s->plane[0].height, (MB_SIZE >> s->block_max_depth) + s->spatial_decomposition_count * 8 + 1, s->plane[0].width, s->spatial_idwt_buffer);
if ((res = ff_slice_buffer_init(&s->sb, s->plane[0].height,
(MB_SIZE >> s->block_max_depth) +
s->spatial_decomposition_count * 8 + 1,
s->plane[0].width,
s->spatial_idwt_buffer)) < 0)
return res;
for(plane_index=0; plane_index<3; plane_index++){
Plane *p= &s->plane[plane_index];
......
......@@ -1156,8 +1156,10 @@ ALIGN 16
INIT_XMM sse
VECTOR_FMUL
%if HAVE_AVX
INIT_YMM avx
VECTOR_FMUL
%endif
;-----------------------------------------------------------------------------
; void vector_fmul_reverse(float *dst, const float *src0, const float *src1,
......@@ -1198,8 +1200,10 @@ ALIGN 16
INIT_XMM sse
VECTOR_FMUL_REVERSE
%if HAVE_AVX
INIT_YMM avx
VECTOR_FMUL_REVERSE
%endif
;-----------------------------------------------------------------------------
; vector_fmul_add(float *dst, const float *src0, const float *src1,
......@@ -1231,8 +1235,10 @@ ALIGN 16
INIT_XMM sse
VECTOR_FMUL_ADD
%if HAVE_AVX
INIT_YMM avx
VECTOR_FMUL_ADD
%endif
;-----------------------------------------------------------------------------
; void ff_butterflies_float_interleave(float *dst, const float *src0,
......
......@@ -182,10 +182,13 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *buf)
if (labs(delta) > s->min_delta) {
av_log(ctx, AV_LOG_VERBOSE, "Discontinuity - %"PRId64" samples.\n", delta);
out_size += delta;
} else if (s->resample) {
int comp = av_clip(delta, -s->max_comp, s->max_comp);
av_log(ctx, AV_LOG_VERBOSE, "Compensating %d samples per second.\n", comp);
avresample_set_compensation(s->avr, delta, inlink->sample_rate);
} else {
if (s->resample) {
int comp = av_clip(delta, -s->max_comp, s->max_comp);
av_log(ctx, AV_LOG_VERBOSE, "Compensating %d samples per second.\n", comp);
avresample_set_compensation(s->avr, delta, inlink->sample_rate);
}
delta = 0;
}
if (out_size > 0) {
......
......@@ -202,7 +202,6 @@ int avfilter_config_links(AVFilterContext *filter)
link->sample_aspect_ratio = inlink ?
inlink->sample_aspect_ratio : (AVRational){1,1};
#if 1
if (inlink) {
if (!link->w)
link->w = inlink->w;
......@@ -233,7 +232,6 @@ int avfilter_config_links(AVFilterContext *filter)
link->time_base = (AVRational) {1, link->sample_rate};
}
#endif
if ((config_link = link->dstpad->config_props))
if ((ret = config_link(link)) < 0)
return ret;
......
......@@ -383,7 +383,7 @@ struct AVFilterPad {
const char *name;
/**
* AVFilterPad type. Can be AVMEDIA_TYPE_VIDEO or AVMEDIA_TYPE_AUDIO.
* AVFilterPad type.
*/
enum AVMediaType type;
......@@ -465,7 +465,7 @@ struct AVFilterPad {
*
* Defaults to just calling the source poll_frame() method.
*
* Output video pads only.
* Output pads only.
*/
int (*poll_frame)(AVFilterLink *link);
......@@ -476,7 +476,7 @@ struct AVFilterPad {
* See avfilter_request_frame() for the error codes with a specific
* meaning.
*
* Output video pads only.
* Output pads only.
*/
int (*request_frame)(AVFilterLink *link);
......@@ -500,19 +500,28 @@ struct AVFilterPad {
int (*config_props)(AVFilterLink *link);
};
#if FF_API_FILTERS_PUBLIC
/** default handler for start_frame() for video inputs */
attribute_deprecated
void avfilter_default_start_frame(AVFilterLink *link, AVFilterBufferRef *picref);
/** default handler for draw_slice() for video inputs */
attribute_deprecated
void avfilter_default_draw_slice(AVFilterLink *link, int y, int h, int slice_dir);
/** default handler for end_frame() for video inputs */
attribute_deprecated
void avfilter_default_end_frame(AVFilterLink *link);
/** default handler for get_video_buffer() for video inputs */
attribute_deprecated
AVFilterBufferRef *avfilter_default_get_video_buffer(AVFilterLink *link,
int perms, int w, int h);
/** Default handler for query_formats() */
attribute_deprecated
int avfilter_default_query_formats(AVFilterContext *ctx);
#endif
/**
* Helpers for query_formats() which set all links to the same list of
......@@ -527,21 +536,24 @@ void avfilter_set_common_channel_layouts(AVFilterContext *ctx, AVFilterFormats *
void avfilter_set_common_packing_formats(AVFilterContext *ctx, AVFilterFormats *formats);
#endif
/** Default handler for query_formats() */
int avfilter_default_query_formats(AVFilterContext *ctx);
#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
......
......@@ -227,7 +227,7 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx)
if (graph->filters[i]->filter->query_formats)
graph->filters[i]->filter->query_formats(graph->filters[i]);
else
avfilter_default_query_formats(graph->filters[i]);
ff_default_query_formats(graph->filters[i]);
}
/* go through and merge as many format lists as possible */
......@@ -571,6 +571,74 @@ static void swap_channel_layouts(AVFilterGraph *graph)
swap_channel_layouts_on_filter(graph->filters[i]);
}
static void swap_sample_fmts_on_filter(AVFilterContext *filter)
{
AVFilterLink *link = NULL;
int format, bps;
int i, j;
for (i = 0; i < filter->input_count; i++) {
link = filter->inputs[i];
if (link->type == AVMEDIA_TYPE_AUDIO &&
link->out_formats->format_count == 1)
break;
}
if (i == filter->input_count)
return;
format = link->out_formats->formats[0];
bps = av_get_bytes_per_sample(format);
for (i = 0; i < filter->output_count; i++) {
AVFilterLink *outlink = filter->outputs[i];
int best_idx, best_score = INT_MIN;
if (outlink->type != AVMEDIA_TYPE_AUDIO ||
outlink->in_formats->format_count < 2)
continue;
for (j = 0; j < outlink->in_formats->format_count; j++) {
int out_format = outlink->in_formats->formats[j];
int out_bps = av_get_bytes_per_sample(out_format);
int score;
if (av_get_packed_sample_fmt(out_format) == format ||
av_get_planar_sample_fmt(out_format) == format) {
best_idx = j;
break;
}
/* for s32 and float prefer double to prevent loss of information */
if (bps == 4 && out_bps == 8) {
best_idx = j;
break;
}
/* prefer closest higher or equal bps */
score = -abs(out_bps - bps);
if (out_bps >= bps)
score += INT_MAX/2;
if (score > best_score) {
best_score = score;
best_idx = j;
}
}
FFSWAP(int, outlink->in_formats->formats[0],
outlink->in_formats->formats[best_idx]);
}
}
static void swap_sample_fmts(AVFilterGraph *graph)
{
int i;
for (i = 0; i < graph->filter_count; i++)
swap_sample_fmts_on_filter(graph->filters[i]);
}
static int pick_formats(AVFilterGraph *graph)
{
int i, j, ret;
......@@ -633,8 +701,9 @@ int ff_avfilter_graph_config_formats(AVFilterGraph *graph, AVClass *log_ctx)
* of format conversion inside filters */
reduce_formats(graph);
/* for audio filters, ensure the best sample rate and channel layout
/* for audio filters, ensure the best format, sample rate and channel layout
* is selected */
swap_sample_fmts(graph);
swap_samplerates(graph);
swap_channel_layouts(graph);
......
......@@ -449,7 +449,7 @@ void avfilter_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats)
avfilter_formats_ref, formats);
}
int avfilter_default_query_formats(AVFilterContext *ctx)
int ff_default_query_formats(AVFilterContext *ctx)
{
enum AVMediaType type = ctx->inputs && ctx->inputs [0] ? ctx->inputs [0]->type :
ctx->outputs && ctx->outputs[0] ? ctx->outputs[0]->type :
......@@ -534,6 +534,12 @@ int ff_parse_channel_layout(int64_t *ret, const char *arg, void *log_ctx)
return 0;
}
#if FF_API_FILTERS_PUBLIC
int avfilter_default_query_formats(AVFilterContext *ctx)
{
return ff_default_query_formats(ctx);
}
#endif
#ifdef TEST
#undef printf
......@@ -552,4 +558,3 @@ int main(void)
}
#endif
......@@ -78,4 +78,6 @@ void ff_channel_layouts_unref(AVFilterChannelLayouts **ref);
void ff_channel_layouts_changeref(AVFilterChannelLayouts **oldref,
AVFilterChannelLayouts **newref);
int ff_default_query_formats(AVFilterContext *ctx);
#endif // AVFILTER_FORMATS_H
......@@ -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 = (const 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, },
......
......@@ -56,5 +56,11 @@
#ifndef FF_API_PACKING
#define FF_API_PACKING (LIBAVFILTER_VERSION_MAJOR < 3)
#endif
#ifndef FF_API_DEFAULT_CONFIG_OUTPUT_LINK
#define FF_API_DEFAULT_CONFIG_OUTPUT_LINK (LIBAVFILTER_VERSION_MAJOR < 3)
#endif
#ifndef FF_API_FILTERS_PUBLIC
#define FF_API_FILTERS_PUBLIC (LIBAVFILTER_VERSION_MAJOR < 3)
#endif
#endif // AVFILTER_VERSION_H
......@@ -26,6 +26,7 @@
#include "libavutil/mathematics.h"
#include "libavutil/parseutils.h"
#include "avfilter.h"
#include "video.h"
typedef struct {
AVRational ratio;
......@@ -86,9 +87,9 @@ AVFilter avfilter_vf_setdar = {
.inputs = (const 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 = (const AVFilterPad[]) {{ .name = "default",
......@@ -118,9 +119,9 @@ AVFilter avfilter_vf_setsar = {
.inputs = (const 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 = (const AVFilterPad[]) {{ .name = "default",
......
......@@ -29,6 +29,7 @@
#include "avfilter.h"
#include "internal.h"
#include "video.h"
typedef struct {
unsigned int bamount; ///< black amount
......@@ -127,7 +128,7 @@ AVFilter avfilter_vf_blackframe = {
.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.draw_slice = draw_slice,
.get_video_buffer = avfilter_null_get_video_buffer,
.get_video_buffer = ff_null_get_video_buffer,
.start_frame = ff_null_start_frame_keep_ref,
.end_frame = end_frame, },
{ .name = NULL}},
......
......@@ -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 = (const 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 = (const AVFilterPad[]) {{ .name = "default",
......
......@@ -26,6 +26,7 @@
/* #define DEBUG */
#include "avfilter.h"
#include "video.h"
#include "libavutil/eval.h"
#include "libavutil/avstring.h"
#include "libavutil/libm.h"
......@@ -352,7 +353,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 = (const AVFilterPad[]) {{ .name = "default",
......
......@@ -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 = (const 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}},
......
......@@ -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
......@@ -275,7 +276,7 @@ AVFilter avfilter_vf_delogo = {
.inputs = (const 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,
......
......@@ -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 = (const 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}},
......
......@@ -41,6 +41,7 @@
#include "libavutil/lfg.h"
#include "avfilter.h"
#include "drawutils.h"
#include "video.h"
#undef time
......@@ -830,8 +831,8 @@ AVFilter avfilter_vf_drawtext = {
.inputs = (const 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,
.draw_slice = null_draw_slice,
.end_frame = end_frame,
.config_props = config_input,
......
......@@ -32,6 +32,7 @@
#include "avfilter.h"
#include "drawutils.h"
#include "internal.h"
#include "video.h"
#define R 0
#define G 1
......@@ -288,8 +289,8 @@ AVFilter avfilter_vf_fade = {
.inputs = (const 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,
......
......@@ -24,6 +24,7 @@
*/
#include "avfilter.h"
#include "video.h"
typedef struct BufPic {
AVFilterBufferRef *picref;
......@@ -106,7 +107,7 @@ AVFilter avfilter_vf_fifo = {
.inputs = (const 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,
......
......@@ -26,6 +26,7 @@
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "internal.h"
#include "video.h"
typedef struct {
/**
......@@ -102,10 +103,10 @@ AVFilter avfilter_vf_format = {
.inputs = (const 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 = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO },
......@@ -132,10 +133,10 @@ AVFilter avfilter_vf_noformat = {
.inputs = (const 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 = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO },
......
......@@ -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 = (const 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 = (const AVFilterPad[]) {{ .name = "default",
......
......@@ -26,6 +26,7 @@
#include "libavutil/eval.h"
#include "libavutil/fifo.h"
#include "avfilter.h"
#include "video.h"
static const char *const var_names[] = {
"TB", ///< timebase
......@@ -326,7 +327,7 @@ AVFilter avfilter_vf_select = {
.inputs = (const 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,
......
......@@ -29,6 +29,7 @@
#include "libavutil/eval.h"
#include "libavutil/mathematics.h"
#include "avfilter.h"
#include "video.h"
static const char *const var_names[] = {
"INTERLACED", ///< tell if the current frame is interlaced
......@@ -139,7 +140,7 @@ AVFilter avfilter_vf_setpts = {
.inputs = (const 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 }},
......
......@@ -29,6 +29,7 @@
#include "libavutil/rational.h"
#include "avfilter.h"
#include "internal.h"
#include "video.h"
static const char *const var_names[] = {
"AVTB", /* default timebase 1/AV_TIME_BASE */
......@@ -121,9 +122,9 @@ AVFilter avfilter_vf_settb = {
.inputs = (const 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 = (const AVFilterPad[]) {{ .name = "default",
......
......@@ -28,6 +28,7 @@
#include "libavutil/timestamp.h"
#include "avfilter.h"
#include "internal.h"
#include "video.h"
typedef struct {
unsigned int frame;
......@@ -93,7 +94,7 @@ AVFilter avfilter_vf_showinfo = {
.inputs = (const 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 = ff_null_start_frame_keep_ref,
.end_frame = end_frame,
.min_perms = AV_PERM_READ, },
......
......@@ -24,6 +24,7 @@
*/
#include "avfilter.h"