예제 #1
0
 public EventLogger(MappingTrackSelector trackSelector)
 {
     this.trackSelector = trackSelector;
     window             = new Timeline.Window();
     period             = new Timeline.Period();
     startTimeMs        = SystemClock.ElapsedRealtime();
 }
예제 #2
0
 /// <summary>
 /// Releases the player.
 /// </summary>
 private void ReleasePlayer()
 {
     if (_player != null)
     {
         _debugViewHelper.Stop();
         _debugViewHelper       = null;
         _shouldAutoPlay        = _player.PlayWhenReady;
         _shouldRestorePosition = false;
         Timeline timeline = _player.CurrentTimeline;
         if (timeline != null)
         {
             _playerWindow = _player.CurrentWindowIndex;
             Timeline.Window window = timeline.GetWindow(_playerWindow, new Timeline.Window());
             if (!window.IsDynamic)
             {
                 _shouldRestorePosition = true;
                 _playerPosition        = window.IsSeekable ? _player.CurrentPosition : C.TimeUnset;
             }
         }
         _player.Release();
         _player               = null;
         _trackSelector        = null;
         _trackSelectionHelper = null;
         _eventLogger          = null;
     }
 }
예제 #3
0
 public EventLogger()
 {
     _window      = new Timeline.Window();
     _period      = new Timeline.Period();
     _startTimeMs = SystemClock.ElapsedRealtime();
 }