|
arduino-audio-tools
|
Sequential-access storage for one MP4 sample table (e.g. stsz sample sizes, stco chunk offsets, or the raw stsc/stts RLE entries). Every real access pattern in DemuxerMP4 is append-only while parsing 'moov', then forward-cursor reads while consuming 'mdat' - this interface intentionally only supports that (no random-access mutation, no delete), which is what keeps all three implementations below simple and correct. More...
#include <SampleTableStore.h>
Public Member Functions | |
| virtual | ~SampleTableStore ()=default |
| virtual void | append (T value)=0 |
| Appends one entry - call in file order, once per table entry. | |
| virtual void | clear ()=0 |
| Resets to empty - call once per begin()/track. | |
| virtual T | get (size_t index)=0 |
| Reads back entry 'index' - index must be < size(). | |
| virtual void | setNextEntryOffset (uint64_t fileOffset) |
| virtual void | setOnDiskEntrySize (size_t bytes) |
| virtual size_t | size ()=0 |
| Number of entries appended so far. | |
Sequential-access storage for one MP4 sample table (e.g. stsz sample sizes, stco chunk offsets, or the raw stsc/stts RLE entries). Every real access pattern in DemuxerMP4 is append-only while parsing 'moov', then forward-cursor reads while consuming 'mdat' - this interface intentionally only supports that (no random-access mutation, no delete), which is what keeps all three implementations below simple and correct.
|
virtualdefault |
|
pure virtual |
Appends one entry - call in file order, once per table entry.
Implemented in RamSampleTableStore< T >, ChunkedSampleTableStore< T, ChunkSize >, SpoolFileSampleTableStore< T >, and SourceSeekSampleTableStore< T >.
|
pure virtual |
Resets to empty - call once per begin()/track.
Implemented in RamSampleTableStore< T >, ChunkedSampleTableStore< T, ChunkSize >, SourceSeekSampleTableStore< T >, and SpoolFileSampleTableStore< T >.
|
pure virtual |
Reads back entry 'index' - index must be < size().
Implemented in RamSampleTableStore< T >, ChunkedSampleTableStore< T, ChunkSize >, SourceSeekSampleTableStore< T >, and SpoolFileSampleTableStore< T >.
|
inlinevirtual |
Only meaningful for SourceSeekSampleTableStore: the absolute byte offset (from the start of the original MP4 file) of the entry about to be appended next. Default no-op - other implementations ignore it, so callers can always call this unconditionally before append() without needing to know which implementation is active.
Reimplemented in SourceSeekSampleTableStore< T >.
|
inlinevirtual |
Only meaningful for SourceSeekSampleTableStore, and only for tables whose on-disk width isn't a fixed sizeof(T) - see its comment. Default no-op.
Reimplemented in SourceSeekSampleTableStore< T >.
|
pure virtual |
Number of entries appended so far.
Implemented in RamSampleTableStore< T >, ChunkedSampleTableStore< T, ChunkSize >, SourceSeekSampleTableStore< T >, and SpoolFileSampleTableStore< T >.