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 void resize(int size) { vector.resize(size + 4); }
34
35 uint8_t *data() { return vector.data(); }
36
38
39 size_t available() { return available_byte_count; }
40
41 void clear() {
43 memset(vector.data(), 0, vector.size());
44 }
45
46 bool isEmpty() { return available_byte_count == 0; }
47
48 size_t size() { return vector.size(); }
49
50 long indexOf(const char *str) {
52 strlen(str));
53 return ptr == nullptr ? -1l : ptr - vector.data();
54 }
55
56protected:
59};
60
63using FOURCC = char[4];
64
80
85
102
116
126
127// struct WAVFormat {
128// uint16_t wFormatTag;
129// uint16_t nChannels;
130// uint32_t nSamplesPerSec;
131// uint32_t nAvgBytesPerSec;
132// uint16_t nBlockAlign;
133// };
134
136
138
152
160public:
161 void set(size_t currentPos, StrView id, size_t size, ParseObjectType type) {
162 set(currentPos, id.c_str(), size, type);
163 }
164
165 void set(size_t currentPos, const char *id, size_t size,
168 data_size = size;
170 // allign on word
171 if (size % 2 != 0) {
172 data_size++;
173 }
175 // save FOURCC
176 if (id != nullptr) {
177 memcpy(chunk_id, id, 4);
178 chunk_id[4] = 0;
179 }
180 open = data_size;
181 }
182 const char *id() { return chunk_id; }
183 size_t size() { return data_size; }
184
186 bool isValid() {
187 switch (object_type) {
188 case AVIStreamData:
189 return isAudio() || isVideo();
190 case AVIChunk:
191 return open > 0;
192 case AVIList:
193 return true;
194 }
195 return false;
196 }
197
198 // for Chunk
199 AVIMainHeader *asAVIMainHeader(void *ptr) { return (AVIMainHeader *)ptr; }
201 return (AVIStreamHeader *)ptr;
202 }
203 WAVFormatX *asAVIAudioFormat(void *ptr) { return (WAVFormatX *)ptr; }
205 return (BitmapInfoHeader *)ptr;
206 }
207
208 size_t open;
209 size_t end_pos;
210 size_t start_pos;
211 size_t data_size;
212
213 // for AVIStreamData
215 return object_type == AVIStreamData ? (chunk_id[1] << 8) | chunk_id[0] : 0;
216 }
217 bool isAudio() {
218 return object_type == AVIStreamData
219 ? chunk_id[2] == 'w' && chunk_id[3] == 'b'
220 : false;
221 }
223 return object_type == AVIStreamData
224 ? chunk_id[2] == 'd' && chunk_id[3] == 'b'
225 : false;
226 }
228 return object_type == AVIStreamData
229 ? chunk_id[2] == 'd' && chunk_id[3] == 'c'
230 : false;
231 }
233
234protected:
235 // ParseBuffer data_buffer;
236 char chunk_id[5] = {};
238};
239
253public:
254 AVIDecoder(int bufferSize = 1024) {
255 parse_buffer.resize(bufferSize);
258 }
259
261 int bufferSize = 1024) {
262 parse_buffer.resize(bufferSize);
265 if (videoOut != nullptr) {
267 }
268 }
269
271 if (p_output_audio != nullptr)
272 delete p_output_audio;
273 }
274
275 bool begin() override {
277 header_is_avi = false;
278 is_parsing_active = true;
279 current_pos = 0;
280 header_is_avi = false;
282 is_metadata_ready = false;
283 return true;
284 }
285
287 virtual void setOutput(Print &out_stream) override {
288 // p_output_audio = &out_stream;
290 }
291
293 void setMute(bool mute) { is_mute = mute; }
294
298
299 virtual size_t write(const uint8_t *data, size_t len) override {
300 LOGD("write: %d", (int)len);
301 int result = parse_buffer.writeArray((uint8_t *)data, len);
302 if (is_parsing_active) {
303 // we expect the first parse to succeed
304 if (parse()) {
305 // if so we process the parse_buffer
306 while (parse_buffer.available() > 4) {
307 if (!parse())
308 break;
309 }
310 } else {
311 LOGD("Parse Error");
313 result = len;
314 is_parsing_active = false;
315 }
316 }
317 return result;
318 }
319
320 operator bool() override { return is_parsing_active; }
321
322 void end() override { is_parsing_active = false; };
323
326
329
332
333 const char *videoFormat() { return video_format; }
334
337
340
346 validation_cb = cb;
347 }
348
350 int videoSeconds() { return video_seconds; }
351
354
355protected:
356 bool header_is_avi = false;
357 bool is_parsing_active = true;
371 long current_pos = 0;
372 long movi_end_pos = 0;
375 char video_format[5] = {0};
376 bool is_metadata_ready = false;
378 bool is_mute = false;
384
386 return strncmp(stream_header[stream_header_idx].fccType, "auds", 4) == 0;
387 }
388
390 return strncmp(stream_header[stream_header_idx].fccType, "vids", 4) == 0;
391 }
392
393 // we return true if at least one parse step was successful
394 bool parse() {
395 bool result = true;
396 switch (parse_state) {
397 case ParseHeader: {
398 result = parseHeader();
399 if (result)
401 } break;
402
403 case ParseHdrl: {
404 ParseObject hdrl = parseList("hdrl");
405 result = hdrl.isValid();
406 if (result) {
408 }
409 } break;
410
411 case ParseAvih: {
412 ParseObject avih = parseChunk("avih");
413 result = avih.isValid();
414 if (result) {
415 main_header = *(avih.asAVIMainHeader(parse_buffer.data()));
417 consume(avih.size());
419 }
420 } break;
421
422 case ParseStrl: {
423 ParseObject strl = parseList("strl");
424 ParseObject strh = parseChunk("strh");
426 *(strh.asAVIStreamHeader(parse_buffer.data()));
427 consume(strh.size());
429 } break;
430
431 case ParseStrf: {
432 ParseObject strf = parseChunk("strf");
433 if (isCurrentStreamAudio()) {
434 audio_info = *(strf.asAVIAudioFormat(parse_buffer.data()));
436 LOGI("audioFormat: %d (%x)", (int)audioFormat(),(int)audioFormat());
438 consume(strf.size());
439 } else if (isCurrentStreamVideo()) {
440 video_info = *(strf.asAVIVideoFormat(parse_buffer.data()));
442 LOGI("videoFormat: %s", videoFormat());
444 video_format[4] = 0;
445 consume(strf.size());
446 } else {
447 result = false;
448 }
450 } break;
451
452 case AfterStrf: {
453 // ignore all data until we find a new List
454 int pos = parse_buffer.indexOf("LIST");
455 if (pos >= 0) {
456 consume(pos);
458 if (StrView(tmp.id()).equals("strl")) {
460 } else if (StrView(tmp.id()).equals("movi")) {
462 } else {
463 // e.g. ignore info
465 }
466 } else {
467 // no valid data, so throw it away, we keep the last 4 digits in case
468 // if it contains the beginning of a LIST
469 cleanupStack();
471 }
472 } break;
473
474 case ParseMovi: {
476 if (StrView(movi.id()).equals("movi")) {
478 is_metadata_ready = true;
479 if (validation_cb)
482 movi_end_pos = movi.end_pos;
484 // trigger new write
485 result = false;
486 }
487 } break;
488
489 case SubChunk: {
490 // rec is optinal
492 if (StrView(hdrl.id()).equals("rec")) {
495 }
496
501 LOGI("video:[%d]->[%d]", (int)current_stream_data.start_pos,
503 if (p_output_video != nullptr)
505 } else if (current_stream_data.isAudio()) {
506 LOGI("audio:[%d]->[%d]", (int)current_stream_data.start_pos,
508 } else {
509 LOGW("unknown subchunk at %d", (int)current_pos);
510 }
511
512 } break;
513
514 case SubChunkContinue: {
515 writeData();
516 if (open_subchunk_len == 0) {
517 if (current_stream_data.isVideo() && p_output_video != nullptr) {
520 }
521 if (tryParseChunk("idx").isValid()) {
523 } else if (tryParseList("rec").isValid()) {
525 } else {
526 if (current_pos >= movi_end_pos) {
528 } else {
530 }
531 }
532 }
533 } break;
534
535 case ParseIgnore: {
536 LOGD("ParseIgnore");
538 } break;
539
540 default:
541 result = false;
542 break;
543 }
544 return result;
545 }
546
551 info.logInfo();
552 // adjust the audio info if necessary
553 if (p_decoder != nullptr) {
556 }
558 }
559
563 if (vh->dwScale <= 0) {
564 vh->dwScale = 1;
565 }
566 int rate = vh->dwRate / vh->dwScale;
567 video_seconds = rate <= 0 ? 0 : vh->dwLength / rate;
568 LOGI("videoSeconds: %d seconds", video_seconds);
569 }
570
571 void writeData() {
574 LOGD("audio %d", (int)to_write);
575 if (!is_mute){
577 }
579 cleanupStack();
581 } else if (current_stream_data.isVideo()) {
582 LOGD("video %d", (int)to_write);
583 if (p_output_video != nullptr)
586 cleanupStack();
588 }
589 }
590
591 // 'RIFF' fileSize fileType (data)
592 bool parseHeader() {
593 bool header_is_avi = false;
594 int headerSize = 12;
595 if (getStr(0, 4).equals("RIFF")) {
596 ParseObject result;
598 header_is_avi = getStr(8, 4).equals("AVI ");
599 result.set(current_pos, "AVI ", header_file_size, AVIChunk);
600 processStack(result);
601 consume(headerSize);
602
603 } else {
604 LOGE("parseHeader");
605 }
606 return header_is_avi;
607 }
608
612 ParseObject result;
613 result.set(current_pos, getStr(0, 4), 0, AVIChunk);
614 return result;
615 }
616
619 ParseObject tryParseChunk(const char *id) {
620 ParseObject result;
621 if (getStr(0, 4).equals(id)) {
622 result.set(current_pos, id, 0, AVIChunk);
623 }
624 return result;
625 }
626
627 ParseObject tryParseList(const char *id) {
628 ParseObject result;
629 StrView &list_id = getStr(8, 4);
630 if (list_id.equals(id) && getStr(0, 3).equals("LIST")) {
631 result.set(current_pos, getStr(8, 4), getInt(4), AVIList);
632 }
633 return result;
634 }
635
638 ParseObject result;
639 if (getStr(0, 4).equals("LIST")) {
640 result.set(current_pos, getStr(8, 4), getInt(4), AVIList);
641 }
642 return result;
643 }
644
646 ParseObject parseChunk(const char *id) {
647 ParseObject result;
648 int chunk_size = getInt(4);
649 if (getStr(0, 4).equals(id) && parse_buffer.size() >= chunk_size) {
650 result.set(current_pos, id, chunk_size, AVIChunk);
651 processStack(result);
653 }
654 return result;
655 }
656
658 ParseObject parseList(const char *id) {
659 ParseObject result;
660 if (getStr(0, 4).equals("LIST") && getStr(8, 4).equals(id)) {
661 int size = getInt(4);
662 result.set(current_pos, id, size, AVIList);
663 processStack(result);
665 }
666 return result;
667 }
668
670 ParseObject result;
671 int size = getInt(4);
672 result.set(current_pos, getStr(0, 4), size, AVIStreamData);
673 if (result.isValid()) {
674 processStack(result);
675 consume(8);
676 }
677 return result;
678 }
679
680 void processStack(ParseObject &result) {
681 cleanupStack();
682 object_stack.push(result);
683 spaces.setChars(' ', object_stack.size());
684 LOGD("%s - %s (%d-%d) size:%d", spaces.c_str(), result.id(),
685 (int)result.start_pos, (int)result.end_pos, (int)result.data_size);
686 }
687
690 // make sure that we remove the object from the stack of we past the end
691 object_stack.peek(current);
692 while (current.end_pos <= current_pos) {
694 object_stack.peek(current);
695 }
696 }
697
699 StrView &getStr(int offset, int len) {
700 str.setCapacity(len + 1);
701 const char *data = (const char *)parse_buffer.data();
702 str.copyFrom((data + offset), len, 5);
703
704 return str;
705 }
706
708 uint32_t getInt(int offset) {
709 uint32_t *result = (uint32_t *)(parse_buffer.data() + offset);
710 return *result;
711 }
712
714 void consume(int len) {
715 current_pos += len;
717 }
718};
719
720} // 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
AVI Container Decoder which can be fed with small chunks of data. The minimum length must be bigger t...
Definition ContainerAVI.h:252
virtual size_t write(const uint8_t *data, size_t len) override
Definition ContainerAVI.h:299
BitmapInfoHeader video_info
Definition ContainerAVI.h:363
VideoOutput * p_output_video
Definition ContainerAVI.h:369
void setupVideoInfo()
Definition ContainerAVI.h:560
bool parse()
Definition ContainerAVI.h:394
StrView & getStr(int offset, int len)
Provides the string at the indicated byte offset with the indicated length.
Definition ContainerAVI.h:699
void setMute(bool mute)
Definition ContainerAVI.h:293
ParseObject parseList(const char *id)
We load the indicated list from the current data.
Definition ContainerAVI.h:658
Str str
Definition ContainerAVI.h:374
AVIMainHeader main_header
Definition ContainerAVI.h:360
long current_pos
Definition ContainerAVI.h:371
ParseObject current_stream_data
Definition ContainerAVI.h:367
void setVideoAudioSync(VideoAudioSync *yourSync)
Replace the synchronization logic with your implementation.
Definition ContainerAVI.h:353
void setupAudioInfo()
Definition ContainerAVI.h:547
ParseObject parseChunk(const char *id)
We load the indicated chunk from the current data.
Definition ContainerAVI.h:646
WAVFormatX audio_info
Definition ContainerAVI.h:364
VideoAudioSync * p_synch
Definition ContainerAVI.h:383
AudioFormat audioFormat()
Provides the audio_info.wFormatTag.
Definition ContainerAVI.h:339
bool(* validation_cb)(AVIDecoder &avi)
Definition ContainerAVI.h:377
AVIMainHeader mainHeader()
Provides the information from the main header chunk.
Definition ContainerAVI.h:325
void end() override
Definition ContainerAVI.h:322
long open_subchunk_len
Definition ContainerAVI.h:370
int videoSeconds()
Provide the length of the video in seconds.
Definition ContainerAVI.h:350
ParseObject tryParseList(const char *id)
Definition ContainerAVI.h:627
bool is_parsing_active
Definition ContainerAVI.h:357
bool is_mute
Definition ContainerAVI.h:378
bool is_metadata_ready
Definition ContainerAVI.h:376
uint32_t getInt(int offset)
Provides the int32 at the indicated byte offset.
Definition ContainerAVI.h:708
char video_format[5]
Definition ContainerAVI.h:375
virtual void setOutputVideoStream(VideoOutput &out_stream)
Definition ContainerAVI.h:295
AudioDecoder * p_decoder
Definition ContainerAVI.h:380
AVIDecoder(int bufferSize=1024)
Definition ContainerAVI.h:254
int stream_header_idx
Definition ContainerAVI.h:361
ParseObject tryParseList()
We try to parse the actual state for any list.
Definition ContainerAVI.h:637
~AVIDecoder()
Definition ContainerAVI.h:270
Stack< ParseObject > object_stack
Definition ContainerAVI.h:366
long movi_end_pos
Definition ContainerAVI.h:372
void cleanupStack()
Definition ContainerAVI.h:688
Vector< AVIStreamHeader > stream_header
Definition ContainerAVI.h:362
bool isMetadataReady()
Returns true if all metadata has been parsed and is available.
Definition ContainerAVI.h:342
ParseObject parseAVIStreamData()
Definition ContainerAVI.h:669
EncodedAudioOutput * p_output_audio
Definition ContainerAVI.h:368
Str spaces
Definition ContainerAVI.h:373
bool isCurrentStreamAudio()
Definition ContainerAVI.h:385
BitmapInfoHeader aviVideoInfo()
Provides the video information.
Definition ContainerAVI.h:331
CopyDecoder copy_decoder
Definition ContainerAVI.h:379
void consume(int len)
We remove the processed bytes from the beginning of the buffer.
Definition ContainerAVI.h:714
int video_seconds
Definition ContainerAVI.h:381
bool begin() override
Definition ContainerAVI.h:275
bool isCurrentStreamVideo()
Definition ContainerAVI.h:389
virtual void setOutput(Print &out_stream) override
Defines the audio output stream - usually called by EncodedAudioStream.
Definition ContainerAVI.h:287
void writeData()
Definition ContainerAVI.h:571
const char * videoFormat()
Definition ContainerAVI.h:333
Vector< StreamContentType > content_types
Definition ContainerAVI.h:365
bool header_is_avi
Definition ContainerAVI.h:356
bool parseHeader()
Definition ContainerAVI.h:592
ParseObject tryParseChunk()
Definition ContainerAVI.h:611
AVIDecoder(AudioDecoder *audioDecoder, VideoOutput *videoOut=nullptr, int bufferSize=1024)
Definition ContainerAVI.h:260
ParseBuffer parse_buffer
Definition ContainerAVI.h:359
void setValidationCallback(bool(*cb)(AVIDecoder &avi))
Definition ContainerAVI.h:345
WAVFormatX aviAudioInfo()
Provides the audio information.
Definition ContainerAVI.h:336
VideoAudioSync defaultSynch
Definition ContainerAVI.h:382
AVIStreamHeader streamHeader(int idx)
Provides the information from the stream header chunks.
Definition ContainerAVI.h:328
ParseObject tryParseChunk(const char *id)
Definition ContainerAVI.h:619
ParseState parse_state
Definition ContainerAVI.h:358
void processStack(ParseObject &result)
Definition ContainerAVI.h:680
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:178
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:104
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:57
size_t size()
Definition ContainerAVI.h:48
size_t writeArray(uint8_t *data, size_t len)
Definition ContainerAVI.h:23
size_t availableToWrite()
Definition ContainerAVI.h:37
size_t available_byte_count
Definition ContainerAVI.h:58
void consume(int size)
Definition ContainerAVI.h:29
size_t available()
Definition ContainerAVI.h:39
uint8_t * data()
Definition ContainerAVI.h:35
long indexOf(const char *str)
Definition ContainerAVI.h:50
void clear()
Definition ContainerAVI.h:41
void resize(int size)
Definition ContainerAVI.h:33
bool isEmpty()
Definition ContainerAVI.h:46
Represents a LIST or a CHUNK: The ParseObject represents the current parsing result....
Definition ContainerAVI.h:159
size_t size()
Definition ContainerAVI.h:183
bool isVideo()
Definition ContainerAVI.h:232
size_t open
Definition ContainerAVI.h:208
size_t end_pos
Definition ContainerAVI.h:209
WAVFormatX * asAVIAudioFormat(void *ptr)
Definition ContainerAVI.h:203
size_t start_pos
Definition ContainerAVI.h:210
ParseObjectType type()
Definition ContainerAVI.h:185
bool isVideoCompressed()
Definition ContainerAVI.h:227
void set(size_t currentPos, const char *id, size_t size, ParseObjectType type)
Definition ContainerAVI.h:165
char chunk_id[5]
Definition ContainerAVI.h:236
ParseObjectType object_type
Definition ContainerAVI.h:237
BitmapInfoHeader * asAVIVideoFormat(void *ptr)
Definition ContainerAVI.h:204
void set(size_t currentPos, StrView id, size_t size, ParseObjectType type)
Definition ContainerAVI.h:161
int streamNumber()
Definition ContainerAVI.h:214
AVIMainHeader * asAVIMainHeader(void *ptr)
Definition ContainerAVI.h:199
bool isVideoUncompressed()
Definition ContainerAVI.h:222
size_t data_size
Definition ContainerAVI.h:211
bool isAudio()
Definition ContainerAVI.h:217
AVIStreamHeader * asAVIStreamHeader(void *ptr)
Definition ContainerAVI.h:200
const char * id()
Definition ContainerAVI.h:182
bool isValid()
Definition ContainerAVI.h:186
Definition NoArduino.h:62
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:379
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(int 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:63
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:135
@ Audio
Definition ContainerAVI.h:135
@ Video
Definition ContainerAVI.h:135
ParseObjectType
Definition ContainerAVI.h:137
@ AVIChunk
Definition ContainerAVI.h:137
@ AVIList
Definition ContainerAVI.h:137
@ AVIStreamData
Definition ContainerAVI.h:137
ParseState
Definition ContainerAVI.h:139
@ ParseStrl
Definition ContainerAVI.h:143
@ ParseStrf
Definition ContainerAVI.h:147
@ AfterStrf
Definition ContainerAVI.h:148
@ SubChunkContinue
Definition ContainerAVI.h:144
@ ParseMovi
Definition ContainerAVI.h:149
@ SubChunk
Definition ContainerAVI.h:145
@ ParseRec
Definition ContainerAVI.h:146
@ ParseHdrl
Definition ContainerAVI.h:141
@ ParseHeader
Definition ContainerAVI.h:140
@ ParseIgnore
Definition ContainerAVI.h:150
@ ParseAvih
Definition ContainerAVI.h:142
size_t writeData(Print *p_out, T *data, int samples, int maxSamples=512)
Definition AudioTypes.h:512
Definition ContainerAVI.h:65
uint32_t dwStreams
Definition ContainerAVI.h:74
uint32_t dwInitialFrames
Definition ContainerAVI.h:73
uint32_t dwMaxBytesPerSec
Definition ContainerAVI.h:69
uint32_t dwHeight
Definition ContainerAVI.h:77
uint32_t dwReserved[4]
Definition ContainerAVI.h:78
uint32_t dwFlags
Definition ContainerAVI.h:71
uint32_t dwPaddingGranularity
Definition ContainerAVI.h:70
uint32_t dwMicroSecPerFrame
Definition ContainerAVI.h:68
uint32_t dwSuggestedBufferSize
Definition ContainerAVI.h:75
uint32_t dwWidth
Definition ContainerAVI.h:76
uint32_t dwTotalFrames
Definition ContainerAVI.h:72
Definition ContainerAVI.h:86
uint32_t dwSampleSize
Definition ContainerAVI.h:99
uint32_t dwLength
Definition ContainerAVI.h:96
uint32_t dwInitialFrames
Definition ContainerAVI.h:92
uint16_t wPriority
Definition ContainerAVI.h:90
uint16_t wLanguage
Definition ContainerAVI.h:91
FOURCC fccType
Definition ContainerAVI.h:87
uint32_t dwScale
Definition ContainerAVI.h:93
FOURCC fccHandler
Definition ContainerAVI.h:88
uint32_t dwFlags
Definition ContainerAVI.h:89
uint32_t dwStart
Definition ContainerAVI.h:95
uint32_t dwQuality
Definition ContainerAVI.h:98
RECT rcFrame
Definition ContainerAVI.h:100
uint32_t dwRate
Definition ContainerAVI.h:94
uint32_t dwSuggestedBufferSize
Definition ContainerAVI.h:97
sample_rate_t sample_rate
Sample Rate: e.g 44100.
Definition AudioTypes.h:57
uint16_t channels
Number of channels: 2=stereo, 1=mono.
Definition AudioTypes.h:59
uint8_t bits_per_sample
Number of bits per sample (int16_t = 16 bits)
Definition AudioTypes.h:61
virtual void logInfo(const char *source="")
Definition AudioTypes.h:125
Definition ContainerAVI.h:103
uint32_t biSizeImage
Definition ContainerAVI.h:110
uint32_t biCompression
Definition ContainerAVI.h:109
uint16_t biBitCount
Definition ContainerAVI.h:108
uint32_t biClrImportant
Definition ContainerAVI.h:114
uint32_t biSize
Definition ContainerAVI.h:104
uint16_t biPlanes
Definition ContainerAVI.h:107
uint32_t biClrUsed
Definition ContainerAVI.h:113
uint64_t biWidth
Definition ContainerAVI.h:105
uint64_t biXPelsPerMeter
Definition ContainerAVI.h:111
uint64_t biYPelsPerMeter
Definition ContainerAVI.h:112
uint64_t biHeight
Definition ContainerAVI.h:106
Definition ContainerAVI.h:81
uint32_t dwHeight
Definition ContainerAVI.h:83
uint32_t dwWidth
Definition ContainerAVI.h:82
Definition ContainerAVI.h:117
uint16_t wBitsPerSample
Definition ContainerAVI.h:123
uint16_t nChannels
Definition ContainerAVI.h:119
uint16_t nBlockAlign
Definition ContainerAVI.h:122
uint32_t nSamplesPerSec
Definition ContainerAVI.h:120
uint32_t nAvgBytesPerSec
Definition ContainerAVI.h:121
uint16_t cbSize
Definition ContainerAVI.h:124
AudioFormat wFormatTag
Definition ContainerAVI.h:118