예제 #1
0
        public DeoVrTimeSource(ISampleClock clock, SimpleTcpConnectionSettings connectionSettings)
        {
            // Manual TimeSource that will interpolate Timestamps between updates

            _timeSource = new ManualTimeSource(clock, TimeSpan.FromMilliseconds(100));
            _timeSource.DurationChanged     += TimeSourceOnDurationChanged;
            _timeSource.IsPlayingChanged    += TimeSourceOnIsPlayingChanged;
            _timeSource.ProgressChanged     += TimeSourceOnProgressChanged;
            _timeSource.PlaybackRateChanged += TimeSourceOnPlaybackRateChanged;

            _connectionSettings = connectionSettings;
        }
예제 #2
0
        public WhirligigTimeSource(ISampleClock clock, WhirligigConnectionSettings connectionSettings)
        {
            _connectionSettings = connectionSettings;

            _timeSource = new ManualTimeSource(clock, TimeSpan.FromMilliseconds(100));
            _timeSource.DurationChanged     += TimeSourceOnDurationChanged;
            _timeSource.IsPlayingChanged    += TimeSourceOnIsPlayingChanged;
            _timeSource.ProgressChanged     += TimeSourceOnProgressChanged;
            _timeSource.PlaybackRateChanged += TimeSourceOnPlaybackRateChanged;

            _clientLoop = new Thread(ClientLoop);
            _clientLoop.Start();
        }
예제 #3
0
        public KodiTimeSource(ISampleClock clock, KodiConnectionSettings settings)
        {
            _connectionSettings = settings;

            // figure out what clock and offset do
            _timeSource = new ManualTimeSource(clock, TimeSpan.FromMilliseconds(200));
            _timeSource.DurationChanged     += TimeSourceOnDurationChanged;
            _timeSource.ProgressChanged     += TimeSourceOnProgressChanged;
            _timeSource.IsPlayingChanged    += TimeSourceOnIsPlayingChanged;
            _timeSource.PlaybackRateChanged += TimeSourceOnPlaybackRateChanged;

            _cts = new CancellationTokenSource();

            _clientLoop = new Thread(ClientLoop);
            _clientLoop.Start();
        }
예제 #4
0
        public VlcTimeSource(ISampleClock clock, VlcConnectionSettings connectionSettings)
        {
            _connectionSettings = connectionSettings;
            _previousStatus     = new VlcStatus {
                IsValid = false
            };

            _timeSource = new ManualTimeSource(clock, TimeSpan.FromMilliseconds(200));
            _timeSource.DurationChanged     += TimeSourceOnDurationChanged;
            _timeSource.IsPlayingChanged    += TimeSourceOnIsPlayingChanged;
            _timeSource.ProgressChanged     += TimeSourceOnProgressChanged;
            _timeSource.PlaybackRateChanged += TimeSourceOnPlaybackRateChanged;

            _clientLoop = new Thread(ClientLoop);
            _clientLoop.Start();
        }