29 {
"WM/AlbumArtist",
"album_artist" },
30 {
"WM/AlbumTitle",
"album" },
31 {
"Author",
"artist" },
32 {
"Description",
"comment" },
33 {
"WM/Composer",
"composer" },
34 {
"WM/EncodedBy",
"encoded_by" },
35 {
"WM/EncodingSettings",
"encoder" },
36 {
"WM/Genre",
"genre" },
37 {
"WM/Language",
"language" },
38 {
"WM/OriginalFilename",
"filename" },
39 {
"WM/PartOfSet",
"disc" },
42 {
"WM/SetSubTitle",
"disc_subtitle" },
43 {
"WM/Publisher",
"publisher" },
44 {
"WM/Tool",
"encoder" },
45 {
"WM/TrackNumber",
"track" },
46 {
"WM/MediaStationCallSign",
"service_provider" },
47 {
"WM/MediaStationName",
"service_name" },
61 int ret,
type, picsize, desc_len;
64 if (
len < 1 + 4 + 2 + 2) {
84 if (!strncmp(mime->
str, mimetype,
sizeof(mimetype))) {
96 if (picsize >=
len || ((
int64_t)
len - picsize) * 2 + 1 > INT_MAX) {
103 desc_len = (
len - picsize) * 2 + 1;
112 st =
s->streams[
s->nb_streams - 1];
137 if (id3v2_extra_meta) {
148 if (!strcmp(
name,
"WM/Picture"))
150 else if (!strcmp(
name,
"ID3"))
static int asf_read_picture(AVFormatContext *s, int len)
const AVMetadataConv ff_asf_metadata_conv[]
static int get_id3_tag(AVFormatContext *s, int len)
int ff_asf_handle_byte_array(AVFormatContext *s, const char *name, int val_len)
Handles both attached pictures as well as id3 tags.
int avio_get_str16le(AVIOContext *pb, int maxlen, char *buf, int buflen)
Read a UTF-16 string from pb and convert it to UTF-8.
unsigned int avio_rl32(AVIOContext *s)
int avio_r8(AVIOContext *s)
int ff_add_attached_pic(AVFormatContext *s, AVStream *st, AVIOContext *pb, AVBufferRef **buf, int size)
Add an attached pic to an AVStream.
AVCodecID
Identify the syntax and semantics of the bitstream.
#define AV_DICT_DONT_STRDUP_VAL
Take ownership of a value that's been allocated with av_malloc() or another memory allocation functio...
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AV_LOG_WARNING
Something somehow does not look correct.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
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.
const char *const ff_id3v2_picture_types[21]
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.
int ff_id3v2_parse_chapters(AVFormatContext *s, ID3v2ExtraMeta *cur)
Create chapters for all CHAP tags found in the ID3v2 header.
const CodecMime ff_id3v2_mime_tags[]
#define ID3v2_DEFAULT_MAGIC
Default magic bytes for ID3v2 header: "ID3".
Memory handling functions.
#define FF_ARRAY_ELEMS(a)
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
AVCodecParameters * codecpar
Codec parameters associated with this stream.