diff options
author | Andrzej Kaczmarek <andrzej.kaczmarek@tieto.com> | 2014-05-26 15:16:45 +0200 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2014-05-27 17:57:25 +0300 |
commit | d7d11d074ff0ae9ccb38f347c89e737c103f3d19 (patch) | |
tree | 4517bc65a5dc62a8eacdbdc83351c4eb7699ede7 /tools/avinfo.c | |
parent | a238e3b108c9bebc3d0a321f816ab205d0048cf1 (diff) | |
download | bluez-d7d11d074ff0ae9ccb38f347c89e737c103f3d19.tar.gz |
tools/avinfo: Decode MPEG-2,4 AAC codec capabilities
Diffstat (limited to 'tools/avinfo.c')
-rw-r--r-- | tools/avinfo.c | 52 |
1 files changed, 50 insertions, 2 deletions
diff --git a/tools/avinfo.c b/tools/avinfo.c index e7747db35..7e9dfd1a1 100644 --- a/tools/avinfo.c +++ b/tools/avinfo.c @@ -168,9 +168,57 @@ static void print_vendor(a2dp_vendor_codec_t *vendor) btohs(vendor->codec_id)); } -static void print_mpeg24(a2dp_mpeg_t *mpeg) +static void print_mpeg24(a2dp_aac_t *aac) { - printf("\tMedia Codec: MPEG24\n"); + unsigned freq = AAC_GET_FREQUENCY(*aac); + unsigned bitrate = AAC_GET_BITRATE(*aac); + + printf("\tMedia Codec: MPEG24\n\t\tObject Types: "); + + if (aac->object_type & AAC_OBJECT_TYPE_MPEG2_AAC_LC) + printf("MPEG-2 AAC LC "); + if (aac->object_type & AAC_OBJECT_TYPE_MPEG4_AAC_LC) + printf("MPEG-4 AAC LC "); + if (aac->object_type & AAC_OBJECT_TYPE_MPEG4_AAC_LTP) + printf("MPEG-4 AAC LTP "); + if (aac->object_type & AAC_OBJECT_TYPE_MPEG4_AAC_SCA) + printf("MPEG-4 AAC scalable "); + + printf("\n\t\tFrequencies: "); + if (freq & AAC_SAMPLING_FREQ_8000) + printf("8kHz "); + if (freq & AAC_SAMPLING_FREQ_11025) + printf("11.025kHz "); + if (freq & AAC_SAMPLING_FREQ_12000) + printf("12kHz "); + if (freq & AAC_SAMPLING_FREQ_16000) + printf("16kHz "); + if (freq & AAC_SAMPLING_FREQ_22050) + printf("22.05kHz "); + if (freq & AAC_SAMPLING_FREQ_24000) + printf("24kHz "); + if (freq & AAC_SAMPLING_FREQ_32000) + printf("32kHz "); + if (freq & AAC_SAMPLING_FREQ_44100) + printf("44.1kHz "); + if (freq & AAC_SAMPLING_FREQ_48000) + printf("48kHz "); + if (freq & AAC_SAMPLING_FREQ_64000) + printf("64kHz "); + if (freq & AAC_SAMPLING_FREQ_88200) + printf("88.2kHz "); + if (freq & AAC_SAMPLING_FREQ_96000) + printf("96kHz "); + + printf("\n\t\tChannels: "); + if (aac->channels & AAC_CHANNELS_1) + printf("1 "); + if (aac->channels & AAC_CHANNELS_2) + printf("2 "); + + printf("\n\t\tBitrate: %u", bitrate); + + printf("\n\t\tVBR: %s", aac->vbr ? "Yes\n" : "No\n"); } static void print_mpeg12(a2dp_mpeg_t *mpeg) |