AVCodecParameters
public final class AVCodecParameters
This class describes the properties of an encoded stream.
-
Create a new
AVCodecParameters
and set its fields to default values (unknown/invalid/0).Declaration
Swift
public init()
-
General type of the encoded data.
Declaration
Swift
public var mediaType: AVMediaType { get set }
-
Specific type of the encoded data (the codec used).
Declaration
Swift
public var codecId: AVCodecID { get set }
-
Additional information about the codec (corresponds to the AVI FOURCC).
Declaration
Swift
public var codecTag: UInt32 { get set }
-
Extra binary data needed for initializing the decoder, codec-dependent.
Must be allocated with
AVIO.malloc(size:)
and will be freed byavcodec_parameters_free()
. The allocated size of extradata must be at leastextradataSize + AVConstant.inputBufferPaddingSize
, with the padding bytes zeroed.Declaration
Swift
public var extradata: UnsafeMutablePointer<UInt8>? { get set }
-
The size of the extradata content in bytes.
Declaration
Swift
public var extradataSize: Int { get set }
-
The average bitrate of the encoded data (in bits per second).
Declaration
Swift
public var bitRate: Int64 { get set }
-
Copy the contents from the supplied codec parameters.
Declaration
Swift
public func copy(from codecpar: AVCodecParameters)
-
Fill the parameters struct based on the values from the supplied codec context.
Declaration
Swift
public func copy(from codecCtx: AVCodecContext)
-
The pixel format of the video frame.
Declaration
Swift
public var pixelFormat: AVPixelFormat { get set }
-
The width of the video frame in pixels.
Declaration
Swift
public var width: Int { get set }
-
The height of the video frame in pixels.
Declaration
Swift
public var height: Int { get set }
-
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).
Declaration
Swift
public var sampleAspectRatio: AVRational { get set }
-
Number of delayed frames.
Declaration
Swift
public var videoDelay: Int { get set }
-
The sample format of audio.
Declaration
Swift
public var sampleFormat: AVSampleFormat { get set }
-
The channel layout bitmask. May be 0 if the channel layout is unknown or unspecified, otherwise the number of bits set must be equal to the channels field.
Declaration
Swift
public var channelLayout: AVChannelLayout { get set }
-
The number of audio channels.
Declaration
Swift
public var channelCount: Int { get set }
-
The number of audio samples per second.
Declaration
Swift
public var sampleRate: Int { get set }
-
Audio frame size, if known. Required by some formats to be static.
Declaration
Swift
public var frameSize: Int { get set }