11#define ERROR_FMT_CHANGE "- Invalid ADTS change: %s"
12#define ERROR_FMT "- Invalid ADTS: %s (0x%x)"
60 (((
unsigned int)hdr[4]) << 3) | (hdr[5] >> 5);
64 LOGD(
"id:%d layer:%d profile:%d freq:%d channel:%d frame_length:%d",
76 LOGI(
"%s id:%d layer:%d profile:%d freq:%d channel:%d frame_length:%d",
94 for (
int i = start; i < nBytes - 1; i++) {
104 32000, 24000, 22050, 16000, 12000,
162 strcat(msg,
"layer ");
166 strcat(msg,
"profile ");
170 strcat(msg,
"freq ");
174 strcat(msg,
"channel ");
178 strcat(msg,
"fullness");
204 const char *
mime()
override {
return "audio/aac"; }
221 size_t write(
const uint8_t *data,
size_t len)
override {
222 LOGI(
"AACDecoderADTS::write: %d", (
int)len);
235 operator bool()
override {
return true; }
291 LOGI(
"Cleared %d bytes", syncPos);
310 LOGI(
"Invalid ADTS header");
324 LOGI(
"writeDataBuffered: %d", (
int)size);
325 for (
int j = 0; j < size; j++) {
336 LOGI(
"writeData: %d", (
int)size);
338 size_t len = audio_tools::writeData<uint8_t>(
p_print, data, size);
340 return (len == size);
343 LOGI(
"write to decoder: %d", (
int)size);
344 size_t len = audio_tools::writeDataT<uint8_t, AudioDecoder>(
p_dec, data, size);
346 return (len == size);
#define LOGW(...)
Definition AudioLoggerIDF.h:29
#define TRACED()
Definition AudioLoggerIDF.h:31
#define LOGI(...)
Definition AudioLoggerIDF.h:28
#define LOGD(...)
Definition AudioLoggerIDF.h:27
#define ERROR_FMT_CHANGE
Definition CodecADTS.h:11
#define SYNCWORDL
Definition CodecADTS.h:8
#define SYNCWORDH
Definition CodecADTS.h:7
#define ERROR_FMT
Definition CodecADTS.h:12
#define DEFAULT_BUFFER_SIZE
Definition avr.h:20
#define assert(T)
Definition avr.h:10