AVCodec

public struct AVCodec

Undocumented

  • Find a registered decoder with a matching codec ID.

    Declaration

    Swift

    public static func findDecoderById(_ codecId: AVCodecID) -> AVCodec?

    Parameters

    codecId

    id of the requested decoder

    Return Value

    A decoder if one was found, nil otherwise.

  • Find a registered decoder with the specified name.

    Declaration

    Swift

    public static func findDecoderByName(_ name: String) -> AVCodec?

    Parameters

    name

    name of the requested decoder

    Return Value

    A decoder if one was found, nil otherwise.

  • Find a registered encoder with a matching codec ID.

    Declaration

    Swift

    public static func findEncoderById(_ codecId: AVCodecID) -> AVCodec?

    Parameters

    codecId

    id of the requested encoder

    Return Value

    An encoder if one was found, nil otherwise.

  • Find a registered encoder with the specified name.

    Declaration

    Swift

    public static func findEncoderByName(_ name: String) -> AVCodec?

    Parameters

    name

    name of the requested encoder

    Return Value

    An encoder if one was found, nil otherwise.

  • The codec’s name.

    Declaration

    Swift

    public var name: String { get }
  • The codec’s descriptive name, meant to be more human readable than name.

    Declaration

    Swift

    public var longName: String { get }
  • The codec’s media type.

    Declaration

    Swift

    public var mediaType: AVMediaType { get }
  • id

    The codec’s id.

    Declaration

    Swift

    public var id: AVCodecID { get }
  • The codec’s capabilities.

    Declaration

    Swift

    public var capabilities: AVCodec.Cap { get }
  • Returns an array of the framerates supported by the codec.

    Declaration

    Swift

    public var supportedFramerates: [AVRational]? { get }
  • Returns an array of the pixel formats supported by the codec.

    Declaration

    Swift

    public var supportedPixelFormats: [AVPixelFormat]? { get }
  • Returns an array of the audio samplerates supported by the codec.

    Declaration

    Swift

    public var supportedSampleRates: [Int]? { get }
  • Returns an array of the sample formats supported by the codec.

    Declaration

    Swift

    public var supportedSampleFormats: [AVSampleFormat]? { get }
  • Returns an array of the channel layouts supported by the codec.

    Declaration

    Swift

    public var supportedChannelLayouts: [AVChannelLayout]? { get }
  • Maximum value for lowres supported by the decoder.

    Declaration

    Swift

    public var maxLowres: UInt8 { get }
  • A Boolean value indicating whether the codec is decoder.

    Declaration

    Swift

    public var isDecoder: Bool { get }
  • A Boolean value indicating whether the codec is encoder.

    Declaration

    Swift

    public var isEncoder: Bool { get }
  • Retrieve supported hardware configurations for a codec.

    Values of index from zero to some maximum return the indexed configuration descriptor; all other values return nil. If the codec does not support any hardware configurations then it will always return nil.

    Declaration

    Swift

    public func hwConfig(at index: Int) -> AVCodecHWConfig?
  • Get all registered codecs.

    Declaration

    Swift

    public static var supportedCodecs: [AVCodec] { get }
  • Cap

    Codec capabilities

    See more

    Declaration

    Swift

    public struct Cap : OptionSet
  • Undocumented

    Declaration

    Swift

    public func withUnsafeObjectPointer<T>(_ body: (UnsafeMutableRawPointer) throws -> T) rethrows -> T