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.tar.gz
rockbox-e44372ef18cbf30f0e174ed76be4ee4e6206f2cc.zip
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 b4b27e0cb8..1a288eec84 100644
--- a/apps/plugins/video.c
+++ b/apps/plugins/video.c
@@ -388,7 +388,7 @@ void timer4_isr(void)
388 else 388 else
389 { 389 {
390 gPlay.bVideoUnderrun = true; 390 gPlay.bVideoUnderrun = true;
391 rb->plugin_unregister_timer(); // disable ourselves 391 rb->timer_unregister(); // disable ourselves
392 return; // no data available 392 return; // no data available
393 } 393 }
394 } 394 }
@@ -490,7 +490,7 @@ int SeekTo(int fd, int nPos)
490 if (gPlay.bHasAudio) 490 if (gPlay.bHasAudio)
491 rb->mp3_play_stop(); // stop audio ISR 491 rb->mp3_play_stop(); // stop audio ISR
492 if (gPlay.bHasVideo) 492 if (gPlay.bHasVideo)
493 rb->plugin_unregister_timer(); // stop the timer 493 rb->timer_unregister(); // stop the timer
494 494
495 rb->lseek(fd, nPos, SEEK_SET); 495 rb->lseek(fd, nPos, SEEK_SET);
496 496
@@ -538,9 +538,9 @@ int SeekTo(int fd, int nPos)
538 gPlay.bVideoUnderrun = false; 538 gPlay.bVideoUnderrun = false;
539 // start display interrupt 539 // start display interrupt
540#if FREQ == 12000000 /* Ondio speed kludge */ 540#if FREQ == 12000000 /* Ondio speed kludge */
541 rb->plugin_register_timer(gPlay.nFrameTimeAdjusted, 1, timer4_isr); 541 rb->timer_register(1, NULL, gPlay.nFrameTimeAdjusted, 1, timer4_isr);
542#else 542#else
543 rb->plugin_register_timer(gFileHdr.video_frametime, 1, timer4_isr); 543 rb->timer_register(1, NULL, gFileHdr.video_frametime, 1, timer4_isr);
544#endif 544#endif
545 } 545 }
546 546
@@ -553,7 +553,7 @@ void Cleanup(void *fd)
553 rb->close(*(int*)fd); // close the file 553 rb->close(*(int*)fd); // close the file
554 554
555 if (gPlay.bHasVideo) 555 if (gPlay.bHasVideo)
556 rb->plugin_unregister_timer(); // stop video ISR, now I can use the display again 556 rb->timer_unregister(); // stop video ISR, now I can use the display again
557 557
558 if (gPlay.bHasAudio) 558 if (gPlay.bHasAudio)
559 rb->mp3_play_stop(); // stop audio ISR 559 rb->mp3_play_stop(); // stop audio ISR
@@ -705,7 +705,7 @@ int PlayTick(int fd)
705 if (gPlay.bHasAudio) 705 if (gPlay.bHasAudio)
706 rb->mp3_play_pause(false); // pause audio 706 rb->mp3_play_pause(false); // pause audio
707 if (gPlay.bHasVideo) 707 if (gPlay.bHasVideo)
708 rb->plugin_unregister_timer(); // stop the timer 708 rb->timer_unregister(); // stop the timer
709 } 709 }
710 else if (gPlay.state == paused) 710 else if (gPlay.state == paused)
711 { 711 {
@@ -719,10 +719,10 @@ int PlayTick(int fd)
719 if (gPlay.bHasVideo) 719 if (gPlay.bHasVideo)
720 { // start the video 720 { // start the video
721#if FREQ == 12000000 /* Ondio speed kludge */ 721#if FREQ == 12000000 /* Ondio speed kludge */
722 rb->plugin_register_timer( 722 rb->timer_register(1, NULL,
723 gPlay.nFrameTimeAdjusted, 1, timer4_isr); 723 gPlay.nFrameTimeAdjusted, 1, timer4_isr);
724#else 724#else
725 rb->plugin_register_timer( 725 rb->timer_register(1, NULL,
726 gFileHdr.video_frametime, 1, timer4_isr); 726 gFileHdr.video_frametime, 1, timer4_isr);
727#endif 727#endif
728 } 728 }