pub struct PlayerConfig {
pub input_path: PathBuf,
pub speed: PlaybackSpeed,
pub topic_filter: Option<TopicFilter>,
pub loop_playback: bool,
pub start_offset_nanos: u64,
pub end_time_nanos: u64,
}Expand description
Player configuration.
Fields§
§input_path: PathBufInput file path.
speed: PlaybackSpeedPlayback speed.
topic_filter: Option<TopicFilter>Topic filter (None = all topics).
loop_playback: boolLoop playback.
start_offset_nanos: u64Start offset (skip first N nanoseconds).
end_time_nanos: u64End time (stop after N nanoseconds, 0 = play all).
Implementations§
Source§impl PlayerConfig
impl PlayerConfig
Sourcepub fn speed(self, speed: PlaybackSpeed) -> Self
pub fn speed(self, speed: PlaybackSpeed) -> Self
Set playback speed.
Sourcepub fn speed_multiplier(self, multiplier: f64) -> Self
pub fn speed_multiplier(self, multiplier: f64) -> Self
Set speed as multiplier.
Sourcepub fn topic_filter(self, filter: TopicFilter) -> Self
pub fn topic_filter(self, filter: TopicFilter) -> Self
Set topic filter.
Sourcepub fn loop_playback(self, enable: bool) -> Self
pub fn loop_playback(self, enable: bool) -> Self
Enable loop playback.
Sourcepub fn start_offset(self, offset: Duration) -> Self
pub fn start_offset(self, offset: Duration) -> Self
Set start offset.
Trait Implementations§
Source§impl Clone for PlayerConfig
impl Clone for PlayerConfig
Source§fn clone(&self) -> PlayerConfig
fn clone(&self) -> PlayerConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PlayerConfig
impl RefUnwindSafe for PlayerConfig
impl Send for PlayerConfig
impl Sync for PlayerConfig
impl Unpin for PlayerConfig
impl UnsafeUnpin for PlayerConfig
impl UnwindSafe for PlayerConfig
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