Mercurial > libavformat.hg
diff id3v2.h @ 6121:81614e9b541b libavformat
Generalize ID3v2 functions to support ID3v2-like ID headers with a
different magic in the header (mainly targeted to Sony's .oma/.aa3
format).
Patch by Michael Karcher, ffmpeg A mkarcher dialup fu-berlin de
author | cehoyos |
---|---|
date | Fri, 11 Jun 2010 13:44:57 +0000 |
parents | 2568a59ac5fe |
children | fa244b4fe683 |
line wrap: on
line diff
--- a/id3v2.h Fri Jun 11 13:28:42 2010 +0000 +++ b/id3v2.h Fri Jun 11 13:44:57 2010 +0000 @@ -29,10 +29,17 @@ #define ID3v2_HEADER_SIZE 10 /** + * Default magic bytes for ID3v2 header: "ID3" + */ +#define ID3v2_DEFAULT_MAGIC "ID3" + +/** * Detects ID3v2 Header. - * @buf must be ID3v2_HEADER_SIZE byte long + * @buf must be ID3v2_HEADER_SIZE byte long + * @magic magic bytes to identify the header, machine byte order. + * If in doubt, use ID3v2_DEFAULT_MAGIC. */ -int ff_id3v2_match(const uint8_t *buf); +int ff_id3v2_match(const uint8_t *buf, const char *magic); /** * Gets the length of an ID3v2 tag. @@ -50,7 +57,7 @@ /** * Read an ID3v2 tag */ -void ff_id3v2_read(AVFormatContext *s); +void ff_id3v2_read(AVFormatContext *s, const char *magic); extern const AVMetadataConv ff_id3v2_metadata_conv[];