diff avformat.h @ 4617:f04bc8b70940 libavformat

add a metadata conversion API
author aurel
date Sat, 28 Feb 2009 23:34:16 +0000
parents af7b24671b7d
children 5b9eddbee9c4
line wrap: on
line diff
--- a/avformat.h	Sat Feb 28 19:34:50 2009 +0000
+++ b/avformat.h	Sat Feb 28 23:34:16 2009 +0000
@@ -46,6 +46,8 @@
 
 #include "avio.h"
 
+struct AVFormatContext;
+
 
 /*
  * Public Metadata API.
@@ -77,6 +79,7 @@
 }AVMetadataTag;
 
 typedef struct AVMetadata AVMetadata;
+typedef struct AVMetadataConv AVMetadataConv;
 
 /**
  * Gets a metadata element with matching key.
@@ -96,6 +99,15 @@
 int av_metadata_set(AVMetadata **pm, const char *key, const char *value);
 
 /**
+ * Convert all the metadata sets from ctx according to the source and
+ * destination conversion tables.
+ * @param d_conv destination tags format conversion table
+ * @param s_conv source tags format conversion table
+ */
+void av_metadata_conv(struct AVFormatContext *ctx,const AVMetadataConv *d_conv,
+                                                  const AVMetadataConv *s_conv);
+
+/**
  * Frees all the memory allocated for an AVMetadata struct.
  */
 void av_metadata_free(AVMetadata **m);
@@ -220,8 +232,6 @@
 
 struct AVCodecTag;
 
-struct AVFormatContext;
-
 /** This structure contains the data a format has to probe a file. */
 typedef struct AVProbeData {
     const char *filename;
@@ -299,6 +309,8 @@
 
     enum CodecID subtitle_codec; /**< default subtitle codec */
 
+    AVMetadataConv *metadata_conv;
+
     /* private fields */
     struct AVOutputFormat *next;
 } AVOutputFormat;
@@ -378,6 +390,8 @@
      */
     int (*read_seek2)(struct AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags);
 
+    AVMetadataConv *metadata_conv;
+
     /* private fields */
     struct AVInputFormat *next;
 } AVInputFormat;