From 761ad429680637411882552921a9d5acb6aff59e Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 3 Feb 2011 12:25:54 +0100 Subject: lavf: remove FF_API_MAX_STREAMS cruft --- libavformat/avformat.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'libavformat/avformat.h') diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 55808f13b8..6f7b6a5116 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -672,10 +672,6 @@ typedef struct AVChapter { AVMetadata *metadata; } AVChapter; -#if FF_API_MAX_STREAMS -#define MAX_STREAMS 20 -#endif - /** * Format I/O context. * New fields can be added to the end with minor version bumps. @@ -691,11 +687,7 @@ typedef struct AVFormatContext { void *priv_data; AVIOContext *pb; unsigned int nb_streams; -#if FF_API_MAX_STREAMS - AVStream *streams[MAX_STREAMS]; -#else AVStream **streams; -#endif char filename[1024]; /**< input or output filename */ /* stream info */ int64_t timestamp; -- cgit v1.2.3 From 575c18da1b5053e244ccbfbcced176b5a63dbb25 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 3 Feb 2011 12:30:16 +0100 Subject: lavf: remove FF_API_OLD_METADATA cruft --- libavformat/Makefile | 1 - libavformat/avformat.h | 39 ----------- libavformat/metadata.c | 7 -- libavformat/metadata.h | 5 -- libavformat/metadata_compat.c | 148 ------------------------------------------ libavformat/options.c | 4 -- libavformat/utils.c | 21 ------ libavformat/version.h | 3 - 8 files changed, 228 deletions(-) delete mode 100644 libavformat/metadata_compat.c (limited to 'libavformat/avformat.h') diff --git a/libavformat/Makefile b/libavformat/Makefile index 0bf2633d66..5e029ed96b 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -10,7 +10,6 @@ OBJS = allformats.o \ id3v1.o \ id3v2.o \ metadata.o \ - metadata_compat.o \ options.o \ os_support.o \ sdp.o \ diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 6f7b6a5116..f3e4fe4842 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -133,20 +133,6 @@ typedef struct AVMetadataConv AVMetadataConv; AVMetadataTag * av_metadata_get(AVMetadata *m, const char *key, const AVMetadataTag *prev, int flags); -#if FF_API_OLD_METADATA -/** - * 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) - * @param value tag value to add to *pm (will be av_strduped) - * @return >= 0 on success otherwise an error code <0 - * @deprecated Use av_metadata_set2() instead. - */ -attribute_deprecated int av_metadata_set(AVMetadata **pm, const char *key, const char *value); -#endif - /** * Set the given tag in *pm, overwriting an existing tag. * @@ -544,10 +530,6 @@ typedef struct AVStream { */ int64_t duration; -#if FF_API_OLD_METADATA - attribute_deprecated char language[4]; /**< ISO 639-2/B 3-letter language code (empty string if undefined) */ -#endif - /* av_read_frame() support */ enum AVStreamParseType need_parsing; struct AVCodecParserContext *parser; @@ -567,10 +549,6 @@ typedef struct AVStream { attribute_deprecated int64_t unused[4+1]; #endif -#if FF_API_OLD_METADATA - attribute_deprecated char *filename; /**< source filename of the stream */ -#endif - int disposition; /**< AV_DISPOSITION_* bit field */ AVProbeData probe_data; @@ -648,10 +626,6 @@ typedef struct AVStream { */ typedef struct AVProgram { int id; -#if FF_API_OLD_METADATA - attribute_deprecated char *provider_name; ///< network name for DVB streams - attribute_deprecated char *name; ///< service name for DVB streams -#endif int flags; enum AVDiscard discard; ///< selects which program to discard and which to feed to the caller unsigned int *stream_index; @@ -666,9 +640,6 @@ 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 FF_API_OLD_METADATA - attribute_deprecated char *title; ///< chapter title -#endif AVMetadata *metadata; } AVChapter; @@ -691,16 +662,6 @@ typedef struct AVFormatContext { char filename[1024]; /**< input or output filename */ /* stream info */ int64_t timestamp; -#if FF_API_OLD_METADATA - attribute_deprecated char title[512]; - attribute_deprecated char author[512]; - attribute_deprecated char copyright[512]; - attribute_deprecated char comment[512]; - attribute_deprecated char album[512]; - attribute_deprecated int year; /**< ID3 year, 0 if none */ - attribute_deprecated int track; /**< track number, 0 if none */ - attribute_deprecated char genre[32]; /**< ID3 genre */ -#endif int ctx_flags; /**< Format-specific flags, see AVFMTCTX_xx */ /* private data for pts handling (do not modify directly). */ diff --git a/libavformat/metadata.c b/libavformat/metadata.c index 36a9342882..f0275462fe 100644 --- a/libavformat/metadata.c +++ b/libavformat/metadata.c @@ -86,13 +86,6 @@ int av_metadata_set2(AVMetadata **pm, const char *key, const char *value, int fl return 0; } -#if FF_API_OLD_METADATA -int av_metadata_set(AVMetadata **pm, const char *key, const char *value) -{ - return av_metadata_set2(pm, key, value, 0); -} -#endif - #if FF_API_OLD_METADATA2 void av_metadata_conv(AVFormatContext *ctx, const AVMetadataConv *d_conv, const AVMetadataConv *s_conv) diff --git a/libavformat/metadata.h b/libavformat/metadata.h index 43eace8e39..09066b8c8d 100644 --- a/libavformat/metadata.h +++ b/libavformat/metadata.h @@ -43,11 +43,6 @@ struct AVMetadataConv{ typedef struct AVMetadataConv AVMetadataConv; #endif -#if FF_API_OLD_METADATA -void ff_metadata_demux_compat(AVFormatContext *s); -void ff_metadata_mux_compat(AVFormatContext *s); -#endif - void ff_metadata_conv(AVMetadata **pm, const AVMetadataConv *d_conv, const AVMetadataConv *s_conv); void ff_metadata_conv_ctx(AVFormatContext *ctx, const AVMetadataConv *d_conv, diff --git a/libavformat/metadata_compat.c b/libavformat/metadata_compat.c deleted file mode 100644 index bb73258707..0000000000 --- a/libavformat/metadata_compat.c +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (c) 2009 Aurelien Jacobs - * - * This file is part of Libav. - * - * Libav is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * Libav is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include -#include "avformat.h" -#include "metadata.h" -#include "libavutil/avstring.h" - -#if FF_API_OLD_METADATA - -#define SIZE_OFFSET(x) sizeof(((AVFormatContext*)0)->x),offsetof(AVFormatContext,x) - -static const struct { - const char name[16]; - int size; - int offset; -} compat_tab[] = { - { "title", SIZE_OFFSET(title) }, - { "author", SIZE_OFFSET(author) }, - { "copyright", SIZE_OFFSET(copyright) }, - { "comment", SIZE_OFFSET(comment) }, - { "album", SIZE_OFFSET(album) }, - { "year", SIZE_OFFSET(year) }, - { "track", SIZE_OFFSET(track) }, - { "genre", SIZE_OFFSET(genre) }, - - { "artist", SIZE_OFFSET(author) }, - { "creator", SIZE_OFFSET(author) }, - { "written_by", SIZE_OFFSET(author) }, - { "lead_performer", SIZE_OFFSET(author) }, - { "composer", SIZE_OFFSET(author) }, - { "performer", SIZE_OFFSET(author) }, - { "description", SIZE_OFFSET(comment) }, - { "albumtitle", SIZE_OFFSET(album) }, - { "date", SIZE_OFFSET(year) }, - { "date_written", SIZE_OFFSET(year) }, - { "date_released", SIZE_OFFSET(year) }, - { "tracknumber", SIZE_OFFSET(track) }, - { "part_number", SIZE_OFFSET(track) }, -}; - -void ff_metadata_demux_compat(AVFormatContext *ctx) -{ - AVMetadata *m; - int i, j; - - if ((m = ctx->metadata)) - for (j=0; jcount; j++) - for (i=0; ielems[j].key, compat_tab[i].name)) { - int *ptr = (int *)((char *)ctx+compat_tab[i].offset); - if (*ptr) continue; - if (compat_tab[i].size > sizeof(int)) - av_strlcpy((char *)ptr, m->elems[j].value, compat_tab[i].size); - else - *ptr = atoi(m->elems[j].value); - } - - for (i=0; inb_chapters; i++) - if ((m = ctx->chapters[i]->metadata)) - for (j=0; jcount; j++) - if (!strcasecmp(m->elems[j].key, "title")) { - av_free(ctx->chapters[i]->title); - ctx->chapters[i]->title = av_strdup(m->elems[j].value); - } - - for (i=0; inb_programs; i++) - if ((m = ctx->programs[i]->metadata)) - for (j=0; jcount; j++) { - if (!strcasecmp(m->elems[j].key, "name")) { - av_free(ctx->programs[i]->name); - ctx->programs[i]->name = av_strdup(m->elems[j].value); - } - if (!strcasecmp(m->elems[j].key, "provider_name")) { - av_free(ctx->programs[i]->provider_name); - ctx->programs[i]->provider_name = av_strdup(m->elems[j].value); - } - } - - for (i=0; inb_streams; i++) - if ((m = ctx->streams[i]->metadata)) - for (j=0; jcount; j++) { - if (!strcasecmp(m->elems[j].key, "language")) - av_strlcpy(ctx->streams[i]->language, m->elems[j].value, 4); - if (!strcasecmp(m->elems[j].key, "filename")) { - av_free(ctx->streams[i]->filename); - ctx->streams[i]->filename= av_strdup(m->elems[j].value); - } - } -} - - -#define FILL_METADATA(s, key, value) { \ - if (!av_metadata_get(s->metadata, #key, NULL, 0)) \ - av_metadata_set2(&s->metadata, #key, value, 0); \ - } -#define FILL_METADATA_STR(s, key) { \ - if (s->key && *s->key) FILL_METADATA(s, key, s->key); } -#define FILL_METADATA_INT(s, key) { \ - char number[10]; \ - snprintf(number, sizeof(number), "%d", s->key); \ - if(s->key) FILL_METADATA(s, key, number) } - -void ff_metadata_mux_compat(AVFormatContext *ctx) -{ - int i; - - if (ctx->metadata && ctx->metadata->count > 0) - return; - - FILL_METADATA_STR(ctx, title); - FILL_METADATA_STR(ctx, author); - FILL_METADATA_STR(ctx, copyright); - FILL_METADATA_STR(ctx, comment); - FILL_METADATA_STR(ctx, album); - FILL_METADATA_INT(ctx, year); - FILL_METADATA_INT(ctx, track); - FILL_METADATA_STR(ctx, genre); - for (i=0; inb_chapters; i++) - FILL_METADATA_STR(ctx->chapters[i], title); - for (i=0; inb_programs; i++) { - FILL_METADATA_STR(ctx->programs[i], name); - FILL_METADATA_STR(ctx->programs[i], provider_name); - } - for (i=0; inb_streams; i++) { - FILL_METADATA_STR(ctx->streams[i], language); - FILL_METADATA_STR(ctx->streams[i], filename); - } -} - -#endif /* FF_API_OLD_METADATA */ diff --git a/libavformat/options.c b/libavformat/options.c index beaafd8ab3..40edcec762 100644 --- a/libavformat/options.c +++ b/libavformat/options.c @@ -50,10 +50,6 @@ 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"}, {"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"}, -#if FF_API_OLD_METADATA -{"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}, -#endif {"analyzeduration", "how many microseconds are analyzed to estimate duration", OFFSET(max_analyze_duration), FF_OPT_TYPE_INT, 5*AV_TIME_BASE, 0, INT_MAX, D}, {"cryptokey", "decryption key", OFFSET(key), FF_OPT_TYPE_BINARY, 0, 0, 0, D}, {"indexmem", "max memory used for timestamp index (per stream)", OFFSET(max_index_size), FF_OPT_TYPE_INT, 1<<20, 0, INT_MAX, D}, diff --git a/libavformat/utils.c b/libavformat/utils.c index a1336179f1..cf8f9fae63 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -508,10 +508,6 @@ int av_open_input_stream(AVFormatContext **ic_ptr, if (pb && !ic->data_offset) ic->data_offset = avio_tell(ic->pb); -#if FF_API_OLD_METADATA - ff_metadata_demux_compat(ic); -#endif - ic->raw_packet_buffer_remaining_size = RAW_PACKET_BUFFER_SIZE; *ic_ptr = ic; @@ -2617,18 +2613,11 @@ void avformat_free_context(AVFormatContext *s) av_free(st->codec->extradata); av_free(st->codec->subtitle_header); av_free(st->codec); -#if FF_API_OLD_METADATA - av_free(st->filename); -#endif av_free(st->priv_data); av_free(st->info); av_free(st); } for(i=s->nb_programs-1; i>=0; i--) { -#if FF_API_OLD_METADATA - av_freep(&s->programs[i]->provider_name); - av_freep(&s->programs[i]->name); -#endif av_metadata_free(&s->programs[i]->metadata); av_freep(&s->programs[i]->stream_index); av_freep(&s->programs[i]); @@ -2636,9 +2625,6 @@ void avformat_free_context(AVFormatContext *s) av_freep(&s->programs); av_freep(&s->priv_data); while(s->nb_chapters--) { -#if FF_API_OLD_METADATA - av_free(s->chapters[s->nb_chapters]->title); -#endif av_metadata_free(&s->chapters[s->nb_chapters]->metadata); av_free(s->chapters[s->nb_chapters]); } @@ -2747,9 +2733,6 @@ AVChapter *ff_new_chapter(AVFormatContext *s, int id, AVRational time_base, int6 return NULL; dynarray_add(&s->chapters, &s->nb_chapters, chapter); } -#if FF_API_OLD_METADATA - av_free(chapter->title); -#endif av_metadata_set2(&chapter->metadata, "title", title, 0); chapter->id = id; chapter->time_base= time_base; @@ -2887,10 +2870,6 @@ int av_write_header(AVFormatContext *s) return AVERROR(ENOMEM); } -#if FF_API_OLD_METADATA - ff_metadata_mux_compat(s); -#endif - /* set muxer identification string */ if (s->nb_streams && !(s->streams[0]->codec->flags & CODEC_FLAG_BITEXACT)) { av_metadata_set2(&s->metadata, "encoder", LIBAVFORMAT_IDENT, 0); diff --git a/libavformat/version.h b/libavformat/version.h index bf1ae5bff8..8f0316b05d 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -41,9 +41,6 @@ * Those FF_API_* defines are not part of public API. * They may change, break or disappear at any time. */ -#ifndef FF_API_OLD_METADATA -#define FF_API_OLD_METADATA (LIBAVFORMAT_VERSION_MAJOR < 53) -#endif #ifndef FF_API_OLD_METADATA2 #define FF_API_OLD_METADATA2 (LIBAVFORMAT_VERSION_MAJOR < 54) #endif -- cgit v1.2.3 From 61573bf1ba50dc8828d0e87d913389fbcff48509 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 3 Feb 2011 12:38:05 +0100 Subject: lavf: remove FF_API_GUESS_FORMAT cruft --- libavformat/avformat.h | 12 ------------ libavformat/utils.c | 29 ----------------------------- libavformat/version.h | 3 --- 3 files changed, 44 deletions(-) (limited to 'libavformat/avformat.h') diff --git a/libavformat/avformat.h b/libavformat/avformat.h index f3e4fe4842..dae56c6037 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -862,18 +862,6 @@ attribute_deprecated enum CodecID av_guess_image2_codec(const char *filename); /* utils.c */ void av_register_input_format(AVInputFormat *format); void av_register_output_format(AVOutputFormat *format); -#if FF_API_GUESS_FORMAT -attribute_deprecated AVOutputFormat *guess_stream_format(const char *short_name, - const char *filename, - const char *mime_type); - -/** - * @deprecated Use av_guess_format() instead. - */ -attribute_deprecated AVOutputFormat *guess_format(const char *short_name, - const char *filename, - const char *mime_type); -#endif /** * Return the output format in the list of registered output formats diff --git a/libavformat/utils.c b/libavformat/utils.c index cf8f9fae63..80700d4b2b 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -200,14 +200,6 @@ static int match_format(const char *name, const char *names) return !strcasecmp(name, names); } -#if FF_API_GUESS_FORMAT -AVOutputFormat *guess_format(const char *short_name, const char *filename, - const char *mime_type) -{ - return av_guess_format(short_name, filename, mime_type); -} -#endif - AVOutputFormat *av_guess_format(const char *short_name, const char *filename, const char *mime_type) { @@ -243,27 +235,6 @@ AVOutputFormat *av_guess_format(const char *short_name, const char *filename, return fmt_found; } -#if FF_API_GUESS_FORMAT -AVOutputFormat *guess_stream_format(const char *short_name, const char *filename, - const char *mime_type) -{ - AVOutputFormat *fmt = av_guess_format(short_name, filename, mime_type); - - if (fmt) { - AVOutputFormat *stream_fmt; - char stream_format_name[64]; - - snprintf(stream_format_name, sizeof(stream_format_name), "%s_stream", fmt->name); - stream_fmt = av_guess_format(stream_format_name, NULL, NULL); - - if (stream_fmt) - fmt = stream_fmt; - } - - return fmt; -} -#endif - enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name, const char *filename, const char *mime_type, enum AVMediaType type){ if(type == AVMEDIA_TYPE_VIDEO){ diff --git a/libavformat/version.h b/libavformat/version.h index ef253599e4..182bfb7814 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -47,9 +47,6 @@ #ifndef FF_API_URL_CLASS #define FF_API_URL_CLASS (LIBAVFORMAT_VERSION_MAJOR >= 53) #endif -#ifndef FF_API_GUESS_FORMAT -#define FF_API_GUESS_FORMAT (LIBAVFORMAT_VERSION_MAJOR < 53) -#endif #ifndef FF_API_UDP_GET_FILE #define FF_API_UDP_GET_FILE (LIBAVFORMAT_VERSION_MAJOR < 53) #endif -- cgit v1.2.3 From 4df001d77f8f39d2914b21f14ca2236b0ffd6a48 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 3 Feb 2011 12:42:38 +0100 Subject: lavf: remove FF_API_ALLOC_FORMAT_CONTEXT cruft --- libavformat/avformat.h | 7 ------- libavformat/options.c | 7 ------- libavformat/version.h | 3 --- 3 files changed, 17 deletions(-) (limited to 'libavformat/avformat.h') diff --git a/libavformat/avformat.h b/libavformat/avformat.h index dae56c6037..3e47285267 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1043,13 +1043,6 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename, int buf_size, AVFormatParameters *ap); -#if FF_API_ALLOC_FORMAT_CONTEXT -/** - * @deprecated Use avformat_alloc_context() instead. - */ -attribute_deprecated AVFormatContext *av_alloc_format_context(void); -#endif - /** * Allocate an AVFormatContext. * avformat_free_context() can be used to free the context and everything diff --git a/libavformat/options.c b/libavformat/options.c index 40edcec762..2192ff6575 100644 --- a/libavformat/options.c +++ b/libavformat/options.c @@ -84,10 +84,3 @@ AVFormatContext *avformat_alloc_context(void) ic->av_class = &av_format_context_class; return ic; } - -#if FF_API_ALLOC_FORMAT_CONTEXT -AVFormatContext *av_alloc_format_context(void) -{ - return avformat_alloc_context(); -} -#endif diff --git a/libavformat/version.h b/libavformat/version.h index 9b8192d96d..f87665c205 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -47,9 +47,6 @@ #ifndef FF_API_URL_CLASS #define FF_API_URL_CLASS (LIBAVFORMAT_VERSION_MAJOR >= 53) #endif -#ifndef FF_API_ALLOC_FORMAT_CONTEXT -#define FF_API_ALLOC_FORMAT_CONTEXT (LIBAVFORMAT_VERSION_MAJOR < 53) -#endif #ifndef FF_API_PARSE_FRAME_PARAM #define FF_API_PARSE_FRAME_PARAM (LIBAVFORMAT_VERSION_MAJOR < 53) #endif -- cgit v1.2.3 From 58d5ff0abf657fe0ec3564433ebbde9fc8f71ffd Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 3 Feb 2011 12:44:04 +0100 Subject: lavf: remove FF_API_PARSE_FRAME_PARAM cruft --- libavformat/avformat.h | 16 ---------------- libavformat/utils.c | 18 ------------------ libavformat/version.h | 3 --- 3 files changed, 37 deletions(-) (limited to 'libavformat/avformat.h') diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 3e47285267..289834627a 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1409,22 +1409,6 @@ void av_dump_format(AVFormatContext *ic, const char *url, int is_output); -#if FF_API_PARSE_FRAME_PARAM -/** - * Parse width and height out of string str. - * @deprecated Use av_parse_video_frame_size instead. - */ -attribute_deprecated int parse_image_size(int *width_ptr, int *height_ptr, - const char *str); - -/** - * Convert framerate from a string to a fraction. - * @deprecated Use av_parse_video_frame_rate instead. - */ -attribute_deprecated int parse_frame_rate(int *frame_rate, int *frame_rate_base, - const char *arg); -#endif - #if FF_API_PARSE_DATE /** * Parse datestr and return a corresponding number of microseconds. diff --git a/libavformat/utils.c b/libavformat/utils.c index 91e0ddca2d..d2f70e17e6 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3320,24 +3320,6 @@ void av_dump_format(AVFormatContext *ic, av_free(printed); } -#if FF_API_PARSE_FRAME_PARAM -#include "libavutil/parseutils.h" - -int parse_image_size(int *width_ptr, int *height_ptr, const char *str) -{ - return av_parse_video_size(width_ptr, height_ptr, str); -} - -int parse_frame_rate(int *frame_rate_num, int *frame_rate_den, const char *arg) -{ - AVRational frame_rate; - int ret = av_parse_video_rate(&frame_rate, arg); - *frame_rate_num= frame_rate.num; - *frame_rate_den= frame_rate.den; - return ret; -} -#endif - int64_t av_gettime(void) { struct timeval tv; diff --git a/libavformat/version.h b/libavformat/version.h index f87665c205..08dc566425 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -47,9 +47,6 @@ #ifndef FF_API_URL_CLASS #define FF_API_URL_CLASS (LIBAVFORMAT_VERSION_MAJOR >= 53) #endif -#ifndef FF_API_PARSE_FRAME_PARAM -#define FF_API_PARSE_FRAME_PARAM (LIBAVFORMAT_VERSION_MAJOR < 53) -#endif #ifndef FF_API_READ_SEEK #define FF_API_READ_SEEK (LIBAVFORMAT_VERSION_MAJOR < 54) #endif -- cgit v1.2.3 From fc2d3a19c54ad6b272eb7d5142148a01568a9b77 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 3 Feb 2011 12:45:30 +0100 Subject: lavf: remove FF_API_LAVF_UNUSED cruft --- libavformat/avformat.h | 9 --------- libavformat/version.h | 3 --- 2 files changed, 12 deletions(-) (limited to 'libavformat/avformat.h') diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 289834627a..d507c2048b 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -545,10 +545,6 @@ typedef struct AVStream { int64_t nb_frames; ///< number of frames in this stream if known or 0 -#if FF_API_LAVF_UNUSED - attribute_deprecated int64_t unused[4+1]; -#endif - int disposition; /**< AV_DISPOSITION_* bit field */ AVProbeData probe_data; @@ -701,11 +697,6 @@ typedef struct AVFormatContext { /* av_read_frame() support */ AVStream *cur_st; -#if FF_API_LAVF_UNUSED - const uint8_t *cur_ptr_deprecated; - int cur_len_deprecated; - AVPacket cur_pkt_deprecated; -#endif /* av_seek_frame() support */ int64_t data_offset; /**< offset of the first packet */ diff --git a/libavformat/version.h b/libavformat/version.h index 08dc566425..484ebecb9c 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -50,9 +50,6 @@ #ifndef FF_API_READ_SEEK #define FF_API_READ_SEEK (LIBAVFORMAT_VERSION_MAJOR < 54) #endif -#ifndef FF_API_LAVF_UNUSED -#define FF_API_LAVF_UNUSED (LIBAVFORMAT_VERSION_MAJOR < 53) -#endif #ifndef FF_API_PARAMETERS_CODEC_ID #define FF_API_PARAMETERS_CODEC_ID (LIBAVFORMAT_VERSION_MAJOR < 53) #endif -- cgit v1.2.3 From 583f6c67b6edfb6a6202944b8ba98b483826a1ec Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 3 Feb 2011 12:46:12 +0100 Subject: lavf: remove FF_API_PARAMETERS_CODEC_ID cruft --- libavformat/avformat.h | 4 ---- libavformat/version.h | 3 --- 2 files changed, 7 deletions(-) (limited to 'libavformat/avformat.h') diff --git a/libavformat/avformat.h b/libavformat/avformat.h index d507c2048b..4ed791b995 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -242,10 +242,6 @@ typedef struct AVFormatParameters { unsigned int initial_pause:1; /**< Do not begin to play the stream immediately (RTSP only). */ unsigned int prealloced_context:1; -#if FF_API_PARAMETERS_CODEC_ID - attribute_deprecated enum CodecID video_codec_id; - attribute_deprecated enum CodecID audio_codec_id; -#endif } AVFormatParameters; //! Demuxer will use avio_open, no opened file should be provided by the caller. diff --git a/libavformat/version.h b/libavformat/version.h index 484ebecb9c..11b8b0529f 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -50,9 +50,6 @@ #ifndef FF_API_READ_SEEK #define FF_API_READ_SEEK (LIBAVFORMAT_VERSION_MAJOR < 54) #endif -#ifndef FF_API_PARAMETERS_CODEC_ID -#define FF_API_PARAMETERS_CODEC_ID (LIBAVFORMAT_VERSION_MAJOR < 53) -#endif #ifndef FF_API_FIRST_FORMAT #define FF_API_FIRST_FORMAT (LIBAVFORMAT_VERSION_MAJOR < 53) #endif -- cgit v1.2.3 From b4c5acabb90cf8e69db2d9f3210d9fa8a7d55ec6 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 3 Feb 2011 12:47:18 +0100 Subject: lavf: remove FF_API_FIRST_FORMAT cruft --- libavformat/avformat.h | 5 ----- libavformat/utils.c | 10 ++-------- libavformat/version.h | 3 --- 3 files changed, 2 insertions(+), 16 deletions(-) (limited to 'libavformat/avformat.h') diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 4ed791b995..568521311e 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -820,11 +820,6 @@ typedef struct AVPacketList { struct AVPacketList *next; } AVPacketList; -#if FF_API_FIRST_FORMAT -attribute_deprecated extern AVInputFormat *first_iformat; -attribute_deprecated extern AVOutputFormat *first_oformat; -#endif - /** * If f is NULL, returns the first registered input format, * if f is non-NULL, returns the next registered input format after f diff --git a/libavformat/utils.c b/libavformat/utils.c index d2f70e17e6..1359bd3d05 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -115,15 +115,9 @@ static void av_frac_add(AVFrac *f, int64_t incr) } /** head of registered input format linked list */ -#if !FF_API_FIRST_FORMAT -static -#endif -AVInputFormat *first_iformat = NULL; +static AVInputFormat *first_iformat = NULL; /** head of registered output format linked list */ -#if !FF_API_FIRST_FORMAT -static -#endif -AVOutputFormat *first_oformat = NULL; +static AVOutputFormat *first_oformat = NULL; AVInputFormat *av_iformat_next(AVInputFormat *f) { diff --git a/libavformat/version.h b/libavformat/version.h index 11b8b0529f..9499fd6e38 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -50,9 +50,6 @@ #ifndef FF_API_READ_SEEK #define FF_API_READ_SEEK (LIBAVFORMAT_VERSION_MAJOR < 54) #endif -#ifndef FF_API_FIRST_FORMAT -#define FF_API_FIRST_FORMAT (LIBAVFORMAT_VERSION_MAJOR < 53) -#endif #ifndef FF_API_SYMVER #define FF_API_SYMVER (LIBAVFORMAT_VERSION_MAJOR < 53) #endif -- cgit v1.2.3 From df56d5833959cde9ce60ab43e2923eaaea3287b3 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 12 Apr 2011 20:10:10 +0200 Subject: lavf: remove FF_API_INDEX_BUILT cruft --- libavformat/avformat.h | 3 --- libavformat/version.h | 3 --- 2 files changed, 6 deletions(-) (limited to 'libavformat/avformat.h') diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 568521311e..2567aabd5a 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -696,9 +696,6 @@ typedef struct AVFormatContext { /* av_seek_frame() support */ int64_t data_offset; /**< offset of the first packet */ -#if FF_API_INDEX_BUILT - attribute_deprecated int index_built; -#endif int mux_rate; unsigned int packet_size; diff --git a/libavformat/version.h b/libavformat/version.h index 6396164212..01730183b2 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -50,9 +50,6 @@ #ifndef FF_API_OLD_AVIO #define FF_API_OLD_AVIO (LIBAVFORMAT_VERSION_MAJOR < 54) #endif -#ifndef FF_API_INDEX_BUILT -#define FF_API_INDEX_BUILT (LIBAVFORMAT_VERSION_MAJOR < 53) -#endif #ifndef FF_API_DUMP_FORMAT #define FF_API_DUMP_FORMAT (LIBAVFORMAT_VERSION_MAJOR < 54) #endif -- cgit v1.2.3