RawVideoSinkFrame

public protocol RawVideoSinkFrame

A frame delivered by the sink.

  • Copies this frame.

    Copied instance and its data are completely separate from the source and MUST be released independently when not used anymore, otherwise its memory will be leaked.

    Note however that the copy is guaranteed to be backed by native heap memory, and not by hardware/decoder buffers (as may be the case with RawVideoSinkFrame instances that are delivered directly to the RawVideoSinkListener.frameReady). Thus, a frame copy can be kept unreleased for as long as needed by the client and will never cause a video pipeline stall/crash.

    Declaration

    Swift

    func copy() -> RawVideoSinkFrame
  • Native pointer on to the struct mbuf_raw_video_frame C structure which is this frame native backend.

    Important

    This pointer remains valid until this frame is released.

    Declaration

    Swift

    var nativePtr: UnsafeMutableRawPointer { get }
  • Frame data planes.

    Depending on the format VideoFormat.Raw (reported by RawVideoSinkListener.didStart callback), the frame may be constituted of up to 4 data planes.

    Important

    Planes pointers remains valid until this frame is released.

    Declaration

    Swift

    var planes: [RawVideoSinkFramePlane] { get }
  • Frame timestamp, in timeScale units.

    Declaration

    Swift

    var timestamp: UInt64 { get }
  • Time timestamp scale, in Hz.

    Declaration

    Swift

    var timeScale: UInt { get }
  • Capture time of the frame, in microseconds on the monotonic clock of the drone, or 0 if unknown.

    Declaration

    Swift

    var captureTimestamp: UInt64 { get }
  • true when the frame is not intended to be displayed.

    This flag is usually applied during a pipeline initialization to the first few frames. Such frames are not intended to be displayed nor used for vision algorithms, but may still carry interesting metadata.

    Declaration

    Swift

    var silent: Bool { get }
  • true when the frame contains a visual error.

    This flag indicates that the frame is valid, but may contain visual errors. A frame with this flag can be displayed, but should not be used for vision algorithms.

    Declaration

    Swift

    var visualError: Bool { get }
  • Frame metadata.

    Declaration

    Swift

    var metadata: Vmeta_TimedMetadata? { get }