]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/id3v2.h
Handle AVID MJPEG streams directly in the MJPEG decoder.
[ffmpeg] / libavformat / id3v2.h
index 9de0bee374380733a27537072bd2de196714b5cf..a41fb271a424abe2a8ed21b3e546cabcad66c1ec 100644 (file)
@@ -54,12 +54,6 @@ typedef struct ID3v2EncContext {
     int          len;       ///< size of the tag written so far
 } ID3v2EncContext;
 
-typedef struct ID3v2ExtraMeta {
-    const char *tag;
-    void *data;
-    struct ID3v2ExtraMeta *next;
-} ID3v2ExtraMeta;
-
 typedef struct ID3v2ExtraMetaGEOB {
     uint32_t datasize;
     uint8_t *mime_type;
@@ -87,6 +81,17 @@ typedef struct ID3v2ExtraMetaCHAP {
     AVDictionary *meta;
 } ID3v2ExtraMetaCHAP;
 
+typedef struct ID3v2ExtraMeta {
+    const char *tag;
+    struct ID3v2ExtraMeta *next;
+    union {
+        ID3v2ExtraMetaAPIC apic;
+        ID3v2ExtraMetaCHAP chap;
+        ID3v2ExtraMetaGEOB geob;
+        ID3v2ExtraMetaPRIV priv;
+    } data;
+} ID3v2ExtraMeta;
+
 /**
  * Detect ID3v2 Header.
  * @param buf   must be ID3v2_HEADER_SIZE byte long
@@ -162,25 +167,25 @@ void ff_id3v2_free_extra_meta(ID3v2ExtraMeta **extra_meta);
  * Create a stream for each APIC (attached picture) extracted from the
  * ID3v2 header.
  */
-int ff_id3v2_parse_apic(AVFormatContext *s, ID3v2ExtraMeta **extra_meta);
+int ff_id3v2_parse_apic(AVFormatContext *s, ID3v2ExtraMeta *extra_meta);
 
 /**
  * Create chapters for all CHAP tags found in the ID3v2 header.
  */
-int ff_id3v2_parse_chapters(AVFormatContext *s, ID3v2ExtraMeta **extra_meta);
+int ff_id3v2_parse_chapters(AVFormatContext *s, ID3v2ExtraMeta *extra_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.
  */
-int ff_id3v2_parse_priv_dict(AVDictionary **d, ID3v2ExtraMeta **extra_meta);
+int ff_id3v2_parse_priv_dict(AVDictionary **d, ID3v2ExtraMeta *extra_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.
  */
-int ff_id3v2_parse_priv(AVFormatContext *s, ID3v2ExtraMeta **extra_meta);
+int ff_id3v2_parse_priv(AVFormatContext *s, ID3v2ExtraMeta *extra_meta);
 
 extern const AVMetadataConv ff_id3v2_34_metadata_conv[];
 extern const AVMetadataConv ff_id3v2_4_metadata_conv[];