pub struct OutputSession { /* private fields */ }Expand description
One output process for each uninterrupted run of a PCM format.
A natural track transition reuses the process. The caller should call
abort when seeking or skipping, because ffplay may have queued samples
from the old track. finish closes its input and waits for the last audio
to drain. Dropping an active session stops its child process.
Implementations§
Source§impl OutputSession
impl OutputSession
Sourcepub fn format(&self) -> Option<OutputFormat>
pub fn format(&self) -> Option<OutputFormat>
The format currently accepted by the process, if any.
Sourcepub fn process_id(&self) -> Option<u32>
pub fn process_id(&self) -> Option<u32>
Process identifier used by the terminal transport controls.
Sourcepub fn prepare(
&mut self,
format: OutputFormat,
) -> Result<OutputChange, OutputError>
pub fn prepare( &mut self, format: OutputFormat, ) -> Result<OutputChange, OutputError>
Reuse matching output or drain and reopen it for a new format.
Sourcepub fn close_input(&mut self)
pub fn close_input(&mut self)
Close the input while allowing the process to play queued samples.
Sourcepub fn poll_finished(&mut self) -> Result<bool, OutputError>
pub fn poll_finished(&mut self) -> Result<bool, OutputError>
Return true after a successful child exit, or an error for failure.
Sourcepub fn finish(&mut self) -> Result<(), OutputError>
pub fn finish(&mut self) -> Result<(), OutputError>
Close the input and wait for the output process to drain normally.
Sourcepub fn abort(&mut self) -> Result<(), OutputError>
pub fn abort(&mut self) -> Result<(), OutputError>
Discard queued output and stop the process after a transport change.
Trait Implementations§
Source§impl Default for OutputSession
impl Default for OutputSession
Source§impl Drop for OutputSession
impl Drop for OutputSession
Source§impl Write for OutputSession
impl Write for OutputSession
Source§fn write(&mut self, bytes: &[u8]) -> Result<usize>
fn write(&mut self, bytes: &[u8]) -> Result<usize>
Source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Source§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
can_vector)1.0.0 · Source§fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
Source§fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
write_all_vectored)