Author: dmeyer
Date: Sat Feb 3 12:19:10 2007
New Revision: 9137
Modified:
trunk/ui/src/video/player.py
Log:
update item.elapsed
Modified: trunk/ui/src/video/player.py
==============================================================================
--- trunk/ui/src/video/player.py (original)
+++ trunk/ui/src/video/player.py Sat Feb 3 12:19:10 2007
@@ -60,6 +60,7 @@
self.player = kaa.popcorn.Player()
self.player.set_window(self.engine.get_window())
self.player.signals['failed'].connect_weak(self._play_failed)
+ self.elapsed_timer = kaa.notifier.WeakTimer(self.elapsed)
def play(self, item):
@@ -163,6 +164,13 @@
self.status = STATUS_STOPPING
+ def elapsed(self):
+ """
+ Callback for elapsed time changes.
+ """
+ self.item.elapsed = round(self.player.get_position())
+
+
def eventhandler(self, event):
"""
React on some events or send them to the real player or the
@@ -175,6 +183,7 @@
return True
if event == PLAY_START:
+ self.elapsed_timer.start(0.2)
self.item.eventhandler(event)
return True
@@ -183,6 +192,7 @@
# player stopped by itself. So we need to set the application to
# to stopped.
self.status = STATUS_STOPPED
+ self.elapsed_timer.stop()
self.item.eventhandler(event)
if self.status == STATUS_STOPPED:
self.status = STATUS_IDLE
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog