FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
id3v2.h File Reference
#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   ID3v2ExtraMetaGEOB
 
struct   ID3v2ExtraMetaAPIC
 
struct   ID3v2ExtraMetaPRIV
 
struct   ID3v2ExtraMetaCHAP
 
struct   ID3v2ExtraMeta
 

Macros

#define  ID3v2_HEADER_SIZE   10
 
#define  ID3v2_DEFAULT_MAGIC   "ID3"
  Default magic bytes for ID3v2 header: "ID3". More...
 
#define  ID3v2_FLAG_DATALEN   0x0001
 
#define  ID3v2_FLAG_UNSYNCH   0x0002
 
#define  ID3v2_FLAG_ENCRYPTION   0x0004
 
#define  ID3v2_FLAG_COMPRESSION   0x0008
 
#define  ID3v2_PRIV_METADATA_PREFIX   "id3v2_priv."
 

Enumerations

 

Functions

int  ff_id3v2_match (const uint8_t *buf, const char *magic)
  Detect ID3v2 Header. More...
 
int  ff_id3v2_tag_len (const uint8_t *buf)
  Get the length of an ID3v2 tag. More...
 
void  ff_id3v2_read_dict (AVIOContext *pb, AVDictionary **metadata, const char *magic, ID3v2ExtraMeta **extra_meta)
  Read an ID3v2 tag into specified dictionary and retrieve supported extra metadata. More...
 
void  ff_id3v2_read (AVFormatContext *s, const char *magic, ID3v2ExtraMeta **extra_meta, unsigned int max_search_size)
  Read an ID3v2 tag, including supported extra metadata. More...
 
void  ff_id3v2_start (ID3v2EncContext *id3, AVIOContext *pb, int id3v2_version, const char *magic)
  Initialize an ID3v2 tag. More...
 
  Convert and write all global metadata from s into an ID3v2 tag. More...
 
  Write an attached picture from pkt into an ID3v2 tag. More...
 
void  ff_id3v2_finish (ID3v2EncContext *id3, AVIOContext *pb, int padding_bytes)
  Finalize an opened ID3v2 tag. More...
 
int  ff_id3v2_write_simple (struct AVFormatContext *s, int id3v2_version, const char *magic)
  Write an ID3v2 tag containing all global metadata from s. More...
 
  Free memory allocated parsing special (non-text) metadata. More...
 
  Create a stream for each APIC (attached picture) extracted from the ID3v2 header. More...
 
  Create chapters for all CHAP tags found in the ID3v2 header. More...
 
  Parse PRIV tags into a dictionary. More...
 
  Add metadata for all PRIV tags in the ID3v2 header. More...
 

Variables

 
 
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. More...
 
const char  ff_id3v2_4_tags [][4]
  ID3v2.4-only text information frames. More...
 
const char  ff_id3v2_3_tags [][4]
  ID3v2.3-only text information frames. More...
 
 
const char *const  ff_id3v2_picture_types [21]
 

Macro Definition Documentation

ID3v2_HEADER_SIZE

#define ID3v2_HEADER_SIZE   10

Definition at line 30 of file id3v2.h.

ID3v2_DEFAULT_MAGIC

#define ID3v2_DEFAULT_MAGIC   "ID3"

Default magic bytes for ID3v2 header: "ID3".

Definition at line 35 of file id3v2.h.

ID3v2_FLAG_DATALEN

#define ID3v2_FLAG_DATALEN   0x0001

Definition at line 37 of file id3v2.h.

ID3v2_FLAG_UNSYNCH

#define ID3v2_FLAG_UNSYNCH   0x0002

Definition at line 38 of file id3v2.h.

ID3v2_FLAG_ENCRYPTION

#define ID3v2_FLAG_ENCRYPTION   0x0004

Definition at line 39 of file id3v2.h.

ID3v2_FLAG_COMPRESSION

#define ID3v2_FLAG_COMPRESSION   0x0008

Definition at line 40 of file id3v2.h.

ID3v2_PRIV_METADATA_PREFIX

