pub struct ReplayBufferBuilder { /* private fields */ }Expand description
Builder for replay buffer outputs
Implementations§
Source§impl ReplayBufferBuilder
impl ReplayBufferBuilder
Sourcepub fn new<T: Into<ObsString>, K: Into<ObsPath>>(
context: ObsContext,
name: T,
directory_path: K,
) -> Self
pub fn new<T: Into<ObsString>, K: Into<ObsPath>>( context: ObsContext, name: T, directory_path: K, ) -> Self
Creates a new ReplayBufferBuilder with default settings.
Sourcepub fn settings(self, settings: ReplayBufferSettings) -> Self
pub fn settings(self, settings: ReplayBufferSettings) -> Self
Sets the replay buffer settings.
Sourcepub fn max_time_sec(self, seconds: i64) -> Self
pub fn max_time_sec(self, seconds: i64) -> Self
Sets the maximum time to keep in buffer (seconds).
Sourcepub fn max_size_mb(self, megabytes: i64) -> Self
pub fn max_size_mb(self, megabytes: i64) -> Self
Sets the maximum buffer size (megabytes).
Sourcepub fn allow_spaces(self, allow: bool) -> Self
pub fn allow_spaces(self, allow: bool) -> Self
Sets whether to allow spaces in filenames.
Sourcepub fn video_bitrate(self, bitrate: u32) -> Self
pub fn video_bitrate(self, bitrate: u32) -> Self
Sets the video bitrate in Kbps.
Sourcepub fn audio_bitrate(self, bitrate: u32) -> Self
pub fn audio_bitrate(self, bitrate: u32) -> Self
Sets the audio bitrate in Kbps.
Sourcepub fn x264_encoder(self, preset: X264Preset) -> Self
pub fn x264_encoder(self, preset: X264Preset) -> Self
Sets the video encoder to x264.
Sourcepub fn hardware_encoder(
self,
codec: HardwareCodec,
preset: HardwarePreset,
) -> Self
pub fn hardware_encoder( self, codec: HardwareCodec, preset: HardwarePreset, ) -> Self
Sets the video encoder to a generic hardware encoder.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ReplayBufferBuilder
impl RefUnwindSafe for ReplayBufferBuilder
impl Send for ReplayBufferBuilder
impl Sync for ReplayBufferBuilder
impl Unpin for ReplayBufferBuilder
impl UnsafeUnpin for ReplayBufferBuilder
impl UnwindSafe for ReplayBufferBuilder
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