mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-31 09:01:04 +03:00
add ffmpeg mediacodec h264/h265 encode (#8028)
* Check available when app start from kotlin via get codec info * For latency free, repeat encode 10 frame at most when capture return WouldBlock * For changing quality, kotlin support but jni doesn't support, rerun video service when quality is manualy changed * 3 or 6 times bitrate for mediacodec because its quality is poor Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
@@ -124,6 +124,10 @@ impl VideoQoS {
|
||||
self.support_abr.insert(display_idx, support);
|
||||
}
|
||||
|
||||
pub fn in_vbr_state(&self) -> bool {
|
||||
Config::get_option("enable-abr") != "N" && self.support_abr.iter().all(|e| *e.1)
|
||||
}
|
||||
|
||||
pub fn refresh(&mut self, typ: Option<RefreshType>) {
|
||||
// fps
|
||||
let user_fps = |u: &UserData| {
|
||||
@@ -178,8 +182,7 @@ impl VideoQoS {
|
||||
let mut quality = latest_quality;
|
||||
|
||||
// network delay
|
||||
let abr_enabled =
|
||||
Config::get_option("enable-abr") != "N" && self.support_abr.iter().all(|e| *e.1);
|
||||
let abr_enabled = self.in_vbr_state();
|
||||
if abr_enabled && typ != Some(RefreshType::SetImageQuality) {
|
||||
// max delay
|
||||
let delay = self
|
||||
|
||||
Reference in New Issue
Block a user