新增 Mjpegplayer 用来播放 Web 流
This commit is contained in:
@@ -107,6 +107,19 @@ public class Program
|
||||
|
||||
await manager.StartAsync();
|
||||
|
||||
// 2. Optimized: 主动拉起所有已加载设备的物理连接
|
||||
// 理由:当本地配置了 video 推送目标时,不再等待远端 command 下发启动指令
|
||||
var allDevices = manager.GetAllDevices();
|
||||
foreach (var device in allDevices)
|
||||
{
|
||||
if (device.IsRunning && !device.IsActived)
|
||||
{
|
||||
logger.Information($"[Core] 🚀 自动激活设备流: ID:{device.Id} IP:{device.Config.IpAddress}");
|
||||
// 使用 Fire-and-forget 启动,避免阻塞主线程
|
||||
_ = device.StartAsync();
|
||||
}
|
||||
}
|
||||
|
||||
var sysLog = Log.ForContext("SourceContext", LogModules.Core);
|
||||
sysLog.Information($"[Core] 🚀 核心业务逻辑已激活, 设备管理器已就绪.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user