mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-05 15:11:27 +03:00
@@ -28,17 +28,19 @@ cfg_if! {
|
||||
}
|
||||
|
||||
pub mod codec;
|
||||
pub mod coder;
|
||||
mod convert;
|
||||
#[cfg(feature = "hwcodec")]
|
||||
pub mod hwcodec;
|
||||
pub use self::convert::*;
|
||||
pub const STRIDE_ALIGN: usize = 64; // commonly used in libvpx vpx_img_alloc caller
|
||||
pub const HW_STRIDE_ALIGN: usize = 0; // recommended by av_frame_get_buffer
|
||||
|
||||
mod vpx;
|
||||
|
||||
#[inline]
|
||||
pub fn would_block_if_equal(old: &mut Vec<u128>, b: &[u8]) -> std::io::Result<()> {
|
||||
let b = unsafe {
|
||||
std::slice::from_raw_parts::<u128>(b.as_ptr() as _, b.len() / 16)
|
||||
};
|
||||
let b = unsafe { std::slice::from_raw_parts::<u128>(b.as_ptr() as _, b.len() / 16) };
|
||||
if b == &old[..] {
|
||||
return Err(std::io::ErrorKind::WouldBlock.into());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user