feat: 支持手动切换采集帧率

在 Android、Web 及 Flutter 控制端新增帧率选择 UI,被控端按屏幕刷新率生成支持的帧率档位并上报,允许在保持分辨率不变的情况下仅切换帧率。

另附带更新信号服务器的数据库配置。
This commit is contained in:
TongTongStudio
2026-07-31 03:26:40 +08:00
parent c3602493dd
commit 362b9f238a
23 changed files with 483 additions and 13 deletions

View File

@@ -12,6 +12,8 @@ protocol WebRTCClientDelegate: AnyObject {
func webRTCClient(didReportStreamMode mode: Int)
///
func webRTCClient(didReportResolution width: Int, height: Int)
///
func webRTCClient(didReportFps fps: Int, supportedFps: [Int])
}
/// WebRTC PeerConnection Offer/Answer
@@ -313,6 +315,8 @@ extension WebRTCClient: RTCDataChannelDelegate {
self.delegate?.webRTCClient(didReportStreamMode: Int(msg.streamMode))
case .reportResolution:
self.delegate?.webRTCClient(didReportResolution: Int(msg.width), height: Int(msg.height))
self.delegate?.webRTCClient(didReportFps: Int(msg.fps),
supportedFps: msg.supportedFps.map(Int.init))
default:
break
}