... | ... |
@@ -220,74 +220,6 @@ struct AVFormatContext; |
220 | 220 |
* @} |
221 | 221 |
*/ |
222 | 222 |
|
223 |
-#if FF_API_OLD_METADATA2 |
|
224 |
-/** |
|
225 |
- * @defgroup old_metadata Old metadata API |
|
226 |
- * The following functions are deprecated, use |
|
227 |
- * their equivalents from libavutil/dict.h instead. |
|
228 |
- * @{ |
|
229 |
- */ |
|
230 |
- |
|
231 |
-#define AV_METADATA_MATCH_CASE AV_DICT_MATCH_CASE |
|
232 |
-#define AV_METADATA_IGNORE_SUFFIX AV_DICT_IGNORE_SUFFIX |
|
233 |
-#define AV_METADATA_DONT_STRDUP_KEY AV_DICT_DONT_STRDUP_KEY |
|
234 |
-#define AV_METADATA_DONT_STRDUP_VAL AV_DICT_DONT_STRDUP_VAL |
|
235 |
-#define AV_METADATA_DONT_OVERWRITE AV_DICT_DONT_OVERWRITE |
|
236 |
- |
|
237 |
-typedef attribute_deprecated AVDictionary AVMetadata; |
|
238 |
-typedef attribute_deprecated AVDictionaryEntry AVMetadataTag; |
|
239 |
- |
|
240 |
-typedef struct AVMetadataConv AVMetadataConv; |
|
241 |
- |
|
242 |
-/** |
|
243 |
- * Get a metadata element with matching key. |
|
244 |
- * |
|
245 |
- * @param prev Set to the previous matching element to find the next. |
|
246 |
- * If set to NULL the first matching element is returned. |
|
247 |
- * @param flags Allows case as well as suffix-insensitive comparisons. |
|
248 |
- * @return Found tag or NULL, changing key or value leads to undefined behavior. |
|
249 |
- */ |
|
250 |
-attribute_deprecated AVDictionaryEntry * |
|
251 |
-av_metadata_get(AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags); |
|
252 |
- |
|
253 |
-/** |
|
254 |
- * Set the given tag in *pm, overwriting an existing tag. |
|
255 |
- * |
|
256 |
- * @param pm pointer to a pointer to a metadata struct. If *pm is NULL |
|
257 |
- * a metadata struct is allocated and put in *pm. |
|
258 |
- * @param key tag key to add to *pm (will be av_strduped depending on flags) |
|
259 |
- * @param value tag value to add to *pm (will be av_strduped depending on flags). |
|
260 |
- * Passing a NULL value will cause an existing tag to be deleted. |
|
261 |
- * @return >= 0 on success otherwise an error code <0 |
|
262 |
- */ |
|
263 |
-attribute_deprecated int av_metadata_set2(AVDictionary **pm, const char *key, const char *value, int flags); |
|
264 |
- |
|
265 |
-/** |
|
266 |
- * This function is provided for compatibility reason and currently does nothing. |
|
267 |
- */ |
|
268 |
-attribute_deprecated void av_metadata_conv(struct AVFormatContext *ctx, const AVMetadataConv *d_conv, |
|
269 |
- const AVMetadataConv *s_conv); |
|
270 |
- |
|
271 |
-/** |
|
272 |
- * Copy metadata from one AVDictionary struct into another. |
|
273 |
- * @param dst pointer to a pointer to a AVDictionary struct. If *dst is NULL, |
|
274 |
- * this function will allocate a struct for you and put it in *dst |
|
275 |
- * @param src pointer to source AVDictionary struct |
|
276 |
- * @param flags flags to use when setting metadata in *dst |
|
277 |
- * @note metadata is read using the AV_DICT_IGNORE_SUFFIX flag |
|
278 |
- */ |
|
279 |
-attribute_deprecated void av_metadata_copy(AVDictionary **dst, AVDictionary *src, int flags); |
|
280 |
- |
|
281 |
-/** |
|
282 |
- * Free all the memory allocated for an AVDictionary struct. |
|
283 |
- */ |
|
284 |
-attribute_deprecated void av_metadata_free(AVDictionary **m); |
|
285 |
-/** |
|
286 |
- * @} |
|
287 |
- */ |
|
288 |
-#endif |
|
289 |
- |
|
290 |
- |
|
291 | 223 |
/* packet functions */ |
292 | 224 |
|
293 | 225 |
|
... | ... |
@@ -434,10 +366,6 @@ typedef struct AVOutputFormat { |
434 | 434 |
|
435 | 435 |
enum CodecID subtitle_codec; /**< default subtitle codec */ |
436 | 436 |
|
437 |
-#if FF_API_OLD_METADATA2 |
|
438 |
- const AVMetadataConv *metadata_conv; |
|
439 |
-#endif |
|
440 |
- |
|
441 | 437 |
const AVClass *priv_class; ///< AVClass for the private context |
442 | 438 |
|
443 | 439 |
/** |
... | ... |
@@ -569,10 +497,6 @@ typedef struct AVInputFormat { |
569 | 569 |
*/ |
570 | 570 |
int (*read_seek2)(struct AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags); |
571 | 571 |
|
572 |
-#if FF_API_OLD_METADATA2 |
|
573 |
- const AVMetadataConv *metadata_conv; |
|
574 |
-#endif |
|
575 |
- |
|
576 | 572 |
const AVClass *priv_class; ///< AVClass for the private context |
577 | 573 |
|
578 | 574 |
/* private fields */ |
... | ... |
@@ -23,35 +23,6 @@ |
23 | 23 |
#include "libavutil/dict.h" |
24 | 24 |
#include "libavutil/avstring.h" |
25 | 25 |
|
26 |
-#if FF_API_OLD_METADATA2 |
|
27 |
-AVDictionaryEntry * |
|
28 |
-av_metadata_get(AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags) |
|
29 |
-{ |
|
30 |
- return av_dict_get(m, key, prev, flags); |
|
31 |
-} |
|
32 |
- |
|
33 |
-int av_metadata_set2(AVDictionary **pm, const char *key, const char *value, int flags) |
|
34 |
-{ |
|
35 |
- return av_dict_set(pm, key, value, flags); |
|
36 |
-} |
|
37 |
- |
|
38 |
-void av_metadata_conv(AVFormatContext *ctx, const AVMetadataConv *d_conv, |
|
39 |
- const AVMetadataConv *s_conv) |
|
40 |
-{ |
|
41 |
- return; |
|
42 |
-} |
|
43 |
- |
|
44 |
-void av_metadata_free(AVDictionary **pm) |
|
45 |
-{ |
|
46 |
- av_dict_free(pm); |
|
47 |
-} |
|
48 |
- |
|
49 |
-void av_metadata_copy(AVDictionary **dst, AVDictionary *src, int flags) |
|
50 |
-{ |
|
51 |
- av_dict_copy(dst, src, flags); |
|
52 |
-} |
|
53 |
-#endif |
|
54 |
- |
|
55 | 26 |
void ff_metadata_conv(AVDictionary **pm, const AVMetadataConv *d_conv, |
56 | 27 |
const AVMetadataConv *s_conv) |
57 | 28 |
{ |
... | ... |
@@ -31,13 +31,10 @@ |
31 | 31 |
#include "avformat.h" |
32 | 32 |
#include "libavutil/dict.h" |
33 | 33 |
|
34 |
-struct AVMetadataConv{ |
|
34 |
+typedef struct AVMetadataConv { |
|
35 | 35 |
const char *native; |
36 | 36 |
const char *generic; |
37 |
-}; |
|
38 |
-#if !FF_API_OLD_METADATA2 |
|
39 |
-typedef struct AVMetadataConv AVMetadataConv; |
|
40 |
-#endif |
|
37 |
+} AVMetadataConv; |
|
41 | 38 |
|
42 | 39 |
void ff_metadata_conv(AVDictionary **pm, const AVMetadataConv *d_conv, |
43 | 40 |
const AVMetadataConv *s_conv); |
... | ... |
@@ -47,9 +47,6 @@ |
47 | 47 |
* Those FF_API_* defines are not part of public API. |
48 | 48 |
* They may change, break or disappear at any time. |
49 | 49 |
*/ |
50 |
-#ifndef FF_API_OLD_METADATA2 |
|
51 |
-#define FF_API_OLD_METADATA2 (LIBAVFORMAT_VERSION_MAJOR < 54) |
|
52 |
-#endif |
|
53 | 50 |
#ifndef FF_API_DUMP_FORMAT |
54 | 51 |
#define FF_API_DUMP_FORMAT (LIBAVFORMAT_VERSION_MAJOR < 54) |
55 | 52 |
#endif |