arduino-audio-tools
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CodecCopy Class Reference

#include <CodecCopy.h>

Public Member Functions

 CodecCopy (AudioWriter &to, Stream &from, int len=1024)
 
size_t copy ()
 
size_t copy (int len)
 

Protected Member Functions

size_t writeAll (uint8_t *data, size_t len)
 

Protected Attributes

int buffer_len = 1024
 
Streamp_in = nullptr
 
AudioWriterp_out = nullptr
 

Constructor & Destructor Documentation

◆ CodecCopy()

CodecCopy ( AudioWriter to,
Stream from,
int  len = 1024 
)
inline

Member Function Documentation

◆ copy() [1/2]

size_t copy ( )
inline

◆ copy() [2/2]

size_t copy ( int  len)
inline

◆ writeAll()

size_t writeAll ( uint8_t *  data,
size_t  len 
)
inlineprotected

write() (e.g. DemuxerAVI/DemuxerMP4/DemuxerMPG) may only accept part of a buffer in one call when its internal parse buffer is momentarily full

  • retry with the remainder (parsing that happens inside write() itself drains it further) instead of silently dropping the unwritten tail, which desyncs the demuxer from the real byte stream and corrupts parsing further in. Only bails on a genuine stall (write() returns 0).

Member Data Documentation

◆ buffer_len

int buffer_len = 1024
protected

◆ p_in

Stream* p_in = nullptr
protected

◆ p_out

AudioWriter* p_out = nullptr
protected

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