pub enum PlaybackPolicy {
DropVideoKeepAudio,
PreserveEveryVideoFrame,
SilentScrub,
OfflineExact,
}Expand description
Which frame real-time playback shows, and whether sound plays.
Variants§
DropVideoKeepAudio
Sound leads at 1x: the picture shows the frame at the audio clock’s time, dropping frames that are late and holding the last one while inputs are missing. At any other rate the picture follows the wall clock and sound is silent.
PreserveEveryVideoFrame
Every frame is shown, in order, each once its inputs are ready, paced no faster than the rate asks: playback slows rather than skips, and is silent.
SilentScrub
The picture follows the wall clock at any rate, holding the last frame while inputs are missing, and is silent: for shuttling and scrubbing.
OfflineExact
Every frame, in order, each after its inputs are ready, as fast as it renders: what an export does. Silent.
Implementations§
Source§impl PlaybackPolicy
impl PlaybackPolicy
Sourcepub const fn missing_frames(self) -> MissingFramePolicy
pub const fn missing_frames(self) -> MissingFramePolicy
What a frame whose inputs are missing shows.
Sourcepub fn audible(self, rate: f64) -> bool
pub fn audible(self, rate: f64) -> bool
Whether sound plays at rate: only when it leads, at 1x.
Sourcepub const fn waits_for_frames(self) -> bool
pub const fn waits_for_frames(self) -> bool
Whether the clock waits for each frame to be shown before the next.
Trait Implementations§
Source§impl Clone for PlaybackPolicy
impl Clone for PlaybackPolicy
impl Copy for PlaybackPolicy
Source§impl Debug for PlaybackPolicy
impl Debug for PlaybackPolicy
Source§impl Default for PlaybackPolicy
impl Default for PlaybackPolicy
Source§impl<'de> Deserialize<'de> for PlaybackPolicy
impl<'de> Deserialize<'de> for PlaybackPolicy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for PlaybackPolicy
Source§impl PartialEq for PlaybackPolicy
impl PartialEq for PlaybackPolicy
Source§impl Serialize for PlaybackPolicy
impl Serialize for PlaybackPolicy
impl StructuralPartialEq for PlaybackPolicy
Auto Trait Implementations§
impl Freeze for PlaybackPolicy
impl RefUnwindSafe for PlaybackPolicy
impl Send for PlaybackPolicy
impl Sync for PlaybackPolicy
impl Unpin for PlaybackPolicy
impl UnsafeUnpin for PlaybackPolicy
impl UnwindSafe for PlaybackPolicy
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.