12345678910111213141516171819202122232425 |
- using Abp.Dependency;
- using System.Collections.Concurrent;
- using System.Linq;
- using VideoSurveillanceAdapter;
- namespace Yunda.ISAS.DataMonitoringServer.DataCenter
- {
- public class CameraDataCenter : ISingletonDependency
- {
- public ConcurrentBag<VideoPlayer> CameraCollection = new ConcurrentBag<VideoPlayer>();
- public VideoPlayer FindCamera(VideoPlayer videoPlayer)
- {
- var videoInstance = CameraCollection.FirstOrDefault(video =>
- video.CameraConfigure.Ip == videoPlayer.CameraConfigure.Ip
- && video.CameraConfigure.Name == videoPlayer.CameraConfigure.Name
- && video.CameraConfigure.Password == videoPlayer.CameraConfigure.Password
- //&& video.CameraConfigure.PlayChannel == videoPlayer.CameraConfigure.PlayChannel
- && video.CameraConfigure.PlayFrame == videoPlayer.CameraConfigure.PlayFrame
- && video.CameraConfigure.Port == videoPlayer.CameraConfigure.Port
- && video.CameraConfigure.UserName == videoPlayer.CameraConfigure.UserName
- && video.CameraConfigure.CameraBrand == videoPlayer.CameraConfigure.CameraBrand);
- return videoInstance;
- }
- }
- }
|