新增 Mjpegplayer 用来播放 Web 流

This commit is contained in:
2026-01-21 19:03:59 +08:00
parent f79cb6e74d
commit c438edfa0d
71 changed files with 4538 additions and 452 deletions

View File

@@ -409,15 +409,15 @@ public class CameraManager : IDisposable, IAsyncDisposable
/// <para>参数2: IsOnline (true=在线, false=离线)</para>
/// <para>参数3: Reason (变更原因)</para>
/// </summary>
public event Action<long, bool, string>? OnDeviceStatusChanged;
public event Action<long, string, bool, string>? OnDeviceStatusChanged;
/// <summary>
/// [内部方法] 供 Sentinel 调用,触发事件冒泡
/// </summary>
internal void NotifyStatusChange(long deviceId, bool isOnline, string reason)
internal void NotifyStatusChange(long deviceId, string ipAddress, bool isOnline, string reason)
{
// 仅仅是触发 C# 事件,完全不知道网络发送的存在
OnDeviceStatusChanged?.Invoke(deviceId, isOnline, reason);
OnDeviceStatusChanged?.Invoke(deviceId, ipAddress, isOnline, reason);
}
#endregion

View File

@@ -152,7 +152,7 @@ public class ConnectivitySentinel
: $"持续断连超过{OFFLINE_DURATION_THRESHOLD}秒";
// ★★★ 核心动作:通知 Manager ★★★
_manager.NotifyStatusChange(device.Id, isLogicallyOnline, reason);
_manager.NotifyStatusChange(device.Id, device.IpAddress, isLogicallyOnline, reason);
}
}