summaryrefslogtreecommitdiff
path: root/apps/plugins/video.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-07-26 20:01:11 +0000
committerJens Arnold <amiconn@rockbox.org>2005-07-26 20:01:11 +0000
commite44372ef18cbf30f0e174ed76be4ee4e6206f2cc (patch)
tree8860863bbfb7a6151173e7428900d9de2bdbba73 /apps/plugins/video.c
parentc20a00ef3e35b15acf422a2e7f6716abde840c24 (diff)
downloadrockbox-e44372ef18cbf30f0e174ed76be4ee4e6206f2cc.zip
rockbox-e44372ef18cbf30f0e174ed76be4ee4e6206f2cc.tar.gz
rockbox-e44372ef18cbf30f0e174ed76be4ee4e6206f2cc.tar.bz2
rockbox-e44372ef18cbf30f0e174ed76be4ee4e6206f2cc.tar.xz
Moved implementation of user timer to the firmware layer, implemented it for iriver, and made it shareable based on priorities. On iriver, the user timer is shared between the backlight fading and other use, so if a plugin registers the timer, the backlight will resort to simple on/off switching until the plugin releases the timer again. Sorted and bumped the plugin api.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7242 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/video.c')
-rw-r--r--apps/plugins/video.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/apps/plugins/video.c b/apps/plugins/video.c
index b4b27e0..1a288ee 100644
--- a/apps/plugins/video.c
+++ b/apps/plugins/video.c
@@ -388,7 +388,7 @@ void timer4_isr(void)
else
{
gPlay.bVideoUnderrun = true;
- rb->plugin_unregister_timer(); // disable ourselves
+ rb->timer_unregister(); // disable ourselves
return; // no data available
}
}
@@ -490,7 +490,7 @@ int SeekTo(int fd, int nPos)
if (gPlay.bHasAudio)
rb->mp3_play_stop(); // stop audio ISR
if (gPlay.bHasVideo)
- rb->plugin_unregister_timer(); // stop the timer
+ rb->timer_unregister(); // stop the timer
rb->lseek(fd, nPos, SEEK_SET);
@@ -538,9 +538,9 @@ int SeekTo(int fd, int nPos)
gPlay.bVideoUnderrun = false;
// start display interrupt
#if FREQ == 12000000 /* Ondio speed kludge */
- rb->plugin_register_timer(gPlay.nFrameTimeAdjusted, 1, timer4_isr);
+ rb->timer_register(1, NULL, gPlay.nFrameTimeAdjusted, 1, timer4_isr);
#else
- rb->plugin_register_timer(gFileHdr.video_frametime, 1, timer4_isr);
+ rb->timer_register(1, NULL, gFileHdr.video_frametime, 1, timer4_isr);
#endif
}
@@ -553,7 +553,7 @@ void Cleanup(void *fd)
rb->close(*(int*)fd); // close the file
if (gPlay.bHasVideo)
- rb->plugin_unregister_timer(); // stop video ISR, now I can use the display again
+ rb->timer_unregister(); // stop video ISR, now I can use the display again
if (gPlay.bHasAudio)
rb->mp3_play_stop(); // stop audio ISR
@@ -705,7 +705,7 @@ int PlayTick(int fd)
if (gPlay.bHasAudio)
rb->mp3_play_pause(false); // pause audio
if (gPlay.bHasVideo)
- rb->plugin_unregister_timer(); // stop the timer
+ rb->timer_unregister(); // stop the timer
}
else if (gPlay.state == paused)
{
@@ -719,10 +719,10 @@ int PlayTick(int fd)
if (gPlay.bHasVideo)
{ // start the video
#if FREQ == 12000000 /* Ondio speed kludge */
- rb->plugin_register_timer(
+ rb->timer_register(1, NULL,
gPlay.nFrameTimeAdjusted, 1, timer4_isr);
#else
- rb->plugin_register_timer(
+ rb->timer_register(1, NULL,
gFileHdr.video_frametime, 1, timer4_isr);
#endif
}