Flag

public struct Flag : OptionSet

URL open modes

The flags argument to avio_open must be one of the following constants, optionally ORed with other flags.

  • read-only

    Declaration

    Swift

    public static let read: AVIOContext.Flag
  • write-only

    Declaration

    Swift

    public static let write: AVIOContext.Flag
  • read-write pseudo flag

    Declaration

    Swift

    public static let readWrite: AVIOContext.Flag
  • Use non-blocking mode.

    If this flag is set, operations on the context will return AVError.tryAgain if they can not be performed immediately. If this flag is not set, operations on the context will never return AVError.tryAgain. Note that this flag does not affect the opening/connecting of the context. Connecting a protocol will always block if necessary (e.g. on network protocols) but never hang (e.g. on busy devices).

    Warning

    non-blocking protocols is work-in-progress; this flag may be silently ignored.

    Declaration

    Swift

    public static let nonBlock: AVIOContext.Flag
  • Use direct mode.

    read(_:size:) and write(_:size:) should if possible be satisfied directly instead of going through a buffer, and seek(to:whence:) will always call the underlying seek function directly.

    Declaration

    Swift

    public static let direct: AVIOContext.Flag
  • Declaration

    Swift

    public let rawValue: Int32
  • Declaration

    Swift

    public init(rawValue: Int32)
  • Declaration

    Swift

    public var description: String { get }