mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
feat: Android Codec Preference
This commit is contained in:
@@ -744,9 +744,9 @@ pub fn get_api_server() -> String {
|
||||
|
||||
#[inline]
|
||||
pub fn has_hwcodec() -> bool {
|
||||
#[cfg(not(feature = "hwcodec"))]
|
||||
#[cfg(not(any(feature = "hwcodec", feature = "mediacodec")))]
|
||||
return false;
|
||||
#[cfg(feature = "hwcodec")]
|
||||
#[cfg(any(feature = "hwcodec", feature = "mediacodec"))]
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -136,15 +136,8 @@ impl<T: InvokeUiSession> Session<T> {
|
||||
true
|
||||
}
|
||||
|
||||
pub fn has_hwcodec(&self) -> bool {
|
||||
#[cfg(not(feature = "hwcodec"))]
|
||||
return false;
|
||||
#[cfg(feature = "hwcodec")]
|
||||
return true;
|
||||
}
|
||||
|
||||
pub fn supported_hwcodec(&self) -> (bool, bool) {
|
||||
#[cfg(feature = "hwcodec")]
|
||||
#[cfg(any(feature = "hwcodec", feature = "mediacodec"))]
|
||||
{
|
||||
let decoder = scrap::codec::Decoder::video_codec_state(&self.id);
|
||||
let mut h264 = decoder.score_h264 > 0;
|
||||
@@ -155,10 +148,6 @@ impl<T: InvokeUiSession> Session<T> {
|
||||
}
|
||||
return (h264, h265);
|
||||
}
|
||||
#[cfg(feature = "mediacodec")]
|
||||
{
|
||||
todo!();
|
||||
}
|
||||
(false, false)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user