]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
rename AVMetaData to AVMetadata and meta_data to metadata
authoraurel <aurel@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sun, 4 Jan 2009 23:31:31 +0000 (23:31 +0000)
committeraurel <aurel@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sun, 4 Jan 2009 23:31:31 +0000 (23:31 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@16430 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavformat/avformat.h
libavformat/avidec.c
libavformat/avienc.c
libavformat/metadata.c
libavformat/metadata.h
libavformat/utils.c

index 3619a8b9496f5f07fe7b59c80d818ecca18645a4..811c7722ccd783c69ddeb2f0989fe8fde475b172 100644 (file)
@@ -73,9 +73,9 @@ unsigned avformat_version(void);
 typedef struct {
     char *key;
     char *value;
-}AVMetaDataTag;
+}AVMetadataTag;
 
-struct AVMetaData;
+struct AVMetadata;
 
 /**
  * gets a metadata element with matching key.
@@ -83,15 +83,15 @@ struct AVMetaData;
  * @param flags allows case as well as suffix insensitive comparissions.
  * @return found tag or NULL, changing key or value leads to undefined behavior.
  */
-AVMetaDataTag *
-av_metadata_get(struct AVMetaData *m, const char *key, const AVMetaDataTag *prev, int flags);
+AVMetadataTag *
+av_metadata_get(struct AVMetadata *m, const char *key, const AVMetadataTag *prev, int flags);
 
 /**
  * sets the given tag in m, overwriting an existing tag.
  * @param tag tag to add to m, key and value will be av_strduped.
  * @return >= 0 if success otherwise error code that is <0.
  */
-int av_metadata_set(struct AVMetaData **m, AVMetaDataTag tag);
+int av_metadata_set(struct AVMetadata **m, AVMetadataTag tag);
 
 
 /* packet functions */
@@ -481,7 +481,7 @@ typedef struct AVStream {
      */
     AVRational sample_aspect_ratio;
 
-    struct AVMetaData *meta_data;
+    struct AVMetadata *metadata;
 } AVStream;
 
 #define AV_PROGRAM_RUNNING 1
@@ -500,7 +500,7 @@ typedef struct AVProgram {
     enum AVDiscard discard;        ///< selects which program to discard and which to feed to the caller
     unsigned int   *stream_index;
     unsigned int   nb_stream_indexes;
-    struct AVMetaData *meta_data;
+    struct AVMetadata *metadata;
 } AVProgram;
 
 #define AVFMTCTX_NOHEADER      0x0001 /**< signal that no header is present
@@ -511,7 +511,7 @@ typedef struct AVChapter {
     AVRational time_base;   ///< time base in which the start/end timestamps are specified
     int64_t start, end;     ///< chapter start/end time in time_base units
     char *title;            ///< chapter title
-    struct AVMetaData *meta_data;
+    struct AVMetadata *metadata;
 } AVChapter;
 
 #define MAX_STREAMS 20
@@ -661,7 +661,7 @@ typedef struct AVFormatContext {
 
     struct AVPacketList *packet_buffer_end;
 
-    struct AVMetaData *meta_data;
+    struct AVMetadata *metadata;
 } AVFormatContext;
 
 typedef struct AVPacketList {
index ebb1a4c674bc2a8497ad8ce06d058fa7e9af2023..14f0ebdec5b7f558daabc160e133f91e57b77580 100644 (file)
@@ -226,7 +226,7 @@ static int avi_read_tag(AVFormatContext *s, const char *key, unsigned int size)
     get_strz(pb, value, sizeof(value));
     url_fseek(pb, i+size, SEEK_SET);
 
-    return av_metadata_set(&s->meta_data, (const AVMetaDataTag){key, value});
+    return av_metadata_set(&s->metadata, (const AVMetadataTag){key, value});
 }
 
 static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
