mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-16 17:39:58 +00:00
FFwd and Rewind Video (VLC)
When using the fast forward and rewind buttons for a workout we now also fast forward and rewind the video playback on Linux/Windows. The same feature needs to be incorporated under Mac where we use QTKit for video playback. Fixes #594.
This commit is contained in:
@@ -82,6 +82,7 @@ GcWindow(parent), home(home), main(parent)
|
||||
connect(main, SIGNAL(stop()), this, SLOT(stopPlayback()));
|
||||
connect(main, SIGNAL(start()), this, SLOT(startPlayback()));
|
||||
connect(main, SIGNAL(pause()), this, SLOT(pausePlayback()));
|
||||
connect(main, SIGNAL(seek(long)), this, SLOT(seekPlayback(long)));
|
||||
connect(main, SIGNAL(unpause()), this, SLOT(resumePlayback()));
|
||||
connect(main, SIGNAL(mediaSelected(QString)), this, SLOT(mediaSelected(QString)));
|
||||
|
||||
@@ -149,6 +150,14 @@ void VideoWindow::resumePlayback()
|
||||
libvlc_media_player_pause (mp);
|
||||
}
|
||||
|
||||
void VideoWindow::seekPlayback(long ms)
|
||||
{
|
||||
if (!m) return;
|
||||
|
||||
// seek to ms position in current file
|
||||
libvlc_media_player_set_time(mp, (libvlc_time_t) ms);
|
||||
}
|
||||
|
||||
void VideoWindow::mediaSelected(QString filename)
|
||||
{
|
||||
// stop any current playback
|
||||
|
||||
Reference in New Issue
Block a user