Expand description
Video views for egui, on top of [moq_ext_player].
The views draw decoded frames through the wgpu renderer in
moq_video::render. They need an egui_wgpu::RenderState. A view without
one shows a black placeholder.
This draws a player’s video:
use moq_ext_egui::VideoView;
let mut view = VideoView::new(ctx, "video", player.video_frames(), render_state);
// in the update loop:
ui.add(view.render());VideoView draws a [VideoFrames] stream, and FrameView the frames
you hand it. overlay::DebugOverlay paints stats over a video.
Pending runs a task, such as a dial, whose result a window collects on
a later frame.
Open the window with egui_wgpu_config as eframe’s wgpu_options.
Without it, eframe builds a device that cannot import DMA-BUF frames on
Linux, so hardware-decoded video and screen capture are copied through the
CPU, and a GPU with small limits, such as the Raspberry Pi 4, fails to open
the window:
ⓘ
let options = eframe::NativeOptions {
wgpu_options: moq_ext_egui::egui_wgpu_config(),
..Default::default()
};Re-exports§
Modules§
- overlay
- Translucent stats bars painted over video.
Structs§
- Frame
View - A view that draws the frames you hand it.
- Pending
- A task whose one result a window collects on a later frame.
- Video
View - A view that draws a [
VideoFrames] stream.
Functions§
- egui_
wgpu_ config - Creates an
egui_wgpu::WgpuConfigurationfor video rendering. - format_
bitrate - Formats a bitrate as
1.5 Mbps,320 kbpsor64 bps.