mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
ffprobe: convert to new channel layout-API
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
987763ac35
commit
a8b885f294
@ -2531,12 +2531,10 @@ static void show_frame(WriterContext *w, AVFrame *frame, AVStream *stream,
|
|||||||
if (s) print_str ("sample_fmt", s);
|
if (s) print_str ("sample_fmt", s);
|
||||||
else print_str_opt("sample_fmt", "unknown");
|
else print_str_opt("sample_fmt", "unknown");
|
||||||
print_int("nb_samples", frame->nb_samples);
|
print_int("nb_samples", frame->nb_samples);
|
||||||
print_int("channels", frame->channels);
|
print_int("channels", frame->ch_layout.nb_channels);
|
||||||
if (frame->channel_layout) {
|
if (frame->ch_layout.order != AV_CHANNEL_ORDER_UNSPEC) {
|
||||||
av_bprint_clear(&pbuf);
|
av_channel_layout_describe(&frame->ch_layout, val_str, sizeof(val_str));
|
||||||
av_bprint_channel_layout(&pbuf, frame->channels,
|
print_str ("channel_layout", val_str);
|
||||||
frame->channel_layout);
|
|
||||||
print_str ("channel_layout", pbuf.str);
|
|
||||||
} else
|
} else
|
||||||
print_str_opt("channel_layout", "unknown");
|
print_str_opt("channel_layout", "unknown");
|
||||||
break;
|
break;
|
||||||
@ -2948,12 +2946,11 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id
|
|||||||
if (s) print_str ("sample_fmt", s);
|
if (s) print_str ("sample_fmt", s);
|
||||||
else print_str_opt("sample_fmt", "unknown");
|
else print_str_opt("sample_fmt", "unknown");
|
||||||
print_val("sample_rate", par->sample_rate, unit_hertz_str);
|
print_val("sample_rate", par->sample_rate, unit_hertz_str);
|
||||||
print_int("channels", par->channels);
|
print_int("channels", par->ch_layout.nb_channels);
|
||||||
|
|
||||||
if (par->channel_layout) {
|
if (par->ch_layout.order != AV_CHANNEL_ORDER_UNSPEC) {
|
||||||
av_bprint_clear(&pbuf);
|
av_channel_layout_describe(&par->ch_layout, val_str, sizeof(val_str));
|
||||||
av_bprint_channel_layout(&pbuf, par->channels, par->channel_layout);
|
print_str ("channel_layout", val_str);
|
||||||
print_str ("channel_layout", pbuf.str);
|
|
||||||
} else {
|
} else {
|
||||||
print_str_opt("channel_layout", "unknown");
|
print_str_opt("channel_layout", "unknown");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user