#include <stdint.h>
#include "avformat.h"
#include "internal.h"
#include "metadata.h"
Go to the source code of this file.
Data Structures | |
struct | ID3v2EncContext |
struct | ID3v2ExtraMeta |
struct | ID3v2ExtraMetaGEOB |
struct | ID3v2ExtraMetaAPIC |
Defines | |
#define | ID3v2_HEADER_SIZE 10 |
#define | ID3v2_DEFAULT_MAGIC "ID3" |
Default magic bytes for ID3v2 header: "ID3". | |
#define | ID3v2_FLAG_DATALEN 0x0001 |
#define | ID3v2_FLAG_UNSYNCH 0x0002 |
#define | ID3v2_FLAG_ENCRYPTION 0x0004 |
#define | ID3v2_FLAG_COMPRESSION 0x0008 |
Enumerations | |
enum | ID3v2Encoding { ID3v2_ENCODING_ISO8859 = 0, ID3v2_ENCODING_UTF16BOM = 1, ID3v2_ENCODING_UTF16BE = 2, ID3v2_ENCODING_UTF8 = 3 } |
Functions | |
int | ff_id3v2_match (const uint8_t *buf, const char *magic) |
Detect ID3v2 Header. | |
int | ff_id3v2_tag_len (const uint8_t *buf) |
Get the length of an ID3v2 tag. | |
void | ff_id3v2_read (AVFormatContext *s, const char *magic, ID3v2ExtraMeta **extra_meta) |
Read an ID3v2 tag, including supported extra metadata. | |
void | ff_id3v2_start (ID3v2EncContext *id3, AVIOContext *pb, int id3v2_version, const char *magic) |
Initialize an ID3v2 tag. | |
int | ff_id3v2_write_metadata (AVFormatContext *s, ID3v2EncContext *id3) |
Convert and write all global metadata from s into an ID3v2 tag. | |
int | ff_id3v2_write_apic (AVFormatContext *s, ID3v2EncContext *id3, AVPacket *pkt) |
Write an attached picture from pkt into an ID3v2 tag. | |
void | ff_id3v2_finish (ID3v2EncContext *id3, AVIOContext *pb) |
Finalize an opened ID3v2 tag. | |
int | ff_id3v2_write_simple (struct AVFormatContext *s, int id3v2_version, const char *magic) |
Write an ID3v2 tag containing all global metadata from s. | |
void | ff_id3v2_free_extra_meta (ID3v2ExtraMeta **extra_meta) |
Free memory allocated parsing special (non-text) metadata. | |
int | ff_id3v2_parse_apic (AVFormatContext *s, ID3v2ExtraMeta **extra_meta) |
Create a stream for each APIC (attached picture) extracted from the ID3v2 header. | |
Variables | |
const AVMetadataConv | ff_id3v2_34_metadata_conv [] |
const AVMetadataConv | ff_id3v2_4_metadata_conv [] |
const char | ff_id3v2_tags [][4] |
A list of text information frames allowed in both ID3 v2.3 and v2.4 http://www.id3.org/id3v2.4.0-frames http://www.id3.org/id3v2.4.0-changes. | |
const char | ff_id3v2_4_tags [][4] |
ID3v2.4-only text information frames. | |
const char | ff_id3v2_3_tags [][4] |
ID3v2.3-only text information frames. | |
const CodecMime | ff_id3v2_mime_tags [] |
const char * | ff_id3v2_picture_types [21] |
#define ID3v2_DEFAULT_MAGIC "ID3" |
Default magic bytes for ID3v2 header: "ID3".
Definition at line 35 of file id3v2.h.
Referenced by av_probe_input_format3(), avformat_open_input(), and mp3_read_probe().
#define ID3v2_FLAG_COMPRESSION 0x0008 |
#define ID3v2_FLAG_DATALEN 0x0001 |
#define ID3v2_FLAG_ENCRYPTION 0x0004 |
#define ID3v2_FLAG_UNSYNCH 0x0002 |
#define ID3v2_HEADER_SIZE 10 |
Definition at line 30 of file id3v2.h.
Referenced by ff_id3v2_read(), ff_id3v2_tag_len(), ff_id3v2_write_apic(), id3v2_put_ttag(), and oma_read_probe().
enum ID3v2Encoding |
void ff_id3v2_finish | ( | ID3v2EncContext * | id3, | |
AVIOContext * | pb | |||
) |
Finalize an opened ID3v2 tag.
Definition at line 264 of file id3v2enc.c.
Referenced by ff_id3v2_write_simple(), and mp3_queue_flush().
void ff_id3v2_free_extra_meta | ( | ID3v2ExtraMeta ** | extra_meta | ) |
Free memory allocated parsing special (non-text) metadata.
extra_meta | Pointer to a pointer to the head of a ID3v2ExtraMeta list, *extra_meta is set to NULL. |
Definition at line 766 of file id3v2.c.
Referenced by avformat_open_input(), and oma_read_header().
int ff_id3v2_match | ( | const uint8_t * | buf, | |
const char * | magic | |||
) |
Detect ID3v2 Header.
buf | must be ID3v2_HEADER_SIZE byte long | |
magic | magic bytes to identify the header. If in doubt, use ID3v2_DEFAULT_MAGIC. |
Definition at line 136 of file id3v2.c.
Referenced by av_probe_input_format3(), ff_id3v2_read(), mp3_read_probe(), and oma_read_probe().
int ff_id3v2_parse_apic | ( | AVFormatContext * | s, | |
ID3v2ExtraMeta ** | extra_meta | |||
) |
Create a stream for each APIC (attached picture) extracted from the ID3v2 header.
Definition at line 780 of file id3v2.c.
Referenced by avformat_open_input().
void ff_id3v2_read | ( | AVFormatContext * | s, | |
const char * | magic, | |||
ID3v2ExtraMeta ** | extra_meta | |||
) |
Read an ID3v2 tag, including supported extra metadata.
extra_meta | If not NULL, extra metadata is parsed into a list of ID3v2ExtraMeta structs and *extra_meta points to the head of the list |
Definition at line 735 of file id3v2.c.
Referenced by avformat_open_input(), and oma_read_header().
void ff_id3v2_start | ( | ID3v2EncContext * | id3, | |
AVIOContext * | pb, | |||
int | id3v2_version, | |||
const char * | magic | |||
) |
Initialize an ID3v2 tag.
Definition at line 151 of file id3v2enc.c.
Referenced by ff_id3v2_write_simple().
int ff_id3v2_tag_len | ( | const uint8_t * | buf | ) |
Get the length of an ID3v2 tag.
buf | must be ID3v2_HEADER_SIZE bytes long and point to the start of an already detected ID3v2 tag |
Definition at line 149 of file id3v2.c.
Referenced by av_probe_input_format3(), mp3_read_probe(), and oma_read_probe().
int ff_id3v2_write_apic | ( | AVFormatContext * | s, | |
ID3v2EncContext * | id3, | |||
AVPacket * | pkt | |||
) |
int ff_id3v2_write_metadata | ( | AVFormatContext * | s, | |
ID3v2EncContext * | id3 | |||
) |
Convert and write all global metadata from s into an ID3v2 tag.
Definition at line 165 of file id3v2enc.c.
Referenced by ff_id3v2_write_simple().
int ff_id3v2_write_simple | ( | struct AVFormatContext * | s, | |
int | id3v2_version, | |||
const char * | magic | |||
) |
Write an ID3v2 tag containing all global metadata from s.
id3v2_version | Subversion of ID3v2; supported values are 3 and 4 | |
magic | magic bytes to identify the header If in doubt, use ID3v2_DEFAULT_MAGIC. |
Definition at line 272 of file id3v2enc.c.
Referenced by oma_write_header().
const char ff_id3v2_3_tags[][4] |
ID3v2.3-only text information frames.
Definition at line 98 of file id3v2.c.
Referenced by ff_id3v2_write_metadata().
const char ff_id3v2_4_tags[][4] |
ID3v2.4-only text information frames.
Definition at line 92 of file id3v2.c.
Referenced by ff_id3v2_write_metadata().
const CodecMime ff_id3v2_mime_tags[] |
const char* ff_id3v2_picture_types[21] |
const char ff_id3v2_tags[][4] |
A list of text information frames allowed in both ID3 v2.3 and v2.4 http://www.id3.org/id3v2.4.0-frames http://www.id3.org/id3v2.4.0-changes.
Definition at line 84 of file id3v2.c.
Referenced by ff_id3v2_write_metadata().