pub struct VideoRecorder { /* private fields */ }Expand description
Handle to a running WebM recording pipeline. Callers must call
VideoRecorder::stop to finalize the file — dropping without stopping
flushes best-effort to NULL state, which produces a truncated WebM without
a seekhead.
Implementations§
Source§impl VideoRecorder
impl VideoRecorder
Sourcepub async fn start(
node_id: u32,
pipewire_socket: &Path,
output_path: &Path,
bitrate: u32,
fps: u32,
) -> Result<VideoRecorder>
pub async fn start( node_id: u32, pipewire_socket: &Path, output_path: &Path, bitrate: u32, fps: u32, ) -> Result<VideoRecorder>
Start a WebM recording that reads from the given PipeWire node and
writes to output_path at the given bitrate (bits/sec) and fps.
Returns once the pipeline is in PLAYING state.
Sourcepub async fn stop(self) -> Result<()>
pub async fn stop(self) -> Result<()>
Send EOS, wait for the muxer to flush cues, then set the pipeline to NULL. This is the only shutdown path that produces a seekable WebM.
Sourcepub fn output_path(&self) -> &Path
pub fn output_path(&self) -> &Path
Path the WebM is being written to.
Trait Implementations§
Source§impl Drop for VideoRecorder
impl Drop for VideoRecorder
Auto Trait Implementations§
impl Freeze for VideoRecorder
impl RefUnwindSafe for VideoRecorder
impl Send for VideoRecorder
impl Sync for VideoRecorder
impl Unpin for VideoRecorder
impl UnsafeUnpin for VideoRecorder
impl UnwindSafe for VideoRecorder
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more