支持通过网页增加、删除、修改摄像头配置信息
支持摄像头配置信息中句柄的设置,并实测有效
This commit is contained in:
@@ -18,6 +18,13 @@ public abstract class BaseVideoSource : IVideoSource, IAsyncDisposable, IDeviceC
|
||||
private volatile bool _isPhysicalOnline;
|
||||
public bool IsPhysicalOnline => _isPhysicalOnline;
|
||||
|
||||
/// <summary>
|
||||
/// 图像预处理配置(缩放、增量等)
|
||||
/// 放置在基类中,确保所有接入协议(HIK/DH/RTSP)均可共享处理逻辑
|
||||
/// </summary>
|
||||
public PreprocessConfig PreprocessSettings { get; set; }
|
||||
= new PreprocessConfig();
|
||||
|
||||
string IDeviceConnectivity.IpAddress => _config.IpAddress;
|
||||
|
||||
// 允许哨兵从外部更新 _isOnline 字段
|
||||
@@ -240,6 +247,10 @@ public abstract class BaseVideoSource : IVideoSource, IAsyncDisposable, IDeviceC
|
||||
StreamType = source.StreamType,
|
||||
Transport = source.Transport,
|
||||
ConnectionTimeoutMs = source.ConnectionTimeoutMs,
|
||||
MainboardIp = source.MainboardIp,
|
||||
MainboardPort = source.MainboardPort,
|
||||
RtspPath = source.RtspPath,
|
||||
RenderHandle = source.RenderHandle,
|
||||
// Dictionary 深拷贝:防止外部修改影响内部
|
||||
VendorArguments = source.VendorArguments != null
|
||||
? new Dictionary<string, string>(source.VendorArguments)
|
||||
|
||||
@@ -228,7 +228,7 @@ public class HikVideoSource : BaseVideoSource
|
||||
{
|
||||
var previewInfo = new HikNativeMethods.NET_DVR_PREVIEWINFO
|
||||
{
|
||||
hPlayWnd = IntPtr.Zero,
|
||||
hPlayWnd = (IntPtr)_config.RenderHandle,
|
||||
lChannel = _config.ChannelIndex,
|
||||
dwStreamType = (uint)_config.StreamType,
|
||||
bBlocked = false
|
||||
|
||||
Reference in New Issue
Block a user