#define ID3v2_PRIV_METADATA_PREFIX   "id3v2_priv."

Definition at line 42 of file id3v2.h.

Enumeration Type Documentation

ID3v2Encoding

Enumerator
ID3v2_ENCODING_ISO8859 
ID3v2_ENCODING_UTF16BOM 
ID3v2_ENCODING_UTF16BE 
ID3v2_ENCODING_UTF8 

Definition at line 44 of file id3v2.h.

Function Documentation

ff_id3v2_match()

int ff_id3v2_match ( const uint8_t *  buf,
const char *  magic 
)

Detect ID3v2 Header.

Parameters
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 143 of file id3v2.c.

Referenced by adts_aac_read_packet(), av_probe_input_format3(), id3v2_read_internal(), intercept_id3(), mp3_read_probe(), and oma_read_probe().

ff_id3v2_tag_len()

int ff_id3v2_tag_len ( const uint8_t *  buf )

Get the length of an ID3v2 tag.

Parameters
buf must be ID3v2_HEADER_SIZE bytes long and point to the start of an already detected ID3v2 tag

Definition at line 156 of file id3v2.c.

Referenced by av_probe_input_format3(), handle_id3(), intercept_id3(), mp3_read_probe(), and oma_read_probe().

ff_id3v2_read_dict()

void ff_id3v2_read_dict ( AVIOContextpb,
AVDictionary **  metadata,
const char *  magic,
ID3v2ExtraMeta **  extra_meta 
)

Read an ID3v2 tag into specified dictionary and retrieve supported extra metadata.

Parameters
metadata Parsed metadata is stored here
[out] 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 1129 of file id3v2.c.

Referenced by avformat_open_input(), handle_id3(), and parse_id3().

ff_id3v2_read()

void ff_id3v2_read ( AVFormatContexts,
const char *  magic,
ID3v2ExtraMeta **  extra_meta,
unsigned int  max_search_size 
)

Read an ID3v2 tag, including supported extra metadata.

Data is read from and stored to AVFormatContext.

Parameters
[out] 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
[opt] max_search_search restrict ID3 magic number search (bytes from start)

Definition at line 1135 of file id3v2.c.

Referenced by aiff_read_header(), get_id3_tag(), oma_read_header(), parse_dsd_prop(), and read_id3().

ff_id3v2_start()

void ff_id3v2_start ( ID3v2EncContextid3,
AVIOContextpb,
int  id3v2_version,
const char *  magic 
)

Initialize an ID3v2 tag.

Definition at line 205 of file id3v2enc.c.

Referenced by ff_id3v2_write_simple(), mp3_write_header(), and put_id3v2_tags().

ff_id3v2_write_metadata()

int ff_id3v2_write_metadata ( AVFormatContexts,
ID3v2EncContextid3 
)

Convert and write all global metadata from s into an ID3v2 tag.

Definition at line 330 of file id3v2enc.c.

Referenced by ff_id3v2_write_simple(), mp3_write_header(), and put_id3v2_tags().

ff_id3v2_write_apic()

int ff_id3v2_write_apic ( AVFormatContexts,
ID3v2EncContextid3,
AVPacketpkt 
)

Write an attached picture from pkt into an ID3v2 tag.

Definition at line 351 of file id3v2enc.c.

Referenced by mp3_write_packet(), and put_id3v2_tags().

ff_id3v2_finish()

void ff_id3v2_finish ( ID3v2EncContextid3,
AVIOContextpb,
int  padding_bytes 
)

Finalize an opened ID3v2 tag.

Definition at line 420 of file id3v2enc.c.

Referenced by ff_id3v2_write_simple(), mp3_queue_flush(), mp3_write_header(), and put_id3v2_tags().

ff_id3v2_write_simple()

int ff_id3v2_write_simple ( struct AVFormatContexts,
int  id3v2_version,
const char *  magic 
)

Write an ID3v2 tag containing all global metadata from s.

Parameters
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 444 of file id3v2enc.c.

Referenced by adts_write_header(), and oma_write_header().

