public ZoomPlayerTimeSource(ISampleClock clock, ZoomPlayerConnectionSettings 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(); }
public ManualTimeSource(ISampleClock clock) { _clock = clock; _clock.Tick += ClockOnTick; }
public MediaPlayerTimeSource(MediaPlayer player, ISampleClock clock) { _player = player; _clock = clock; _clock.Tick += ClockOnTick; }
public ManualTimeSource(ISampleClock clock, TimeSpan maxOffset) { _maxOffset = maxOffset; _clock = clock; _clock.Tick += ClockOnTick; }
public ManualTimeSource(ISampleClock clock) : this(clock, TimeSpan.FromMilliseconds(30)) { }