xine-lib 1.2.11
Macros | Functions | Variables
id3.c File Reference
#include <stdlib.h>
#include <xine/xine_internal.h>
#include <xine/xineutils.h>
#include "bswap.h"
#include "id3.h"

Macros

#define LOG_MODULE   "id3"
 
#define LOG_VERBOSE
 
#define ID3_GENRE_COUNT   (sizeof (id3_genre) / sizeof (id3_genre[0]))
 
#define ID3_ENCODING_COUNT   4
 

Functions

int id3v1_parse_tag (input_plugin_t *input, xine_stream_t *stream)
 
static int id3v2_parse_genre (char *dest, const char *src, size_t len)
 
static int id3v2_parse_header (input_plugin_t *input, uint32_t id3_signature, id3v2_header_t *tag_header)
 
static int id3v22_parse_frame_header (input_plugin_t *input, id3v22_frame_header_t *frame_header)
 
static int id3v22_interp_frame (input_plugin_t *input, xine_stream_t *stream, id3v22_frame_header_t *frame_header)
 
static int id3v22_parse_tag (input_plugin_t *input, xine_stream_t *stream, uint32_t id3_signature)
 
static int id3v23_parse_frame_header (input_plugin_t *input, id3v23_frame_header_t *frame_header)
 
static int id3v23_parse_frame_ext_header (input_plugin_t *input, id3v23_frame_ext_header_t *frame_ext_header)
 
static int id3v23_interp_frame (input_plugin_t *input, xine_stream_t *stream, id3v23_frame_header_t *frame_header)
 
static int id3v23_parse_tag (input_plugin_t *input, xine_stream_t *stream, uint32_t id3_signature)
 
static int id3v24_parse_genre (char *dest, const char *src, size_t len)
 
static int id3v24_parse_frame_header (input_plugin_t *input, id3v24_frame_header_t *frame_header)
 
static int id3v24_parse_ext_header (input_plugin_t *input, id3v24_frame_ext_header_t *frame_ext_header)
 
static int id3v24_interp_frame (input_plugin_t *input, xine_stream_t *stream, id3v24_frame_header_t *frame_header)
 
static int id3v24_parse_tag (input_plugin_t *input, xine_stream_t *stream, uint32_t id3_signature)
 
int id3v2_parse_tag (input_plugin_t *input, xine_stream_t *stream, uint32_t id3_signature)
 Generic function for ID3v2 tags parsing. More...
 

Variables

static const char id3_genre [][24]
 
static const char id3_encoding [][12]
 

Macro Definition Documentation

◆ ID3_ENCODING_COUNT

#define ID3_ENCODING_COUNT   4

◆ ID3_GENRE_COUNT

#define ID3_GENRE_COUNT   (sizeof (id3_genre) / sizeof (id3_genre[0]))

◆ LOG_MODULE

#define LOG_MODULE   "id3"

◆ LOG_VERBOSE

#define LOG_VERBOSE

Function Documentation

◆ id3v1_parse_tag()

int id3v1_parse_tag ( input_plugin_t input,
xine_stream_t stream 
)

◆ id3v22_interp_frame()

static int id3v22_interp_frame ( input_plugin_t input,
xine_stream_t stream,
id3v22_frame_header_t frame_header 
)
static

◆ id3v22_parse_frame_header()

static int id3v22_parse_frame_header ( input_plugin_t input,
id3v22_frame_header_t frame_header 
)
static

◆ id3v22_parse_tag()

static int id3v22_parse_tag ( input_plugin_t input,
xine_stream_t stream,
uint32_t  id3_signature 
)
static

◆ id3v23_interp_frame()

static int id3v23_interp_frame ( input_plugin_t input,
xine_stream_t stream,
id3v23_frame_header_t frame_header 
)
static

◆ id3v23_parse_frame_ext_header()

static int id3v23_parse_frame_ext_header ( input_plugin_t input,
id3v23_frame_ext_header_t frame_ext_header 
)
static

◆ id3v23_parse_frame_header()

static int id3v23_parse_frame_header ( input_plugin_t input,
id3v23_frame_header_t frame_header 
)
static

◆ id3v23_parse_tag()

static int id3v23_parse_tag ( input_plugin_t input,
xine_stream_t stream,
uint32_t  id3_signature 
)
static

◆ id3v24_interp_frame()

static int id3v24_interp_frame ( input_plugin_t input,
xine_stream_t stream,
id3v24_frame_header_t frame_header 
)
static

◆ id3v24_parse_ext_header()

static int id3v24_parse_ext_header ( input_plugin_t input,
id3v24_frame_ext_header_t frame_ext_header 
)
static

◆ id3v24_parse_frame_header()

static int id3v24_parse_frame_header ( input_plugin_t input,
id3v24_frame_header_t frame_header 
)
static

◆ id3v24_parse_genre()

static int id3v24_parse_genre ( char *  dest,
const char *  src,
size_t  len 
)
static

References id3_genre, ID3_GENRE_COUNT, and lprintf.

Referenced by id3v24_interp_frame().

◆ id3v24_parse_tag()

static int id3v24_parse_tag ( input_plugin_t input,
xine_stream_t stream,
uint32_t  id3_signature 
)
static

◆ id3v2_parse_genre()

static int id3v2_parse_genre ( char *  dest,
const char *  src,
size_t  len 
)
static

◆ id3v2_parse_header()

static int id3v2_parse_header ( input_plugin_t input,
uint32_t  id3_signature,
id3v2_header_t tag_header 
)
static

◆ id3v2_parse_tag()

int id3v2_parse_tag ( input_plugin_t input,
xine_stream_t stream,
uint32_t  id3_signature 
)

Generic function for ID3v2 tags parsing.

Parameters
inputPointer to the input plugin used by the demuxer, used to access the tag's data.
streamPointer to the xine stream currently being read.
mp3_frame_headerHeader of the MP3 frame carrying the tag.
Note
This function will take care of calling the proper function for parsing ID3v2.2, ID3v2.3 or ID3v2.4 tags.

References _x_assert, be2me_32, id3v22_parse_tag(), ID3V22_TAG, id3v23_parse_tag(), ID3V23_TAG, id3v24_parse_tag(), ID3V24_TAG, ID3V2X_MASK, ID3V2X_TAG, input(), LOG_MODULE, xine_stream_s::xine, XINE_VERBOSITY_LOG, and xprintf.

Referenced by demux_mpgaudio_next(), open_flac_file(), and probe_aac_file().

Variable Documentation

◆ id3_encoding

const char id3_encoding[][12]
static
Initial value:
= {
"ISO-8859-1",
"UTF-16",
"UTF-16BE",
"UTF-8"}

Referenced by id3v22_interp_frame(), id3v23_interp_frame(), and id3v24_interp_frame().

◆ id3_genre

const char id3_genre[][24]
static