Update ffmpeg to include the ac-3 encoder.
This commit is contained in:
1 parent
e9270b2f75
commit
b6bb6e02ca
61 files changed
+1417
-347
No files matched your search
@@ -89,7 +89,7 @@
|
||||
* - Send valid input:
|
||||
* - For decoding, call avcodec_send_packet() to give the decoder raw
|
||||
* compressed data in an AVPacket.
|
||||
* - For encoding, call avcodec_send_frame() to give the decoder an AVFrame
|
||||
* - For encoding, call avcodec_send_frame() to give the encoder an AVFrame
|
||||
* containing uncompressed audio or video.
|
||||
* In both cases, it is recommended that AVPackets and AVFrames are
|
||||
* refcounted, or libavcodec might have to copy the input data. (libavformat
|
||||
@@ -112,6 +112,12 @@
|
||||
* are filled. This situation is handled transparently if you follow the steps
|
||||
* outlined above.
|
||||
*
|
||||
* In theory, sending input can result in EAGAIN - this should happen only if
|
||||
* not all output was received. You can use this to structure alternative decode
|
||||
* or encode loops other than the one suggested above. For example, you could
|
||||
* try sending new input on each iteration, and try to receive output if that
|
||||
* returns EAGAIN.
|
||||
*
|
||||
* End of stream situations. These require "flushing" (aka draining) the codec,
|
||||
* as the codec might buffer multiple frames or packets internally for
|
||||
* performance or out of necessity (consider B-frames).
|
||||
@@ -136,8 +142,9 @@
|
||||
*
|
||||
* Not all codecs will follow a rigid and predictable dataflow; the only
|
||||
* guarantee is that an AVERROR(EAGAIN) return value on a send/receive call on
|
||||
* one end implies that a receive/send call on the other end will succeed. In
|
||||
* general, no codec will permit unlimited buffering of input or output.
|
||||
* one end implies that a receive/send call on the other end will succeed, or
|
||||
* at least will not fail with AVERROR(EAGAIN). In general, no codec will
|
||||
* permit unlimited buffering of input or output.
|
||||
*
|
||||
* This API replaces the following legacy functions:
|
||||
* - avcodec_decode_video2() and avcodec_decode_audio4():
|
||||
@@ -146,7 +153,8 @@
|
||||
* Unlike with the old video decoding API, multiple frames might result from
|
||||
* a packet. For audio, splitting the input packet into frames by partially
|
||||
* decoding packets becomes transparent to the API user. You never need to
|
||||
* feed an AVPacket to the API twice.
|
||||
* feed an AVPacket to the API twice (unless it is rejected with AVERROR(EAGAIN) - then
|
||||
* no data was read from the packet).
|
||||
* Additionally, sending a flush/draining packet is required only once.
|
||||
* - avcodec_encode_video2()/avcodec_encode_audio2():
|
||||
* Use avcodec_send_frame() to feed input to the encoder, then use
|
||||
@@ -159,7 +167,22 @@
|
||||
* and will result in undefined behavior.
|
||||
*
|
||||
* Some codecs might require using the new API; using the old API will return
|
||||
* an error when calling it.
|
||||
* an error when calling it. All codecs support the new API.
|
||||
*
|
||||
* A codec is not allowed to return AVERROR(EAGAIN) for both sending and receiving. This
|
||||
* would be an invalid state, which could put the codec user into an endless
|
||||
* loop. The API has no concept of time either: it cannot happen that trying to
|
||||
* do avcodec_send_packet() results in AVERROR(EAGAIN), but a repeated call 1 second
|
||||
* later accepts the packet (with no other receive/flush API calls involved).
|
||||
* The API is a strict state machine, and the passage of time is not supposed
|
||||
* to influence it. Some timing-dependent behavior might still be deemed
|
||||
* acceptable in certain cases. But it must never result in both send/receive
|
||||
* returning EAGAIN at the same time at any point. It must also absolutely be
|
||||
* avoided that the current state is "unstable" and can "flip-flop" between
|
||||
* the send/receive APIs allowing progress. For example, it's not allowed that
|
||||
* the codec randomly decides that it actually wants to consume a packet now
|
||||
* instead of returning a frame, after it just returned AVERROR(EAGAIN) on an
|
||||
* avcodec_send_packet() call.
|
||||
* @}
|
||||
*/
|
||||
|
||||
@@ -411,6 +434,17 @@ enum AVCodecID {
|
||||
AV_CODEC_ID_MAGICYUV,
|
||||
AV_CODEC_ID_SHEERVIDEO,
|
||||
AV_CODEC_ID_YLC,
|
||||
AV_CODEC_ID_PSD,
|
||||
AV_CODEC_ID_PIXLET,
|
||||
AV_CODEC_ID_SPEEDHQ,
|
||||
AV_CODEC_ID_FMVC,
|
||||
AV_CODEC_ID_SCPR,
|
||||
AV_CODEC_ID_CLEARVIDEO,
|
||||
AV_CODEC_ID_XPM,
|
||||
AV_CODEC_ID_AV1,
|
||||
AV_CODEC_ID_BITPACKED,
|
||||
AV_CODEC_ID_MSCC,
|
||||
AV_CODEC_ID_SRGC,
|
||||
|
||||
/* various PCM "codecs" */
|
||||
AV_CODEC_ID_FIRST_AUDIO = 0x10000, ///< A dummy id pointing at the start of audio codecs
|
||||
@@ -448,6 +482,8 @@ enum AVCodecID {
|
||||
|
||||
AV_CODEC_ID_PCM_S64LE = 0x10800,
|
||||
AV_CODEC_ID_PCM_S64BE,
|
||||
AV_CODEC_ID_PCM_F16LE,
|
||||
AV_CODEC_ID_PCM_F24LE,
|
||||
|
||||
/* various ADPCM codecs */
|
||||
AV_CODEC_ID_ADPCM_IMA_QT = 0x11000,
|
||||
@@ -598,6 +634,8 @@ enum AVCodecID {
|
||||
AV_CODEC_ID_XMA1,
|
||||
AV_CODEC_ID_XMA2,
|
||||
AV_CODEC_ID_DST,
|
||||
AV_CODEC_ID_ATRAC3AL,
|
||||
AV_CODEC_ID_ATRAC3PAL,
|
||||
|
||||
/* subtitle codecs */
|
||||
AV_CODEC_ID_FIRST_SUBTITLE = 0x17000, ///< A dummy ID pointing at the start of subtitle codecs.
|
||||
@@ -631,6 +669,7 @@ enum AVCodecID {
|
||||
AV_CODEC_ID_FIRST_UNKNOWN = 0x18000, ///< A dummy ID pointing at the start of various fake codecs.
|
||||
AV_CODEC_ID_TTF = 0x18000,
|
||||
|
||||
AV_CODEC_ID_SCTE_35, ///< Contain timestamp estimated through PCR of program stream.
|
||||
AV_CODEC_ID_BINTEXT = 0x18800,
|
||||
AV_CODEC_ID_XBIN,
|
||||
AV_CODEC_ID_IDF,
|
||||
@@ -688,7 +727,7 @@ typedef struct AVCodecDescriptor {
|
||||
|
||||
/**
|
||||
* Codec uses only intra compression.
|
||||
* Video codecs only.
|
||||
* Video and audio codecs only.
|
||||
*/
|
||||
#define AV_CODEC_PROP_INTRA_ONLY (1 << 0)
|
||||
/**
|
||||
@@ -1035,6 +1074,16 @@ typedef struct RcOverride{
|
||||
* Audio encoder supports receiving a different number of samples in each call.
|
||||
*/
|
||||
#define AV_CODEC_CAP_VARIABLE_FRAME_SIZE (1 << 16)
|
||||
/**
|
||||
* Decoder is not a preferred choice for probing.
|
||||
* This indicates that the decoder is not a good choice for probing.
|
||||
* It could for example be an expensive to spin up hardware decoder,
|
||||
* or it could simply not provide a lot of useful information about
|
||||
* the stream.
|
||||
* A decoder marked with this flag should only be used as last resort
|
||||
* choice for probing.
|
||||
*/
|
||||
#define AV_CODEC_CAP_AVOID_PROBING (1 << 17)
|
||||
/**
|
||||
* Codec is intra only.
|
||||
*/
|
||||
@@ -1349,6 +1398,11 @@ typedef struct AVCPBProperties {
|
||||
* @{
|
||||
*/
|
||||
enum AVPacketSideDataType {
|
||||
/**
|
||||
* An AV_PKT_DATA_PALETTE side data packet contains exactly AVPALETTE_SIZE
|
||||
* bytes worth of palette. This side data signals that a new palette is
|
||||
* present.
|
||||
*/
|
||||
AV_PKT_DATA_PALETTE,
|
||||
|
||||
/**
|
||||
@@ -1522,10 +1576,23 @@ enum AVPacketSideDataType {
|
||||
|
||||
/**
|
||||
* Mastering display metadata (based on SMPTE-2086:2014). This metadata
|
||||
* should be associated with a video stream and containts data in the form
|
||||
* should be associated with a video stream and contains data in the form
|
||||
* of the AVMasteringDisplayMetadata struct.
|
||||
*/
|
||||
AV_PKT_DATA_MASTERING_DISPLAY_METADATA
|
||||
AV_PKT_DATA_MASTERING_DISPLAY_METADATA,
|
||||
|
||||
/**
|
||||
* This side data should be associated with a video stream and corresponds
|
||||
* to the AVSphericalMapping structure.
|
||||
*/
|
||||
AV_PKT_DATA_SPHERICAL,
|
||||
|
||||
/**
|
||||
* Content light level (based on CTA-861.3). This metadata should be
|
||||
* associated with a video stream and contains data in the form of the
|
||||
* AVContentLightMetadata struct.
|
||||
*/
|
||||
AV_PKT_DATA_CONTENT_LIGHT_LEVEL,
|
||||
};
|
||||
|
||||
#define AV_PKT_DATA_QUALITY_FACTOR AV_PKT_DATA_QUALITY_STATS //DEPRECATED
|
||||
@@ -1621,6 +1688,12 @@ typedef struct AVPacket {
|
||||
} AVPacket;
|
||||
#define AV_PKT_FLAG_KEY 0x0001 ///< The packet contains a keyframe
|
||||
#define AV_PKT_FLAG_CORRUPT 0x0002 ///< The packet content is corrupted
|
||||
/**
|
||||
* Flag is used to discard packets which are required to maintain valid
|
||||
* decoder state but are not required for output and should be dropped
|
||||
* after decoding.
|
||||
**/
|
||||
#define AV_PKT_FLAG_DISCARD 0x0004
|
||||
|
||||
enum AVSideDataParamChangeFlags {
|
||||
AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT = 0x0001,
|
||||
@@ -1648,7 +1721,7 @@ enum AVFieldOrder {
|
||||
* New fields can be added to the end with minor version bumps.
|
||||
* Removal, reordering and changes to existing fields require a major
|
||||
* version bump.
|
||||
* Please use AVOptions (av_opt* / av_set/get*()) to access these fields from user
|
||||
* You can use AVOptions (av_opt* / av_set/get*()) to access these fields from user
|
||||
* applications.
|
||||
* The name string for AVOptions options matches the associated command line
|
||||
* parameter name and can be found in libavcodec/options_table.h
|
||||
@@ -2861,6 +2934,7 @@ typedef struct AVCodecContext {
|
||||
#define FF_BUG_DC_CLIP 4096
|
||||
#define FF_BUG_MS 8192 ///< Work around various bugs in Microsoft's broken decoders.
|
||||
#define FF_BUG_TRUNCATED 16384
|
||||
#define FF_BUG_IEDGE 32768
|
||||
|
||||
/**
|
||||
* strictly follow the standard (MPEG-4, ...).
|
||||
@@ -2918,8 +2992,8 @@ typedef struct AVCodecContext {
|
||||
#define FF_DEBUG_MMCO 0x00000800
|
||||
#define FF_DEBUG_BUGS 0x00001000
|
||||
#if FF_API_DEBUG_MV
|
||||
#define FF_DEBUG_VIS_QP 0x00002000 ///< only access through AVOptions from outside libavcodec
|
||||
#define FF_DEBUG_VIS_MB_TYPE 0x00004000 ///< only access through AVOptions from outside libavcodec
|
||||
#define FF_DEBUG_VIS_QP 0x00002000
|
||||
#define FF_DEBUG_VIS_MB_TYPE 0x00004000
|
||||
#endif
|
||||
#define FF_DEBUG_BUFFERS 0x00008000
|
||||
#define FF_DEBUG_THREADS 0x00010000
|
||||
@@ -2929,7 +3003,6 @@ typedef struct AVCodecContext {
|
||||
#if FF_API_DEBUG_MV
|
||||
/**
|
||||
* debug
|
||||
* Code outside libavcodec should access this field using AVOptions
|
||||
* - encoding: Set by user.
|
||||
* - decoding: Set by user.
|
||||
*/
|
||||
@@ -3064,8 +3137,6 @@ typedef struct AVCodecContext {
|
||||
* low resolution decoding, 1-> 1/2 size, 2->1/4 size
|
||||
* - encoding: unused
|
||||
* - decoding: Set by user.
|
||||
* Code outside libavcodec should access this field using:
|
||||
* av_codec_{get,set}_lowres(avctx)
|
||||
*/
|
||||
int lowres;
|
||||
#endif
|
||||
@@ -3366,8 +3437,6 @@ typedef struct AVCodecContext {
|
||||
|
||||
/**
|
||||
* Timebase in which pkt_dts/pts and AVPacket.dts/pts are.
|
||||
* Code outside libavcodec should access this field using:
|
||||
* av_codec_{get,set}_pkt_timebase(avctx)
|
||||
* - encoding unused.
|
||||
* - decoding set by user.
|
||||
*/
|
||||
@@ -3375,8 +3444,6 @@ typedef struct AVCodecContext {
|
||||
|
||||
/**
|
||||
* AVCodecDescriptor
|
||||
* Code outside libavcodec should access this field using:
|
||||
* av_codec_{get,set}_codec_descriptor(avctx)
|
||||
* - encoding: unused.
|
||||
* - decoding: set by libavcodec.
|
||||
*/
|
||||
@@ -3387,8 +3454,6 @@ typedef struct AVCodecContext {
|
||||
* low resolution decoding, 1-> 1/2 size, 2->1/4 size
|
||||
* - encoding: unused
|
||||
* - decoding: Set by user.
|
||||
* Code outside libavcodec should access this field using:
|
||||
* av_codec_{get,set}_lowres(avctx)
|
||||
*/
|
||||
int lowres;
|
||||
#endif
|
||||
@@ -3429,7 +3494,6 @@ typedef struct AVCodecContext {
|
||||
* However for formats that do not use pre-multiplied alpha
|
||||
* there might be serious artefacts (though e.g. libswscale currently
|
||||
* assumes pre-multiplied alpha anyway).
|
||||
* Code outside libavcodec should access this field using AVOptions
|
||||
*
|
||||
* - decoding: set by user
|
||||
* - encoding: unused
|
||||
@@ -3446,7 +3510,6 @@ typedef struct AVCodecContext {
|
||||
#if !FF_API_DEBUG_MV
|
||||
/**
|
||||
* debug motion vectors
|
||||
* Code outside libavcodec should access this field using AVOptions
|
||||
* - encoding: Set by user.
|
||||
* - decoding: Set by user.
|
||||
*/
|
||||
@@ -3458,7 +3521,6 @@ typedef struct AVCodecContext {
|
||||
|
||||
/**
|
||||
* custom intra quantization matrix
|
||||
* Code outside libavcodec should access this field using av_codec_g/set_chroma_intra_matrix()
|
||||
* - encoding: Set by user, can be NULL.
|
||||
* - decoding: unused.
|
||||
*/
|
||||
@@ -3467,8 +3529,6 @@ typedef struct AVCodecContext {
|
||||
/**
|
||||
* dump format separator.
|
||||
* can be ", " or "\n " or anything else
|
||||
* Code outside libavcodec should access this field using AVOptions
|
||||
* (NO direct access).
|
||||
* - encoding: Set by user.
|
||||
* - decoding: Set by user.
|
||||
*/
|
||||
@@ -3478,13 +3538,12 @@ typedef struct AVCodecContext {
|
||||
* ',' separated list of allowed decoders.
|
||||
* If NULL then all are allowed
|
||||
* - encoding: unused
|
||||
* - decoding: set by user through AVOPtions (NO direct access)
|
||||
* - decoding: set by user
|
||||
*/
|
||||
char *codec_whitelist;
|
||||
|
||||
/*
|
||||
* Properties of the stream that gets decoded
|
||||
* To be accessed through av_codec_get_properties() (NO direct access)
|
||||
* - encoding: unused
|
||||
* - decoding: set by libavcodec
|
||||
*/
|
||||
@@ -3502,15 +3561,26 @@ typedef struct AVCodecContext {
|
||||
int nb_coded_side_data;
|
||||
|
||||
/**
|
||||
* Encoding only.
|
||||
* A reference to the AVHWFramesContext describing the input (for encoding)
|
||||
* or output (decoding) frames. The reference is set by the caller and
|
||||
* afterwards owned (and freed) by libavcodec - it should never be read by
|
||||
* the caller after being set.
|
||||
*
|
||||
* For hardware encoders configured to use a hwaccel pixel format, this
|
||||
* field should be set by the caller to a reference to the AVHWFramesContext
|
||||
* describing input frames. AVHWFramesContext.format must be equal to
|
||||
* AVCodecContext.pix_fmt.
|
||||
* - decoding: This field should be set by the caller from the get_format()
|
||||
* callback. The previous reference (if any) will always be
|
||||
* unreffed by libavcodec before the get_format() call.
|
||||
*
|
||||
* This field should be set before avcodec_open2() is called and is
|
||||
* afterwards owned and managed by libavcodec.
|
||||
* If the default get_buffer2() is used with a hwaccel pixel
|
||||
* format, then this AVHWFramesContext will be used for
|
||||
* allocating the frame buffers.
|
||||
*
|
||||
* - encoding: For hardware encoders configured to use a hwaccel pixel
|
||||
* format, this field should be set by the caller to a reference
|
||||
* to the AVHWFramesContext describing input frames.
|
||||
* AVHWFramesContext.format must be equal to
|
||||
* AVCodecContext.pix_fmt.
|
||||
*
|
||||
* This field should be set before avcodec_open2() is called.
|
||||
*/
|
||||
AVBufferRef *hw_frames_ctx;
|
||||
|
||||
@@ -3536,6 +3606,44 @@ typedef struct AVCodecContext {
|
||||
*/
|
||||
int trailing_padding;
|
||||
|
||||
/**
|
||||
* The number of pixels per image to maximally accept.
|
||||
*
|
||||
* - decoding: set by user
|
||||
* - encoding: set by user
|
||||
*/
|
||||
int64_t max_pixels;
|
||||
|
||||
/**
|
||||
* A reference to the AVHWDeviceContext describing the device which will
|
||||
* be used by a hardware encoder/decoder. The reference is set by the
|
||||
* caller and afterwards owned (and freed) by libavcodec.
|
||||
*
|
||||
* This should be used if either the codec device does not require
|
||||
* hardware frames or any that are used are to be allocated internally by
|
||||
* libavcodec. If the user wishes to supply any of the frames used as
|
||||
* encoder input or decoder output then hw_frames_ctx should be used
|
||||
* instead. When hw_frames_ctx is set in get_format() for a decoder, this
|
||||
* field will be ignored while decoding the associated stream segment, but
|
||||
* may again be used on a following one after another get_format() call.
|
||||
*
|
||||
* For both encoders and decoders this field should be set before
|
||||
* avcodec_open2() is called and must not be written to thereafter.
|
||||
*
|
||||
* Note that some decoders may require this field to be set initially in
|
||||
* order to support hw_frames_ctx at all - in that case, all frames
|
||||
* contexts used must be created on the same device.
|
||||
*/
|
||||
AVBufferRef *hw_device_ctx;
|
||||
|
||||
/**
|
||||
* Bit set of AV_HWACCEL_FLAG_* flags, which affect hardware accelerated
|
||||
* decoding (if active).
|
||||
* - encoding: unused
|
||||
* - decoding: Set by user (either before avcodec_open2(), or in the
|
||||
* AVCodecContext.get_format callback)
|
||||
*/
|
||||
int hwaccel_flags;
|
||||
} AVCodecContext;
|
||||
|
||||
AVRational av_codec_get_pkt_timebase (const AVCodecContext *avctx);
|
||||
@@ -3595,7 +3703,7 @@ typedef struct AVCodec {
|
||||
const int *supported_samplerates; ///< array of supported audio samplerates, or NULL if unknown, array is terminated by 0
|
||||
const enum AVSampleFormat *sample_fmts; ///< array of supported sample formats, or NULL if unknown, array is terminated by -1
|
||||
const uint64_t *channel_layouts; ///< array of support channel layouts, or NULL if unknown. array is terminated by 0
|
||||
uint8_t max_lowres; ///< maximum value for lowres supported by the decoder, no direct access, use av_codec_get_max_lowres()
|
||||
uint8_t max_lowres; ///< maximum value for lowres supported by the decoder
|
||||
const AVClass *priv_class; ///< AVClass for the private context
|
||||
const AVProfile *profiles; ///< array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN}
|
||||
|
||||
@@ -3656,20 +3764,22 @@ typedef struct AVCodec {
|
||||
int (*decode)(AVCodecContext *, void *outdata, int *outdata_size, AVPacket *avpkt);
|
||||
int (*close)(AVCodecContext *);
|
||||
/**
|
||||
* Decode/encode API with decoupled packet/frame dataflow. The API is the
|
||||
* Encode API with decoupled packet/frame dataflow. The API is the
|
||||
* same as the avcodec_ prefixed APIs (avcodec_send_frame() etc.), except
|
||||
* that:
|
||||
* - never called if the codec is closed or the wrong type,
|
||||
* - AVPacket parameter change side data is applied right before calling
|
||||
* AVCodec->send_packet,
|
||||
* - if AV_CODEC_CAP_DELAY is not set, drain packets or frames are never sent,
|
||||
* - only one drain packet is ever passed down (until the next flush()),
|
||||
* - a drain AVPacket is always NULL (no need to check for avpkt->size).
|
||||
* - if AV_CODEC_CAP_DELAY is not set, drain frames are never sent,
|
||||
* - only one drain frame is ever passed down,
|
||||
*/
|
||||
int (*send_frame)(AVCodecContext *avctx, const AVFrame *frame);
|
||||
int (*send_packet)(AVCodecContext *avctx, const AVPacket *avpkt);
|
||||
int (*receive_frame)(AVCodecContext *avctx, AVFrame *frame);
|
||||
int (*receive_packet)(AVCodecContext *avctx, AVPacket *avpkt);
|
||||
|
||||
/**
|
||||
* Decode API with decoupled packet/frame dataflow. This function is called
|
||||
* to get one output frame. It should call ff_decode_get_packet() to obtain
|
||||
* input data.
|
||||
*/
|
||||
int (*receive_frame)(AVCodecContext *avctx, AVFrame *frame);
|
||||
/**
|
||||
* Flush buffers.
|
||||
* Will be called when seeking
|
||||
@@ -3680,6 +3790,12 @@ typedef struct AVCodec {
|
||||
* See FF_CODEC_CAP_* in internal.h
|
||||
*/
|
||||
int caps_internal;
|
||||
|
||||
/**
|
||||
* Decoding only, a comma-separated list of bitstream filters to apply to
|
||||
* packets before decoding.
|
||||
*/
|
||||
const char *bsfs;
|
||||
} AVCodec;
|
||||
|
||||
int av_codec_get_max_lowres(const AVCodec *codec);
|
||||
@@ -3822,6 +3938,11 @@ typedef struct AVHWAccel {
|
||||
* AVCodecInternal.hwaccel_priv_data.
|
||||
*/
|
||||
int priv_data_size;
|
||||
|
||||
/**
|
||||
* Internal hwaccel capabilities.
|
||||
*/
|
||||
int caps_internal;
|
||||
} AVHWAccel;
|
||||
|
||||
/**
|
||||
@@ -4349,13 +4470,13 @@ AVPacket *av_packet_alloc(void);
|
||||
* @see av_packet_alloc
|
||||
* @see av_packet_ref
|
||||
*/
|
||||
AVPacket *av_packet_clone(AVPacket *src);
|
||||
AVPacket *av_packet_clone(const AVPacket *src);
|
||||
|
||||
/**
|
||||
* Free the packet, if the packet is reference counted, it will be
|
||||
* unreferenced first.
|
||||
*
|
||||
* @param packet packet to be freed. The pointer will be set to NULL.
|
||||
* @param pkt packet to be freed. The pointer will be set to NULL.
|
||||
* @note passing NULL is a no-op.
|
||||
*/
|
||||
void av_packet_free(AVPacket **pkt);
|
||||
@@ -4490,12 +4611,16 @@ int av_packet_shrink_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
|
||||
* @param size pointer for side information size to store (optional)
|
||||
* @return pointer to data if present or NULL otherwise
|
||||
*/
|
||||
uint8_t* av_packet_get_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
|
||||
uint8_t* av_packet_get_side_data(const AVPacket *pkt, enum AVPacketSideDataType type,
|
||||
int *size);
|
||||
|
||||
#if FF_API_MERGE_SD_API
|
||||
attribute_deprecated
|
||||
int av_packet_merge_side_data(AVPacket *pkt);
|
||||
|
||||
attribute_deprecated
|
||||
int av_packet_split_side_data(AVPacket *pkt);
|
||||
#endif
|
||||
|
||||
const char *av_packet_side_data_name(enum AVPacketSideDataType type);
|
||||
|
||||
@@ -4795,13 +4920,13 @@ int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
|
||||
* and reusing a get_buffer written for video codecs would probably perform badly
|
||||
* due to a potentially very different allocation pattern.
|
||||
*
|
||||
* Some decoders (those marked with CODEC_CAP_DELAY) have a delay between input
|
||||
* Some decoders (those marked with AV_CODEC_CAP_DELAY) have a delay between input
|
||||
* and output. This means that for some packets they will not immediately
|
||||
* produce decoded output and need to be flushed at the end of decoding to get
|
||||
* all the decoded data. Flushing is done by calling this function with packets
|
||||
* with avpkt->data set to NULL and avpkt->size set to 0 until it stops
|
||||
* returning subtitles. It is safe to flush even those decoders that are not
|
||||
* marked with CODEC_CAP_DELAY, then no subtitles will be returned.
|
||||
* marked with AV_CODEC_CAP_DELAY, then no subtitles will be returned.
|
||||
*
|
||||
* @note The AVCodecContext MUST have been opened with @ref avcodec_open2()
|
||||
* before packets may be fed to the decoder.
|
||||
@@ -4855,8 +4980,10 @@ int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,
|
||||
* a flush packet.
|
||||
*
|
||||
* @return 0 on success, otherwise negative error code:
|
||||
* AVERROR(EAGAIN): input is not accepted right now - the packet must be
|
||||
* resent after trying to read output
|
||||
* AVERROR(EAGAIN): input is not accepted in the current state - user
|
||||
* must read output with avcodec_receive_frame() (once
|
||||
* all output is read, the packet should be resent, and
|
||||
* the call will not fail with EAGAIN).
|
||||
* AVERROR_EOF: the decoder has been flushed, and no new packets can
|
||||
* be sent to it (also returned if more than 1 flush
|
||||
* packet is sent)
|
||||
@@ -4877,7 +5004,7 @@ int avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt);
|
||||
*
|
||||
* @return
|
||||
* 0: success, a frame was returned
|
||||
* AVERROR(EAGAIN): output is not available right now - user must try
|
||||
* AVERROR(EAGAIN): output is not available in this state - user must try
|
||||
* to send new input
|
||||
* AVERROR_EOF: the decoder has been fully flushed, and there will be
|
||||
* no more output frames
|
||||
@@ -4910,8 +5037,10 @@ int avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame);
|
||||
* avctx->frame_size for all frames except the last.
|
||||
* The final frame may be smaller than avctx->frame_size.
|
||||
* @return 0 on success, otherwise negative error code:
|
||||
* AVERROR(EAGAIN): input is not accepted right now - the frame must be
|
||||
* resent after trying to read output packets
|
||||
* AVERROR(EAGAIN): input is not accepted in the current state - user
|
||||
* must read output with avcodec_receive_packet() (once
|
||||
* all output is read, the packet should be resent, and
|
||||
* the call will not fail with EAGAIN).
|
||||
* AVERROR_EOF: the encoder has been flushed, and no new frames can
|
||||
* be sent to it
|
||||
* AVERROR(EINVAL): codec not opened, refcounted_frames not set, it is a
|
||||
@@ -4929,8 +5058,8 @@ int avcodec_send_frame(AVCodecContext *avctx, const AVFrame *frame);
|
||||
* encoder. Note that the function will always call
|
||||
* av_frame_unref(frame) before doing anything else.
|
||||
* @return 0 on success, otherwise negative error code:
|
||||
* AVERROR(EAGAIN): output is not available right now - user must try
|
||||
* to send input
|
||||
* AVERROR(EAGAIN): output is not available in the current state - user
|
||||
* must try to send input
|
||||
* AVERROR_EOF: the encoder has been fully flushed, and there will be
|
||||
* no more output packets
|
||||
* AVERROR(EINVAL): codec not opened, or it is an encoder
|
||||
@@ -5539,15 +5668,8 @@ enum AVPixelFormat avcodec_find_best_pix_fmt_of_2(enum AVPixelFormat dst_pix_fmt
|
||||
enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr);
|
||||
|
||||
attribute_deprecated
|
||||
#if AV_HAVE_INCOMPATIBLE_LIBAV_ABI
|
||||
enum AVPixelFormat avcodec_find_best_pix_fmt2(const enum AVPixelFormat *pix_fmt_list,
|
||||
enum AVPixelFormat src_pix_fmt,
|
||||
int has_alpha, int *loss_ptr);
|
||||
#else
|
||||
enum AVPixelFormat avcodec_find_best_pix_fmt2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2,
|
||||
enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr);
|
||||
#endif
|
||||
|
||||
|
||||
enum AVPixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum AVPixelFormat * fmt);
|
||||
|
||||
@@ -5563,6 +5685,7 @@ attribute_deprecated
|
||||
void avcodec_set_dimensions(AVCodecContext *s, int width, int height);
|
||||
#endif
|
||||
|
||||
#if FF_API_TAG_STRING
|
||||
/**
|
||||
* Put a string representing the codec tag codec_tag in buf.
|
||||
*
|
||||
@@ -5571,8 +5694,12 @@ void avcodec_set_dimensions(AVCodecContext *s, int width, int height);
|
||||
* @param codec_tag codec tag to assign
|
||||
* @return the length of the string that would have been generated if
|
||||
* enough space had been available, excluding the trailing null
|
||||
*
|
||||
* @deprecated see av_fourcc_make_string() and av_fourcc2str().
|
||||
*/
|
||||
attribute_deprecated
|
||||
size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag);
|
||||
#endif
|
||||
|
||||
void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode);
|
||||
|
||||
@@ -5685,7 +5812,7 @@ int av_get_audio_frame_duration2(AVCodecParameters *par, int frame_bytes);
|
||||
#if FF_API_OLD_BSF
|
||||
typedef struct AVBitStreamFilterContext {
|
||||
void *priv_data;
|
||||
struct AVBitStreamFilter *filter;
|
||||
const struct AVBitStreamFilter *filter;
|
||||
AVCodecParserContext *parser;
|
||||
struct AVBitStreamFilterContext *next;
|
||||
/**
|
||||
@@ -5732,12 +5859,15 @@ typedef struct AVBSFContext {
|
||||
void *priv_data;
|
||||
|
||||
/**
|
||||
* Parameters of the input stream. Set by the caller before av_bsf_init().
|
||||
* Parameters of the input stream. This field is allocated in
|
||||
* av_bsf_alloc(), it needs to be filled by the caller before
|
||||
* av_bsf_init().
|
||||
*/
|
||||
AVCodecParameters *par_in;
|
||||
|
||||
/**
|
||||
* Parameters of the output stream. Set by the filter in av_bsf_init().
|
||||
* Parameters of the output stream. This field is allocated in
|
||||
* av_bsf_alloc(), it is set by the filter in av_bsf_init().
|
||||
*/
|
||||
AVCodecParameters *par_out;
|
||||
|
||||
@@ -5915,8 +6045,7 @@ int av_bsf_init(AVBSFContext *ctx);
|
||||
* av_bsf_receive_packet() repeatedly until it returns AVERROR(EAGAIN) or
|
||||
* AVERROR_EOF.
|
||||
*
|
||||
* @param pkt the packet to filter. pkt must contain some payload (i.e data or
|
||||
* side data must be present in pkt). The bitstream filter will take ownership of
|
||||
* @param pkt the packet to filter. The bitstream filter will take ownership of
|
||||
* the packet and reset the contents of pkt. pkt is not touched if an error occurs.
|
||||
* This parameter may be NULL, which signals the end of the stream (i.e. no more
|
||||
* packets will be sent). That will cause the filter to output any packets it
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
#include "libavutil/attributes.h"
|
||||
#include "version.h"
|
||||
|
||||
#if FF_API_STRUCT_VAAPI_CONTEXT
|
||||
|
||||
/**
|
||||
* @defgroup lavc_codec_hwaccel_vaapi VA API Decoding
|
||||
* @ingroup lavc_codec_hwaccel
|
||||
@@ -48,8 +50,10 @@
|
||||
* during initialization or through each AVCodecContext.get_buffer()
|
||||
* function call. In any case, they must be valid prior to calling
|
||||
* decoding functions.
|
||||
*
|
||||
* Deprecated: use AVCodecContext.hw_frames_ctx instead.
|
||||
*/
|
||||
struct vaapi_context {
|
||||
struct attribute_deprecated vaapi_context {
|
||||
/**
|
||||
* Window system dependent data
|
||||
*
|
||||
@@ -186,4 +190,6 @@ struct vaapi_context {
|
||||
|
||||
/* @} */
|
||||
|
||||
#endif /* FF_API_STRUCT_VAAPI_CONTEXT */
|
||||
|
||||
#endif /* AVCODEC_VAAPI_H */
|
||||
@@ -50,7 +50,7 @@
|
||||
*/
|
||||
|
||||
#include <vdpau/vdpau.h>
|
||||
#include <vdpau/vdpau_x11.h>
|
||||
|
||||
#include "libavutil/avconfig.h"
|
||||
#include "libavutil/attributes.h"
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "libavutil/version.h"
|
||||
|
||||
#define LIBAVCODEC_VERSION_MAJOR 57
|
||||
#define LIBAVCODEC_VERSION_MINOR 55
|
||||
#define LIBAVCODEC_VERSION_MINOR 94
|
||||
#define LIBAVCODEC_VERSION_MICRO 101
|
||||
|
||||
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
|
||||
@@ -157,6 +157,9 @@
|
||||
#ifndef FF_API_VAAPI_CONTEXT
|
||||
#define FF_API_VAAPI_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 58)
|
||||
#endif
|
||||
#ifndef FF_API_MERGE_SD
|
||||
#define FF_API_MERGE_SD (LIBAVCODEC_VERSION_MAJOR < 58)
|
||||
#endif
|
||||
#ifndef FF_API_AVCTX_TIMEBASE
|
||||
#define FF_API_AVCTX_TIMEBASE (LIBAVCODEC_VERSION_MAJOR < 59)
|
||||
#endif
|
||||
@@ -226,5 +229,15 @@
|
||||
#ifndef FF_API_NVENC_OLD_NAME
|
||||
#define FF_API_NVENC_OLD_NAME (LIBAVCODEC_VERSION_MAJOR < 59)
|
||||
#endif
|
||||
#ifndef FF_API_STRUCT_VAAPI_CONTEXT
|
||||
#define FF_API_STRUCT_VAAPI_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 59)
|
||||
#endif
|
||||
#ifndef FF_API_MERGE_SD_API
|
||||
#define FF_API_MERGE_SD_API (LIBAVCODEC_VERSION_MAJOR < 59)
|
||||
#endif
|
||||
#ifndef FF_API_TAG_STRING
|
||||
#define FF_API_TAG_STRING (LIBAVCODEC_VERSION_MAJOR < 59)
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* AVCODEC_VERSION_H */
|
||||
@@ -58,7 +58,8 @@ typedef struct AVVideotoolboxContext {
|
||||
|
||||
/**
|
||||
* CVPixelBuffer Format Type that Videotoolbox will use for decoded frames.
|
||||
* set by the caller.
|
||||
* set by the caller. If this is set to 0, then no specific format is
|
||||
* requested from the decoder, and its native format is output.
|
||||
*/
|
||||
OSType cv_pix_fmt_type;
|
||||
|
||||
|
||||
@@ -32,9 +32,6 @@ typedef struct AVVorbisParseContext AVVorbisParseContext;
|
||||
|
||||
/**
|
||||
* Allocate and initialize the Vorbis parser using headers in the extradata.
|
||||
*
|
||||
* @param avctx codec context
|
||||
* @param s Vorbis parser context
|
||||
*/
|
||||
AVVorbisParseContext *av_vorbis_parse_init(const uint8_t *extradata,
|
||||
int extradata_size);
|
||||
|
||||
Reference in new issue
Block a user