index 4ae608f78073e2010bbef47d0307c08529d83c9b..cea513f9c8a7d926dab020e9420b1bd998920097 100644 (file)
@@ -105,9 +105,9 @@ static void avi_write_info_tag(ByteIOContext *pb, const char *tag, const char *s
 
 static void avi_write_info_tag2(AVFormatContext *s, const char *fourcc, const char *key1, const char *key2)
 {
-    AVMetaDataTag *tag= av_metadata_get(s->meta_data, key1, NULL, AV_METADATA_IGNORE_CASE);
+    AVMetadataTag *tag= av_metadata_get(s->metadata, key1, NULL, AV_METADATA_IGNORE_CASE);
     if(!tag && key2)
-        tag= av_metadata_get(s->meta_data, key2, NULL, AV_METADATA_IGNORE_CASE);
+        tag= av_metadata_get(s->metadata, key2, NULL, AV_METADATA_IGNORE_CASE);
     if(tag)
         avi_write_info_tag(s->pb, fourcc, tag->value);
 }
index d223d7c0d91a223fac6a297b09ec54c0ff15d335..0bfac393b31cefece2239b8f410823f695193a71 100644 (file)
@@ -20,8 +20,8 @@
 
 #include "metadata.h"
 
-AVMetaDataTag *
-av_metadata_get(struct AVMetaData *m, const char *key, const AVMetaDataTag *prev, int flags)
+AVMetadataTag *
+av_metadata_get(struct AVMetadata *m, const char *key, const AVMetadataTag *prev, int flags)
 {
     unsigned int i, j;
 
@@ -44,10 +44,10 @@ av_metadata_get(struct AVMetaData *m, const char *key, const AVMetaDataTag *prev
     return NULL;
 }
 
-int av_metadata_set(struct AVMetaData **pm, AVMetaDataTag elem)
+int av_metadata_set(struct AVMetadata **pm, AVMetadataTag elem)
 {
-    struct AVMetaData *m= *pm;
-    AVMetaDataTag *tag= av_metadata_get(m, elem.key, NULL, 0);
+    struct AVMetadata *m= *pm;
+    AVMetadataTag *tag= av_metadata_get(m, elem.key, NULL, 0);
 
     if(!m)
         m=*pm= av_mallocz(sizeof(*m));
@@ -57,7 +57,7 @@ int av_metadata_set(struct AVMetaData **pm, AVMetaDataTag elem)
         av_free(tag->key);
         *tag= m->elems[--m->count];
     }else{
-        AVMetaDataTag *tmp= av_realloc(m->elems, (m->count+1) * sizeof(*m->elems));
+        AVMetadataTag *tmp= av_realloc(m->elems, (m->count+1) * sizeof(*m->elems));
         if(tmp){
             m->elems= tmp;
         }else
index e9ada571a1e257c45f340c18d8caab611f11bcba..515b6cdb3b0814f99a04a1ea5f0767f8d30a6f9f 100644 (file)
@@ -30,9 +30,9 @@
 
 #include "avformat.h"
 
-struct AVMetaData{
+struct AVMetadata{
     int count;
-    AVMetaDataTag *elems;
+    AVMetadataTag *elems;
 };
 
 #endif /* AVFORMAT_METADATA_H */
index e2c090258c095f885c60f608684c961403f91020..68cb0da6c43e0bf54465906ab79d929197001d46 100644 (file)
@@ -2306,14 +2306,14 @@ void av_close_input_stream(AVFormatContext *s)
         av_free(s->chapters[s->nb_chapters]);
     }
     av_freep(&s->chapters);
-    if(s->meta_data){
-        while(s->meta_data->count--){
-            av_freep(&s->meta_data->elems[s->meta_data->count].key);
-            av_freep(&s->meta_data->elems[s->meta_data->count].value);
+    if(s->metadata){
+        while(s->metadata->count--){
+            av_freep(&s->metadata->elems[s->metadata->count].key);
+            av_freep(&s->metadata->elems[s->metadata->count].value);
         }
-        av_freep(&s->meta_data->elems);
+        av_freep(&s->metadata->elems);
     }
-    av_freep(&s->meta_data);
+    av_freep(&s->metadata);
     av_free(s);
 }