WMF: improve changing playback rate on a media player.
authorYoann Lopes <yoann.lopes@digia.com>
Tue, 25 Mar 2014 14:44:54 +0000 (15:44 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 9 Apr 2014 11:43:50 +0000 (13:43 +0200)
commitf6e57f80a85f5341d2db074ca7c6ecd468b8ca7f
tree006af239134afd4a872f94e75e72eda783c5a1f3
parent464ed66119ba065a8604ceed9963b2626a9ca586
WMF: improve changing playback rate on a media player.

When going back to normal rate after playing in fast forward (greater
than 2x), playback seemed frozen for some amount of time (up to 8
seconds).
When playing in fast forward, only key frames are shown, ignoring all
the others. When returning to a normal rate, the source reader will
usually be pointing to a key frame in the future compared to the
player clock position, meaning that all the frames in between won't be
shown until the player clock catches up with the latest key frame that
was read.

When leaving fast-forward, we now reset the position on the player to
force the source reader to point back to the frame at the current clock
position and avoid the seamingly frozen playback.

Also, emit playbackRateChanged() signal when changing the playback
rate.

Change-Id: I4f04f0f250083378e94fb4a47f9f917abeaaf24e
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
src/plugins/wmf/player/mfplayersession.cpp
src/plugins/wmf/player/mfplayersession.h