feat: callbacks and flutter msg bridge

This commit is contained in:
Kingtous
2023-05-04 13:18:19 +08:00
parent 0ed209b4d2
commit 34314e50f7
5 changed files with 133 additions and 50 deletions

View File

@@ -44,19 +44,20 @@ pub const HW_STRIDE_ALIGN: usize = 0; // recommended by av_frame_get_buffer
pub mod record;
mod vpx;
#[repr(usize)]
#[derive(Copy, Clone)]
pub enum ImageFormat {
Raw,
ABGR,
ARGB,
}
#[repr(C)]
pub struct ImageRgb {
pub raw: Vec<u8>,
pub w: usize,
pub h: usize,
fmt: ImageFormat,
stride: usize,
pub fmt: ImageFormat,
pub stride: usize,
}
impl ImageRgb {