mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-16 13:05:47 +00:00
videotoolbox ram codec (#8683)
* h265 encoding: the second frame always fails, use repeat encoding to achieve real-time encoding * h264 encoding: Not supported because encoding fails too frequently, about 50%, with one failure followed by another success. * h264/h265 decoding: No issues found. * Does not support dynamically changing the bitrate and changing the quality by resetting the encoder. Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
@@ -904,8 +904,7 @@ pub fn get_api_server() -> String {
|
||||
#[inline]
|
||||
pub fn has_hwcodec() -> bool {
|
||||
// Has real hardware codec using gpu
|
||||
(cfg!(feature = "hwcodec") && (cfg!(windows) || cfg!(target_os = "linux")))
|
||||
|| cfg!(feature = "mediacodec")
|
||||
(cfg!(feature = "hwcodec") && cfg!(not(target_os = "ios"))) || cfg!(feature = "mediacodec")
|
||||
}
|
||||
|
||||
#[inline]
|
||||
@@ -1408,7 +1407,7 @@ pub fn verify_bot(token: String) -> String {
|
||||
|
||||
pub fn check_hwcodec() {
|
||||
#[cfg(feature = "hwcodec")]
|
||||
#[cfg(any(target_os = "windows", target_os = "linux"))]
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
{
|
||||
use std::sync::Once;
|
||||
static ONCE: Once = Once::new();
|
||||
|
||||
Reference in New Issue
Block a user