Commit 54036be1 authored by Aurelien Jacobs's avatar Aurelien Jacobs

rename LAVF_API_* defines to FF_API_* to clarify that it is not public API

Originally committed as revision 24825 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent a42c29fe
...@@ -35,11 +35,11 @@ ...@@ -35,11 +35,11 @@
#define LIBAVFORMAT_IDENT "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION) #define LIBAVFORMAT_IDENT "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION)
#ifndef LAVF_API_MAX_STREAMS #ifndef FF_API_MAX_STREAMS
#define LAVF_API_MAX_STREAMS (LIBAVFORMAT_VERSION_MAJOR < 53) #define FF_API_MAX_STREAMS (LIBAVFORMAT_VERSION_MAJOR < 53)
#endif #endif
#ifndef LAVF_API_OLD_METADATA #ifndef FF_API_OLD_METADATA
#define LAVF_API_OLD_METADATA (LIBAVFORMAT_VERSION_MAJOR < 53) #define FF_API_OLD_METADATA (LIBAVFORMAT_VERSION_MAJOR < 53)
#endif #endif
/** /**
...@@ -147,7 +147,7 @@ typedef struct AVMetadataConv AVMetadataConv; ...@@ -147,7 +147,7 @@ typedef struct AVMetadataConv AVMetadataConv;
AVMetadataTag * AVMetadataTag *
av_metadata_get(AVMetadata *m, const char *key, const AVMetadataTag *prev, int flags); av_metadata_get(AVMetadata *m, const char *key, const AVMetadataTag *prev, int flags);
#if LAVF_API_OLD_METADATA #if FF_API_OLD_METADATA
/** /**
* Set the given tag in *pm, overwriting an existing tag. * Set the given tag in *pm, overwriting an existing tag.
* *
...@@ -523,7 +523,7 @@ typedef struct AVStream { ...@@ -523,7 +523,7 @@ typedef struct AVStream {
*/ */
int64_t duration; int64_t duration;
#if LAVF_API_OLD_METADATA #if FF_API_OLD_METADATA
char language[4]; /**< ISO 639-2/B 3-letter language code (empty string if undefined) */ char language[4]; /**< ISO 639-2/B 3-letter language code (empty string if undefined) */
#endif #endif
...@@ -546,7 +546,7 @@ typedef struct AVStream { ...@@ -546,7 +546,7 @@ typedef struct AVStream {
int64_t unused[4+1]; int64_t unused[4+1];
#endif #endif
#if LAVF_API_OLD_METADATA #if FF_API_OLD_METADATA
char *filename; /**< source filename of the stream */ char *filename; /**< source filename of the stream */
#endif #endif
...@@ -615,7 +615,7 @@ typedef struct AVStream { ...@@ -615,7 +615,7 @@ typedef struct AVStream {
*/ */
typedef struct AVProgram { typedef struct AVProgram {
int id; int id;
#if LAVF_API_OLD_METADATA #if FF_API_OLD_METADATA
char *provider_name; ///< network name for DVB streams char *provider_name; ///< network name for DVB streams
char *name; ///< service name for DVB streams char *name; ///< service name for DVB streams
#endif #endif
...@@ -633,13 +633,13 @@ typedef struct AVChapter { ...@@ -633,13 +633,13 @@ typedef struct AVChapter {
int id; ///< unique ID to identify the chapter int id; ///< unique ID to identify the chapter
AVRational time_base; ///< time base in which the start/end timestamps are specified 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 int64_t start, end; ///< chapter start/end time in time_base units
#if LAVF_API_OLD_METADATA #if FF_API_OLD_METADATA
char *title; ///< chapter title char *title; ///< chapter title
#endif #endif
AVMetadata *metadata; AVMetadata *metadata;
} AVChapter; } AVChapter;
#if LAVF_API_MAX_STREAMS #if FF_API_MAX_STREAMS
#define MAX_STREAMS 20 #define MAX_STREAMS 20
#endif #endif
...@@ -662,7 +662,7 @@ typedef struct AVFormatContext { ...@@ -662,7 +662,7 @@ typedef struct AVFormatContext {
char filename[1024]; /**< input or output filename */ char filename[1024]; /**< input or output filename */
/* stream info */ /* stream info */
int64_t timestamp; int64_t timestamp;
#if LAVF_API_OLD_METADATA #if FF_API_OLD_METADATA
char title[512]; char title[512];
char author[512]; char author[512];
char copyright[512]; char copyright[512];
......
...@@ -86,7 +86,7 @@ int av_metadata_set2(AVMetadata **pm, const char *key, const char *value, int fl ...@@ -86,7 +86,7 @@ int av_metadata_set2(AVMetadata **pm, const char *key, const char *value, int fl
return 0; return 0;
} }
#if LAVF_API_OLD_METADATA #if FF_API_OLD_METADATA
int av_metadata_set(AVMetadata **pm, const char *key, const char *value) int av_metadata_set(AVMetadata **pm, const char *key, const char *value)
{ {
return av_metadata_set2(pm, key, value, 0); return av_metadata_set2(pm, key, value, 0);
......
...@@ -40,7 +40,7 @@ struct AVMetadataConv{ ...@@ -40,7 +40,7 @@ struct AVMetadataConv{
const char *generic; const char *generic;
}; };
#if LAVF_API_OLD_METADATA #if FF_API_OLD_METADATA
void ff_metadata_demux_compat(AVFormatContext *s); void ff_metadata_demux_compat(AVFormatContext *s);
void ff_metadata_mux_compat(AVFormatContext *s); void ff_metadata_mux_compat(AVFormatContext *s);
#endif #endif
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "metadata.h" #include "metadata.h"
#include "libavutil/avstring.h" #include "libavutil/avstring.h"
#if LAVF_API_OLD_METADATA #if FF_API_OLD_METADATA
#define SIZE_OFFSET(x) sizeof(((AVFormatContext*)0)->x),offsetof(AVFormatContext,x) #define SIZE_OFFSET(x) sizeof(((AVFormatContext*)0)->x),offsetof(AVFormatContext,x)
...@@ -145,4 +145,4 @@ void ff_metadata_mux_compat(AVFormatContext *ctx) ...@@ -145,4 +145,4 @@ void ff_metadata_mux_compat(AVFormatContext *ctx)
} }
} }
#endif /* LAVF_API_OLD_METADATA */ #endif /* FF_API_OLD_METADATA */
...@@ -686,7 +686,7 @@ static int mpegts_push_data(MpegTSFilter *filter, ...@@ -686,7 +686,7 @@ static int mpegts_push_data(MpegTSFilter *filter,
code == 0x1be) /* padding_stream */ code == 0x1be) /* padding_stream */
goto skip; goto skip;
#if LAVF_API_MAX_STREAMS #if FF_API_MAX_STREAMS
if (!pes->st && pes->stream->nb_streams == MAX_STREAMS) if (!pes->st && pes->stream->nb_streams == MAX_STREAMS)
goto skip; goto skip;
#endif #endif
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#undef NDEBUG #undef NDEBUG
#include <assert.h> #include <assert.h>
#if LAVF_API_MAX_STREAMS #if FF_API_MAX_STREAMS
#define NUT_MAX_STREAMS MAX_STREAMS #define NUT_MAX_STREAMS MAX_STREAMS
#else #else
#define NUT_MAX_STREAMS 256 /* arbitrary sanity check value */ #define NUT_MAX_STREAMS 256 /* arbitrary sanity check value */
......
...@@ -50,7 +50,7 @@ static const AVOption options[]={ ...@@ -50,7 +50,7 @@ static const AVOption options[]={
{"noparse", "disable AVParsers, this needs nofillin too", 0, FF_OPT_TYPE_CONST, AVFMT_FLAG_NOPARSE, INT_MIN, INT_MAX, D, "fflags"}, {"noparse", "disable AVParsers, this needs nofillin too", 0, FF_OPT_TYPE_CONST, AVFMT_FLAG_NOPARSE, INT_MIN, INT_MAX, D, "fflags"},
{"igndts", "ignore dts", 0, FF_OPT_TYPE_CONST, AVFMT_FLAG_IGNDTS, INT_MIN, INT_MAX, D, "fflags"}, {"igndts", "ignore dts", 0, FF_OPT_TYPE_CONST, AVFMT_FLAG_IGNDTS, INT_MIN, INT_MAX, D, "fflags"},
{"rtphint", "add rtp hinting", 0, FF_OPT_TYPE_CONST, AVFMT_FLAG_RTP_HINT, INT_MIN, INT_MAX, E, "fflags"}, {"rtphint", "add rtp hinting", 0, FF_OPT_TYPE_CONST, AVFMT_FLAG_RTP_HINT, INT_MIN, INT_MAX, E, "fflags"},
#if LAVF_API_OLD_METADATA #if FF_API_OLD_METADATA
{"track", " set the track number", OFFSET(track), FF_OPT_TYPE_INT, DEFAULT, 0, INT_MAX, E}, {"track", " set the track number", OFFSET(track), FF_OPT_TYPE_INT, DEFAULT, 0, INT_MAX, E},
{"year", "set the year", OFFSET(year), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, E}, {"year", "set the year", OFFSET(year), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, E},
#endif #endif
......
...@@ -457,7 +457,7 @@ int av_open_input_stream(AVFormatContext **ic_ptr, ...@@ -457,7 +457,7 @@ int av_open_input_stream(AVFormatContext **ic_ptr,
if (pb && !ic->data_offset) if (pb && !ic->data_offset)
ic->data_offset = url_ftell(ic->pb); ic->data_offset = url_ftell(ic->pb);
#if LAVF_API_OLD_METADATA #if FF_API_OLD_METADATA
ff_metadata_demux_compat(ic); ff_metadata_demux_compat(ic);
#endif #endif
...@@ -2460,14 +2460,14 @@ void av_close_input_stream(AVFormatContext *s) ...@@ -2460,14 +2460,14 @@ void av_close_input_stream(AVFormatContext *s)
av_free(st->index_entries); av_free(st->index_entries);
av_free(st->codec->extradata); av_free(st->codec->extradata);
av_free(st->codec); av_free(st->codec);
#if LAVF_API_OLD_METADATA #if FF_API_OLD_METADATA
av_free(st->filename); av_free(st->filename);
#endif #endif
av_free(st->priv_data); av_free(st->priv_data);
av_free(st); av_free(st);
} }
for(i=s->nb_programs-1; i>=0; i--) { for(i=s->nb_programs-1; i>=0; i--) {
#if LAVF_API_OLD_METADATA #if FF_API_OLD_METADATA
av_freep(&s->programs[i]->provider_name); av_freep(&s->programs[i]->provider_name);
av_freep(&s->programs[i]->name); av_freep(&s->programs[i]->name);
#endif #endif
...@@ -2479,7 +2479,7 @@ void av_close_input_stream(AVFormatContext *s) ...@@ -2479,7 +2479,7 @@ void av_close_input_stream(AVFormatContext *s)
flush_packet_queue(s); flush_packet_queue(s);
av_freep(&s->priv_data); av_freep(&s->priv_data);
while(s->nb_chapters--) { while(s->nb_chapters--) {
#if LAVF_API_OLD_METADATA #if FF_API_OLD_METADATA
av_free(s->chapters[s->nb_chapters]->title); av_free(s->chapters[s->nb_chapters]->title);
#endif #endif
av_metadata_free(&s->chapters[s->nb_chapters]->metadata); av_metadata_free(&s->chapters[s->nb_chapters]->metadata);
...@@ -2582,7 +2582,7 @@ AVChapter *ff_new_chapter(AVFormatContext *s, int id, AVRational time_base, int6 ...@@ -2582,7 +2582,7 @@ AVChapter *ff_new_chapter(AVFormatContext *s, int id, AVRational time_base, int6
return NULL; return NULL;
dynarray_add(&s->chapters, &s->nb_chapters, chapter); dynarray_add(&s->chapters, &s->nb_chapters, chapter);
} }
#if LAVF_API_OLD_METADATA #if FF_API_OLD_METADATA
av_free(chapter->title); av_free(chapter->title);
#endif #endif
av_metadata_set2(&chapter->metadata, "title", title, 0); av_metadata_set2(&chapter->metadata, "title", title, 0);
...@@ -2718,7 +2718,7 @@ int av_write_header(AVFormatContext *s) ...@@ -2718,7 +2718,7 @@ int av_write_header(AVFormatContext *s)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
} }
#if LAVF_API_OLD_METADATA #if FF_API_OLD_METADATA
ff_metadata_mux_compat(s); ff_metadata_mux_compat(s);
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment