You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
lavfi, ffmpeg: simplify filter names.
The names are only used for technical output and debugging. Make them similar to C identifiers for easier quick reading of debug dumps.
This commit is contained in:
@@ -422,7 +422,7 @@ static int configure_output_video_filter(FilterGraph *fg, OutputFilter *ofilter,
|
|||||||
int ret;
|
int ret;
|
||||||
char name[255];
|
char name[255];
|
||||||
|
|
||||||
snprintf(name, sizeof(name), "output stream %d:%d", ost->file_index, ost->index);
|
snprintf(name, sizeof(name), "out_%d_%d", ost->file_index, ost->index);
|
||||||
ret = avfilter_graph_create_filter(&ofilter->filter,
|
ret = avfilter_graph_create_filter(&ofilter->filter,
|
||||||
avfilter_get_by_name("buffersink"),
|
avfilter_get_by_name("buffersink"),
|
||||||
name, NULL, NULL, fg->graph);
|
name, NULL, NULL, fg->graph);
|
||||||
@@ -443,7 +443,7 @@ static int configure_output_video_filter(FilterGraph *fg, OutputFilter *ofilter,
|
|||||||
av_strlcatf(args, sizeof(args), ":%s=%s", e->key, e->value);
|
av_strlcatf(args, sizeof(args), ":%s=%s", e->key, e->value);
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(name, sizeof(name), "scaler for output stream %d:%d",
|
snprintf(name, sizeof(name), "scaler_out_%d_%d",
|
||||||
ost->file_index, ost->index);
|
ost->file_index, ost->index);
|
||||||
if ((ret = avfilter_graph_create_filter(&filter, avfilter_get_by_name("scale"),
|
if ((ret = avfilter_graph_create_filter(&filter, avfilter_get_by_name("scale"),
|
||||||
name, args, NULL, fg->graph)) < 0)
|
name, args, NULL, fg->graph)) < 0)
|
||||||
@@ -457,7 +457,7 @@ static int configure_output_video_filter(FilterGraph *fg, OutputFilter *ofilter,
|
|||||||
|
|
||||||
if ((pix_fmts = choose_pix_fmts(ofilter))) {
|
if ((pix_fmts = choose_pix_fmts(ofilter))) {
|
||||||
AVFilterContext *filter;
|
AVFilterContext *filter;
|
||||||
snprintf(name, sizeof(name), "pixel format for output stream %d:%d",
|
snprintf(name, sizeof(name), "format_out_%d_%d",
|
||||||
ost->file_index, ost->index);
|
ost->file_index, ost->index);
|
||||||
ret = avfilter_graph_create_filter(&filter,
|
ret = avfilter_graph_create_filter(&filter,
|
||||||
avfilter_get_by_name("format"),
|
avfilter_get_by_name("format"),
|
||||||
@@ -478,7 +478,7 @@ static int configure_output_video_filter(FilterGraph *fg, OutputFilter *ofilter,
|
|||||||
|
|
||||||
snprintf(args, sizeof(args), "fps=%d/%d", ost->frame_rate.num,
|
snprintf(args, sizeof(args), "fps=%d/%d", ost->frame_rate.num,
|
||||||
ost->frame_rate.den);
|
ost->frame_rate.den);
|
||||||
snprintf(name, sizeof(name), "fps for output stream %d:%d",
|
snprintf(name, sizeof(name), "fps_out_%d_%d",
|
||||||
ost->file_index, ost->index);
|
ost->file_index, ost->index);
|
||||||
ret = avfilter_graph_create_filter(&fps, avfilter_get_by_name("fps"),
|
ret = avfilter_graph_create_filter(&fps, avfilter_get_by_name("fps"),
|
||||||
name, args, NULL, fg->graph);
|
name, args, NULL, fg->graph);
|
||||||
@@ -492,7 +492,7 @@ static int configure_output_video_filter(FilterGraph *fg, OutputFilter *ofilter,
|
|||||||
pad_idx = 0;
|
pad_idx = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(name, sizeof(name), "trim for output stream %d:%d",
|
snprintf(name, sizeof(name), "trim_out_%d_%d",
|
||||||
ost->file_index, ost->index);
|
ost->file_index, ost->index);
|
||||||
ret = insert_trim(of->start_time, of->recording_time,
|
ret = insert_trim(of->start_time, of->recording_time,
|
||||||
&last_filter, &pad_idx, name);
|
&last_filter, &pad_idx, name);
|
||||||
@@ -517,7 +517,7 @@ static int configure_output_audio_filter(FilterGraph *fg, OutputFilter *ofilter,
|
|||||||
char name[255];
|
char name[255];
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
snprintf(name, sizeof(name), "output stream %d:%d", ost->file_index, ost->index);
|
snprintf(name, sizeof(name), "out_%d_%d", ost->file_index, ost->index);
|
||||||
ret = avfilter_graph_create_filter(&ofilter->filter,
|
ret = avfilter_graph_create_filter(&ofilter->filter,
|
||||||
avfilter_get_by_name("abuffersink"),
|
avfilter_get_by_name("abuffersink"),
|
||||||
name, NULL, NULL, fg->graph);
|
name, NULL, NULL, fg->graph);
|
||||||
@@ -584,7 +584,7 @@ static int configure_output_audio_filter(FilterGraph *fg, OutputFilter *ofilter,
|
|||||||
av_freep(&sample_rates);
|
av_freep(&sample_rates);
|
||||||
av_freep(&channel_layouts);
|
av_freep(&channel_layouts);
|
||||||
|
|
||||||
snprintf(name, sizeof(name), "audio format for output stream %d:%d",
|
snprintf(name, sizeof(name), "format_out_%d_%d",
|
||||||
ost->file_index, ost->index);
|
ost->file_index, ost->index);
|
||||||
ret = avfilter_graph_create_filter(&format,
|
ret = avfilter_graph_create_filter(&format,
|
||||||
avfilter_get_by_name("aformat"),
|
avfilter_get_by_name("aformat"),
|
||||||
@@ -792,7 +792,7 @@ static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter,
|
|||||||
if (ist->framerate.num) {
|
if (ist->framerate.num) {
|
||||||
AVFilterContext *setpts;
|
AVFilterContext *setpts;
|
||||||
|
|
||||||
snprintf(name, sizeof(name), "force CFR for input from stream %d:%d",
|
snprintf(name, sizeof(name), "forcecfr_in_%d_%d",
|
||||||
ist->file_index, ist->st->index);
|
ist->file_index, ist->st->index);
|
||||||
if ((ret = avfilter_graph_create_filter(&setpts,
|
if ((ret = avfilter_graph_create_filter(&setpts,
|
||||||
avfilter_get_by_name("setpts"),
|
avfilter_get_by_name("setpts"),
|
||||||
@@ -809,7 +809,7 @@ static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter,
|
|||||||
if (do_deinterlace) {
|
if (do_deinterlace) {
|
||||||
AVFilterContext *yadif;
|
AVFilterContext *yadif;
|
||||||
|
|
||||||
snprintf(name, sizeof(name), "deinterlace input from stream %d:%d",
|
snprintf(name, sizeof(name), "deinterlace_in_%d_%d",
|
||||||
ist->file_index, ist->st->index);
|
ist->file_index, ist->st->index);
|
||||||
if ((ret = avfilter_graph_create_filter(&yadif,
|
if ((ret = avfilter_graph_create_filter(&yadif,
|
||||||
avfilter_get_by_name("yadif"),
|
avfilter_get_by_name("yadif"),
|
||||||
@@ -823,7 +823,7 @@ static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter,
|
|||||||
last_filter = yadif;
|
last_filter = yadif;
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(name, sizeof(name), "trim for input stream %d:%d",
|
snprintf(name, sizeof(name), "trim_in_%d_%d",
|
||||||
ist->file_index, ist->st->index);
|
ist->file_index, ist->st->index);
|
||||||
if (copy_ts) {
|
if (copy_ts) {
|
||||||
tsoffset = f->start_time == AV_NOPTS_VALUE ? 0 : f->start_time;
|
tsoffset = f->start_time == AV_NOPTS_VALUE ? 0 : f->start_time;
|
||||||
@@ -872,7 +872,7 @@ static int configure_input_audio_filter(FilterGraph *fg, InputFilter *ifilter,
|
|||||||
ifilter->channel_layout);
|
ifilter->channel_layout);
|
||||||
else
|
else
|
||||||
av_bprintf(&args, ":channels=%d", ifilter->channels);
|
av_bprintf(&args, ":channels=%d", ifilter->channels);
|
||||||
snprintf(name, sizeof(name), "graph %d input from stream %d:%d", fg->index,
|
snprintf(name, sizeof(name), "graph_%d_in_%d_%d", fg->index,
|
||||||
ist->file_index, ist->st->index);
|
ist->file_index, ist->st->index);
|
||||||
|
|
||||||
if ((ret = avfilter_graph_create_filter(&ifilter->filter, abuffer_filt,
|
if ((ret = avfilter_graph_create_filter(&ifilter->filter, abuffer_filt,
|
||||||
@@ -887,7 +887,7 @@ static int configure_input_audio_filter(FilterGraph *fg, InputFilter *ifilter,
|
|||||||
av_log(NULL, AV_LOG_INFO, opt_name " is forwarded to lavfi " \
|
av_log(NULL, AV_LOG_INFO, opt_name " is forwarded to lavfi " \
|
||||||
"similarly to -af " filter_name "=%s.\n", arg); \
|
"similarly to -af " filter_name "=%s.\n", arg); \
|
||||||
\
|
\
|
||||||
snprintf(name, sizeof(name), "graph %d %s for input stream %d:%d", \
|
snprintf(name, sizeof(name), "graph_%d_%s_in_%d_%d", \
|
||||||
fg->index, filter_name, ist->file_index, ist->st->index); \
|
fg->index, filter_name, ist->file_index, ist->st->index); \
|
||||||
ret = avfilter_graph_create_filter(&filt_ctx, \
|
ret = avfilter_graph_create_filter(&filt_ctx, \
|
||||||
avfilter_get_by_name(filter_name), \
|
avfilter_get_by_name(filter_name), \
|
||||||
|
@@ -528,7 +528,7 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx)
|
|||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(inst_name, sizeof(inst_name), "auto-inserted scaler %d",
|
snprintf(inst_name, sizeof(inst_name), "auto_scaler_%d",
|
||||||
scaler_count++);
|
scaler_count++);
|
||||||
|
|
||||||
if ((ret = avfilter_graph_create_filter(&convert, filter,
|
if ((ret = avfilter_graph_create_filter(&convert, filter,
|
||||||
@@ -543,7 +543,7 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx)
|
|||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(inst_name, sizeof(inst_name), "auto-inserted resampler %d",
|
snprintf(inst_name, sizeof(inst_name), "auto_resampler_%d",
|
||||||
resampler_count++);
|
resampler_count++);
|
||||||
scale_args[0] = '\0';
|
scale_args[0] = '\0';
|
||||||
if (graph->aresample_swr_opts)
|
if (graph->aresample_swr_opts)
|
||||||
@@ -1240,7 +1240,7 @@ static int graph_insert_fifos(AVFilterGraph *graph, AVClass *log_ctx)
|
|||||||
avfilter_get_by_name("fifo") :
|
avfilter_get_by_name("fifo") :
|
||||||
avfilter_get_by_name("afifo");
|
avfilter_get_by_name("afifo");
|
||||||
|
|
||||||
snprintf(name, sizeof(name), "auto-inserted fifo %d", fifo_count++);
|
snprintf(name, sizeof(name), "auto_fifo_%d", fifo_count++);
|
||||||
|
|
||||||
ret = avfilter_graph_create_filter(&fifo_ctx, fifo, name, NULL,
|
ret = avfilter_graph_create_filter(&fifo_ctx, fifo, name, NULL,
|
||||||
NULL, graph);
|
NULL, graph);
|
||||||
|
Reference in New Issue
Block a user