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

Simple ID3 Meta Data API which supports ID3 V2: We only support the "TALB", "TOPE", "TIT2", "TCON" tags. More...

#include <MetaDataID3.h>

Inheritance diagram for MetaDataID3V2:
MetaDataID3Base

Public Member Functions

 MetaDataID3V2 ()=default
 
bool begin ()
 (re)starts the processing
 
void end ()
 Ends the processing and releases the memory.
 
ID3v2FrameString frameHeader ()
 provides the current frame header
 
ID3v2 header ()
 provides the ID3v2 header
 
bool isProcessed ()
 returns true if the tag has been provided
 
void resize (int size)
 Defines the result buffer size (default is 256);.
 
void setCallback (void(*fn)(MetaDataType info, const char *str, int len))
 
size_t write (const uint8_t *data, size_t len)
 provide the (partial) data which might contain the meta data
 

Protected Member Functions

uint32_t calcSize (uint8_t chars[4])
 
bool encodingIsSupported ()
 For the time beeing we support only ASCII and UTF8.
 
int findTag (const char *tag, const char *str, size_t len)
 find the tag position in the string - if not found we return -1;
 
bool isAscii (int l)
 Make sure that the result is a valid ASCII string.
 
int isCharAscii (int ch)
 
void processnotifyAudioChange ()
 executes the callbacks
 
void processPartialTagAtTail (const uint8_t *data, size_t len)
 We have the beginning of the metadata and need to process the remainder.
 
void processTagNotFound (const uint8_t *data, size_t len)
 try to find the metatdata tag in the provided data
 
int strpos (char *str, const char *target)
 

Protected Attributes

const charactual_tag
 
bool armed = false
 
void(* callback )(MetaDataType info, const char *title, int len)
 
uint64_t end_len = 0
 
ID3v2FrameString frame_header
 
Vector< charresult {0}
 
int result_size = 256
 
ParseStatus status = TagNotFound
 
bool tag_active = false
 
bool tag_processed = false
 
ID3v2 tagv2
 
uint64_t total_len = 0
 
int use_bytes_of_next_write = 0
 

Detailed Description

Simple ID3 Meta Data API which supports ID3 V2: We only support the "TALB", "TOPE", "TIT2", "TCON" tags.

Author
Phil Schatzmann

Constructor & Destructor Documentation

◆ MetaDataID3V2()

MetaDataID3V2 ( )
default

Member Function Documentation

◆ begin()

bool begin ( )
inline

(re)starts the processing

◆ calcSize()

uint32_t calcSize ( uint8_t  chars[4])
inlineprotected

◆ encodingIsSupported()

bool encodingIsSupported ( )
inlineprotected

For the time beeing we support only ASCII and UTF8.

◆ end()

void end ( )
inline

Ends the processing and releases the memory.

◆ findTag()

int findTag ( const char tag,
const char str,
size_t  len 
)
inlineprotectedinherited

find the tag position in the string - if not found we return -1;

◆ frameHeader()

ID3v2FrameString frameHeader ( )
inline

provides the current frame header

◆ header()

ID3v2 header ( )
inline

provides the ID3v2 header

◆ isAscii()

bool isAscii ( int  l)
inlineprotected

Make sure that the result is a valid ASCII string.

◆ isCharAscii()

int isCharAscii ( int  ch)
inlineprotected

◆ isProcessed()

bool isProcessed ( )
inline

returns true if the tag has been provided

◆ processnotifyAudioChange()

void processnotifyAudioChange ( )
inlineprotected

executes the callbacks

◆ processPartialTagAtTail()

void processPartialTagAtTail ( const uint8_t data,
size_t  len 
)
inlineprotected

We have the beginning of the metadata and need to process the remainder.

◆ processTagNotFound()

void processTagNotFound ( const uint8_t data,
size_t  len 
)
inlineprotected

try to find the metatdata tag in the provided data

◆ resize()

void resize ( int  size)
inline

Defines the result buffer size (default is 256);.

◆ setCallback()

void setCallback ( void(*)(MetaDataType info, const char *str, int len)  fn)
inlineinherited

◆ strpos()

int strpos ( char str,
const char target 
)
inlineprotected

◆ write()

size_t write ( const uint8_t data,
size_t  len 
)
inline

provide the (partial) data which might contain the meta data

Member Data Documentation

◆ actual_tag

const char* actual_tag
protected

◆ armed

bool armed = false
protectedinherited

◆ callback

void(* callback) (MetaDataType info, const char *title, int len)
protectedinherited

◆ end_len

uint64_t end_len = 0
protected

◆ frame_header

ID3v2FrameString frame_header
protected

◆ result

Vector<char> result {0}
protected

◆ result_size

int result_size = 256
protected

◆ status

ParseStatus status = TagNotFound
protected

◆ tag_active

bool tag_active = false
protected

◆ tag_processed

bool tag_processed = false
protected

◆ tagv2

ID3v2 tagv2
protected

◆ total_len

uint64_t total_len = 0
protected

◆ use_bytes_of_next_write

int use_bytes_of_next_write = 0
protected

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