[FFmpeg-cvslog] lavf: remove disabled FF_API_OLD_METADATA2 cruft

Anton Khirnov git at videolan.org
Sat Jan 28 08:05:06 CET 2012


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Thu Jan 12 13:31:55 2012 +0100| [38233fc13106627e05add93df227ec72a11ed24a] | committer: Anton Khirnov

lavf: remove disabled FF_API_OLD_METADATA2 cruft

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=38233fc13106627e05add93df227ec72a11ed24a
---

 libavformat/avformat.h |   76 ------------------------------------------------
 libavformat/metadata.c |   29 ------------------
 libavformat/metadata.h |    7 +---
 libavformat/version.h  |    3 --
 4 files changed, 2 insertions(+), 113 deletions(-)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index ec343ba..11002e4 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -220,74 +220,6 @@ struct AVFormatContext;
  * @}
  */
 
-#if FF_API_OLD_METADATA2
-/**
- * @defgroup old_metadata Old metadata API
- * The following functions are deprecated, use
- * their equivalents from libavutil/dict.h instead.
- * @{
- */
-
-#define AV_METADATA_MATCH_CASE      AV_DICT_MATCH_CASE
-#define AV_METADATA_IGNORE_SUFFIX   AV_DICT_IGNORE_SUFFIX
-#define AV_METADATA_DONT_STRDUP_KEY AV_DICT_DONT_STRDUP_KEY
-#define AV_METADATA_DONT_STRDUP_VAL AV_DICT_DONT_STRDUP_VAL
-#define AV_METADATA_DONT_OVERWRITE  AV_DICT_DONT_OVERWRITE
-
-typedef attribute_deprecated AVDictionary AVMetadata;
-typedef attribute_deprecated AVDictionaryEntry  AVMetadataTag;
-
-typedef struct AVMetadataConv AVMetadataConv;
-
-/**
- * Get a metadata element with matching key.
- *
- * @param prev Set to the previous matching element to find the next.
- *             If set to NULL the first matching element is returned.
- * @param flags Allows case as well as suffix-insensitive comparisons.
- * @return Found tag or NULL, changing key or value leads to undefined behavior.
- */
-attribute_deprecated AVDictionaryEntry *
-av_metadata_get(AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags);
-
-/**
- * Set the given tag in *pm, overwriting an existing tag.
- *
- * @param pm pointer to a pointer to a metadata struct. If *pm is NULL
- * a metadata struct is allocated and put in *pm.
- * @param key tag key to add to *pm (will be av_strduped depending on flags)
- * @param value tag value to add to *pm (will be av_strduped depending on flags).
- *        Passing a NULL value will cause an existing tag to be deleted.
- * @return >= 0 on success otherwise an error code <0
- */
-attribute_deprecated int av_metadata_set2(AVDictionary **pm, const char *key, const char *value, int flags);
-
-/**
- * This function is provided for compatibility reason and currently does nothing.
- */
-attribute_deprecated void av_metadata_conv(struct AVFormatContext *ctx, const AVMetadataConv *d_conv,
-                                                                        const AVMetadataConv *s_conv);
-
-/**
- * Copy metadata from one AVDictionary struct into another.
- * @param dst pointer to a pointer to a AVDictionary struct. If *dst is NULL,
- *            this function will allocate a struct for you and put it in *dst
- * @param src pointer to source AVDictionary struct
- * @param flags flags to use when setting metadata in *dst
- * @note metadata is read using the AV_DICT_IGNORE_SUFFIX flag
- */
-attribute_deprecated void av_metadata_copy(AVDictionary **dst, AVDictionary *src, int flags);
-
-/**
- * Free all the memory allocated for an AVDictionary struct.
- */
-attribute_deprecated void av_metadata_free(AVDictionary **m);
-/**
- * @}
- */
-#endif
-
-
 /* packet functions */
 
 
@@ -434,10 +366,6 @@ typedef struct AVOutputFormat {
 
     enum CodecID subtitle_codec; /**< default subtitle codec */
 
-#if FF_API_OLD_METADATA2
-    const AVMetadataConv *metadata_conv;
-#endif
-
     const AVClass *priv_class; ///< AVClass for the private context
 
     /**
@@ -569,10 +497,6 @@ typedef struct AVInputFormat {
      */
     int (*read_seek2)(struct AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags);
 
-#if FF_API_OLD_METADATA2
-    const AVMetadataConv *metadata_conv;
-#endif
-
     const AVClass *priv_class; ///< AVClass for the private context
 
     /* private fields */
diff --git a/libavformat/metadata.c b/libavformat/metadata.c
index 7d85363..7f28314 100644
--- a/libavformat/metadata.c
+++ b/libavformat/metadata.c
@@ -23,35 +23,6 @@
 #include "libavutil/dict.h"
 #include "libavutil/avstring.h"
 
-#if FF_API_OLD_METADATA2
-AVDictionaryEntry *
-av_metadata_get(AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
-{
-    return av_dict_get(m, key, prev, flags);
-}
-
-int av_metadata_set2(AVDictionary **pm, const char *key, const char *value, int flags)
-{
-    return av_dict_set(pm, key, value, flags);
-}
-
-void av_metadata_conv(AVFormatContext *ctx, const AVMetadataConv *d_conv,
-                                            const AVMetadataConv *s_conv)
-{
-    return;
-}
-
-void av_metadata_free(AVDictionary **pm)
-{
-    av_dict_free(pm);
-}
-
-void av_metadata_copy(AVDictionary **dst, AVDictionary *src, int flags)
-{
-    av_dict_copy(dst, src, flags);
-}
-#endif
-
 void ff_metadata_conv(AVDictionary **pm, const AVMetadataConv *d_conv,
                                        const AVMetadataConv *s_conv)
 {
diff --git a/libavformat/metadata.h b/libavformat/metadata.h
index 33e0d1f..eee3ee4 100644
--- a/libavformat/metadata.h
+++ b/libavformat/metadata.h
@@ -31,13 +31,10 @@
 #include "avformat.h"
 #include "libavutil/dict.h"
 
-struct AVMetadataConv{
+typedef struct AVMetadataConv {
     const char *native;
     const char *generic;
-};
-#if !FF_API_OLD_METADATA2
-typedef struct AVMetadataConv AVMetadataConv;
-#endif
+} AVMetadataConv;
 
 void ff_metadata_conv(AVDictionary **pm, const AVMetadataConv *d_conv,
                                        const AVMetadataConv *s_conv);
diff --git a/libavformat/version.h b/libavformat/version.h
index b15e03f..b362352 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -47,9 +47,6 @@
  * Those FF_API_* defines are not part of public API.
  * They may change, break or disappear at any time.
  */
-#ifndef FF_API_OLD_METADATA2
-#define FF_API_OLD_METADATA2           (LIBAVFORMAT_VERSION_MAJOR < 54)
-#endif
 #ifndef FF_API_DUMP_FORMAT
 #define FF_API_DUMP_FORMAT             (LIBAVFORMAT_VERSION_MAJOR < 54)
 #endif



More information about the ffmpeg-cvslog mailing list