|
TB2026-YDS Firmware
|
Read tags + format from a file without playing it (for now_playing and the browser). More...

Files | |
| file | components/services/audio/track_meta.c |
| Tags + format reader (see track_meta.h): MP3 ID3v2/ID3v1, WAV header, no playback. | |
Data Structures | |
| struct | track_meta_t |
| A track's tags and audio format, filled by track_meta_read(). More... | |
Macros | |
| #define | TRACK_META_STR_MAX 64 |
| Longest tag string kept, including the terminating NUL (longer tags are truncated). | |
Functions | |
| esp_err_t | track_meta_read (const char *path, track_meta_t *out) |
Read the tags and format of path. | |
Read tags + format from a file without playing it (for now_playing and the browser).
| #define TRACK_META_STR_MAX 64 |
Longest tag string kept, including the terminating NUL (longer tags are truncated).
| esp_err_t track_meta_read | ( | const char * | path, |
| track_meta_t * | out ) |
Read the tags and format of path.
Title always falls back to the file name (without extension) when no tag is present; artist and album are left empty when absent. A malformed or truncated tag is bounds-checked and degraded to the file-name fallback (logged), never trusted as garbage and never a crash.
| path | POSIX path under the SD mount, e.g. "/sdcard/track.mp3". | |
| [out] | out | Filled on success (zeroed first). Must not be NULL. |