aom encode/decode

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-05-08 20:35:24 +08:00
parent a3f3bb4751
commit e482dc3e2b
15 changed files with 780 additions and 34 deletions

View File

@@ -1100,8 +1100,8 @@ pub fn session_send_note(id: String, note: String) {
pub fn session_alternative_codecs(id: String) -> String {
if let Some(session) = SESSIONS.read().unwrap().get(&id) {
let (vp8, h264, h265) = session.alternative_codecs();
let msg = HashMap::from([("vp8", vp8), ("h264", h264), ("h265", h265)]);
let (vp8, av1, h264, h265) = session.alternative_codecs();
let msg = HashMap::from([("vp8", vp8), ("av1", av1), ("h264", h264), ("h265", h265)]);
serde_json::ser::to_string(&msg).unwrap_or("".to_owned())
} else {
String::new()