Files
flutterApp/lib/features/pv_control/presentation/models/pv_video_source.dart
2026-11-21 14:52:13 +08:00

25 lines
952 B
Dart
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/// pv_control 页面支持的视频链路枚举(多源可扩展)。
///
/// 新增一种链路只需三步:
/// ① 在这里加一个枚举值;
/// ② 在 pv_control_page 的 `_wrapVideoProvider` 注册对应 cubit(若需要);
/// ③ 在 PvVideoArea / PvManualControlView 的视频层加一个渲染分支。
///
/// 设置面板负责选择链路;各路摄像头由 PvCameraView 统一分发。
enum PvVideoSource {
/// 云端 WebRTC 流(原始方案,走 webrtc:// 地址)。
webrtc,
/// 本地以太网 RTSP:ONVIF 自动发现 + ExoPlayer 拉流,卡死自动重拉。
localRtsp,
/// USB 摄像头(UVC 采集卡,PlatformView 低延迟直显)。
usbCamera,
/// 声网 RTC:同一频道按 UID 区分前、左、后、右四路。
agoraRtc;
/// 独立摄像头能力。未来其它链路接入多路时,在这里声明即可复用 HUD。
bool get hasDirectionalViews => this == agoraRtc;
}