private void PlaybackTickerFunc(object sender, EventArgs e) { lock (mutex) { mutex.CurFrame++; var secCurClip = player.GetPositionSec(); var frameMarkerPosition = mutex.CurClipMarkerStartPos + mutex.Proj.SecToFrame(secCurClip - mutex.CurPlayerStartPositionSec); editor.SetFrameMarker_ForceRepaint(frameMarkerPosition); if (secCurClip >= mutex.CurStopPositionSec - STOP_BEFORE_THRESH || player.IsStopped()) { var newIndex = mutex.CurClipIndex + 1; var clip = mutex.OnlyLockedClips ? mutex.Proj.GetNextLockedVideoClipStartingAtIndex(newIndex, out newIndex) : mutex.Proj.GetVideoClipAtIndex(newIndex); mutex.CurClipIndex = newIndex; if (clip == null) { StopPlayback(); } else { StartPlaybackOfClip(clip); cxzxc("Next clip: " + mutex.CurClipIndex); } } var curAbsSec = mutex.Proj.FrameToSec(frameMarkerPosition); playerAudio.WeAreHereStartPlaying(curAbsSec); //cxzxc("curAbsSec=" + curAbsSec); } }
private void PlaybackTickerFunc(object sender, EventArgs e) { lock (mutex) { mutex.CurFrame++; var secCurClip = player.GetPositionSec(); var frameMarkerPosition = mutex.CurClipAbsFrameLeft + mutex.Proj.SecToFrame(secCurClip) - mutex.CurClipStartFrame; editor.SetFrameMarker_ForceRepaint(frameMarkerPosition); if (secCurClip >= mutex.CurStopPositionSec - STOP_BEFORE_THRESH || player.IsStopped()) { var newIndex = mutex.CurClipIndex + 1; var clip = mutex.OnlyLockedClips ? mutex.Proj.GetNextLockedVideoClipStartingAtIndex(newIndex, out newIndex) : mutex.Proj.GetVideoClipAtIndex(newIndex); mutex.CurClipIndex = newIndex; if (clip == null) { StopPlayback(); } else { StartPlaybackOfClip(clip); editor.AppendToConsole(VidkaConsoleLogLevel.Debug, "Next clip: " + mutex.CurClipIndex); } } } }
public bool IsStopped() { return(playerWmp.IsStopped()); }