summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-04-29 22:39:58 +0200
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>2015-05-07 10:41:15 +0900
commit8bcd9ea67169a2ba9afd016648f47631717addff (patch)
tree2e6653de3f0cc78a0fe604b2bfdd044257cd8cc7
parente37fae4f9e84ba890176102075147165c9d967fa (diff)
downloadmpv-8bcd9ea67169a2ba9afd016648f47631717addff.tar.bz2
mpv-8bcd9ea67169a2ba9afd016648f47631717addff.tar.xz
ao_coreaudio_utils: log mp format with CoreAudio format description
As a consequence, it also logs whether mpv can a this format at all. (cherry picked from commit 34a5229b231f15c95876fed472bd1edc5283db31)
-rw-r--r--audio/out/ao_coreaudio_utils.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/audio/out/ao_coreaudio_utils.c b/audio/out/ao_coreaudio_utils.c
index 85437c0b55..21ffbf0dc8 100644
--- a/audio/out/ao_coreaudio_utils.c
+++ b/audio/out/ao_coreaudio_utils.c
@@ -247,12 +247,13 @@ void ca_print_asbd(struct ao *ao, const char *description,
{
uint32_t flags = asbd->mFormatFlags;
char *format = fourcc_repr(NULL, asbd->mFormatID);
+ int mpfmt = ca_asbd_to_mp_format(asbd);
MP_VERBOSE(ao,
"%s %7.1fHz %" PRIu32 "bit %s "
"[%" PRIu32 "][%" PRIu32 "bpp][%" PRIu32 "fbp]"
"[%" PRIu32 "bpf][%" PRIu32 "ch] "
- "%s %s %s%s%s%s\n",
+ "%s %s %s%s%s%s (%s)\n",
description, asbd->mSampleRate, asbd->mBitsPerChannel, format,
asbd->mFormatFlags, asbd->mBytesPerPacket, asbd->mFramesPerPacket,
asbd->mBytesPerFrame, asbd->mChannelsPerFrame,
@@ -261,7 +262,8 @@ void ca_print_asbd(struct ao *ao, const char *description,
(flags & kAudioFormatFlagIsSignedInteger) ? "S" : "U",
(flags & kAudioFormatFlagIsPacked) ? " packed" : "",
(flags & kAudioFormatFlagIsAlignedHigh) ? " aligned" : "",
- (flags & kAudioFormatFlagIsNonInterleaved) ? " P" : "");
+ (flags & kAudioFormatFlagIsNonInterleaved) ? " P" : "",
+ mpfmt ? af_fmt_to_str(mpfmt) : "unusable");
talloc_free(format);
}