diff options
author | Jean-Francois Mauguit <jfmauguit@mac.com> | 2024-09-24 09:03:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 09:03:25 -0400 |
commit | bab614c421ed7ae329d26bf028c4a3b1d2450f5a (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/nsavi/ParserBase.h | |
parent | 4bde6044fddf053f31795b9eaccdd2a5a527d21f (diff) | |
parent | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (diff) | |
download | winamp-bab614c421ed7ae329d26bf028c4a3b1d2450f5a.tar.gz |
Merge pull request #5 from WinampDesktop/community
Merge to main
Diffstat (limited to 'Src/nsavi/ParserBase.h')
-rw-r--r-- | Src/nsavi/ParserBase.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/Src/nsavi/ParserBase.h b/Src/nsavi/ParserBase.h new file mode 100644 index 00000000..3e01338f --- /dev/null +++ b/Src/nsavi/ParserBase.h @@ -0,0 +1,45 @@ +#pragma once +#include "read.h" +#include "avi_header.h" +#include "avi_reader.h" +#include "info.h" + +namespace nsavi +{ + + + struct HeaderList + { + const AVIH *avi_header; + const STRL *stream_list; + size_t stream_list_size; + const DMLH *odml_header; + }; + + class ParserBase + { + public: + ParserBase(nsavi::avi_reader *_reader); + int GetRIFFType(uint32_t *type); + + + protected: + int ParseHeaderList(uint32_t chunk_size, uint32_t *out_bytes_read); + int ParseStreamList(uint32_t chunk_size, STRL *stream, uint32_t *out_bytes_read); + int ParseODML(uint32_t chunk_size, uint32_t *out_bytes_read); + + nsavi::avi_reader *reader; + + /* RIFF header (12 bytes at start of file) */ + ParseState riff_parsed; + riff_chunk riff_header; + uint64_t riff_start; // should normally be 12 + + /* header list */ + ParseState header_list_parsed; + AVIH *avi_header; + STRL *stream_list; + size_t stream_list_size; + DMLH *odml_header; + }; +}
\ No newline at end of file |