summaryrefslogtreecommitdiff
path: root/plugins/aac/aac_parser.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-07-04 19:02:48 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-07-04 19:02:48 +0200
commita1bc3f3c2e60af892c12ed53cb6c2cd1f93a5bec (patch)
tree282b7d13584586db74943fac5d7fd6850f97c38d /plugins/aac/aac_parser.c
parent3879ce9a2def4c6fd6247338e8583e09cd3da48b (diff)
added streaming support to aac plugin
Diffstat (limited to 'plugins/aac/aac_parser.c')
-rw-r--r--plugins/aac/aac_parser.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/plugins/aac/aac_parser.c b/plugins/aac/aac_parser.c
index 32571aff..a09eca84 100644
--- a/plugins/aac/aac_parser.c
+++ b/plugins/aac/aac_parser.c
@@ -56,20 +56,20 @@ aac_sync(const uint8_t *buf, int *channels, int *sample_rate, int *bit_rate, int
int profile_objecttype = (buf[2] & 0xC0) >> 6;
- //const char *profiles[4] = {
- // "0 Main profile AAC MAIN",
- // "1 Low Complexity profile (LC)AAC LC",
- // "2 Scalable Sample Rate profile (SSR)AAC SSR",
- // "3 (reserved)AAC LTP"
- //};
- //trace ("profile: %s\n", profiles[profile_objecttype]);
+ const char *profiles[4] = {
+ "0 Main profile AAC MAIN",
+ "1 Low Complexity profile (LC)AAC LC",
+ "2 Scalable Sample Rate profile (SSR)AAC SSR",
+ "3 (reserved)AAC LTP"
+ };
+ trace ("profile: %s\n", profiles[profile_objecttype]);
int sample_freq_index = (buf[2] & 0x3C) >> 2;
if (!aac_sample_rates[sample_freq_index]) {
//trace ("invalid samplerate\n");
return 0;
}
- //trace ("samplerate %d (#%d)\n", aac_sample_rates[sample_freq_index], sample_freq_index);
+ trace ("samplerate %d (#%d)\n", aac_sample_rates[sample_freq_index], sample_freq_index);
int private_bit = (buf[2] & 0x02) >> 1;
int channel_conf = ((buf[2] & 0x01) << 2) | ((buf[3] & 0xC0) >> 6);
@@ -77,7 +77,7 @@ aac_sync(const uint8_t *buf, int *channels, int *sample_rate, int *bit_rate, int
//trace ("invalid channels\n");
return 0;
}
- //trace ("channels %d\n", aac_channels[channel_conf]);
+ trace ("channels %d\n", aac_channels[channel_conf]);
int orig_copy = (buf[3] & 0x20) >> 5;
int home = (buf[3] & 0x10) >> 4;
int copyright_ident_bit = (buf[3] & 0x08) >> 3;
@@ -89,6 +89,7 @@ aac_sync(const uint8_t *buf, int *channels, int *sample_rate, int *bit_rate, int
}
int adts_buffer_fullness = ((buf[5] & 0x1F) << 3) | ((buf[6] & 0xFC) >> 2);
rdb = buf[7] & 0x03;
+ trace ("rdb: %d\n", rdb);
*channels = aac_channels[channel_conf];
*sample_rate = aac_sample_rates[sample_freq_index];