Skip to content

Commit

Permalink
avfilter: various cosmetics
Browse files Browse the repository at this point in the history
Signed-off-by: Paul B Mahol <[email protected]>
  • Loading branch information
richardpl committed Sep 12, 2013
1 parent ba5e778 commit b211607
Show file tree
Hide file tree
Showing 109 changed files with 750 additions and 896 deletions.
2 changes: 1 addition & 1 deletion libavfilter/af_aconvert.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ typedef struct {
static const AVOption aconvert_options[] = {
{ "sample_fmt", "", OFFSET(format_str), AV_OPT_TYPE_STRING, .flags = A|F },
{ "channel_layout", "", OFFSET(channel_layout_str), AV_OPT_TYPE_STRING, .flags = A|F },
{ NULL },
{ NULL }
};

AVFILTER_DEFINE_CLASS(aconvert);
Expand Down
8 changes: 4 additions & 4 deletions libavfilter/af_aecho.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
*
*/

#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/opt.h"
#include "libavutil/samplefmt.h"
#include "libavutil/avassert.h"
#include "avfilter.h"
#include "audio.h"
#include "internal.h"
Expand Down Expand Up @@ -52,7 +52,7 @@ static const AVOption aecho_options[] = {
{ "out_gain", "set signal output gain", OFFSET(out_gain), AV_OPT_TYPE_FLOAT, {.dbl=0.3}, 0, 1, A },
{ "delays", "set list of signal delays", OFFSET(delays), AV_OPT_TYPE_STRING, {.str="1000"}, 0, 0, A },
{ "decays", "set list of signal decays", OFFSET(decays), AV_OPT_TYPE_STRING, {.str="0.5"}, 0, 0, A },
{ NULL },
{ NULL }
};

AVFILTER_DEFINE_CLASS(aecho);
Expand Down Expand Up @@ -333,7 +333,7 @@ static const AVFilterPad aecho_inputs[] = {
.type = AVMEDIA_TYPE_AUDIO,
.filter_frame = filter_frame,
},
{ NULL },
{ NULL }
};

static const AVFilterPad aecho_outputs[] = {
Expand All @@ -343,7 +343,7 @@ static const AVFilterPad aecho_outputs[] = {
.config_props = config_output,
.type = AVMEDIA_TYPE_AUDIO,
},
{ NULL },
{ NULL }
};

AVFilter avfilter_af_aecho = {
Expand Down
6 changes: 3 additions & 3 deletions libavfilter/af_afade.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ static const AVOption afade_options[] = {
{ "cub", "cubic", 0, AV_OPT_TYPE_CONST, {.i64 = CUB }, 0, 0, FLAGS, "curve" },
{ "squ", "square root", 0, AV_OPT_TYPE_CONST, {.i64 = SQU }, 0, 0, FLAGS, "curve" },
{ "cbr", "cubic root", 0, AV_OPT_TYPE_CONST, {.i64 = CBR }, 0, 0, FLAGS, "curve" },
{NULL},
{ NULL }
};

AVFILTER_DEFINE_CLASS(afade);
Expand Down Expand Up @@ -281,8 +281,8 @@ static const AVFilterPad avfilter_af_afade_inputs[] = {

static const AVFilterPad avfilter_af_afade_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
},
{ NULL }
};
Expand Down
3 changes: 1 addition & 2 deletions libavfilter/af_aformat.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ static const AVOption aformat_options[] = {
{ "sample_fmts", "A comma-separated list of sample formats.", OFFSET(formats_str), AV_OPT_TYPE_STRING, .flags = A|F },
{ "sample_rates", "A comma-separated list of sample rates.", OFFSET(sample_rates_str), AV_OPT_TYPE_STRING, .flags = A|F },
{ "channel_layouts", "A comma-separated list of channel layouts.", OFFSET(channel_layouts_str), AV_OPT_TYPE_STRING, .flags = A|F },
{ NULL },
{ NULL }
};

