arduino-audio-tools
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
RamSampleTableStore< T > Class Template Reference

Keeps every entry in RAM (a plain Vector<T>) - the simplest and fastest option, but scales with the track's total sample/chunk count (e.g. ~4.5MB total for a 102-minute movie's stsz+stco tables). Default if no other SampleTableStore is configured. More...

#include <SampleTableStore.h>

Inheritance diagram for RamSampleTableStore< T >:
SampleTableStore< T >

Public Member Functions

void append (T value) override
 Appends one entry - call in file order, once per table entry.
 
void clear () override
 Resets to empty - call once per begin()/track.
 
get (size_t index) override
 Reads back entry 'index' - index must be < size().
 
virtual void setNextEntryOffset (uint64_t fileOffset)
 
virtual void setOnDiskEntrySize (size_t bytes)
 
size_t size () override
 Number of entries appended so far.
 

Protected Attributes

Vector< T > data
 

Detailed Description

template<typename T>
class audio_tools::RamSampleTableStore< T >

Keeps every entry in RAM (a plain Vector<T>) - the simplest and fastest option, but scales with the track's total sample/chunk count (e.g. ~4.5MB total for a 102-minute movie's stsz+stco tables). Default if no other SampleTableStore is configured.

Member Function Documentation

◆ append()

template<typename T >
void append ( value)
inlineoverridevirtual

Appends one entry - call in file order, once per table entry.

Implements SampleTableStore< T >.

◆ clear()

template<typename T >
void clear ( )
inlineoverridevirtual

Resets to empty - call once per begin()/track.

Implements SampleTableStore< T >.

◆ get()

template<typename T >
T get ( size_t  index)
inlineoverridevirtual

Reads back entry 'index' - index must be < size().

Implements SampleTableStore< T >.

◆ setNextEntryOffset()

template<typename T >
virtual void setNextEntryOffset ( uint64_t  fileOffset)
inlinevirtualinherited

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 >.

◆ setOnDiskEntrySize()

template<typename T >
virtual void setOnDiskEntrySize ( size_t  bytes)
inlinevirtualinherited

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 >.

◆ size()

template<typename T >
size_t size ( )
inlineoverridevirtual

Number of entries appended so far.

Implements SampleTableStore< T >.

Member Data Documentation

◆ data

template<typename T >
Vector<T> data
protected

The documentation for this class was generated from the following file: