pub struct CaptureManager(/* private fields */);Expand description
The singleton manager for GPU capture operations.
C++ equivalent: MTL::CaptureManager
Use CaptureManager::shared() to get the singleton instance.
Implementations§
Source§impl CaptureManager
impl CaptureManager
Get the shared capture manager singleton.
Returns None if capture is not supported on this system.
C++ equivalent: static CaptureManager* sharedCaptureManager()
Sourcepub fn is_capturing(&self) -> bool
pub fn is_capturing(&self) -> bool
Check if a capture is currently in progress.
C++ equivalent: bool isCapturing() const
Sourcepub fn default_capture_scope(&self) -> Option<CaptureScope>
pub fn default_capture_scope(&self) -> Option<CaptureScope>
Get the default capture scope.
C++ equivalent: CaptureScope* defaultCaptureScope() const
Sourcepub fn set_default_capture_scope(&self, scope: &CaptureScope)
pub fn set_default_capture_scope(&self, scope: &CaptureScope)
Set the default capture scope.
C++ equivalent: void setDefaultCaptureScope(const CaptureScope*)
Sourcepub fn new_capture_scope_with_device(
&self,
device: &Device,
) -> Option<CaptureScope>
pub fn new_capture_scope_with_device( &self, device: &Device, ) -> Option<CaptureScope>
Create a new capture scope for a device.
C++ equivalent: CaptureScope* newCaptureScope(const Device*)
Sourcepub fn new_capture_scope_with_command_queue(
&self,
queue: &CommandQueue,
) -> Option<CaptureScope>
pub fn new_capture_scope_with_command_queue( &self, queue: &CommandQueue, ) -> Option<CaptureScope>
Create a new capture scope for a command queue.
C++ equivalent: CaptureScope* newCaptureScope(const CommandQueue*)
Sourcepub fn supports_destination(&self, destination: CaptureDestination) -> bool
pub fn supports_destination(&self, destination: CaptureDestination) -> bool
Check if a capture destination is supported.
C++ equivalent: bool supportsDestination(CaptureDestination)
Sourcepub fn start_capture(
&self,
descriptor: &CaptureDescriptor,
) -> Result<(), CaptureError>
pub fn start_capture( &self, descriptor: &CaptureDescriptor, ) -> Result<(), CaptureError>
Start a capture with a descriptor.
Returns Ok(()) on success or Err(CaptureError) on failure.
C++ equivalent: bool startCapture(const CaptureDescriptor*, NS::Error**)
Sourcepub fn start_capture_with_device(&self, device: &Device)
pub fn start_capture_with_device(&self, device: &Device)
Start a capture for a device (simplified API).
C++ equivalent: void startCapture(const Device*)
Sourcepub fn start_capture_with_command_queue(&self, queue: &CommandQueue)
pub fn start_capture_with_command_queue(&self, queue: &CommandQueue)
Start a capture for a command queue (simplified API).
C++ equivalent: void startCapture(const CommandQueue*)
Sourcepub fn start_capture_with_scope(&self, scope: &CaptureScope)
pub fn start_capture_with_scope(&self, scope: &CaptureScope)
Start a capture for a capture scope (simplified API).
C++ equivalent: void startCapture(const CaptureScope*)
Sourcepub fn stop_capture(&self)
pub fn stop_capture(&self)
Stop the current capture.
C++ equivalent: void stopCapture()