AVFILTER_DEFINE_CLASS(aformat);
Expand Down Expand Up @@ -142,7 +142,6 @@ AVFilter avfilter_af_aformat = {
.query_formats = query_formats,
.priv_size = sizeof(AFormatContext),
.priv_class = &aformat_class,

.inputs = avfilter_af_aformat_inputs,
.outputs = avfilter_af_aformat_outputs,
};
2 changes: 1 addition & 1 deletion libavfilter/af_amerge.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ typedef struct {
static const AVOption amerge_options[] = {
{ "inputs", "specify the number of inputs", OFFSET(nb_inputs),
AV_OPT_TYPE_INT, { .i64 = 2 }, 2, SWR_CH_MAX, FLAGS },
{0}
{ NULL }
};

AVFILTER_DEFINE_CLASS(amerge);
Expand Down
19 changes: 8 additions & 11 deletions libavfilter/af_amix.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ static const AVOption amix_options[] = {
{ "dropout_transition", "Transition time, in seconds, for volume "
"renormalization when an input stream ends.",
OFFSET(dropout_transition), AV_OPT_TYPE_FLOAT, { .dbl = 2.0 }, 0, INT_MAX, A|F },
{ NULL },
{ NULL }
};

AVFILTER_DEFINE_CLASS(amix);
Expand Down Expand Up @@ -547,17 +547,14 @@ static const AVFilterPad avfilter_af_amix_outputs[] = {
};

AVFilter avfilter_af_amix = {
.name = "amix",
.description = NULL_IF_CONFIG_SMALL("Audio mixing."),
.priv_size = sizeof(MixContext),
.priv_class = &amix_class,

.name = "amix",
.description = NULL_IF_CONFIG_SMALL("Audio mixing."),
.priv_size = sizeof(MixContext),
.priv_class = &amix_class,
.init = init,
.uninit = uninit,
.query_formats = query_formats,

.inputs = NULL,
.outputs = avfilter_af_amix_outputs,

.flags = AVFILTER_FLAG_DYNAMIC_INPUTS,
.inputs = NULL,
.outputs = avfilter_af_amix_outputs,
.flags = AVFILTER_FLAG_DYNAMIC_INPUTS,
};
12 changes: 6 additions & 6 deletions libavfilter/af_anull.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@

static const AVFilterPad avfilter_af_anull_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
},
{ NULL }
};
Expand All @@ -44,9 +44,9 @@ static const AVFilterPad avfilter_af_anull_outputs[] = {
};

AVFilter avfilter_af_anull = {
.name = "anull",
.description = NULL_IF_CONFIG_SMALL("Pass the source unchanged to the output."),
.name = "anull",
.description = NULL_IF_CONFIG_SMALL("Pass the source unchanged to the output."),
.query_formats = ff_query_formats_all,
.inputs = avfilter_af_anull_inputs,
.outputs = avfilter_af_anull_outputs,
.inputs = avfilter_af_anull_inputs,
.outputs = avfilter_af_anull_outputs,
};
6 changes: 3 additions & 3 deletions libavfilter/af_apad.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static const AVOption apad_options[] = {
{ "packet_size", "set silence packet size", OFFSET(packet_size), AV_OPT_TYPE_INT, { .i64 = 4096 }, 0, INT_MAX, A },
{ "pad_len", "number of samples of silence to add", OFFSET(pad_len), AV_OPT_TYPE_INT64, { .i64 = 0 }, 0, INT64_MAX, A },
{ "whole_len", "target number of samples in the audio stream", OFFSET(whole_len), AV_OPT_TYPE_INT64, { .i64 = 0 }, 0, INT64_MAX, A },
{ NULL },
{ NULL }
};

AVFILTER_DEFINE_CLASS(apad);
Expand Down Expand Up @@ -132,7 +132,7 @@ static const AVFilterPad apad_inputs[] = {
.type = AVMEDIA_TYPE_AUDIO,
.filter_frame = filter_frame,
},
{ NULL },
{ NULL }
};

static const AVFilterPad apad_outputs[] = {
Expand All @@ -141,7 +141,7 @@ static const AVFilterPad apad_outputs[] = {
.request_frame = request_frame,
.type = AVMEDIA_TYPE_AUDIO,
},
{ NULL },
{ NULL }
};

AVFilter avfilter_af_apad = {
Expand Down
2 changes: 1 addition & 1 deletion libavfilter/af_aphaser.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ static const AVOption aphaser_options[] = {
{ "t", NULL, 0, AV_OPT_TYPE_CONST, {.i64=WAVE_TRI}, 0, 0, FLAGS, "type" },
{ "sinusoidal", NULL, 0, AV_OPT_TYPE_CONST, {.i64=WAVE_SIN}, 0, 0, FLAGS, "type" },
{ "s", NULL, 0, AV_OPT_TYPE_CONST, {.i64=WAVE_SIN}, 0, 0, FLAGS, "type" },
{ NULL },
{ NULL }
};

AVFILTER_DEFINE_CLASS(aphaser);
Expand Down
4 changes: 2 additions & 2 deletions libavfilter/af_aresample.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ static const AVFilterPad aresample_inputs[] = {
.type = AVMEDIA_TYPE_AUDIO,
.filter_frame = filter_frame,
},
{ NULL },
{ NULL }
};

