mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-10-27 16:00:49 +08:00
31 lines
796 B
Rust
31 lines
796 B
Rust
#[cfg(windows)]
|
|
pub mod capture;
|
|
pub mod common;
|
|
pub mod ffmpeg;
|
|
#[cfg(feature = "rkmpp")]
|
|
pub mod ffmpeg_hw;
|
|
pub mod ffmpeg_ram;
|
|
#[cfg(all(
|
|
target_os = "linux",
|
|
feature = "rkmpp"
|
|
))]
|
|
pub mod rkmpp_dmabuf;
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn hwcodec_log(level: i32, message: *const std::os::raw::c_char) {
|
|
unsafe {
|
|
let c_str = std::ffi::CStr::from_ptr(message);
|
|
if let Ok(str_slice) = c_str.to_str() {
|
|
let string = String::from(str_slice);
|
|
match level {
|
|
0 => log::error!("{}", string),
|
|
1 => log::warn!("{}", string),
|
|
2 => log::info!("{}", string),
|
|
3 => log::debug!("{}", string),
|
|
4 => log::trace!("{}", string),
|
|
_ => {}
|
|
}
|
|
}
|
|
}
|
|
}
|