waycap_rs/types/
video_frame.rs

1use std::os::fd::RawFd;
2
3use pipewire::spa::{param::video::VideoFormat, utils::Rectangle};
4
5#[derive(Debug)]
6pub struct EncodedVideoFrame {
7    pub data: Vec<u8>,
8    pub is_keyframe: bool,
9    /// Encoder value for when it should be presented (Presentation TimeStamp)
10    pub pts: i64,
11    /// Encoder value for when it should be decoded (Decode TimeStamp)
12    pub dts: i64,
13}
14
15#[derive(Debug)]
16pub struct RawVideoFrame {
17    pub data: Vec<u8>,
18    pub timestamp: i64,
19    pub dmabuf_fd: Option<RawFd>,
20    pub stride: i32,
21    pub offset: u32,
22    pub size: u32,
23    pub modifier: u64,
24    pub format: VideoFormat,
25    pub dimensions: Rectangle,
26}
27
28#[derive(Debug)]
29pub struct DmaBufPlane {
30    pub fd: i32,
31    pub offset: u32,
32    pub stride: u32,
33}