mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
swr-test: print channel layout, instead of just channel counts
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
e6c460e3ea
commit
5347b9da98
@ -181,6 +181,8 @@ int main(int argc, char **argv){
|
||||
qsort(remaining_tests + max_tests - num_tests, num_tests, sizeof(remaining_tests[0]), cmp);
|
||||
in_sample_rate=16000;
|
||||
for(test=0; test<num_tests; test++){
|
||||
char in_layout_string[256];
|
||||
char out_layout_string[256];
|
||||
unsigned vector= remaining_tests[max_tests - test - 1];
|
||||
|
||||
in_ch_layout = layouts[vector % FF_ARRAY_ELEMS(layouts)]; vector /= FF_ARRAY_ELEMS(layouts);
|
||||
@ -194,8 +196,10 @@ int main(int argc, char **argv){
|
||||
in_ch_count= av_get_channel_layout_nb_channels(in_ch_layout);
|
||||
int out_count, mid_count, out_ch_count;
|
||||
out_ch_count= av_get_channel_layout_nb_channels(out_ch_layout);
|
||||
fprintf(stderr, "ch %d->%d, rate:%5d->%5d, fmt:%s->%s\n",
|
||||
in_ch_count, out_ch_count,
|
||||
av_get_channel_layout_string( in_layout_string, sizeof( in_layout_string), in_ch_count, in_ch_layout);
|
||||
av_get_channel_layout_string(out_layout_string, sizeof(out_layout_string), out_ch_count, out_ch_layout);
|
||||
fprintf(stderr, "TEST: %s->%s, rate:%5d->%5d, fmt:%s->%s\n",
|
||||
in_layout_string, out_layout_string,
|
||||
in_sample_rate, out_sample_rate,
|
||||
av_get_sample_fmt_name(in_sample_fmt), av_get_sample_fmt_name(out_sample_fmt));
|
||||
forw_ctx = swr_alloc_set_opts(forw_ctx, out_ch_layout, av_get_alt_sample_fmt(out_sample_fmt, 1), out_sample_rate,
|
||||
|
Loading…
Reference in New Issue
Block a user