avcodec

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2024 License: LGPL-2.1 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	/**
	 * Allow decoders to produce frames with data planes that are not aligned
	 * to CPU requirements (e.g. due to cropping).
	 */
	AV_CODEC_FLAG_UNALIGNED = C.AV_CODEC_FLAG_UNALIGNED
	/**
	 * Use fixed qscale.
	 */
	AV_CODEC_FLAG_QSCALE = C.AV_CODEC_FLAG_QSCALE
	/**
	 * 4 MV per MB allowed / advanced prediction for H.263.
	 */
	AV_CODEC_FLAG_4MV = C.AV_CODEC_FLAG_4MV
	/**
	 * Output even those frames that might be corrupted.
	 */
	AV_CODEC_FLAG_OUTPUT_CORRUPT = C.AV_CODEC_FLAG_OUTPUT_CORRUPT
	/**
	 * Use qpel MC.
	 */
	AV_CODEC_FLAG_QPEL = C.AV_CODEC_FLAG_QPEL
	//  #if FF_API_DROPCHANGED
	//  /**
	//   * Don't output frames whose parameters differ from first
	//   * decoded frame in stream.
	//   *
	//   * @deprecated callers should implement this functionality in their own code
	//   */
	//  AV_CODEC_FLAG_DROPCHANGED    =C.AV_CODEC_FLAG_DROPCHANGED
	//  #endif
	/**
	 * Request the encoder to output reconstructed frames, i.e.\ frames that would
	 * be produced by decoding the encoded bistream. These frames may be retrieved
	 * by calling avcodec_receive_frame() immediately after a successful call to
	 * avcodec_receive_packet().
	 *
	 * Should only be used with encoders flagged with the
	 * @ref AV_CODEC_CAP_ENCODER_RECON_FRAME capability.
	 *
	 * @note
	 * Each reconstructed frame returned by the encoder corresponds to the last
	 * encoded packet, i.e. the frames are returned in coded order rather than
	 * presentation order.
	 *
	 * @note
	 * Frame parameters (like pixel format or dimensions) do not have to match the
	 * AVCodecContext values. Make sure to use the values from the returned frame.
	 */
	AV_CODEC_FLAG_RECON_FRAME = C.AV_CODEC_FLAG_RECON_FRAME
	/**
	 * @par decoding
	 * Request the decoder to propagate each packet's AVPacket.opaque and
	 * AVPacket.opaque_ref to its corresponding output AVFrame.
	 *
	 * @par encoding:
	 * Request the encoder to propagate each frame's AVFrame.opaque and
	 * AVFrame.opaque_ref values to its corresponding output AVPacket.
	 *
	 * @par
	 * May only be set on encoders that have the
	 * @ref AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE capability flag.
	 *
	 * @note
	 * While in typical cases one input frame produces exactly one output packet
	 * (perhaps after a delay), in general the mapping of frames to packets is
	 * M-to-N, so
	 * - Any number of input frames may be associated with any given output packet.
	 *   This includes zero - e.g. some encoders may output packets that carry only
	 *   metadata about the whole stream.
	 * - A given input frame may be associated with any number of output packets.
	 *   Again this includes zero - e.g. some encoders may drop frames under certain
	 *   conditions.
	 * .
	 * This implies that when using this flag, the caller must NOT assume that
	 * - a given input frame's opaques will necessarily appear on some output packet;
	 * - every output packet will have some non-NULL opaque value.
	 * .
	 * When an output packet contains multiple frames, the opaque values will be
	 * taken from the first of those.
	 *
	 * @note
	 * The converse holds for decoders, with frames and packets switched.
	 */
	AV_CODEC_FLAG_COPY_OPAQUE = C.AV_CODEC_FLAG_COPY_OPAQUE
	/**
	 * Signal to the encoder that the values of AVFrame.duration are valid and
	 * should be used (typically for transferring them to output packets).
	 *
	 * If this flag is not set, frame durations are ignored.
	 */
	AV_CODEC_FLAG_FRAME_DURATION = C.AV_CODEC_FLAG_FRAME_DURATION
	/**
	 * Use internal 2pass ratecontrol in first pass mode.
	 */
	AV_CODEC_FLAG_PASS1 = C.AV_CODEC_FLAG_PASS1
	/**
	 * Use internal 2pass ratecontrol in second pass mode.
	 */
	AV_CODEC_FLAG_PASS2 = C.AV_CODEC_FLAG_PASS2
	/**
	 * loop filter.
	 */
	AV_CODEC_FLAG_LOOP_FILTER = C.AV_CODEC_FLAG_LOOP_FILTER
	/**
	 * Only decode/encode grayscale.
	 */
	AV_CODEC_FLAG_GRAY = C.AV_CODEC_FLAG_GRAY
	/**
	 * error[?] variables will be set during encoding.
	 */
	AV_CODEC_FLAG_PSNR = C.AV_CODEC_FLAG_PSNR
	/**
	 * Use interlaced DCT.
	 */
	AV_CODEC_FLAG_INTERLACED_DCT = C.AV_CODEC_FLAG_INTERLACED_DCT
	/**
	 * Force low delay.
	 */
	AV_CODEC_FLAG_LOW_DELAY = C.AV_CODEC_FLAG_LOW_DELAY
	/**
	 * Place global headers in extradata instead of every keyframe.
	 */
	AV_CODEC_FLAG_GLOBAL_HEADER = C.AV_CODEC_FLAG_GLOBAL_HEADER
	/**
	 * Use only bitexact stuff (except (I)DCT).
	 */
	AV_CODEC_FLAG_BITEXACT = C.AV_CODEC_FLAG_BITEXACT
	/* Fx : Flag for H.263+ extra options */
	/**
	 * H.263 advanced intra coding / MPEG-4 AC prediction
	 */
	AV_CODEC_FLAG_AC_PRED = C.AV_CODEC_FLAG_AC_PRED
	/**
	 * interlaced motion estimation
	 */
	AV_CODEC_FLAG_INTERLACED_ME = C.AV_CODEC_FLAG_INTERLACED_ME
	AV_CODEC_FLAG_CLOSED_GOP    = C.AV_CODEC_FLAG_CLOSED_GOP

	/**
	 * Allow non spec compliant speedup tricks.
	 */
	AV_CODEC_FLAG2_FAST = C.AV_CODEC_FLAG2_FAST
	/**
	 * Skip bitstream encoding.
	 */
	AV_CODEC_FLAG2_NO_OUTPUT = C.AV_CODEC_FLAG2_NO_OUTPUT
	/**
	 * Place global headers at every keyframe instead of in extradata.
	 */
	AV_CODEC_FLAG2_LOCAL_HEADER = C.AV_CODEC_FLAG2_LOCAL_HEADER

	/**
	 * Input bitstream might be truncated at a packet boundaries
	 * instead of only at frame boundaries.
	 */
	AV_CODEC_FLAG2_CHUNKS = C.AV_CODEC_FLAG2_CHUNKS
	/**
	 * Discard cropping information from SPS.
	 */
	AV_CODEC_FLAG2_IGNORE_CROP = C.AV_CODEC_FLAG2_IGNORE_CROP

	/**
	 * Show all frames before the first keyframe
	 */
	AV_CODEC_FLAG2_SHOW_ALL = C.AV_CODEC_FLAG2_SHOW_ALL
	/**
	 * Export motion vectors through frame side data
	 */
	AV_CODEC_FLAG2_EXPORT_MVS = C.AV_CODEC_FLAG2_EXPORT_MVS
	/**
	 * Do not skip samples and export skip information as frame side data
	 */
	AV_CODEC_FLAG2_SKIP_MANUAL = C.AV_CODEC_FLAG2_SKIP_MANUAL
	/**
	 * Do not reset ASS ReadOrder field on flush (subtitles decoding)
	 */
	AV_CODEC_FLAG2_RO_FLUSH_NOOP = C.AV_CODEC_FLAG2_RO_FLUSH_NOOP
	/**
	 * Generate/parse ICC profiles on encode/decode, as appropriate for the type of
	 * file. No effect on codecs which cannot contain embedded ICC profiles, or
	 * when compiled without support for lcms2.
	 */
	AV_CODEC_FLAG2_ICC_PROFILES = C.AV_CODEC_FLAG2_ICC_PROFILES
)
View Source
const (
	/**
	 * Export motion vectors through frame side data
	 */
	AV_CODEC_EXPORT_DATA_MVS = C.AV_CODEC_EXPORT_DATA_MVS
	/**
	 * Export encoder Producer Reference Time through packet side data
	 */
	AV_CODEC_EXPORT_DATA_PRFT = C.AV_CODEC_EXPORT_DATA_PRFT
	/**
	 * Decoding only.
	 * Export the AVVideoEncParams structure through frame side data.
	 */
	AV_CODEC_EXPORT_DATA_VIDEO_ENC_PARAMS = C.AV_CODEC_EXPORT_DATA_VIDEO_ENC_PARAMS
	/**
	 * Decoding only.
	 * Do not apply film grain, export it instead.
	 */
	AV_CODEC_EXPORT_DATA_FILM_GRAIN = C.AV_CODEC_EXPORT_DATA_FILM_GRAIN

	/**
	 * The decoder will keep a reference to the frame and may reuse it later.
	 */
	AV_GET_BUFFER_FLAG_REF = C.AV_GET_BUFFER_FLAG_REF

	/**
	 * The encoder will keep a reference to the packet and may reuse it later.
	 */
	AV_GET_ENCODE_BUFFER_FLAG_REF = C.AV_GET_ENCODE_BUFFER_FLAG_REF
)
Exported side data.

These flags can be passed in AVCodecContext.export_side_data before initialization.

View Source
const (
	FF_CMP_SAD        = C.FF_CMP_SAD
	FF_CMP_SSE        = C.FF_CMP_SSE
	FF_CMP_SATD       = C.FF_CMP_SATD
	FF_CMP_DCT        = C.FF_CMP_DCT
	FF_CMP_PSNR       = C.FF_CMP_PSNR
	FF_CMP_BIT        = C.FF_CMP_BIT
	FF_CMP_RD         = C.FF_CMP_RD
	FF_CMP_ZERO       = C.FF_CMP_ZERO
	FF_CMP_VSAD       = C.FF_CMP_VSAD
	FF_CMP_VSSE       = C.FF_CMP_VSSE
	FF_CMP_NSSE       = C.FF_CMP_NSSE
	FF_CMP_W53        = C.FF_CMP_W53
	FF_CMP_W97        = C.FF_CMP_W97
	FF_CMP_DCTMAX     = C.FF_CMP_DCTMAX
	FF_CMP_DCT264     = C.FF_CMP_DCT264
	FF_CMP_MEDIAN_SAD = C.FF_CMP_MEDIAN_SAD
	FF_CMP_CHROMA     = C.FF_CMP_CHROMA
)
View Source
const (
	SLICE_FLAG_CODED_ORDER = C.SLICE_FLAG_CODED_ORDER ///< draw_horiz_band() is called in coded order instead of display
	SLICE_FLAG_ALLOW_FIELD = C.SLICE_FLAG_ALLOW_FIELD ///< allow draw_horiz_band() with field slices (MPEG-2 field pics)
	SLICE_FLAG_ALLOW_PLANE = C.SLICE_FLAG_ALLOW_PLANE ///< allow draw_horiz_band() with 1 component at a time (SVQ1)
)
View Source
const (
	FF_MB_DECISION_SIMPLE = C.FF_MB_DECISION_SIMPLE ///< uses mb_cmp
	FF_MB_DECISION_BITS   = C.FF_MB_DECISION_BITS   ///< chooses the one which needs the fewest bits
	FF_MB_DECISION_RD     = C.FF_MB_DECISION_RD     ///< rate distortion
)
View Source
const (
	FF_BUG_AUTODETECT       = C.FF_BUG_AUTODETECT ///< autodetection
	FF_BUG_XVID_ILACE       = C.FF_BUG_XVID_ILACE
	FF_BUG_UMP4             = C.FF_BUG_UMP4
	FF_BUG_NO_PADDING       = C.FF_BUG_NO_PADDING
	FF_BUG_AMV              = C.FF_BUG_AMV
	FF_BUG_QPEL_CHROMA      = C.FF_BUG_QPEL_CHROMA
	FF_BUG_STD_QPEL         = C.FF_BUG_STD_QPEL
	FF_BUG_QPEL_CHROMA2     = C.FF_BUG_QPEL_CHROMA2
	FF_BUG_DIRECT_BLOCKSIZE = C.FF_BUG_DIRECT_BLOCKSIZE
	FF_BUG_EDGE             = C.FF_BUG_EDGE
	FF_BUG_HPEL_CHROMA      = C.FF_BUG_HPEL_CHROMA
	FF_BUG_DC_CLIP          = C.FF_BUG_DC_CLIP
	FF_BUG_MS               = C.FF_BUG_MS ///< Work around various bugs in Microsoft's broken decoders.
	FF_BUG_TRUNCATED        = C.FF_BUG_TRUNCATED
	FF_BUG_IEDGE            = C.FF_BUG_IEDGE
)
View Source
const (
	FF_EC_GUESS_MVS   = C.FF_EC_GUESS_MVS
	FF_EC_DEBLOCK     = C.FF_EC_DEBLOCK
	FF_EC_FAVOR_INTER = C.FF_EC_FAVOR_INTER
)
View Source
const (
	FF_DEBUG_PICT_INFO = C.FF_DEBUG_PICT_INFO
	FF_DEBUG_RC        = C.FF_DEBUG_RC
	FF_DEBUG_BITSTREAM = C.FF_DEBUG_BITSTREAM
	FF_DEBUG_MB_TYPE   = C.FF_DEBUG_MB_TYPE
	FF_DEBUG_QP        = C.FF_DEBUG_QP
	FF_DEBUG_DCT_COEFF = C.FF_DEBUG_DCT_COEFF
	FF_DEBUG_SKIP      = C.FF_DEBUG_SKIP
	FF_DEBUG_STARTCODE = C.FF_DEBUG_STARTCODE
	FF_DEBUG_ER        = C.FF_DEBUG_ER
	FF_DEBUG_MMCO      = C.FF_DEBUG_MMCO
	FF_DEBUG_BUGS      = C.FF_DEBUG_BUGS
	FF_DEBUG_BUFFERS   = C.FF_DEBUG_BUFFERS
	FF_DEBUG_THREADS   = C.FF_DEBUG_THREADS
	FF_DEBUG_GREEN_MD  = C.FF_DEBUG_GREEN_MD
	FF_DEBUG_NOMC      = C.FF_DEBUG_NOMC
)
View Source
const (
	FF_DCT_AUTO    = C.FF_DCT_AUTO
	FF_DCT_FASTINT = C.FF_DCT_FASTINT
	FF_DCT_INT     = C.FF_DCT_INT
	FF_DCT_MMX     = C.FF_DCT_MMX
	FF_DCT_ALTIVEC = C.FF_DCT_ALTIVEC
	FF_DCT_FAAN    = C.FF_DCT_FAAN
)
View Source
const (
	FF_IDCT_AUTO          = C.FF_IDCT_AUTO
	FF_IDCT_INT           = C.FF_IDCT_INT
	FF_IDCT_SIMPLE        = C.FF_IDCT_SIMPLE
	FF_IDCT_SIMPLEMMX     = C.FF_IDCT_SIMPLEMMX
	FF_IDCT_ARM           = C.FF_IDCT_ARM
	FF_IDCT_ALTIVEC       = C.FF_IDCT_ALTIVEC
	FF_IDCT_SIMPLEARM     = C.FF_IDCT_SIMPLEARM
	FF_IDCT_XVID          = C.FF_IDCT_XVID
	FF_IDCT_SIMPLEARMV5TE = C.FF_IDCT_SIMPLEARMV5TE
	FF_IDCT_SIMPLEARMV6   = C.FF_IDCT_SIMPLEARMV6
	FF_IDCT_FAAN          = C.FF_IDCT_FAAN
	FF_IDCT_SIMPLENEON    = C.FF_IDCT_SIMPLENEON
	// #if FF_API_IDCT_NONE
	// // formerly used by xvmc
	FF_IDCT_NONE = C.FF_IDCT_NONE
	// #endif
	FF_IDCT_SIMPLEAUTO = C.FF_IDCT_SIMPLEAUTO
)
View Source
const (
	FF_THREAD_FRAME = C.FF_THREAD_FRAME ///< Decode more than one frame at once
	FF_THREAD_SLICE = C.FF_THREAD_SLICE ///< Decode more than one part of a single frame at once
)
View Source
const (
	FF_SUB_CHARENC_MODE_DO_NOTHING  = C.FF_SUB_CHARENC_MODE_DO_NOTHING  ///< do nothing (demuxer outputs a stream supposed to be already in UTF-8, or the codec is bitmap for instance)
	FF_SUB_CHARENC_MODE_AUTOMATIC   = C.FF_SUB_CHARENC_MODE_AUTOMATIC   ///< libavcodec will select the mode itself
	FF_SUB_CHARENC_MODE_PRE_DECODER = C.FF_SUB_CHARENC_MODE_PRE_DECODER ///< the AVPacket data needs to be recoded to UTF-8 before being fed to the decoder, requires iconv
	FF_SUB_CHARENC_MODE_IGNORE      = C.FF_SUB_CHARENC_MODE_IGNORE      ///< neither convert the subtitles, nor check them for valid UTF-8
)
View Source
const (
	FF_CODEC_PROPERTY_LOSSLESS        = C.FF_CODEC_PROPERTY_LOSSLESS
	FF_CODEC_PROPERTY_CLOSED_CAPTIONS = C.FF_CODEC_PROPERTY_CLOSED_CAPTIONS
	FF_CODEC_PROPERTY_FILM_GRAIN      = C.FF_CODEC_PROPERTY_FILM_GRAIN
)
View Source
const (
	/**
	 * Decoder can use draw_horiz_band callback.
	 */
	AV_CODEC_CAP_DRAW_HORIZ_BAND = C.AV_CODEC_CAP_DRAW_HORIZ_BAND
	/**
	 * Codec uses get_buffer() or get_encode_buffer() for allocating buffers and
	 * supports custom allocators.
	 * If not set, it might not use get_buffer() or get_encode_buffer() at all, or
	 * use operations that assume the buffer was allocated by
	 * avcodec_default_get_buffer2 or avcodec_default_get_encode_buffer.
	 */
	AV_CODEC_CAP_DR1 = C.AV_CODEC_CAP_DR1
	/**
	 * Encoder or decoder requires flushing with NULL input at the end in order to
	 * give the complete and correct output.
	 *
	 * NOTE: If this flag is not set, the codec is guaranteed to never be fed with
	 *       with NULL data. The user can still send NULL data to the public encode
	 *       or decode function, but libavcodec will not pass it along to the codec
	 *       unless this flag is set.
	 *
	 * Decoders:
	 * The decoder has a non-zero delay and needs to be fed with avpkt->data=NULL,
	 * avpkt->size=0 at the end to get the delayed data until the decoder no longer
	 * returns frames.
	 *
	 * Encoders:
	 * The encoder needs to be fed with NULL data at the end of encoding until the
	 * encoder no longer returns data.
	 *
	 * NOTE: For encoders implementing the AVCodec.encode2() function, setting this
	 *       flag also means that the encoder must set the pts and duration for
	 *       each output packet. If this flag is not set, the pts and duration will
	 *       be determined by libavcodec from the input frame.
	 */
	AV_CODEC_CAP_DELAY = C.AV_CODEC_CAP_DELAY
	/**
	 * Codec can be fed a final frame with a smaller size.
	 * This can be used to prevent truncation of the last audio samples.
	 */
	AV_CODEC_CAP_SMALL_LAST_FRAME = C.AV_CODEC_CAP_SMALL_LAST_FRAME

	/**
	 * Codec is experimental and is thus avoided in favor of non experimental
	 * encoders
	 */
	AV_CODEC_CAP_EXPERIMENTAL = C.AV_CODEC_CAP_EXPERIMENTAL
	/**
	 * Codec should fill in channel configuration and samplerate instead of container
	 */
	AV_CODEC_CAP_CHANNEL_CONF = C.AV_CODEC_CAP_CHANNEL_CONF
	/**
	 * Codec supports frame-level multithreading.
	 */
	AV_CODEC_CAP_FRAME_THREADS = C.AV_CODEC_CAP_FRAME_THREADS
	/**
	 * Codec supports slice-based (or partition-based) multithreading.
	 */
	AV_CODEC_CAP_SLICE_THREADS = C.AV_CODEC_CAP_SLICE_THREADS
	/**
	 * Codec supports changed parameters at any point.
	 */
	AV_CODEC_CAP_PARAM_CHANGE = C.AV_CODEC_CAP_PARAM_CHANGE
	/**
	 * Codec supports multithreading through a method other than slice- or
	 * frame-level multithreading. Typically this marks wrappers around
	 * multithreading-capable external libraries.
	 */
	AV_CODEC_CAP_OTHER_THREADS = C.AV_CODEC_CAP_OTHER_THREADS
	/**
	 * Audio encoder supports receiving a different number of samples in each call.
	 */
	AV_CODEC_CAP_VARIABLE_FRAME_SIZE = C.AV_CODEC_CAP_VARIABLE_FRAME_SIZE
	/**
	 * 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.
	 */
	AV_CODEC_CAP_AVOID_PROBING = C.AV_CODEC_CAP_AVOID_PROBING

	/**
	 * Codec is backed by a hardware implementation. Typically used to
	 * identify a non-hwaccel hardware decoder. For information about hwaccels, use
	 * avcodec_get_hw_config() instead.
	 */
	AV_CODEC_CAP_HARDWARE = C.AV_CODEC_CAP_HARDWARE

	/**
	 * Codec is potentially backed by a hardware implementation, but not
	 * necessarily. This is used instead of AV_CODEC_CAP_HARDWARE, if the
	 * implementation provides some sort of internal fallback.
	 */
	AV_CODEC_CAP_HYBRID = C.AV_CODEC_CAP_HYBRID

	/**
	 * This encoder can reorder user opaque values from input AVFrames and return
	 * them with corresponding output packets.
	 * @see AV_CODEC_FLAG_COPY_OPAQUE
	 */
	AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE = C.AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE

	/**
	 * This encoder can be flushed using avcodec_flush_buffers(). If this flag is
	 * not set, the encoder must be closed and reopened to ensure that no frames
	 * remain pending.
	 */
	AV_CODEC_CAP_ENCODER_FLUSH = C.AV_CODEC_CAP_ENCODER_FLUSH

	/**
	 * The encoder is able to output reconstructed frame data, i.e. raw frames that
	 * would be produced by decoding the encoded bitstream.
	 *
	 * Reconstructed frame output is enabled by the AV_CODEC_FLAG_RECON_FRAME flag.
	 */
	AV_CODEC_CAP_ENCODER_RECON_FRAME = C.AV_CODEC_CAP_ENCODER_RECON_FRAME
)
View Source
const (
	/**
	 * The codec supports this format via the hw_device_ctx interface.
	 *
	 * When selecting this format, AVCodecContext.hw_device_ctx should
	 * have been set to a device of the specified type before calling
	 * avcodec_open2().
	 */
	AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX = C.AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX
	/**
	 * The codec supports this format via the hw_frames_ctx interface.
	 *
	 * When selecting this format for a decoder,
	 * AVCodecContext.hw_frames_ctx should be set to a suitable frames
	 * context inside the get_format() callback.  The frames context
	 * must have been created on a device of the specified type.
	 *
	 * When selecting this format for an encoder,
	 * AVCodecContext.hw_frames_ctx should be set to the context which
	 * will be used for the input frames before calling avcodec_open2().
	 */
	AV_CODEC_HW_CONFIG_METHOD_HW_FRAMES_CTX = C.AV_CODEC_HW_CONFIG_METHOD_HW_FRAMES_CTX
	/**
	 * The codec supports this format by some internal method.
	 *
	 * This format can be selected without any additional configuration -
	 * no device or frames context is required.
	 */
	AV_CODEC_HW_CONFIG_METHOD_INTERNAL = C.AV_CODEC_HW_CONFIG_METHOD_INTERNAL
	/**
	 * The codec supports this format by some ad-hoc method.
	 *
	 * Additional settings and/or function calls are required.  See the
	 * codec-specific documentation for details.  (Methods requiring
	 * this sort of configuration are deprecated and others should be
	 * used in preference.)
	 */
	AV_CODEC_HW_CONFIG_METHOD_AD_HOC = C.AV_CODEC_HW_CONFIG_METHOD_AD_HOC
)
View Source
const (
	/**
	 * Codec uses only intra compression.
	 * Video and audio codecs only.
	 */
	AV_CODEC_PROP_INTRA_ONLY = C.AV_CODEC_PROP_INTRA_ONLY
	/**
	 * Codec supports lossy compression. Audio and video codecs only.
	 * @note a codec may support both lossy and lossless
	 * compression modes
	 */
	AV_CODEC_PROP_LOSSY = C.AV_CODEC_PROP_LOSSY
	/**
	 * Codec supports lossless compression. Audio and video codecs only.
	 */
	AV_CODEC_PROP_LOSSLESS = C.AV_CODEC_PROP_LOSSLESS
	/**
	 * Codec supports frame reordering. That is, the coded order (the order in which
	 * the encoded packets are output by the encoders / stored / input to the
	 * decoders) may be different from the presentation order of the corresponding
	 * frames.
	 *
	 * For codecs that do not have this property set, PTS and DTS should always be
	 * equal.
	 */
	AV_CODEC_PROP_REORDER = C.AV_CODEC_PROP_REORDER

	/**
	 * Video codec supports separate coding of fields in interlaced frames.
	 */
	AV_CODEC_PROP_FIELDS = C.AV_CODEC_PROP_FIELDS

	/**
	 * Subtitle codec is bitmap based
	 * Decoded AVSubtitle data can be read from the AVSubtitleRect->pict field.
	 */
	AV_CODEC_PROP_BITMAP_SUB = C.AV_CODEC_PROP_BITMAP_SUB
	/**
	 * Subtitle codec is text based.
	 * Decoded AVSubtitle data can be read from the AVSubtitleRect->ass field.
	 */
	AV_CODEC_PROP_TEXT_SUB = C.AV_CODEC_PROP_TEXT_SUB
)
View Source
const (
	AV_EF_CRCCHECK  = C.AV_EF_CRCCHECK
	AV_EF_BITSTREAM = C.AV_EF_BITSTREAM ///< detect bitstream specification deviations
	AV_EF_BUFFER    = C.AV_EF_BUFFER    ///< detect improper bitstream length
	AV_EF_EXPLODE   = C.AV_EF_EXPLODE   ///< abort decoding on minor error detection

	AV_EF_IGNORE_ERR = C.AV_EF_IGNORE_ERR ///< ignore errors and continue
	AV_EF_CAREFUL    = C.AV_EF_CAREFUL    ///< consider things that violate the spec, are fast to calculate and have not been seen in the wild as errors
	AV_EF_COMPLIANT  = C.AV_EF_COMPLIANT  ///< consider all spec non compliances as errors
	AV_EF_AGGRESSIVE = C.AV_EF_AGGRESSIVE ///< consider things that a sane encoder/muxer should not do as an error

	FF_COMPLIANCE_VERY_STRICT  = C.FF_COMPLIANCE_VERY_STRICT ///< Strictly conform to an older more strict version of the spec or reference software.
	FF_COMPLIANCE_STRICT       = C.FF_COMPLIANCE_STRICT      ///< Strictly conform to all the things in the spec no matter what consequences.
	FF_COMPLIANCE_NORMAL       = C.FF_COMPLIANCE_NORMAL
	FF_COMPLIANCE_UNOFFICIAL   = C.FF_COMPLIANCE_UNOFFICIAL   ///< Allow unofficial extensions
	FF_COMPLIANCE_EXPERIMENTAL = C.FF_COMPLIANCE_EXPERIMENTAL ///< Allow nonstandardized experimental things.

	AV_PROFILE_UNKNOWN  = C.AV_PROFILE_UNKNOWN
	AV_PROFILE_RESERVED = C.AV_PROFILE_RESERVED

	AV_PROFILE_AAC_MAIN      = C.AV_PROFILE_AAC_MAIN
	AV_PROFILE_AAC_LOW       = C.AV_PROFILE_AAC_LOW
	AV_PROFILE_AAC_SSR       = C.AV_PROFILE_AAC_SSR
	AV_PROFILE_AAC_LTP       = C.AV_PROFILE_AAC_LTP
	AV_PROFILE_AAC_HE        = C.AV_PROFILE_AAC_HE
	AV_PROFILE_AAC_HE_V2     = C.AV_PROFILE_AAC_HE_V2
	AV_PROFILE_AAC_LD        = C.AV_PROFILE_AAC_LD
	AV_PROFILE_AAC_ELD       = C.AV_PROFILE_AAC_ELD
	AV_PROFILE_MPEG2_AAC_LOW = C.AV_PROFILE_MPEG2_AAC_LOW
	AV_PROFILE_MPEG2_AAC_HE  = C.AV_PROFILE_MPEG2_AAC_HE

	AV_PROFILE_DNXHD     = C.AV_PROFILE_DNXHD
	AV_PROFILE_DNXHR_LB  = C.AV_PROFILE_DNXHR_LB
	AV_PROFILE_DNXHR_SQ  = C.AV_PROFILE_DNXHR_SQ
	AV_PROFILE_DNXHR_HQ  = C.AV_PROFILE_DNXHR_HQ
	AV_PROFILE_DNXHR_HQX = C.AV_PROFILE_DNXHR_HQX
	AV_PROFILE_DNXHR_444 = C.AV_PROFILE_DNXHR_444

	AV_PROFILE_DTS              = C.AV_PROFILE_DTS
	AV_PROFILE_DTS_ES           = C.AV_PROFILE_DTS_ES
	AV_PROFILE_DTS_96_24        = C.AV_PROFILE_DTS_96_24
	AV_PROFILE_DTS_HD_HRA       = C.AV_PROFILE_DTS_HD_HRA
	AV_PROFILE_DTS_HD_MA        = C.AV_PROFILE_DTS_HD_MA
	AV_PROFILE_DTS_EXPRESS      = C.AV_PROFILE_DTS_EXPRESS
	AV_PROFILE_DTS_HD_MA_X      = C.AV_PROFILE_DTS_HD_MA_X
	AV_PROFILE_DTS_HD_MA_X_IMAX = C.AV_PROFILE_DTS_HD_MA_X_IMAX

	AV_PROFILE_EAC3_DDP_ATMOS = C.AV_PROFILE_EAC3_DDP_ATMOS

	AV_PROFILE_TRUEHD_ATMOS = C.AV_PROFILE_TRUEHD_ATMOS

	AV_PROFILE_MPEG2_422          = C.AV_PROFILE_MPEG2_422
	AV_PROFILE_MPEG2_HIGH         = C.AV_PROFILE_MPEG2_HIGH
	AV_PROFILE_MPEG2_SS           = C.AV_PROFILE_MPEG2_SS
	AV_PROFILE_MPEG2_SNR_SCALABLE = C.AV_PROFILE_MPEG2_SNR_SCALABLE
	AV_PROFILE_MPEG2_MAIN         = C.AV_PROFILE_MPEG2_MAIN
	AV_PROFILE_MPEG2_SIMPLE       = C.AV_PROFILE_MPEG2_SIMPLE

	AV_PROFILE_H264_CONSTRAINED = C.AV_PROFILE_H264_CONSTRAINED // 8+1; constraint_set1_flag
	AV_PROFILE_H264_INTRA       = C.AV_PROFILE_H264_INTRA       // 8+3; constraint_set3_flag

	AV_PROFILE_H264_BASELINE             = C.AV_PROFILE_H264_BASELINE
	AV_PROFILE_H264_CONSTRAINED_BASELINE = C.AV_PROFILE_H264_CONSTRAINED_BASELINE
	AV_PROFILE_H264_MAIN                 = C.AV_PROFILE_H264_MAIN
	AV_PROFILE_H264_EXTENDED             = C.AV_PROFILE_H264_EXTENDED
	AV_PROFILE_H264_HIGH                 = C.AV_PROFILE_H264_HIGH
	AV_PROFILE_H264_HIGH_10              = C.AV_PROFILE_H264_HIGH_10
	AV_PROFILE_H264_HIGH_10_INTRA        = C.AV_PROFILE_H264_HIGH_10_INTRA
	AV_PROFILE_H264_MULTIVIEW_HIGH       = C.AV_PROFILE_H264_MULTIVIEW_HIGH
	AV_PROFILE_H264_HIGH_422             = C.AV_PROFILE_H264_HIGH_422
	AV_PROFILE_H264_HIGH_422_INTRA       = C.AV_PROFILE_H264_HIGH_422_INTRA
	AV_PROFILE_H264_STEREO_HIGH          = C.AV_PROFILE_H264_STEREO_HIGH
	AV_PROFILE_H264_HIGH_444             = C.AV_PROFILE_H264_HIGH_444
	AV_PROFILE_H264_HIGH_444_PREDICTIVE  = C.AV_PROFILE_H264_HIGH_444_PREDICTIVE
	AV_PROFILE_H264_HIGH_444_INTRA       = C.AV_PROFILE_H264_HIGH_444_INTRA
	AV_PROFILE_H264_CAVLC_444            = C.AV_PROFILE_H264_CAVLC_444

	AV_PROFILE_VC1_SIMPLE   = C.AV_PROFILE_VC1_SIMPLE
	AV_PROFILE_VC1_MAIN     = C.AV_PROFILE_VC1_MAIN
	AV_PROFILE_VC1_COMPLEX  = C.AV_PROFILE_VC1_COMPLEX
	AV_PROFILE_VC1_ADVANCED = C.AV_PROFILE_VC1_ADVANCED

	AV_PROFILE_MPEG4_SIMPLE                    = C.AV_PROFILE_MPEG4_SIMPLE
	AV_PROFILE_MPEG4_SIMPLE_SCALABLE           = C.AV_PROFILE_MPEG4_SIMPLE_SCALABLE
	AV_PROFILE_MPEG4_CORE                      = C.AV_PROFILE_MPEG4_CORE
	AV_PROFILE_MPEG4_MAIN                      = C.AV_PROFILE_MPEG4_MAIN
	AV_PROFILE_MPEG4_N_BIT                     = C.AV_PROFILE_MPEG4_N_BIT
	AV_PROFILE_MPEG4_SCALABLE_TEXTURE          = C.AV_PROFILE_MPEG4_SCALABLE_TEXTURE
	AV_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION     = C.AV_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION
	AV_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE    = C.AV_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE
	AV_PROFILE_MPEG4_HYBRID                    = C.AV_PROFILE_MPEG4_HYBRID
	AV_PROFILE_MPEG4_ADVANCED_REAL_TIME        = C.AV_PROFILE_MPEG4_ADVANCED_REAL_TIME
	AV_PROFILE_MPEG4_CORE_SCALABLE             = C.AV_PROFILE_MPEG4_CORE_SCALABLE
	AV_PROFILE_MPEG4_ADVANCED_CODING           = C.AV_PROFILE_MPEG4_ADVANCED_CODING
	AV_PROFILE_MPEG4_ADVANCED_CORE             = C.AV_PROFILE_MPEG4_ADVANCED_CORE
	AV_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE = C.AV_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE
	AV_PROFILE_MPEG4_SIMPLE_STUDIO             = C.AV_PROFILE_MPEG4_SIMPLE_STUDIO
	AV_PROFILE_MPEG4_ADVANCED_SIMPLE           = C.AV_PROFILE_MPEG4_ADVANCED_SIMPLE

	AV_PROFILE_JPEG2000_CSTREAM_RESTRICTION_0  = C.AV_PROFILE_JPEG2000_CSTREAM_RESTRICTION_0
	AV_PROFILE_JPEG2000_CSTREAM_RESTRICTION_1  = C.AV_PROFILE_JPEG2000_CSTREAM_RESTRICTION_1
	AV_PROFILE_JPEG2000_CSTREAM_NO_RESTRICTION = C.AV_PROFILE_JPEG2000_CSTREAM_NO_RESTRICTION
	AV_PROFILE_JPEG2000_DCINEMA_2K             = C.AV_PROFILE_JPEG2000_DCINEMA_2K
	AV_PROFILE_JPEG2000_DCINEMA_4K             = C.AV_PROFILE_JPEG2000_DCINEMA_4K

	AV_PROFILE_VP9_0 = C.AV_PROFILE_VP9_0
	AV_PROFILE_VP9_1 = C.AV_PROFILE_VP9_1
	AV_PROFILE_VP9_2 = C.AV_PROFILE_VP9_2
	AV_PROFILE_VP9_3 = C.AV_PROFILE_VP9_3

	AV_PROFILE_HEVC_MAIN               = C.AV_PROFILE_HEVC_MAIN
	AV_PROFILE_HEVC_MAIN_10            = C.AV_PROFILE_HEVC_MAIN_10
	AV_PROFILE_HEVC_MAIN_STILL_PICTURE = C.AV_PROFILE_HEVC_MAIN_STILL_PICTURE
	AV_PROFILE_HEVC_REXT               = C.AV_PROFILE_HEVC_REXT
	AV_PROFILE_HEVC_SCC                = C.AV_PROFILE_HEVC_SCC

	AV_PROFILE_VVC_MAIN_10     = C.AV_PROFILE_VVC_MAIN_10
	AV_PROFILE_VVC_MAIN_10_444 = C.AV_PROFILE_VVC_MAIN_10_444

	AV_PROFILE_AV1_MAIN         = C.AV_PROFILE_AV1_MAIN
	AV_PROFILE_AV1_HIGH         = C.AV_PROFILE_AV1_HIGH
	AV_PROFILE_AV1_PROFESSIONAL = C.AV_PROFILE_AV1_PROFESSIONAL

	AV_PROFILE_MJPEG_HUFFMAN_BASELINE_DCT            = C.AV_PROFILE_MJPEG_HUFFMAN_BASELINE_DCT
	AV_PROFILE_MJPEG_HUFFMAN_EXTENDED_SEQUENTIAL_DCT = C.AV_PROFILE_MJPEG_HUFFMAN_EXTENDED_SEQUENTIAL_DCT
	AV_PROFILE_MJPEG_HUFFMAN_PROGRESSIVE_DCT         = C.AV_PROFILE_MJPEG_HUFFMAN_PROGRESSIVE_DCT
	AV_PROFILE_MJPEG_HUFFMAN_LOSSLESS                = C.AV_PROFILE_MJPEG_HUFFMAN_LOSSLESS
	AV_PROFILE_MJPEG_JPEG_LS                         = C.AV_PROFILE_MJPEG_JPEG_LS

	AV_PROFILE_SBC_MSBC = C.AV_PROFILE_SBC_MSBC

	AV_PROFILE_PRORES_PROXY    = C.AV_PROFILE_PRORES_PROXY
	AV_PROFILE_PRORES_LT       = C.AV_PROFILE_PRORES_LT
	AV_PROFILE_PRORES_STANDARD = C.AV_PROFILE_PRORES_STANDARD
	AV_PROFILE_PRORES_HQ       = C.AV_PROFILE_PRORES_HQ
	AV_PROFILE_PRORES_4444     = C.AV_PROFILE_PRORES_4444
	AV_PROFILE_PRORES_XQ       = C.AV_PROFILE_PRORES_XQ

	AV_PROFILE_ARIB_PROFILE_A = C.AV_PROFILE_ARIB_PROFILE_A
	AV_PROFILE_ARIB_PROFILE_C = C.AV_PROFILE_ARIB_PROFILE_C

	AV_PROFILE_KLVA_SYNC  = C.AV_PROFILE_KLVA_SYNC
	AV_PROFILE_KLVA_ASYNC = C.AV_PROFILE_KLVA_ASYNC

	AV_PROFILE_EVC_BASELINE = C.AV_PROFILE_EVC_BASELINE
	AV_PROFILE_EVC_MAIN     = C.AV_PROFILE_EVC_MAIN

	AV_LEVEL_UNKNOWN = C.AV_LEVEL_UNKNOWN
)

*

  • Verify checksums embedded in the bitstream (could be of either encoded or
  • decoded data, depending on the format) and print an error message on mismatch.
  • If AV_EF_EXPLODE is also set, a mismatching checksum will result in the
  • decoder/demuxer returning an error.
View Source
const (
	AV_PKT_FLAG_KEY     = C.AV_PKT_FLAG_KEY     ///< The packet contains a keyframe
	AV_PKT_FLAG_CORRUPT = C.AV_PKT_FLAG_CORRUPT ///< 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.
	 **/
	AV_PKT_FLAG_DISCARD = C.AV_PKT_FLAG_DISCARD
	/**
	 * The packet comes from a trusted source.
	 *
	 * Otherwise-unsafe constructs such as arbitrary pointers to data
	 * outside the packet may be followed.
	 */
	AV_PKT_FLAG_TRUSTED = C.AV_PKT_FLAG_TRUSTED
	/**
	 * Flag is used to indicate packets that contain frames that can
	 * be discarded by the decoder.  I.e. Non-reference frames.
	 */
	AV_PKT_FLAG_DISPOSABLE = C.AV_PKT_FLAG_DISPOSABLE
)
View Source
const (
	FF_API_INIT_PACKET        = C.FF_API_INIT_PACKET
	FF_API_IDCT_NONE          = C.FF_API_IDCT_NONE
	FF_API_SVTAV1_OPTS        = C.FF_API_SVTAV1_OPTS
	FF_API_AYUV_CODECID       = C.FF_API_AYUV_CODECID
	FF_API_VT_OUTPUT_CALLBACK = C.FF_API_VT_OUTPUT_CALLBACK
	FF_API_AVCODEC_CHROMA_POS = C.FF_API_AVCODEC_CHROMA_POS
	FF_API_VT_HWACCEL_CONTEXT = C.FF_API_VT_HWACCEL_CONTEXT
	FF_API_AVCTX_FRAME_NUMBER = C.FF_API_AVCTX_FRAME_NUMBER
	FF_API_SLICE_OFFSET       = C.FF_API_SLICE_OFFSET
	FF_API_SUBFRAMES          = C.FF_API_SUBFRAMES
	FF_API_TICKS_PER_FRAME    = C.FF_API_TICKS_PER_FRAME
	FF_API_DROPCHANGED        = C.FF_API_DROPCHANGED

	FF_API_AVFFT            = C.FF_API_AVFFT
	FF_API_FF_PROFILE_LEVEL = C.FF_API_FF_PROFILE_LEVEL

	// reminder to remove CrystalHD decoders on next major bump
	FF_CODEC_CRYSTAL_HD = C.FF_CODEC_CRYSTAL_HD
)
View Source
const AV_HWACCEL_CODEC_CAP_EXPERIMENTAL = C.AV_HWACCEL_CODEC_CAP_EXPERIMENTAL

*

  • HWAccel is experimental and is thus avoided in favor of non experimental
  • codecs
View Source
const AV_HWACCEL_FLAG_ALLOW_HIGH_DEPTH = C.AV_HWACCEL_FLAG_ALLOW_HIGH_DEPTH

*

  • Hardware acceleration can output YUV pixel formats with a different chroma
  • sampling than 4:2:0 and/or other than 8 bits per component.
View Source
const AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH = C.AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH

*

  • Hardware acceleration should still be attempted for decoding when the
  • codec profile does not match the reported capabilities of the hardware. *
  • For example, this can be used to try to decode baseline profile H.264
  • streams in hardware - it will often succeed, because many streams marked
  • as baseline profile actually conform to constrained baseline profile. *
  • @warning If the stream is actually not supported then the behaviour is
  • undefined, and may include returning entirely incorrect output
  • while indicating success.
View Source
const AV_HWACCEL_FLAG_IGNORE_LEVEL = C.AV_HWACCEL_FLAG_IGNORE_LEVEL

*

  • Hardware acceleration should be used for decoding even if the codec level
  • used is unknown or higher than the maximum supported level reported by the
  • hardware driver. *
  • It's generally a good idea to pass this flag unless you have a specific
  • reason not to, as hardware tends to under-report supported levels.
View Source
const AV_HWACCEL_FLAG_UNSAFE_OUTPUT = C.AV_HWACCEL_FLAG_UNSAFE_OUTPUT

*

  • Some hardware decoders (namely nvdec) can either output direct decoder
  • surfaces, or make an on-device copy and return said copy.
  • There is a hard limit on how many decoder surfaces there can be, and it
  • cannot be accurately guessed ahead of time.
  • For some processing chains, this can be okay, but others will run into the
  • limit and in turn produce very confusing errors that require fine tuning of
  • more or less obscure options by the user, or in extreme cases cannot be
  • resolved at all without inserting an avfilter that forces a copy. *
  • Thus, the hwaccel will by default make a copy for safety and resilience.
  • If a users really wants to minimize the amount of copies, they can set this
  • flag and ensure their processing chain does not exhaust the surface pool.
View Source
const AV_INPUT_BUFFER_MIN_SIZE = C.AV_INPUT_BUFFER_MIN_SIZE

*

  • @ingroup lavc_encoding
  • minimum encoding buffer size
  • Used to avoid some checks during header writing.
View Source
const AV_INPUT_BUFFER_PADDING_SIZE = C.AV_INPUT_BUFFER_PADDING_SIZE

*

  • @ingroup lavc_decoding
  • Required number of additionally allocated bytes at the end of the input bitstream for decoding.
  • This is mainly needed because some optimized bitstream readers read
  • 32 or 64 bit at once and could read over the end.<br>
  • Note: If the first 23 bits of the additional bytes are not 0, then damaged
  • MPEG bitstreams could cause overread and segfault.
View Source
const AV_PARSER_PTS_NB = C.AV_PARSER_PTS_NB
View Source
const AV_SUBTITLE_FLAG_FORCED = C.AV_SUBTITLE_FLAG_FORCED
View Source
const FF_COMPRESSION_DEFAULT = C.FF_COMPRESSION_DEFAULT
View Source
const LIBAVCODEC_BUILD = C.LIBAVCODEC_BUILD
View Source
const LIBAVCODEC_IDENT = C.LIBAVCODEC_IDENT
View Source
const LIBAVCODEC_VERSION_INT = C.LIBAVCODEC_VERSION_INT
View Source
const LIBAVCODEC_VERSION_MAJOR = C.LIBAVCODEC_VERSION_MAJOR
View Source
const LIBAVCODEC_VERSION_MICRO = C.LIBAVCODEC_VERSION_MICRO
View Source
const LIBAVCODEC_VERSION_MINOR = C.LIBAVCODEC_VERSION_MINOR
View Source
const PARSER_FLAG_COMPLETE_FRAMES = C.PARSER_FLAG_COMPLETE_FRAMES
View Source
const PARSER_FLAG_FETCHED_OFFSET = C.PARSER_FLAG_FETCHED_OFFSET

/ Set if the parser has a valid file offset

View Source
const PARSER_FLAG_ONCE = C.PARSER_FLAG_ONCE
View Source
const PARSER_FLAG_USE_CODEC_TS = C.PARSER_FLAG_USE_CODEC_TS

Variables

This section is empty.

Functions

func AvCodecIsDecoder added in v0.0.4

func AvCodecIsDecoder(codec *CAVCodec) int

*

  • @return a non-zero number if codec is a decoder, zero otherwise

func AvCodecIsEncoder added in v0.0.4

func AvCodecIsEncoder(codec *CAVCodec) int

*

  • @return a non-zero number if codec is an encoder, zero otherwise

func AvFastPaddedMalloc added in v0.0.4

func AvFastPaddedMalloc(ptr unsafe.Pointer, size *ctypes.UInt, minSize ctypes.SizeT)

*

  • Same behaviour av_fast_malloc but the buffer has additional
  • AV_INPUT_BUFFER_PADDING_SIZE at the end which will always be 0. *
  • In addition the whole buffer will initially and after resizes
  • be 0-initialized so that no uninitialized data will ever appear.

func AvFastPaddedMallocz added in v0.0.4

func AvFastPaddedMallocz(ptr unsafe.Pointer, size *ctypes.UInt, minSize ctypes.SizeT)

*

  • Same behaviour av_fast_padded_malloc except that buffer will always
  • be 0-initialized after call.

func AvGetAudioFrameDuration added in v0.0.4

func AvGetAudioFrameDuration(avctx *CAVCodecContext, frameBytes int) int

*

  • Return audio frame duration. *
  • @param avctx codec context
  • @param frame_bytes size of the frame, or 0 if unknown
  • @return frame duration, in samples, if known. 0 if not able to
  • determine.

func AvGetAudioFrameDuration2 added in v0.0.4

func AvGetAudioFrameDuration2(par *CAVCodecParameters, frameBytes int) int

*

  • This function is the same as av_get_audio_frame_duration(), except it works
  • with AVCodecParameters instead of an AVCodecContext.

func AvGetBitsPerSample

func AvGetBitsPerSample(codecId CAVCodecID) int

*

  • Return codec bits per sample. *
  • @param[in] codec_id the codec
  • @return Number of bits per sample or zero if unknown for the given codec.

func AvGetExactBitsPerSample

func AvGetExactBitsPerSample(codecId CAVCodecID) int

*

  • Return codec bits per sample.
  • Only return non-zero if the bits per sample is exactly correct, not an
  • approximation. *
  • @param[in] codec_id the codec
  • @return Number of bits per sample or zero if unknown for the given codec.

func AvGetProfileName added in v0.0.4

func AvGetProfileName(codec *CAVCodec, profile int) string

*

  • Return a name for the specified profile, if available. *
  • @param codec the codec that is searched for the given profile
  • @param profile the profile value for which a name is requested
  • @return A name for the profile if found, NULL otherwise.

func AvGrowPacket added in v0.0.3

func AvGrowPacket(pkt *CAVPacket, grow_by int) int

*

  • Increase packet size, correctly zeroing padding *
  • @param pkt packet
  • @param grow_by number of bytes by which to increase the size of the packet

func AvNewPacket

func AvNewPacket(pkt *CAVPacket, size int) int

*

  • Allocate the payload of a packet and initialize its fields with
  • default values. *
  • @param pkt packet
  • @param size wanted payload size
  • @return 0 if OK, AVERROR_xxx otherwise

func AvPacketAddSideData added in v0.0.3

func AvPacketAddSideData(pkt *CAVPacket, _type CAVPacketSideDataType, data unsafe.Pointer, size ctypes.SizeT) int

*

  • Wrap an existing array as a packet side data. *
  • @param pkt packet
  • @param type side information type
  • @param data the side data array. It must be allocated with the av_malloc()
  • family of functions. The ownership of the data is transferred to
  • pkt.
  • @param size side information size
  • @return a non-negative number on success, a negative AVERROR code on
  • failure. On failure, the packet is unchanged and the data remains
  • owned by the caller.

func AvPacketCopyProps

func AvPacketCopyProps(dst *CAVPacket, src *CAVPacket) int

*

  • Copy only "properties" fields from src to dst. *
  • Properties for the purpose of this function are all the fields
  • beside those related to the packet data (buf, data, size) *
  • @param dst Destination packet
  • @param src Source packet *
  • @return 0 on success AVERROR on failure.

func AvPacketFree

func AvPacketFree(pkt **CAVPacket)

*

  • Free the packet, if the packet is reference counted, it will be
  • unreferenced first. *
  • @param pkt packet to be freed. The pointer will be set to NULL.
  • @note passing NULL is a no-op.

func AvPacketFreeSideData

func AvPacketFreeSideData(pkt *CAVPacket)

*

  • Convenience function to free all the side data stored.
  • All the other fields stay untouched. *
  • @param pkt packet

func AvPacketFromData added in v0.0.3

func AvPacketFromData(pkt *CAVPacket, data unsafe.Pointer, size int) int

*

  • Initialize a reference-counted packet from av_malloc()ed data. *
  • @param pkt packet to be initialized. This function will set the data, size,
  • and buf fields, all others are left untouched.
  • @param data Data allocated by av_malloc() to be used as packet data. If this
  • function returns successfully, the data is owned by the underlying AVBuffer.
  • The caller may not access the data through other means.
  • @param size size of data in bytes, without the padding. I.e. the full buffer
  • size is assumed to be size + AV_INPUT_BUFFER_PADDING_SIZE. *
  • @return 0 on success, a negative AVERROR on error

func AvPacketGetSideData added in v0.0.3

func AvPacketGetSideData(pkt *CAVPacket, _type CAVPacketSideDataType, size *ctypes.SizeT) unsafe.Pointer

*

  • Get side information from packet. *
  • @param pkt packet
  • @param type desired side information type
  • @param size If supplied, *size will be set to the size of the side data
  • or to zero if the desired side data is not present.
  • @return pointer to data if present or NULL otherwise

func AvPacketMakeRefcounted

func AvPacketMakeRefcounted(pkt *CAVPacket) int

*

  • Ensure the data described by a given packet is reference counted. *
  • @note This function does not ensure that the reference will be writable.
  • Use av_packet_make_writable instead for that purpose. *
  • @see av_packet_ref
  • @see av_packet_make_writable *
  • @param pkt packet whose data should be made reference counted. *
  • @return 0 on success, a negative AVERROR on error. On failure, the
  • packet is unchanged.

func AvPacketMakeWritable

func AvPacketMakeWritable(pkt *CAVPacket) int

*

  • Create a writable reference for the data described by a given packet,
  • avoiding data copy if possible. *
  • @param pkt Packet whose data should be made writable. *
  • @return 0 on success, a negative AVERROR on failure. On failure, the
  • packet is unchanged.

func AvPacketMoveRef

func AvPacketMoveRef(dst *CAVPacket, src *CAVPacket)

*

  • Move every field in src to dst and reset src. *
  • @see av_packet_unref *
  • @param src Source packet, will be reset
  • @param dst Destination packet

func AvPacketNewSideData added in v0.0.3

func AvPacketNewSideData(pkt *CAVPacket, _type CAVPacketSideDataType, size ctypes.SizeT) unsafe.Pointer

*

  • Allocate new information of a packet. *
  • @param pkt packet
  • @param type side information type
  • @param size side information size
  • @return pointer to fresh allocated data or NULL otherwise

func AvPacketPackDictionary added in v0.0.3

func AvPacketPackDictionary(dict *avutil.CAVDictionary, size *ctypes.SizeT) unsafe.Pointer

*

  • Pack a dictionary for use in side_data. *
  • @param dict The dictionary to pack.
  • @param size pointer to store the size of the returned data
  • @return pointer to data if successful, NULL otherwise

func AvPacketRef

func AvPacketRef(dst *CAVPacket, src *CAVPacket) int

*

  • Setup a new reference to the data described by a given packet *
  • If src is reference-counted, setup dst as a new reference to the
  • buffer in src. Otherwise allocate a new buffer in dst and copy the
  • data from src into it. *
  • All the other fields are copied from src. *
  • @see av_packet_unref *
  • @param dst Destination packet. Will be completely overwritten.
  • @param src Source packet *
  • @return 0 on success, a negative AVERROR on error. On error, dst
  • will be blank (as if returned by av_packet_alloc()).

func AvPacketRescaleTs

func AvPacketRescaleTs(pkt *CAVPacket, tb_src avutil.CAVRational, tb_dst avutil.CAVRational)

*

  • Convert valid timing fields (timestamps / durations) in a packet from one
  • timebase to another. Timestamps with unknown values (AV_NOPTS_VALUE) will be
  • ignored. *
  • @param pkt packet on which the conversion will be performed
  • @param tb_src source timebase, in which the timing fields in pkt are
  • expressed
  • @param tb_dst destination timebase, to which the timing fields will be
  • converted

func AvPacketShrinkSideData added in v0.0.3

func AvPacketShrinkSideData(pkt *CAVPacket, _type CAVPacketSideDataType, size ctypes.SizeT) int

*

  • Shrink the already allocated side data buffer *
  • @param pkt packet
  • @param type side information type
  • @param size new side information size
  • @return 0 on success, < 0 on failure

func AvPacketSideDataFree added in v0.0.3

func AvPacketSideDataFree(sd **CAVPacketSideData, nb_sd *ctypes.Int)

*

  • Convenience function to free all the side data stored in an array, and
  • the array itself. *
  • @param sd pointer to array of side data to free. Will be set to NULL
  • upon return.
  • @param nb_sd pointer to an integer containing the number of entries in
  • the array. Will be set to 0 upon return.

func AvPacketSideDataName added in v0.0.3

func AvPacketSideDataName(_type CAVPacketSideDataType) string

func AvPacketSideDataRemove added in v0.0.3

func AvPacketSideDataRemove(sd *CAVPacketSideData, nb_sd *ctypes.Int, _type CAVPacketSideDataType)

*

  • Remove side data of the given type from a side data array. *
  • @param sd the array from which the side data should be removed
  • @param nb_sd pointer to an integer containing the number of entries in
  • the array. Will be reduced by the amount of entries removed
  • upon return
  • @param type side information type

func AvPacketUnpackDictionary added in v0.0.3

func AvPacketUnpackDictionary(data unsafe.Pointer, size ctypes.SizeT, dict **avutil.CAVDictionary) int

*

  • Unpack a dictionary from side_data. *
  • @param data data from side_data
  • @param size size of the data
  • @param dict the metadata storage dictionary
  • @return 0 on success, < 0 on failure

func AvPacketUnref

func AvPacketUnref(pkt *CAVPacket)

*

  • Wipe the packet. *
  • Unreference the buffer referenced by the packet and reset the
  • remaining packet fields to their default values. *
  • @param pkt The packet to be unreferenced.

func AvParserClose

func AvParserClose(s *CAVCodecParserContext)

func AvParserParse2

func AvParserParse2(s *CAVCodecParserContext, avctx *CAVCodecContext,
	poutbuf *unsafe.Pointer, poutbuf_size *ctypes.Int,
	buf unsafe.Pointer, buf_size int,
	pts int64, dts int64, pos int64) int

*

  • Parse a packet. *
  • @param s parser context.
  • @param avctx codec context.
  • @param poutbuf set to pointer to parsed buffer or NULL if not yet finished.
  • @param poutbuf_size set to size of parsed buffer or zero if not yet finished.
  • @param buf input buffer.
  • @param buf_size buffer size in bytes without the padding. I.e. the full buffer
  • size is assumed to be buf_size + AV_INPUT_BUFFER_PADDING_SIZE.
  • To signal EOF, this should be 0 (so that the last frame
  • can be output).
  • @param pts input presentation timestamp.
  • @param dts input decoding timestamp.
  • @param pos input byte position in stream.
  • @return the number of bytes of the input bitstream used. *
  • Example:
  • @code
  • while(in_len){
  • len = av_parser_parse2(myparser, AVCodecContext, &data, &size,
  • in_data, in_len,
  • pts, dts, pos);
  • in_data += len;
  • in_len -= len; *
  • if(size)
  • decode_frame(data, size);
  • }
  • @endcode

func AvShrinkPacket added in v0.0.3

func AvShrinkPacket(pkt *CAVPacket, size int)

*

  • Reduce packet size, correctly zeroing padding *
  • @param pkt packet
  • @param size new size

func AvXiphlacing added in v0.0.4

func AvXiphlacing(s unsafe.Pointer, v uint) uint

*

  • Encode extradata length to a buffer. Used by xiph codecs. *
  • @param s buffer to write to; must be at least (v/255+1) bytes long
  • @param v size of extradata in bytes
  • @return number of bytes written to the buffer.

func AvcodecAlignDimensions added in v0.0.4

func AvcodecAlignDimensions(s *CAVCodecContext, width *ctypes.Int, height *ctypes.Int)

*

  • Modify width and height values so that they will result in a memory
  • buffer that is acceptable for the codec if you do not use any horizontal
  • padding. *
  • May only be used if a codec with AV_CODEC_CAP_DR1 has been opened.

func AvcodecAlignDimensions2 added in v0.0.4

func AvcodecAlignDimensions2(s *CAVCodecContext, width *ctypes.Int, height *ctypes.Int, linesize_align [avutil.AV_NUM_DATA_POINTERS]ctypes.Int)

*

  • Modify width and height values so that they will result in a memory
  • buffer that is acceptable for the codec if you also ensure that all
  • line sizes are a multiple of the respective linesize_align[i]. *
  • May only be used if a codec with AV_CODEC_CAP_DR1 has been opened.

func AvcodecClose

func AvcodecClose(avctx *CAVCodecContext) int

*

  • Close a given AVCodecContext and free all the data associated with it
  • (but not the AVCodecContext itself). *
  • Calling this function on an AVCodecContext that hasn't been opened will free
  • the codec-specific data allocated in avcodec_alloc_context3() with a non-NULL
  • codec. Subsequent calls will do nothing. *
  • @note Do not use this function. Use avcodec_free_context() to destroy a
  • codec context (either open or closed). Opening and closing a codec context
  • multiple times is not supported anymore -- use multiple codec contexts
  • instead.

func AvcodecConfiguration added in v0.0.4

func AvcodecConfiguration() string

*

  • Return the libavcodec build-time configuration.

func AvcodecDecodeSubtitle2 added in v0.0.4

func AvcodecDecodeSubtitle2(s *CAVCodecContext, sub *CAVSubtitle,
	gotSubPtr *ctypes.Int, avpkt *CAVPacket) int

*

  • Decode a subtitle message.
  • Return a negative value on error, otherwise return the number of bytes used.
  • If no subtitle could be decompressed, got_sub_ptr is zero.
  • Otherwise, the subtitle is stored in *sub.
  • Note that AV_CODEC_CAP_DR1 is not available for subtitle codecs. This is for
  • simplicity, because the performance difference is expected to be negligible
  • 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 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 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. *
  • @param avctx the codec context
  • @param[out] sub The preallocated AVSubtitle in which the decoded subtitle will be stored,
  • must be freed with avsubtitle_free if *got_sub_ptr is set.
  • @param[in,out] got_sub_ptr Zero if no subtitle could be decompressed, otherwise, it is nonzero.
  • @param[in] avpkt The input AVPacket containing the input buffer.

func AvcodecDefaultGetBuffer2 added in v0.0.4

func AvcodecDefaultGetBuffer2(s *CAVCodecContext, frame *avutil.CAVFrame, flags int) int

*

  • The default callback for AVCodecContext.get_buffer2(). It is made public so
  • it can be called by custom get_buffer2() implementations for decoders without
  • AV_CODEC_CAP_DR1 set.

func AvcodecDefaultGetEncodeBuffer added in v0.0.4

func AvcodecDefaultGetEncodeBuffer(s *CAVCodecContext, pkt *CAVPacket, flags int) int

*

  • The default callback for AVCodecContext.get_encode_buffer(). It is made public so
  • it can be called by custom get_encode_buffer() implementations for encoders without
  • AV_CODEC_CAP_DR1 set.

func AvcodecDefaultGetFormat added in v0.0.4

func AvcodecDefaultGetFormat(s *CAVCodecContext, fmt *avutil.CAVPixelFormat) avutil.CAVPixelFormat

func AvcodecEncodeSubtitle added in v0.0.4

func AvcodecEncodeSubtitle(avctx *CAVCodecContext, buf unsafe.Pointer, bufSize int,
	sub *CAVSubtitle) int

func AvcodecFillAudioFrame added in v0.0.4

func AvcodecFillAudioFrame(frame *avutil.CAVFrame, nbChannels int,
	sampleFmt avutil.CAVSampleFormat, buf unsafe.Pointer,
	bufSize int, align int) int

*

  • Fill AVFrame audio data and linesize pointers. *
  • The buffer buf must be a preallocated buffer with a size big enough
  • to contain the specified samples amount. The filled AVFrame data
  • pointers will point to this buffer. *
  • AVFrame extended_data channel pointers are allocated if necessary for
  • planar audio. *
  • @param frame the AVFrame
  • frame->nb_samples must be set prior to calling the
  • function. This function fills in frame->data,
  • frame->extended_data, frame->linesize[0].
  • @param nb_channels channel count
  • @param sample_fmt sample format
  • @param buf buffer to use for frame data
  • @param buf_size size of buffer
  • @param align plane size sample alignment (0 = default)
  • @return >=0 on success, negative error code on failure
  • @todo return the size in bytes required to store the samples in
  • case of success, at the next libavutil bump

func AvcodecFindBestPixFmtOfList added in v0.0.4

func AvcodecFindBestPixFmtOfList(pixFmtList *avutil.CAVPixelFormat,
	srcPixFmt avutil.CAVPixelFormat,
	hasAlpha int, lossPtr *ctypes.Int) int

*

  • Find the best pixel format to convert to given a certain source pixel
  • format. When converting from one pixel format to another, information loss
  • may occur. For example, when converting from RGB24 to GRAY, the color
  • information will be lost. Similarly, other losses occur when converting from
  • some formats to other formats. avcodec_find_best_pix_fmt_of_2() searches which of
  • the given pixel formats should be used to suffer the least amount of loss.
  • The pixel formats from which it chooses one, are determined by the
  • pix_fmt_list parameter. * *
  • @param[in] pix_fmt_list AV_PIX_FMT_NONE terminated array of pixel formats to choose from
  • @param[in] src_pix_fmt source pixel format
  • @param[in] has_alpha Whether the source pixel format alpha channel is used.
  • @param[out] loss_ptr Combination of flags informing you what kind of losses will occur.
  • @return The best pixel format to convert to or -1 if none was found.

func AvcodecFlushBuffers added in v0.0.4

func AvcodecFlushBuffers(avctx *CAVCodecContext)

*

  • Reset the internal codec state / flush internal buffers. Should be called
  • e.g. when seeking or when switching to a different stream. *
  • @note for decoders, this function just releases any references the decoder
  • might keep internally, but the caller's references remain valid. *
  • @note for encoders, this function will only do something if the encoder
  • declares support for AV_CODEC_CAP_ENCODER_FLUSH. When called, the encoder
  • will drain any remaining packets, and can then be re-used for a different
  • stream (as opposed to sending a null frame which will leave the encoder
  • in a permanent EOF state after draining). This can be desirable if the
  • cost of tearing down and replacing the encoder instance is high.

func AvcodecFreeContext

func AvcodecFreeContext(avctx **CAVCodecContext)

*

  • Free the codec context and everything associated with it and write NULL to
  • the provided pointer.

func AvcodecGetClass added in v0.0.4

func AvcodecGetClass() *avutil.CAVClass

*

  • Get the AVClass for AVCodecContext. It can be used in combination with
  • AV_OPT_SEARCH_FAKE_OBJ for examining options. *
  • @see av_opt_find().

func AvcodecGetHwFramesParameters added in v0.0.4

func AvcodecGetHwFramesParameters(avctx *CAVCodecContext,
	deviceRef *avutil.CAVBufferRef,
	hwPixFmt avutil.CAVPixelFormat,
	outFramesRef **avutil.CAVBufferRef) int

*

  • Create and return a AVHWFramesContext with values adequate for hardware
  • decoding. This is meant to get called from the get_format callback, and is
  • a helper for preparing a AVHWFramesContext for AVCodecContext.hw_frames_ctx.
  • This API is for decoding with certain hardware acceleration modes/APIs only. *
  • The returned AVHWFramesContext is not initialized. The caller must do this
  • with av_hwframe_ctx_init(). *
  • Calling this function is not a requirement, but makes it simpler to avoid
  • codec or hardware API specific details when manually allocating frames. *
  • Alternatively to this, an API user can set AVCodecContext.hw_device_ctx,
  • which sets up AVCodecContext.hw_frames_ctx fully automatically, and makes
  • it unnecessary to call this function or having to care about
  • AVHWFramesContext initialization at all. *
  • There are a number of requirements for calling this function: *
  • - It must be called from get_format with the same avctx parameter that was
  • passed to get_format. Calling it outside of get_format is not allowed, and
  • can trigger undefined behavior.
  • - The function is not always supported (see description of return values).
  • Even if this function returns successfully, hwaccel initialization could
  • fail later. (The degree to which implementations check whether the stream
  • is actually supported varies. Some do this check only after the user's
  • get_format callback returns.)
  • - The hw_pix_fmt must be one of the choices suggested by get_format. If the
  • user decides to use a AVHWFramesContext prepared with this API function,
  • the user must return the same hw_pix_fmt from get_format.
  • - The device_ref passed to this function must support the given hw_pix_fmt.
  • - After calling this API function, it is the user's responsibility to
  • initialize the AVHWFramesContext (returned by the out_frames_ref parameter),
  • and to set AVCodecContext.hw_frames_ctx to it. If done, this must be done
  • before returning from get_format (this is implied by the normal
  • AVCodecContext.hw_frames_ctx API rules).
  • - The AVHWFramesContext parameters may change every time time get_format is
  • called. Also, AVCodecContext.hw_frames_ctx is reset before get_format. So
  • you are inherently required to go through this process again on every
  • get_format call.
  • - It is perfectly possible to call this function without actually using
  • the resulting AVHWFramesContext. One use-case might be trying to reuse a
  • previously initialized AVHWFramesContext, and calling this API function
  • only to test whether the required frame parameters have changed.
  • - Fields that use dynamically allocated values of any kind must not be set
  • by the user unless setting them is explicitly allowed by the documentation.
  • If the user sets AVHWFramesContext.free and AVHWFramesContext.user_opaque,
  • the new free callback must call the potentially set previous free callback.
  • This API call may set any dynamically allocated fields, including the free
  • callback. *
  • The function will set at least the following fields on AVHWFramesContext
  • (potentially more, depending on hwaccel API): *
  • - All fields set by av_hwframe_ctx_alloc().
  • - Set the format field to hw_pix_fmt.
  • - Set the sw_format field to the most suited and most versatile format. (An
  • implication is that this will prefer generic formats over opaque formats
  • with arbitrary restrictions, if possible.)
  • - Set the width/height fields to the coded frame size, rounded up to the
  • API-specific minimum alignment.
  • - Only _if_ the hwaccel requires a pre-allocated pool: set the initial_pool_size
  • field to the number of maximum reference surfaces possible with the codec,
  • plus 1 surface for the user to work (meaning the user can safely reference
  • at most 1 decoded surface at a time), plus additional buffering introduced
  • by frame threading. If the hwaccel does not require pre-allocation, the
  • field is left to 0, and the decoder will allocate new surfaces on demand
  • during decoding.
  • - Possibly AVHWFramesContext.hwctx fields, depending on the underlying
  • hardware API. *
  • Essentially, out_frames_ref returns the same as av_hwframe_ctx_alloc(), but
  • with basic frame parameters set. *
  • The function is stateless, and does not change the AVCodecContext or the
  • device_ref AVHWDeviceContext. *
  • @param avctx The context which is currently calling get_format, and which
  • implicitly contains all state needed for filling the returned
  • AVHWFramesContext properly.
  • @param device_ref A reference to the AVHWDeviceContext describing the device
  • which will be used by the hardware decoder.
  • @param hw_pix_fmt The hwaccel format you are going to return from get_format.
  • @param out_frames_ref On success, set to a reference to an _uninitialized_
  • AVHWFramesContext, created from the given device_ref.
  • Fields will be set to values required for decoding.
  • Not changed if an error is returned.
  • @return zero on success, a negative value on error. The following error codes
  • have special semantics:
  • AVERROR(ENOENT): the decoder does not support this functionality. Setup
  • is always manual, or it is a decoder which does not
  • support setting AVCodecContext.hw_frames_ctx at all,
  • or it is a software format.
  • AVERROR(EINVAL): it is known that hardware decoding is not supported for
  • this configuration, or the device_ref is not supported
  • for the hwaccel referenced by hw_pix_fmt.

func AvcodecGetName

func AvcodecGetName(id CAVCodecID) string

*

  • Get the name of a codec.
  • @return a static string identifying the codec; never NULL

func AvcodecGetSubtitleRectClass added in v0.0.4

func AvcodecGetSubtitleRectClass() *avutil.CAVClass

*

  • Get the AVClass for AVSubtitleRect. It can be used in combination with
  • AV_OPT_SEARCH_FAKE_OBJ for examining options. *
  • @see av_opt_find().

func AvcodecGetType added in v0.0.4

func AvcodecGetType(codecId CAVCodecID) avutil.CAVMediaType

*

  • Get the type of the given codec.

func AvcodecIsOpen added in v0.0.4

func AvcodecIsOpen(s *CAVCodecContext) int

*

  • @return a positive value if s is open (i.e. avcodec_open2() was called on it
  • with no corresponding avcodec_close()), 0 otherwise.

func AvcodecLicense added in v0.0.4

func AvcodecLicense() string

*

  • Return the libavcodec license.

func AvcodecOpen2

func AvcodecOpen2(avctx *CAVCodecContext, codec *CAVCodec, options **avutil.CAVDictionary) int

*

  • Initialize the AVCodecContext to use the given AVCodec. Prior to using this
  • function the context has to be allocated with avcodec_alloc_context3(). *
  • The functions avcodec_find_decoder_by_name(), avcodec_find_encoder_by_name(),
  • avcodec_find_decoder() and avcodec_find_encoder() provide an easy way for
  • retrieving a codec. *
  • Depending on the codec, you might need to set options in the codec context
  • also for decoding (e.g. width, height, or the pixel or audio sample format in
  • the case the information is not available in the bitstream, as when decoding
  • raw audio or video). *
  • Options in the codec context can be set either by setting them in the options
  • AVDictionary, or by setting the values in the context itself, directly or by
  • using the av_opt_set() API before calling this function. *
  • Example:
  • @code
  • av_dict_set(&opts, "b", "2.5M", 0);
  • codec = avcodec_find_decoder(AV_CODEC_ID_H264);
  • if (!codec)
  • exit(1); *
  • context = avcodec_alloc_context3(codec); *
  • if (avcodec_open2(context, codec, opts) < 0)
  • exit(1);
  • @endcode *
  • In the case AVCodecParameters are available (e.g. when demuxing a stream
  • using libavformat, and accessing the AVStream contained in the demuxer), the
  • codec parameters can be copied to the codec context using
  • avcodec_parameters_to_context(), as in the following example: *
  • @code
  • AVStream *stream = ...;
  • context = avcodec_alloc_context3(codec);
  • if (avcodec_parameters_to_context(context, stream->codecpar) < 0)
  • exit(1);
  • if (avcodec_open2(context, codec, NULL) < 0)
  • exit(1);
  • @endcode *
  • @note Always call this function before using decoding routines (such as
  • @ref avcodec_receive_frame()). *
  • @param avctx The context to initialize.
  • @param codec The codec to open this context for. If a non-NULL codec has been
  • previously passed to avcodec_alloc_context3() or
  • for this context, then this parameter MUST be either NULL or
  • equal to the previously passed codec.
  • @param options A dictionary filled with AVCodecContext and codec-private
  • options, which are set on top of the options already set in
  • avctx, can be NULL. On return this object will be filled with
  • options that were not found in the avctx codec context. *
  • @return zero on success, a negative value on error
  • @see avcodec_alloc_context3(), avcodec_find_decoder(), avcodec_find_encoder(),
  • av_dict_set(), av_opt_set(), av_opt_find(), avcodec_parameters_to_context()

func AvcodecParametersCopy added in v0.0.4

func AvcodecParametersCopy(dst *CAVCodecParameters, src *CAVCodecParameters) int

*

  • Copy the contents of src to dst. Any allocated fields in dst are freed and
  • replaced with newly allocated duplicates of the corresponding fields in src. *
  • @return >= 0 on success, a negative AVERROR code on failure.

func AvcodecParametersFree added in v0.0.4

func AvcodecParametersFree(par **CAVCodecParameters)

*

  • Free an AVCodecParameters instance and everything associated with it and
  • write NULL to the supplied pointer.

func AvcodecParametersFromContext

func AvcodecParametersFromContext(par *CAVCodecParameters, codec *CAVCodecContext) int

*

  • Fill the parameters struct based on the values from the supplied codec
  • context. Any allocated fields in par are freed and replaced with duplicates
  • of the corresponding fields in codec. *
  • @return >= 0 on success, a negative AVERROR code on failure

func AvcodecParametersToContext

func AvcodecParametersToContext(codec *CAVCodecContext, par *CAVCodecParameters) int

*

  • Fill the codec context based on the values from the supplied codec
  • parameters. Any allocated fields in codec that have a corresponding field in
  • par are freed and replaced with duplicates of the corresponding field in par.
  • Fields in codec that do not have a counterpart in par are not touched. *
  • @return >= 0 on success, a negative AVERROR code on failure.

func AvcodecPixFmtToCodecTag added in v0.0.4

func AvcodecPixFmtToCodecTag(pixFmt avutil.CAVPixelFormat) int

*

  • Return a value representing the fourCC code associated to the
  • pixel format pix_fmt, or 0 if no associated fourCC code can be
  • found.

func AvcodecProfileName

func AvcodecProfileName(codecId CAVCodecID, profile int) string

*

  • Return a name for the specified profile, if available. *
  • @param codec_id the ID of the codec to which the requested profile belongs
  • @param profile the profile value for which a name is requested
  • @return A name for the profile if found, NULL otherwise. *
  • @note unlike av_get_profile_name(), which searches a list of profiles
  • supported by a specific decoder or encoder implementation, this
  • function searches the list of profiles from the AVCodecDescriptor

func AvcodecReceiveFrame

func AvcodecReceiveFrame(avctx *CAVCodecContext, frame *avutil.CAVFrame) int

*

  • Return decoded output data from a decoder or encoder (when the
  • @ref AV_CODEC_FLAG_RECON_FRAME flag is used). *
  • @param avctx codec context
  • @param frame This will be set to a reference-counted video or audio
  • frame (depending on the decoder type) allocated by the
  • codec. Note that the function will always call
  • av_frame_unref(frame) before doing anything else. *
  • @retval 0 success, a frame was returned
  • @retval AVERROR(EAGAIN) output is not available in this state - user must
  • try to send new input
  • @retval AVERROR_EOF the codec has been fully flushed, and there will be
  • no more output frames
  • @retval AVERROR(EINVAL) codec not opened, or it is an encoder without the
  • @ref AV_CODEC_FLAG_RECON_FRAME flag enabled
  • @retval "other negative error code" legitimate decoding errors

func AvcodecReceivePacket

func AvcodecReceivePacket(avctx *CAVCodecContext, avpkt *CAVPacket) int

*

  • Read encoded data from the encoder. *
  • @param avctx codec context
  • @param avpkt This will be set to a reference-counted packet allocated by the
  • encoder. Note that the function will always call
  • av_packet_unref(avpkt) before doing anything else.
  • @retval 0 success
  • @retval AVERROR(EAGAIN) output is not available in the current state - user must
  • try to send input
  • @retval AVERROR_EOF the encoder has been fully flushed, and there will be no
  • more output packets
  • @retval AVERROR(EINVAL) codec not opened, or it is a decoder
  • @retval "another negative error code" legitimate encoding errors

func AvcodecSendFrame

func AvcodecSendFrame(avctx *CAVCodecContext, frame *avutil.CAVFrame) int

*

  • Supply a raw video or audio frame to the encoder. Use avcodec_receive_packet()
  • to retrieve buffered output packets. *
  • @param avctx codec context
  • @param[in] frame AVFrame containing the raw audio or video frame to be encoded.
  • Ownership of the frame remains with the caller, and the
  • encoder will not write to the frame. The encoder may create
  • a reference to the frame data (or copy it if the frame is
  • not reference-counted).
  • It can be NULL, in which case it is considered a flush
  • packet. This signals the end of the stream. If the encoder
  • still has packets buffered, it will return them after this
  • call. Once flushing mode has been entered, additional flush
  • packets are ignored, and sending frames will return
  • AVERROR_EOF. *
  • For audio:
  • If AV_CODEC_CAP_VARIABLE_FRAME_SIZE is set, then each frame
  • can have any number of samples.
  • If it is not set, frame->nb_samples must be equal to
  • avctx->frame_size for all frames except the last.
  • The final frame may be smaller than avctx->frame_size.
  • @retval 0 success
  • @retval 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).
  • @retval AVERROR_EOF the encoder has been flushed, and no new frames can
  • be sent to it
  • @retval AVERROR(EINVAL) codec not opened, it is a decoder, or requires flush
  • @retval AVERROR(ENOMEM) failed to add packet to internal queue, or similar
  • @retval "another negative error code" legitimate encoding errors

func AvcodecSendPacket

func AvcodecSendPacket(avctx *CAVCodecContext, avpkt *CAVPacket) int

*

  • Supply raw packet data as input to a decoder. *
  • Internally, this call will copy relevant AVCodecContext fields, which can
  • influence decoding per-packet, and apply them when the packet is actually
  • decoded. (For example AVCodecContext.skip_frame, which might direct the
  • decoder to drop the frame contained by the packet sent with this function.) *
  • @warning The input buffer, avpkt->data must be AV_INPUT_BUFFER_PADDING_SIZE
  • larger than the actual read bytes because some optimized bitstream
  • readers read 32 or 64 bits at once and could read over the end. *
  • @note The AVCodecContext MUST have been opened with @ref avcodec_open2()
  • before packets may be fed to the decoder. *
  • @param avctx codec context
  • @param[in] avpkt The input AVPacket. Usually, this will be a single video
  • frame, or several complete audio frames.
  • Ownership of the packet remains with the caller, and the
  • decoder will not write to the packet. The decoder may create
  • a reference to the packet data (or copy it if the packet is
  • not reference-counted).
  • Unlike with older APIs, the packet is always fully consumed,
  • and if it contains multiple frames (e.g. some audio codecs),
  • will require you to call avcodec_receive_frame() multiple
  • times afterwards before you can send a new packet.
  • It can be NULL (or an AVPacket with data set to NULL and
  • size set to 0); in this case, it is considered a flush
  • packet, which signals the end of the stream. Sending the
  • first flush packet will return success. Subsequent ones are
  • unnecessary and will return AVERROR_EOF. If the decoder
  • still has frames buffered, it will return them after sending
  • a flush packet. *
  • @retval 0 success
  • @retval 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).
  • @retval 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)
  • @retval AVERROR(EINVAL) codec not opened, it is an encoder, or requires flush
  • @retval AVERROR(ENOMEM) failed to add packet to internal queue, or similar
  • @retval "another negative error code" legitimate decoding errors

func AvcodecString added in v0.0.4

func AvcodecString(buf *ctypes.Char, bufSize int, enc *CAVCodecContext, encode int)

func AvcodecVersion added in v0.0.4

func AvcodecVersion() uint

*

  • Return the LIBAVCODEC_VERSION_INT constant.

func AvsubtitleFree added in v0.0.4

func AvsubtitleFree(sub *CAVSubtitle)

*

  • Free all allocated data in the given subtitle struct. *
  • @param sub AVSubtitle to free.

Types

type CAVAudioServiceType added in v0.0.4

type CAVAudioServiceType C.enum_AVAudioServiceType
const (
	AV_AUDIO_SERVICE_TYPE_MAIN              CAVAudioServiceType = C.AV_AUDIO_SERVICE_TYPE_MAIN
	AV_AUDIO_SERVICE_TYPE_EFFECTS           CAVAudioServiceType = C.AV_AUDIO_SERVICE_TYPE_EFFECTS
	AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED CAVAudioServiceType = C.AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED
	AV_AUDIO_SERVICE_TYPE_HEARING_IMPAIRED  CAVAudioServiceType = C.AV_AUDIO_SERVICE_TYPE_HEARING_IMPAIRED
	AV_AUDIO_SERVICE_TYPE_DIALOGUE          CAVAudioServiceType = C.AV_AUDIO_SERVICE_TYPE_DIALOGUE
	AV_AUDIO_SERVICE_TYPE_COMMENTARY        CAVAudioServiceType = C.AV_AUDIO_SERVICE_TYPE_COMMENTARY
	AV_AUDIO_SERVICE_TYPE_EMERGENCY         CAVAudioServiceType = C.AV_AUDIO_SERVICE_TYPE_EMERGENCY
	AV_AUDIO_SERVICE_TYPE_VOICE_OVER        CAVAudioServiceType = C.AV_AUDIO_SERVICE_TYPE_VOICE_OVER
	AV_AUDIO_SERVICE_TYPE_KARAOKE           CAVAudioServiceType = C.AV_AUDIO_SERVICE_TYPE_KARAOKE
	AV_AUDIO_SERVICE_TYPE_NB                CAVAudioServiceType = C.AV_AUDIO_SERVICE_TYPE_NB ///< Not part of ABI
)

type CAVCPBProperties added in v0.0.4

type CAVCPBProperties = C.AVCPBProperties

*

  • This structure describes the bitrate properties of an encoded bitstream. It
  • roughly corresponds to a subset the VBV parameters for MPEG-2 or HRD
  • parameters for H.264/HEVC.

func AvCpbPropertiesAlloc added in v0.0.4

func AvCpbPropertiesAlloc(size *ctypes.SizeT) *CAVCPBProperties

*

  • Allocate a CPB properties structure and initialize its fields to default
  • values. *
  • @param size if non-NULL, the size of the allocated struct will be written
  • here. This is useful for embedding it in side data. *
  • @return the newly allocated struct or NULL on failure

func (*CAVCPBProperties) GetAvgBitrate added in v0.0.4

func (p *CAVCPBProperties) GetAvgBitrate() int64

*

  • Average bitrate of the stream, in bits per second.
  • Zero if unknown or unspecified.

func (*CAVCPBProperties) GetBufferSize added in v0.0.4

func (p *CAVCPBProperties) GetBufferSize() int64

*

  • The size of the buffer to which the ratecontrol is applied, in bits.
  • Zero if unknown or unspecified.

func (*CAVCPBProperties) GetMaxBitrate added in v0.0.4

func (p *CAVCPBProperties) GetMaxBitrate() int64

*

  • Maximum bitrate of the stream, in bits per second.
  • Zero if unknown or unspecified.

func (*CAVCPBProperties) GetMinBitrate added in v0.0.4

func (p *CAVCPBProperties) GetMinBitrate() int64

*

  • Minimum bitrate of the stream, in bits per second.
  • Zero if unknown or unspecified.

func (*CAVCPBProperties) GetVbvDelay added in v0.0.4

func (p *CAVCPBProperties) GetVbvDelay() uint64

*

  • The delay between the time the packet this structure is associated with
  • is received and the time when it should be decoded, in periods of a 27MHz
  • clock. *
  • UINT64_MAX when unknown or unspecified.

func (*CAVCPBProperties) SetAvgBitrate added in v0.0.4

func (p *CAVCPBProperties) SetAvgBitrate(avgBitrate int64)

*

  • Average bitrate of the stream, in bits per second.
  • Zero if unknown or unspecified.

func (*CAVCPBProperties) SetBufferSize added in v0.0.4

func (p *CAVCPBProperties) SetBufferSize(bufferSize int64)

*

  • The size of the buffer to which the ratecontrol is applied, in bits.
  • Zero if unknown or unspecified.

func (*CAVCPBProperties) SetMaxBitrate added in v0.0.4

func (p *CAVCPBProperties) SetMaxBitrate(maxBitrate int64)

*

  • Maximum bitrate of the stream, in bits per second.
  • Zero if unknown or unspecified.

func (*CAVCPBProperties) SetMinBitrate added in v0.0.4

func (p *CAVCPBProperties) SetMinBitrate(minBitrate int64)

*

  • Minimum bitrate of the stream, in bits per second.
  • Zero if unknown or unspecified.

func (*CAVCPBProperties) SetVbvDelay added in v0.0.4

func (p *CAVCPBProperties) SetVbvDelay(vbvDelay uint64)

*

  • The delay between the time the packet this structure is associated with
  • is received and the time when it should be decoded, in periods of a 27MHz
  • clock. *
  • UINT64_MAX when unknown or unspecified.

type CAVCodec

type CAVCodec C.AVCodec

*

  • AVCodec.

func AvCodecIterate

func AvCodecIterate(opaque *unsafe.Pointer) *CAVCodec

*

  • Iterate over all registered codecs. *
  • @param opaque a pointer where libavcodec will store the iteration state. Must
  • point to NULL to start the iteration. *
  • @return the next registered codec or NULL when the iteration is
  • finished

func AvcodecFindDecoder

func AvcodecFindDecoder(id CAVCodecID) *CAVCodec

*

  • Find a registered decoder with a matching codec ID. *
  • @param id AVCodecID of the requested decoder
  • @return A decoder if one was found, NULL otherwise.

func AvcodecFindDecoderByName

func AvcodecFindDecoderByName(name string) *CAVCodec

*

  • Find a registered decoder with the specified name. *
  • @param name name of the requested decoder
  • @return A decoder if one was found, NULL otherwise.

func AvcodecFindEncoder

func AvcodecFindEncoder(id CAVCodecID) *CAVCodec

*

  • Find a registered encoder with a matching codec ID. *
  • @param id AVCodecID of the requested encoder
  • @return An encoder if one was found, NULL otherwise.

func AvcodecFindEncoderByName

func AvcodecFindEncoderByName(name string) *CAVCodec

*

  • Find a registered encoder with the specified name. *
  • @param name name of the requested encoder
  • @return An encoder if one was found, NULL otherwise.

func (*CAVCodec) GetCapabilities

func (c *CAVCodec) GetCapabilities() int

*

  • Codec capabilities.
  • see AV_CODEC_CAP_*

func (*CAVCodec) GetChLayouts

func (c *CAVCodec) GetChLayouts() *avutil.CAVChannelLayout

*

  • Array of supported channel layouts, terminated with a zeroed layout.

func (*CAVCodec) GetId

func (c *CAVCodec) GetId() CAVCodecID

func (*CAVCodec) GetLongName

func (c *CAVCodec) GetLongName() string

*

  • Descriptive name for the codec, meant to be more human readable than name.
  • You should use the NULL_IF_CONFIG_SMALL() macro to define it.

func (*CAVCodec) GetMaxLowres

func (c *CAVCodec) GetMaxLowres() uint8

/< maximum value for lowres supported by the decoder

func (*CAVCodec) GetName

func (c *CAVCodec) GetName() string

*

  • Name of the codec implementation.
  • The name is globally unique among encoders and among decoders (but an
  • encoder and a decoder can share the same name).
  • This is the primary way to find a codec from the user perspective.

func (*CAVCodec) GetPixFmts

func (c *CAVCodec) GetPixFmts() *avutil.CAVPixelFormat

/< array of supported pixel formats, or NULL if unknown, array is terminated by -1

func (*CAVCodec) GetPrivClass

func (c *CAVCodec) GetPrivClass() *avutil.CAVClass

/< AVClass for the private context

func (*CAVCodec) GetProfiles

func (c *CAVCodec) GetProfiles() *CAVProfile

/< array of recognized profiles, or NULL if unknown, array is terminated by {AV_PROFILE_UNKNOWN}

func (*CAVCodec) GetSampleFmts

func (c *CAVCodec) GetSampleFmts() *avutil.CAVSampleFormat

/< array of supported sample formats, or NULL if unknown, array is terminated by -1

func (*CAVCodec) GetSupportedFramerates

func (c *CAVCodec) GetSupportedFramerates() *avutil.CAVRational

/< array of supported framerates, or NULL if any, array is terminated by {0,0}

func (*CAVCodec) GetSupportedSamplerates

func (c *CAVCodec) GetSupportedSamplerates() *ctypes.Int

/< array of supported audio samplerates, or NULL if unknown, array is terminated by 0

func (*CAVCodec) GetType

func (c *CAVCodec) GetType() avutil.CAVMediaType

func (*CAVCodec) GetWrapperName

func (c *CAVCodec) GetWrapperName() string

*

  • Group name of the codec implementation.
  • This is a short symbolic name of the wrapper backing this codec. A
  • wrapper uses some kind of external implementation for the codec, such
  • as an external library, or a codec implementation provided by the OS or
  • the hardware.
  • If this field is NULL, this is a builtin, libavcodec native codec.
  • If non-NULL, this will be the suffix in AVCodec.name in most cases
  • (usually AVCodec.name will be of the form "<codec_name>_<wrapper_name>").

func (*CAVCodec) SetCapabilities added in v0.0.4

func (c *CAVCodec) SetCapabilities(capabilities int)

*

  • Codec capabilities.
  • see AV_CODEC_CAP_*

func (*CAVCodec) SetId added in v0.0.4

func (c *CAVCodec) SetId(id CAVCodecID)

func (*CAVCodec) SetMaxLowres added in v0.0.4

func (c *CAVCodec) SetMaxLowres(maxLowres uint8)

/< maximum value for lowres supported by the decoder

func (*CAVCodec) SetType added in v0.0.4

func (c *CAVCodec) SetType(_type avutil.CAVMediaType)

type CAVCodecContext

type CAVCodecContext C.AVCodecContext

*

  • main external API structure.
  • New fields can be added to the end with minor version bumps.
  • Removal, reordering and changes to existing fields require a major
  • version bump.
  • 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
  • The AVOption/command line parameter names differ in some cases from the C
  • structure field names for historic reasons or brevity.
  • sizeof(AVCodecContext) must not be used outside libav*.

func AvcodecAllocContext3

func AvcodecAllocContext3(codec *CAVCodec) *CAVCodecContext

*

  • Allocate an AVCodecContext and set its fields to default values. The
  • resulting struct should be freed with avcodec_free_context(). *
  • @param codec if non-NULL, allocate private data and initialize defaults
  • for the given codec. It is illegal to then call avcodec_open2()
  • with a different codec.
  • If NULL, then the codec-specific defaults won't be initialized,
  • which may result in suboptimal default settings (this is
  • important mainly for encoders, e.g. libx264). *
  • @return An AVCodecContext filled with default values or NULL on failure.

func (*CAVCodecContext) GetActiveThreadType added in v0.0.4

func (codecCtx *CAVCodecContext) GetActiveThreadType() int

*

  • Which multithreading methods are in use by the codec.
  • - encoding: Set by libavcodec.
  • - decoding: Set by libavcodec.

func (*CAVCodecContext) GetApplyCropping added in v0.0.4

func (codecCtx *CAVCodecContext) GetApplyCropping() int

*

  • Video decoding only. Certain video codecs support cropping, meaning that
  • only a sub-rectangle of the decoded frame is intended for display. This
  • option controls how cropping is handled by libavcodec. *
  • When set to 1 (the default), libavcodec will apply cropping internally.
  • I.e. it will modify the output frame width/height fields and offset the
  • data pointers (only by as much as possible while preserving alignment, or
  • by the full amount if the AV_CODEC_FLAG_UNALIGNED flag is set) so that
  • the frames output by the decoder refer only to the cropped area. The
  • crop_* fields of the output frames will be zero. *
  • When set to 0, the width/height fields of the output frames will be set
  • to the coded dimensions and the crop_* fields will describe the cropping
  • rectangle. Applying the cropping is left to the caller. *
  • @warning When hardware acceleration with opaque output frames is used,
  • libavcodec is unable to apply cropping from the top/left border. *
  • @note when this option is set to zero, the width/height fields of the
  • AVCodecContext and output AVFrames have different meanings. The codec
  • context fields store display dimensions (with the coded dimensions in
  • coded_width/height), while the frame fields store the coded dimensions
  • (with the display dimensions being determined by the crop_* fields).

func (*CAVCodecContext) GetAudioServiceType added in v0.0.4

func (codecCtx *CAVCodecContext) GetAudioServiceType() CAVAudioServiceType

*

  • Type of service that the audio stream conveys.
  • - encoding: Set by user.
  • - decoding: Set by libavcodec.

func (*CAVCodecContext) GetAvClass

func (codecCtx *CAVCodecContext) GetAvClass() *avutil.CAVClass

*

  • information on struct for av_log
  • - set by avcodec_alloc_context3

func (*CAVCodecContext) GetBQuantFactor added in v0.0.4

func (codecCtx *CAVCodecContext) GetBQuantFactor() float32

* * qscale factor between IP and B-frames * If > 0 then the last P-frame quantizer will be used (q= lastp_q*factor+offset). * If < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset). * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) GetBQuantOffset added in v0.0.4

func (codecCtx *CAVCodecContext) GetBQuantOffset() float32

* * qscale offset between IP and B-frames * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) GetBidirRefine added in v0.0.4

func (codecCtx *CAVCodecContext) GetBidirRefine() int

* * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) GetBitRate

func (codecCtx *CAVCodecContext) GetBitRate() int64

*

  • the average bitrate
  • - encoding: Set by user; unused for constant quantizer encoding.
  • - decoding: Set by user, may be overwritten by libavcodec
  • if this info is available in the stream

func (*CAVCodecContext) GetBitRateTolerance

func (codecCtx *CAVCodecContext) GetBitRateTolerance() int

*

  • number of bits the bitstream is allowed to diverge from the reference.
  • the reference can be CBR (for CBR pass1) or VBR (for pass2)
  • - encoding: Set by user; unused for constant quantizer encoding.
  • - decoding: unused

func (*CAVCodecContext) GetBitsPerCodedSample added in v0.0.4

func (codecCtx *CAVCodecContext) GetBitsPerCodedSample() int

*

  • bits per sample/pixel from the demuxer (needed for huffyuv).
  • - encoding: Set by libavcodec.
  • - decoding: Set by user.

func (*CAVCodecContext) GetBitsPerRawSample added in v0.0.4

func (codecCtx *CAVCodecContext) GetBitsPerRawSample() int

*

  • Bits per sample/pixel of internal libavcodec pixel/sample format.
  • - encoding: set by user.
  • - decoding: set by libavcodec.

func (*CAVCodecContext) GetBlockAlign added in v0.0.4

func (codecCtx *CAVCodecContext) GetBlockAlign() int

*

  • number of bytes per packet if constant and known or 0
  • Used by some WAV based audio codecs.

func (*CAVCodecContext) GetChLayout

func (codecCtx *CAVCodecContext) GetChLayout() avutil.CAVChannelLayout

*

  • Audio channel layout.
  • - encoding: must be set by the caller, to one of AVCodec.ch_layouts.
  • - decoding: may be set by the caller if known e.g. from the container.
  • The decoder can then override during decoding as needed.

func (*CAVCodecContext) GetChLayoutPtr

func (codecCtx *CAVCodecContext) GetChLayoutPtr() *avutil.CAVChannelLayout

*

  • Audio channel layout.
  • - encoding: must be set by the caller, to one of AVCodec.ch_layouts.
  • - decoding: may be set by the caller if known e.g. from the container.
  • The decoder can then override during decoding as needed.

func (*CAVCodecContext) GetChromaIntraMatrix added in v0.0.4

func (codecCtx *CAVCodecContext) GetChromaIntraMatrix() *ctypes.UInt16

*

  • custom intra quantization matrix
  • - encoding: Set by user, can be NULL.
  • - decoding: unused.

func (*CAVCodecContext) GetCodec

func (codecCtx *CAVCodecContext) GetCodec() *CAVCodec

func (*CAVCodecContext) GetCodecDescriptor added in v0.0.4

func (codecCtx *CAVCodecContext) GetCodecDescriptor() *CAVCodecDescriptor

*

  • AVCodecDescriptor
  • - encoding: unused.
  • - decoding: set by libavcodec.

func (*CAVCodecContext) GetCodecId

func (codecCtx *CAVCodecContext) GetCodecId() CAVCodecID

see AV_CODEC_ID_xxx

func (*CAVCodecContext) GetCodecTag

func (codecCtx *CAVCodecContext) GetCodecTag() uint

*

  • fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
  • This is used to work around some encoder bugs.
  • A demuxer should set this to what is stored in the field used to identify the codec.
  • If there are multiple such fields in a container then the demuxer should choose the one
  • which maximizes the information about the used codec.
  • If the codec tag field in a container is larger than 32 bits then the demuxer should
  • remap the longer ID to 32 bits with a table or other structure. Alternatively a new
  • extra_codec_tag + size could be added but for this a clear advantage must be demonstrated
  • first.
  • - encoding: Set by user, if not then the default based on codec_id will be used.
  • - decoding: Set by user, will be converted to uppercase by libavcodec during init.

func (*CAVCodecContext) GetCodecType

func (codecCtx *CAVCodecContext) GetCodecType() avutil.CAVMediaType

see AVMEDIA_TYPE_xxx

func (*CAVCodecContext) GetCodecWhitelist added in v0.0.4

func (codecCtx *CAVCodecContext) GetCodecWhitelist() string

*

  • ',' separated list of allowed decoders.
  • If NULL then all are allowed
  • - encoding: unused
  • - decoding: set by user

func (*CAVCodecContext) GetCodedHeight

func (codecCtx *CAVCodecContext) GetCodedHeight() int

*

  • Bitstream width / height, may be different from width/height e.g. when
  • the decoded frame is cropped before being output or lowres is enabled. *
  • @note Those field may not match the value of the last
  • AVFrame output by avcodec_receive_frame() due frame
  • reordering. *
  • - encoding: unused
  • - decoding: May be set by the user before opening the decoder if known
  • e.g. from the container. During decoding, the decoder may
  • overwrite those values as required while parsing the data.

func (*CAVCodecContext) GetCodedSideData added in v0.0.4

func (codecCtx *CAVCodecContext) GetCodedSideData() *CAVPacketSideData

*

  • Additional data associated with the entire coded stream. *
  • - decoding: may be set by user before calling avcodec_open2().
  • - encoding: may be set by libavcodec after avcodec_open2().

func (*CAVCodecContext) GetCodedWidth

func (codecCtx *CAVCodecContext) GetCodedWidth() int

*

  • Bitstream width / height, may be different from width/height e.g. when
  • the decoded frame is cropped before being output or lowres is enabled. *
  • @note Those field may not match the value of the last
  • AVFrame output by avcodec_receive_frame() due frame
  • reordering. *
  • - encoding: unused
  • - decoding: May be set by the user before opening the decoder if known
  • e.g. from the container. During decoding, the decoder may
  • overwrite those values as required while parsing the data.

func (*CAVCodecContext) GetColorPrimaries added in v0.0.4

func (codecCtx *CAVCodecContext) GetColorPrimaries() avutil.CAVColorPrimaries

* * Chromaticity coordinates of the source primaries. * - encoding: Set by user * - decoding: Set by libavcodec

func (*CAVCodecContext) GetColorRange added in v0.0.4

func (codecCtx *CAVCodecContext) GetColorRange() avutil.CAVColorRange

* * MPEG vs JPEG YUV range. * - encoding: Set by user to override the default output color range value, * If not specified, libavcodec sets the color range depending on the * output format. * - decoding: Set by libavcodec, can be set by the user to propagate the * color range to components reading from the decoder context.

func (*CAVCodecContext) GetColorTrc added in v0.0.4

func (codecCtx *CAVCodecContext) GetColorTrc() avutil.CAVColorTransferCharacteristic

* * Color Transfer Characteristic. * - encoding: Set by user * - decoding: Set by libavcodec

func (*CAVCodecContext) GetColorspace added in v0.0.4

func (codecCtx *CAVCodecContext) GetColorspace() avutil.CAVColorSpace

* * YUV colorspace type. * - encoding: Set by user * - decoding: Set by libavcodec

func (*CAVCodecContext) GetCompressionLevel

func (codecCtx *CAVCodecContext) GetCompressionLevel() int

*

  • - encoding: Set by user.
  • - decoding: unused

func (*CAVCodecContext) GetCutoff added in v0.0.4

func (codecCtx *CAVCodecContext) GetCutoff() int

*

  • Audio cutoff bandwidth (0 means "automatic")
  • - encoding: Set by user.
  • - decoding: unused

func (*CAVCodecContext) GetDarkMasking added in v0.0.4

func (codecCtx *CAVCodecContext) GetDarkMasking() float32

* * darkness masking (0-> disabled) * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) GetDctAlgo added in v0.0.4

func (codecCtx *CAVCodecContext) GetDctAlgo() int

*

  • DCT algorithm, see FF_DCT_* below
  • - encoding: Set by user.
  • - decoding: unused

func (*CAVCodecContext) GetDebug added in v0.0.4

func (codecCtx *CAVCodecContext) GetDebug() int

*

  • debug
  • - encoding: Set by user.
  • - decoding: Set by user.

func (*CAVCodecContext) GetDelay

func (codecCtx *CAVCodecContext) GetDelay() int

*

  • Codec delay. *
  • Encoding: Number of frames delay there will be from the encoder input to
  • the decoder output. (we assume the decoder matches the spec)
  • Decoding: Number of frames delay in addition to what a standard decoder
  • as specified in the spec would produce. *
  • Video:
  • Number of frames the decoded output will be delayed relative to the
  • encoded input. *
  • Audio:
  • For encoding, this field is unused (see initial_padding). *
  • For decoding, this is the number of samples the decoder needs to
  • output before the decoder's output is valid. When seeking, you should
  • start decoding this many samples prior to your desired seek point. *
  • - encoding: Set by libavcodec.
  • - decoding: Set by libavcodec.

func (*CAVCodecContext) GetDiaSize added in v0.0.4

func (codecCtx *CAVCodecContext) GetDiaSize() int

* * ME diamond size & shape * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) GetDiscardDamagedPercentage added in v0.0.4

func (codecCtx *CAVCodecContext) GetDiscardDamagedPercentage() int

*

  • The percentage of damaged samples to discard a frame. *
  • - decoding: set by user
  • - encoding: unused

func (*CAVCodecContext) GetDrawHorizBand added in v0.0.4

func (codecCtx *CAVCodecContext) GetDrawHorizBand() ctypes.CFunc

*

  • If non NULL, 'draw_horiz_band' is called by the libavcodec

  • decoder to draw a horizontal band. It improves cache usage. Not

  • all codecs can do that. You must check the codec capabilities

  • beforehand.

  • When multithreading is used, it may be called from multiple threads

  • at the same time; threads might draw different parts of the same AVFrame,

  • or multiple AVFrames, and there is no guarantee that slices will be drawn

  • in order.

  • The function is also used by hardware acceleration APIs.

  • It is called at least once during frame decoding to pass

  • the data needed for hardware render.

  • In that mode instead of pixel data, AVFrame points to

  • a structure specific to the acceleration API. The application

  • reads the structure and can change some fields to indicate progress

  • or mark state.

  • - encoding: unused

  • - decoding: Set by user.

  • @param height the height of the slice

  • @param y the y position of the slice

  • @param type 1->top field, 2->bottom field, 3->frame

  • @param offset offset into the AVFrame.data from which the slice should be read

    void (*draw_horiz_band)(struct AVCodecContext *s, const AVFrame *src, int offset[AV_NUM_DATA_POINTERS], int y, int type, int height);

func (*CAVCodecContext) GetDumpSeparator added in v0.0.4

func (codecCtx *CAVCodecContext) GetDumpSeparator() string

*

  • dump format separator.
  • can be ", " or "\n " or anything else
  • - encoding: Set by user.
  • - decoding: Set by user.

func (*CAVCodecContext) GetErrRecognition added in v0.0.4

func (codecCtx *CAVCodecContext) GetErrRecognition() int

*

  • Error recognition; may misdetect some more or less valid parts as errors.
  • This is a bitfield of the AV_EF_* values defined in defs.h. *
  • - encoding: Set by user.
  • - decoding: Set by user.

func (*CAVCodecContext) GetError added in v0.0.4

*

  • error
  • - encoding: Set by libavcodec if flags & AV_CODEC_FLAG_PSNR.
  • - decoding: unused

func (*CAVCodecContext) GetErrorConcealment added in v0.0.4

func (codecCtx *CAVCodecContext) GetErrorConcealment() int

*

  • error concealment flags
  • - encoding: unused
  • - decoding: Set by user.

func (*CAVCodecContext) GetExecute added in v0.0.4

func (codecCtx *CAVCodecContext) GetExecute() ctypes.CFunc

*

  • The codec may call this to execute several independent things.
  • It will return only after finishing all tasks.
  • The user may replace this with some multithreaded implementation,
  • the default implementation will execute the parts serially.
  • @param count the number of things to execute
  • - encoding: Set by libavcodec, user can override.
  • - decoding: Set by libavcodec, user can override.

int (*execute)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg), void *arg2, int *ret, int count, int size);

func (*CAVCodecContext) GetExecute2 added in v0.0.4

func (codecCtx *CAVCodecContext) GetExecute2() ctypes.CFunc

*

  • The codec may call this to execute several independent things.
  • It will return only after finishing all tasks.
  • The user may replace this with some multithreaded implementation,
  • the default implementation will execute the parts serially.
  • @param c context passed also to func
  • @param count the number of things to execute
  • @param arg2 argument passed unchanged to func
  • @param ret return values of executed functions, must have space for "count" values. May be NULL.
  • @param func function that will be called count times, with jobnr from 0 to count-1.
  • threadnr will be in the range 0 to c->thread_count-1 < MAX_THREADS and so that no
  • two instances of func executing at the same time will have the same threadnr.
  • @return always 0 currently, but code should handle a future improvement where when any call to func
  • returns < 0 no further calls to func may be done and < 0 is returned.
  • - encoding: Set by libavcodec, user can override.
  • - decoding: Set by libavcodec, user can override.

int (*execute2)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count);

func (*CAVCodecContext) GetExportSideData added in v0.0.4

func (codecCtx *CAVCodecContext) GetExportSideData() int

*

  • Bit set of AV_CODEC_EXPORT_DATA_* flags, which affects the kind of
  • metadata exported in frame, packet, or coded stream side data by
  • decoders and encoders. *
  • - decoding: set by user
  • - encoding: set by user

func (*CAVCodecContext) GetExtraHwFrames added in v0.0.4

func (codecCtx *CAVCodecContext) GetExtraHwFrames() int

* Video decoding only. Sets the number of extra hardware frames which * the decoder will allocate for use by the caller. This must be set * before avcodec_open2() is called. * * Some hardware decoders require all frames that they will use for * output to be defined in advance before decoding starts. For such * decoders, the hardware frame pool must therefore be of a fixed size. * The extra frames set here are on top of any number that the decoder * needs internally in order to operate normally (for example, frames * used as reference pictures).

func (*CAVCodecContext) GetExtradata

func (codecCtx *CAVCodecContext) GetExtradata() unsafe.Pointer

*

  • some codecs need / can use extradata like Huffman tables.
  • MJPEG: Huffman tables
  • rv10: additional flags
  • MPEG-4: global headers (they can be in the bitstream or here)
  • The allocated memory should be AV_INPUT_BUFFER_PADDING_SIZE bytes larger
  • than extradata_size to avoid problems if it is read with the bitstream reader.
  • The bytewise contents of extradata must not depend on the architecture or CPU endianness.
  • Must be allocated with the av_malloc() family of functions.
  • - encoding: Set/allocated/freed by libavcodec.
  • - decoding: Set/allocated/freed by user.

func (*CAVCodecContext) GetExtradataSize

func (codecCtx *CAVCodecContext) GetExtradataSize() int

func (*CAVCodecContext) GetFieldOrder

func (codecCtx *CAVCodecContext) GetFieldOrder() CAVFieldOrder

* Field order

  • - encoding: set by libavcodec
  • - decoding: Set by user.

func (*CAVCodecContext) GetFlags

func (codecCtx *CAVCodecContext) GetFlags() int

*

  • AV_CODEC_FLAG_*.
  • - encoding: Set by user.
  • - decoding: Set by user.

func (*CAVCodecContext) GetFlags2

func (codecCtx *CAVCodecContext) GetFlags2() int

*

  • AV_CODEC_FLAG2_*
  • - encoding: Set by user.
  • - decoding: Set by user.

func (*CAVCodecContext) GetFrameNum

func (codecCtx *CAVCodecContext) GetFrameNum() int64

*

  • Frame counter, set by libavcodec. *
  • - decoding: total number of frames returned from the decoder so far.
  • - encoding: total number of frames passed to the encoder so far. *
  • @note the counter is not incremented if encoding/decoding resulted in
  • an error.

func (*CAVCodecContext) GetFrameSize

func (codecCtx *CAVCodecContext) GetFrameSize() int

*

  • Number of samples per channel in an audio frame. *
  • - encoding: set by libavcodec in avcodec_open2(). Each submitted frame
  • except the last must contain exactly frame_size samples per channel.
  • May be 0 when the codec has AV_CODEC_CAP_VARIABLE_FRAME_SIZE set, then the
  • frame size is not restricted.
  • - decoding: may be set by some decoders to indicate constant frame size

func (*CAVCodecContext) GetFramerate added in v0.0.4

func (codecCtx *CAVCodecContext) GetFramerate() avutil.CAVRational

*

  • - decoding: For codecs that store a framerate value in the compressed
  • bitstream, the decoder may export it here. { 0, 1} when
  • unknown.
  • - encoding: May be used to signal the framerate of CFR content to an
  • encoder.

func (*CAVCodecContext) GetGetBuffer2 added in v0.0.4

func (codecCtx *CAVCodecContext) GetGetBuffer2() ctypes.CFunc

*

  • This callback is called at the beginning of each frame to get data
  • buffer(s) for it. There may be one contiguous buffer for all the data or
  • there may be a buffer per each data plane or anything in between. What
  • this means is, you may set however many entries in buf[] you feel necessary.
  • Each buffer must be reference-counted using the AVBuffer API (see description
  • of buf[] below). *
  • The following fields will be set in the frame before this callback is
  • called:
  • - format
  • - width, height (video only)
  • - sample_rate, channel_layout, nb_samples (audio only)
  • Their values may differ from the corresponding values in
  • AVCodecContext. This callback must use the frame values, not the codec
  • context values, to calculate the required buffer size. *
  • This callback must fill the following fields in the frame:
  • - data[]
  • - linesize[]
  • - extended_data:
  • * if the data is planar audio with more than 8 channels, then this
  • callback must allocate and fill extended_data to contain all pointers
  • to all data planes. data[] must hold as many pointers as it can.
  • extended_data must be allocated with av_malloc() and will be freed in
  • av_frame_unref().
  • * otherwise extended_data must point to data
  • - buf[] must contain one or more pointers to AVBufferRef structures. Each of
  • the frame's data and extended_data pointers must be contained in these. That
  • is, one AVBufferRef for each allocated chunk of memory, not necessarily one
  • AVBufferRef per data[] entry. See: av_buffer_create(), av_buffer_alloc(),
  • and av_buffer_ref().
  • - extended_buf and nb_extended_buf must be allocated with av_malloc() by
  • this callback and filled with the extra buffers if there are more
  • buffers than buf[] can hold. extended_buf will be freed in
  • av_frame_unref(). *
  • If AV_CODEC_CAP_DR1 is not set then get_buffer2() must call
  • avcodec_default_get_buffer2() instead of providing buffers allocated by
  • some other means. *
  • Each data plane must be aligned to the maximum required by the target
  • CPU. *
  • @see avcodec_default_get_buffer2() *
  • Video: *
  • If AV_GET_BUFFER_FLAG_REF is set in flags then the frame may be reused
  • (read and/or written to if it is writable) later by libavcodec. *
  • avcodec_align_dimensions2() should be used to find the required width and
  • height, as they normally need to be rounded up to the next multiple of 16. *
  • Some decoders do not support linesizes changing between frames. *
  • If frame multithreading is used, this callback may be called from a
  • different thread, but not from more than one at once. Does not need to be
  • reentrant. *
  • @see avcodec_align_dimensions2() *
  • Audio: *
  • Decoders request a buffer of a particular size by setting
  • AVFrame.nb_samples prior to calling get_buffer2(). The decoder may,
  • however, utilize only part of the buffer by setting AVFrame.nb_samples
  • to a smaller value in the output frame. *
  • As a convenience, av_samples_get_buffer_size() and
  • av_samples_fill_arrays() in libavutil may be used by custom get_buffer2()
  • functions to find the required data size and to fill data pointers and
  • linesize. In AVFrame.linesize, only linesize[0] may be set for audio
  • since all planes must be the same size. *
  • @see av_samples_get_buffer_size(), av_samples_fill_arrays() *
  • - encoding: unused
  • - decoding: Set by libavcodec, user can override.

int (*get_buffer2)(struct AVCodecContext *s, AVFrame *frame, int flags);

func (*CAVCodecContext) GetGetEncodeBuffer added in v0.0.4

func (codecCtx *CAVCodecContext) GetGetEncodeBuffer() ctypes.CFunc

*

  • This callback is called at the beginning of each packet to get a data
  • buffer for it. *
  • The following field will be set in the packet before this callback is
  • called:
  • - size
  • This callback must use the above value to calculate the required buffer size,
  • which must padded by at least AV_INPUT_BUFFER_PADDING_SIZE bytes. *
  • In some specific cases, the encoder may not use the entire buffer allocated by this
  • callback. This will be reflected in the size value in the packet once returned by
  • avcodec_receive_packet(). *
  • This callback must fill the following fields in the packet:
  • - data: alignment requirements for AVPacket apply, if any. Some architectures and
  • encoders may benefit from having aligned data.
  • - buf: must contain a pointer to an AVBufferRef structure. The packet's
  • data pointer must be contained in it. See: av_buffer_create(), av_buffer_alloc(),
  • and av_buffer_ref(). *
  • If AV_CODEC_CAP_DR1 is not set then get_encode_buffer() must call
  • avcodec_default_get_encode_buffer() instead of providing a buffer allocated by
  • some other means. *
  • The flags field may contain a combination of AV_GET_ENCODE_BUFFER_FLAG_ flags.
  • They may be used for example to hint what use the buffer may get after being
  • created.
  • Implementations of this callback may ignore flags they don't understand.
  • If AV_GET_ENCODE_BUFFER_FLAG_REF is set in flags then the packet may be reused
  • (read and/or written to if it is writable) later by libavcodec. *
  • This callback must be thread-safe, as when frame threading is used, it may
  • be called from multiple threads simultaneously. *
  • @see avcodec_default_get_encode_buffer() *
  • - encoding: Set by libavcodec, user can override.
  • - decoding: unused

int (*get_encode_buffer)(struct AVCodecContext *s, AVPacket *pkt, int flags);

func (*CAVCodecContext) GetGetFormat added in v0.0.4

func (codecCtx *CAVCodecContext) GetGetFormat() ctypes.CFunc

* * Callback to negotiate the pixel format. Decoding only, may be set by the * caller before avcodec_open2(). * * Called by some decoders to select the pixel format that will be used for * the output frames. This is mainly used to set up hardware acceleration, * then the provided format list contains the corresponding hwaccel pixel * formats alongside the "software" one. The software pixel format may also * be retrieved from \ref sw_pix_fmt. * * This callback will be called when the coded frame properties (such as * resolution, pixel format, etc.) change and more than one output format is * supported for those new properties. If a hardware pixel format is chosen * and initialization for it fails, the callback may be called again * immediately. * * This callback may be called from different threads if the decoder is * multi-threaded, but not from more than one thread simultaneously. * * @param fmt list of formats which may be used in the current * configuration, terminated by AV_PIX_FMT_NONE. * @warning Behavior is undefined if the callback returns a value other * than one of the formats in fmt or AV_PIX_FMT_NONE. * @return the chosen format or AV_PIX_FMT_NONE

enum AVPixelFormat (*get_format)(struct AVCodecContext *s, const enum AVPixelFormat * fmt);

func (*CAVCodecContext) GetGlobalQuality

func (codecCtx *CAVCodecContext) GetGlobalQuality() int

*

  • Global quality for codecs which cannot change it per frame.
  • This should be proportional to MPEG-1/2/4 qscale.
  • - encoding: Set by user.
  • - decoding: unused

func (*CAVCodecContext) GetGopSize

func (codecCtx *CAVCodecContext) GetGopSize() int

*

  • the number of pictures in a group of pictures, or 0 for intra_only
  • - encoding: Set by user.
  • - decoding: unused

func (*CAVCodecContext) GetHasBFrames added in v0.0.4

func (codecCtx *CAVCodecContext) GetHasBFrames() int

* * Size of the frame reordering buffer in the decoder. * For MPEG-2 it is 1 IPB or 0 low delay IP. * - encoding: Set by libavcodec. * - decoding: Set by libavcodec.

func (*CAVCodecContext) GetHeight

func (codecCtx *CAVCodecContext) GetHeight() int

*

  • picture width / height. *
  • @note Those fields may not match the values of the last
  • AVFrame output by avcodec_receive_frame() due frame
  • reordering. *
  • - encoding: MUST be set by user.
  • - decoding: May be set by the user before opening the decoder if known e.g.
  • from the container. Some decoders will require the dimensions
  • to be set by the caller. During decoding, the decoder may
  • overwrite those values as required while parsing the data.

func (*CAVCodecContext) GetHwDeviceCtx added in v0.0.4

func (codecCtx *CAVCodecContext) GetHwDeviceCtx() *avutil.CAVBufferRef

*

  • 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.

func (*CAVCodecContext) GetHwFramesCtx added in v0.0.4

func (codecCtx *CAVCodecContext) GetHwFramesCtx() *avutil.CAVBufferRef

*

  • 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. *
  • - 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. *
  • 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.

func (*CAVCodecContext) GetHwaccel added in v0.0.4

func (codecCtx *CAVCodecContext) GetHwaccel() *CAVHWAccel

*

  • Hardware accelerator in use
  • - encoding: unused.
  • - decoding: Set by libavcodec

func (*CAVCodecContext) GetHwaccelContext added in v0.0.4

func (codecCtx *CAVCodecContext) GetHwaccelContext() unsafe.Pointer

*

  • Legacy hardware accelerator context. *
  • For some hardware acceleration methods, the caller may use this field to
  • signal hwaccel-specific data to the codec. The struct pointed to by this
  • pointer is hwaccel-dependent and defined in the respective header. Please
  • refer to the FFmpeg HW accelerator documentation to know how to fill
  • this. *
  • In most cases this field is optional - the necessary information may also
  • be provided to libavcodec through @ref hw_frames_ctx or @ref
  • hw_device_ctx (see avcodec_get_hw_config()). However, in some cases it
  • may be the only method of signalling some (optional) information. *
  • The struct and its contents are owned by the caller. *
  • - encoding: May be set by the caller before avcodec_open2(). Must remain
  • valid until avcodec_free_context().
  • - decoding: May be set by the caller in the get_format() callback.
  • Must remain valid until the next get_format() call,
  • or avcodec_free_context() (whichever comes first).

func (*CAVCodecContext) GetHwaccelFlags added in v0.0.4

func (codecCtx *CAVCodecContext) GetHwaccelFlags() int

*

  • 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)

func (*CAVCodecContext) GetIQuantFactor added in v0.0.4

func (codecCtx *CAVCodecContext) GetIQuantFactor() float32

* * qscale factor between P- and I-frames * If > 0 then the last P-frame quantizer will be used (q = lastp_q * factor + offset). * If < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset). * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) GetIQuantOffset added in v0.0.4

func (codecCtx *CAVCodecContext) GetIQuantOffset() float32

* * qscale offset between P and I-frames * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) GetIdctAlgo added in v0.0.4

func (codecCtx *CAVCodecContext) GetIdctAlgo() int

*

  • IDCT algorithm, see FF_IDCT_* below.
  • - encoding: Set by user.
  • - decoding: Set by user.

func (*CAVCodecContext) GetIldctCmp added in v0.0.4

func (codecCtx *CAVCodecContext) GetIldctCmp() int

* * interlaced DCT comparison function * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) GetInitialPadding added in v0.0.4

func (codecCtx *CAVCodecContext) GetInitialPadding() int

*

  • Audio only. The number of "priming" samples (padding) inserted by the
  • encoder at the beginning of the audio. I.e. this number of leading
  • decoded samples must be discarded by the caller to get the original audio
  • without leading padding. *
  • - decoding: unused
  • - encoding: Set by libavcodec. The timestamps on the output packets are
  • adjusted by the encoder so that they always refer to the
  • first sample of the data actually contained in the packet,
  • including any added padding. E.g. if the timebase is
  • 1/samplerate and the timestamp of the first input sample is
  • 0, the timestamp of the first output packet will be
  • -initial_padding.

func (*CAVCodecContext) GetInterMatrix added in v0.0.4

func (codecCtx *CAVCodecContext) GetInterMatrix() *ctypes.UInt16

* * custom inter quantization matrix * Must be allocated with the av_malloc() family of functions, and will be freed in * avcodec_free_context(). * - encoding: Set/allocated by user, freed by libavcodec. Can be NULL. * - decoding: Set/allocated/freed by libavcodec.

func (*CAVCodecContext) GetInternal

func (codecCtx *CAVCodecContext) GetInternal() *C.struct_AVCodecInternal

*

  • Private context used for internal data. *
  • Unlike priv_data, this is not codec-specific. It is used in general
  • libavcodec functions.

func (*CAVCodecContext) GetIntraDcPrecision added in v0.0.4

func (codecCtx *CAVCodecContext) GetIntraDcPrecision() int

* * precision of the intra DC coefficient - 8 * - encoding: Set by user. * - decoding: Set by libavcodec

func (*CAVCodecContext) GetIntraMatrix added in v0.0.4

func (codecCtx *CAVCodecContext) GetIntraMatrix() *ctypes.UInt16

* * custom intra quantization matrix * Must be allocated with the av_malloc() family of functions, and will be freed in * avcodec_free_context(). * - encoding: Set/allocated by user, freed by libavcodec. Can be NULL. * - decoding: Set/allocated/freed by libavcodec.

func (*CAVCodecContext) GetKeyintMin added in v0.0.4

func (codecCtx *CAVCodecContext) GetKeyintMin() int

* * minimum GOP size * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) GetLastPredictorCount added in v0.0.4

func (codecCtx *CAVCodecContext) GetLastPredictorCount() int

* * amount of previous MV predictors (2a+1 x 2a+1 square) * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) GetLevel added in v0.0.4

func (codecCtx *CAVCodecContext) GetLevel() int

*

  • Encoding level descriptor.
  • - encoding: Set by user, corresponds to a specific level defined by the
  • codec, usually corresponding to the profile level, if not specified it
  • is set to FF_LEVEL_UNKNOWN.
  • - decoding: Set by libavcodec.
  • See AV_LEVEL_* in defs.h.

func (*CAVCodecContext) GetLogLevelOffset

func (codecCtx *CAVCodecContext) GetLogLevelOffset() int

func (*CAVCodecContext) GetLowres added in v0.0.4

func (codecCtx *CAVCodecContext) GetLowres() int

*

  • low resolution decoding, 1-> 1/2 size, 2->1/4 size
  • - encoding: unused
  • - decoding: Set by user.

func (*CAVCodecContext) GetLumiMasking added in v0.0.4

func (codecCtx *CAVCodecContext) GetLumiMasking() float32

* * luminance masking (0-> disabled) * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) GetMaxBFrames

func (codecCtx *CAVCodecContext) GetMaxBFrames() int

* * maximum number of B-frames between non-B-frames * Note: The output will be delayed by max_b_frames+1 relative to the input. * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) GetMaxPixels added in v0.0.4

func (codecCtx *CAVCodecContext) GetMaxPixels() int64

*

  • The number of pixels per image to maximally accept. *
  • - decoding: set by user
  • - encoding: set by user

func (*CAVCodecContext) GetMaxQdiff added in v0.0.4

func (codecCtx *CAVCodecContext) GetMaxQdiff() int

*

  • maximum quantizer difference between frames
  • - encoding: Set by user.
  • - decoding: unused

func (*CAVCodecContext) GetMaxSamples added in v0.0.4

func (codecCtx *CAVCodecContext) GetMaxSamples() int64

*

  • The number of samples per frame to maximally accept. *
  • - decoding: set by user
  • - encoding: set by user

func (*CAVCodecContext) GetMbCmp added in v0.0.4

func (codecCtx *CAVCodecContext) GetMbCmp() int

* * macroblock comparison function (not supported yet) * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) GetMbDecision

func (codecCtx *CAVCodecContext) GetMbDecision() int

* * macroblock decision mode * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) GetMbLmax added in v0.0.4

func (codecCtx *CAVCodecContext) GetMbLmax() int

* * maximum MB Lagrange multiplier * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) GetMbLmin added in v0.0.4

func (codecCtx *CAVCodecContext) GetMbLmin() int

* * minimum MB Lagrange multiplier * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) GetMeCmp added in v0.0.4

func (codecCtx *CAVCodecContext) GetMeCmp() int

* * motion estimation comparison function * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) GetMePreCmp added in v0.0.4

func (codecCtx *CAVCodecContext) GetMePreCmp() int

* * motion estimation prepass comparison function * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) GetMeRange added in v0.0.4

func (codecCtx *CAVCodecContext) GetMeRange() int

* * maximum motion estimation search range in subpel units * If 0 then no limit. * * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) GetMeSubCmp added in v0.0.4

func (codecCtx *CAVCodecContext) GetMeSubCmp() int

* * subpixel motion estimation comparison function * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) GetMeSubpelQuality added in v0.0.4

func (codecCtx *CAVCodecContext) GetMeSubpelQuality() int

* * subpel ME quality * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) GetMv0Threshold added in v0.0.4

func (codecCtx *CAVCodecContext) GetMv0Threshold() int

* * Note: Value depends upon the compare function used for fullpel ME. * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) GetNbCodedSideData added in v0.0.4

func (codecCtx *CAVCodecContext) GetNbCodedSideData() int

func (*CAVCodecContext) GetNsseWeight added in v0.0.4

func (codecCtx *CAVCodecContext) GetNsseWeight() int

*

  • noise vs. sse weight for the nsse comparison function
  • - encoding: Set by user.
  • - decoding: unused

func (*CAVCodecContext) GetOpaque

func (codecCtx *CAVCodecContext) GetOpaque() unsafe.Pointer

*

  • Private data of the user, can be used to carry app specific stuff.
  • - encoding: Set by user.
  • - decoding: Set by user.

func (*CAVCodecContext) GetPMasking added in v0.0.4

func (codecCtx *CAVCodecContext) GetPMasking() float32

* * p block masking (0-> disabled) * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) GetPixFmt

func (codecCtx *CAVCodecContext) GetPixFmt() avutil.CAVPixelFormat

*

  • Pixel format, see AV_PIX_FMT_xxx.
  • May be set by the demuxer if known from headers.
  • May be overridden by the decoder if it knows better. *
  • @note This field may not match the value of the last
  • AVFrame output by avcodec_receive_frame() due frame
  • reordering. *
  • - encoding: Set by user.
  • - decoding: Set by user if known, overridden by libavcodec while
  • parsing the data.

func (*CAVCodecContext) GetPktTimebase added in v0.0.4

func (codecCtx *CAVCodecContext) GetPktTimebase() avutil.CAVRational

*

  • Timebase in which pkt_dts/pts and AVPacket.dts/pts are expressed.
  • - encoding: unused.
  • - decoding: set by user.

func (*CAVCodecContext) GetPreDiaSize added in v0.0.4

func (codecCtx *CAVCodecContext) GetPreDiaSize() int

* * ME prepass diamond size & shape * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) GetPrivData

func (codecCtx *CAVCodecContext) GetPrivData() unsafe.Pointer

func (*CAVCodecContext) GetProfile added in v0.0.4

func (codecCtx *CAVCodecContext) GetProfile() int

*

  • profile
  • - encoding: Set by user.
  • - decoding: Set by libavcodec.
  • See the AV_PROFILE_* defines in defs.h.

func (*CAVCodecContext) GetProperties added in v0.0.4

func (codecCtx *CAVCodecContext) GetProperties() uint

*

  • Properties of the stream that gets decoded
  • - encoding: unused
  • - decoding: set by libavcodec

func (*CAVCodecContext) GetPtsCorrectionLastDts added in v0.0.4

func (codecCtx *CAVCodecContext) GetPtsCorrectionLastDts() int64

/ DTS of the last frame

func (*CAVCodecContext) GetPtsCorrectionLastPts added in v0.0.4

func (codecCtx *CAVCodecContext) GetPtsCorrectionLastPts() int64

/ PTS of the last frame

func (*CAVCodecContext) GetPtsCorrectionNumFaultyDts added in v0.0.4

func (codecCtx *CAVCodecContext) GetPtsCorrectionNumFaultyDts() int64

/ Number of incorrect DTS values so far

func (*CAVCodecContext) GetPtsCorrectionNumFaultyPts added in v0.0.4

func (codecCtx *CAVCodecContext) GetPtsCorrectionNumFaultyPts() int64

/ Number of incorrect PTS values so far

func (*CAVCodecContext) GetQblur added in v0.0.4

func (codecCtx *CAVCodecContext) GetQblur() float32

/< amount of qscale smoothing over time (0.0-1.0)

func (*CAVCodecContext) GetQcompress added in v0.0.4

func (codecCtx *CAVCodecContext) GetQcompress() float32

/< amount of qscale change between easy & hard scenes (0.0-1.0)

func (*CAVCodecContext) GetQmax added in v0.0.4

func (codecCtx *CAVCodecContext) GetQmax() int

*

  • maximum quantizer
  • - encoding: Set by user.
  • - decoding: unused

func (*CAVCodecContext) GetQmin added in v0.0.4

func (codecCtx *CAVCodecContext) GetQmin() int

*

  • minimum quantizer
  • - encoding: Set by user.
  • - decoding: unused

func (*CAVCodecContext) GetRcBufferSize added in v0.0.4

func (codecCtx *CAVCodecContext) GetRcBufferSize() int

*

  • decoder bitstream buffer size
  • - encoding: Set by user.
  • - decoding: May be set by libavcodec.

func (*CAVCodecContext) GetRcInitialBufferOccupancy added in v0.0.4

func (codecCtx *CAVCodecContext) GetRcInitialBufferOccupancy() int

*

  • Number of bits which should be loaded into the rc buffer before decoding starts.
  • - encoding: Set by user.
  • - decoding: unused

func (*CAVCodecContext) GetRcMaxAvailableVbvUse added in v0.0.4

func (codecCtx *CAVCodecContext) GetRcMaxAvailableVbvUse() float32

*

  • Ratecontrol attempt to use, at maximum, <value> of what can be used without an underflow.
  • - encoding: Set by user.
  • - decoding: unused.

func (*CAVCodecContext) GetRcMaxRate added in v0.0.4

func (codecCtx *CAVCodecContext) GetRcMaxRate() int64

*

  • maximum bitrate
  • - encoding: Set by user.
  • - decoding: Set by user, may be overwritten by libavcodec.

func (*CAVCodecContext) GetRcMinRate added in v0.0.4

func (codecCtx *CAVCodecContext) GetRcMinRate() int64

*

  • minimum bitrate
  • - encoding: Set by user.
  • - decoding: unused

func (*CAVCodecContext) GetRcMinVbvOverflowUse added in v0.0.4

func (codecCtx *CAVCodecContext) GetRcMinVbvOverflowUse() float32

*

  • Ratecontrol attempt to use, at least, <value> times the amount needed to prevent a vbv overflow.
  • - encoding: Set by user.
  • - decoding: unused.

func (*CAVCodecContext) GetRcOverride added in v0.0.4

func (codecCtx *CAVCodecContext) GetRcOverride() *CRcOverride

func (*CAVCodecContext) GetRcOverrideCount added in v0.0.4

func (codecCtx *CAVCodecContext) GetRcOverrideCount() int

*

  • ratecontrol override, see RcOverride
  • - encoding: Allocated/set/freed by user.
  • - decoding: unused

func (*CAVCodecContext) GetRefs added in v0.0.4

func (codecCtx *CAVCodecContext) GetRefs() int

* * number of reference frames * - encoding: Set by user. * - decoding: Set by lavc.

func (*CAVCodecContext) GetRequestSampleFmt added in v0.0.4

func (codecCtx *CAVCodecContext) GetRequestSampleFmt() avutil.CAVSampleFormat

*

  • desired sample format
  • - encoding: Not used.
  • - decoding: Set by user.
  • Decoder will decode to this format if it can.

func (*CAVCodecContext) GetSampleAspectRatio

func (codecCtx *CAVCodecContext) GetSampleAspectRatio() avutil.CAVRational

* * sample aspect ratio (0 if unknown) * That is the width of a pixel divided by the height of the pixel. * Numerator and denominator must be relatively prime and smaller than 256 for some video standards. * - encoding: Set by user. * - decoding: Set by libavcodec.

func (*CAVCodecContext) GetSampleChromaLocation added in v0.0.4

func (codecCtx *CAVCodecContext) GetSampleChromaLocation() avutil.CAVChromaLocation

* * This defines the location of chroma samples. * - encoding: Set by user * - decoding: Set by libavcodec

func (*CAVCodecContext) GetSampleFmt

func (codecCtx *CAVCodecContext) GetSampleFmt() avutil.CAVSampleFormat

*

  • audio sample format
  • - encoding: Set by user.
  • - decoding: Set by libavcodec.

/< sample format

func (*CAVCodecContext) GetSampleRate

func (codecCtx *CAVCodecContext) GetSampleRate() int
audio only

/< samples per second

func (*CAVCodecContext) GetSeekPreroll added in v0.0.4

func (codecCtx *CAVCodecContext) GetSeekPreroll() int

*

  • Number of samples to skip after a discontinuity
  • - decoding: unused
  • - encoding: set by libavcodec

func (*CAVCodecContext) GetSkipAlpha added in v0.0.4

func (codecCtx *CAVCodecContext) GetSkipAlpha() int

*

  • Skip processing alpha if supported by codec.
  • Note that if the format uses pre-multiplied alpha (common with VP6,
  • and recommended due to better video quality/compression)
  • the image will look as if alpha-blended onto a black background.
  • 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). *
  • - decoding: set by user
  • - encoding: unused

func (*CAVCodecContext) GetSkipBottom added in v0.0.4

func (codecCtx *CAVCodecContext) GetSkipBottom() int

* * Number of macroblock rows at the bottom which are skipped. * - encoding: unused * - decoding: Set by user.

func (*CAVCodecContext) GetSkipFrame added in v0.0.4

func (codecCtx *CAVCodecContext) GetSkipFrame() CAVDiscard

*

  • Skip decoding for selected frames.
  • - encoding: unused
  • - decoding: Set by user.

func (*CAVCodecContext) GetSkipIdct added in v0.0.4

func (codecCtx *CAVCodecContext) GetSkipIdct() CAVDiscard

*

  • Skip IDCT/dequantization for selected frames.
  • - encoding: unused
  • - decoding: Set by user.

func (*CAVCodecContext) GetSkipLoopFilter added in v0.0.4

func (codecCtx *CAVCodecContext) GetSkipLoopFilter() CAVDiscard

*

  • Skip loop filtering for selected frames.
  • - encoding: unused
  • - decoding: Set by user.

func (*CAVCodecContext) GetSkipTop added in v0.0.4

func (codecCtx *CAVCodecContext) GetSkipTop() int

* * Number of macroblock rows at the top which are skipped. * - encoding: unused * - decoding: Set by user.

func (*CAVCodecContext) GetSliceFlags added in v0.0.4

func (codecCtx *CAVCodecContext) GetSliceFlags() int

* * slice flags * - encoding: unused * - decoding: Set by user.

func (*CAVCodecContext) GetSlices

func (codecCtx *CAVCodecContext) GetSlices() int

*

  • Number of slices.
  • Indicates number of picture subdivisions. Used for parallelized
  • decoding.
  • - encoding: Set by user
  • - decoding: unused

func (*CAVCodecContext) GetSpatialCplxMasking added in v0.0.4

func (codecCtx *CAVCodecContext) GetSpatialCplxMasking() float32

* * spatial complexity masking (0-> disabled) * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) GetStatsIn added in v0.0.4

func (codecCtx *CAVCodecContext) GetStatsIn() string

*

  • pass2 encoding statistics input buffer
  • Concatenated stuff from stats_out of pass1 should be placed here.
  • - encoding: Allocated/set/freed by user.
  • - decoding: unused

func (*CAVCodecContext) GetStatsOut added in v0.0.4

func (codecCtx *CAVCodecContext) GetStatsOut() string

*

  • pass1 encoding statistics output buffer
  • - encoding: Set by libavcodec.
  • - decoding: unused

func (*CAVCodecContext) GetStrictStdCompliance added in v0.0.4

func (codecCtx *CAVCodecContext) GetStrictStdCompliance() int

*

  • strictly follow the standard (MPEG-4, ...).
  • - encoding: Set by user.
  • - decoding: Set by user.
  • Setting this to STRICT or higher means the encoder and decoder will
  • generally do stupid things, whereas setting it to unofficial or lower
  • will mean the encoder might produce output that is not supported by all
  • spec-compliant decoders. Decoders don't differentiate between normal,
  • unofficial and experimental (that is, they always try to decode things
  • when they can) unless they are explicitly asked to behave stupidly
  • (=strictly conform to the specs)
  • This may only be set to one of the FF_COMPLIANCE_* values in defs.h.

func (*CAVCodecContext) GetSubCharenc added in v0.0.4

func (codecCtx *CAVCodecContext) GetSubCharenc() string

*

  • Character encoding of the input subtitles file.
  • - decoding: set by user
  • - encoding: unused

func (*CAVCodecContext) GetSubCharencMode added in v0.0.4

func (codecCtx *CAVCodecContext) GetSubCharencMode() int

*

  • Subtitles character encoding mode. Formats or codecs might be adjusting
  • this setting (if they are doing the conversion themselves for instance).
  • - decoding: set by libavcodec
  • - encoding: unused

func (*CAVCodecContext) GetSubtitleHeader added in v0.0.4

func (codecCtx *CAVCodecContext) GetSubtitleHeader() unsafe.Pointer

*

  • Header containing style information for text subtitles.
  • For SUBTITLE_ASS subtitle type, it should contain the whole ASS
  • [Script Info] and [V4+ Styles] section, plus the [Events] line and
  • the Format line following. It shouldn't include any Dialogue line.
  • - encoding: Set/allocated/freed by user (before avcodec_open2())
  • - decoding: Set/allocated/freed by libavcodec (by avcodec_open2())

func (*CAVCodecContext) GetSubtitleHeaderSize added in v0.0.4

func (codecCtx *CAVCodecContext) GetSubtitleHeaderSize() int

func (*CAVCodecContext) GetSwPixFmt added in v0.0.4

func (codecCtx *CAVCodecContext) GetSwPixFmt() avutil.CAVPixelFormat

*

  • Nominal unaccelerated pixel format, see AV_PIX_FMT_xxx.
  • - encoding: unused.
  • - decoding: Set by libavcodec before calling get_format()

func (*CAVCodecContext) GetTemporalCplxMasking added in v0.0.4

func (codecCtx *CAVCodecContext) GetTemporalCplxMasking() float32

* * temporary complexity masking (0-> disabled) * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) GetThreadCount added in v0.0.4

func (codecCtx *CAVCodecContext) GetThreadCount() int

*

  • thread count
  • is used to decide how many independent tasks should be passed to execute()
  • - encoding: Set by user.
  • - decoding: Set by user.

func (*CAVCodecContext) GetThreadType added in v0.0.4

func (codecCtx *CAVCodecContext) GetThreadType() int

*

  • Which multithreading methods to use.
  • Use of FF_THREAD_FRAME will increase decoding delay by one frame per thread,
  • so clients which cannot provide future frames should not use it. *
  • - encoding: Set by user, otherwise the default is used.
  • - decoding: Set by user, otherwise the default is used.

func (*CAVCodecContext) GetTimeBase

func (codecCtx *CAVCodecContext) GetTimeBase() avutil.CAVRational

*

  • This is the fundamental unit of time (in seconds) in terms
  • of which frame timestamps are represented. For fixed-fps content,
  • timebase should be 1/framerate and timestamp increments should be
  • identically 1.
  • This often, but not always is the inverse of the frame rate or field rate
  • for video. 1/time_base is not the average frame rate if the frame rate is not
  • constant. *
  • Like containers, elementary streams also can store timestamps, 1/time_base
  • is the unit in which these timestamps are specified.
  • As example of such codec time base see ISO/IEC 14496-2:2001(E)
  • vop_time_increment_resolution and fixed_vop_rate
  • (fixed_vop_rate == 0 implies that it is different from the framerate) *
  • - encoding: MUST be set by user.
  • - decoding: unused.

func (*CAVCodecContext) GetTrailingPadding added in v0.0.4

func (codecCtx *CAVCodecContext) GetTrailingPadding() int

*

  • Audio only. The amount of padding (in samples) appended by the encoder to
  • the end of the audio. I.e. this number of decoded samples must be
  • discarded by the caller from the end of the stream to get the original
  • audio without any trailing padding. *
  • - decoding: unused
  • - encoding: unused

func (*CAVCodecContext) GetTrellis added in v0.0.4

func (codecCtx *CAVCodecContext) GetTrellis() int

*

  • trellis RD quantization
  • - encoding: Set by user.
  • - decoding: unused

func (*CAVCodecContext) GetWidth

func (codecCtx *CAVCodecContext) GetWidth() int
video only

*

  • picture width / height. *
  • @note Those fields may not match the values of the last
  • AVFrame output by avcodec_receive_frame() due frame
  • reordering. *
  • - encoding: MUST be set by user.
  • - decoding: May be set by the user before opening the decoder if known e.g.
  • from the container. Some decoders will require the dimensions
  • to be set by the caller. During decoding, the decoder may
  • overwrite those values as required while parsing the data.

func (*CAVCodecContext) GetWorkaroundBugs added in v0.0.4

func (codecCtx *CAVCodecContext) GetWorkaroundBugs() int

*

  • Work around bugs in encoders which sometimes cannot be detected automatically.
  • - encoding: Set by user
  • - decoding: Set by user

func (*CAVCodecContext) SetActiveThreadType added in v0.0.4

func (codecCtx *CAVCodecContext) SetActiveThreadType(activeThreadType int)

*

  • Which multithreading methods are in use by the codec.
  • - encoding: Set by libavcodec.
  • - decoding: Set by libavcodec.

func (*CAVCodecContext) SetApplyCropping added in v0.0.4

func (codecCtx *CAVCodecContext) SetApplyCropping(applyCropping int)

*

  • Video decoding only. Certain video codecs support cropping, meaning that
  • only a sub-rectangle of the decoded frame is intended for display. This
  • option controls how cropping is handled by libavcodec. *
  • When set to 1 (the default), libavcodec will apply cropping internally.
  • I.e. it will modify the output frame width/height fields and offset the
  • data pointers (only by as much as possible while preserving alignment, or
  • by the full amount if the AV_CODEC_FLAG_UNALIGNED flag is set) so that
  • the frames output by the decoder refer only to the cropped area. The
  • crop_* fields of the output frames will be zero. *
  • When set to 0, the width/height fields of the output frames will be set
  • to the coded dimensions and the crop_* fields will describe the cropping
  • rectangle. Applying the cropping is left to the caller. *
  • @warning When hardware acceleration with opaque output frames is used,
  • libavcodec is unable to apply cropping from the top/left border. *
  • @note when this option is set to zero, the width/height fields of the
  • AVCodecContext and output AVFrames have different meanings. The codec
  • context fields store display dimensions (with the coded dimensions in
  • coded_width/height), while the frame fields store the coded dimensions
  • (with the display dimensions being determined by the crop_* fields).

func (*CAVCodecContext) SetAudioServiceType added in v0.0.4

func (codecCtx *CAVCodecContext) SetAudioServiceType(audioServiceType CAVAudioServiceType)

*

  • Type of service that the audio stream conveys.
  • - encoding: Set by user.
  • - decoding: Set by libavcodec.

func (*CAVCodecContext) SetBQuantFactor added in v0.0.4

func (codecCtx *CAVCodecContext) SetBQuantFactor(bQuantFactor float32)

* * qscale factor between IP and B-frames * If > 0 then the last P-frame quantizer will be used (q= lastp_q*factor+offset). * If < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset). * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) SetBQuantOffset added in v0.0.4

func (codecCtx *CAVCodecContext) SetBQuantOffset(bQuantOffset float32)

* * qscale offset between IP and B-frames * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) SetBidirRefine added in v0.0.4

func (codecCtx *CAVCodecContext) SetBidirRefine(bidirRefine int)

* * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) SetBitRate

func (codecCtx *CAVCodecContext) SetBitRate(bitRate int64)

*

  • the average bitrate
  • - encoding: Set by user; unused for constant quantizer encoding.
  • - decoding: Set by user, may be overwritten by libavcodec
  • if this info is available in the stream

func (*CAVCodecContext) SetBitRateTolerance added in v0.0.4

func (codecCtx *CAVCodecContext) SetBitRateTolerance(bitRateTolerance int)

*

  • number of bits the bitstream is allowed to diverge from the reference.
  • the reference can be CBR (for CBR pass1) or VBR (for pass2)
  • - encoding: Set by user; unused for constant quantizer encoding.
  • - decoding: unused

func (*CAVCodecContext) SetBitsPerCodedSample added in v0.0.4

func (codecCtx *CAVCodecContext) SetBitsPerCodedSample(bitsPerCodedSample int)

*

  • bits per sample/pixel from the demuxer (needed for huffyuv).
  • - encoding: Set by libavcodec.
  • - decoding: Set by user.

func (*CAVCodecContext) SetBitsPerRawSample added in v0.0.4

func (codecCtx *CAVCodecContext) SetBitsPerRawSample(bitsPerRawSample int)

*

  • Bits per sample/pixel of internal libavcodec pixel/sample format.
  • - encoding: set by user.
  • - decoding: set by libavcodec.

func (*CAVCodecContext) SetBlockAlign added in v0.0.4

func (codecCtx *CAVCodecContext) SetBlockAlign(blockAlign int)

*

  • number of bytes per packet if constant and known or 0
  • Used by some WAV based audio codecs.

func (*CAVCodecContext) SetChLayout

func (codecCtx *CAVCodecContext) SetChLayout(chLayout avutil.CAVChannelLayout)

*

  • Audio channel layout.
  • - encoding: must be set by the caller, to one of AVCodec.ch_layouts.
  • - decoding: may be set by the caller if known e.g. from the container.
  • The decoder can then override during decoding as needed.

func (*CAVCodecContext) SetChromaIntraMatrix added in v0.0.4

func (codecCtx *CAVCodecContext) SetChromaIntraMatrix(chromaIntraMatrix *ctypes.UInt16)

*

  • custom intra quantization matrix
  • - encoding: Set by user, can be NULL.
  • - decoding: unused.

func (*CAVCodecContext) SetCodecId

func (codecCtx *CAVCodecContext) SetCodecId(codecId CAVCodecID)

see AV_CODEC_ID_xxx

func (*CAVCodecContext) SetCodecTag added in v0.0.4

func (codecCtx *CAVCodecContext) SetCodecTag(codecTag uint)

*

  • fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
  • This is used to work around some encoder bugs.
  • A demuxer should set this to what is stored in the field used to identify the codec.
  • If there are multiple such fields in a container then the demuxer should choose the one
  • which maximizes the information about the used codec.
  • If the codec tag field in a container is larger than 32 bits then the demuxer should
  • remap the longer ID to 32 bits with a table or other structure. Alternatively a new
  • extra_codec_tag + size could be added but for this a clear advantage must be demonstrated
  • first.
  • - encoding: Set by user, if not then the default based on codec_id will be used.
  • - decoding: Set by user, will be converted to uppercase by libavcodec during init.

func (*CAVCodecContext) SetCodecType added in v0.0.4

func (codecCtx *CAVCodecContext) SetCodecType(codecType avutil.CAVMediaType)

see AVMEDIA_TYPE_xxx

func (*CAVCodecContext) SetCodecWhitelist added in v0.0.4

func (codecCtx *CAVCodecContext) SetCodecWhitelist(codecWhitelist string)

*

  • ',' separated list of allowed decoders.
  • If NULL then all are allowed
  • - encoding: unused
  • - decoding: set by user

func (*CAVCodecContext) SetCodedHeight

func (codecCtx *CAVCodecContext) SetCodedHeight(codedHeight int)

*

  • Bitstream width / height, may be different from width/height e.g. when
  • the decoded frame is cropped before being output or lowres is enabled. *
  • @note Those field may not match the value of the last
  • AVFrame output by avcodec_receive_frame() due frame
  • reordering. *
  • - encoding: unused
  • - decoding: May be set by the user before opening the decoder if known
  • e.g. from the container. During decoding, the decoder may
  • overwrite those values as required while parsing the data.

func (*CAVCodecContext) SetCodedSideData added in v0.0.4

func (codecCtx *CAVCodecContext) SetCodedSideData(codedSideData *CAVPacketSideData)

*

  • Additional data associated with the entire coded stream. *
  • - decoding: may be set by user before calling avcodec_open2().
  • - encoding: may be set by libavcodec after avcodec_open2().

func (*CAVCodecContext) SetCodedWidth

func (codecCtx *CAVCodecContext) SetCodedWidth(codedWidth int)

*

  • Bitstream width / height, may be different from width/height e.g. when
  • the decoded frame is cropped before being output or lowres is enabled. *
  • @note Those field may not match the value of the last
  • AVFrame output by avcodec_receive_frame() due frame
  • reordering. *
  • - encoding: unused
  • - decoding: May be set by the user before opening the decoder if known
  • e.g. from the container. During decoding, the decoder may
  • overwrite those values as required while parsing the data.

func (*CAVCodecContext) SetColorPrimaries added in v0.0.4

func (codecCtx *CAVCodecContext) SetColorPrimaries(colorPrimaries avutil.CAVColorPrimaries)

* * Chromaticity coordinates of the source primaries. * - encoding: Set by user * - decoding: Set by libavcodec

func (*CAVCodecContext) SetColorRange added in v0.0.4

func (codecCtx *CAVCodecContext) SetColorRange(colorRange avutil.CAVColorRange)

* * MPEG vs JPEG YUV range. * - encoding: Set by user to override the default output color range value, * If not specified, libavcodec sets the color range depending on the * output format. * - decoding: Set by libavcodec, can be set by the user to propagate the * color range to components reading from the decoder context.

func (*CAVCodecContext) SetColorTrc added in v0.0.4

func (codecCtx *CAVCodecContext) SetColorTrc(colorTrc avutil.CAVColorTransferCharacteristic)

* * Color Transfer Characteristic. * - encoding: Set by user * - decoding: Set by libavcodec

func (*CAVCodecContext) SetColorspace added in v0.0.4

func (codecCtx *CAVCodecContext) SetColorspace(colorspace avutil.CAVColorSpace)

* * YUV colorspace type. * - encoding: Set by user * - decoding: Set by libavcodec

func (*CAVCodecContext) SetCompressionLevel added in v0.0.4

func (codecCtx *CAVCodecContext) SetCompressionLevel(compressionLevel int)

*

  • - encoding: Set by user.
  • - decoding: unused

func (*CAVCodecContext) SetCutoff added in v0.0.4

func (codecCtx *CAVCodecContext) SetCutoff(cutoff int)

*

  • Audio cutoff bandwidth (0 means "automatic")
  • - encoding: Set by user.
  • - decoding: unused

func (*CAVCodecContext) SetDarkMasking added in v0.0.4

func (codecCtx *CAVCodecContext) SetDarkMasking(darkMasking float32)

* * darkness masking (0-> disabled) * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) SetDctAlgo added in v0.0.4

func (codecCtx *CAVCodecContext) SetDctAlgo(dctAlgo int)

*

  • DCT algorithm, see FF_DCT_* below
  • - encoding: Set by user.
  • - decoding: unused

func (*CAVCodecContext) SetDebug added in v0.0.4

func (codecCtx *CAVCodecContext) SetDebug(debug int)

*

  • debug
  • - encoding: Set by user.
  • - decoding: Set by user.

func (*CAVCodecContext) SetDelay added in v0.0.4

func (codecCtx *CAVCodecContext) SetDelay(delay int)

*

  • Codec delay. *
  • Encoding: Number of frames delay there will be from the encoder input to
  • the decoder output. (we assume the decoder matches the spec)
  • Decoding: Number of frames delay in addition to what a standard decoder
  • as specified in the spec would produce. *
  • Video:
  • Number of frames the decoded output will be delayed relative to the
  • encoded input. *
  • Audio:
  • For encoding, this field is unused (see initial_padding). *
  • For decoding, this is the number of samples the decoder needs to
  • output before the decoder's output is valid. When seeking, you should
  • start decoding this many samples prior to your desired seek point. *
  • - encoding: Set by libavcodec.
  • - decoding: Set by libavcodec.

func (*CAVCodecContext) SetDiaSize added in v0.0.4

func (codecCtx *CAVCodecContext) SetDiaSize(diaSize int)

* * ME diamond size & shape * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) SetDiscardDamagedPercentage added in v0.0.4

func (codecCtx *CAVCodecContext) SetDiscardDamagedPercentage(discardDamagedPercentage int)

*

  • The percentage of damaged samples to discard a frame. *
  • - decoding: set by user
  • - encoding: unused

func (*CAVCodecContext) SetDrawHorizBand added in v0.0.4

func (codecCtx *CAVCodecContext) SetDrawHorizBand(draw_horiz_band ctypes.CFunc)

*

  • If non NULL, 'draw_horiz_band' is called by the libavcodec

  • decoder to draw a horizontal band. It improves cache usage. Not

  • all codecs can do that. You must check the codec capabilities

  • beforehand.

  • When multithreading is used, it may be called from multiple threads

  • at the same time; threads might draw different parts of the same AVFrame,

  • or multiple AVFrames, and there is no guarantee that slices will be drawn

  • in order.

  • The function is also used by hardware acceleration APIs.

  • It is called at least once during frame decoding to pass

  • the data needed for hardware render.

  • In that mode instead of pixel data, AVFrame points to

  • a structure specific to the acceleration API. The application

  • reads the structure and can change some fields to indicate progress

  • or mark state.

  • - encoding: unused

  • - decoding: Set by user.

  • @param height the height of the slice

  • @param y the y position of the slice

  • @param type 1->top field, 2->bottom field, 3->frame

  • @param offset offset into the AVFrame.data from which the slice should be read

    void (*draw_horiz_band)(struct AVCodecContext *s, const AVFrame *src, int offset[AV_NUM_DATA_POINTERS], int y, int type, int height);

func (*CAVCodecContext) SetDumpSeparator added in v0.0.4

func (codecCtx *CAVCodecContext) SetDumpSeparator(dumpSeparator string)

*

  • dump format separator.
  • can be ", " or "\n " or anything else
  • - encoding: Set by user.
  • - decoding: Set by user.

func (*CAVCodecContext) SetErrRecognition added in v0.0.4

func (codecCtx *CAVCodecContext) SetErrRecognition(errRecognition int)

*

  • Error recognition; may misdetect some more or less valid parts as errors.
  • This is a bitfield of the AV_EF_* values defined in defs.h. *
  • - encoding: Set by user.
  • - decoding: Set by user.

func (*CAVCodecContext) SetError added in v0.0.4

func (codecCtx *CAVCodecContext) SetError(_error [avutil.AV_NUM_DATA_POINTERS]ctypes.UInt64)

*

  • error
  • - encoding: Set by libavcodec if flags & AV_CODEC_FLAG_PSNR.
  • - decoding: unused

func (*CAVCodecContext) SetErrorConcealment added in v0.0.4

func (codecCtx *CAVCodecContext) SetErrorConcealment(errorConcealment int)

*

  • error concealment flags
  • - encoding: unused
  • - decoding: Set by user.

func (*CAVCodecContext) SetExecute added in v0.0.4

func (codecCtx *CAVCodecContext) SetExecute(execute ctypes.CFunc)

*

  • The codec may call this to execute several independent things.
  • It will return only after finishing all tasks.
  • The user may replace this with some multithreaded implementation,
  • the default implementation will execute the parts serially.
  • @param count the number of things to execute
  • - encoding: Set by libavcodec, user can override.
  • - decoding: Set by libavcodec, user can override.

int (*execute)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg), void *arg2, int *ret, int count, int size);

func (*CAVCodecContext) SetExecute2 added in v0.0.4

func (codecCtx *CAVCodecContext) SetExecute2(execute2 ctypes.CFunc)

*

  • The codec may call this to execute several independent things.
  • It will return only after finishing all tasks.
  • The user may replace this with some multithreaded implementation,
  • the default implementation will execute the parts serially.
  • @param c context passed also to func
  • @param count the number of things to execute
  • @param arg2 argument passed unchanged to func
  • @param ret return values of executed functions, must have space for "count" values. May be NULL.
  • @param func function that will be called count times, with jobnr from 0 to count-1.
  • threadnr will be in the range 0 to c->thread_count-1 < MAX_THREADS and so that no
  • two instances of func executing at the same time will have the same threadnr.
  • @return always 0 currently, but code should handle a future improvement where when any call to func
  • returns < 0 no further calls to func may be done and < 0 is returned.
  • - encoding: Set by libavcodec, user can override.
  • - decoding: Set by libavcodec, user can override.

int (*execute2)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count);

func (*CAVCodecContext) SetExportSideData added in v0.0.4

func (codecCtx *CAVCodecContext) SetExportSideData(exportSideData int)

*

  • Bit set of AV_CODEC_EXPORT_DATA_* flags, which affects the kind of
  • metadata exported in frame, packet, or coded stream side data by
  • decoders and encoders. *
  • - decoding: set by user
  • - encoding: set by user

func (*CAVCodecContext) SetExtraHwFrames added in v0.0.4

func (codecCtx *CAVCodecContext) SetExtraHwFrames(extraHwFrames int)

* Video decoding only. Sets the number of extra hardware frames which * the decoder will allocate for use by the caller. This must be set * before avcodec_open2() is called. * * Some hardware decoders require all frames that they will use for * output to be defined in advance before decoding starts. For such * decoders, the hardware frame pool must therefore be of a fixed size. * The extra frames set here are on top of any number that the decoder * needs internally in order to operate normally (for example, frames * used as reference pictures).

func (*CAVCodecContext) SetExtradata

func (codecCtx *CAVCodecContext) SetExtradata(extradata unsafe.Pointer)

*

  • some codecs need / can use extradata like Huffman tables.
  • MJPEG: Huffman tables
  • rv10: additional flags
  • MPEG-4: global headers (they can be in the bitstream or here)
  • The allocated memory should be AV_INPUT_BUFFER_PADDING_SIZE bytes larger
  • than extradata_size to avoid problems if it is read with the bitstream reader.
  • The bytewise contents of extradata must not depend on the architecture or CPU endianness.
  • Must be allocated with the av_malloc() family of functions.
  • - encoding: Set/allocated/freed by libavcodec.
  • - decoding: Set/allocated/freed by user.

func (*CAVCodecContext) SetExtradataSize added in v0.0.4

func (codecCtx *CAVCodecContext) SetExtradataSize(extradataSize int)

func (*CAVCodecContext) SetFieldOrder added in v0.0.4

func (codecCtx *CAVCodecContext) SetFieldOrder(fieldOrder CAVFieldOrder)

* Field order

  • - encoding: set by libavcodec
  • - decoding: Set by user.

func (*CAVCodecContext) SetFlags

func (codecCtx *CAVCodecContext) SetFlags(flags int)

*

  • AV_CODEC_FLAG_*.
  • - encoding: Set by user.
  • - decoding: Set by user.

func (*CAVCodecContext) SetFlags2

func (codecCtx *CAVCodecContext) SetFlags2(flags2 int)

*

  • AV_CODEC_FLAG2_*.
  • - encoding: Set by user.
  • - decoding: Set by user.

func (*CAVCodecContext) SetFrameNum added in v0.0.4

func (codecCtx *CAVCodecContext) SetFrameNum(frameNum int64)

*

  • Frame counter, set by libavcodec. *
  • - decoding: total number of frames returned from the decoder so far.
  • - encoding: total number of frames passed to the encoder so far. *
  • @note the counter is not incremented if encoding/decoding resulted in
  • an error.

func (*CAVCodecContext) SetFrameSize added in v0.0.4

func (codecCtx *CAVCodecContext) SetFrameSize(frameSize int)

*

  • Number of samples per channel in an audio frame. *
  • - encoding: set by libavcodec in avcodec_open2(). Each submitted frame
  • except the last must contain exactly frame_size samples per channel.
  • May be 0 when the codec has AV_CODEC_CAP_VARIABLE_FRAME_SIZE set, then the
  • frame size is not restricted.
  • - decoding: may be set by some decoders to indicate constant frame size

func (*CAVCodecContext) SetFramerate added in v0.0.4

func (codecCtx *CAVCodecContext) SetFramerate(framerate avutil.CAVRational)

*

  • - decoding: For codecs that store a framerate value in the compressed
  • bitstream, the decoder may export it here. { 0, 1} when
  • unknown.
  • - encoding: May be used to signal the framerate of CFR content to an
  • encoder.

func (*CAVCodecContext) SetGetBuffer2 added in v0.0.4

func (codecCtx *CAVCodecContext) SetGetBuffer2(getBuffer2 ctypes.CFunc)

*

  • This callback is called at the beginning of each frame to get data
  • buffer(s) for it. There may be one contiguous buffer for all the data or
  • there may be a buffer per each data plane or anything in between. What
  • this means is, you may set however many entries in buf[] you feel necessary.
  • Each buffer must be reference-counted using the AVBuffer API (see description
  • of buf[] below). *
  • The following fields will be set in the frame before this callback is
  • called:
  • - format
  • - width, height (video only)
  • - sample_rate, channel_layout, nb_samples (audio only)
  • Their values may differ from the corresponding values in
  • AVCodecContext. This callback must use the frame values, not the codec
  • context values, to calculate the required buffer size. *
  • This callback must fill the following fields in the frame:
  • - data[]
  • - linesize[]
  • - extended_data:
  • * if the data is planar audio with more than 8 channels, then this
  • callback must allocate and fill extended_data to contain all pointers
  • to all data planes. data[] must hold as many pointers as it can.
  • extended_data must be allocated with av_malloc() and will be freed in
  • av_frame_unref().
  • * otherwise extended_data must point to data
  • - buf[] must contain one or more pointers to AVBufferRef structures. Each of
  • the frame's data and extended_data pointers must be contained in these. That
  • is, one AVBufferRef for each allocated chunk of memory, not necessarily one
  • AVBufferRef per data[] entry. See: av_buffer_create(), av_buffer_alloc(),
  • and av_buffer_ref().
  • - extended_buf and nb_extended_buf must be allocated with av_malloc() by
  • this callback and filled with the extra buffers if there are more
  • buffers than buf[] can hold. extended_buf will be freed in
  • av_frame_unref(). *
  • If AV_CODEC_CAP_DR1 is not set then get_buffer2() must call
  • avcodec_default_get_buffer2() instead of providing buffers allocated by
  • some other means. *
  • Each data plane must be aligned to the maximum required by the target
  • CPU. *
  • @see avcodec_default_get_buffer2() *
  • Video: *
  • If AV_GET_BUFFER_FLAG_REF is set in flags then the frame may be reused
  • (read and/or written to if it is writable) later by libavcodec. *
  • avcodec_align_dimensions2() should be used to find the required width and
  • height, as they normally need to be rounded up to the next multiple of 16. *
  • Some decoders do not support linesizes changing between frames. *
  • If frame multithreading is used, this callback may be called from a
  • different thread, but not from more than one at once. Does not need to be
  • reentrant. *
  • @see avcodec_align_dimensions2() *
  • Audio: *
  • Decoders request a buffer of a particular size by setting
  • AVFrame.nb_samples prior to calling get_buffer2(). The decoder may,
  • however, utilize only part of the buffer by setting AVFrame.nb_samples
  • to a smaller value in the output frame. *
  • As a convenience, av_samples_get_buffer_size() and
  • av_samples_fill_arrays() in libavutil may be used by custom get_buffer2()
  • functions to find the required data size and to fill data pointers and
  • linesize. In AVFrame.linesize, only linesize[0] may be set for audio
  • since all planes must be the same size. *
  • @see av_samples_get_buffer_size(), av_samples_fill_arrays() *
  • - encoding: unused
  • - decoding: Set by libavcodec, user can override.

int (*get_buffer2)(struct AVCodecContext *s, AVFrame *frame, int flags);

func (*CAVCodecContext) SetGetEncodeBuffer added in v0.0.4

func (codecCtx *CAVCodecContext) SetGetEncodeBuffer(getEncodeBuffer ctypes.CFunc)

*

  • This callback is called at the beginning of each packet to get a data
  • buffer for it. *
  • The following field will be set in the packet before this callback is
  • called:
  • - size
  • This callback must use the above value to calculate the required buffer size,
  • which must padded by at least AV_INPUT_BUFFER_PADDING_SIZE bytes. *
  • In some specific cases, the encoder may not use the entire buffer allocated by this
  • callback. This will be reflected in the size value in the packet once returned by
  • avcodec_receive_packet(). *
  • This callback must fill the following fields in the packet:
  • - data: alignment requirements for AVPacket apply, if any. Some architectures and
  • encoders may benefit from having aligned data.
  • - buf: must contain a pointer to an AVBufferRef structure. The packet's
  • data pointer must be contained in it. See: av_buffer_create(), av_buffer_alloc(),
  • and av_buffer_ref(). *
  • If AV_CODEC_CAP_DR1 is not set then get_encode_buffer() must call
  • avcodec_default_get_encode_buffer() instead of providing a buffer allocated by
  • some other means. *
  • The flags field may contain a combination of AV_GET_ENCODE_BUFFER_FLAG_ flags.
  • They may be used for example to hint what use the buffer may get after being
  • created.
  • Implementations of this callback may ignore flags they don't understand.
  • If AV_GET_ENCODE_BUFFER_FLAG_REF is set in flags then the packet may be reused
  • (read and/or written to if it is writable) later by libavcodec. *
  • This callback must be thread-safe, as when frame threading is used, it may
  • be called from multiple threads simultaneously. *
  • @see avcodec_default_get_encode_buffer() *
  • - encoding: Set by libavcodec, user can override.
  • - decoding: unused

int (*get_encode_buffer)(struct AVCodecContext *s, AVPacket *pkt, int flags);

func (*CAVCodecContext) SetGetFormat added in v0.0.4

func (codecCtx *CAVCodecContext) SetGetFormat(getFormat ctypes.CFunc)

* * Callback to negotiate the pixel format. Decoding only, may be set by the * caller before avcodec_open2(). * * Called by some decoders to select the pixel format that will be used for * the output frames. This is mainly used to set up hardware acceleration, * then the provided format list contains the corresponding hwaccel pixel * formats alongside the "software" one. The software pixel format may also * be retrieved from \ref sw_pix_fmt. * * This callback will be called when the coded frame properties (such as * resolution, pixel format, etc.) change and more than one output format is * supported for those new properties. If a hardware pixel format is chosen * and initialization for it fails, the callback may be called again * immediately. * * This callback may be called from different threads if the decoder is * multi-threaded, but not from more than one thread simultaneously. * * @param fmt list of formats which may be used in the current * configuration, terminated by AV_PIX_FMT_NONE. * @warning Behavior is undefined if the callback returns a value other * than one of the formats in fmt or AV_PIX_FMT_NONE. * @return the chosen format or AV_PIX_FMT_NONE

enum AVPixelFormat (*get_format)(struct AVCodecContext *s, const enum AVPixelFormat * fmt);

func (*CAVCodecContext) SetGlobalQuality added in v0.0.4

func (codecCtx *CAVCodecContext) SetGlobalQuality(globalQuality int)

*

  • Global quality for codecs which cannot change it per frame.
  • This should be proportional to MPEG-1/2/4 qscale.
  • - encoding: Set by user.
  • - decoding: unused

func (*CAVCodecContext) SetGopSize

func (codecCtx *CAVCodecContext) SetGopSize(gopSize int)

*

  • the number of pictures in a group of pictures, or 0 for intra_only
  • - encoding: Set by user.
  • - decoding: unused

func (*CAVCodecContext) SetHasBFrames added in v0.0.4

func (codecCtx *CAVCodecContext) SetHasBFrames(hasBFrames int)

* * Size of the frame reordering buffer in the decoder. * For MPEG-2 it is 1 IPB or 0 low delay IP. * - encoding: Set by libavcodec. * - decoding: Set by libavcodec.

func (*CAVCodecContext) SetHeight

func (codecCtx *CAVCodecContext) SetHeight(height int)

*

  • picture width / height. *
  • @note Those fields may not match the values of the last
  • AVFrame output by avcodec_receive_frame() due frame
  • reordering. *
  • - encoding: MUST be set by user.
  • - decoding: May be set by the user before opening the decoder if known e.g.
  • from the container. Some decoders will require the dimensions
  • to be set by the caller. During decoding, the decoder may
  • overwrite those values as required while parsing the data.

func (*CAVCodecContext) SetHwDeviceCtx added in v0.0.4

func (codecCtx *CAVCodecContext) SetHwDeviceCtx(hwDeviceCtx *avutil.CAVBufferRef)

*

  • 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.

func (*CAVCodecContext) SetHwFramesCtx added in v0.0.4

func (codecCtx *CAVCodecContext) SetHwFramesCtx(hwFramesCtx *avutil.CAVBufferRef)

*

  • 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. *
  • - 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. *
  • 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.

func (*CAVCodecContext) SetHwaccelContext added in v0.0.4

func (codecCtx *CAVCodecContext) SetHwaccelContext(hwaccelContext unsafe.Pointer)

*

  • Legacy hardware accelerator context. *
  • For some hardware acceleration methods, the caller may use this field to
  • signal hwaccel-specific data to the codec. The struct pointed to by this
  • pointer is hwaccel-dependent and defined in the respective header. Please
  • refer to the FFmpeg HW accelerator documentation to know how to fill
  • this. *
  • In most cases this field is optional - the necessary information may also
  • be provided to libavcodec through @ref hw_frames_ctx or @ref
  • hw_device_ctx (see avcodec_get_hw_config()). However, in some cases it
  • may be the only method of signalling some (optional) information. *
  • The struct and its contents are owned by the caller. *
  • - encoding: May be set by the caller before avcodec_open2(). Must remain
  • valid until avcodec_free_context().
  • - decoding: May be set by the caller in the get_format() callback.
  • Must remain valid until the next get_format() call,
  • or avcodec_free_context() (whichever comes first).

func (*CAVCodecContext) SetHwaccelFlags added in v0.0.4

func (codecCtx *CAVCodecContext) SetHwaccelFlags(hwaccelFlags int)

*

  • 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)

func (*CAVCodecContext) SetIQuantFactor added in v0.0.4

func (codecCtx *CAVCodecContext) SetIQuantFactor(iQuantFactor float32)

* * qscale factor between P- and I-frames * If > 0 then the last P-frame quantizer will be used (q = lastp_q * factor + offset). * If < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset). * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) SetIQuantOffset added in v0.0.4

func (codecCtx *CAVCodecContext) SetIQuantOffset(iQuantOffset float32)

* * qscale offset between P and I-frames * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) SetIdctAlgo added in v0.0.4

func (codecCtx *CAVCodecContext) SetIdctAlgo(idctAlgo int)

*

  • IDCT algorithm, see FF_IDCT_* below.
  • - encoding: Set by user.
  • - decoding: Set by user.

func (*CAVCodecContext) SetIldctCmp added in v0.0.4

func (codecCtx *CAVCodecContext) SetIldctCmp(ildctCmp int)

* * interlaced DCT comparison function * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) SetInitialPadding added in v0.0.4

func (codecCtx *CAVCodecContext) SetInitialPadding(initialPadding int)

*

  • Audio only. The number of "priming" samples (padding) inserted by the
  • encoder at the beginning of the audio. I.e. this number of leading
  • decoded samples must be discarded by the caller to get the original audio
  • without leading padding. *
  • - decoding: unused
  • - encoding: Set by libavcodec. The timestamps on the output packets are
  • adjusted by the encoder so that they always refer to the
  • first sample of the data actually contained in the packet,
  • including any added padding. E.g. if the timebase is
  • 1/samplerate and the timestamp of the first input sample is
  • 0, the timestamp of the first output packet will be
  • -initial_padding.

func (*CAVCodecContext) SetInterMatrix added in v0.0.4

func (codecCtx *CAVCodecContext) SetInterMatrix(interMatrix *ctypes.UInt16)

* * custom inter quantization matrix * Must be allocated with the av_malloc() family of functions, and will be freed in * avcodec_free_context(). * - encoding: Set/allocated by user, freed by libavcodec. Can be NULL. * - decoding: Set/allocated/freed by libavcodec.

func (*CAVCodecContext) SetInternal added in v0.0.4

func (codecCtx *CAVCodecContext) SetInternal(internal *C.struct_AVCodecInternal)

*

  • Private context used for internal data. *
  • Unlike priv_data, this is not codec-specific. It is used in general
  • libavcodec functions.

func (*CAVCodecContext) SetIntraDcPrecision added in v0.0.4

func (codecCtx *CAVCodecContext) SetIntraDcPrecision(intraDcPrecision int)

* * precision of the intra DC coefficient - 8 * - encoding: Set by user. * - decoding: Set by libavcodec

func (*CAVCodecContext) SetIntraMatrix added in v0.0.4

func (codecCtx *CAVCodecContext) SetIntraMatrix(intraMatrix *ctypes.UInt16)

* * custom intra quantization matrix * Must be allocated with the av_malloc() family of functions, and will be freed in * avcodec_free_context(). * - encoding: Set/allocated by user, freed by libavcodec. Can be NULL. * - decoding: Set/allocated/freed by libavcodec.

func (*CAVCodecContext) SetKeyintMin added in v0.0.4

func (codecCtx *CAVCodecContext) SetKeyintMin(keyintMin int)

* * minimum GOP size * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) SetLastPredictorCount added in v0.0.4

func (codecCtx *CAVCodecContext) SetLastPredictorCount(lastPredictorCount int)

* * amount of previous MV predictors (2a+1 x 2a+1 square) * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) SetLevel added in v0.0.4

func (codecCtx *CAVCodecContext) SetLevel(level int)

*

  • Encoding level descriptor.
  • - encoding: Set by user, corresponds to a specific level defined by the
  • codec, usually corresponding to the profile level, if not specified it
  • is set to FF_LEVEL_UNKNOWN.
  • - decoding: Set by libavcodec.
  • See AV_LEVEL_* in defs.h.

func (*CAVCodecContext) SetLogLevelOffset added in v0.0.4

func (codecCtx *CAVCodecContext) SetLogLevelOffset(logLevelOffset int)

func (*CAVCodecContext) SetLowres added in v0.0.4

func (codecCtx *CAVCodecContext) SetLowres(lowres int)

*

  • low resolution decoding, 1-> 1/2 size, 2->1/4 size
  • - encoding: unused
  • - decoding: Set by user.

func (*CAVCodecContext) SetLumiMasking added in v0.0.4

func (codecCtx *CAVCodecContext) SetLumiMasking(lumiMasking float32)

* * luminance masking (0-> disabled) * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) SetMaxBFrames

func (codecCtx *CAVCodecContext) SetMaxBFrames(maxBFrames int)

* * maximum number of B-frames between non-B-frames * Note: The output will be delayed by max_b_frames+1 relative to the input. * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) SetMaxPixels added in v0.0.4

func (codecCtx *CAVCodecContext) SetMaxPixels(maxPixels int64)

*

  • The number of pixels per image to maximally accept. *
  • - decoding: set by user
  • - encoding: set by user

func (*CAVCodecContext) SetMaxQdiff added in v0.0.4

func (codecCtx *CAVCodecContext) SetMaxQdiff(maxQdiff int)

*

  • maximum quantizer difference between frames
  • - encoding: Set by user.
  • - decoding: unused

func (*CAVCodecContext) SetMaxSamples added in v0.0.4

func (codecCtx *CAVCodecContext) SetMaxSamples(maxSamples int64)

*

  • The number of samples per frame to maximally accept. *
  • - decoding: set by user
  • - encoding: set by user

func (*CAVCodecContext) SetMbCmp added in v0.0.4

func (codecCtx *CAVCodecContext) SetMbCmp(mbCmp int)

* * macroblock comparison function (not supported yet) * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) SetMbDecision

func (codecCtx *CAVCodecContext) SetMbDecision(mbDecision int)

* * macroblock decision mode * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) SetMbLmax added in v0.0.4

func (codecCtx *CAVCodecContext) SetMbLmax(mbLmax int)

* * maximum MB Lagrange multiplier * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) SetMbLmin added in v0.0.4

func (codecCtx *CAVCodecContext) SetMbLmin(mbLmin int)

* * minimum MB Lagrange multiplier * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) SetMeCmp added in v0.0.4

func (codecCtx *CAVCodecContext) SetMeCmp(meCmp int)

* * motion estimation comparison function * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) SetMePreCmp added in v0.0.4

func (codecCtx *CAVCodecContext) SetMePreCmp(mePreCmp int)

* * motion estimation prepass comparison function * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) SetMeRange added in v0.0.4

func (codecCtx *CAVCodecContext) SetMeRange(meRange int)

* * maximum motion estimation search range in subpel units * If 0 then no limit. * * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) SetMeSubCmp added in v0.0.4

func (codecCtx *CAVCodecContext) SetMeSubCmp(meSubCmp int)

* * subpixel motion estimation comparison function * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) SetMeSubpelQuality added in v0.0.4

func (codecCtx *CAVCodecContext) SetMeSubpelQuality(meSubpelQuality int)

* * subpel ME quality * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) SetMv0Threshold added in v0.0.4

func (codecCtx *CAVCodecContext) SetMv0Threshold(mv0Threshold int)

* * Note: Value depends upon the compare function used for fullpel ME. * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) SetNbCodedSideData added in v0.0.4

func (codecCtx *CAVCodecContext) SetNbCodedSideData(nbCodedSideData int)

func (*CAVCodecContext) SetNsseWeight added in v0.0.4

func (codecCtx *CAVCodecContext) SetNsseWeight(nsseWeight int)

*

  • noise vs. sse weight for the nsse comparison function
  • - encoding: Set by user.
  • - decoding: unused

func (*CAVCodecContext) SetOpaque added in v0.0.4

func (codecCtx *CAVCodecContext) SetOpaque(opaque unsafe.Pointer)

*

  • Private data of the user, can be used to carry app specific stuff.
  • - encoding: Set by user.
  • - decoding: Set by user.

func (*CAVCodecContext) SetPMasking added in v0.0.4

func (codecCtx *CAVCodecContext) SetPMasking(pMasking float32)

* * p block masking (0-> disabled) * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) SetPixFmt

func (codecCtx *CAVCodecContext) SetPixFmt(pixFmt avutil.CAVPixelFormat)

*

  • Pixel format, see AV_PIX_FMT_xxx.
  • May be set by the demuxer if known from headers.
  • May be overridden by the decoder if it knows better. *
  • @note This field may not match the value of the last
  • AVFrame output by avcodec_receive_frame() due frame
  • reordering. *
  • - encoding: Set by user.
  • - decoding: Set by user if known, overridden by libavcodec while
  • parsing the data.

func (*CAVCodecContext) SetPktTimebase added in v0.0.4

func (codecCtx *CAVCodecContext) SetPktTimebase(pktTimebase avutil.CAVRational)

*

  • Timebase in which pkt_dts/pts and AVPacket.dts/pts are expressed.
  • - encoding: unused.
  • - decoding: set by user.

func (*CAVCodecContext) SetPreDiaSize added in v0.0.4

func (codecCtx *CAVCodecContext) SetPreDiaSize(preDiaSize int)

* * ME prepass diamond size & shape * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) SetPrivData added in v0.0.4

func (codecCtx *CAVCodecContext) SetPrivData(privData unsafe.Pointer)

func (*CAVCodecContext) SetProfile added in v0.0.4

func (codecCtx *CAVCodecContext) SetProfile(profile int)

*

  • profile
  • - encoding: Set by user.
  • - decoding: Set by libavcodec.
  • See the AV_PROFILE_* defines in defs.h.

func (*CAVCodecContext) SetProperties added in v0.0.4

func (codecCtx *CAVCodecContext) SetProperties(properties uint)

*

  • Properties of the stream that gets decoded
  • - encoding: unused
  • - decoding: set by libavcodec

func (*CAVCodecContext) SetPtsCorrectionLastDts added in v0.0.4

func (codecCtx *CAVCodecContext) SetPtsCorrectionLastDts(ptsCorrectionLastDts int64)

/ DTS of the last frame

func (*CAVCodecContext) SetPtsCorrectionLastPts added in v0.0.4

func (codecCtx *CAVCodecContext) SetPtsCorrectionLastPts(ptsCorrectionLastPts int64)

/ PTS of the last frame

func (*CAVCodecContext) SetPtsCorrectionNumFaultyDts added in v0.0.4

func (codecCtx *CAVCodecContext) SetPtsCorrectionNumFaultyDts(ptsCorrectionNumFaultyDts int64)

/ Number of incorrect DTS values so far

func (*CAVCodecContext) SetPtsCorrectionNumFaultyPts added in v0.0.4

func (codecCtx *CAVCodecContext) SetPtsCorrectionNumFaultyPts(ptsCorrectionNumFaultyPts int64)

/ Number of incorrect PTS values so far

func (*CAVCodecContext) SetQblur added in v0.0.4

func (codecCtx *CAVCodecContext) SetQblur(qblur float32)

/< amount of qscale smoothing over time (0.0-1.0)

func (*CAVCodecContext) SetQcompress added in v0.0.4

func (codecCtx *CAVCodecContext) SetQcompress(qcompress float32)

/< amount of qscale change between easy & hard scenes (0.0-1.0)

func (*CAVCodecContext) SetQmax added in v0.0.4

func (codecCtx *CAVCodecContext) SetQmax(qmax int)

*

  • maximum quantizer
  • - encoding: Set by user.
  • - decoding: unused

func (*CAVCodecContext) SetQmin added in v0.0.4

func (codecCtx *CAVCodecContext) SetQmin(qmin int)

*

  • minimum quantizer
  • - encoding: Set by user.
  • - decoding: unused

func (*CAVCodecContext) SetRcBufferSize added in v0.0.4

func (codecCtx *CAVCodecContext) SetRcBufferSize(rcBufferSize int)

*

  • decoder bitstream buffer size
  • - encoding: Set by user.
  • - decoding: May be set by libavcodec.

func (*CAVCodecContext) SetRcInitialBufferOccupancy added in v0.0.4

func (codecCtx *CAVCodecContext) SetRcInitialBufferOccupancy(rcInitialBufferOccupancy int)

*

  • Number of bits which should be loaded into the rc buffer before decoding starts.
  • - encoding: Set by user.
  • - decoding: unused

func (*CAVCodecContext) SetRcMaxAvailableVbvUse added in v0.0.4

func (codecCtx *CAVCodecContext) SetRcMaxAvailableVbvUse(rcMaxAvailableVbvUse float32)

*

  • Ratecontrol attempt to use, at maximum, <value> of what can be used without an underflow.
  • - encoding: Set by user.
  • - decoding: unused.

func (*CAVCodecContext) SetRcMaxRate added in v0.0.4

func (codecCtx *CAVCodecContext) SetRcMaxRate(rcMaxRate int64)

*

  • maximum bitrate
  • - encoding: Set by user.
  • - decoding: Set by user, may be overwritten by libavcodec.

func (*CAVCodecContext) SetRcMinRate added in v0.0.4

func (codecCtx *CAVCodecContext) SetRcMinRate(rcMinRate int64)

*

  • minimum bitrate
  • - encoding: Set by user.
  • - decoding: unused

func (*CAVCodecContext) SetRcMinVbvOverflowUse added in v0.0.4

func (codecCtx *CAVCodecContext) SetRcMinVbvOverflowUse(rcMinVbvOverflowUse float32)

*

  • Ratecontrol attempt to use, at least, <value> times the amount needed to prevent a vbv overflow.
  • - encoding: Set by user.
  • - decoding: unused.

func (*CAVCodecContext) SetRcOverride added in v0.0.4

func (codecCtx *CAVCodecContext) SetRcOverride(rcOverride *CRcOverride)

func (*CAVCodecContext) SetRcOverrideCount added in v0.0.4

func (codecCtx *CAVCodecContext) SetRcOverrideCount(rcOverrideCount int)

*

  • ratecontrol override, see RcOverride
  • - encoding: Allocated/set/freed by user.
  • - decoding: unused

func (*CAVCodecContext) SetRefs added in v0.0.4

func (codecCtx *CAVCodecContext) SetRefs(refs int)

* * number of reference frames * - encoding: Set by user. * - decoding: Set by lavc.

func (*CAVCodecContext) SetRequestSampleFmt added in v0.0.4

func (codecCtx *CAVCodecContext) SetRequestSampleFmt(requestSampleFmt avutil.CAVSampleFormat)

*

  • desired sample format
  • - encoding: Not used.
  • - decoding: Set by user.
  • Decoder will decode to this format if it can.

func (*CAVCodecContext) SetSampleAspectRatio

func (codecCtx *CAVCodecContext) SetSampleAspectRatio(sampleAspectRation avutil.CAVRational)

* * sample aspect ratio (0 if unknown) * That is the width of a pixel divided by the height of the pixel. * Numerator and denominator must be relatively prime and smaller than 256 for some video standards. * - encoding: Set by user. * - decoding: Set by libavcodec.

func (*CAVCodecContext) SetSampleChromaLocation added in v0.0.4

func (codecCtx *CAVCodecContext) SetSampleChromaLocation(chromaLocation avutil.CAVChromaLocation)

* * This defines the location of chroma samples. * - encoding: Set by user * - decoding: Set by libavcodec

func (*CAVCodecContext) SetSampleFmt

func (codecCtx *CAVCodecContext) SetSampleFmt(sampleFmt avutil.CAVSampleFormat)

*

  • audio sample format
  • - encoding: Set by user.
  • - decoding: Set by libavcodec.

/< sample format

func (*CAVCodecContext) SetSampleRate

func (codecCtx *CAVCodecContext) SetSampleRate(sampleRate int)
audio only

/< samples per second

func (*CAVCodecContext) SetSeekPreroll added in v0.0.4

func (codecCtx *CAVCodecContext) SetSeekPreroll(seekPreroll int)

*

  • Number of samples to skip after a discontinuity
  • - decoding: unused
  • - encoding: set by libavcodec

func (*CAVCodecContext) SetSkipAlpha added in v0.0.4

func (codecCtx *CAVCodecContext) SetSkipAlpha(skipAlpha int)

*

  • Skip processing alpha if supported by codec.
  • Note that if the format uses pre-multiplied alpha (common with VP6,
  • and recommended due to better video quality/compression)
  • the image will look as if alpha-blended onto a black background.
  • 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). *
  • - decoding: set by user
  • - encoding: unused

func (*CAVCodecContext) SetSkipBottom added in v0.0.4

func (codecCtx *CAVCodecContext) SetSkipBottom(skipBottom int)

* * Number of macroblock rows at the bottom which are skipped. * - encoding: unused * - decoding: Set by user.

func (*CAVCodecContext) SetSkipFrame added in v0.0.4

func (codecCtx *CAVCodecContext) SetSkipFrame(skipFrame CAVDiscard)

*

  • Skip decoding for selected frames.
  • - encoding: unused
  • - decoding: Set by user.

func (*CAVCodecContext) SetSkipIdct added in v0.0.4

func (codecCtx *CAVCodecContext) SetSkipIdct(skipIdct CAVDiscard)

*

  • Skip IDCT/dequantization for selected frames.
  • - encoding: unused
  • - decoding: Set by user.

func (*CAVCodecContext) SetSkipLoopFilter added in v0.0.4

func (codecCtx *CAVCodecContext) SetSkipLoopFilter(skipLoopFilter CAVDiscard)

*

  • Skip loop filtering for selected frames.
  • - encoding: unused
  • - decoding: Set by user.

func (*CAVCodecContext) SetSkipTop added in v0.0.4

func (codecCtx *CAVCodecContext) SetSkipTop(skipTop int)

* * Number of macroblock rows at the top which are skipped. * - encoding: unused * - decoding: Set by user.

func (*CAVCodecContext) SetSliceFlags added in v0.0.4

func (codecCtx *CAVCodecContext) SetSliceFlags(sliceFlags int)

* * slice flags * - encoding: unused * - decoding: Set by user.

func (*CAVCodecContext) SetSlices added in v0.0.4

func (codecCtx *CAVCodecContext) SetSlices(slices int)

*

  • Number of slices.
  • Indicates number of picture subdivisions. Used for parallelized
  • decoding.
  • - encoding: Set by user
  • - decoding: unused

func (*CAVCodecContext) SetSpatialCplxMasking added in v0.0.4

func (codecCtx *CAVCodecContext) SetSpatialCplxMasking(spatialCplxMasking float32)

* * spatial complexity masking (0-> disabled) * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) SetStatsIn added in v0.0.4

func (codecCtx *CAVCodecContext) SetStatsIn(statsIn string)

*

  • pass2 encoding statistics input buffer
  • Concatenated stuff from stats_out of pass1 should be placed here.
  • - encoding: Allocated/set/freed by user.
  • - decoding: unused

func (*CAVCodecContext) SetStatsOut added in v0.0.4

func (codecCtx *CAVCodecContext) SetStatsOut(statsOut string)

*

  • pass1 encoding statistics output buffer
  • - encoding: Set by libavcodec.
  • - decoding: unused

func (*CAVCodecContext) SetStrictStdCompliance added in v0.0.4

func (codecCtx *CAVCodecContext) SetStrictStdCompliance(strictStdCompliance int)

*

  • strictly follow the standard (MPEG-4, ...).
  • - encoding: Set by user.
  • - decoding: Set by user.
  • Setting this to STRICT or higher means the encoder and decoder will
  • generally do stupid things, whereas setting it to unofficial or lower
  • will mean the encoder might produce output that is not supported by all
  • spec-compliant decoders. Decoders don't differentiate between normal,
  • unofficial and experimental (that is, they always try to decode things
  • when they can) unless they are explicitly asked to behave stupidly
  • (=strictly conform to the specs)
  • This may only be set to one of the FF_COMPLIANCE_* values in defs.h.

func (*CAVCodecContext) SetSubCharenc added in v0.0.4

func (codecCtx *CAVCodecContext) SetSubCharenc(subCharenc string)

*

  • Character encoding of the input subtitles file.
  • - decoding: set by user
  • - encoding: unused

func (*CAVCodecContext) SetSubCharencMode added in v0.0.4

func (codecCtx *CAVCodecContext) SetSubCharencMode(subCharencMode int)

*

  • Subtitles character encoding mode. Formats or codecs might be adjusting
  • this setting (if they are doing the conversion themselves for instance).
  • - decoding: set by libavcodec
  • - encoding: unused

func (*CAVCodecContext) SetSubtitleHeader added in v0.0.4

func (codecCtx *CAVCodecContext) SetSubtitleHeader(subtitleHeader unsafe.Pointer)

*

  • Header containing style information for text subtitles.
  • For SUBTITLE_ASS subtitle type, it should contain the whole ASS
  • [Script Info] and [V4+ Styles] section, plus the [Events] line and
  • the Format line following. It shouldn't include any Dialogue line.
  • - encoding: Set/allocated/freed by user (before avcodec_open2())
  • - decoding: Set/allocated/freed by libavcodec (by avcodec_open2())

func (*CAVCodecContext) SetSubtitleHeaderSize added in v0.0.4

func (codecCtx *CAVCodecContext) SetSubtitleHeaderSize(subtitleHeaderSize int)

func (*CAVCodecContext) SetSwPixFmt added in v0.0.4

func (codecCtx *CAVCodecContext) SetSwPixFmt(swPixFmt avutil.CAVPixelFormat)

*

  • Nominal unaccelerated pixel format, see AV_PIX_FMT_xxx.
  • - encoding: unused.
  • - decoding: Set by libavcodec before calling get_format()

func (*CAVCodecContext) SetTemporalCplxMasking added in v0.0.4

func (codecCtx *CAVCodecContext) SetTemporalCplxMasking(temporalCplxMasking float32)

* * temporary complexity masking (0-> disabled) * - encoding: Set by user. * - decoding: unused

func (*CAVCodecContext) SetThreadCount added in v0.0.4

func (codecCtx *CAVCodecContext) SetThreadCount(threadCount int)

*

  • thread count
  • is used to decide how many independent tasks should be passed to execute()
  • - encoding: Set by user.
  • - decoding: Set by user.

func (*CAVCodecContext) SetThreadType added in v0.0.4

func (codecCtx *CAVCodecContext) SetThreadType(threadType int)

*

  • Which multithreading methods to use.
  • Use of FF_THREAD_FRAME will increase decoding delay by one frame per thread,
  • so clients which cannot provide future frames should not use it. *
  • - encoding: Set by user, otherwise the default is used.
  • - decoding: Set by user, otherwise the default is used.

func (*CAVCodecContext) SetTimeBase

func (codecCtx *CAVCodecContext) SetTimeBase(timeBase avutil.CAVRational)

*

  • This is the fundamental unit of time (in seconds) in terms
  • of which frame timestamps are represented. For fixed-fps content,
  • timebase should be 1/framerate and timestamp increments should be
  • identically 1.
  • This often, but not always is the inverse of the frame rate or field rate
  • for video. 1/time_base is not the average frame rate if the frame rate is not
  • constant. *
  • Like containers, elementary streams also can store timestamps, 1/time_base
  • is the unit in which these timestamps are specified.
  • As example of such codec time base see ISO/IEC 14496-2:2001(E)
  • vop_time_increment_resolution and fixed_vop_rate
  • (fixed_vop_rate == 0 implies that it is different from the framerate) *
  • - encoding: MUST be set by user.
  • - decoding: unused.

func (*CAVCodecContext) SetTrailingPadding added in v0.0.4

func (codecCtx *CAVCodecContext) SetTrailingPadding(trailingPadding int)

*

  • Audio only. The amount of padding (in samples) appended by the encoder to
  • the end of the audio. I.e. this number of decoded samples must be
  • discarded by the caller from the end of the stream to get the original
  • audio without any trailing padding. *
  • - decoding: unused
  • - encoding: unused

func (*CAVCodecContext) SetTrellis added in v0.0.4

func (codecCtx *CAVCodecContext) SetTrellis(trellis int)

*

  • trellis RD quantization
  • - encoding: Set by user.
  • - decoding: unused

func (*CAVCodecContext) SetWidth

func (codecCtx *CAVCodecContext) SetWidth(width int)

*

  • picture width / height. *
  • @note Those fields may not match the values of the last
  • AVFrame output by avcodec_receive_frame() due frame
  • reordering. *
  • - encoding: MUST be set by user.
  • - decoding: May be set by the user before opening the decoder if known e.g.
  • from the container. Some decoders will require the dimensions
  • to be set by the caller. During decoding, the decoder may
  • overwrite those values as required while parsing the data.

func (*CAVCodecContext) SetWorkaroundBugs added in v0.0.4

func (codecCtx *CAVCodecContext) SetWorkaroundBugs(workaroundBugs int)

*

  • Work around bugs in encoders which sometimes cannot be detected automatically.
  • - encoding: Set by user
  • - decoding: Set by user

type CAVCodecDescriptor added in v0.0.4

type CAVCodecDescriptor C.AVCodecDescriptor

*

  • This struct describes the properties of a single codec described by an
  • AVCodecID.
  • @see avcodec_descriptor_get()

func AvcodecDescriptorGet added in v0.0.4

func AvcodecDescriptorGet(id CAVCodecID) *CAVCodecDescriptor

*

  • @return descriptor for given codec ID or NULL if no descriptor exists.

func AvcodecDescriptorGetByName added in v0.0.4

func AvcodecDescriptorGetByName(name string) *CAVCodecDescriptor

*

  • @return codec descriptor with the given name or NULL if no such descriptor
  • exists.

func AvcodecDescriptorNext added in v0.0.4

func AvcodecDescriptorNext(prev *CAVCodecDescriptor) *CAVCodecDescriptor

*

  • Iterate over all codec descriptors known to libavcodec. *
  • @param prev previous descriptor. NULL to get the first descriptor. *
  • @return next descriptor or NULL after the last descriptor

func (*CAVCodecDescriptor) GetId added in v0.0.4

func (cd *CAVCodecDescriptor) GetId() CAVCodecID

func (*CAVCodecDescriptor) GetLongName added in v0.0.4

func (cd *CAVCodecDescriptor) GetLongName() string

*

  • A more descriptive name for this codec. May be NULL.

func (*CAVCodecDescriptor) GetMimeTypes added in v0.0.4

func (cd *CAVCodecDescriptor) GetMimeTypes() string

*

  • MIME type(s) associated with the codec.
  • May be NULL; if not, a NULL-terminated array of MIME types.
  • The first item is always non-NULL and is the preferred MIME type.

func (*CAVCodecDescriptor) GetName added in v0.0.4

func (cd *CAVCodecDescriptor) GetName() string

*

  • Name of the codec described by this descriptor. It is non-empty and
  • unique for each codec descriptor. It should contain alphanumeric
  • characters and '_' only.

func (*CAVCodecDescriptor) GetProfiles added in v0.0.4

func (cd *CAVCodecDescriptor) GetProfiles() *CAVProfile

*

  • If non-NULL, an array of profiles recognized for this codec.
  • Terminated with AV_PROFILE_UNKNOWN.

func (*CAVCodecDescriptor) GetProps added in v0.0.4

func (cd *CAVCodecDescriptor) GetProps() int

*

  • Codec properties, a combination of AV_CODEC_PROP_* flags.

func (*CAVCodecDescriptor) GetType added in v0.0.4

func (cd *CAVCodecDescriptor) GetType() avutil.CAVMediaType

func (*CAVCodecDescriptor) SetId added in v0.0.4

func (cd *CAVCodecDescriptor) SetId(id CAVCodecID)

func (*CAVCodecDescriptor) SetProps added in v0.0.4

func (cd *CAVCodecDescriptor) SetProps(props int)

*

  • Codec properties, a combination of AV_CODEC_PROP_* flags.

func (*CAVCodecDescriptor) SetType added in v0.0.4

func (cd *CAVCodecDescriptor) SetType(_type avutil.CAVMediaType)

type CAVCodecHWConfig added in v0.0.4

type CAVCodecHWConfig C.AVCodecHWConfig

func AvcodecGetHwConfig added in v0.0.4

func AvcodecGetHwConfig(codec *CAVCodec, index int) *CAVCodecHWConfig

*

  • Retrieve supported hardware configurations for a codec. *
  • Values of index from zero to some maximum return the indexed configuration
  • descriptor; all other values return NULL. If the codec does not support
  • any hardware configurations then it will always return NULL.

func (CAVCodecHWConfig) GetDeviceType added in v0.0.4

func (hwconfig CAVCodecHWConfig) GetDeviceType() C.enum_AVHWDeviceType

*

  • The device type associated with the configuration. *
  • Must be set for AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX and
  • AV_CODEC_HW_CONFIG_METHOD_HW_FRAMES_CTX, otherwise unused.

func (CAVCodecHWConfig) GetMethods added in v0.0.4

func (hwconfig CAVCodecHWConfig) GetMethods() int

*

  • Bit set of AV_CODEC_HW_CONFIG_METHOD_* flags, describing the possible
  • setup methods which can be used with this configuration.

func (CAVCodecHWConfig) GetPixFmt added in v0.0.4

func (hwconfig CAVCodecHWConfig) GetPixFmt() avutil.CAVPixelFormat

*

  • For decoders, a hardware pixel format which that decoder may be
  • able to decode to if suitable hardware is available. *
  • For encoders, a pixel format which the encoder may be able to
  • accept. If set to AV_PIX_FMT_NONE, this applies to all pixel
  • formats supported by the codec.

func (*CAVCodecHWConfig) SetDeviceType added in v0.0.4

func (hwconfig *CAVCodecHWConfig) SetDeviceType(deviceType C.enum_AVHWDeviceType)

*

  • The device type associated with the configuration. *
  • Must be set for AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX and
  • AV_CODEC_HW_CONFIG_METHOD_HW_FRAMES_CTX, otherwise unused.

func (*CAVCodecHWConfig) SetMethods added in v0.0.4

func (hwconfig *CAVCodecHWConfig) SetMethods(methods int)

*

  • Bit set of AV_CODEC_HW_CONFIG_METHOD_* flags, describing the possible
  • setup methods which can be used with this configuration.

func (*CAVCodecHWConfig) SetPixFmt added in v0.0.4

func (hwconfig *CAVCodecHWConfig) SetPixFmt(pixFmt avutil.CAVPixelFormat)

*

  • For decoders, a hardware pixel format which that decoder may be
  • able to decode to if suitable hardware is available. *
  • For encoders, a pixel format which the encoder may be able to
  • accept. If set to AV_PIX_FMT_NONE, this applies to all pixel
  • formats supported by the codec.

type CAVCodecID

type CAVCodecID C.enum_AVCodecID
const (
	AV_CODEC_ID_NONE CAVCodecID = C.AV_CODEC_ID_NONE

	/* video codecs */
	AV_CODEC_ID_MPEG1VIDEO      CAVCodecID = C.AV_CODEC_ID_MPEG1VIDEO
	AV_CODEC_ID_MPEG2VIDEO      CAVCodecID = C.AV_CODEC_ID_MPEG2VIDEO ///< preferred ID for MPEG-1/2 video decoding
	AV_CODEC_ID_H261            CAVCodecID = C.AV_CODEC_ID_H261
	AV_CODEC_ID_H263            CAVCodecID = C.AV_CODEC_ID_H263
	AV_CODEC_ID_RV10            CAVCodecID = C.AV_CODEC_ID_RV10
	AV_CODEC_ID_RV20            CAVCodecID = C.AV_CODEC_ID_RV20
	AV_CODEC_ID_MJPEG           CAVCodecID = C.AV_CODEC_ID_MJPEG
	AV_CODEC_ID_MJPEGB          CAVCodecID = C.AV_CODEC_ID_MJPEGB
	AV_CODEC_ID_LJPEG           CAVCodecID = C.AV_CODEC_ID_LJPEG
	AV_CODEC_ID_SP5X            CAVCodecID = C.AV_CODEC_ID_SP5X
	AV_CODEC_ID_JPEGLS          CAVCodecID = C.AV_CODEC_ID_JPEGLS
	AV_CODEC_ID_MPEG4           CAVCodecID = C.AV_CODEC_ID_MPEG4
	AV_CODEC_ID_RAWVIDEO        CAVCodecID = C.AV_CODEC_ID_RAWVIDEO
	AV_CODEC_ID_MSMPEG4V1       CAVCodecID = C.AV_CODEC_ID_MSMPEG4V1
	AV_CODEC_ID_MSMPEG4V2       CAVCodecID = C.AV_CODEC_ID_MSMPEG4V2
	AV_CODEC_ID_MSMPEG4V3       CAVCodecID = C.AV_CODEC_ID_MSMPEG4V3
	AV_CODEC_ID_WMV1            CAVCodecID = C.AV_CODEC_ID_WMV1
	AV_CODEC_ID_WMV2            CAVCodecID = C.AV_CODEC_ID_WMV2
	AV_CODEC_ID_H263P           CAVCodecID = C.AV_CODEC_ID_H263P
	AV_CODEC_ID_H263I           CAVCodecID = C.AV_CODEC_ID_H263I
	AV_CODEC_ID_FLV1            CAVCodecID = C.AV_CODEC_ID_FLV1
	AV_CODEC_ID_SVQ1            CAVCodecID = C.AV_CODEC_ID_SVQ1
	AV_CODEC_ID_SVQ3            CAVCodecID = C.AV_CODEC_ID_SVQ3
	AV_CODEC_ID_DVVIDEO         CAVCodecID = C.AV_CODEC_ID_DVVIDEO
	AV_CODEC_ID_HUFFYUV         CAVCodecID = C.AV_CODEC_ID_HUFFYUV
	AV_CODEC_ID_CYUV            CAVCodecID = C.AV_CODEC_ID_CYUV
	AV_CODEC_ID_H264            CAVCodecID = C.AV_CODEC_ID_H264
	AV_CODEC_ID_INDEO3          CAVCodecID = C.AV_CODEC_ID_INDEO3
	AV_CODEC_ID_VP3             CAVCodecID = C.AV_CODEC_ID_VP3
	AV_CODEC_ID_THEORA          CAVCodecID = C.AV_CODEC_ID_THEORA
	AV_CODEC_ID_ASV1            CAVCodecID = C.AV_CODEC_ID_ASV1
	AV_CODEC_ID_ASV2            CAVCodecID = C.AV_CODEC_ID_ASV2
	AV_CODEC_ID_FFV1            CAVCodecID = C.AV_CODEC_ID_FFV1
	AV_CODEC_ID_4XM             CAVCodecID = C.AV_CODEC_ID_4XM
	AV_CODEC_ID_VCR1            CAVCodecID = C.AV_CODEC_ID_VCR1
	AV_CODEC_ID_CLJR            CAVCodecID = C.AV_CODEC_ID_CLJR
	AV_CODEC_ID_MDEC            CAVCodecID = C.AV_CODEC_ID_MDEC
	AV_CODEC_ID_ROQ             CAVCodecID = C.AV_CODEC_ID_ROQ
	AV_CODEC_ID_INTERPLAY_VIDEO CAVCodecID = C.AV_CODEC_ID_INTERPLAY_VIDEO
	AV_CODEC_ID_XAN_WC3         CAVCodecID = C.AV_CODEC_ID_XAN_WC3
	AV_CODEC_ID_XAN_WC4         CAVCodecID = C.AV_CODEC_ID_XAN_WC4
	AV_CODEC_ID_RPZA            CAVCodecID = C.AV_CODEC_ID_RPZA
	AV_CODEC_ID_CINEPAK         CAVCodecID = C.AV_CODEC_ID_CINEPAK
	AV_CODEC_ID_WS_VQA          CAVCodecID = C.AV_CODEC_ID_WS_VQA
	AV_CODEC_ID_MSRLE           CAVCodecID = C.AV_CODEC_ID_MSRLE
	AV_CODEC_ID_MSVIDEO1        CAVCodecID = C.AV_CODEC_ID_MSVIDEO1
	AV_CODEC_ID_IDCIN           CAVCodecID = C.AV_CODEC_ID_IDCIN
	AV_CODEC_ID_8BPS            CAVCodecID = C.AV_CODEC_ID_8BPS
	AV_CODEC_ID_SMC             CAVCodecID = C.AV_CODEC_ID_SMC
	AV_CODEC_ID_FLIC            CAVCodecID = C.AV_CODEC_ID_FLIC
	AV_CODEC_ID_TRUEMOTION1     CAVCodecID = C.AV_CODEC_ID_TRUEMOTION1
	AV_CODEC_ID_VMDVIDEO        CAVCodecID = C.AV_CODEC_ID_VMDVIDEO
	AV_CODEC_ID_MSZH            CAVCodecID = C.AV_CODEC_ID_MSZH
	AV_CODEC_ID_ZLIB            CAVCodecID = C.AV_CODEC_ID_ZLIB
	AV_CODEC_ID_QTRLE           CAVCodecID = C.AV_CODEC_ID_QTRLE
	AV_CODEC_ID_TSCC            CAVCodecID = C.AV_CODEC_ID_TSCC
	AV_CODEC_ID_ULTI            CAVCodecID = C.AV_CODEC_ID_ULTI
	AV_CODEC_ID_QDRAW           CAVCodecID = C.AV_CODEC_ID_QDRAW
	AV_CODEC_ID_VIXL            CAVCodecID = C.AV_CODEC_ID_VIXL
	AV_CODEC_ID_QPEG            CAVCodecID = C.AV_CODEC_ID_QPEG
	AV_CODEC_ID_PNG             CAVCodecID = C.AV_CODEC_ID_PNG
	AV_CODEC_ID_PPM             CAVCodecID = C.AV_CODEC_ID_PPM
	AV_CODEC_ID_PBM             CAVCodecID = C.AV_CODEC_ID_PBM
	AV_CODEC_ID_PGM             CAVCodecID = C.AV_CODEC_ID_PGM
	AV_CODEC_ID_PGMYUV          CAVCodecID = C.AV_CODEC_ID_PGMYUV
	AV_CODEC_ID_PAM             CAVCodecID = C.AV_CODEC_ID_PAM
	AV_CODEC_ID_FFVHUFF         CAVCodecID = C.AV_CODEC_ID_FFVHUFF
	AV_CODEC_ID_RV30            CAVCodecID = C.AV_CODEC_ID_RV30
	AV_CODEC_ID_RV40            CAVCodecID = C.AV_CODEC_ID_RV40
	AV_CODEC_ID_VC1             CAVCodecID = C.AV_CODEC_ID_VC1
	AV_CODEC_ID_WMV3            CAVCodecID = C.AV_CODEC_ID_WMV3
	AV_CODEC_ID_LOCO            CAVCodecID = C.AV_CODEC_ID_LOCO
	AV_CODEC_ID_WNV1            CAVCodecID = C.AV_CODEC_ID_WNV1
	AV_CODEC_ID_AASC            CAVCodecID = C.AV_CODEC_ID_AASC
	AV_CODEC_ID_INDEO2          CAVCodecID = C.AV_CODEC_ID_INDEO2
	AV_CODEC_ID_FRAPS           CAVCodecID = C.AV_CODEC_ID_FRAPS
	AV_CODEC_ID_TRUEMOTION2     CAVCodecID = C.AV_CODEC_ID_TRUEMOTION2
	AV_CODEC_ID_BMP             CAVCodecID = C.AV_CODEC_ID_BMP
	AV_CODEC_ID_CSCD            CAVCodecID = C.AV_CODEC_ID_CSCD
	AV_CODEC_ID_MMVIDEO         CAVCodecID = C.AV_CODEC_ID_MMVIDEO
	AV_CODEC_ID_ZMBV            CAVCodecID = C.AV_CODEC_ID_ZMBV
	AV_CODEC_ID_AVS             CAVCodecID = C.AV_CODEC_ID_AVS
	AV_CODEC_ID_SMACKVIDEO      CAVCodecID = C.AV_CODEC_ID_SMACKVIDEO
	AV_CODEC_ID_NUV             CAVCodecID = C.AV_CODEC_ID_NUV
	AV_CODEC_ID_KMVC            CAVCodecID = C.AV_CODEC_ID_KMVC
	AV_CODEC_ID_FLASHSV         CAVCodecID = C.AV_CODEC_ID_FLASHSV
	AV_CODEC_ID_CAVS            CAVCodecID = C.AV_CODEC_ID_CAVS
	AV_CODEC_ID_JPEG2000        CAVCodecID = C.AV_CODEC_ID_JPEG2000
	AV_CODEC_ID_VMNC            CAVCodecID = C.AV_CODEC_ID_VMNC
	AV_CODEC_ID_VP5             CAVCodecID = C.AV_CODEC_ID_VP5
	AV_CODEC_ID_VP6             CAVCodecID = C.AV_CODEC_ID_VP6
	AV_CODEC_ID_VP6F            CAVCodecID = C.AV_CODEC_ID_VP6F
	AV_CODEC_ID_TARGA           CAVCodecID = C.AV_CODEC_ID_TARGA
	AV_CODEC_ID_DSICINVIDEO     CAVCodecID = C.AV_CODEC_ID_DSICINVIDEO
	AV_CODEC_ID_TIERTEXSEQVIDEO CAVCodecID = C.AV_CODEC_ID_TIERTEXSEQVIDEO
	AV_CODEC_ID_TIFF            CAVCodecID = C.AV_CODEC_ID_TIFF
	AV_CODEC_ID_GIF             CAVCodecID = C.AV_CODEC_ID_GIF
	AV_CODEC_ID_DXA             CAVCodecID = C.AV_CODEC_ID_DXA
	AV_CODEC_ID_DNXHD           CAVCodecID = C.AV_CODEC_ID_DNXHD
	AV_CODEC_ID_THP             CAVCodecID = C.AV_CODEC_ID_THP
	AV_CODEC_ID_SGI             CAVCodecID = C.AV_CODEC_ID_SGI
	AV_CODEC_ID_C93             CAVCodecID = C.AV_CODEC_ID_C93
	AV_CODEC_ID_BETHSOFTVID     CAVCodecID = C.AV_CODEC_ID_BETHSOFTVID
	AV_CODEC_ID_PTX             CAVCodecID = C.AV_CODEC_ID_PTX
	AV_CODEC_ID_TXD             CAVCodecID = C.AV_CODEC_ID_TXD
	AV_CODEC_ID_VP6A            CAVCodecID = C.AV_CODEC_ID_VP6A
	AV_CODEC_ID_AMV             CAVCodecID = C.AV_CODEC_ID_AMV
	AV_CODEC_ID_VB              CAVCodecID = C.AV_CODEC_ID_VB
	AV_CODEC_ID_PCX             CAVCodecID = C.AV_CODEC_ID_PCX
	AV_CODEC_ID_SUNRAST         CAVCodecID = C.AV_CODEC_ID_SUNRAST
	AV_CODEC_ID_INDEO4          CAVCodecID = C.AV_CODEC_ID_INDEO4
	AV_CODEC_ID_INDEO5          CAVCodecID = C.AV_CODEC_ID_INDEO5
	AV_CODEC_ID_MIMIC           CAVCodecID = C.AV_CODEC_ID_MIMIC
	AV_CODEC_ID_RL2             CAVCodecID = C.AV_CODEC_ID_RL2
	AV_CODEC_ID_ESCAPE124       CAVCodecID = C.AV_CODEC_ID_ESCAPE124
	AV_CODEC_ID_DIRAC           CAVCodecID = C.AV_CODEC_ID_DIRAC
	AV_CODEC_ID_BFI             CAVCodecID = C.AV_CODEC_ID_BFI
	AV_CODEC_ID_CMV             CAVCodecID = C.AV_CODEC_ID_CMV
	AV_CODEC_ID_MOTIONPIXELS    CAVCodecID = C.AV_CODEC_ID_MOTIONPIXELS
	AV_CODEC_ID_TGV             CAVCodecID = C.AV_CODEC_ID_TGV
	AV_CODEC_ID_TGQ             CAVCodecID = C.AV_CODEC_ID_TGQ
	AV_CODEC_ID_TQI             CAVCodecID = C.AV_CODEC_ID_TQI
	AV_CODEC_ID_AURA            CAVCodecID = C.AV_CODEC_ID_AURA
	AV_CODEC_ID_AURA2           CAVCodecID = C.AV_CODEC_ID_AURA2
	AV_CODEC_ID_V210X           CAVCodecID = C.AV_CODEC_ID_V210X
	AV_CODEC_ID_TMV             CAVCodecID = C.AV_CODEC_ID_TMV
	AV_CODEC_ID_V210            CAVCodecID = C.AV_CODEC_ID_V210
	AV_CODEC_ID_DPX             CAVCodecID = C.AV_CODEC_ID_DPX
	AV_CODEC_ID_MAD             CAVCodecID = C.AV_CODEC_ID_MAD
	AV_CODEC_ID_FRWU            CAVCodecID = C.AV_CODEC_ID_FRWU
	AV_CODEC_ID_FLASHSV2        CAVCodecID = C.AV_CODEC_ID_FLASHSV2
	AV_CODEC_ID_CDGRAPHICS      CAVCodecID = C.AV_CODEC_ID_CDGRAPHICS
	AV_CODEC_ID_R210            CAVCodecID = C.AV_CODEC_ID_R210
	AV_CODEC_ID_ANM             CAVCodecID = C.AV_CODEC_ID_ANM
	AV_CODEC_ID_BINKVIDEO       CAVCodecID = C.AV_CODEC_ID_BINKVIDEO
	AV_CODEC_ID_IFF_ILBM        CAVCodecID = C.AV_CODEC_ID_IFF_ILBM
	AV_CODEC_ID_IFF_BYTERUN1    CAVCodecID = C.AV_CODEC_ID_IFF_ILBM
	AV_CODEC_ID_KGV1            CAVCodecID = C.AV_CODEC_ID_KGV1
	AV_CODEC_ID_YOP             CAVCodecID = C.AV_CODEC_ID_YOP
	AV_CODEC_ID_VP8             CAVCodecID = C.AV_CODEC_ID_VP8
	AV_CODEC_ID_PICTOR          CAVCodecID = C.AV_CODEC_ID_PICTOR
	AV_CODEC_ID_ANSI            CAVCodecID = C.AV_CODEC_ID_ANSI
	AV_CODEC_ID_A64_MULTI       CAVCodecID = C.AV_CODEC_ID_A64_MULTI
	AV_CODEC_ID_A64_MULTI5      CAVCodecID = C.AV_CODEC_ID_A64_MULTI5
	AV_CODEC_ID_R10K            CAVCodecID = C.AV_CODEC_ID_R10K
	AV_CODEC_ID_MXPEG           CAVCodecID = C.AV_CODEC_ID_MXPEG
	AV_CODEC_ID_LAGARITH        CAVCodecID = C.AV_CODEC_ID_LAGARITH
	AV_CODEC_ID_PRORES          CAVCodecID = C.AV_CODEC_ID_PRORES
	AV_CODEC_ID_JV              CAVCodecID = C.AV_CODEC_ID_JV
	AV_CODEC_ID_DFA             CAVCodecID = C.AV_CODEC_ID_DFA
	AV_CODEC_ID_WMV3IMAGE       CAVCodecID = C.AV_CODEC_ID_WMV3IMAGE
	AV_CODEC_ID_VC1IMAGE        CAVCodecID = C.AV_CODEC_ID_VC1IMAGE
	AV_CODEC_ID_UTVIDEO         CAVCodecID = C.AV_CODEC_ID_UTVIDEO
	AV_CODEC_ID_BMV_VIDEO       CAVCodecID = C.AV_CODEC_ID_BMV_VIDEO
	AV_CODEC_ID_VBLE            CAVCodecID = C.AV_CODEC_ID_VBLE
	AV_CODEC_ID_DXTORY          CAVCodecID = C.AV_CODEC_ID_DXTORY
	AV_CODEC_ID_V410            CAVCodecID = C.AV_CODEC_ID_V410
	AV_CODEC_ID_XWD             CAVCodecID = C.AV_CODEC_ID_XWD
	AV_CODEC_ID_CDXL            CAVCodecID = C.AV_CODEC_ID_CDXL
	AV_CODEC_ID_XBM             CAVCodecID = C.AV_CODEC_ID_XBM
	AV_CODEC_ID_ZEROCODEC       CAVCodecID = C.AV_CODEC_ID_ZEROCODEC
	AV_CODEC_ID_MSS1            CAVCodecID = C.AV_CODEC_ID_MSS1
	AV_CODEC_ID_MSA1            CAVCodecID = C.AV_CODEC_ID_MSA1
	AV_CODEC_ID_TSCC2           CAVCodecID = C.AV_CODEC_ID_TSCC2
	AV_CODEC_ID_MTS2            CAVCodecID = C.AV_CODEC_ID_MTS2
	AV_CODEC_ID_CLLC            CAVCodecID = C.AV_CODEC_ID_CLLC
	AV_CODEC_ID_MSS2            CAVCodecID = C.AV_CODEC_ID_MSS2
	AV_CODEC_ID_VP9             CAVCodecID = C.AV_CODEC_ID_VP9
	AV_CODEC_ID_AIC             CAVCodecID = C.AV_CODEC_ID_AIC
	AV_CODEC_ID_ESCAPE130       CAVCodecID = C.AV_CODEC_ID_ESCAPE130
	AV_CODEC_ID_G2M             CAVCodecID = C.AV_CODEC_ID_G2M
	AV_CODEC_ID_WEBP            CAVCodecID = C.AV_CODEC_ID_WEBP
	AV_CODEC_ID_HNM4_VIDEO      CAVCodecID = C.AV_CODEC_ID_HNM4_VIDEO
	AV_CODEC_ID_HEVC            CAVCodecID = C.AV_CODEC_ID_HEVC
	AV_CODEC_ID_H265            CAVCodecID = C.AV_CODEC_ID_H265
	AV_CODEC_ID_FIC             CAVCodecID = C.AV_CODEC_ID_FIC
	AV_CODEC_ID_ALIAS_PIX       CAVCodecID = C.AV_CODEC_ID_ALIAS_PIX
	AV_CODEC_ID_BRENDER_PIX     CAVCodecID = C.AV_CODEC_ID_BRENDER_PIX
	AV_CODEC_ID_PAF_VIDEO       CAVCodecID = C.AV_CODEC_ID_PAF_VIDEO
	AV_CODEC_ID_EXR             CAVCodecID = C.AV_CODEC_ID_EXR
	AV_CODEC_ID_VP7             CAVCodecID = C.AV_CODEC_ID_VP7
	AV_CODEC_ID_SANM            CAVCodecID = C.AV_CODEC_ID_SANM
	AV_CODEC_ID_SGIRLE          CAVCodecID = C.AV_CODEC_ID_SGIRLE
	AV_CODEC_ID_MVC1            CAVCodecID = C.AV_CODEC_ID_MVC1
	AV_CODEC_ID_MVC2            CAVCodecID = C.AV_CODEC_ID_MVC2
	AV_CODEC_ID_HQX             CAVCodecID = C.AV_CODEC_ID_HQX
	AV_CODEC_ID_TDSC            CAVCodecID = C.AV_CODEC_ID_TDSC
	AV_CODEC_ID_HQ_HQA          CAVCodecID = C.AV_CODEC_ID_HQ_HQA
	AV_CODEC_ID_HAP             CAVCodecID = C.AV_CODEC_ID_HAP
	AV_CODEC_ID_DDS             CAVCodecID = C.AV_CODEC_ID_DDS
	AV_CODEC_ID_DXV             CAVCodecID = C.AV_CODEC_ID_DXV
	AV_CODEC_ID_SCREENPRESSO    CAVCodecID = C.AV_CODEC_ID_SCREENPRESSO
	AV_CODEC_ID_RSCC            CAVCodecID = C.AV_CODEC_ID_RSCC
	AV_CODEC_ID_AVS2            CAVCodecID = C.AV_CODEC_ID_AVS2
	AV_CODEC_ID_PGX             CAVCodecID = C.AV_CODEC_ID_PGX
	AV_CODEC_ID_AVS3            CAVCodecID = C.AV_CODEC_ID_AVS3
	AV_CODEC_ID_MSP2            CAVCodecID = C.AV_CODEC_ID_MSP2
	AV_CODEC_ID_VVC             CAVCodecID = C.AV_CODEC_ID_VVC
	AV_CODEC_ID_H266            CAVCodecID = C.AV_CODEC_ID_H266
	AV_CODEC_ID_Y41P            CAVCodecID = C.AV_CODEC_ID_Y41P
	AV_CODEC_ID_AVRP            CAVCodecID = C.AV_CODEC_ID_AVRP
	AV_CODEC_ID_012V            CAVCodecID = C.AV_CODEC_ID_012V
	AV_CODEC_ID_AVUI            CAVCodecID = C.AV_CODEC_ID_AVUI

	AV_CODEC_ID_AYUV CAVCodecID = C.AV_CODEC_ID_AYUV

	AV_CODEC_ID_TARGA_Y216    CAVCodecID = C.AV_CODEC_ID_TARGA_Y216
	AV_CODEC_ID_V308          CAVCodecID = C.AV_CODEC_ID_V308
	AV_CODEC_ID_V408          CAVCodecID = C.AV_CODEC_ID_V408
	AV_CODEC_ID_YUV4          CAVCodecID = C.AV_CODEC_ID_YUV4
	AV_CODEC_ID_AVRN          CAVCodecID = C.AV_CODEC_ID_AVRN
	AV_CODEC_ID_CPIA          CAVCodecID = C.AV_CODEC_ID_CPIA
	AV_CODEC_ID_XFACE         CAVCodecID = C.AV_CODEC_ID_XFACE
	AV_CODEC_ID_SNOW          CAVCodecID = C.AV_CODEC_ID_SNOW
	AV_CODEC_ID_SMVJPEG       CAVCodecID = C.AV_CODEC_ID_SMVJPEG
	AV_CODEC_ID_APNG          CAVCodecID = C.AV_CODEC_ID_APNG
	AV_CODEC_ID_DAALA         CAVCodecID = C.AV_CODEC_ID_DAALA
	AV_CODEC_ID_CFHD          CAVCodecID = C.AV_CODEC_ID_CFHD
	AV_CODEC_ID_TRUEMOTION2RT CAVCodecID = C.AV_CODEC_ID_TRUEMOTION2RT
	AV_CODEC_ID_M101          CAVCodecID = C.AV_CODEC_ID_M101
	AV_CODEC_ID_MAGICYUV      CAVCodecID = C.AV_CODEC_ID_MAGICYUV
	AV_CODEC_ID_SHEERVIDEO    CAVCodecID = C.AV_CODEC_ID_SHEERVIDEO
	AV_CODEC_ID_YLC           CAVCodecID = C.AV_CODEC_ID_YLC
	AV_CODEC_ID_PSD           CAVCodecID = C.AV_CODEC_ID_PSD
	AV_CODEC_ID_PIXLET        CAVCodecID = C.AV_CODEC_ID_PIXLET
	AV_CODEC_ID_SPEEDHQ       CAVCodecID = C.AV_CODEC_ID_SPEEDHQ
	AV_CODEC_ID_FMVC          CAVCodecID = C.AV_CODEC_ID_FMVC
	AV_CODEC_ID_SCPR          CAVCodecID = C.AV_CODEC_ID_SCPR
	AV_CODEC_ID_CLEARVIDEO    CAVCodecID = C.AV_CODEC_ID_CLEARVIDEO
	AV_CODEC_ID_XPM           CAVCodecID = C.AV_CODEC_ID_XPM
	AV_CODEC_ID_AV1           CAVCodecID = C.AV_CODEC_ID_AV1
	AV_CODEC_ID_BITPACKED     CAVCodecID = C.AV_CODEC_ID_BITPACKED
	AV_CODEC_ID_MSCC          CAVCodecID = C.AV_CODEC_ID_MSCC
	AV_CODEC_ID_SRGC          CAVCodecID = C.AV_CODEC_ID_SRGC
	AV_CODEC_ID_SVG           CAVCodecID = C.AV_CODEC_ID_SVG
	AV_CODEC_ID_GDV           CAVCodecID = C.AV_CODEC_ID_GDV
	AV_CODEC_ID_FITS          CAVCodecID = C.AV_CODEC_ID_FITS
	AV_CODEC_ID_IMM4          CAVCodecID = C.AV_CODEC_ID_IMM4
	AV_CODEC_ID_PROSUMER      CAVCodecID = C.AV_CODEC_ID_PROSUMER
	AV_CODEC_ID_MWSC          CAVCodecID = C.AV_CODEC_ID_MWSC
	AV_CODEC_ID_WCMV          CAVCodecID = C.AV_CODEC_ID_WCMV
	AV_CODEC_ID_RASC          CAVCodecID = C.AV_CODEC_ID_RASC
	AV_CODEC_ID_HYMT          CAVCodecID = C.AV_CODEC_ID_HYMT
	AV_CODEC_ID_ARBC          CAVCodecID = C.AV_CODEC_ID_ARBC
	AV_CODEC_ID_AGM           CAVCodecID = C.AV_CODEC_ID_AGM
	AV_CODEC_ID_LSCR          CAVCodecID = C.AV_CODEC_ID_LSCR
	AV_CODEC_ID_VP4           CAVCodecID = C.AV_CODEC_ID_VP4
	AV_CODEC_ID_IMM5          CAVCodecID = C.AV_CODEC_ID_IMM5
	AV_CODEC_ID_MVDV          CAVCodecID = C.AV_CODEC_ID_MVDV
	AV_CODEC_ID_MVHA          CAVCodecID = C.AV_CODEC_ID_MVHA
	AV_CODEC_ID_CDTOONS       CAVCodecID = C.AV_CODEC_ID_CDTOONS
	AV_CODEC_ID_MV30          CAVCodecID = C.AV_CODEC_ID_MV30
	AV_CODEC_ID_NOTCHLC       CAVCodecID = C.AV_CODEC_ID_NOTCHLC
	AV_CODEC_ID_PFM           CAVCodecID = C.AV_CODEC_ID_PFM
	AV_CODEC_ID_MOBICLIP      CAVCodecID = C.AV_CODEC_ID_MOBICLIP
	AV_CODEC_ID_PHOTOCD       CAVCodecID = C.AV_CODEC_ID_PHOTOCD
	AV_CODEC_ID_IPU           CAVCodecID = C.AV_CODEC_ID_IPU
	AV_CODEC_ID_ARGO          CAVCodecID = C.AV_CODEC_ID_ARGO
	AV_CODEC_ID_CRI           CAVCodecID = C.AV_CODEC_ID_CRI
	AV_CODEC_ID_SIMBIOSIS_IMX CAVCodecID = C.AV_CODEC_ID_SIMBIOSIS_IMX
	AV_CODEC_ID_SGA_VIDEO     CAVCodecID = C.AV_CODEC_ID_SGA_VIDEO
	AV_CODEC_ID_GEM           CAVCodecID = C.AV_CODEC_ID_GEM
	AV_CODEC_ID_VBN           CAVCodecID = C.AV_CODEC_ID_VBN
	AV_CODEC_ID_JPEGXL        CAVCodecID = C.AV_CODEC_ID_JPEGXL
	AV_CODEC_ID_QOI           CAVCodecID = C.AV_CODEC_ID_QOI
	AV_CODEC_ID_PHM           CAVCodecID = C.AV_CODEC_ID_PHM
	AV_CODEC_ID_RADIANCE_HDR  CAVCodecID = C.AV_CODEC_ID_RADIANCE_HDR
	AV_CODEC_ID_WBMP          CAVCodecID = C.AV_CODEC_ID_WBMP
	AV_CODEC_ID_MEDIA100      CAVCodecID = C.AV_CODEC_ID_MEDIA100
	AV_CODEC_ID_VQC           CAVCodecID = C.AV_CODEC_ID_VQC
	AV_CODEC_ID_PDV           CAVCodecID = C.AV_CODEC_ID_PDV
	AV_CODEC_ID_EVC           CAVCodecID = C.AV_CODEC_ID_EVC
	AV_CODEC_ID_RTV1          CAVCodecID = C.AV_CODEC_ID_RTV1
	AV_CODEC_ID_VMIX          CAVCodecID = C.AV_CODEC_ID_VMIX

	/* various PCM "codecs" */
	AV_CODEC_ID_FIRST_AUDIO      CAVCodecID = C.AV_CODEC_ID_FIRST_AUDIO ///< A dummy id pointing at the start of audio codecs
	AV_CODEC_ID_PCM_S16LE        CAVCodecID = C.AV_CODEC_ID_PCM_S16LE
	AV_CODEC_ID_PCM_S16BE        CAVCodecID = C.AV_CODEC_ID_PCM_S16BE
	AV_CODEC_ID_PCM_U16LE        CAVCodecID = C.AV_CODEC_ID_PCM_U16LE
	AV_CODEC_ID_PCM_U16BE        CAVCodecID = C.AV_CODEC_ID_PCM_U16BE
	AV_CODEC_ID_PCM_S8           CAVCodecID = C.AV_CODEC_ID_PCM_S8
	AV_CODEC_ID_PCM_U8           CAVCodecID = C.AV_CODEC_ID_PCM_U8
	AV_CODEC_ID_PCM_MULAW        CAVCodecID = C.AV_CODEC_ID_PCM_MULAW
	AV_CODEC_ID_PCM_ALAW         CAVCodecID = C.AV_CODEC_ID_PCM_ALAW
	AV_CODEC_ID_PCM_S32LE        CAVCodecID = C.AV_CODEC_ID_PCM_S32LE
	AV_CODEC_ID_PCM_S32BE        CAVCodecID = C.AV_CODEC_ID_PCM_S32BE
	AV_CODEC_ID_PCM_U32LE        CAVCodecID = C.AV_CODEC_ID_PCM_U32LE
	AV_CODEC_ID_PCM_U32BE        CAVCodecID = C.AV_CODEC_ID_PCM_U32BE
	AV_CODEC_ID_PCM_S24LE        CAVCodecID = C.AV_CODEC_ID_PCM_S24LE
	AV_CODEC_ID_PCM_S24BE        CAVCodecID = C.AV_CODEC_ID_PCM_S24BE
	AV_CODEC_ID_PCM_U24LE        CAVCodecID = C.AV_CODEC_ID_PCM_U24LE
	AV_CODEC_ID_PCM_U24BE        CAVCodecID = C.AV_CODEC_ID_PCM_U24BE
	AV_CODEC_ID_PCM_S24DAUD      CAVCodecID = C.AV_CODEC_ID_PCM_S24DAUD
	AV_CODEC_ID_PCM_ZORK         CAVCodecID = C.AV_CODEC_ID_PCM_ZORK
	AV_CODEC_ID_PCM_S16LE_PLANAR CAVCodecID = C.AV_CODEC_ID_PCM_S16LE_PLANAR
	AV_CODEC_ID_PCM_DVD          CAVCodecID = C.AV_CODEC_ID_PCM_DVD
	AV_CODEC_ID_PCM_F32BE        CAVCodecID = C.AV_CODEC_ID_PCM_F32BE
	AV_CODEC_ID_PCM_F32LE        CAVCodecID = C.AV_CODEC_ID_PCM_F32LE
	AV_CODEC_ID_PCM_F64BE        CAVCodecID = C.AV_CODEC_ID_PCM_F64BE
	AV_CODEC_ID_PCM_F64LE        CAVCodecID = C.AV_CODEC_ID_PCM_F64LE
	AV_CODEC_ID_PCM_BLURAY       CAVCodecID = C.AV_CODEC_ID_PCM_BLURAY
	AV_CODEC_ID_PCM_LXF          CAVCodecID = C.AV_CODEC_ID_PCM_LXF
	AV_CODEC_ID_S302M            CAVCodecID = C.AV_CODEC_ID_S302M
	AV_CODEC_ID_PCM_S8_PLANAR    CAVCodecID = C.AV_CODEC_ID_PCM_S8_PLANAR
	AV_CODEC_ID_PCM_S24LE_PLANAR CAVCodecID = C.AV_CODEC_ID_PCM_S24LE_PLANAR
	AV_CODEC_ID_PCM_S32LE_PLANAR CAVCodecID = C.AV_CODEC_ID_PCM_S32LE_PLANAR
	AV_CODEC_ID_PCM_S16BE_PLANAR CAVCodecID = C.AV_CODEC_ID_PCM_S16BE_PLANAR
	AV_CODEC_ID_PCM_S64LE        CAVCodecID = C.AV_CODEC_ID_PCM_S64LE
	AV_CODEC_ID_PCM_S64BE        CAVCodecID = C.AV_CODEC_ID_PCM_S64BE
	AV_CODEC_ID_PCM_F16LE        CAVCodecID = C.AV_CODEC_ID_PCM_F16LE
	AV_CODEC_ID_PCM_F24LE        CAVCodecID = C.AV_CODEC_ID_PCM_F24LE
	AV_CODEC_ID_PCM_VIDC         CAVCodecID = C.AV_CODEC_ID_PCM_VIDC
	AV_CODEC_ID_PCM_SGA          CAVCodecID = C.AV_CODEC_ID_PCM_SGA

	/* various ADPCM codecs */
	AV_CODEC_ID_ADPCM_IMA_QT      CAVCodecID = C.AV_CODEC_ID_ADPCM_IMA_QT
	AV_CODEC_ID_ADPCM_IMA_WAV     CAVCodecID = C.AV_CODEC_ID_ADPCM_IMA_WAV
	AV_CODEC_ID_ADPCM_IMA_DK3     CAVCodecID = C.AV_CODEC_ID_ADPCM_IMA_DK3
	AV_CODEC_ID_ADPCM_IMA_DK4     CAVCodecID = C.AV_CODEC_ID_ADPCM_IMA_DK4
	AV_CODEC_ID_ADPCM_IMA_WS      CAVCodecID = C.AV_CODEC_ID_ADPCM_IMA_WS
	AV_CODEC_ID_ADPCM_IMA_SMJPEG  CAVCodecID = C.AV_CODEC_ID_ADPCM_IMA_SMJPEG
	AV_CODEC_ID_ADPCM_MS          CAVCodecID = C.AV_CODEC_ID_ADPCM_MS
	AV_CODEC_ID_ADPCM_4XM         CAVCodecID = C.AV_CODEC_ID_ADPCM_4XM
	AV_CODEC_ID_ADPCM_XA          CAVCodecID = C.AV_CODEC_ID_ADPCM_XA
	AV_CODEC_ID_ADPCM_ADX         CAVCodecID = C.AV_CODEC_ID_ADPCM_ADX
	AV_CODEC_ID_ADPCM_EA          CAVCodecID = C.AV_CODEC_ID_ADPCM_EA
	AV_CODEC_ID_ADPCM_G726        CAVCodecID = C.AV_CODEC_ID_ADPCM_G726
	AV_CODEC_ID_ADPCM_CT          CAVCodecID = C.AV_CODEC_ID_ADPCM_CT
	AV_CODEC_ID_ADPCM_SWF         CAVCodecID = C.AV_CODEC_ID_ADPCM_SWF
	AV_CODEC_ID_ADPCM_YAMAHA      CAVCodecID = C.AV_CODEC_ID_ADPCM_YAMAHA
	AV_CODEC_ID_ADPCM_SBPRO_4     CAVCodecID = C.AV_CODEC_ID_ADPCM_SBPRO_4
	AV_CODEC_ID_ADPCM_SBPRO_3     CAVCodecID = C.AV_CODEC_ID_ADPCM_SBPRO_3
	AV_CODEC_ID_ADPCM_SBPRO_2     CAVCodecID = C.AV_CODEC_ID_ADPCM_SBPRO_2
	AV_CODEC_ID_ADPCM_THP         CAVCodecID = C.AV_CODEC_ID_ADPCM_THP
	AV_CODEC_ID_ADPCM_IMA_AMV     CAVCodecID = C.AV_CODEC_ID_ADPCM_IMA_AMV
	AV_CODEC_ID_ADPCM_EA_R1       CAVCodecID = C.AV_CODEC_ID_ADPCM_EA_R1
	AV_CODEC_ID_ADPCM_EA_R3       CAVCodecID = C.AV_CODEC_ID_ADPCM_EA_R3
	AV_CODEC_ID_ADPCM_EA_R2       CAVCodecID = C.AV_CODEC_ID_ADPCM_EA_R2
	AV_CODEC_ID_ADPCM_IMA_EA_SEAD CAVCodecID = C.AV_CODEC_ID_ADPCM_IMA_EA_SEAD
	AV_CODEC_ID_ADPCM_IMA_EA_EACS CAVCodecID = C.AV_CODEC_ID_ADPCM_IMA_EA_EACS
	AV_CODEC_ID_ADPCM_EA_XAS      CAVCodecID = C.AV_CODEC_ID_ADPCM_EA_XAS
	AV_CODEC_ID_ADPCM_EA_MAXIS_XA CAVCodecID = C.AV_CODEC_ID_ADPCM_EA_MAXIS_XA
	AV_CODEC_ID_ADPCM_IMA_ISS     CAVCodecID = C.AV_CODEC_ID_ADPCM_IMA_ISS
	AV_CODEC_ID_ADPCM_G722        CAVCodecID = C.AV_CODEC_ID_ADPCM_G722
	AV_CODEC_ID_ADPCM_IMA_APC     CAVCodecID = C.AV_CODEC_ID_ADPCM_IMA_APC
	AV_CODEC_ID_ADPCM_VIMA        CAVCodecID = C.AV_CODEC_ID_ADPCM_VIMA
	AV_CODEC_ID_ADPCM_AFC         CAVCodecID = C.AV_CODEC_ID_ADPCM_AFC
	AV_CODEC_ID_ADPCM_IMA_OKI     CAVCodecID = C.AV_CODEC_ID_ADPCM_IMA_OKI
	AV_CODEC_ID_ADPCM_DTK         CAVCodecID = C.AV_CODEC_ID_ADPCM_DTK
	AV_CODEC_ID_ADPCM_IMA_RAD     CAVCodecID = C.AV_CODEC_ID_ADPCM_IMA_RAD
	AV_CODEC_ID_ADPCM_G726LE      CAVCodecID = C.AV_CODEC_ID_ADPCM_G726LE
	AV_CODEC_ID_ADPCM_THP_LE      CAVCodecID = C.AV_CODEC_ID_ADPCM_THP_LE
	AV_CODEC_ID_ADPCM_PSX         CAVCodecID = C.AV_CODEC_ID_ADPCM_PSX
	AV_CODEC_ID_ADPCM_AICA        CAVCodecID = C.AV_CODEC_ID_ADPCM_AICA
	AV_CODEC_ID_ADPCM_IMA_DAT4    CAVCodecID = C.AV_CODEC_ID_ADPCM_IMA_DAT4
	AV_CODEC_ID_ADPCM_MTAF        CAVCodecID = C.AV_CODEC_ID_ADPCM_MTAF
	AV_CODEC_ID_ADPCM_AGM         CAVCodecID = C.AV_CODEC_ID_ADPCM_AGM
	AV_CODEC_ID_ADPCM_ARGO        CAVCodecID = C.AV_CODEC_ID_ADPCM_ARGO
	AV_CODEC_ID_ADPCM_IMA_SSI     CAVCodecID = C.AV_CODEC_ID_ADPCM_IMA_SSI
	AV_CODEC_ID_ADPCM_ZORK        CAVCodecID = C.AV_CODEC_ID_ADPCM_ZORK
	AV_CODEC_ID_ADPCM_IMA_APM     CAVCodecID = C.AV_CODEC_ID_ADPCM_IMA_APM
	AV_CODEC_ID_ADPCM_IMA_ALP     CAVCodecID = C.AV_CODEC_ID_ADPCM_IMA_ALP
	AV_CODEC_ID_ADPCM_IMA_MTF     CAVCodecID = C.AV_CODEC_ID_ADPCM_IMA_MTF
	AV_CODEC_ID_ADPCM_IMA_CUNNING CAVCodecID = C.AV_CODEC_ID_ADPCM_IMA_CUNNING
	AV_CODEC_ID_ADPCM_IMA_MOFLEX  CAVCodecID = C.AV_CODEC_ID_ADPCM_IMA_MOFLEX
	AV_CODEC_ID_ADPCM_IMA_ACORN   CAVCodecID = C.AV_CODEC_ID_ADPCM_IMA_ACORN
	AV_CODEC_ID_ADPCM_XMD         CAVCodecID = C.AV_CODEC_ID_ADPCM_XMD

	/* AMR */
	AV_CODEC_ID_AMR_NB CAVCodecID = C.AV_CODEC_ID_AMR_NB
	AV_CODEC_ID_AMR_WB CAVCodecID = C.AV_CODEC_ID_AMR_WB

	/* RealAudio codecs*/
	AV_CODEC_ID_RA_144 CAVCodecID = C.AV_CODEC_ID_RA_144
	AV_CODEC_ID_RA_288 CAVCodecID = C.AV_CODEC_ID_RA_288

	/* various DPCM codecs */
	AV_CODEC_ID_ROQ_DPCM       CAVCodecID = C.AV_CODEC_ID_ROQ_DPCM
	AV_CODEC_ID_INTERPLAY_DPCM CAVCodecID = C.AV_CODEC_ID_INTERPLAY_DPCM
	AV_CODEC_ID_XAN_DPCM       CAVCodecID = C.AV_CODEC_ID_XAN_DPCM
	AV_CODEC_ID_SOL_DPCM       CAVCodecID = C.AV_CODEC_ID_SOL_DPCM
	AV_CODEC_ID_SDX2_DPCM      CAVCodecID = C.AV_CODEC_ID_SDX2_DPCM
	AV_CODEC_ID_GREMLIN_DPCM   CAVCodecID = C.AV_CODEC_ID_GREMLIN_DPCM
	AV_CODEC_ID_DERF_DPCM      CAVCodecID = C.AV_CODEC_ID_DERF_DPCM
	AV_CODEC_ID_WADY_DPCM      CAVCodecID = C.AV_CODEC_ID_WADY_DPCM
	AV_CODEC_ID_CBD2_DPCM      CAVCodecID = C.AV_CODEC_ID_CBD2_DPCM

	/* audio codecs */
	AV_CODEC_ID_MP2             CAVCodecID = C.AV_CODEC_ID_MP2
	AV_CODEC_ID_MP3             CAVCodecID = C.AV_CODEC_ID_MP3 ///< preferred ID for decoding MPEG audio layer 1 2 or 3
	AV_CODEC_ID_AAC             CAVCodecID = C.AV_CODEC_ID_AAC
	AV_CODEC_ID_AC3             CAVCodecID = C.AV_CODEC_ID_AC3
	AV_CODEC_ID_DTS             CAVCodecID = C.AV_CODEC_ID_DTS
	AV_CODEC_ID_VORBIS          CAVCodecID = C.AV_CODEC_ID_VORBIS
	AV_CODEC_ID_DVAUDIO         CAVCodecID = C.AV_CODEC_ID_DVAUDIO
	AV_CODEC_ID_WMAV1           CAVCodecID = C.AV_CODEC_ID_WMAV1
	AV_CODEC_ID_WMAV2           CAVCodecID = C.AV_CODEC_ID_WMAV2
	AV_CODEC_ID_MACE3           CAVCodecID = C.AV_CODEC_ID_MACE3
	AV_CODEC_ID_MACE6           CAVCodecID = C.AV_CODEC_ID_MACE6
	AV_CODEC_ID_VMDAUDIO        CAVCodecID = C.AV_CODEC_ID_VMDAUDIO
	AV_CODEC_ID_FLAC            CAVCodecID = C.AV_CODEC_ID_FLAC
	AV_CODEC_ID_MP3ADU          CAVCodecID = C.AV_CODEC_ID_MP3ADU
	AV_CODEC_ID_MP3ON4          CAVCodecID = C.AV_CODEC_ID_MP3ON4
	AV_CODEC_ID_SHORTEN         CAVCodecID = C.AV_CODEC_ID_SHORTEN
	AV_CODEC_ID_ALAC            CAVCodecID = C.AV_CODEC_ID_ALAC
	AV_CODEC_ID_WESTWOOD_SND1   CAVCodecID = C.AV_CODEC_ID_WESTWOOD_SND1
	AV_CODEC_ID_GSM             CAVCodecID = C.AV_CODEC_ID_GSM ///< as in Berlin toast format
	AV_CODEC_ID_QDM2            CAVCodecID = C.AV_CODEC_ID_QDM2
	AV_CODEC_ID_COOK            CAVCodecID = C.AV_CODEC_ID_COOK
	AV_CODEC_ID_TRUESPEECH      CAVCodecID = C.AV_CODEC_ID_TRUESPEECH
	AV_CODEC_ID_TTA             CAVCodecID = C.AV_CODEC_ID_TTA
	AV_CODEC_ID_SMACKAUDIO      CAVCodecID = C.AV_CODEC_ID_SMACKAUDIO
	AV_CODEC_ID_QCELP           CAVCodecID = C.AV_CODEC_ID_QCELP
	AV_CODEC_ID_WAVPACK         CAVCodecID = C.AV_CODEC_ID_WAVPACK
	AV_CODEC_ID_DSICINAUDIO     CAVCodecID = C.AV_CODEC_ID_DSICINAUDIO
	AV_CODEC_ID_IMC             CAVCodecID = C.AV_CODEC_ID_IMC
	AV_CODEC_ID_MUSEPACK7       CAVCodecID = C.AV_CODEC_ID_MUSEPACK7
	AV_CODEC_ID_MLP             CAVCodecID = C.AV_CODEC_ID_MLP
	AV_CODEC_ID_GSM_MS          CAVCodecID = C.AV_CODEC_ID_GSM_MS /* as found in WAV */
	AV_CODEC_ID_ATRAC3          CAVCodecID = C.AV_CODEC_ID_ATRAC3
	AV_CODEC_ID_APE             CAVCodecID = C.AV_CODEC_ID_APE
	AV_CODEC_ID_NELLYMOSER      CAVCodecID = C.AV_CODEC_ID_NELLYMOSER
	AV_CODEC_ID_MUSEPACK8       CAVCodecID = C.AV_CODEC_ID_MUSEPACK8
	AV_CODEC_ID_SPEEX           CAVCodecID = C.AV_CODEC_ID_SPEEX
	AV_CODEC_ID_WMAVOICE        CAVCodecID = C.AV_CODEC_ID_WMAVOICE
	AV_CODEC_ID_WMAPRO          CAVCodecID = C.AV_CODEC_ID_WMAPRO
	AV_CODEC_ID_WMALOSSLESS     CAVCodecID = C.AV_CODEC_ID_WMALOSSLESS
	AV_CODEC_ID_ATRAC3P         CAVCodecID = C.AV_CODEC_ID_ATRAC3P
	AV_CODEC_ID_EAC3            CAVCodecID = C.AV_CODEC_ID_EAC3
	AV_CODEC_ID_SIPR            CAVCodecID = C.AV_CODEC_ID_SIPR
	AV_CODEC_ID_MP1             CAVCodecID = C.AV_CODEC_ID_MP1
	AV_CODEC_ID_TWINVQ          CAVCodecID = C.AV_CODEC_ID_TWINVQ
	AV_CODEC_ID_TRUEHD          CAVCodecID = C.AV_CODEC_ID_TRUEHD
	AV_CODEC_ID_MP4ALS          CAVCodecID = C.AV_CODEC_ID_MP4ALS
	AV_CODEC_ID_ATRAC1          CAVCodecID = C.AV_CODEC_ID_ATRAC1
	AV_CODEC_ID_BINKAUDIO_RDFT  CAVCodecID = C.AV_CODEC_ID_BINKAUDIO_RDFT
	AV_CODEC_ID_BINKAUDIO_DCT   CAVCodecID = C.AV_CODEC_ID_BINKAUDIO_DCT
	AV_CODEC_ID_AAC_LATM        CAVCodecID = C.AV_CODEC_ID_AAC_LATM
	AV_CODEC_ID_QDMC            CAVCodecID = C.AV_CODEC_ID_QDMC
	AV_CODEC_ID_CELT            CAVCodecID = C.AV_CODEC_ID_CELT
	AV_CODEC_ID_G723_1          CAVCodecID = C.AV_CODEC_ID_G723_1
	AV_CODEC_ID_G729            CAVCodecID = C.AV_CODEC_ID_G729
	AV_CODEC_ID_8SVX_EXP        CAVCodecID = C.AV_CODEC_ID_8SVX_EXP
	AV_CODEC_ID_8SVX_FIB        CAVCodecID = C.AV_CODEC_ID_8SVX_FIB
	AV_CODEC_ID_BMV_AUDIO       CAVCodecID = C.AV_CODEC_ID_BMV_AUDIO
	AV_CODEC_ID_RALF            CAVCodecID = C.AV_CODEC_ID_RALF
	AV_CODEC_ID_IAC             CAVCodecID = C.AV_CODEC_ID_IAC
	AV_CODEC_ID_ILBC            CAVCodecID = C.AV_CODEC_ID_ILBC
	AV_CODEC_ID_OPUS            CAVCodecID = C.AV_CODEC_ID_OPUS
	AV_CODEC_ID_COMFORT_NOISE   CAVCodecID = C.AV_CODEC_ID_COMFORT_NOISE
	AV_CODEC_ID_TAK             CAVCodecID = C.AV_CODEC_ID_TAK
	AV_CODEC_ID_METASOUND       CAVCodecID = C.AV_CODEC_ID_METASOUND
	AV_CODEC_ID_PAF_AUDIO       CAVCodecID = C.AV_CODEC_ID_PAF_AUDIO
	AV_CODEC_ID_ON2AVC          CAVCodecID = C.AV_CODEC_ID_ON2AVC
	AV_CODEC_ID_DSS_SP          CAVCodecID = C.AV_CODEC_ID_DSS_SP
	AV_CODEC_ID_CODEC2          CAVCodecID = C.AV_CODEC_ID_CODEC2
	AV_CODEC_ID_FFWAVESYNTH     CAVCodecID = C.AV_CODEC_ID_FFWAVESYNTH
	AV_CODEC_ID_SONIC           CAVCodecID = C.AV_CODEC_ID_SONIC
	AV_CODEC_ID_SONIC_LS        CAVCodecID = C.AV_CODEC_ID_SONIC_LS
	AV_CODEC_ID_EVRC            CAVCodecID = C.AV_CODEC_ID_EVRC
	AV_CODEC_ID_SMV             CAVCodecID = C.AV_CODEC_ID_SMV
	AV_CODEC_ID_DSD_LSBF        CAVCodecID = C.AV_CODEC_ID_DSD_LSBF
	AV_CODEC_ID_DSD_MSBF        CAVCodecID = C.AV_CODEC_ID_DSD_MSBF
	AV_CODEC_ID_DSD_LSBF_PLANAR CAVCodecID = C.AV_CODEC_ID_DSD_LSBF_PLANAR
	AV_CODEC_ID_DSD_MSBF_PLANAR CAVCodecID = C.AV_CODEC_ID_DSD_MSBF_PLANAR
	AV_CODEC_ID_4GV             CAVCodecID = C.AV_CODEC_ID_4GV
	AV_CODEC_ID_INTERPLAY_ACM   CAVCodecID = C.AV_CODEC_ID_INTERPLAY_ACM
	AV_CODEC_ID_XMA1            CAVCodecID = C.AV_CODEC_ID_XMA1
	AV_CODEC_ID_XMA2            CAVCodecID = C.AV_CODEC_ID_XMA2
	AV_CODEC_ID_DST             CAVCodecID = C.AV_CODEC_ID_DST
	AV_CODEC_ID_ATRAC3AL        CAVCodecID = C.AV_CODEC_ID_ATRAC3AL
	AV_CODEC_ID_ATRAC3PAL       CAVCodecID = C.AV_CODEC_ID_ATRAC3PAL
	AV_CODEC_ID_DOLBY_E         CAVCodecID = C.AV_CODEC_ID_DOLBY_E
	AV_CODEC_ID_APTX            CAVCodecID = C.AV_CODEC_ID_APTX
	AV_CODEC_ID_APTX_HD         CAVCodecID = C.AV_CODEC_ID_APTX_HD
	AV_CODEC_ID_SBC             CAVCodecID = C.AV_CODEC_ID_SBC
	AV_CODEC_ID_ATRAC9          CAVCodecID = C.AV_CODEC_ID_ATRAC9
	AV_CODEC_ID_HCOM            CAVCodecID = C.AV_CODEC_ID_HCOM
	AV_CODEC_ID_ACELP_KELVIN    CAVCodecID = C.AV_CODEC_ID_ACELP_KELVIN
	AV_CODEC_ID_MPEGH_3D_AUDIO  CAVCodecID = C.AV_CODEC_ID_MPEGH_3D_AUDIO
	AV_CODEC_ID_SIREN           CAVCodecID = C.AV_CODEC_ID_SIREN
	AV_CODEC_ID_HCA             CAVCodecID = C.AV_CODEC_ID_HCA
	AV_CODEC_ID_FASTAUDIO       CAVCodecID = C.AV_CODEC_ID_FASTAUDIO
	AV_CODEC_ID_MSNSIREN        CAVCodecID = C.AV_CODEC_ID_MSNSIREN
	AV_CODEC_ID_DFPWM           CAVCodecID = C.AV_CODEC_ID_DFPWM
	AV_CODEC_ID_BONK            CAVCodecID = C.AV_CODEC_ID_BONK
	AV_CODEC_ID_MISC4           CAVCodecID = C.AV_CODEC_ID_MISC4
	AV_CODEC_ID_APAC            CAVCodecID = C.AV_CODEC_ID_APAC
	AV_CODEC_ID_FTR             CAVCodecID = C.AV_CODEC_ID_FTR
	AV_CODEC_ID_WAVARC          CAVCodecID = C.AV_CODEC_ID_WAVARC
	AV_CODEC_ID_RKA             CAVCodecID = C.AV_CODEC_ID_RKA
	AV_CODEC_ID_AC4             CAVCodecID = C.AV_CODEC_ID_AC4
	AV_CODEC_ID_OSQ             CAVCodecID = C.AV_CODEC_ID_OSQ

	/* subtitle codecs */
	AV_CODEC_ID_FIRST_SUBTITLE     CAVCodecID = C.AV_CODEC_ID_FIRST_SUBTITLE ///< A dummy ID pointing at the start of subtitle codecs.
	AV_CODEC_ID_DVD_SUBTITLE       CAVCodecID = C.AV_CODEC_ID_DVD_SUBTITLE
	AV_CODEC_ID_DVB_SUBTITLE       CAVCodecID = C.AV_CODEC_ID_DVB_SUBTITLE
	AV_CODEC_ID_TEXT               CAVCodecID = C.AV_CODEC_ID_TEXT ///< raw UTF-8 text
	AV_CODEC_ID_XSUB               CAVCodecID = C.AV_CODEC_ID_XSUB
	AV_CODEC_ID_SSA                CAVCodecID = C.AV_CODEC_ID_SSA
	AV_CODEC_ID_MOV_TEXT           CAVCodecID = C.AV_CODEC_ID_MOV_TEXT
	AV_CODEC_ID_HDMV_PGS_SUBTITLE  CAVCodecID = C.AV_CODEC_ID_HDMV_PGS_SUBTITLE
	AV_CODEC_ID_DVB_TELETEXT       CAVCodecID = C.AV_CODEC_ID_DVB_TELETEXT
	AV_CODEC_ID_SRT                CAVCodecID = C.AV_CODEC_ID_SRT
	AV_CODEC_ID_MICRODVD           CAVCodecID = C.AV_CODEC_ID_MICRODVD
	AV_CODEC_ID_EIA_608            CAVCodecID = C.AV_CODEC_ID_EIA_608
	AV_CODEC_ID_JACOSUB            CAVCodecID = C.AV_CODEC_ID_JACOSUB
	AV_CODEC_ID_SAMI               CAVCodecID = C.AV_CODEC_ID_SAMI
	AV_CODEC_ID_REALTEXT           CAVCodecID = C.AV_CODEC_ID_REALTEXT
	AV_CODEC_ID_STL                CAVCodecID = C.AV_CODEC_ID_STL
	AV_CODEC_ID_SUBVIEWER1         CAVCodecID = C.AV_CODEC_ID_SUBVIEWER1
	AV_CODEC_ID_SUBVIEWER          CAVCodecID = C.AV_CODEC_ID_SUBVIEWER
	AV_CODEC_ID_SUBRIP             CAVCodecID = C.AV_CODEC_ID_SUBRIP
	AV_CODEC_ID_WEBVTT             CAVCodecID = C.AV_CODEC_ID_WEBVTT
	AV_CODEC_ID_MPL2               CAVCodecID = C.AV_CODEC_ID_MPL2
	AV_CODEC_ID_VPLAYER            CAVCodecID = C.AV_CODEC_ID_VPLAYER
	AV_CODEC_ID_PJS                CAVCodecID = C.AV_CODEC_ID_PJS
	AV_CODEC_ID_ASS                CAVCodecID = C.AV_CODEC_ID_ASS
	AV_CODEC_ID_HDMV_TEXT_SUBTITLE CAVCodecID = C.AV_CODEC_ID_HDMV_TEXT_SUBTITLE
	AV_CODEC_ID_TTML               CAVCodecID = C.AV_CODEC_ID_TTML
	AV_CODEC_ID_ARIB_CAPTION       CAVCodecID = C.AV_CODEC_ID_ARIB_CAPTION

	/* other specific kind of codecs (generally used for attachments) */
	AV_CODEC_ID_FIRST_UNKNOWN CAVCodecID = C.AV_CODEC_ID_FIRST_UNKNOWN ///< A dummy ID pointing at the start of various fake codecs.
	AV_CODEC_ID_TTF           CAVCodecID = C.AV_CODEC_ID_TTF

	AV_CODEC_ID_SCTE_35    CAVCodecID = C.AV_CODEC_ID_SCTE_35 ///< Contain timestamp estimated through PCR of program stream.
	AV_CODEC_ID_EPG        CAVCodecID = 98306
	AV_CODEC_ID_BINTEXT    CAVCodecID = C.AV_CODEC_ID_BINTEXT
	AV_CODEC_ID_XBIN       CAVCodecID = C.AV_CODEC_ID_XBIN
	AV_CODEC_ID_IDF        CAVCodecID = C.AV_CODEC_ID_IDF
	AV_CODEC_ID_OTF        CAVCodecID = C.AV_CODEC_ID_OTF
	AV_CODEC_ID_SMPTE_KLV  CAVCodecID = C.AV_CODEC_ID_SMPTE_KLV
	AV_CODEC_ID_DVD_NAV    CAVCodecID = C.AV_CODEC_ID_DVD_NAV
	AV_CODEC_ID_TIMED_ID3  CAVCodecID = C.AV_CODEC_ID_TIMED_ID3
	AV_CODEC_ID_BIN_DATA   CAVCodecID = C.AV_CODEC_ID_BIN_DATA
	AV_CODEC_ID_SMPTE_2038 CAVCodecID = C.AV_CODEC_ID_SMPTE_2038

	AV_CODEC_ID_PROBE CAVCodecID = C.AV_CODEC_ID_PROBE ///< codec_id is not known (like AV_CODEC_ID_NONE) but lavf should attempt to identify it

	AV_CODEC_ID_MPEG2TS CAVCodecID = C.AV_CODEC_ID_MPEG2TS /**< _FAKE_ codec to indicate a raw MPEG-2 TS
	 * stream (only used by libavformat) */
	AV_CODEC_ID_MPEG4SYSTEMS CAVCodecID = C.AV_CODEC_ID_MPEG4SYSTEMS /**< _FAKE_ codec to indicate a MPEG-4 Systems
	 * stream (only used by libavformat) */
	AV_CODEC_ID_FFMETADATA      CAVCodecID = C.AV_CODEC_ID_FFMETADATA      ///< Dummy codec for streams containing only metadata information.
	AV_CODEC_ID_WRAPPED_AVFRAME CAVCodecID = C.AV_CODEC_ID_WRAPPED_AVFRAME ///< Passthrough codec AVFrames wrapped in AVPacket
	/**
	 * Dummy null video codec, useful mainly for development and debugging.
	 * Null encoder/decoder discard all input and never return any output.
	 */
	AV_CODEC_ID_VNULL CAVCodecID = C.AV_CODEC_ID_VNULL
	/**
	 * Dummy null audio codec, useful mainly for development and debugging.
	 * Null encoder/decoder discard all input and never return any output.
	 */
	AV_CODEC_ID_ANULL CAVCodecID = C.AV_CODEC_ID_ANULL
)

func AvGetPcmCodec added in v0.0.4

func AvGetPcmCodec(fmt avutil.CAVSampleFormat, be int) CAVCodecID

*

  • Return the PCM codec associated with a sample format.
  • @param be endianness, 0 for little, 1 for big,
  • -1 (or anything else) for native
  • @return AV_CODEC_ID_PCM_* or AV_CODEC_ID_NONE

type CAVCodecParameters

type CAVCodecParameters C.AVCodecParameters

*

  • This struct describes the properties of an encoded stream. *
  • sizeof(AVCodecParameters) is not a part of the public ABI, this struct must
  • be allocated with avcodec_parameters_alloc() and freed with
  • avcodec_parameters_free().

func AvcodecParametersAlloc added in v0.0.4

func AvcodecParametersAlloc() *CAVCodecParameters

*

  • Allocate a new AVCodecParameters and set its fields to default values
  • (unknown/invalid/0). The returned struct must be freed with
  • avcodec_parameters_free().

func (*CAVCodecParameters) GetBitRate added in v0.0.4

func (p *CAVCodecParameters) GetBitRate() int64

*

  • The average bitrate of the encoded data (in bits per second).

func (*CAVCodecParameters) GetBitsPerCodedSample added in v0.0.4

func (p *CAVCodecParameters) GetBitsPerCodedSample() int

*

  • The number of bits per sample in the codedwords. *
  • This is basically the bitrate per sample. It is mandatory for a bunch of
  • formats to actually decode them. It's the number of bits for one sample in
  • the actual coded bitstream. *
  • This could be for example 4 for ADPCM
  • For PCM formats this matches bits_per_raw_sample
  • Can be 0

func (*CAVCodecParameters) GetBitsPerRawSample added in v0.0.4

func (p *CAVCodecParameters) GetBitsPerRawSample() int

*

  • This is the number of valid bits in each output sample. If the
  • sample format has more bits, the least significant bits are additional
  • padding bits, which are always 0. Use right shifts to reduce the sample
  • to its actual size. For example, audio formats with 24 bit samples will
  • have bits_per_raw_sample set to 24, and format set to AV_SAMPLE_FMT_S32.
  • To get the original sample use "(int32_t)sample >> 8"." *
  • For ADPCM this might be 12 or 16 or similar
  • Can be 0

func (*CAVCodecParameters) GetBlockAlign added in v0.0.4

func (p *CAVCodecParameters) GetBlockAlign() int

*

  • Audio only. The number of bytes per coded audio frame, required by some
  • formats. *
  • Corresponds to nBlockAlign in WAVEFORMATEX.

func (*CAVCodecParameters) GetChLayout added in v0.0.4

func (p *CAVCodecParameters) GetChLayout() avutil.CAVChannelLayout

*

  • Audio only. The channel layout and number of channels.

func (*CAVCodecParameters) GetChromaLocation added in v0.0.4

func (p *CAVCodecParameters) GetChromaLocation() avutil.CAVChromaLocation

func (*CAVCodecParameters) GetCodecId added in v0.0.4

func (p *CAVCodecParameters) GetCodecId() CAVCodecID

*

  • Specific type of the encoded data (the codec used).

func (*CAVCodecParameters) GetCodecTag added in v0.0.4

func (p *CAVCodecParameters) GetCodecTag() uint32

*

  • Additional information about the codec (corresponds to the AVI FOURCC).

func (*CAVCodecParameters) GetCodecType

func (p *CAVCodecParameters) GetCodecType() avutil.CAVMediaType

*

  • General type of the encoded data.

func (*CAVCodecParameters) GetCodedSideData added in v0.0.4

func (p *CAVCodecParameters) GetCodedSideData() *CAVPacketSideData

*

  • Additional data associated with the entire stream.

func (*CAVCodecParameters) GetColorPrimaries added in v0.0.4

func (p *CAVCodecParameters) GetColorPrimaries() avutil.CAVColorPrimaries

func (*CAVCodecParameters) GetColorRange added in v0.0.4

func (p *CAVCodecParameters) GetColorRange() avutil.CAVColorRange

func (*CAVCodecParameters) GetColorTrc added in v0.0.4

func (*CAVCodecParameters) GetColorspace added in v0.0.4

func (p *CAVCodecParameters) GetColorspace() avutil.CAVColorSpace

func (*CAVCodecParameters) GetExtradata added in v0.0.4

func (p *CAVCodecParameters) GetExtradata() unsafe.Pointer

*

  • Extra binary data needed for initializing the decoder, codec-dependent. *
  • Must be allocated with av_malloc() and will be freed by
  • avcodec_parameters_free(). The allocated size of extradata must be at
  • least extradata_size + AV_INPUT_BUFFER_PADDING_SIZE, with the padding
  • bytes zeroed.

func (*CAVCodecParameters) GetExtradataSize added in v0.0.4

func (p *CAVCodecParameters) GetExtradataSize() int

*

  • Size of the extradata content in bytes.

func (*CAVCodecParameters) GetFieldOrder added in v0.0.4

func (p *CAVCodecParameters) GetFieldOrder() CAVFieldOrder

*

  • Video only. The order of the fields in interlaced video.

func (*CAVCodecParameters) GetFormat added in v0.0.4

func (p *CAVCodecParameters) GetFormat() int

*

  • - video: the pixel format, the value corresponds to enum AVPixelFormat.
  • - audio: the sample format, the value corresponds to enum AVSampleFormat.

func (*CAVCodecParameters) GetFrameSize added in v0.0.4

func (p *CAVCodecParameters) GetFrameSize() int

*

  • Audio only. Audio frame size, if known. Required by some formats to be static.

func (*CAVCodecParameters) GetFramerate added in v0.0.4

func (p *CAVCodecParameters) GetFramerate() avutil.CAVRational

*

  • Video only. Number of frames per second, for streams with constant frame
  • durations. Should be set to { 0, 1 } when some frames have differing
  • durations or if the value is not known. *
  • @note This field correponds to values that are stored in codec-level
  • headers and is typically overridden by container/transport-layer
  • timestamps, when available. It should thus be used only as a last resort,
  • when no higher-level timing information is available.

func (*CAVCodecParameters) GetHeight added in v0.0.4

func (p *CAVCodecParameters) GetHeight() int

func (*CAVCodecParameters) GetInitialPadding added in v0.0.4

func (p *CAVCodecParameters) GetInitialPadding() int

*

  • Audio only. The amount of padding (in samples) inserted by the encoder at
  • the beginning of the audio. I.e. this number of leading decoded samples
  • must be discarded by the caller to get the original audio without leading
  • padding.

func (*CAVCodecParameters) GetLevel added in v0.0.4

func (p *CAVCodecParameters) GetLevel() int

func (*CAVCodecParameters) GetNbCodedSideData added in v0.0.4

func (p *CAVCodecParameters) GetNbCodedSideData() int

*

  • Amount of entries in @ref coded_side_data.

func (*CAVCodecParameters) GetProfile added in v0.0.4

func (p *CAVCodecParameters) GetProfile() int

func (*CAVCodecParameters) GetSampleAspectRatio added in v0.0.4

func (p *CAVCodecParameters) GetSampleAspectRatio() avutil.CAVRational

*

  • Video only. The aspect ratio (width / height) which a single pixel
  • should have when displayed. *
  • When the aspect ratio is unknown / undefined, the numerator should be
  • set to 0 (the denominator may have any value).

func (*CAVCodecParameters) GetSampleRate added in v0.0.4

func (p *CAVCodecParameters) GetSampleRate() int

*

  • Audio only. The number of audio samples per second.

func (*CAVCodecParameters) GetSeekPreroll added in v0.0.4

func (p *CAVCodecParameters) GetSeekPreroll() int

*

  • Audio only. Number of samples to skip after a discontinuity.

func (*CAVCodecParameters) GetTrailingPadding added in v0.0.4

func (p *CAVCodecParameters) GetTrailingPadding() int

*

  • Audio only. The amount of padding (in samples) appended by the encoder to
  • the end of the audio. I.e. this number of decoded samples must be
  • discarded by the caller from the end of the stream to get the original
  • audio without any trailing padding.

func (*CAVCodecParameters) GetVideoDelay added in v0.0.4

func (p *CAVCodecParameters) GetVideoDelay() int

*

  • Video only. Number of delayed frames.

func (*CAVCodecParameters) GetWidth added in v0.0.4

func (p *CAVCodecParameters) GetWidth() int

func (*CAVCodecParameters) SetBitRate added in v0.0.4

func (p *CAVCodecParameters) SetBitRate(bitRate int64)

*

  • The average bitrate of the encoded data (in bits per second).

func (*CAVCodecParameters) SetBitsPerCodedSample added in v0.0.4

func (p *CAVCodecParameters) SetBitsPerCodedSample(bitsPerCodedSample int)

*

  • The number of bits per sample in the codedwords. *
  • This is basically the bitrate per sample. It is mandatory for a bunch of
  • formats to actually decode them. It's the number of bits for one sample in
  • the actual coded bitstream. *
  • This could be for example 4 for ADPCM
  • For PCM formats this matches bits_per_raw_sample
  • Can be 0

func (*CAVCodecParameters) SetBitsPerRawSample added in v0.0.4

func (p *CAVCodecParameters) SetBitsPerRawSample(bitsPerRawSample int)

*

  • This is the number of valid bits in each output sample. If the
  • sample format has more bits, the least significant bits are additional
  • padding bits, which are always 0. Use right shifts to reduce the sample
  • to its actual size. For example, audio formats with 24 bit samples will
  • have bits_per_raw_sample set to 24, and format set to AV_SAMPLE_FMT_S32.
  • To get the original sample use "(int32_t)sample >> 8"." *
  • For ADPCM this might be 12 or 16 or similar
  • Can be 0

func (*CAVCodecParameters) SetBlockAlign added in v0.0.4

func (p *CAVCodecParameters) SetBlockAlign(blockAlign int)

*

  • Audio only. The number of bytes per coded audio frame, required by some
  • formats. *
  • Corresponds to nBlockAlign in WAVEFORMATEX.

func (*CAVCodecParameters) SetChLayout added in v0.0.4

func (p *CAVCodecParameters) SetChLayout(chLayout avutil.CAVChannelLayout)

*

  • Audio only. The channel layout and number of channels.

func (*CAVCodecParameters) SetChromaLocation added in v0.0.4

func (p *CAVCodecParameters) SetChromaLocation(chromaLocation avutil.CAVChromaLocation)

func (*CAVCodecParameters) SetCodecId added in v0.0.4

func (p *CAVCodecParameters) SetCodecId(codecId CAVCodecID)

*

  • Specific type of the encoded data (the codec used).

func (*CAVCodecParameters) SetCodecTag added in v0.0.4

func (p *CAVCodecParameters) SetCodecTag(codecTag uint32)

*

  • Additional information about the codec (corresponds to the AVI FOURCC).

func (*CAVCodecParameters) SetCodecType added in v0.0.4

func (p *CAVCodecParameters) SetCodecType(codecType avutil.CAVMediaType)

*

  • General type of the encoded data.

func (*CAVCodecParameters) SetCodedSideData added in v0.0.4

func (p *CAVCodecParameters) SetCodedSideData(codedSideData *CAVPacketSideData)

*

  • Additional data associated with the entire stream.

func (*CAVCodecParameters) SetColorPrimaries added in v0.0.4

func (p *CAVCodecParameters) SetColorPrimaries(colorPrimaries avutil.CAVColorPrimaries)

func (*CAVCodecParameters) SetColorRange added in v0.0.4

func (p *CAVCodecParameters) SetColorRange(colorRange avutil.CAVColorRange)

func (*CAVCodecParameters) SetColorTrc added in v0.0.4

func (p *CAVCodecParameters) SetColorTrc(colorTrc avutil.CAVColorTransferCharacteristic)

func (*CAVCodecParameters) SetColorspace added in v0.0.4

func (p *CAVCodecParameters) SetColorspace(colorspace avutil.CAVColorSpace)

func (*CAVCodecParameters) SetExtradata added in v0.0.4

func (p *CAVCodecParameters) SetExtradata(extradata unsafe.Pointer)

*

  • Extra binary data needed for initializing the decoder, codec-dependent. *
  • Must be allocated with av_malloc() and will be freed by
  • avcodec_parameters_free(). The allocated size of extradata must be at
  • least extradata_size + AV_INPUT_BUFFER_PADDING_SIZE, with the padding
  • bytes zeroed.

func (*CAVCodecParameters) SetExtradataSize added in v0.0.4

func (p *CAVCodecParameters) SetExtradataSize(extradataSize int)

*

  • Size of the extradata content in bytes.

func (*CAVCodecParameters) SetFieldOrder added in v0.0.4

func (p *CAVCodecParameters) SetFieldOrder(fieldOrder CAVFieldOrder)

*

  • Video only. The order of the fields in interlaced video.

func (*CAVCodecParameters) SetFormat added in v0.0.4

func (p *CAVCodecParameters) SetFormat(format int)

*

  • - video: the pixel format, the value corresponds to enum AVPixelFormat.
  • - audio: the sample format, the value corresponds to enum AVSampleFormat.

func (*CAVCodecParameters) SetFrameSize added in v0.0.4

func (p *CAVCodecParameters) SetFrameSize(frameSize int)

*

  • Audio only. Audio frame size, if known. Required by some formats to be static.

func (*CAVCodecParameters) SetFramerate added in v0.0.4

func (p *CAVCodecParameters) SetFramerate(framerate avutil.CAVRational)

*

  • Video only. Number of frames per second, for streams with constant frame
  • durations. Should be set to { 0, 1 } when some frames have differing
  • durations or if the value is not known. *
  • @note This field correponds to values that are stored in codec-level
  • headers and is typically overridden by container/transport-layer
  • timestamps, when available. It should thus be used only as a last resort,
  • when no higher-level timing information is available.

func (*CAVCodecParameters) SetHeight added in v0.0.4

func (p *CAVCodecParameters) SetHeight(height int)

func (*CAVCodecParameters) SetInitialPadding added in v0.0.4

func (p *CAVCodecParameters) SetInitialPadding(initialPadding int)

*

  • Audio only. The amount of padding (in samples) inserted by the encoder at
  • the beginning of the audio. I.e. this number of leading decoded samples
  • must be discarded by the caller to get the original audio without leading
  • padding.

func (*CAVCodecParameters) SetLevel added in v0.0.4

func (p *CAVCodecParameters) SetLevel(level int)

func (*CAVCodecParameters) SetNbCodedSideData added in v0.0.4

func (p *CAVCodecParameters) SetNbCodedSideData(nbCodedSideData int)

*

  • Amount of entries in @ref coded_side_data.

func (*CAVCodecParameters) SetProfile added in v0.0.4

func (p *CAVCodecParameters) SetProfile(profile int)

func (*CAVCodecParameters) SetSampleAspectRatio added in v0.0.4

func (p *CAVCodecParameters) SetSampleAspectRatio(sampleAspectRatio avutil.CAVRational)

*

  • Video only. The aspect ratio (width / height) which a single pixel
  • should have when displayed. *
  • When the aspect ratio is unknown / undefined, the numerator should be
  • set to 0 (the denominator may have any value).

func (*CAVCodecParameters) SetSampleRate added in v0.0.4

func (p *CAVCodecParameters) SetSampleRate(sampleRate int)

*

  • Audio only. The number of audio samples per second.

func (*CAVCodecParameters) SetSeekPreroll added in v0.0.4

func (p *CAVCodecParameters) SetSeekPreroll(seekPreroll int)

*

  • Audio only. Number of samples to skip after a discontinuity.

func (*CAVCodecParameters) SetTrailingPadding added in v0.0.4

func (p *CAVCodecParameters) SetTrailingPadding(trailingPadding int)

*

  • Audio only. The amount of padding (in samples) appended by the encoder to
  • the end of the audio. I.e. this number of decoded samples must be
  • discarded by the caller from the end of the stream to get the original
  • audio without any trailing padding.

func (*CAVCodecParameters) SetVideoDelay added in v0.0.4

func (p *CAVCodecParameters) SetVideoDelay(videoDelay int)

*

  • Video only. Number of delayed frames.

func (*CAVCodecParameters) SetWidth added in v0.0.4

func (p *CAVCodecParameters) SetWidth(width int)

type CAVCodecParser added in v0.0.4

type CAVCodecParser C.AVCodecParser

func AvParserIterate added in v0.0.4

func AvParserIterate(opaque *unsafe.Pointer) *CAVCodecParser

*

  • Iterate over all registered codec parsers. *
  • @param opaque a pointer where libavcodec will store the iteration state. Must
  • point to NULL to start the iteration. *
  • @return the next registered codec parser or NULL when the iteration is
  • finished

func (*CAVCodecParser) GetCodecIds added in v0.0.4

func (parser *CAVCodecParser) GetCodecIds() [7]ctypes.Int

several codec IDs are permitted

func (*CAVCodecParser) GetParserClose added in v0.0.4

func (parser *CAVCodecParser) GetParserClose() ctypes.CFunc

void (*parser_close)(AVCodecParserContext *s);

func (*CAVCodecParser) GetParserInit added in v0.0.4

func (parser *CAVCodecParser) GetParserInit() ctypes.CFunc

int (*parser_init)(AVCodecParserContext *s);

func (*CAVCodecParser) GetParserParse added in v0.0.4

func (parser *CAVCodecParser) GetParserParse() ctypes.CFunc
 This callback never returns an error, a negative value means that
 * the frame start was in a previous packet.
	 int (*parser_parse)(AVCodecParserContext *s,
						 AVCodecContext *avctx,
						 const uint8_t **poutbuf, int *poutbuf_size,
						 const uint8_t *buf, int buf_size);

func (*CAVCodecParser) GetPrivDataSize added in v0.0.4

func (parser *CAVCodecParser) GetPrivDataSize() int

func (*CAVCodecParser) GetSplit added in v0.0.4

func (parser *CAVCodecParser) GetSplit() ctypes.CFunc

int (*split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size);

func (*CAVCodecParser) SetCodecIds added in v0.0.4

func (parser *CAVCodecParser) SetCodecIds(codecIds [7]ctypes.Int)

several codec IDs are permitted

func (*CAVCodecParser) SetParserClose added in v0.0.4

func (parser *CAVCodecParser) SetParserClose(parserClose ctypes.CFunc)

void (*parser_close)(AVCodecParserContext *s);

func (*CAVCodecParser) SetParserInit added in v0.0.4

func (parser *CAVCodecParser) SetParserInit(parserInit ctypes.CFunc)

int (*parser_init)(AVCodecParserContext *s);

func (*CAVCodecParser) SetParserParse added in v0.0.4

func (parser *CAVCodecParser) SetParserParse(parserParse ctypes.CFunc)
 This callback never returns an error, a negative value means that
 * the frame start was in a previous packet.
	 int (*parser_parse)(AVCodecParserContext *s,
						 AVCodecContext *avctx,
						 const uint8_t **poutbuf, int *poutbuf_size,
						 const uint8_t *buf, int buf_size);

func (*CAVCodecParser) SetPrivDataSize added in v0.0.4

func (parser *CAVCodecParser) SetPrivDataSize(privDataSize int)

func (*CAVCodecParser) SetSplit added in v0.0.4

func (parser *CAVCodecParser) SetSplit(split ctypes.CFunc)

int (*split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size);

type CAVCodecParserContext

type CAVCodecParserContext C.AVCodecParserContext

func AvParserInit

func AvParserInit(codec_id int) *CAVCodecParserContext

func (*CAVCodecParserContext) GetCodedHeight added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetCodedHeight() int

func (*CAVCodecParserContext) GetCodedWidth added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetCodedWidth() int

func (*CAVCodecParserContext) GetCurFrameDts added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetCurFrameDts() [AV_PARSER_PTS_NB]ctypes.Int64

func (*CAVCodecParserContext) GetCurFrameEnd added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetCurFrameEnd() [AV_PARSER_PTS_NB]ctypes.Int64

func (*CAVCodecParserContext) GetCurFrameOffset added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetCurFrameOffset() [AV_PARSER_PTS_NB]ctypes.Int64

func (*CAVCodecParserContext) GetCurFramePos added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetCurFramePos() [AV_PARSER_PTS_NB]ctypes.Int64

*

  • Position of the packet in file. *
  • Analogous to cur_frame_pts/dts

func (*CAVCodecParserContext) GetCurFramePts added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetCurFramePts() [AV_PARSER_PTS_NB]ctypes.Int64

func (*CAVCodecParserContext) GetCurFrameStartIndex added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetCurFrameStartIndex() int

func (*CAVCodecParserContext) GetCurOffset added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetCurOffset() int64

current offset (incremented by each av_parser_parse())

func (*CAVCodecParserContext) GetDts added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetDts() int64

dts of the current frame

func (*CAVCodecParserContext) GetDtsRefDtsDelta added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetDtsRefDtsDelta() int

*

  • Offset of the current timestamp against last timestamp sync point in
  • units of AVCodecContext.time_base. *
  • Set to INT_MIN when dts_sync_point unused. Otherwise, it must
  • contain a valid timestamp offset. *
  • Note that the timestamp of sync point has usually a nonzero
  • dts_ref_dts_delta, which refers to the previous sync point. Offset of
  • the next frame after timestamp sync point will be usually 1. *
  • For example, this corresponds to H.264 cpb_removal_delay.

func (*CAVCodecParserContext) GetDtsSyncPoint added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetDtsSyncPoint() int

*

  • Synchronization point for start of timestamp generation. *
  • Set to >0 for sync point, 0 for no sync point and <0 for undefined
  • (default). *
  • For example, this corresponds to presence of H.264 buffering period
  • SEI message.

func (*CAVCodecParserContext) GetDuration added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetDuration() int

*

  • Duration of the current frame.
  • For audio, this is in units of 1 / AVCodecContext.sample_rate.
  • For all other types, this is in units of AVCodecContext.time_base.

func (*CAVCodecParserContext) GetFetchTimestamp added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetFetchTimestamp() int

func (*CAVCodecParserContext) GetFieldOrder added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetFieldOrder() CAVFieldOrder

func (*CAVCodecParserContext) GetFlags added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetFlags() int

func (*CAVCodecParserContext) GetFrameOffset added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetFrameOffset() int64

offset of the current frame

func (*CAVCodecParserContext) GetHeight added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetHeight() int

func (*CAVCodecParserContext) GetKeyFrame added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetKeyFrame() int

*

  • Set by parser to 1 for key frames and 0 for non-key frames.
  • It is initialized to -1, so if the parser doesn't set this flag,
  • old-style fallback using AV_PICTURE_TYPE_I picture type as key frames
  • will be used.

func (*CAVCodecParserContext) GetLastDts added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetLastDts() int64

func (*CAVCodecParserContext) GetLastPos added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetLastPos() int64

*

  • Previous frame byte position.

func (*CAVCodecParserContext) GetLastPts added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetLastPts() int64

func (*CAVCodecParserContext) GetNextFrameOffset added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetNextFrameOffset() int64

offset of the next frame

func (*CAVCodecParserContext) GetOffset added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetOffset() int64

/< byte offset from starting packet start

func (*CAVCodecParserContext) GetOutputPictureNumber added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetOutputPictureNumber() int

*

  • Picture number incremented in presentation or output order.
  • This field may be reinitialized at the first picture of a new sequence. *
  • For example, this corresponds to H.264 PicOrderCnt.

func (*CAVCodecParserContext) GetParser added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetParser() *CAVCodecParser

func (*CAVCodecParserContext) GetPictType added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetPictType() int

XXX: Put it back in AVCodecContext.

func (*CAVCodecParserContext) GetPictureStructure added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetPictureStructure() C.enum_AVPictureStructure

*

  • Indicate whether a picture is coded as a frame, top field or bottom field. *
  • For example, H.264 field_pic_flag equal to 0 corresponds to
  • AV_PICTURE_STRUCTURE_FRAME. An H.264 picture with field_pic_flag
  • equal to 1 and bottom_field_flag equal to 0 corresponds to
  • AV_PICTURE_STRUCTURE_TOP_FIELD.

func (*CAVCodecParserContext) GetPos added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetPos() int64

*

  • Byte position of currently parsed frame in stream.

func (*CAVCodecParserContext) GetPrivData added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetPrivData() unsafe.Pointer

func (*CAVCodecParserContext) GetPts added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetPts() int64

pts of the current frame

func (*CAVCodecParserContext) GetPtsDtsDelta added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetPtsDtsDelta() int

*

  • Presentation delay of current frame in units of AVCodecContext.time_base. *
  • Set to INT_MIN when dts_sync_point unused. Otherwise, it must
  • contain valid non-negative timestamp delta (presentation time of a frame
  • must not lie in the past). *
  • This delay represents the difference between decoding and presentation
  • time of the frame. *
  • For example, this corresponds to H.264 dpb_output_delay.

func (*CAVCodecParserContext) GetRepeatPict added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetRepeatPict() int

*

  • This field is used for proper frame duration computation in lavf.

  • It signals, how much longer the frame duration of the current frame

  • is compared to normal frame duration. *

  • frame_duration = (1 + repeat_pict) * time_base *

  • It is used by codecs like H.264 to display telecined material.

    XXX: Put it back in AVCodecContext.

func (*CAVCodecParserContext) GetWidth added in v0.0.4

func (parserCtx *CAVCodecParserContext) GetWidth() int

func (*CAVCodecParserContext) Getformat added in v0.0.4

func (parserCtx *CAVCodecParserContext) Getformat() int

*

  • The format of the coded data, corresponds to enum AVPixelFormat for video
  • and for enum AVSampleFormat for audio. *
  • Note that a decoder can have considerable freedom in how exactly it
  • decodes the data, so the format reported here might be different from the
  • one returned by a decoder.

func (*CAVCodecParserContext) SetCodedHeight added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetCodedHeight(codecHeight int)

func (*CAVCodecParserContext) SetCodedWidth added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetCodedWidth(codedWidth int)

func (*CAVCodecParserContext) SetCurFrameDts added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetCurFrameDts(curFrameDts [AV_PARSER_PTS_NB]ctypes.Int64)

func (*CAVCodecParserContext) SetCurFrameEnd added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetCurFrameEnd(curFrameEnd [AV_PARSER_PTS_NB]ctypes.Int64)

func (*CAVCodecParserContext) SetCurFrameOffset added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetCurFrameOffset(curFrameOffset [AV_PARSER_PTS_NB]ctypes.Int64)

func (*CAVCodecParserContext) SetCurFramePos added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetCurFramePos(curFramePos [AV_PARSER_PTS_NB]ctypes.Int64)

*

  • Position of the packet in file. *
  • Analogous to cur_frame_pts/dts

func (*CAVCodecParserContext) SetCurFramePts added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetCurFramePts(curFramePts [AV_PARSER_PTS_NB]ctypes.Int64)

func (*CAVCodecParserContext) SetCurFrameStartIndex added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetCurFrameStartIndex(curFrameStartIndex int)

func (*CAVCodecParserContext) SetCurOffset added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetCurOffset(curOffset int64)

current offset (incremented by each av_parser_parse())

func (*CAVCodecParserContext) SetDts added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetDts(dts int64)

dts of the current frame

func (*CAVCodecParserContext) SetDtsRefDtsDelta added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetDtsRefDtsDelta(dtsRefDtsDelta int)

*

  • Offset of the current timestamp against last timestamp sync point in
  • units of AVCodecContext.time_base. *
  • Set to INT_MIN when dts_sync_point unused. Otherwise, it must
  • contain a valid timestamp offset. *
  • Note that the timestamp of sync point has usually a nonzero
  • dts_ref_dts_delta, which refers to the previous sync point. Offset of
  • the next frame after timestamp sync point will be usually 1. *
  • For example, this corresponds to H.264 cpb_removal_delay.

func (*CAVCodecParserContext) SetDtsSyncPoint added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetDtsSyncPoint(dtsSyncPoint int)

*

  • Synchronization point for start of timestamp generation. *
  • Set to >0 for sync point, 0 for no sync point and <0 for undefined
  • (default). *
  • For example, this corresponds to presence of H.264 buffering period
  • SEI message.

func (*CAVCodecParserContext) SetDuration added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetDuration(duration int)

*

  • Duration of the current frame.
  • For audio, this is in units of 1 / AVCodecContext.sample_rate.
  • For all other types, this is in units of AVCodecContext.time_base.

func (*CAVCodecParserContext) SetFetchTimestamp added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetFetchTimestamp(fetchTimestamp int)

func (*CAVCodecParserContext) SetFieldOrder added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetFieldOrder(field_order CAVFieldOrder)

func (*CAVCodecParserContext) SetFlags added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetFlags(flags int)

func (*CAVCodecParserContext) SetFormat added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetFormat(format int)

*

  • The format of the coded data, corresponds to enum AVPixelFormat for video
  • and for enum AVSampleFormat for audio. *
  • Note that a decoder can have considerable freedom in how exactly it
  • decodes the data, so the format reported here might be different from the
  • one returned by a decoder.

func (*CAVCodecParserContext) SetFrameOffset added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetFrameOffset(frameOffset int64)

offset of the current frame

func (*CAVCodecParserContext) SetHeight added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetHeight(height int)

func (*CAVCodecParserContext) SetKeyFrame added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetKeyFrame(keyFrame int)

*

  • Set by parser to 1 for key frames and 0 for non-key frames.
  • It is initialized to -1, so if the parser doesn't set this flag,
  • old-style fallback using AV_PICTURE_TYPE_I picture type as key frames
  • will be used.

func (*CAVCodecParserContext) SetLastDts added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetLastDts(lastDts int64)

func (*CAVCodecParserContext) SetLastPos added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetLastPos(lastPos int64)

*

  • Previous frame byte position.

func (*CAVCodecParserContext) SetLastPts added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetLastPts(lastPts int64)

func (*CAVCodecParserContext) SetNextFrameOffset added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetNextFrameOffset(nextFrameOffset int64)

offset of the next frame

func (*CAVCodecParserContext) SetOffset added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetOffset(offset int64)

/< byte offset from starting packet start

func (*CAVCodecParserContext) SetOutputPictureNumber added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetOutputPictureNumber(outputPictureNumber int)

*

  • Picture number incremented in presentation or output order.
  • This field may be reinitialized at the first picture of a new sequence. *
  • For example, this corresponds to H.264 PicOrderCnt.

func (*CAVCodecParserContext) SetParser added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetParser(parser *CAVCodecParser)

func (*CAVCodecParserContext) SetPictType added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetPictType(pictType int)

XXX: Put it back in AVCodecContext.

func (*CAVCodecParserContext) SetPictureStructure added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetPictureStructure(picture_structure C.enum_AVPictureStructure)

*

  • Indicate whether a picture is coded as a frame, top field or bottom field. *
  • For example, H.264 field_pic_flag equal to 0 corresponds to
  • AV_PICTURE_STRUCTURE_FRAME. An H.264 picture with field_pic_flag
  • equal to 1 and bottom_field_flag equal to 0 corresponds to
  • AV_PICTURE_STRUCTURE_TOP_FIELD.

func (*CAVCodecParserContext) SetPos added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetPos(pos int64)

*

  • Byte position of currently parsed frame in stream.

func (*CAVCodecParserContext) SetPrivData added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetPrivData(privData unsafe.Pointer)

func (*CAVCodecParserContext) SetPts added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetPts(pts int64)

pts of the current frame

func (*CAVCodecParserContext) SetPtsDtsDelta added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetPtsDtsDelta(ptsDtsDelta int)

*

  • Presentation delay of current frame in units of AVCodecContext.time_base. *
  • Set to INT_MIN when dts_sync_point unused. Otherwise, it must
  • contain valid non-negative timestamp delta (presentation time of a frame
  • must not lie in the past). *
  • This delay represents the difference between decoding and presentation
  • time of the frame. *
  • For example, this corresponds to H.264 dpb_output_delay.

func (*CAVCodecParserContext) SetRepeatPict added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetRepeatPict(repeatPict int)

*

  • This field is used for proper frame duration computation in lavf.

  • It signals, how much longer the frame duration of the current frame

  • is compared to normal frame duration. *

  • frame_duration = (1 + repeat_pict) * time_base *

  • It is used by codecs like H.264 to display telecined material.

    XXX: Put it back in AVCodecContext.

func (*CAVCodecParserContext) SetWidth added in v0.0.4

func (parserCtx *CAVCodecParserContext) SetWidth(width int)

type CAVDiscard added in v0.0.4

type CAVDiscard C.enum_AVDiscard
const (
	/* We leave some space between them for extensions (drop some
	 * keyframes for intra-only or drop just some bidir frames). */
	AVDISCARD_NONE     CAVDiscard = C.AVDISCARD_NONE     ///< discard nothing
	AVDISCARD_DEFAULT  CAVDiscard = C.AVDISCARD_DEFAULT  ///< discard useless packets like 0 size packets in avi
	AVDISCARD_NONREF   CAVDiscard = C.AVDISCARD_NONREF   ///< discard all non reference
	AVDISCARD_BIDIR    CAVDiscard = C.AVDISCARD_BIDIR    ///< discard all bidirectional frames
	AVDISCARD_NONINTRA CAVDiscard = C.AVDISCARD_NONINTRA ///< discard all non intra frames
	AVDISCARD_NONKEY   CAVDiscard = C.AVDISCARD_NONKEY   ///< discard all frames except keyframes
	AVDISCARD_ALL      CAVDiscard = C.AVDISCARD_ALL      ///< discard all
)

type CAVFieldOrder added in v0.0.4

type CAVFieldOrder C.enum_AVFieldOrder
const (
	AV_FIELD_UNKNOWN     CAVFieldOrder = C.AV_FIELD_UNKNOWN
	AV_FIELD_PROGRESSIVE CAVFieldOrder = C.AV_FIELD_PROGRESSIVE
	AV_FIELD_TT          CAVFieldOrder = C.AV_FIELD_TT ///< Top coded_first, top displayed first
	AV_FIELD_BB          CAVFieldOrder = C.AV_FIELD_BB ///< Bottom coded first, bottom displayed first
	AV_FIELD_TB          CAVFieldOrder = C.AV_FIELD_TB ///< Top coded first, bottom displayed first
	AV_FIELD_BT          CAVFieldOrder = C.AV_FIELD_BT ///< Bottom coded first, top displayed first
)

type CAVHWAccel added in v0.0.4

type CAVHWAccel C.AVHWAccel

*

  • @defgroup lavc_hwaccel AVHWAccel *
  • @note Nothing in this structure should be accessed by the user. At some
  • point in future it will not be externally visible at all. *
  • @{

func (*CAVHWAccel) GetCapabilities added in v0.0.4

func (hwaccl *CAVHWAccel) GetCapabilities() int

*

  • Hardware accelerated codec capabilities.
  • see AV_HWACCEL_CODEC_CAP_*

func (*CAVHWAccel) GetId added in v0.0.4

func (hwaccl *CAVHWAccel) GetId() CAVCodecID

*

  • Codec implemented by the hardware accelerator. *
  • See AV_CODEC_ID_xxx

func (*CAVHWAccel) GetName added in v0.0.4

func (hwaccl *CAVHWAccel) GetName() string

*

  • Name of the hardware accelerated codec.
  • The name is globally unique among encoders and among decoders (but an
  • encoder and a decoder can share the same name).

func (*CAVHWAccel) GetPixFmt added in v0.0.4

func (hwaccl *CAVHWAccel) GetPixFmt() avutil.CAVPixelFormat

*

  • Supported pixel format. *
  • Only hardware accelerated formats are supported here.

func (*CAVHWAccel) GetType added in v0.0.4

func (hwaccl *CAVHWAccel) GetType() avutil.CAVMediaType

*

  • Type of codec implemented by the hardware accelerator. *
  • See AVMEDIA_TYPE_xxx

func (*CAVHWAccel) SetCapabilities added in v0.0.4

func (hwaccl *CAVHWAccel) SetCapabilities(capabilities int)

*

  • Hardware accelerated codec capabilities.
  • see AV_HWACCEL_CODEC_CAP_*

func (*CAVHWAccel) SetId added in v0.0.4

func (hwaccl *CAVHWAccel) SetId(id CAVCodecID)

*

  • Codec implemented by the hardware accelerator. *
  • See AV_CODEC_ID_xxx

func (*CAVHWAccel) SetPixFmt added in v0.0.4

func (hwaccl *CAVHWAccel) SetPixFmt(pixFmt avutil.CAVPixelFormat)

*

  • Supported pixel format. *
  • Only hardware accelerated formats are supported here.

func (*CAVHWAccel) SetType added in v0.0.4

func (hwaccl *CAVHWAccel) SetType(_type avutil.CAVMediaType)

*

  • Type of codec implemented by the hardware accelerator. *
  • See AVMEDIA_TYPE_xxx

type CAVPacket

type CAVPacket C.AVPacket

*

  • This structure stores compressed data. It is typically exported by demuxers
  • and then passed as input to decoders, or received as output from encoders and
  • then passed to muxers. *
  • For video, it should typically contain one compressed frame. For audio it may
  • contain several compressed frames. Encoders are allowed to output empty
  • packets, with no compressed data, containing only side data
  • (e.g. to update some stream parameters at the end of encoding). *
  • The semantics of data ownership depends on the buf field.
  • If it is set, the packet data is dynamically allocated and is
  • valid indefinitely until a call to av_packet_unref() reduces the
  • reference count to 0. *
  • If the buf field is not set av_packet_ref() would make a copy instead
  • of increasing the reference count. *
  • The side data is always allocated with av_malloc(), copied by
  • av_packet_ref() and freed by av_packet_unref(). *
  • sizeof(AVPacket) being a part of the public ABI is deprecated. once
  • av_init_packet() is removed, new packets will only be able to be allocated
  • with av_packet_alloc(), and new fields may be added to the end of the struct
  • with a minor bump. *
  • @see av_packet_alloc
  • @see av_packet_ref
  • @see av_packet_unref

func AvPacketAlloc

func AvPacketAlloc() *CAVPacket

*

  • Allocate an AVPacket and set its fields to default values. The resulting
  • struct must be freed using av_packet_free(). *
  • @return An AVPacket filled with default values or NULL on failure. *
  • @note this only allocates the AVPacket itself, not the data buffers. Those
  • must be allocated through other means such as av_new_packet. *
  • @see av_new_packet

func AvPacketClone

func AvPacketClone(src *CAVPacket) *CAVPacket

*

  • Create a new packet that references the same data as src. *
  • This is a shortcut for av_packet_alloc()+av_packet_ref(). *
  • @return newly created AVPacket on success, NULL on error. *
  • @see av_packet_alloc
  • @see av_packet_ref

func (*CAVPacket) GetBuf added in v0.0.3

func (pkt *CAVPacket) GetBuf() *avutil.CAVBufferRef

*

  • A reference to the reference-counted buffer where the packet data is
  • stored.
  • May be NULL, then the packet data is not reference-counted.

func (*CAVPacket) GetData

func (pkt *CAVPacket) GetData() unsafe.Pointer

func (*CAVPacket) GetDataPtr added in v0.0.4

func (pkt *CAVPacket) GetDataPtr() *unsafe.Pointer

func (*CAVPacket) GetDts

func (pkt *CAVPacket) GetDts() int64

*

  • Decompression timestamp in AVStream->time_base units; the time at which
  • the packet is decompressed.
  • Can be AV_NOPTS_VALUE if it is not stored in the file.

func (*CAVPacket) GetDuration

func (pkt *CAVPacket) GetDuration() int64

*

  • Duration of this packet in AVStream->time_base units, 0 if unknown.
  • Equals next_pts - this_pts in presentation order.

func (*CAVPacket) GetFlags

func (pkt *CAVPacket) GetFlags() int

*

  • A combination of AV_PKT_FLAG values

func (*CAVPacket) GetOpaque

func (pkt *CAVPacket) GetOpaque() unsafe.Pointer

*

  • for some private data of the user

func (*CAVPacket) GetOpaqueRef added in v0.0.3

func (pkt *CAVPacket) GetOpaqueRef() *avutil.CAVBufferRef

*

  • AVBufferRef for free use by the API user. FFmpeg will never check the
  • contents of the buffer ref. FFmpeg calls av_buffer_unref() on it when
  • the packet is unreferenced. av_packet_copy_props() calls create a new
  • reference with av_buffer_ref() for the target packet's opaque_ref field. *
  • This is unrelated to the opaque field, although it serves a similar
  • purpose.

func (*CAVPacket) GetPos

func (pkt *CAVPacket) GetPos() int64

/< byte position in stream, -1 if unknown

func (*CAVPacket) GetPts

func (pkt *CAVPacket) GetPts() int64

*

  • Presentation timestamp in AVStream->time_base units; the time at which
  • the decompressed packet will be presented to the user.
  • Can be AV_NOPTS_VALUE if it is not stored in the file.
  • pts MUST be larger or equal to dts as presentation cannot happen before
  • decompression, unless one wants to view hex dumps. Some formats misuse
  • the terms dts and pts/cts to mean something different. Such timestamps
  • must be converted to true pts/dts before they are stored in AVPacket.

func (*CAVPacket) GetSideData added in v0.0.3

func (pkt *CAVPacket) GetSideData() *CAVPacketSideData

*

  • Additional packet data that can be provided by the container.
  • Packet can contain several types of side information.

func (*CAVPacket) GetSideDataElems

func (pkt *CAVPacket) GetSideDataElems() int

func (*CAVPacket) GetSize

func (pkt *CAVPacket) GetSize() int

func (*CAVPacket) GetSizePtr added in v0.0.4

func (pkt *CAVPacket) GetSizePtr() *ctypes.Int

func (*CAVPacket) GetStreamIndex

func (pkt *CAVPacket) GetStreamIndex() int

func (*CAVPacket) GetTimeBase added in v0.0.3

func (pkt *CAVPacket) GetTimeBase() avutil.CAVRational

*

  • Time base of the packet's timestamps.
  • In the future, this field may be set on packets output by encoders or
  • demuxers, but its value will be by default ignored on input to decoders
  • or muxers.

func (*CAVPacket) SetBuf added in v0.0.3

func (pkt *CAVPacket) SetBuf(buf *avutil.CAVBufferRef)

*

  • A reference to the reference-counted buffer where the packet data is
  • stored.
  • May be NULL, then the packet data is not reference-counted.

func (*CAVPacket) SetData added in v0.0.3

func (pkt *CAVPacket) SetData(data unsafe.Pointer)

func (*CAVPacket) SetDts added in v0.0.3

func (pkt *CAVPacket) SetDts(dts int64)

*

  • Decompression timestamp in AVStream->time_base units; the time at which
  • the packet is decompressed.
  • Can be AV_NOPTS_VALUE if it is not stored in the file.

func (*CAVPacket) SetDuration added in v0.0.3

func (pkt *CAVPacket) SetDuration(duration int64)

*

  • Duration of this packet in AVStream->time_base units, 0 if unknown.
  • Equals next_pts - this_pts in presentation order.

func (*CAVPacket) SetFlags added in v0.0.3

func (pkt *CAVPacket) SetFlags(flags int)

*

  • A combination of AV_PKT_FLAG values

func (*CAVPacket) SetOpaque added in v0.0.3

func (pkt *CAVPacket) SetOpaque(opaque unsafe.Pointer)

*

  • for some private data of the user

func (*CAVPacket) SetOpaqueRef added in v0.0.3

func (pkt *CAVPacket) SetOpaqueRef(opaqueRef *avutil.CAVBufferRef)

*

  • AVBufferRef for free use by the API user. FFmpeg will never check the
  • contents of the buffer ref. FFmpeg calls av_buffer_unref() on it when
  • the packet is unreferenced. av_packet_copy_props() calls create a new
  • reference with av_buffer_ref() for the target packet's opaque_ref field. *
  • This is unrelated to the opaque field, although it serves a similar
  • purpose.

func (*CAVPacket) SetPos added in v0.0.3

func (pkt *CAVPacket) SetPos(pos int64)

/< byte position in stream, -1 if unknown

func (*CAVPacket) SetPts added in v0.0.3

func (pkt *CAVPacket) SetPts(pts int64)

*

  • Presentation timestamp in AVStream->time_base units; the time at which
  • the decompressed packet will be presented to the user.
  • Can be AV_NOPTS_VALUE if it is not stored in the file.
  • pts MUST be larger or equal to dts as presentation cannot happen before
  • decompression, unless one wants to view hex dumps. Some formats misuse
  • the terms dts and pts/cts to mean something different. Such timestamps
  • must be converted to true pts/dts before they are stored in AVPacket.

func (*CAVPacket) SetSideData added in v0.0.3

func (pkt *CAVPacket) SetSideData(sideData *CAVPacketSideData)

*

  • Additional packet data that can be provided by the container.
  • Packet can contain several types of side information.

func (*CAVPacket) SetSideDataElems added in v0.0.3

func (pkt *CAVPacket) SetSideDataElems(sideDataElems int)

func (*CAVPacket) SetSize added in v0.0.3

func (pkt *CAVPacket) SetSize(size int)

func (*CAVPacket) SetStreamIndex

func (pkt *CAVPacket) SetStreamIndex(streamIndex int)

func (*CAVPacket) SetTimeBase added in v0.0.3

func (pkt *CAVPacket) SetTimeBase(timeBase avutil.CAVRational)

*

  • Time base of the packet's timestamps.
  • In the future, this field may be set on packets output by encoders or
  • demuxers, but its value will be by default ignored on input to decoders
  • or muxers.

type CAVPacketSideData added in v0.0.3

type CAVPacketSideData C.AVPacketSideData

*

  • This structure stores auxiliary information for decoding, presenting, or
  • otherwise processing the coded stream. It is typically exported by demuxers
  • and encoders and can be fed to decoders and muxers either in a per packet
  • basis, or as global side data (applying to the entire coded stream). *
  • Global side data is handled as follows:
  • - During demuxing, it may be exported through
  • @ref AVStream.codecpar.side_data "AVStream's codec parameters", which can
  • then be passed as input to decoders through the
  • @ref AVCodecContext.coded_side_data "decoder context's side data", for
  • initialization.
  • - For muxing, it can be fed through @ref AVStream.codecpar.side_data
  • "AVStream's codec parameters", typically the output of encoders through
  • the @ref AVCodecContext.coded_side_data "encoder context's side data", for
  • initialization. *
  • Packet specific side data is handled as follows:
  • - During demuxing, it may be exported through @ref AVPacket.side_data
  • "AVPacket's side data", which can then be passed as input to decoders.
  • - For muxing, it can be fed through @ref AVPacket.side_data "AVPacket's
  • side data", typically the output of encoders. *
  • Different modules may accept or export different types of side data
  • depending on media type and codec. Refer to @ref AVPacketSideDataType for a
  • list of defined types and where they may be found or used.

func AvPacketSideDataAdd added in v0.0.3

func AvPacketSideDataAdd(sd **CAVPacketSideData, nb_sd *ctypes.Int, _type CAVPacketSideDataType,
	data unsafe.Pointer, size ctypes.SizeT, flags int) *CAVPacketSideData

*

  • Wrap existing data as packet side data. *
  • @param sd pointer to an array of side data to which the side data should
  • be added. *sd may be NULL, in which case the array will be
  • initialized
  • @param nb_sd pointer to an integer containing the number of entries in
  • the array. The integer value will be increased by 1 on success.
  • @param type side data type
  • @param data a data array. It must be allocated with the av_malloc() family
  • of functions. The ownership of the data is transferred to the
  • side data array on success
  • @param size size of the data array
  • @param flags currently unused. Must be zero *
  • @return pointer to freshly allocated side data on success, or NULL otherwise
  • On failure, the side data array is unchanged and the data remains
  • owned by the caller.

func AvPacketSideDataGet added in v0.0.3

func AvPacketSideDataGet(sd *CAVPacketSideData, nb_sd ctypes.Int, _type CAVPacketSideDataType) *CAVPacketSideData

*

  • Get side information from a side data array. *
  • @param sd the array from which the side data should be fetched
  • @param nb_sd value containing the number of entries in the array.
  • @param type desired side information type *
  • @return pointer to side data if present or NULL otherwise

func AvPacketSideDataNew added in v0.0.3

func AvPacketSideDataNew(psd **CAVPacketSideData, pnb_sd *ctypes.Int, _type CAVPacketSideDataType,
	size ctypes.SizeT, flags int) *CAVPacketSideData

*

  • Allocate a new packet side data. *
  • @param sd pointer to an array of side data to which the side data should
  • be added. *sd may be NULL, in which case the array will be
  • initialized.
  • @param nb_sd pointer to an integer containing the number of entries in
  • the array. The integer value will be increased by 1 on success.
  • @param type side data type
  • @param size desired side data size
  • @param flags currently unused. Must be zero *
  • @return pointer to freshly allocated side data on success, or NULL otherwise.

func (*CAVPacketSideData) GetData added in v0.0.3

func (psd *CAVPacketSideData) GetData() unsafe.Pointer

func (*CAVPacketSideData) GetSize added in v0.0.3

func (psd *CAVPacketSideData) GetSize() ctypes.SizeT

func (*CAVPacketSideData) GetType added in v0.0.3

func (*CAVPacketSideData) SetData added in v0.0.3

func (psd *CAVPacketSideData) SetData(data unsafe.Pointer)

func (*CAVPacketSideData) SetSize added in v0.0.3

func (psd *CAVPacketSideData) SetSize(size ctypes.SizeT)

func (*CAVPacketSideData) SetType added in v0.0.3

func (psd *CAVPacketSideData) SetType(_type CAVPacketSideDataType)

type CAVPacketSideDataType added in v0.0.3

type CAVPacketSideDataType C.enum_AVPacketSideDataType

*

  • @defgroup lavc_packet_side_data AVPacketSideData *
  • Types and functions for working with AVPacketSideData.
  • @{
const (
	/**
	 * 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 CAVPacketSideDataType = C.AV_PKT_DATA_PALETTE

	/**
	 * The AV_PKT_DATA_NEW_EXTRADATA is used to notify the codec or the format
	 * that the extradata buffer was changed and the receiving side should
	 * act upon it appropriately. The new extradata is embedded in the side
	 * data buffer and should be immediately used for processing the current
	 * frame or packet.
	 */
	AV_PKT_DATA_NEW_EXTRADATA CAVPacketSideDataType = C.AV_PKT_DATA_NEW_EXTRADATA

	/**
	 * An AV_PKT_DATA_PARAM_CHANGE side data packet is laid out as follows:
	 * @code
	 * u32le param_flags
	 * if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT)
	 *     s32le channel_count
	 * if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT)
	 *     u64le channel_layout
	 * if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE)
	 *     s32le sample_rate
	 * if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS)
	 *     s32le width
	 *     s32le height
	 * @endcode
	 */
	AV_PKT_DATA_PARAM_CHANGE CAVPacketSideDataType = C.AV_PKT_DATA_PARAM_CHANGE

	/**
	 * An AV_PKT_DATA_H263_MB_INFO side data packet contains a number of
	 * structures with info about macroblocks relevant to splitting the
	 * packet into smaller packets on macroblock edges (e.g. as for RFC 2190).
	 * That is, it does not necessarily contain info about all macroblocks,
	 * as long as the distance between macroblocks in the info is smaller
	 * than the target payload size.
	 * Each MB info structure is 12 bytes, and is laid out as follows:
	 * @code
	 * u32le bit offset from the start of the packet
	 * u8    current quantizer at the start of the macroblock
	 * u8    GOB number
	 * u16le macroblock address within the GOB
	 * u8    horizontal MV predictor
	 * u8    vertical MV predictor
	 * u8    horizontal MV predictor for block number 3
	 * u8    vertical MV predictor for block number 3
	 * @endcode
	 */
	AV_PKT_DATA_H263_MB_INFO CAVPacketSideDataType = C.AV_PKT_DATA_H263_MB_INFO

	/**
	 * This side data should be associated with an audio stream and contains
	 * ReplayGain information in form of the AVReplayGain struct.
	 */
	AV_PKT_DATA_REPLAYGAIN CAVPacketSideDataType = C.AV_PKT_DATA_REPLAYGAIN

	/**
	 * This side data contains a 3x3 transformation matrix describing an affine
	 * transformation that needs to be applied to the decoded video frames for
	 * correct presentation.
	 *
	 * See libavutil/display.h for a detailed description of the data.
	 */
	AV_PKT_DATA_DISPLAYMATRIX CAVPacketSideDataType = C.AV_PKT_DATA_DISPLAYMATRIX

	/**
	 * This side data should be associated with a video stream and contains
	 * Stereoscopic 3D information in form of the AVStereo3D struct.
	 */
	AV_PKT_DATA_STEREO3D CAVPacketSideDataType = C.AV_PKT_DATA_STEREO3D

	/**
	 * This side data should be associated with an audio stream and corresponds
	 * to enum AVAudioServiceType.
	 */
	AV_PKT_DATA_AUDIO_SERVICE_TYPE CAVPacketSideDataType = C.AV_PKT_DATA_AUDIO_SERVICE_TYPE

	/**
	 * This side data contains quality related information from the encoder.
	 * @code
	 * u32le quality factor of the compressed frame. Allowed range is between 1 (good) and FF_LAMBDA_MAX (bad).
	 * u8    picture type
	 * u8    error count
	 * u16   reserved
	 * u64le[error count] sum of squared differences between encoder in and output
	 * @endcode
	 */
	AV_PKT_DATA_QUALITY_STATS CAVPacketSideDataType = C.AV_PKT_DATA_QUALITY_STATS

	/**
	 * This side data contains an integer value representing the stream index
	 * of a "fallback" track.  A fallback track indicates an alternate
	 * track to use when the current track can not be decoded for some reason.
	 * e.g. no decoder available for codec.
	 */
	AV_PKT_DATA_FALLBACK_TRACK CAVPacketSideDataType = C.AV_PKT_DATA_FALLBACK_TRACK

	/**
	 * This side data corresponds to the AVCPBProperties struct.
	 */
	AV_PKT_DATA_CPB_PROPERTIES CAVPacketSideDataType = C.AV_PKT_DATA_CPB_PROPERTIES

	/**
	 * Recommmends skipping the specified number of samples
	 * @code
	 * u32le number of samples to skip from start of this packet
	 * u32le number of samples to skip from end of this packet
	 * u8    reason for start skip
	 * u8    reason for end   skip (0=padding silence, 1=convergence)
	 * @endcode
	 */
	AV_PKT_DATA_SKIP_SAMPLES CAVPacketSideDataType = C.AV_PKT_DATA_SKIP_SAMPLES

	/**
	 * An AV_PKT_DATA_JP_DUALMONO side data packet indicates that
	 * the packet may contain "dual mono" audio specific to Japanese DTV
	 * and if it is true, recommends only the selected channel to be used.
	 * @code
	 * u8    selected channels (0=main/left, 1=sub/right, 2=both)
	 * @endcode
	 */
	AV_PKT_DATA_JP_DUALMONO CAVPacketSideDataType = C.AV_PKT_DATA_JP_DUALMONO

	/**
	 * A list of zero terminated key/value strings. There is no end marker for
	 * the list, so it is required to rely on the side data size to stop.
	 */
	AV_PKT_DATA_STRINGS_METADATA CAVPacketSideDataType = C.AV_PKT_DATA_STRINGS_METADATA

	/**
	 * Subtitle event position
	 * @code
	 * u32le x1
	 * u32le y1
	 * u32le x2
	 * u32le y2
	 * @endcode
	 */
	AV_PKT_DATA_SUBTITLE_POSITION CAVPacketSideDataType = C.AV_PKT_DATA_SUBTITLE_POSITION

	/**
	 * Data found in BlockAdditional element of matroska container. There is
	 * no end marker for the data, so it is required to rely on the side data
	 * size to recognize the end. 8 byte id (as found in BlockAddId) followed
	 * by data.
	 */
	AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL CAVPacketSideDataType = C.AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL

	/**
	 * The optional first identifier line of a WebVTT cue.
	 */
	AV_PKT_DATA_WEBVTT_IDENTIFIER CAVPacketSideDataType = C.AV_PKT_DATA_WEBVTT_IDENTIFIER

	/**
	 * The optional settings (rendering instructions) that immediately
	 * follow the timestamp specifier of a WebVTT cue.
	 */
	AV_PKT_DATA_WEBVTT_SETTINGS CAVPacketSideDataType = C.AV_PKT_DATA_WEBVTT_SETTINGS

	/**
	 * A list of zero terminated key/value strings. There is no end marker for
	 * the list, so it is required to rely on the side data size to stop. This
	 * side data includes updated metadata which appeared in the stream.
	 */
	AV_PKT_DATA_METADATA_UPDATE CAVPacketSideDataType = C.AV_PKT_DATA_METADATA_UPDATE

	/**
	 * MPEGTS stream ID as uint8_t, this is required to pass the stream ID
	 * information from the demuxer to the corresponding muxer.
	 */
	AV_PKT_DATA_MPEGTS_STREAM_ID CAVPacketSideDataType = C.AV_PKT_DATA_MPEGTS_STREAM_ID

	/**
	 * Mastering display metadata (based on SMPTE-2086:2014). This metadata
	 * should be associated with a video stream and contains data in the form
	 * of the AVMasteringDisplayMetadata struct.
	 */
	AV_PKT_DATA_MASTERING_DISPLAY_METADATA CAVPacketSideDataType = C.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 CAVPacketSideDataType = C.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 CAVPacketSideDataType = C.AV_PKT_DATA_CONTENT_LIGHT_LEVEL

	/**
	 * ATSC A53 Part 4 Closed Captions. This metadata should be associated with
	 * a video stream. A53 CC bitstream is stored as uint8_t in AVPacketSideData.data.
	 * The number of bytes of CC data is AVPacketSideData.size.
	 */
	AV_PKT_DATA_A53_CC CAVPacketSideDataType = C.AV_PKT_DATA_A53_CC

	/**
	 * This side data is encryption initialization data.
	 * The format is not part of ABI, use av_encryption_init_info_* methods to
	 * access.
	 */
	AV_PKT_DATA_ENCRYPTION_INIT_INFO CAVPacketSideDataType = C.AV_PKT_DATA_ENCRYPTION_INIT_INFO

	/**
	 * This side data contains encryption info for how to decrypt the packet.
	 * The format is not part of ABI, use av_encryption_info_* methods to access.
	 */
	AV_PKT_DATA_ENCRYPTION_INFO CAVPacketSideDataType = C.AV_PKT_DATA_ENCRYPTION_INFO

	/**
	 * Active Format Description data consisting of a single byte as specified
	 * in ETSI TS 101 154 using AVActiveFormatDescription enum.
	 */
	AV_PKT_DATA_AFD CAVPacketSideDataType = C.AV_PKT_DATA_AFD

	/**
	 * Producer Reference Time data corresponding to the AVProducerReferenceTime struct,
	 * usually exported by some encoders (on demand through the prft flag set in the
	 * AVCodecContext export_side_data field).
	 */
	AV_PKT_DATA_PRFT CAVPacketSideDataType = C.AV_PKT_DATA_PRFT

	/**
	 * ICC profile data consisting of an opaque octet buffer following the
	 * format described by ISO 15076-1.
	 */
	AV_PKT_DATA_ICC_PROFILE CAVPacketSideDataType = C.AV_PKT_DATA_ICC_PROFILE

	/**
	 * DOVI configuration
	 * ref:
	 * dolby-vision-bitstreams-within-the-iso-base-media-file-format-v2.1.2, section 2.2
	 * dolby-vision-bitstreams-in-mpeg-2-transport-stream-multiplex-v1.2, section 3.3
	 * Tags are stored in struct AVDOVIDecoderConfigurationRecord.
	 */
	AV_PKT_DATA_DOVI_CONF CAVPacketSideDataType = C.AV_PKT_DATA_DOVI_CONF

	/**
	 * Timecode which conforms to SMPTE ST 12-1:2014. The data is an array of 4 uint32_t
	 * where the first uint32_t describes how many (1-3) of the other timecodes are used.
	 * The timecode format is described in the documentation of av_timecode_get_smpte_from_framenum()
	 * function in libavutil/timecode.h.
	 */
	AV_PKT_DATA_S12M_TIMECODE CAVPacketSideDataType = C.AV_PKT_DATA_S12M_TIMECODE

	/**
	 * HDR10+ dynamic metadata associated with a video frame. The metadata is in
	 * the form of the AVDynamicHDRPlus struct and contains
	 * information for color volume transform - application 4 of
	 * SMPTE 2094-40:2016 standard.
	 */
	AV_PKT_DATA_DYNAMIC_HDR10_PLUS CAVPacketSideDataType = C.AV_PKT_DATA_DYNAMIC_HDR10_PLUS

	/**
	 * The number of side data types.
	 * This is not part of the public API/ABI in the sense that it may
	 * change when new side data types are added.
	 * This must stay the last enum value.
	 * If its value becomes huge, some code using it
	 * needs to be updated as it assumes it to be smaller than other limits.
	 */
	AV_PKT_DATA_NB CAVPacketSideDataType = C.AV_PKT_DATA_NB
)

type CAVPanScan added in v0.0.4

type CAVPanScan C.AVPanScan

*

  • Pan Scan area.
  • This specifies the area which should be displayed.
  • Note there may be multiple such areas for one frame.

func (*CAVPanScan) GetHeight added in v0.0.4

func (ps *CAVPanScan) GetHeight() int

func (*CAVPanScan) GetId added in v0.0.4

func (ps *CAVPanScan) GetId() int

*

  • id
  • - encoding: Set by user.
  • - decoding: Set by libavcodec.

func (*CAVPanScan) GetPosition added in v0.0.4

func (ps *CAVPanScan) GetPosition() [3][2]ctypes.Int16

*

  • position of the top left corner in 1/16 pel for up to 3 fields/frames
  • - encoding: Set by user.
  • - decoding: Set by libavcodec.

func (*CAVPanScan) GetWidth added in v0.0.4

func (ps *CAVPanScan) GetWidth() int

func (*CAVPanScan) SetHeight added in v0.0.4

func (ps *CAVPanScan) SetHeight(height int)

func (*CAVPanScan) SetId added in v0.0.4

func (ps *CAVPanScan) SetId(id int)

*

  • id
  • - encoding: Set by user.
  • - decoding: Set by libavcodec.

func (*CAVPanScan) SetPosition added in v0.0.4

func (ps *CAVPanScan) SetPosition(position [3][2]ctypes.Int16)

*

  • position of the top left corner in 1/16 pel for up to 3 fields/frames
  • - encoding: Set by user.
  • - decoding: Set by libavcodec.

func (*CAVPanScan) SetWidth added in v0.0.4

func (ps *CAVPanScan) SetWidth(width int)

type CAVPictureStructure added in v0.0.4

type CAVPictureStructure = C.enum_AVPictureStructure
const (
	AV_PICTURE_STRUCTURE_UNKNOWN      CAVPictureStructure = C.AV_PICTURE_STRUCTURE_UNKNOWN      ///< unknown
	AV_PICTURE_STRUCTURE_TOP_FIELD    CAVPictureStructure = C.AV_PICTURE_STRUCTURE_TOP_FIELD    ///< coded as top field
	AV_PICTURE_STRUCTURE_BOTTOM_FIELD CAVPictureStructure = C.AV_PICTURE_STRUCTURE_BOTTOM_FIELD ///< coded as bottom field
	AV_PICTURE_STRUCTURE_FRAME        CAVPictureStructure = C.AV_PICTURE_STRUCTURE_FRAME        ///< coded as frame
)

type CAVProducerReferenceTime added in v0.0.4

type CAVProducerReferenceTime C.AVProducerReferenceTime

*

  • This structure supplies correlation between a packet timestamp and a wall clock
  • production time. The definition follows the Producer Reference Time ('prft')
  • as defined in ISO/IEC 14496-12

func (*CAVProducerReferenceTime) GetFlags added in v0.0.4

func (prt *CAVProducerReferenceTime) GetFlags() int

func (*CAVProducerReferenceTime) GetWallclock added in v0.0.4

func (prt *CAVProducerReferenceTime) GetWallclock() int64

*

  • A UTC timestamp, in microseconds, since Unix epoch (e.g, av_gettime()).

func (*CAVProducerReferenceTime) SetFlags added in v0.0.4

func (prt *CAVProducerReferenceTime) SetFlags(flags int)

func (*CAVProducerReferenceTime) SetWallclock added in v0.0.4

func (prt *CAVProducerReferenceTime) SetWallclock(wallclock int64)

*

  • A UTC timestamp, in microseconds, since Unix epoch (e.g, av_gettime()).

type CAVProfile

type CAVProfile C.AVProfile

*

  • AVProfile.

func (*CAVProfile) GetName

func (p *CAVProfile) GetName() string

/< short name for the profile

func (*CAVProfile) GetProfile

func (p *CAVProfile) GetProfile() int

func (*CAVProfile) SetProfile added in v0.0.4

func (p *CAVProfile) SetProfile(profile int)

type CAVSideDataParamChangeFlags added in v0.0.3

type CAVSideDataParamChangeFlags C.enum_AVSideDataParamChangeFlags
const (
	//  #if FF_API_OLD_CHANNEL_LAYOUT
	// 	 /**
	// 	  * @deprecated those are not used by any decoder
	// 	  */
	// 	 AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT  = 0x0001,
	// 	 AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT = 0x0002,
	//  #endif
	AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE CAVSideDataParamChangeFlags = C.AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE
	AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS  CAVSideDataParamChangeFlags = C.AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS
)

type CAVSubtitle added in v0.0.4

type CAVSubtitle C.AVSubtitle

func (*CAVSubtitle) GetEndDisplayTime added in v0.0.4

func (s *CAVSubtitle) GetEndDisplayTime() ctypes.UInt32

relative to packet pts, in ms

func (*CAVSubtitle) GetFormat added in v0.0.4

func (s *CAVSubtitle) GetFormat() ctypes.UInt16

0 = graphics

func (*CAVSubtitle) GetNumRects added in v0.0.4

func (s *CAVSubtitle) GetNumRects() uint

func (*CAVSubtitle) GetPts added in v0.0.4

func (s *CAVSubtitle) GetPts() ctypes.Int64

/< Same as packet pts, in AV_TIME_BASE

func (*CAVSubtitle) GetRects added in v0.0.4

func (s *CAVSubtitle) GetRects() **CAVSubtitleRect

func (*CAVSubtitle) GetStartDisplayTime added in v0.0.4

func (s *CAVSubtitle) GetStartDisplayTime() ctypes.UInt32

relative to packet pts, in ms

func (*CAVSubtitle) SetEndDisplayTime added in v0.0.4

func (s *CAVSubtitle) SetEndDisplayTime(endDisplayTime ctypes.UInt32)

relative to packet pts, in ms

func (*CAVSubtitle) SetFormat added in v0.0.4

func (s *CAVSubtitle) SetFormat(format ctypes.UInt16)

0 = graphics

func (*CAVSubtitle) SetNumRects added in v0.0.4

func (s *CAVSubtitle) SetNumRects(numRects uint)

func (*CAVSubtitle) SetPts added in v0.0.4

func (s *CAVSubtitle) SetPts(pts ctypes.Int64)

/< Same as packet pts, in AV_TIME_BASE

func (*CAVSubtitle) SetRects added in v0.0.4

func (s *CAVSubtitle) SetRects(rects **CAVSubtitleRect)

func (*CAVSubtitle) SetStartDisplayTime added in v0.0.4

func (s *CAVSubtitle) SetStartDisplayTime(startDisplayTime ctypes.UInt32)

relative to packet pts, in ms

type CAVSubtitleRect added in v0.0.4

type CAVSubtitleRect C.AVSubtitleRect

func (*CAVSubtitleRect) GetAss added in v0.0.4

func (sr *CAVSubtitleRect) GetAss() string

*

  • 0 terminated ASS/SSA compatible event line.
  • The presentation of this is unaffected by the other values in this
  • struct.

func (*CAVSubtitleRect) GetData added in v0.0.4

func (sr *CAVSubtitleRect) GetData() [4]unsafe.Pointer

func (*CAVSubtitleRect) GetFlags added in v0.0.4

func (sr *CAVSubtitleRect) GetFlags() int

func (*CAVSubtitleRect) GetH added in v0.0.4

func (sr *CAVSubtitleRect) GetH() int

/< height of pict, undefined when pict is not set

func (*CAVSubtitleRect) GetLinesize added in v0.0.4

func (sr *CAVSubtitleRect) GetLinesize() [4]ctypes.Int

func (*CAVSubtitleRect) GetNbColors added in v0.0.4

func (sr *CAVSubtitleRect) GetNbColors() int

/< number of colors in pict, undefined when pict is not set

func (*CAVSubtitleRect) GetText added in v0.0.4

func (sr *CAVSubtitleRect) GetText() string

/< 0 terminated plain UTF-8 text

func (*CAVSubtitleRect) GetType added in v0.0.4

func (sr *CAVSubtitleRect) GetType() CAVSubtitleType

func (*CAVSubtitleRect) GetW added in v0.0.4

func (sr *CAVSubtitleRect) GetW() int

/< width of pict, undefined when pict is not set

func (*CAVSubtitleRect) GetX added in v0.0.4

func (sr *CAVSubtitleRect) GetX() int

/< top left corner of pict, undefined when pict is not set

func (*CAVSubtitleRect) GetY added in v0.0.4

func (sr *CAVSubtitleRect) GetY() int

/< top left corner of pict, undefined when pict is not set

func (*CAVSubtitleRect) SetAss added in v0.0.4

func (sr *CAVSubtitleRect) SetAss(ass string)

*

  • 0 terminated ASS/SSA compatible event line.
  • The presentation of this is unaffected by the other values in this
  • struct.

func (*CAVSubtitleRect) SetData added in v0.0.4

func (sr *CAVSubtitleRect) SetData(data [4]unsafe.Pointer)

func (*CAVSubtitleRect) SetFlags added in v0.0.4

func (sr *CAVSubtitleRect) SetFlags(flags int)

func (*CAVSubtitleRect) SetH added in v0.0.4

func (sr *CAVSubtitleRect) SetH(h int)

/< height of pict, undefined when pict is not set

func (*CAVSubtitleRect) SetLinesize added in v0.0.4

func (sr *CAVSubtitleRect) SetLinesize(linesize [4]ctypes.Int)

func (*CAVSubtitleRect) SetNbColors added in v0.0.4

func (sr *CAVSubtitleRect) SetNbColors(nbColors int)

/< number of colors in pict, undefined when pict is not set

func (*CAVSubtitleRect) SetText added in v0.0.4

func (sr *CAVSubtitleRect) SetText(text string)

/< 0 terminated plain UTF-8 text

func (*CAVSubtitleRect) SetType added in v0.0.4

func (sr *CAVSubtitleRect) SetType(_type CAVSubtitleType)

func (*CAVSubtitleRect) SetW added in v0.0.4

func (sr *CAVSubtitleRect) SetW(w int)

/< width of pict, undefined when pict is not set

func (*CAVSubtitleRect) SetX added in v0.0.4

func (sr *CAVSubtitleRect) SetX(x int)

/< top left corner of pict, undefined when pict is not set

func (*CAVSubtitleRect) SetY added in v0.0.4

func (sr *CAVSubtitleRect) SetY(y int)

/< top left corner of pict, undefined when pict is not set

type CAVSubtitleType added in v0.0.4

type CAVSubtitleType C.enum_AVSubtitleType
const (
	SUBTITLE_NONE CAVSubtitleType = C.SUBTITLE_NONE

	SUBTITLE_BITMAP CAVSubtitleType = C.SUBTITLE_BITMAP ///< A bitmap, pict will be set

	/**
	 * Plain text, the text field must be set by the decoder and is
	 * authoritative. ass and pict fields may contain approximations.
	 */
	SUBTITLE_TEXT CAVSubtitleType = C.SUBTITLE_TEXT

	/**
	 * Formatted text, the ass field must be set by the decoder and is
	 * authoritative. pict and text fields may contain approximations.
	 */
	SUBTITLE_ASS CAVSubtitleType = C.SUBTITLE_ASS
)

type CRcOverride

type CRcOverride C.RcOverride

*

  • @ingroup lavc_encoding

func (*CRcOverride) GetEndFrame added in v0.0.4

func (ro *CRcOverride) GetEndFrame() int

func (*CRcOverride) GetQscale added in v0.0.4

func (ro *CRcOverride) GetQscale() int

If this is 0 then quality_factor will be used instead.

func (*CRcOverride) GetQualityFactor added in v0.0.4

func (ro *CRcOverride) GetQualityFactor() float32

func (*CRcOverride) GetStartFrame added in v0.0.4

func (ro *CRcOverride) GetStartFrame() int

func (*CRcOverride) SetEndFrame added in v0.0.4

func (ro *CRcOverride) SetEndFrame(endFrame int)

func (*CRcOverride) SetQscale added in v0.0.4

func (ro *CRcOverride) SetQscale(qscale int)

If this is 0 then quality_factor will be used instead.

func (*CRcOverride) SetQualityFactor added in v0.0.4

func (ro *CRcOverride) SetQualityFactor(qualityFactor float32)

func (*CRcOverride) SetStartFrame added in v0.0.4

func (ro *CRcOverride) SetStartFrame(startFrame int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL