AVHWDeviceContext

public final class AVHWDeviceContext

Undocumented

  • Open a device of the specified type and create an AVHWDeviceContext for it.

    Declaration

    Swift

    public init(
        deviceType: AVHWDeviceType,
        device: String? = nil,
        options: [String: String]? = nil
    ) throws

    Parameters

    deviceType

    The type of the device to create.

    device

    A type-specific string identifying the device to open.

    options

    A dictionary of additional (type-specific) options to use in opening the device.

  • Create a new device of the specified type from an existing device.

    If the source device is a device of the target type or was originally derived from such a device (possibly through one or more intermediate devices of other types), then this will return a reference to the existing device of the same type as is requested.

    Otherwise, it will attempt to derive a new device from the given source device. If direct derivation to the new type is not implemented, it will attempt the same derivation from each ancestor of the source device in turn looking for an implemented derivation method.

    Throws

    AVError

    Declaration

    Swift

    public init(deviceType: AVHWDeviceType, deviceContext: AVHWDeviceContext) throws

    Parameters

    deviceType

    The type of the new device to create.

    deviceContext

    An existing AVHWDeviceContext which will be used to create the new device.