mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-06-14 03:32:00 +08:00
29 lines
806 B
Rust
29 lines
806 B
Rust
#[cfg(windows)]
|
|
pub mod capture;
|
|
pub mod common;
|
|
pub mod ffmpeg;
|
|
#[cfg(all(
|
|
any(target_arch = "aarch64", target_arch = "arm", feature = "rkmpp"),
|
|
not(target_os = "android")
|
|
))]
|
|
pub mod ffmpeg_hw;
|
|
pub mod ffmpeg_ram;
|
|
|
|
#[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),
|
|
_ => {}
|
|
}
|
|
}
|
|
}
|
|
}
|