From e44372ef18cbf30f0e174ed76be4ee4e6206f2cc Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Tue, 26 Jul 2005 20:01:11 +0000 Subject: 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 --- apps/plugins/video.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'apps/plugins/video.c') diff --git a/apps/plugins/video.c b/apps/plugins/video.c index b4b27e0cb8..1a288eec84 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 } -- cgit v1.2.3