X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Favformat.h;h=166f1aa41cf26dbc4c458d901c28467b6cf0f54c;hb=56450a0ee4fdda160f4039fc2ae33edfd27765c9;hp=8600ee1bf71de2cf52dd976304ed1f5739053270;hpb=557953a397dfdd9c7a3d8c2f60d1204599e3d3ac;p=ffmpeg diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 8600ee1bf71..166f1aa41cf 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -525,18 +525,6 @@ typedef struct AVOutputFormat { * New public fields should be added right above. ***************************************************************** */ - /** - * The ff_const59 define is not part of the public API and will - * be removed without further warning. - */ -#if FF_API_AVIOFORMAT -#define ff_const59 -#else -#define ff_const59 const -#endif -#if FF_API_NEXT - ff_const59 struct AVOutputFormat *next; -#endif /** * size of private data so that it can be allocated in the wrapper */ @@ -683,10 +671,6 @@ typedef struct AVInputFormat { * New public fields should be added right above. ***************************************************************** */ -#if FF_API_NEXT - ff_const59 struct AVInputFormat *next; -#endif - /** * Raw demuxers store their codec ID here. */ @@ -1242,14 +1226,14 @@ typedef struct AVFormatContext { * * Demuxing only, set by avformat_open_input(). */ - ff_const59 struct AVInputFormat *iformat; + const struct AVInputFormat *iformat; /** * The output container format. * * Muxing only, must be set by the caller before avformat_write_header(). */ - ff_const59 struct AVOutputFormat *oformat; + const struct AVOutputFormat *oformat; /** * Format private data. This is an AVOptions-enabled struct @@ -1941,24 +1925,6 @@ const char *avformat_configuration(void); */ const char *avformat_license(void); -#if FF_API_NEXT -/** - * Initialize libavformat and register all the muxers, demuxers and - * protocols. If you do not call this function, then you can select - * exactly which formats you want to support. - * - * @see av_register_input_format() - * @see av_register_output_format() - */ -attribute_deprecated -void av_register_all(void); - -attribute_deprecated -void av_register_input_format(AVInputFormat *format); -attribute_deprecated -void av_register_output_format(AVOutputFormat *format); -#endif - /** * Do global initialization of network libraries. This is optional, * and not recommended anymore. @@ -1981,24 +1947,6 @@ int avformat_network_init(void); */ int avformat_network_deinit(void); -#if FF_API_NEXT -/** - * If f is NULL, returns the first registered input format, - * if f is non-NULL, returns the next registered input format after f - * or NULL if f is the last one. - */ -attribute_deprecated -AVInputFormat *av_iformat_next(const AVInputFormat *f); - -/** - * If f is NULL, returns the first registered output format, - * if f is non-NULL, returns the next registered output format after f - * or NULL if f is the last one. - */ -attribute_deprecated -AVOutputFormat *av_oformat_next(const AVOutputFormat *f); -#endif - /** * Iterate over all registered muxers. * @@ -2131,7 +2079,7 @@ AVProgram *av_new_program(AVFormatContext *s, int id); * @return >= 0 in case of success, a negative AVERROR code in case of * failure */ -int avformat_alloc_output_context2(AVFormatContext **ctx, ff_const59 AVOutputFormat *oformat, +int avformat_alloc_output_context2(AVFormatContext **ctx, const AVOutputFormat *oformat, const char *format_name, const char *filename); /** @@ -2142,7 +2090,7 @@ int avformat_alloc_output_context2(AVFormatContext **ctx, ff_const59 AVOutputFor /** * Find AVInputFormat based on the short name of the input format. */ -ff_const59 AVInputFormat *av_find_input_format(const char *short_name); +const AVInputFormat *av_find_input_format(const char *short_name); /** * Guess the file format. @@ -2151,7 +2099,7 @@ ff_const59 AVInputFormat *av_find_input_format(const char *short_name); * @param is_opened Whether the file is already opened; determines whether * demuxers with or without AVFMT_NOFILE are probed. */ -ff_const59 AVInputFormat *av_probe_input_format(ff_const59 AVProbeData *pd, int is_opened); +const AVInputFormat *av_probe_input_format(const AVProbeData *pd, int is_opened); /** * Guess the file format. @@ -2165,7 +2113,8 @@ ff_const59 AVInputFormat *av_probe_input_format(ff_const59 AVProbeData *pd, int * If the score is <= AVPROBE_SCORE_MAX / 4 it is recommended * to retry with a larger probe buffer. */ -ff_const59 AVInputFormat *av_probe_input_format2(ff_const59 AVProbeData *pd, int is_opened, int *score_max); +const AVInputFormat *av_probe_input_format2(const AVProbeData *pd, + int is_opened, int *score_max); /** * Guess the file format. @@ -2174,7 +2123,8 @@ ff_const59 AVInputFormat *av_probe_input_format2(ff_const59 AVProbeData *pd, int * demuxers with or without AVFMT_NOFILE are probed. * @param score_ret The score of the best detection. */ -ff_const59 AVInputFormat *av_probe_input_format3(ff_const59 AVProbeData *pd, int is_opened, int *score_ret); +const AVInputFormat *av_probe_input_format3(const AVProbeData *pd, + int is_opened, int *score_ret); /** * Probe a bytestream to determine the input format. Each time a probe returns @@ -2192,14 +2142,14 @@ ff_const59 AVInputFormat *av_probe_input_format3(ff_const59 AVProbeData *pd, int * the maximal score is AVPROBE_SCORE_MAX * AVERROR code otherwise */ -int av_probe_input_buffer2(AVIOContext *pb, ff_const59 AVInputFormat **fmt, +int av_probe_input_buffer2(AVIOContext *pb, const AVInputFormat **fmt, const char *url, void *logctx, unsigned int offset, unsigned int max_probe_size); /** * Like av_probe_input_buffer2() but returns 0 on success */ -int av_probe_input_buffer(AVIOContext *pb, ff_const59 AVInputFormat **fmt, +int av_probe_input_buffer(AVIOContext *pb, const AVInputFormat **fmt, const char *url, void *logctx, unsigned int offset, unsigned int max_probe_size); @@ -2222,7 +2172,8 @@ int av_probe_input_buffer(AVIOContext *pb, ff_const59 AVInputFormat **fmt, * * @note If you want to use custom IO, preallocate the format context and set its pb field. */ -int avformat_open_input(AVFormatContext **ps, const char *url, ff_const59 AVInputFormat *fmt, AVDictionary **options); +int avformat_open_input(AVFormatContext **ps, const char *url, + const AVInputFormat *fmt, AVDictionary **options); #if FF_API_DEMUXER_OPEN /** @@ -2613,16 +2564,16 @@ int av_write_trailer(AVFormatContext *s); * @param mime_type if non-NULL checks if mime_type matches with the * MIME type of the registered formats */ -ff_const59 AVOutputFormat *av_guess_format(const char *short_name, - const char *filename, - const char *mime_type); +const AVOutputFormat *av_guess_format(const char *short_name, + const char *filename, + const char *mime_type); /** * Guess the codec ID based upon muxer and filename. */ -enum AVCodecID av_guess_codec(ff_const59 AVOutputFormat *fmt, const char *short_name, - const char *filename, const char *mime_type, - enum AVMediaType type); +enum AVCodecID av_guess_codec(const AVOutputFormat *fmt, const char *short_name, + const char *filename, const char *mime_type, + enum AVMediaType type); /** * Get timing information for the data currently output. @@ -2996,23 +2947,6 @@ int avformat_match_stream_specifier(AVFormatContext *s, AVStream *st, int avformat_queue_attached_pictures(AVFormatContext *s); -#if FF_API_OLD_BSF -/** - * Apply a list of bitstream filters to a packet. - * - * @param codec AVCodecContext, usually from an AVStream - * @param pkt the packet to apply filters to. If, on success, the returned - * packet has size == 0 and side_data_elems == 0, it indicates that - * the packet should be dropped - * @param bsfc a NULL-terminated list of filters to apply - * @return >=0 on success; - * AVERROR code on failure - */ -attribute_deprecated -int av_apply_bitstream_filters(AVCodecContext *codec, AVPacket *pkt, - AVBitStreamFilterContext *bsfc); -#endif - enum AVTimebaseSource { AVFMT_TBCF_AUTO = -1, AVFMT_TBCF_DECODER,