增加了通过网络主动上报图像的支持
增加了指令维护通道的支持
This commit is contained in:
24
SHH.CameraService/Core/Configs/PushTargetConfig.cs
Normal file
24
SHH.CameraService/Core/Configs/PushTargetConfig.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
namespace SHH.CameraService;
|
||||
|
||||
/// <summary>
|
||||
/// 定义发送的目标
|
||||
/// </summary>
|
||||
public class PushTargetConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// 目标名称
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
= string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// NetMQ 地址 (如 "tcp://1.2.3.4:5555")
|
||||
/// </summary>
|
||||
public string Endpoint { get; set; }
|
||||
= string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 独立队列容量 (隔离的关键)
|
||||
/// </summary>
|
||||
public int QueueCapacity { get; set; } = 10;
|
||||
}
|
||||
30
SHH.CameraService/Core/Configs/StreamTarget.cs
Normal file
30
SHH.CameraService/Core/Configs/StreamTarget.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
namespace SHH.CameraService;
|
||||
|
||||
/// <summary>
|
||||
/// 代表一个独立的推送目标
|
||||
/// 包含:配置信息 + 专属于它的数据管道
|
||||
/// </summary>
|
||||
public class StreamTarget
|
||||
{
|
||||
/// <summary>
|
||||
/// 配置
|
||||
/// </summary>
|
||||
public PushTargetConfig Config { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 管道
|
||||
/// </summary>
|
||||
public VideoDataChannel Channel { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 构造函数
|
||||
/// </summary>
|
||||
/// <param name="config"></param>
|
||||
public StreamTarget(PushTargetConfig config)
|
||||
{
|
||||
Config = config;
|
||||
|
||||
// 为这个目标创建独立的管道,容量由配置决定
|
||||
Channel = new VideoDataChannel(capacity: config.QueueCapacity);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user