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; }
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(); }
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(); }
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(); }