Esempio n. 1
0
 void HandleSeekEvent(SeekType type, float rate, bool inSegment, long start, long stop)
 {
     /* We only use it for backwards framestepping for now */
     if (type == SeekType.StepDown || type == SeekType.StepUp)
     {
         if (player.Playing)
         {
             player.Pause();
         }
         if (type == SeekType.StepDown)
         {
             player.SeekToPreviousFrame(rate, inSegment);
         }
         else
         {
             player.SeekToNextFrame(rate, inSegment);
         }
         if (SeekEvent != null)
         {
             SeekEvent((int)AccurateCurrentTime);
         }
     }
     if (type == SeekType.Accurate || type == SeekType.Keyframe)
     {
         player.SeekTime(start, rate, type == SeekType.Accurate);
         if (SeekEvent != null)
         {
             SeekEvent((int)start);
         }
     }
 }