在 AiVideo 中能看到图像

增加了在线状态同步逻辑
This commit is contained in:
2026-01-09 12:30:36 +08:00
parent 3d47c8f009
commit 3351ae739e
31 changed files with 1090 additions and 477 deletions

View File

@@ -0,0 +1,37 @@
namespace SHH.CameraService;
/// <summary>
/// 协议上下文 (用于在拦截器之间传递数据)
/// </summary>
public class ProtocolContext
{
public string Protocol { get; set; }
public byte[] Data { get; set; }
/// <summary>
/// 是否拦截/终止 (设为 true 则不再继续传递)
/// </summary>
public bool IsBlocked { get; set; } = false;
public ProtocolContext(string protocol, byte[] data)
{
Protocol = protocol;
Data = data;
}
}
/// <summary>
/// 拦截器接口
/// </summary>
public interface IProtocolInterceptor
{
/// <summary>
/// 发送前触发 (Outbound)
/// </summary>
Task OnSendingAsync(ProtocolContext context);
/// <summary>
/// 接收后触发 (Inbound)
/// </summary>
Task OnReceivedAsync(ProtocolContext context);
}