update pub

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou 2023-03-03 09:45:36 +08:00
parent 5aa97faedd
commit f709c260ff
2 changed files with 4 additions and 7 deletions

View File

@ -944,12 +944,7 @@ impl VideoHandler {
}
match &vf.union {
Some(frame) => {
// windows && flutter_texture_render, fmt is ImageFormat::ABGR
#[cfg(all(target_os = "windows", feature = "flutter_texture_render"))]
let fmt = ImageFormat::ABGR;
#[cfg(not(all(target_os = "windows", feature = "flutter_texture_render")))]
let fmt = ImageFormat::ARGB;
let res = self.decoder.handle_video_frame(frame, STRIDE_ALIGN, fmt, &mut self.rgb);
let res = self.decoder.handle_video_frame(frame, STRIDE_ALIGN, ImageFormat::ARGB, &mut self.rgb);
if self.record {
self.recorder
.lock()

View File

@ -154,7 +154,7 @@ pub struct FlutterHandler {
#[cfg(feature = "flutter_texture_render")]
pub type FlutterRgbaRendererPluginOnRgba =
unsafe extern "C" fn(texture_rgba: *mut c_void, buffer: *const u8, width: c_int, height: c_int);
unsafe extern "C" fn(texture_rgba: *mut c_void, buffer: *const u8, len: c_int, width: c_int, height: c_int, stride_align: c_int);
// Video Texture Renderer in Flutter
#[cfg(feature = "flutter_texture_render")]
@ -223,8 +223,10 @@ impl VideoRenderer {
func(
self.ptr as _,
rgba.as_ptr() as _,
rgba.len() as _,
self.width as _,
self.height as _,
crate::common::STRIDE_ALIGN as _,
)
};
}