myMPD
Internal API documentation
Loading...
Searching...
No Matches
lyrics_id3.c File Reference

Read lyrics from ID3 tags. More...

#include "compile_time.h"
#include "src/mympd_api/lyrics_id3.h"
#include "src/lib/json/json_print.h"
#include "src/lib/log.h"
#include "src/lib/mem.h"
#include "src/lib/sds_extras.h"
#include <assert.h>
#include <id3tag.h>
Include dependency graph for lyrics_id3.c:

Functions

static sds decode_sylt (const id3_byte_t *binary_data, id3_length_t binary_length, enum id3_field_textencoding encoding)
 
static const char * mympd_id3_field_getlanguage (union id3_field const *field)
 
void lyricsextract_unsynced_id3 (struct t_list *extracted, sds media_file)
 
void lyricsextract_synced_id3 (struct t_list *extracted, sds media_file)
 

Detailed Description

Read lyrics from ID3 tags.

Function Documentation

◆ decode_sylt()

static sds decode_sylt ( const id3_byte_t *  binary_data,
id3_length_t  binary_length,
enum id3_field_textencoding  encoding 
)
static

Decodes the binary sylt tag from id3 tagged files

Parameters
binary_datathe binary sylt tag
binary_lengthlength of the binary data
encodingtext encoding
Returns
decoded sylt tag

◆ lyricsextract_synced_id3()

void lyricsextract_synced_id3 ( struct t_list extracted,
sds  media_file 
)

Extracts synced lyrics from a id3 tagged mp3 file

Parameters
extractedt_list struct to append found lyrics
media_fileabsolute filename to read lyrics from

◆ lyricsextract_unsynced_id3()

void lyricsextract_unsynced_id3 ( struct t_list extracted,
sds  media_file 
)

Extracts unsynced lyrics from a id3 tagged mp3 file

Parameters
extractedt_list struct to append found lyrics
media_fileabsolute filename to read lyrics from

◆ mympd_id3_field_getlanguage()

static const char * mympd_id3_field_getlanguage ( union id3_field const *  field)
static

Custom function to get the id3 language field libid3tag has not get function for language

Parameters
fieldpointer to frame field
Returns
language