summaryrefslogtreecommitdiff
path: root/libavformat/avformat.h
diff options
context:
space:
mode:
authorAurelien Jacobs <aurel@gnuage.org>2010-08-17 20:23:19 +0000
committerAurelien Jacobs <aurel@gnuage.org>2010-08-17 20:23:19 +0000
commitdd872bf49f0ef1226c4a1e99e908a5213a59b32f (patch)
tree75fb4c07df1f243c97af4af9bbc96ddd0e8f0c3e /libavformat/avformat.h
parent072e3efd1b0ca3c5d08fa2119e88fb36b5708592 (diff)
add LAVF_API_OLD_METADATA define to disable the deprecated metadata API
Originally committed as revision 24818 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r--libavformat/avformat.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 3715d848e4..f34e28ea7f 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -38,6 +38,9 @@
#ifndef LAVF_API_MAX_STREAMS
#define LAVF_API_MAX_STREAMS (LIBAVFORMAT_VERSION_MAJOR < 53)
#endif
+#ifndef LAVF_API_OLD_METADATA
+#define LAVF_API_OLD_METADATA (LIBAVFORMAT_VERSION_MAJOR < 53)
+#endif
/**
* I return the LIBAVFORMAT_VERSION_INT constant. You got
@@ -144,7 +147,7 @@ typedef struct AVMetadataConv AVMetadataConv;
AVMetadataTag *
av_metadata_get(AVMetadata *m, const char *key, const AVMetadataTag *prev, int flags);
-#if LIBAVFORMAT_VERSION_MAJOR == 52
+#if LAVF_API_OLD_METADATA
/**
* Set the given tag in *pm, overwriting an existing tag.
*
@@ -520,7 +523,7 @@ typedef struct AVStream {
*/
int64_t duration;
-#if LIBAVFORMAT_VERSION_INT < (53<<16)
+#if LAVF_API_OLD_METADATA
char language[4]; /**< ISO 639-2/B 3-letter language code (empty string if undefined) */
#endif
@@ -541,7 +544,9 @@ typedef struct AVStream {
#if LIBAVFORMAT_VERSION_INT < (53<<16)
int64_t unused[4+1];
+#endif
+#if LAVF_API_OLD_METADATA
char *filename; /**< source filename of the stream */
#endif
@@ -610,7 +615,7 @@ typedef struct AVStream {
*/
typedef struct AVProgram {
int id;
-#if LIBAVFORMAT_VERSION_INT < (53<<16)
+#if LAVF_API_OLD_METADATA
char *provider_name; ///< network name for DVB streams
char *name; ///< service name for DVB streams
#endif
@@ -628,7 +633,7 @@ typedef struct AVChapter {
int id; ///< unique ID to identify the chapter
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
-#if LIBAVFORMAT_VERSION_INT < (53<<16)
+#if LAVF_API_OLD_METADATA
char *title; ///< chapter title
#endif
AVMetadata *metadata;
@@ -657,7 +662,7 @@ typedef struct AVFormatContext {
char filename[1024]; /**< input or output filename */
/* stream info */
int64_t timestamp;
-#if LIBAVFORMAT_VERSION_INT < (53<<16)
+#if LAVF_API_OLD_METADATA
char title[512];
char author[512];
char copyright[512];