pub struct SCRecordingOutputConfiguration { /* private fields */ }Expand description
Configuration for recording output
Implementations§
Source§impl SCRecordingOutputConfiguration
impl SCRecordingOutputConfiguration
Sourcepub fn new() -> Result<Self, SCError>
pub fn new() -> Result<Self, SCError>
Create a new recording output configuration
§Errors
Returns SCError::FeatureNotAvailable when run on macOS older than
15.0.
Sourcepub fn with_output_url(self, path: &Path) -> Result<Self, InvalidOutputPath>
pub fn with_output_url(self, path: &Path) -> Result<Self, InvalidOutputPath>
Set the output file URL.
§Errors
Returns an InvalidOutputPath when path is not valid UTF-8 or
contains an interior NUL byte.
Sourcepub fn output_url(&self) -> Option<PathBuf>
pub fn output_url(&self) -> Option<PathBuf>
Get the configured output file URL.
Sourcepub fn with_video_codec(self, codec: SCRecordingOutputCodec) -> Self
pub fn with_video_codec(self, codec: SCRecordingOutputCodec) -> Self
Set the video codec
Sourcepub fn video_codec(&self) -> SCRecordingOutputCodec
pub fn video_codec(&self) -> SCRecordingOutputCodec
Get the video codec
Sourcepub fn with_output_file_type(self, file_type: SCRecordingOutputFileType) -> Self
pub fn with_output_file_type(self, file_type: SCRecordingOutputFileType) -> Self
Set the output file type
Sourcepub fn output_file_type(&self) -> SCRecordingOutputFileType
pub fn output_file_type(&self) -> SCRecordingOutputFileType
Get the output file type
Sourcepub fn available_video_codecs_count(&self) -> usize
pub fn available_video_codecs_count(&self) -> usize
Get the number of available video codecs
Sourcepub fn available_video_codecs(&self) -> Vec<SCRecordingOutputCodec>
pub fn available_video_codecs(&self) -> Vec<SCRecordingOutputCodec>
Get all available video codecs
Returns a vector of all video codecs that can be used for recording.
The length always matches
available_video_codecs_count:
a codec this crate has no constant for is preserved by identifier.
Sourcepub fn available_output_file_types_count(&self) -> usize
pub fn available_output_file_types_count(&self) -> usize
Get the number of available output file types
Sourcepub fn available_output_file_types(&self) -> Vec<SCRecordingOutputFileType>
pub fn available_output_file_types(&self) -> Vec<SCRecordingOutputFileType>
Get all available output file types
Returns a vector of all file types that can be used for recording
output. The length always matches
available_output_file_types_count.
pub fn as_ptr(&self) -> *const c_void
Trait Implementations§
Source§impl Clone for SCRecordingOutputConfiguration
impl Clone for SCRecordingOutputConfiguration
Source§fn clone(&self) -> Self
fn clone(&self) -> Self
Deep-copies the underlying SCRecordingOutputConfiguration.
The native object is a mutable class. Retaining it would make every
clone an alias — reconfiguring one handle would silently reconfigure
the others, and two threads configuring “their own” clone would race on
the same non-atomic properties, which Send/Sync on this type
promises cannot happen.
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more