pub struct SCRecordingOutput { /* private fields */ }Expand description
Recording output for direct video file encoding
Available on macOS 15.0+
Implementations§
Source§impl SCRecordingOutput
impl SCRecordingOutput
Sourcepub fn new(config: &SCRecordingOutputConfiguration) -> Option<Self>
pub fn new(config: &SCRecordingOutputConfiguration) -> Option<Self>
Create a new recording output with configuration
§Errors
Returns None if the system is not macOS 15.0+ or creation fails
Sourcepub fn new_with_delegate<D: SCRecordingOutputDelegate>(
config: &SCRecordingOutputConfiguration,
delegate: D,
) -> Option<Self>
pub fn new_with_delegate<D: SCRecordingOutputDelegate>( config: &SCRecordingOutputConfiguration, delegate: D, ) -> Option<Self>
Create a new recording output with configuration and delegate
The delegate receives callbacks for recording lifecycle events:
recording_did_start- Called when recording beginsrecording_did_fail- Called if recording fails with an errorrecording_did_finish- Called when recording completes successfully
§Errors
Returns None if the system is not macOS 15.0+ or creation fails
§Panics
Panics if the delegate registry mutex is poisoned
Sourcepub fn recorded_duration(&self) -> CMTime
pub fn recorded_duration(&self) -> CMTime
Get the current recorded duration
Sourcepub fn recorded_file_size(&self) -> i64
pub fn recorded_file_size(&self) -> i64
Get the current recorded file size in bytes
pub fn as_ptr(&self) -> *const c_void
Trait Implementations§
Source§impl Clone for SCRecordingOutput
impl Clone for SCRecordingOutput
Source§impl Debug for SCRecordingOutput
impl Debug for SCRecordingOutput
Source§impl Drop for SCRecordingOutput
impl Drop for SCRecordingOutput
impl Send for SCRecordingOutput
impl Sync for SCRecordingOutput
Auto Trait Implementations§
impl Freeze for SCRecordingOutput
impl RefUnwindSafe for SCRecordingOutput
impl Unpin for SCRecordingOutput
impl UnwindSafe for SCRecordingOutput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more