Update FFmpeg to version 4.2.2.
This commit is contained in:
43 files changed
+797
-741
No files matched your search
@@ -36,17 +36,15 @@
|
||||
* into component streams, and the reverse process of muxing - writing supplied
|
||||
* data in a specified container format. It also has an @ref lavf_io
|
||||
* "I/O module" which supports a number of protocols for accessing the data (e.g.
|
||||
* file, tcp, http and others). Before using lavf, you need to call
|
||||
* av_register_all() to register all compiled muxers, demuxers and protocols.
|
||||
* file, tcp, http and others).
|
||||
* Unless you are absolutely sure you won't use libavformat's network
|
||||
* capabilities, you should also call avformat_network_init().
|
||||
*
|
||||
* A supported input format is described by an AVInputFormat struct, conversely
|
||||
* an output format is described by AVOutputFormat. You can iterate over all
|
||||
* registered input/output formats using the av_iformat_next() /
|
||||
* av_oformat_next() functions. The protocols layer is not part of the public
|
||||
* API, so you can only get the names of supported protocols with the
|
||||
* avio_enum_protocols() function.
|
||||
* input/output formats using the av_demuxer_iterate / av_muxer_iterate() functions.
|
||||
* The protocols layer is not part of the public API, so you can only get the names
|
||||
* of supported protocols with the avio_enum_protocols() function.
|
||||
*
|
||||
* Main lavf structure used for both muxing and demuxing is AVFormatContext,
|
||||
* which exports all information about the file being read or written. As with
|
||||
@@ -177,8 +175,8 @@
|
||||
* Otherwise, if AVPacket.buf is NULL, the packet data is backed by a
|
||||
* static storage somewhere inside the demuxer and the packet is only valid
|
||||
* until the next av_read_frame() call or closing the file. If the caller
|
||||
* requires a longer lifetime, av_dup_packet() will make an av_malloc()ed copy
|
||||
* of it.
|
||||
* requires a longer lifetime, av_packet_make_refcounted() will ensure that
|
||||
* the data is reference counted, copying the data if necessary.
|
||||
* In both cases, the packet must be freed with av_packet_unref() when it is no
|
||||
* longer needed.
|
||||
*
|
||||
@@ -532,7 +530,16 @@ typedef struct AVOutputFormat {
|
||||
* New public fields should be added right above.
|
||||
*****************************************************************
|
||||
*/
|
||||
struct AVOutputFormat *next;
|
||||
/**
|
||||
* 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
|
||||
ff_const59 struct AVOutputFormat *next;
|
||||
/**
|
||||
* size of private data so that it can be allocated in the wrapper
|
||||
*/
|
||||
@@ -646,7 +653,7 @@ typedef struct AVInputFormat {
|
||||
|
||||
/**
|
||||
* Can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_SHOW_IDS,
|
||||
* AVFMT_GENERIC_INDEX, AVFMT_TS_DISCONT, AVFMT_NOBINSEARCH,
|
||||
* AVFMT_NOTIMESTAMPS, AVFMT_GENERIC_INDEX, AVFMT_TS_DISCONT, AVFMT_NOBINSEARCH,
|
||||
* AVFMT_NOGENSEARCH, AVFMT_NO_BYTE_SEEK, AVFMT_SEEK_TO_PTS.
|
||||
*/
|
||||
int flags;
|
||||
@@ -676,7 +683,7 @@ typedef struct AVInputFormat {
|
||||
* New public fields should be added right above.
|
||||
*****************************************************************
|
||||
*/
|
||||
struct AVInputFormat *next;
|
||||
ff_const59 struct AVInputFormat *next;
|
||||
|
||||
/**
|
||||
* Raw demuxers store their codec ID here.
|
||||
@@ -693,7 +700,7 @@ typedef struct AVInputFormat {
|
||||
* The buffer provided is guaranteed to be AVPROBE_PADDING_SIZE bytes
|
||||
* big so you do not have to check for that unless you need more.
|
||||
*/
|
||||
int (*read_probe)(AVProbeData *);
|
||||
int (*read_probe)(const AVProbeData *);
|
||||
|
||||
/**
|
||||
* Read the format header and initialize the AVFormatContext
|
||||
@@ -846,6 +853,7 @@ typedef struct AVStreamInternal AVStreamInternal;
|
||||
#define AV_DISPOSITION_DESCRIPTIONS 0x20000
|
||||
#define AV_DISPOSITION_METADATA 0x40000
|
||||
#define AV_DISPOSITION_DEPENDENT 0x80000 ///< dependent audio stream (mix_type=0 in mpegts)
|
||||
#define AV_DISPOSITION_STILL_IMAGE 0x100000 ///< still images in video stream (still_picture_flag=1 in mpegts)
|
||||
|
||||
/**
|
||||
* Options for behavior on timestamp wrap detection.
|
||||
@@ -1102,6 +1110,13 @@ typedef struct AVStream {
|
||||
*/
|
||||
int stream_identifier;
|
||||
|
||||
/**
|
||||
* Details of the MPEG-TS program which created this stream.
|
||||
*/
|
||||
int program_num;
|
||||
int pmt_version;
|
||||
int pmt_stream_idx;
|
||||
|
||||
int64_t interleaver_chunk_size;
|
||||
int64_t interleaver_chunk_duration;
|
||||
|
||||
@@ -1259,6 +1274,7 @@ typedef struct AVProgram {
|
||||
int program_num;
|
||||
int pmt_pid;
|
||||
int pcr_pid;
|
||||
int pmt_version;
|
||||
|
||||
/*****************************************************************
|
||||
* All fields below this line are not part of the public API. They
|
||||
@@ -1337,14 +1353,14 @@ typedef struct AVFormatContext {
|
||||
*
|
||||
* Demuxing only, set by avformat_open_input().
|
||||
*/
|
||||
struct AVInputFormat *iformat;
|
||||
ff_const59 struct AVInputFormat *iformat;
|
||||
|
||||
/**
|
||||
* The output container format.
|
||||
*
|
||||
* Muxing only, must be set by the caller before avformat_write_header().
|
||||
*/
|
||||
struct AVOutputFormat *oformat;
|
||||
ff_const59 struct AVOutputFormat *oformat;
|
||||
|
||||
/**
|
||||
* Format private data. This is an AVOptions-enabled struct
|
||||
@@ -1474,7 +1490,9 @@ typedef struct AVFormatContext {
|
||||
* This flag is mainly intended for testing.
|
||||
*/
|
||||
#define AVFMT_FLAG_BITEXACT 0x0400
|
||||
#define AVFMT_FLAG_MP4A_LATM 0x8000 ///< Enable RTP MP4A-LATM payload
|
||||
#if FF_API_LAVF_MP4A_LATM
|
||||
#define AVFMT_FLAG_MP4A_LATM 0x8000 ///< Deprecated, does nothing.
|
||||
#endif
|
||||
#define AVFMT_FLAG_SORT_DTS 0x10000 ///< try to interleave outputted packets by dts (using this flag can slow demuxing down)
|
||||
#define AVFMT_FLAG_PRIV_OPT 0x20000 ///< Enable use of private options by delaying codec open (this could be made default once all code is converted)
|
||||
#if FF_API_LAVF_KEEPSIDE_FLAG
|
||||
@@ -1926,6 +1944,13 @@ typedef struct AVFormatContext {
|
||||
* - decoding: set by user
|
||||
*/
|
||||
int max_streams;
|
||||
|
||||
/**
|
||||
* Skip duration calcuation in estimate_timings_from_pts.
|
||||
* - encoding: unused
|
||||
* - decoding: set by user
|
||||
*/
|
||||
int skip_estimate_duration_from_pts;
|
||||
} AVFormatContext;
|
||||
|
||||
#if FF_API_FORMAT_GET_SET
|
||||
@@ -2193,7 +2218,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, AVOutputFormat *oformat,
|
||||
int avformat_alloc_output_context2(AVFormatContext **ctx, ff_const59 AVOutputFormat *oformat,
|
||||
const char *format_name, const char *filename);
|
||||
|
||||
/**
|
||||
@@ -2204,7 +2229,7 @@ int avformat_alloc_output_context2(AVFormatContext **ctx, AVOutputFormat *oforma
|
||||
/**
|
||||
* Find AVInputFormat based on the short name of the input format.
|
||||
*/
|
||||
AVInputFormat *av_find_input_format(const char *short_name);
|
||||
ff_const59 AVInputFormat *av_find_input_format(const char *short_name);
|
||||
|
||||
/**
|
||||
* Guess the file format.
|
||||
@@ -2213,7 +2238,7 @@ 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.
|
||||
*/
|
||||
AVInputFormat *av_probe_input_format(AVProbeData *pd, int is_opened);
|
||||
ff_const59 AVInputFormat *av_probe_input_format(ff_const59 AVProbeData *pd, int is_opened);
|
||||
|
||||
/**
|
||||
* Guess the file format.
|
||||
@@ -2227,7 +2252,7 @@ AVInputFormat *av_probe_input_format(AVProbeData *pd, int is_opened);
|
||||
* If the score is <= AVPROBE_SCORE_MAX / 4 it is recommended
|
||||
* to retry with a larger probe buffer.
|
||||
*/
|
||||
AVInputFormat *av_probe_input_format2(AVProbeData *pd, int is_opened, int *score_max);
|
||||
ff_const59 AVInputFormat *av_probe_input_format2(ff_const59 AVProbeData *pd, int is_opened, int *score_max);
|
||||
|
||||
/**
|
||||
* Guess the file format.
|
||||
@@ -2236,7 +2261,7 @@ AVInputFormat *av_probe_input_format2(AVProbeData *pd, int is_opened, int *score
|
||||
* demuxers with or without AVFMT_NOFILE are probed.
|
||||
* @param score_ret The score of the best detection.
|
||||
*/
|
||||
AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened, int *score_ret);
|
||||
ff_const59 AVInputFormat *av_probe_input_format3(ff_const59 AVProbeData *pd, int is_opened, int *score_ret);
|
||||
|
||||
/**
|
||||
* Probe a bytestream to determine the input format. Each time a probe returns
|
||||
@@ -2254,14 +2279,14 @@ AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened, int *score
|
||||
* the maximal score is AVPROBE_SCORE_MAX
|
||||
* AVERROR code otherwise
|
||||
*/
|
||||
int av_probe_input_buffer2(AVIOContext *pb, AVInputFormat **fmt,
|
||||
int av_probe_input_buffer2(AVIOContext *pb, ff_const59 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, AVInputFormat **fmt,
|
||||
int av_probe_input_buffer(AVIOContext *pb, ff_const59 AVInputFormat **fmt,
|
||||
const char *url, void *logctx,
|
||||
unsigned int offset, unsigned int max_probe_size);
|
||||
|
||||
@@ -2284,7 +2309,7 @@ int av_probe_input_buffer(AVIOContext *pb, 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, AVInputFormat *fmt, AVDictionary **options);
|
||||
int avformat_open_input(AVFormatContext **ps, const char *url, ff_const59 AVInputFormat *fmt, AVDictionary **options);
|
||||
|
||||
attribute_deprecated
|
||||
int av_demuxer_open(AVFormatContext *ic);
|
||||
@@ -2669,14 +2694,14 @@ 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
|
||||
*/
|
||||
AVOutputFormat *av_guess_format(const char *short_name,
|
||||
ff_const59 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(AVOutputFormat *fmt, const char *short_name,
|
||||
enum AVCodecID av_guess_codec(ff_const59 AVOutputFormat *fmt, const char *short_name,
|
||||
const char *filename, const char *mime_type,
|
||||
enum AVMediaType type);
|
||||
|
||||
|
||||
@@ -236,7 +236,7 @@ typedef struct AVIOContext {
|
||||
int (*write_packet)(void *opaque, uint8_t *buf, int buf_size);
|
||||
int64_t (*seek)(void *opaque, int64_t offset, int whence);
|
||||
int64_t pos; /**< position in the file of the current buffer */
|
||||
int eof_reached; /**< true if eof reached */
|
||||
int eof_reached; /**< true if was unable to read due to error or eof */
|
||||
int write_flag; /**< true if open for writing */
|
||||
int max_packet_size;
|
||||
unsigned long checksum;
|
||||
@@ -566,8 +566,8 @@ static av_always_inline int64_t avio_tell(AVIOContext *s)
|
||||
int64_t avio_size(AVIOContext *s);
|
||||
|
||||
/**
|
||||
* feof() equivalent for AVIOContext.
|
||||
* @return non zero if and only if end of file
|
||||
* Similar to feof() but also returns nonzero on read errors.
|
||||
* @return non zero if and only if at end of file or a read error happened when reading.
|
||||
*/
|
||||
int avio_feof(AVIOContext *s);
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
// Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium)
|
||||
// Also please add any ticket numbers that you believe might be affected here
|
||||
#define LIBAVFORMAT_VERSION_MAJOR 58
|
||||
#define LIBAVFORMAT_VERSION_MINOR 12
|
||||
#define LIBAVFORMAT_VERSION_MINOR 29
|
||||
#define LIBAVFORMAT_VERSION_MICRO 100
|
||||
|
||||
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
|
||||
@@ -70,6 +70,9 @@
|
||||
#ifndef FF_API_HLS_WRAP
|
||||
#define FF_API_HLS_WRAP (LIBAVFORMAT_VERSION_MAJOR < 59)
|
||||
#endif
|
||||
#ifndef FF_API_HLS_USE_LOCALTIME
|
||||
#define FF_API_HLS_USE_LOCALTIME (LIBAVFORMAT_VERSION_MAJOR < 59)
|
||||
#endif
|
||||
#ifndef FF_API_LAVF_KEEPSIDE_FLAG
|
||||
#define FF_API_LAVF_KEEPSIDE_FLAG (LIBAVFORMAT_VERSION_MAJOR < 59)
|
||||
#endif
|
||||
@@ -94,6 +97,15 @@
|
||||
#ifndef FF_API_NEXT
|
||||
#define FF_API_NEXT (LIBAVFORMAT_VERSION_MAJOR < 59)
|
||||
#endif
|
||||
#ifndef FF_API_DASH_MIN_SEG_DURATION
|
||||
#define FF_API_DASH_MIN_SEG_DURATION (LIBAVFORMAT_VERSION_MAJOR < 59)
|
||||
#endif
|
||||
#ifndef FF_API_LAVF_MP4A_LATM
|
||||
#define FF_API_LAVF_MP4A_LATM (LIBAVFORMAT_VERSION_MAJOR < 59)
|
||||
#endif
|
||||
#ifndef FF_API_AVIOFORMAT
|
||||
#define FF_API_AVIOFORMAT (LIBAVFORMAT_VERSION_MAJOR < 59)
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef FF_API_R_FRAME_RATE
|
||||
|
||||
Reference in new issue
Block a user