AVDeviceInfoList

public final class AVDeviceInfoList

List of devices.

  • List devices.

    Returns available device names and their parameters.

    Note

    Some devices may accept system-dependent device names that cannot be autodetected. The list returned by this function cannot be assumed to be always completed.

    Throws

    AVError

    Declaration

    Swift

    public init(formatContext: AVFormatContext) throws

    Parameters

    formatContext

    device context

  • list of autodetected devices

    Declaration

    Swift

    public var devices: [AVDeviceInfo] { get }
  • number of autodetected devices

    Declaration

    Swift

    public var deviceCount: Int { get }
  • index of default device or -1 if no default

    Declaration

    Swift

    public var defaultDeviceIndex: Int { get }
  • List devices.

    Returns available device names and their parameters. These are convinient wrappers for init(formatContext:). Device context is allocated and deallocated internally.

    Note

    device argument takes precedence over device_name when both are set.

    Throws

    AVError

    Declaration

    Swift

    public static func listInputSources(
        device: AVInputFormat?,
        deviceName: String?,
        options: [String: String]? = nil
    ) throws -> AVDeviceInfoList

    Parameters

    device

    device format. May be nil if device name is set.

    deviceName

    device name. May be nil if device format is set.

    options

    An dictionary filled with device-private options. The same options must be passed later to AVFormatContext.writeHeader(options:) for output devices or AVFormatContext.openInput(_:format:options:) for input devices, or at any other place that affects device-private options.

    Return Value

    list of autodetected devices

  • Undocumented

    Declaration

    Swift

    public static func listInputSinks(
        device: AVOutputFormat?,
        deviceName: String? = nil,
        options: [String: String]? = nil
    ) throws -> AVDeviceInfoList