* 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
/**
* size of private data so that it can be allocated in the wrapper
*/
*/
AVRational r_frame_rate;
-#if FF_API_LAVF_FFSERVER
- /**
- * String containing pairs of key and values describing recommended encoder configuration.
- * Pairs are separated by ','.
- * Keys are separated from values by '='.
- *
- * @deprecated unused
- */
- attribute_deprecated
- char *recommended_encoder_configuration;
-#endif
-
/**
* Codec parameters associated with this stream. Allocated and freed by
* libavformat in avformat_new_stream() and avformat_free_context()
AVStreamInternal *internal;
} AVStream;
-#if FF_API_FORMAT_GET_SET
-/**
- * Accessors for some AVStream fields. These used to be provided for ABI
- * compatibility, and do not need to be used anymore.
- */
-attribute_deprecated
-AVRational av_stream_get_r_frame_rate(const AVStream *s);
-attribute_deprecated
-void av_stream_set_r_frame_rate(AVStream *s, AVRational r);
-#if FF_API_LAVF_FFSERVER
-attribute_deprecated
-char* av_stream_get_recommended_encoder_configuration(const AVStream *s);
-attribute_deprecated
-void av_stream_set_recommended_encoder_configuration(AVStream *s, char *configuration);
-#endif
-#endif
-
struct AVCodecParserContext *av_stream_get_parser(const AVStream *s);
/**
*
* 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
*/
AVStream **streams;
-#if FF_API_FORMAT_FILENAME
- /**
- * input or output filename
- *
- * - demuxing: set by avformat_open_input()
- * - muxing: may be set by the caller before avformat_write_header()
- *
- * @deprecated Use url instead.
- */
- attribute_deprecated
- char filename[1024];
-#endif
-
/**
* input or output URL. Unlike the old filename field, this field has no
* length restriction.
*/
enum AVCodecID data_codec_id;
-#if FF_API_OLD_OPEN_CALLBACKS
- /**
- * Called to open further IO contexts when needed for demuxing.
- *
- * This can be set by the user application to perform security checks on
- * the URLs before opening them.
- * The function should behave like avio_open2(), AVFormatContext is provided
- * as contextual information and to reach AVFormatContext.opaque.
- *
- * If NULL then some simple checks are used together with avio_open2().
- *
- * Must not be accessed directly from outside avformat.
- * @See av_format_set_open_cb()
- *
- * Demuxing: Set by user.
- *
- * @deprecated Use io_open and io_close.
- */
- attribute_deprecated
- int (*open_cb)(struct AVFormatContext *s, AVIOContext **p, const char *url, int flags, const AVIOInterruptCB *int_cb, AVDictionary **options);
-#endif
-
/**
* ',' separated list of allowed protocols.
* - encoding: unused
int max_probe_packets;
} AVFormatContext;
-#if FF_API_FORMAT_GET_SET
-/**
- * Accessors for some AVFormatContext fields. These used to be provided for ABI
- * compatibility, and do not need to be used anymore.
- */
-attribute_deprecated
-int av_format_get_probe_score(const AVFormatContext *s);
-attribute_deprecated
-AVCodec * av_format_get_video_codec(const AVFormatContext *s);
-attribute_deprecated
-void av_format_set_video_codec(AVFormatContext *s, AVCodec *c);
-attribute_deprecated
-AVCodec * av_format_get_audio_codec(const AVFormatContext *s);
-attribute_deprecated
-void av_format_set_audio_codec(AVFormatContext *s, AVCodec *c);
-attribute_deprecated
-AVCodec * av_format_get_subtitle_codec(const AVFormatContext *s);
-attribute_deprecated
-void av_format_set_subtitle_codec(AVFormatContext *s, AVCodec *c);
-attribute_deprecated
-AVCodec * av_format_get_data_codec(const AVFormatContext *s);
-attribute_deprecated
-void av_format_set_data_codec(AVFormatContext *s, AVCodec *c);
-attribute_deprecated
-int av_format_get_metadata_header_padding(const AVFormatContext *s);
-attribute_deprecated
-void av_format_set_metadata_header_padding(AVFormatContext *s, int c);
-attribute_deprecated
-void * av_format_get_opaque(const AVFormatContext *s);
-attribute_deprecated
-void av_format_set_opaque(AVFormatContext *s, void *opaque);
-attribute_deprecated
-av_format_control_message av_format_get_control_message_cb(const AVFormatContext *s);
-attribute_deprecated
-void av_format_set_control_message_cb(AVFormatContext *s, av_format_control_message callback);
-#if FF_API_OLD_OPEN_CALLBACKS
-attribute_deprecated AVOpenCallback av_format_get_open_cb(const AVFormatContext *s);
-attribute_deprecated void av_format_set_open_cb(AVFormatContext *s, AVOpenCallback callback);
-#endif
-#endif
-
/**
* This function will cause global side data to be injected in the next packet
* of each stream as well as after any subsequent seek.
* @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);
/**
/**
* 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.
* @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.
* 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.
* 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
* 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);
*
* @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
/**
* @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.