支持通过网页增加、删除、修改摄像头配置信息
支持摄像头配置信息中句柄的设置,并实测有效
This commit is contained in:
@@ -267,9 +267,13 @@ public class CameraManager : IDisposable, IAsyncDisposable
|
||||
if (dto.ChannelIndex != null) newConfig.ChannelIndex = dto.ChannelIndex.Value;
|
||||
if (dto.StreamType != null) newConfig.StreamType = dto.StreamType.Value;
|
||||
if (dto.Name != null) newConfig.Name = dto.Name;
|
||||
if (dto.RenderHandle != null) newConfig.RenderHandle = (IntPtr)dto.RenderHandle.Value;
|
||||
if (dto.Brand != null) newConfig.Brand = (DeviceBrand)dto.Brand;
|
||||
|
||||
newConfig.RtspPath = dto.RtspPath;
|
||||
newConfig.MainboardIp = dto.MainboardIp;
|
||||
newConfig.MainboardPort = dto.MainboardPort;
|
||||
newConfig.RenderHandle = dto.RenderHandle;
|
||||
|
||||
// 4. 判定冷热更新
|
||||
bool needColdRestart =
|
||||
newConfig.IpAddress != oldConfig.IpAddress ||
|
||||
@@ -306,7 +310,7 @@ public class CameraManager : IDisposable, IAsyncDisposable
|
||||
var options = new DynamicStreamOptions
|
||||
{
|
||||
StreamType = dto.StreamType,
|
||||
RenderHandle = dto.RenderHandle.HasValue ? (IntPtr)dto.RenderHandle : null
|
||||
RenderHandle = (IntPtr)dto.RenderHandle
|
||||
};
|
||||
device.ApplyOptions(options);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user