Skip to main content

CMSampleBufferSCExt

Trait CMSampleBufferSCExt 

Source
pub trait CMSampleBufferSCExt {
    // Required methods
    fn frame_status(&self) -> Option<SCFrameStatus>;
    fn display_time(&self) -> Option<u64>;
    fn scale_factor(&self) -> Option<f64>;
    fn content_scale(&self) -> Option<f64>;
    fn content_rect(&self) -> Option<CGRect>;
    fn bounding_rect(&self) -> Option<CGRect>;
    fn screen_rect(&self) -> Option<CGRect>;
    fn presenter_overlay_content_rect(&self) -> Option<CGRect>;
    fn dirty_rects(&self) -> Option<Vec<CGRect>>;
    fn frame_info(&self) -> Option<FrameInfo>;
}
Expand description

Extension trait that exposes SCStreamFrameInfo attachment accessors on any CMSampleBuffer produced by ScreenCaptureKit.

These are SC-specific by design: they read attachment keys defined on SCStreamFrameInfo and are meaningless on sample buffers from other sources (videotoolbox, AVFoundation capture, etc.).

Required Methods§

Source

fn frame_status(&self) -> Option<SCFrameStatus>

SCStreamFrameInfo.status attachment.

Source

fn display_time(&self) -> Option<u64>

SCStreamFrameInfo.displayTime attachment.

Source

fn scale_factor(&self) -> Option<f64>

SCStreamFrameInfo.scaleFactor attachment.

Source

fn content_scale(&self) -> Option<f64>

SCStreamFrameInfo.contentScale attachment.

Source

fn content_rect(&self) -> Option<CGRect>

SCStreamFrameInfo.contentRect attachment.

Source

fn bounding_rect(&self) -> Option<CGRect>

SCStreamFrameInfo.boundingRect attachment.

Source

fn screen_rect(&self) -> Option<CGRect>

SCStreamFrameInfo.screenRect attachment.

Source

fn presenter_overlay_content_rect(&self) -> Option<CGRect>

SCStreamFrameInfo.presenterOverlayContentRect attachment.

Source

fn dirty_rects(&self) -> Option<Vec<CGRect>>

SCStreamFrameInfo.dirtyRects attachment.

Source

fn frame_info(&self) -> Option<FrameInfo>

Read every populated SCStreamFrameInfo attachment in a single FFI round-trip.

Implementors§