arduino-audio-tools
Loading...
Searching...
No Matches
ContainerAVI.h
Go to the documentation of this file.
1#pragma once
2#include <string.h>
8
9#define LIST_HEADER_SIZE 12
10#define CHUNK_HEADER_SIZE 8
11
12namespace audio_tools {
13
22public:
23 size_t writeArray(uint8_t *data, size_t len) {
24 int to_write = min(availableToWrite(), (size_t)len);
27 return to_write;
28 }
33 bool resize(size_t size) {
34 vector.resize(size + 4);
35 return vector.data() != nullptr;
36 }
37
38 uint8_t *data() { return vector.data(); }
39
41
42 size_t available() { return available_byte_count; }
43
44 void clear() {
46 memset(vector.data(), 0, vector.size());
47 }
48
49 bool isEmpty() { return available_byte_count == 0; }
50
51 size_t size() { return vector.size(); }
52
53 long indexOf(const char *str) {
55 strlen(str));
56 return ptr == nullptr ? -1l : ptr - vector.data();
57 }
58
59protected:
62};
63
66using FOURCC = char[4];
67
83
88
105
119
129
130// struct WAVFormat {
131// uint16_t wFormatTag;
132// uint16_t nChannels;
133// uint32_t nSamplesPerSec;
134// uint32_t nAvgBytesPerSec;
135// uint16_t nBlockAlign;
136// };
137
139
141
155
163public:
164 void set(size_t currentPos, StrView id, size_t size, ParseObjectType type) {
165 set(currentPos, id.c_str(), size, type);
166 }
167
168 void set(size_t currentPos, const char *id, size_t size,
171 data_size = size;
173 // allign on word
174 if (size % 2 != 0) {
175 data_size++;
176 }
178 // save FOURCC
179 if (id != nullptr) {
180 memcpy(chunk_id, id, 4);
181 chunk_id[4] = 0;
182 }
183 open = data_size;
184 }
185 const char *id() { return chunk_id; }
186 size_t size() { return data_size; }
187
189 bool isValid() {
190 switch (object_type) {
191 case AVIStreamData:
192 return isAudio() || isVideo();
193 case AVIChunk:
194 return open > 0;
195 case AVIList:
196 return true;
197 }
198 return false;
199 }
200
201 // for Chunk
202 AVIMainHeader *asAVIMainHeader(void *ptr) { return (AVIMainHeader *)ptr; }
204 return (AVIStreamHeader *)ptr;
205 }
206 WAVFormatX *asAVIAudioFormat(void *ptr) { return (WAVFormatX *)ptr; }
208 return (BitmapInfoHeader *)ptr;
209 }
210
211 size_t open;
212 size_t end_pos;
213 size_t start_pos;
214 size_t data_size;
215
216 // for AVIStreamData
218 return object_type == AVIStreamData ? (chunk_id[1] << 8) | chunk_id[0] : 0;
219 }
220 bool isAudio() {
221 return object_type == AVIStreamData
222 ? chunk_id[2] == 'w' && chunk_id[3] == 'b'
223 : false;
224 }
226 return object_type == AVIStreamData
227 ? chunk_id[2] == 'd' && chunk_id[3] == 'b'
228 : false;
229 }
231 return object_type == AVIStreamData
232 ? chunk_id[2] == 'd' && chunk_id[3] == 'c'
233 : false;
234 }
236
237protected:
238 // ParseBuffer data_buffer;
239 char chunk_id[5] = {};
241};
242
256public:
257 AVIDecoder(int bufferSize = 1024) {
258 parse_buffer.resize(bufferSize);
261 }
262
264 int bufferSize = 1024) {
265 parse_buffer.resize(bufferSize);
268 if (videoOut != nullptr) {
270 }
271 }
272
274 if (p_output_audio != nullptr)
275 delete p_output_audio;
276 }
277
278 bool begin() override {
280 header_is_avi = false;
281 is_parsing_active = true;
282 current_pos = 0;
283 header_is_avi = false;
285 is_metadata_ready = false;
286 return true;
287 }
288
290 virtual void setOutput(Print &out_stream) override {
291 // p_output_audio = &out_stream;
293 }
294
296 void setMute(bool mute) { is_mute = mute; }
297
301
302 virtual size_t write(const uint8_t *data, size_t len) override {
303 LOGD("write: %d", (int)len);
304 int result = parse_buffer.writeArray((uint8_t *)data, len);
305 if (is_parsing_active) {
306 // we expect the first parse to succeed
307 if (parse()) {
308 // if so we process the parse_buffer
309 while (parse_buffer.available() > 4) {
310 if (!parse())
311 break;
312 }
313 } else {
314 LOGD("Parse Error");
316 result = len;
317 is_parsing_active = false;
318 }
319 }
320 return result;
321 }
322
323 operator bool() override { return is_parsing_active; }
324
325 void end() override { is_parsing_active = false; };
326
329
332
335
336 const char *videoFormat() { return video_format; }
337
340
343
349 validation_cb = cb;
350 }
351
353 int videoSeconds() { return video_seconds; }
354
357
358protected:
359 bool header_is_avi = false;
360 bool is_parsing_active = true;
374 long current_pos = 0;
375 long movi_end_pos = 0;
378 char video_format[5] = {0};
379 bool is_metadata_ready = false;
381 bool is_mute = false;
387
389 return strncmp(stream_header[stream_header_idx].fccType, "auds", 4) == 0;
390 }
391
393 return strncmp(stream_header[stream_header_idx].fccType, "vids", 4) == 0;
394 }
395
396 // we return true if at least one parse step was successful
397 bool parse() {
398 bool result = true;
399 switch (parse_state) {
400 case ParseHeader: {
401 result = parseHeader();
402 if (result)
404 } break;
405
406 case ParseHdrl: {
407 ParseObject hdrl = parseList("hdrl");
408 result = hdrl.isValid();
409 if (result) {
411 }
412 } break;
413
414 case ParseAvih: {
415 ParseObject avih = parseChunk("avih");
416 result = avih.isValid();
417 if (result) {
418 main_header = *(avih.asAVIMainHeader(parse_buffer.data()));
420 consume(avih.size());
422 }
423 } break;
424
425 case ParseStrl: {
426 ParseObject strl = parseList("strl");
427 ParseObject strh = parseChunk("strh");
429 *(strh.asAVIStreamHeader(parse_buffer.data()));
430 consume(strh.size());
432 } break;
433
434 case ParseStrf: {
435 ParseObject strf = parseChunk("strf");
436 if (isCurrentStreamAudio()) {
437 audio_info = *(strf.asAVIAudioFormat(parse_buffer.data()));
439 LOGI("audioFormat: %d (%x)", (int)audioFormat(),(int)audioFormat());
441 consume(strf.size());
442 } else if (isCurrentStreamVideo()) {
443 video_info = *(strf.asAVIVideoFormat(parse_buffer.data()));
445 LOGI("videoFormat: %s", videoFormat());
447 video_format[4] = 0;
448 consume(strf.size());
449 } else {
450 result = false;
451 }
453 } break;
454
455 case AfterStrf: {
456 // ignore all data until we find a new List
457 int pos = parse_buffer.indexOf("LIST");
458 if (pos >= 0) {
459 consume(pos);
461 if (StrView(tmp.id()).equals("strl")) {
463 } else if (StrView(tmp.id()).equals("movi")) {
465 } else {
466 // e.g. ignore info
468 }
469 } else {
470 // no valid data, so throw it away, we keep the last 4 digits in case
471 // if it contains the beginning of a LIST
472 cleanupStack();
474 }
475 } break;
476
477 case ParseMovi: {
479 if (StrView(movi.id()).equals("movi")) {
481 is_metadata_ready = true;
482 if (validation_cb)
485 movi_end_pos = movi.end_pos;
487 // trigger new write
488 result = false;
489 }
490 } break;
491
492 case SubChunk: {
493 // rec is optinal
495 if (StrView(hdrl.id()).equals("rec")) {
498 }
499
504 LOGI("video:[%d]->[%d]", (int)current_stream_data.start_pos,
506 if (p_output_video != nullptr)
508 } else if (current_stream_data.isAudio()) {
509 LOGI("audio:[%d]->[%d]", (int)current_stream_data.start_pos,
511 } else {
512 LOGW("unknown subchunk at %d", (int)current_pos);
513 }
514
515 } break;
516
517 case SubChunkContinue: {
518 writeData();
519 if (open_subchunk_len == 0) {
520 if (current_stream_data.isVideo() && p_output_video != nullptr) {
523 }
524 if (tryParseChunk("idx").isValid()) {
526 } else if (tryParseList("rec").isValid()) {
528 } else {
529 if (current_pos >= movi_end_pos) {
531 } else {
533 }
534 }
535 }
536 } break;
537
538 case ParseIgnore: {
539 LOGD("ParseIgnore");
541 } break;
542
543 default:
544 result = false;
545 break;
546 }
547 return result;
548 }
549
554 info.logInfo();
555 // adjust the audio info if necessary
556 if (p_decoder != nullptr) {
559 }
561 }
562
566 if (vh->dwScale <= 0) {
567 vh->dwScale = 1;
568 }
569 int rate = vh->dwRate / vh->dwScale;
570 video_seconds = rate <= 0 ? 0 : vh->dwLength / rate;
571 LOGI("videoSeconds: %d seconds", video_seconds);
572 }
573
574 void writeData() {
577 LOGD("audio %d", (int)to_write);
578 if (!is_mute){
580 }
582 cleanupStack();
584 } else if (current_stream_data.isVideo()) {
585 LOGD("video %d", (int)to_write);
586 if (p_output_video != nullptr)
589 cleanupStack();
591 }
592 }
593
594 // 'RIFF' fileSize fileType (data)
595 bool parseHeader() {
596 bool header_is_avi = false;
597 int headerSize = 12;
598 if (getStr(0, 4).equals("RIFF")) {
599 ParseObject result;
601 header_is_avi = getStr(8, 4).equals("AVI ");
602 result.set(current_pos, "AVI ", header_file_size, AVIChunk);
603 processStack(result);
605
606 } else {
607 LOGE("parseHeader");
608 }
609 return header_is_avi;
610 }
611
615 ParseObject result;
616 result.set(current_pos, getStr(0, 4), 0, AVIChunk);
617 return result;
618 }
619
622 ParseObject tryParseChunk(const char *id) {
623 ParseObject result;
624 if (getStr(0, 4).equals(id)) {
625 result.set(current_pos, id, 0, AVIChunk);
626 }
627 return result;
628 }
629
630 ParseObject tryParseList(const char *id) {
631 ParseObject result;
632 StrView &list_id = getStr(8, 4);
633 if (list_id.equals(id) && getStr(0, 3).equals("LIST")) {
634 result.set(current_pos, getStr(8, 4), getInt(4), AVIList);
635 }
636 return result;
637 }
638
641 ParseObject result;
642 if (getStr(0, 4).equals("LIST")) {
643 result.set(current_pos, getStr(8, 4), getInt(4), AVIList);
644 }
645 return result;
646 }
647
649 ParseObject parseChunk(const char *id) {
650 ParseObject result;
651 int chunk_size = getInt(4);
652 if (getStr(0, 4).equals(id) && parse_buffer.size() >= chunk_size) {
653 result.set(current_pos, id, chunk_size, AVIChunk);
654 processStack(result);
656 }
657 return result;
658 }
659
661 ParseObject parseList(const char *id) {
662 ParseObject result;
663 if (getStr(0, 4).equals("LIST") && getStr(8, 4).equals(id)) {
664 int size = getInt(4);
665 result.set(current_pos, id, size, AVIList);
666 processStack(result);
668 }
669 return result;
670 }
671
673 ParseObject result;
674 int size = getInt(4);
675 result.set(current_pos, getStr(0, 4), size, AVIStreamData);
676 if (result.isValid()) {
677 processStack(result);
678 consume(8);
679 }
680 return result;
681 }
682
683 void processStack(ParseObject &result) {
684 cleanupStack();
685 object_stack.push(result);
686 spaces.setChars(' ', object_stack.size());
687 LOGD("%s - %s (%d-%d) size:%d", spaces.c_str(), result.id(),
688 (int)result.start_pos, (int)result.end_pos, (int)result.data_size);
689 }
690
693 // make sure that we remove the object from the stack of we past the end
694 object_stack.peek(current);
695 while (current.end_pos <= current_pos) {
697 object_stack.peek(current);
698 }
699 }
700
702 StrView &getStr(int offset, int len) {
703 str.setCapacity(len + 1);
704 const char *data = (const char *)parse_buffer.data();
705 str.copyFrom((data + offset), len, 5);
706
707 return str;
708 }
709
711 uint32_t getInt(int offset) {
712 uint32_t *result = (uint32_t *)(parse_buffer.data() + offset);
713 return *result;
714 }
715
717 void consume(int len) {
718 current_pos += len;
720 }
721};
722
723} // namespace audio_tools
WAV Audio Formats used by Microsoft e.g. in AVI video files.
#define LOGW(...)
Definition AudioLoggerIDF.h:29
#define LOGI(...)
Definition AudioLoggerIDF.h:28
#define LOGD(...)
Definition AudioLoggerIDF.h:27
#define LOGE(...)
Definition AudioLoggerIDF.h:30
#define LIST_HEADER_SIZE
Definition ContainerAVI.h:9
#define CHUNK_HEADER_SIZE
Definition ContainerAVI.h:10
Definition Arduino.h:56
AVI Container Decoder which can be fed with small chunks of data. The minimum length must be bigger t...
Definition ContainerAVI.h:255
virtual size_t write(const uint8_t *data, size_t len) override
Definition ContainerAVI.h:302
BitmapInfoHeader video_info
Definition ContainerAVI.h:366
VideoOutput * p_output_video
Definition ContainerAVI.h:372
void setupVideoInfo()
Definition ContainerAVI.h:563
bool parse()
Definition ContainerAVI.h:397
StrView & getStr(int offset, int len)
Provides the string at the indicated byte offset with the indicated length.
Definition ContainerAVI.h:702
void setMute(bool mute)
Definition ContainerAVI.h:296
ParseObject parseList(const char *id)
We load the indicated list from the current data.
Definition ContainerAVI.h:661
Str str
Definition ContainerAVI.h:377
AVIMainHeader main_header
Definition ContainerAVI.h:363
long current_pos
Definition ContainerAVI.h:374
ParseObject current_stream_data
Definition ContainerAVI.h:370
void setVideoAudioSync(VideoAudioSync *yourSync)
Replace the synchronization logic with your implementation.
Definition ContainerAVI.h:356
void setupAudioInfo()
Definition ContainerAVI.h:550
ParseObject parseChunk(const char *id)
We load the indicated chunk from the current data.
Definition ContainerAVI.h:649
WAVFormatX audio_info
Definition ContainerAVI.h:367
VideoAudioSync * p_synch
Definition ContainerAVI.h:386
AudioFormat audioFormat()
Provides the audio_info.wFormatTag.
Definition ContainerAVI.h:342
bool(* validation_cb)(AVIDecoder &avi)
Definition ContainerAVI.h:380
AVIMainHeader mainHeader()
Provides the information from the main header chunk.
Definition ContainerAVI.h:328
void end() override
Definition ContainerAVI.h:325
long open_subchunk_len
Definition ContainerAVI.h:373
int videoSeconds()
Provide the length of the video in seconds.
Definition ContainerAVI.h:353
ParseObject tryParseList(const char *id)
Definition ContainerAVI.h:630
bool is_parsing_active
Definition ContainerAVI.h:360
bool is_mute
Definition ContainerAVI.h:381
bool is_metadata_ready
Definition ContainerAVI.h:379
uint32_t getInt(int offset)
Provides the int32 at the indicated byte offset.
Definition ContainerAVI.h:711
char video_format[5]
Definition ContainerAVI.h:378
virtual void setOutputVideoStream(VideoOutput &out_stream)
Definition ContainerAVI.h:298
AudioDecoder * p_decoder
Definition ContainerAVI.h:383
AVIDecoder(int bufferSize=1024)
Definition ContainerAVI.h:257
int stream_header_idx
Definition ContainerAVI.h:364
ParseObject tryParseList()
We try to parse the actual state for any list.
Definition ContainerAVI.h:640
~AVIDecoder()
Definition ContainerAVI.h:273
Stack< ParseObject > object_stack
Definition ContainerAVI.h:369
long movi_end_pos
Definition ContainerAVI.h:375
void cleanupStack()
Definition ContainerAVI.h:691
Vector< AVIStreamHeader > stream_header
Definition ContainerAVI.h:365
bool isMetadataReady()
Returns true if all metadata has been parsed and is available.
Definition ContainerAVI.h:345
ParseObject parseAVIStreamData()
Definition ContainerAVI.h:672
EncodedAudioOutput * p_output_audio
Definition ContainerAVI.h:371
Str spaces
Definition ContainerAVI.h:376
bool isCurrentStreamAudio()
Definition ContainerAVI.h:388
BitmapInfoHeader aviVideoInfo()
Provides the video information.
Definition ContainerAVI.h:334
CopyDecoder copy_decoder
Definition ContainerAVI.h:382
void consume(int len)
We remove the processed bytes from the beginning of the buffer.
Definition ContainerAVI.h:717
int video_seconds
Definition ContainerAVI.h:384
bool begin() override
Definition ContainerAVI.h:278
bool isCurrentStreamVideo()
Definition ContainerAVI.h:392
virtual void setOutput(Print &out_stream) override
Defines the audio output stream - usually called by EncodedAudioStream.
Definition ContainerAVI.h:290
void writeData()
Definition ContainerAVI.h:574
const char * videoFormat()
Definition ContainerAVI.h:336
Vector< StreamContentType > content_types
Definition ContainerAVI.h:368
bool header_is_avi
Definition ContainerAVI.h:359
bool parseHeader()
Definition ContainerAVI.h:595
ParseObject tryParseChunk()
Definition ContainerAVI.h:614
AVIDecoder(AudioDecoder *audioDecoder, VideoOutput *videoOut=nullptr, int bufferSize=1024)
Definition ContainerAVI.h:263
ParseBuffer parse_buffer
Definition ContainerAVI.h:362
void setValidationCallback(bool(*cb)(AVIDecoder &avi))
Definition ContainerAVI.h:348
WAVFormatX aviAudioInfo()
Provides the audio information.
Definition ContainerAVI.h:339
VideoAudioSync defaultSynch
Definition ContainerAVI.h:385
AVIStreamHeader streamHeader(int idx)
Provides the information from the stream header chunks.
Definition ContainerAVI.h:331
ParseObject tryParseChunk(const char *id)
Definition ContainerAVI.h:622
ParseState parse_state
Definition ContainerAVI.h:361
void processStack(ParseObject &result)
Definition ContainerAVI.h:683
Decoding of encoded audio into PCM data.
Definition AudioCodecsBase.h:18
AudioInfo info
Definition AudioCodecsBase.h:76
void setAudioInfo(AudioInfo from) override
for most decoders this is not needed
Definition AudioCodecsBase.h:28
AudioInfo audioInfo() override
provides the actual input AudioInfo
Definition AudioCodecsBase.h:25
void notifyAudioChange(AudioInfo info)
Definition AudioTypes.h:174
Parent class for all container formats.
Definition AudioCodecsBase.h:86
Dummy Decoder which just copies the provided data to the output. You can define if it is PCM data.
Definition CodecCopy.h:18
A more natural Print class to process encoded data (aac, wav, mp3...). Just define the output and the...
Definition AudioEncoded.h:21
void setOutput(Print *outputStream)
Defines the output.
Definition AudioEncoded.h:107
We try to keep the necessary buffer for parsing as small as possible, The data() method provides the ...
Definition ContainerAVI.h:21
Vector< uint8_t > vector
Definition ContainerAVI.h:60
size_t size()
Definition ContainerAVI.h:51
size_t writeArray(uint8_t *data, size_t len)
Definition ContainerAVI.h:23
size_t availableToWrite()
Definition ContainerAVI.h:40
size_t available_byte_count
Definition ContainerAVI.h:61
void consume(int size)
Definition ContainerAVI.h:29
size_t available()
Definition ContainerAVI.h:42
uint8_t * data()
Definition ContainerAVI.h:38
long indexOf(const char *str)
Definition ContainerAVI.h:53
void clear()
Definition ContainerAVI.h:44
bool resize(size_t size)
Definition ContainerAVI.h:33
bool isEmpty()
Definition ContainerAVI.h:49
Represents a LIST or a CHUNK: The ParseObject represents the current parsing result....
Definition ContainerAVI.h:162
size_t size()
Definition ContainerAVI.h:186
bool isVideo()
Definition ContainerAVI.h:235
size_t open
Definition ContainerAVI.h:211
size_t end_pos
Definition ContainerAVI.h:212
WAVFormatX * asAVIAudioFormat(void *ptr)
Definition ContainerAVI.h:206
size_t start_pos
Definition ContainerAVI.h:213
ParseObjectType type()
Definition ContainerAVI.h:188
bool isVideoCompressed()
Definition ContainerAVI.h:230
void set(size_t currentPos, const char *id, size_t size, ParseObjectType type)
Definition ContainerAVI.h:168
char chunk_id[5]
Definition ContainerAVI.h:239
ParseObjectType object_type
Definition ContainerAVI.h:240
BitmapInfoHeader * asAVIVideoFormat(void *ptr)
Definition ContainerAVI.h:207
void set(size_t currentPos, StrView id, size_t size, ParseObjectType type)
Definition ContainerAVI.h:164
int streamNumber()
Definition ContainerAVI.h:217
AVIMainHeader * asAVIMainHeader(void *ptr)
Definition ContainerAVI.h:202
bool isVideoUncompressed()
Definition ContainerAVI.h:225
size_t data_size
Definition ContainerAVI.h:214
bool isAudio()
Definition ContainerAVI.h:220
AVIStreamHeader * asAVIStreamHeader(void *ptr)
Definition ContainerAVI.h:203
const char * id()
Definition ContainerAVI.h:185
bool isValid()
Definition ContainerAVI.h:189
LIFO Stack which is based on a List.
Definition Stack.h:14
Str which keeps the data on the heap. We grow the allocated memory only if the copy source is not fit...
Definition Str.h:24
void copyFrom(const char *source, int len, int maxlen=0)
assigns a memory buffer
Definition Str.h:96
void setCapacity(size_t newLen)
Definition Str.h:86
void setChars(char c, int len)
Fills the string with len chars.
Definition Str.h:108
A simple wrapper to provide string functions on existing allocated char*. If the underlying char* is ...
Definition StrView.h:28
virtual bool equals(const char *str)
checks if the string equals indicated parameter string
Definition StrView.h:165
virtual const char * c_str()
provides the string value as const char*
Definition StrView.h:380
Vector implementation which provides the most important methods as defined by std::vector....
Definition Vector.h:21
void push_back(T &&value)
Definition Vector.h:182
bool resize(size_t newSize, T value)
Definition Vector.h:266
T * data()
Definition Vector.h:316
int size()
Definition Vector.h:178
Logic to Synchronize video and audio output: This is the minimum implementatin which actually does no...
Definition Video.h:37
virtual void delayVideoFrame(int32_t microsecondsPerFrame, uint32_t time_used_ms)
Definition Video.h:46
virtual void writeAudio(Print *out, uint8_t *data, size_t size)
Process the audio data.
Definition Video.h:40
Abstract class for video playback. This class is used to assemble a complete video frame in memory.
Definition Video.h:21
virtual size_t write(const uint8_t *data, size_t len)=0
virtual uint32_t endFrame()=0
virtual void beginFrame(size_t size)=0
char[4] FOURCC
Four-character code identifier for AVI format.
Definition ContainerAVI.h:66
AudioFormat
Audio format codes used by Microsoft e.g. in avi or wav files.
Definition AudioFormat.h:19
Generic Implementation of sound input and output for desktop environments using portaudio.
Definition AudioCodecsBase.h:10
StreamContentType
Definition ContainerAVI.h:138
@ Audio
Definition ContainerAVI.h:138
@ Video
Definition ContainerAVI.h:138
ParseObjectType
Definition ContainerAVI.h:140
@ AVIChunk
Definition ContainerAVI.h:140
@ AVIList
Definition ContainerAVI.h:140
@ AVIStreamData
Definition ContainerAVI.h:140
ParseState
Definition ContainerAVI.h:142
@ ParseStrl
Definition ContainerAVI.h:146
@ ParseStrf
Definition ContainerAVI.h:150
@ AfterStrf
Definition ContainerAVI.h:151
@ SubChunkContinue
Definition ContainerAVI.h:147
@ ParseMovi
Definition ContainerAVI.h:152
@ SubChunk
Definition ContainerAVI.h:148
@ ParseRec
Definition ContainerAVI.h:149
@ ParseHdrl
Definition ContainerAVI.h:144
@ ParseHeader
Definition ContainerAVI.h:143
@ ParseIgnore
Definition ContainerAVI.h:153
@ ParseAvih
Definition ContainerAVI.h:145
size_t writeData(Print *p_out, T *data, int samples, int maxSamples=512)
Definition AudioTypes.h:508
Definition ContainerAVI.h:68
uint32_t dwStreams
Definition ContainerAVI.h:77
uint32_t dwInitialFrames
Definition ContainerAVI.h:76
uint32_t dwMaxBytesPerSec
Definition ContainerAVI.h:72
uint32_t dwHeight
Definition ContainerAVI.h:80
uint32_t dwReserved[4]
Definition ContainerAVI.h:81
uint32_t dwFlags
Definition ContainerAVI.h:74
uint32_t dwPaddingGranularity
Definition ContainerAVI.h:73
uint32_t dwMicroSecPerFrame
Definition ContainerAVI.h:71
uint32_t dwSuggestedBufferSize
Definition ContainerAVI.h:78
uint32_t dwWidth
Definition ContainerAVI.h:79
uint32_t dwTotalFrames
Definition ContainerAVI.h:75
Definition ContainerAVI.h:89
uint32_t dwSampleSize
Definition ContainerAVI.h:102
uint32_t dwLength
Definition ContainerAVI.h:99
uint32_t dwInitialFrames
Definition ContainerAVI.h:95
uint16_t wPriority
Definition ContainerAVI.h:93
uint16_t wLanguage
Definition ContainerAVI.h:94
FOURCC fccType
Definition ContainerAVI.h:90
uint32_t dwScale
Definition ContainerAVI.h:96
FOURCC fccHandler
Definition ContainerAVI.h:91
uint32_t dwFlags
Definition ContainerAVI.h:92
uint32_t dwStart
Definition ContainerAVI.h:98
uint32_t dwQuality
Definition ContainerAVI.h:101
RECT rcFrame
Definition ContainerAVI.h:103
uint32_t dwRate
Definition ContainerAVI.h:97
uint32_t dwSuggestedBufferSize
Definition ContainerAVI.h:100
sample_rate_t sample_rate
Sample Rate: e.g 44100.
Definition AudioTypes.h:53
uint16_t channels
Number of channels: 2=stereo, 1=mono.
Definition AudioTypes.h:55
uint8_t bits_per_sample
Number of bits per sample (int16_t = 16 bits)
Definition AudioTypes.h:57
virtual void logInfo(const char *source="")
Definition AudioTypes.h:121
Definition ContainerAVI.h:106
uint32_t biSizeImage
Definition ContainerAVI.h:113
uint32_t biCompression
Definition ContainerAVI.h:112
uint16_t biBitCount
Definition ContainerAVI.h:111
uint32_t biClrImportant
Definition ContainerAVI.h:117
uint32_t biSize
Definition ContainerAVI.h:107
uint16_t biPlanes
Definition ContainerAVI.h:110
uint32_t biClrUsed
Definition ContainerAVI.h:116
uint64_t biWidth
Definition ContainerAVI.h:108
uint64_t biXPelsPerMeter
Definition ContainerAVI.h:114
uint64_t biYPelsPerMeter
Definition ContainerAVI.h:115
uint64_t biHeight
Definition ContainerAVI.h:109
Definition ContainerAVI.h:84
uint32_t dwHeight
Definition ContainerAVI.h:86
uint32_t dwWidth
Definition ContainerAVI.h:85
Definition ContainerAVI.h:120
uint16_t wBitsPerSample
Definition ContainerAVI.h:126
uint16_t nChannels
Definition ContainerAVI.h:122
uint16_t nBlockAlign
Definition ContainerAVI.h:125
uint32_t nSamplesPerSec
Definition ContainerAVI.h:123
uint32_t nAvgBytesPerSec
Definition ContainerAVI.h:124
uint16_t cbSize
Definition ContainerAVI.h:127
AudioFormat wFormatTag
Definition ContainerAVI.h:121