Trait ReplayBufferOutput

Source
pub trait ReplayBufferOutput {
    // Required method
    fn save_buffer<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Box<Path>, ObsError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Defines functionality specific to replay buffer outputs.

This trait provides methods for working with replay buffers in OBS, which are special outputs that continuously record content and allow on-demand saving of recent footage.

Required Methods§

Source

fn save_buffer<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Box<Path>, ObsError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Saves the current replay buffer content to disk.

This method triggers the replay buffer to save its content to a file and returns the path to the saved file.

§Returns
  • Result<Box<Path>, ObsError> - On success, returns the path to the saved replay file. On failure, returns an error describing what went wrong.

Implementors§

Source§

impl ReplayBufferOutput for ObsOutputRef

Implementation of the ReplayBufferOutput trait for ObsOutputRef.

This implementation allows any ObsOutputRef configured as a replay buffer to save its content to disk via a simple API call.