Path: blob/a-new-beginning/libavcodec.xcframework/ios-arm64/libavcodec.framework/Headers/defs.h
2 views
/*1*2* This file is part of FFmpeg.3*4* FFmpeg is free software; you can redistribute it and/or5* modify it under the terms of the GNU Lesser General Public6* License as published by the Free Software Foundation; either7* version 2.1 of the License, or (at your option) any later version.8*9* FFmpeg is distributed in the hope that it will be useful,10* but WITHOUT ANY WARRANTY; without even the implied warranty of11* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU12* Lesser General Public License for more details.13*14* You should have received a copy of the GNU Lesser General Public15* License along with FFmpeg; if not, write to the Free Software16* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA17*/1819#ifndef AVCODEC_DEFS_H20#define AVCODEC_DEFS_H2122/**23* @file24* @ingroup libavc25* Misc types and constants that do not belong anywhere else.26*/2728#include <stdint.h>29#include <stdlib.h>3031/**32* @ingroup lavc_decoding33* Required number of additionally allocated bytes at the end of the input bitstream for decoding.34* This is mainly needed because some optimized bitstream readers read35* 32 or 64 bit at once and could read over the end.<br>36* Note: If the first 23 bits of the additional bytes are not 0, then damaged37* MPEG bitstreams could cause overread and segfault.38*/39#define AV_INPUT_BUFFER_PADDING_SIZE 644041/**42* Verify checksums embedded in the bitstream (could be of either encoded or43* decoded data, depending on the format) and print an error message on mismatch.44* If AV_EF_EXPLODE is also set, a mismatching checksum will result in the45* decoder/demuxer returning an error.46*/47#define AV_EF_CRCCHECK (1<<0)48#define AV_EF_BITSTREAM (1<<1) ///< detect bitstream specification deviations49#define AV_EF_BUFFER (1<<2) ///< detect improper bitstream length50#define AV_EF_EXPLODE (1<<3) ///< abort decoding on minor error detection5152#define AV_EF_IGNORE_ERR (1<<15) ///< ignore errors and continue53#define AV_EF_CAREFUL (1<<16) ///< consider things that violate the spec, are fast to calculate and have not been seen in the wild as errors54#define AV_EF_COMPLIANT (1<<17) ///< consider all spec non compliances as errors55#define AV_EF_AGGRESSIVE (1<<18) ///< consider things that a sane encoder/muxer should not do as an error5657#define FF_COMPLIANCE_VERY_STRICT 2 ///< Strictly conform to an older more strict version of the spec or reference software.58#define FF_COMPLIANCE_STRICT 1 ///< Strictly conform to all the things in the spec no matter what consequences.59#define FF_COMPLIANCE_NORMAL 060#define FF_COMPLIANCE_UNOFFICIAL -1 ///< Allow unofficial extensions61#define FF_COMPLIANCE_EXPERIMENTAL -2 ///< Allow nonstandardized experimental things.6263/**64* @ingroup lavc_decoding65*/66enum AVDiscard{67/* We leave some space between them for extensions (drop some68* keyframes for intra-only or drop just some bidir frames). */69AVDISCARD_NONE =-16, ///< discard nothing70AVDISCARD_DEFAULT = 0, ///< discard useless packets like 0 size packets in avi71AVDISCARD_NONREF = 8, ///< discard all non reference72AVDISCARD_BIDIR = 16, ///< discard all bidirectional frames73AVDISCARD_NONINTRA= 24, ///< discard all non intra frames74AVDISCARD_NONKEY = 32, ///< discard all frames except keyframes75AVDISCARD_ALL = 48, ///< discard all76};7778enum AVAudioServiceType {79AV_AUDIO_SERVICE_TYPE_MAIN = 0,80AV_AUDIO_SERVICE_TYPE_EFFECTS = 1,81AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED = 2,82AV_AUDIO_SERVICE_TYPE_HEARING_IMPAIRED = 3,83AV_AUDIO_SERVICE_TYPE_DIALOGUE = 4,84AV_AUDIO_SERVICE_TYPE_COMMENTARY = 5,85AV_AUDIO_SERVICE_TYPE_EMERGENCY = 6,86AV_AUDIO_SERVICE_TYPE_VOICE_OVER = 7,87AV_AUDIO_SERVICE_TYPE_KARAOKE = 8,88AV_AUDIO_SERVICE_TYPE_NB , ///< Not part of ABI89};9091/**92* Pan Scan area.93* This specifies the area which should be displayed.94* Note there may be multiple such areas for one frame.95*/96typedef struct AVPanScan {97/**98* id99* - encoding: Set by user.100* - decoding: Set by libavcodec.101*/102int id;103104/**105* width and height in 1/16 pel106* - encoding: Set by user.107* - decoding: Set by libavcodec.108*/109int width;110int height;111112/**113* position of the top left corner in 1/16 pel for up to 3 fields/frames114* - encoding: Set by user.115* - decoding: Set by libavcodec.116*/117int16_t position[3][2];118} AVPanScan;119120/**121* This structure describes the bitrate properties of an encoded bitstream. It122* roughly corresponds to a subset the VBV parameters for MPEG-2 or HRD123* parameters for H.264/HEVC.124*/125typedef struct AVCPBProperties {126/**127* Maximum bitrate of the stream, in bits per second.128* Zero if unknown or unspecified.129*/130int64_t max_bitrate;131/**132* Minimum bitrate of the stream, in bits per second.133* Zero if unknown or unspecified.134*/135int64_t min_bitrate;136/**137* Average bitrate of the stream, in bits per second.138* Zero if unknown or unspecified.139*/140int64_t avg_bitrate;141142/**143* The size of the buffer to which the ratecontrol is applied, in bits.144* Zero if unknown or unspecified.145*/146int64_t buffer_size;147148/**149* The delay between the time the packet this structure is associated with150* is received and the time when it should be decoded, in periods of a 27MHz151* clock.152*153* UINT64_MAX when unknown or unspecified.154*/155uint64_t vbv_delay;156} AVCPBProperties;157158/**159* Allocate a CPB properties structure and initialize its fields to default160* values.161*162* @param size if non-NULL, the size of the allocated struct will be written163* here. This is useful for embedding it in side data.164*165* @return the newly allocated struct or NULL on failure166*/167AVCPBProperties *av_cpb_properties_alloc(size_t *size);168169/**170* This structure supplies correlation between a packet timestamp and a wall clock171* production time. The definition follows the Producer Reference Time ('prft')172* as defined in ISO/IEC 14496-12173*/174typedef struct AVProducerReferenceTime {175/**176* A UTC timestamp, in microseconds, since Unix epoch (e.g, av_gettime()).177*/178int64_t wallclock;179int flags;180} AVProducerReferenceTime;181182/**183* Encode extradata length to a buffer. Used by xiph codecs.184*185* @param s buffer to write to; must be at least (v/255+1) bytes long186* @param v size of extradata in bytes187* @return number of bytes written to the buffer.188*/189unsigned int av_xiphlacing(unsigned char *s, unsigned int v);190191#endif // AVCODEC_DEFS_H192193194