pub struct PlaybackController { /* private fields */ }Expand description
Playback controller with state machine
Implementations§
Source§impl PlaybackController
impl PlaybackController
Sourcepub fn new(sync_strategy: Box<dyn PlaybackSync>) -> Self
pub fn new(sync_strategy: Box<dyn PlaybackSync>) -> Self
Create a new playback controller
Sourcepub async fn load_recording(&self, recording: Recording) -> Result<()>
pub async fn load_recording(&self, recording: Recording) -> Result<()>
Load a recording for playback
Sourcepub async fn play(&self, brp_client: Arc<RwLock<BrpClient>>) -> Result<()>
pub async fn play(&self, brp_client: Arc<RwLock<BrpClient>>) -> Result<()>
Start or resume playback
Sourcepub async fn seek_to_frame(&self, frame_number: usize) -> Result<()>
pub async fn seek_to_frame(&self, frame_number: usize) -> Result<()>
Seek to a specific frame
Sourcepub async fn seek_to_marker(&self, marker_name: &str) -> Result<()>
pub async fn seek_to_marker(&self, marker_name: &str) -> Result<()>
Seek to a marker
Sourcepub async fn step_forward(&self, brp_client: &mut BrpClient) -> Result<()>
pub async fn step_forward(&self, brp_client: &mut BrpClient) -> Result<()>
Step to next frame
Sourcepub async fn step_backward(&self, brp_client: &mut BrpClient) -> Result<()>
pub async fn step_backward(&self, brp_client: &mut BrpClient) -> Result<()>
Step to previous frame
Sourcepub async fn get_state(&self) -> PlaybackState
pub async fn get_state(&self) -> PlaybackState
Get current playback state
Sourcepub async fn get_stats(&self) -> PlaybackStats
pub async fn get_stats(&self) -> PlaybackStats
Get playback statistics
Sourcepub fn frame_stream(&self) -> impl Stream<Item = Frame>
pub fn frame_stream(&self) -> impl Stream<Item = Frame>
Create a frame stream for async iteration
Auto Trait Implementations§
impl !RefUnwindSafe for PlaybackController
impl !UnwindSafe for PlaybackController
impl Freeze for PlaybackController
impl Send for PlaybackController
impl Sync for PlaybackController
impl Unpin for PlaybackController
impl UnsafeUnpin for PlaybackController
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
impl<T> ErasedDestructor for Twhere
T: 'static,
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