static const AVFilterPad aresample_outputs[] = {
Expand All @@ -293,7 +293,7 @@ static const AVFilterPad aresample_outputs[] = {
.request_frame = request_frame,
.type = AVMEDIA_TYPE_AUDIO,
},
{ NULL },
{ NULL }
};

AVFilter avfilter_af_aresample = {
Expand Down
24 changes: 12 additions & 12 deletions libavfilter/af_asetnsamples.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,11 @@ static int request_frame(AVFilterLink *outlink)

static const AVFilterPad asetnsamples_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.filter_frame = filter_frame,
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.filter_frame = filter_frame,
},
{ NULL }
{ NULL }
};

static const AVFilterPad asetnsamples_outputs[] = {
Expand All @@ -185,12 +185,12 @@ static const AVFilterPad asetnsamples_outputs[] = {
};

AVFilter avfilter_af_asetnsamples = {
.name = "asetnsamples",
.description = NULL_IF_CONFIG_SMALL("Set the number of samples for each output audio frames."),
.priv_size = sizeof(ASNSContext),
.init = init,
.uninit = uninit,
.inputs = asetnsamples_inputs,
.outputs = asetnsamples_outputs,
.priv_class = &asetnsamples_class,
.name = "asetnsamples",
.description = NULL_IF_CONFIG_SMALL("Set the number of samples for each output audio frames."),
.priv_size = sizeof(ASNSContext),
.priv_class = &asetnsamples_class,
.init = init,
.uninit = uninit,
.inputs = asetnsamples_inputs,
.outputs = asetnsamples_outputs,
};
10 changes: 5 additions & 5 deletions libavfilter/af_ashowinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,19 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)

static const AVFilterPad inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.filter_frame = filter_frame,
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.filter_frame = filter_frame,
},
{ NULL },
{ NULL }
};

static const AVFilterPad outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
},
{ NULL },
{ NULL }
};

AVFilter avfilter_af_ashowinfo = {
Expand Down
2 changes: 1 addition & 1 deletion libavfilter/af_astats.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ typedef struct {

static const AVOption astats_options[] = {
{ "length", "set the window length", OFFSET(time_constant), AV_OPT_TYPE_DOUBLE, {.dbl=.05}, .01, 10, FLAGS },
{NULL},
{ NULL }
};

AVFILTER_DEFINE_CLASS(astats);
Expand Down
11 changes: 4 additions & 7 deletions libavfilter/af_asyncts.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ static const AVOption asyncts_options[] = {
"(in seconds) to trigger padding/trimmin the data.", OFFSET(min_delta_sec), AV_OPT_TYPE_FLOAT, { .dbl = 0.1 }, 0, INT_MAX, A|F },
{ "max_comp", "Maximum compensation in samples per second.", OFFSET(max_comp), AV_OPT_TYPE_INT, { .i64 = 500 }, 0, INT_MAX, A|F },
{ "first_pts", "Assume the first pts should be this value.", OFFSET(first_pts), AV_OPT_TYPE_INT64, { .i64 = AV_NOPTS_VALUE }, INT64_MIN, INT64_MAX, A|F },
{ NULL },
{ NULL }
};

AVFILTER_DEFINE_CLASS(asyncts);
Expand Down Expand Up @@ -292,9 +292,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)

static const AVFilterPad avfilter_af_asyncts_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.filter_frame = filter_frame
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.filter_frame = filter_frame
},
{ NULL }
};
Expand All @@ -312,13 +312,10 @@ static const AVFilterPad avfilter_af_asyncts_outputs[] = {
AVFilter avfilter_af_asyncts = {
.name = "asyncts",
.description = NULL_IF_CONFIG_SMALL("Sync audio data to timestamps"),

.init = init,
.uninit = uninit,

.priv_size = sizeof(ASyncContext),
.priv_class = &asyncts_class,

.inputs = avfilter_af_asyncts_inputs,
.outputs = avfilter_af_asyncts_outputs,
};
Loading

0 comments on commit b211607

Please sign in to comment.