Exemple #1
0
        private static bool GetRecording(IProgram program, out Recording recording)
        {
            IRecordingService recordingService = GlobalServiceProvider.Instance.Get <IRecordingService>();

            recording = recordingService.GetActiveRecordingByTitleAndChannel(program.Title, program.ChannelId);
            return(recording != null);
        }
Exemple #2
0
        private static bool GetRecording(IProgram program, out Recording recording)
        {
#if TVE3
            recording = TvDatabase.Recording.ListAll().FirstOrDefault(r => r.IsRecording && r.IdChannel == program.ChannelId && r.Title == program.Title);
#else
            IRecordingService recordingService = GlobalServiceProvider.Instance.Get <IRecordingService>();
            recording = recordingService.GetActiveRecordingByTitleAndChannel(program.Title, program.ChannelId);
#endif
            return(recording != null);
        }
Exemple #3
0
        public void OnSelectionSet(RegionBlock selectedRegion)
        {
            Debug.WriteLine($"New selection: X={selectedRegion.X} Y={selectedRegion.Y} Width={selectedRegion.Width} Height={selectedRegion.Height}");

            Debug.Assert(ActiveRecordingService == null);

            ActiveRecordingService = recordingServiceProvider.Create(selectedRegion, KnownFourCC.Codecs.MotionJpeg, 70);
            HideSelectionViewCommand.Execute(null);

            BeginRecord();
        }
        /// <summary>
        /// Initializes all needed services.
        /// </summary>
        public static async Task InitializeServices()
        {
            // Load credentinals from config file
            var userCredentials = await TmApiWebAuthorizationBroker.AuthorizeAsync();

            var initializer = new BaseService.Initializer(userCredentials);

            _uploadService    = new UploadService(initializer);
            _recordingService = new RecordingsService(initializer);
            _ordersService    = new OrdersService(initializer);
        }
Exemple #5
0
 public BootstrapService(ISeedDataLoader seedDataLoader,
                         ITimingSessionService timingSessionService,
                         IRecordingService recordingService,
                         IHubContext <RaceHub> raceHub, IMessageHub messageHub)
 {
     this.seedDataLoader       = seedDataLoader;
     this.timingSessionService = timingSessionService;
     this.recordingService     = recordingService;
     this.raceHub    = raceHub;
     this.messageHub = messageHub;
 }
Exemple #6
0
        private bool TryCreateRecordingService(out IRecordingService recordingService)
        {
#if UNITY_ANDROID
            recordingService = new AndroidRecordingService();
            return(true);
#elif UNITY_IOS
            recordingService = new iOSRecordingService();
            return(true);
#else
            recordingService = null;
            return(false);
#endif
        }
 private void InitServices()
 {
     if (_factoryNetwork != null)
     {
         _parseService     = _factoryNetwork.CreateHtmlParseService();
         _seleniumService  = _factoryNetwork.CreateSeleniumService();
         _recordingService = _factoryNetwork.CreateRecordingService();
     }
     else
     {
         throw new Exception("Инициализация фабрики сетей не выполнена");
     }
 }
        protected void UpdateServerState()
        {
            IInternalControllerService controller = GlobalServiceProvider.Instance.Get <IInternalControllerService>();
            IRecordingService          recordings = GlobalServiceProvider.Get <IRecordingService>();
            IList <ISchedule>          currentlyRecordingSchedules = recordings.ListAllActiveRecordingsByMediaType(MediaTypeEnum.TV)
                                                                     .Union(recordings.ListAllActiveRecordingsByMediaType(MediaTypeEnum.Radio))
                                                                     .Select(r => r.Schedule.ToSchedule()).ToList();

            TvServerState state = new TvServerState
            {
                IsRecording = controller.IsAnyCardRecording(),
                CurrentlyRecordingSchedules = currentlyRecordingSchedules
            };

            ServiceRegistration.Get <IServerStateService>().UpdateState(TvServerState.STATE_ID, state);
        }
Exemple #9
0
 public TimingSession(Id <TimingSessionDto> id,
                      IEventRepository eventRepository,
                      IRecordingService recordingService, IRecordingServiceRepository recordingServiceRepository,
                      IAutoMapperProvider autoMapper,
                      IMessageHub messageHub, ISystemClock clock)
 {
     this.Id = id;
     this.eventRepository            = eventRepository;
     this.recordingService           = recordingService;
     this.recordingServiceRepository = recordingServiceRepository;
     this.autoMapper = autoMapper;
     this.messageHub = messageHub;
     this.clock      = clock;
     messageHub.Subscribe <UpstreamDataSyncComplete>(_ => Reload());
     messageHub.Subscribe <StorageUpdated>(x => Reload(false, x));
 }
 public HomeController(IRecordingService recordingService)
 {
     this.recordingService = recordingService;
 }
Exemple #11
0
 private void EndRecording()
 {
     ActiveRecordingService.Stop();
     ActiveRecordingService = null;
     IsRecording            = false;
 }
 /// <inheritdoc/>
 public void SetRecordingService(IRecordingService recordingService)
 {
     _recordingService = recordingService;
 }
Exemple #13
0
 public Record()
     : base()
 {
     recoSvc = new RecordingService();
 }
Exemple #14
0
 public Record()
     : base()
 {
     recoSvc = new RecordingService();
 }