protected void SetupNoSources() { _videoSourceDatabaseMock.Setup(x => x.Load()).Returns( new VideoSource[] {} ); _videoSourceStorage = new VideoSourceStorage(_videoSourceDatabaseMock.Object); }
protected void SetupTwoSources() { _videoSourceDatabaseMock.Setup(x => x.Load()).Returns( new VideoSource[] { _videoSourcesFixtures.VideoSourceOne, _videoSourcesFixtures.VideoSourceTwo } ); _videoSourceStorage = new VideoSourceStorage(_videoSourceDatabaseMock.Object); }
public ConnectionService(IVideoSourceStorage videoSourceStorage, IRtspClientFactory rtspClientfactory, IRtspServer rtspServer) { _videoSourceStorage = videoSourceStorage; _rtspClientFactory = rtspClientfactory; _rtspServer = rtspServer; _rtspServer.OnConnectionAdded += RtspServerConnectionAdded; _rtspServer.OnConnectionRemoved += RtspServerConnectionRemoved; _rtspServer.OnProvideSdpData += RtspServerProvideSdpData; _rtspClientsDictionary = new ConcurrentDictionary <Guid, IRtspClient>(); _serverConnectionsDictionary = new ConcurrentDictionary <Guid, List <Guid> >( _videoSourceStorage.VideoSources.ToList().ConvertAll(vs => { return(new KeyValuePair <Guid, List <Guid> >(vs.Id, new List <Guid>())); }) ); _cancellationTokenSourceDictionary = new ConcurrentDictionary <Guid, CancellationTokenSource>(); }
public RequestUrlVideoSourceResolverStrategy(IVideoSourceStorage videoSourceStorage) { _videoSourceStorage = videoSourceStorage; }