Expand description
playback — player state machine that pumps decoded frames into wisp.
Sits between [decode::VideoStream] (the upstream codec backend) and
wisp::VideoTexture (the GPU upload target). The shell (Tauri / native
winit) drives it via:
Player::play/Player::pause— transport controlPlayer::tick(dt)— once per render frame; advances playback time and uploads any frames whose presentation timestamp has come due
§Quick start
use std::time::Duration;
use decode::mock::MockVideoStream;
use playback::Player;
use pollster::block_on;
use wisp::application::{AppConfig, Application};
let app = block_on(Application::new(AppConfig::default())).unwrap();
let stream = MockVideoStream::scrolling_gradient(640, 360, 90);
let mut player = Player::new(&app, Box::new(stream));
player.play();
player.tick(&app, Duration::from_millis(33)); // ~one source frameRe-exports§
pub use editor_player::EditorPlayer;
Modules§
- editor_
player EditorPlayer— the editor’s frame-indexed, variable-rate playback clock (ED.4 / M-EDIT).
Structs§
- Player
- Player state machine. Owns the upstream stream and the GPU texture holding the current frame.
Enums§
- Play
State - Transport state.