update pub
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
5aa97faedd
commit
f709c260ff
@ -944,12 +944,7 @@ impl VideoHandler {
|
|||||||
}
|
}
|
||||||
match &vf.union {
|
match &vf.union {
|
||||||
Some(frame) => {
|
Some(frame) => {
|
||||||
// windows && flutter_texture_render, fmt is ImageFormat::ABGR
|
let res = self.decoder.handle_video_frame(frame, STRIDE_ALIGN, ImageFormat::ARGB, &mut self.rgb);
|
||||||
#[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);
|
|
||||||
if self.record {
|
if self.record {
|
||||||
self.recorder
|
self.recorder
|
||||||
.lock()
|
.lock()
|
||||||
|
@ -154,7 +154,7 @@ pub struct FlutterHandler {
|
|||||||
|
|
||||||
#[cfg(feature = "flutter_texture_render")]
|
#[cfg(feature = "flutter_texture_render")]
|
||||||
pub type FlutterRgbaRendererPluginOnRgba =
|
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
|
// Video Texture Renderer in Flutter
|
||||||
#[cfg(feature = "flutter_texture_render")]
|
#[cfg(feature = "flutter_texture_render")]
|
||||||
@ -223,8 +223,10 @@ impl VideoRenderer {
|
|||||||
func(
|
func(
|
||||||
self.ptr as _,
|
self.ptr as _,
|
||||||
rgba.as_ptr() as _,
|
rgba.as_ptr() as _,
|
||||||
|
rgba.len() as _,
|
||||||
self.width as _,
|
self.width as _,
|
||||||
self.height as _,
|
self.height as _,
|
||||||
|
crate::common::STRIDE_ALIGN as _,
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user