ff_id3v2_free_extra_meta()

void ff_id3v2_free_extra_meta ( ID3v2ExtraMeta **  extra_meta )

Free memory allocated parsing special (non-text) metadata.

Parameters
extra_meta Pointer to a pointer to the head of a ID3v2ExtraMeta list, *extra_meta is set to NULL.

Definition at line 1141 of file id3v2.c.

Referenced by aiff_read_header(), avformat_open_input(), free_playlist_list(), get_id3_tag(), handle_id3(), hls_read_header(), oma_read_header(), parse_dsd_prop(), and read_id3().

ff_id3v2_parse_apic()

int ff_id3v2_parse_apic ( AVFormatContexts,
ID3v2ExtraMetaextra_meta 
)

Create a stream for each APIC (attached picture) extracted from the ID3v2 header.

Definition at line 1157 of file id3v2.c.

Referenced by aiff_read_header(), avformat_open_input(), get_id3_tag(), handle_id3(), hls_read_header(), parse_dsd_prop(), and read_id3().

ff_id3v2_parse_chapters()

int ff_id3v2_parse_chapters ( AVFormatContexts,
ID3v2ExtraMetaextra_meta 
)

Create chapters for all CHAP tags found in the ID3v2 header.

Definition at line 1188 of file id3v2.c.

Referenced by aiff_read_header(), avformat_open_input(), get_id3_tag(), oma_read_header(), parse_dsd_prop(), and read_id3().

ff_id3v2_parse_priv_dict()

int ff_id3v2_parse_priv_dict ( AVDictionary **  d,
ID3v2ExtraMetaextra_meta 
)

Parse PRIV tags into a dictionary.

The PRIV owner is the metadata key. The PRIV data is the value, with non-printable characters escaped.

Definition at line 1213 of file id3v2.c.

Referenced by ff_id3v2_parse_priv(), and handle_id3().

ff_id3v2_parse_priv()

int ff_id3v2_parse_priv ( AVFormatContexts,
ID3v2ExtraMetaextra_meta 
)

Add metadata for all PRIV tags in the ID3v2 header.

The PRIV owner is the metadata key. The PRIV data is the value, with non-printable characters escaped.

Definition at line 1253 of file id3v2.c.

Referenced by avformat_open_input(), and hls_read_header().

Variable Documentation

ff_id3v2_34_metadata_conv

const AVMetadataConv ff_id3v2_34_metadata_conv[]

Definition at line 45 of file id3v2.c.

Referenced by id3v2_read_internal(), read_chapter(), and write_metadata().

ff_id3v2_4_metadata_conv

const AVMetadataConv ff_id3v2_4_metadata_conv[]

Definition at line 64 of file id3v2.c.

Referenced by id3v2_read_internal(), read_chapter(), and write_metadata().

ff_id3v2_tags

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 88 of file id3v2.c.

Referenced by write_metadata().

ff_id3v2_4_tags

const char ff_id3v2_4_tags[][4]

ID3v2.4-only text information frames.

Definition at line 96 of file id3v2.c.

Referenced by write_metadata().

ff_id3v2_3_tags

const char ff_id3v2_3_tags[][4]

ID3v2.3-only text information frames.

Definition at line 102 of file id3v2.c.

Referenced by write_metadata().

ff_id3v2_mime_tags

const CodecMime ff_id3v2_mime_tags[]

Definition at line 131 of file id3v2.c.

Referenced by asf_read_picture(), ff_flac_parse_picture(), ff_id3v2_write_apic(), flac_write_picture(), query_codec(), and read_apic().

ff_id3v2_picture_types

const char* const ff_id3v2_picture_types[21]

Definition at line 107 of file id3v2.c.

Referenced by asf_read_picture(), ff_flac_parse_picture(), ff_id3v2_write_apic(), flac_write_picture(), and read_apic().


Generated on Wed Aug 24 2022 21:38:49 for FFmpeg by   doxygen 1.8.17

AltStyle によって変換されたページ (->オリジナル) /