|
|
|
using Cis.Application.Core.Component.MarkSeacher;
|
|
|
|
using EC.Helper.CameraSDK;
|
|
|
|
|
|
|
|
namespace Cis.Application.Core;
|
|
|
|
|
|
|
|
[SuppressSniffer]
|
|
|
|
public static class Extension
|
|
|
|
{
|
|
|
|
public static ICameraSDK CreateCameraSDK(this CameraManufactor cameraManufactor, CameraInfo cameraInfo)
|
|
|
|
{
|
|
|
|
return cameraManufactor switch
|
|
|
|
{
|
|
|
|
CameraManufactor.HiK => new HiKSDK(cameraInfo),
|
|
|
|
CameraManufactor.DaHua => new DaHuaSDK(cameraInfo),
|
|
|
|
CameraManufactor.YuShi => new YuShiSDK(cameraInfo),
|
|
|
|
_ => null,
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
public static MarkSearcherBase CreateMarkSearcher(this CameraManufactor cameraManufactor, CameraCalcParams cameraCalcParams)
|
|
|
|
{
|
|
|
|
return cameraManufactor switch
|
|
|
|
{
|
|
|
|
CameraManufactor.HiK => new HiKMarkSearcher(cameraCalcParams),
|
|
|
|
CameraManufactor.DaHua => new DaHuaMarkSearcher(cameraCalcParams),
|
|
|
|
CameraManufactor.YuShi => new YuShiMarkSearcher(cameraCalcParams),
|
|
|
|
_ => null
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|