diff options
author | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
---|---|---|
committer | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
commit | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/nsavi/demuxer.h | |
parent | 537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff) | |
download | winamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz |
Initial community commit
Diffstat (limited to 'Src/nsavi/demuxer.h')
-rw-r--r-- | Src/nsavi/demuxer.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Src/nsavi/demuxer.h b/Src/nsavi/demuxer.h new file mode 100644 index 00000000..ceac5218 --- /dev/null +++ b/Src/nsavi/demuxer.h @@ -0,0 +1,36 @@ +#pragma once +/* this parser is meant for actual playback */ +#include "read.h" +#include "avi_header.h" +#include "avi_reader.h" +#include "info.h" +#include "ParserBase.h" +namespace nsavi +{ + class Demuxer : public ParserBase + { + public: + Demuxer(nsavi::avi_reader *_reader); + int GetNextMovieChunk(nsavi::avi_reader *reader, void **data, uint32_t *chunk_size, uint32_t *chunk_type, int limit_stream_num=65536); + int GetSeekTable(nsavi::IDX1 **out_index); // get the idx1 chunk + int GetIndexChunk(nsavi::INDX **out_index, uint64_t offset); // get the INDX/##ix/##ix chunk at the given position + int Seek(uint64_t offset, bool absolute, nsavi::avi_reader *reader); + int GetHeaderList(HeaderList *header_list); + int FindMovieChunk(); + int SeekToMovieChunk(nsavi::avi_reader *reader); + private: + /* movie chunk */ + ParseState movie_found; + riff_chunk movi_header; + uint64_t movie_start; + + /* idx1 seektable */ + ParseState idx1_found; + riff_chunk idx1_header; // dunno if we really need it + nsavi::IDX1 *index; + + /* INFO */ + Info *info; + ParseState info_found; + }; +}
\ No newline at end of file |