summaryrefslogtreecommitdiff
path: root/apps/plugins/mpegplayer/stream_mgr.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2008-01-04 20:36:15 +0000
committerMichael Sevakis <jethead71@rockbox.org>2008-01-04 20:36:15 +0000
commitc89863027981c07b4ae58d0e1720ecda92dcddf3 (patch)
treec5e4e34bf156b7a1949e351014bcce24686f9a2f /apps/plugins/mpegplayer/stream_mgr.c
parentee71d8770ba0a64218111271d2f3f43ac4070461 (diff)
downloadrockbox-c89863027981c07b4ae58d0e1720ecda92dcddf3.zip
rockbox-c89863027981c07b4ae58d0e1720ecda92dcddf3.tar.gz
rockbox-c89863027981c07b4ae58d0e1720ecda92dcddf3.tar.bz2
rockbox-c89863027981c07b4ae58d0e1720ecda92dcddf3.tar.xz
mpegplayer seek tweak: Have video keep the time and duration of the last decoded frame up to date at all times. Make sure streams that have reported and EOS condition are placed back on active list when seeking which it seems is the cause of a video glitch where the initial frame may be presented after a seek but video playback wouldn't restart. Set logical seek time to video start in the parser after after initial load.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15995 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/mpegplayer/stream_mgr.c')
-rw-r--r--apps/plugins/mpegplayer/stream_mgr.c38
1 files changed, 22 insertions, 16 deletions
diff --git a/apps/plugins/mpegplayer/stream_mgr.c b/apps/plugins/mpegplayer/stream_mgr.c
index 1baa203..8d2e42f 100644
--- a/apps/plugins/mpegplayer/stream_mgr.c
+++ b/apps/plugins/mpegplayer/stream_mgr.c
@@ -319,6 +319,9 @@ static uint32_t stream_seek_intl(uint32_t time, int whence, int status)
/* Set the master clock */
set_stream_clock(time);
+ /* Make sure streams are back in active pool */
+ move_strl_to_actl();
+
/* Prepare the parser and associated streams */
parser_prepare_streaming();
@@ -489,6 +492,9 @@ static void stream_on_resume(void)
/* Set the master clock */
set_stream_clock(str_parser.last_seek_time);
+ /* Make sure streams are back in active pool */
+ move_strl_to_actl();
+
/* Prepare the parser and associated streams */
parser_prepare_streaming();
}
@@ -582,29 +588,29 @@ static void stream_on_seek(struct stream_seek_data *skd)
stream_mgr_lock();
- if (!stream_can_seek())
- {
- }
- else if (stream_mgr.status != STREAM_STOPPED)
+ if (stream_can_seek())
{
- if (stream_mgr.status != STREAM_PLAYING)
+ if (stream_mgr.status != STREAM_STOPPED)
{
- trigger_cpu_boost();
- }
+ if (stream_mgr.status != STREAM_PLAYING)
+ {
+ trigger_cpu_boost();
+ }
- stream_seek_intl(time, whence, stream_mgr.status);
+ stream_seek_intl(time, whence, stream_mgr.status);
- if (stream_mgr.status != STREAM_PLAYING)
+ if (stream_mgr.status != STREAM_PLAYING)
+ {
+ cancel_cpu_boost();
+ }
+ }
+ else
{
- cancel_cpu_boost();
+ stream_mgr.seeked = true;
+ time = time_from_whence(time, whence);
+ parser_seek_time(time);
}
}
- else
- {
- stream_mgr.seeked = true;
- time = time_from_whence(time, whence);
- parser_seek_time(time);
- }
stream_mgr_unlock();
return;