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§
Sourcefn frame_status(&self) -> Option<SCFrameStatus>
fn frame_status(&self) -> Option<SCFrameStatus>
SCStreamFrameInfo.status attachment.
Sourcefn display_time(&self) -> Option<u64>
fn display_time(&self) -> Option<u64>
SCStreamFrameInfo.displayTime attachment.
Sourcefn scale_factor(&self) -> Option<f64>
fn scale_factor(&self) -> Option<f64>
SCStreamFrameInfo.scaleFactor attachment.
Sourcefn content_scale(&self) -> Option<f64>
fn content_scale(&self) -> Option<f64>
SCStreamFrameInfo.contentScale attachment.
Sourcefn content_rect(&self) -> Option<CGRect>
fn content_rect(&self) -> Option<CGRect>
SCStreamFrameInfo.contentRect attachment.
Sourcefn bounding_rect(&self) -> Option<CGRect>
fn bounding_rect(&self) -> Option<CGRect>
SCStreamFrameInfo.boundingRect attachment.
Sourcefn screen_rect(&self) -> Option<CGRect>
fn screen_rect(&self) -> Option<CGRect>
SCStreamFrameInfo.screenRect attachment.
Sourcefn presenter_overlay_content_rect(&self) -> Option<CGRect>
fn presenter_overlay_content_rect(&self) -> Option<CGRect>
SCStreamFrameInfo.presenterOverlayContentRect attachment.
Sourcefn dirty_rects(&self) -> Option<Vec<CGRect>>
fn dirty_rects(&self) -> Option<Vec<CGRect>>
SCStreamFrameInfo.dirtyRects attachment.
Sourcefn frame_info(&self) -> Option<FrameInfo>
fn frame_info(&self) -> Option<FrameInfo>
Read every populated SCStreamFrameInfo attachment in a single
FFI round-trip.