pub struct DebugPlayer { /* private fields */ }Expand description
Debug player for visual verification of subtitle rendering
Implementations§
Source§impl DebugPlayer
impl DebugPlayer
pub fn set_cache_enabled(&mut self, enabled: bool)
pub fn set_max_cache_size(&mut self, size: usize)
pub fn play(&mut self)
pub fn pause(&mut self)
pub fn stop(&mut self)
pub fn seek(&mut self, time_ms: u32)
pub fn set_speed(&mut self, speed: f32)
pub fn step_forward(&mut self)
pub fn step_backward(&mut self)
pub fn toggle_stats(&mut self)
pub fn toggle_frame_saving(&mut self)
pub fn set_loop(&mut self, enable: bool)
pub fn set_output_dir(&mut self, dir: &str)
pub fn is_playing(&self) -> bool
pub fn current_time(&self) -> u32
pub fn toggle_loop(&mut self)
pub fn increase_speed(&mut self)
pub fn decrease_speed(&mut self)
Source§impl DebugPlayer
impl DebugPlayer
pub fn render_current_frame(&mut self) -> Result<PlayerFrame, RenderError>
pub fn update( &mut self, _delta_time: Duration, ) -> Result<Option<PlayerFrame>, RenderError>
Source§impl DebugPlayer
impl DebugPlayer
pub fn run_automatic_test( &mut self, test_points: Vec<u32>, ) -> Result<TestReport, RenderError>
Source§impl DebugPlayer
impl DebugPlayer
pub fn new( backend_type: BackendType, width: u32, height: u32, ) -> Result<Self, RenderError>
pub fn width(&self) -> u32
pub fn height(&self) -> u32
Sourcepub fn has_script(&self) -> bool
pub fn has_script(&self) -> bool
Check if a script is currently loaded
Sourcepub fn duration_ms(&self) -> u32
pub fn duration_ms(&self) -> u32
Get the current end time in milliseconds
pub fn load_script(&mut self, script_content: &str) -> Result<(), RenderError>
Auto Trait Implementations§
impl !RefUnwindSafe for DebugPlayer
impl !UnwindSafe for DebugPlayer
impl Freeze for DebugPlayer
impl Send for DebugPlayer
impl Sync for DebugPlayer
impl Unpin for DebugPlayer
impl UnsafeUnpin for DebugPlayer
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> 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