mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-10 09:11:28 +03:00
enable keyframe interval when recording
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
@@ -36,6 +36,7 @@ struct UserData {
|
||||
quality: Option<(i64, Quality)>, // (time, quality)
|
||||
delay: Option<Delay>,
|
||||
response_delayed: bool,
|
||||
record: bool,
|
||||
}
|
||||
|
||||
pub struct VideoQoS {
|
||||
@@ -114,6 +115,10 @@ impl VideoQoS {
|
||||
self.quality
|
||||
}
|
||||
|
||||
pub fn record(&self) -> bool {
|
||||
self.users.iter().any(|u| u.1.record)
|
||||
}
|
||||
|
||||
pub fn abr_enabled() -> bool {
|
||||
"N" != Config::get_option("enable-abr")
|
||||
}
|
||||
@@ -388,6 +393,12 @@ impl VideoQoS {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn user_record(&mut self, id: i32, v: bool) {
|
||||
if let Some(user) = self.users.get_mut(&id) {
|
||||
user.record = v;
|
||||
}
|
||||
}
|
||||
|
||||
pub fn on_connection_close(&mut self, id: i32) {
|
||||
self.users.remove(&id);
|
||||
self.refresh(None);
|
||||
|
||||
Reference in New Issue
Block a user