namespace SHH.MjpegPlayer
{
/// 图片通道
public class ImageChannel
{
/// 进程 ID
public Int32 ProcId { get; set; }
/// 设备 ID
public Int64 DeviceId { get; set; }
/// 设备 IP
public string IpAddress { get; set; } = string.Empty;
/// 名称
public string Name { get; set; } = string.Empty;
/// 类型
public string Type { get; set; } = string.Empty;
/// 图像宽度
public int ImageWidth { get; set; }
/// 图像高度
public int ImageHeight { get; set; }
/// 更新时间
public DateTime UpdateTime { get; set; }
/// 是否正在播放
public bool IsPlaying { get; set; }
/// 是否需要推流到 Rtmp 服务器
public bool UseRtmp { get; set; } = true;
#region RtmpUri
private string _rtmpUri = string.Empty;
/// Rtmp 推流地址
public string RtmpUri
{
get => _rtmpUri;
set
{
if (_rtmpUri == value)
return;
_rtmpUri = value;
}
}
#endregion
#region TestUri
/// 测试地址
public string TestUri => $"?id={DeviceId}&typeCode={Type}";
#endregion
}
}