Skip to main content

Module video_player

Module video_player 

Expand description

VideoPlayer — a reusable video surface with a full playback-controls overlay.

Two frame sources feed the same latest_frame: engine mode pumps an attached [media::MediaEngine] each Widget::sync (used by the local player, editor preview, and video app, so streaming + collaborative playback land once). Push mode decodes streamed access units handed to VideoPlayer::feed_frame (H.264) or VideoPlayer::feed_encoded (any real-time codec) through a [media::RealtimeDecoder], which picks a hardware decoder first. Push mode decodes only in builds where media’s realtime feature is on (any app that streams video enables it); in other builds the feed methods report that nothing was decoded.

Structs§

DeclaredVideo
A video player driven from a view: its picture follows what the view declares, and its controls report the view’s events.
NowPlaying
Supplied so the player can publish it to the desktop media controls (MPRIS: media keys + the top-bar widget).
PlayerSetting
priority decides placement: 0 tucks inside the settings-gear menu; >= 1 promotes to its own icon button when there is room, highest first, with overflow falling back into the gear.
VideoPlayer
VideoPlayerProps
A video with its playback controls over it: play/pause, the scrubber, the volume, mute and fullscreen. The app’s player is the one truth; what the person does reaches the view as its events.

Enums§

PlaybackState
PlayerSettingControl
The embedding app owns the meaning; the player owns the rendering and reports interactions back via VideoPlayer::take_setting_events.
PlayerSettingEvent
Drained by the host each frame via VideoPlayer::take_setting_events.