Author: dmeyer
Date: Mon Apr 17 14:06:36 2006
New Revision: 1405
Modified:
trunk/player/src/xine.py
trunk/player/test/play.py
Log:
make sure we only parse complete lines
Modified: trunk/player/src/xine.py
==============================================================================
--- trunk/player/src/xine.py (original)
+++ trunk/player/src/xine.py Mon Apr 17 14:06:36 2006
@@ -32,7 +32,7 @@
def __init__(self, instance_id):
self._xine = xine.Xine()
self._stream = self._vo = self._ao = None
-
+ self._stdin_data = ''
self._osd_shmkey = int(md5.md5(instance_id + "osd").hexdigest()[:7],
16)
self._frame_shmkey = int(md5.md5(instance_id +
"frame").hexdigest()[:7], 16)
self._osd_shmem = self._frame_shmem = None
@@ -64,8 +64,10 @@
if len(data) == 0:
# Parent likely died.
self._handle_command_die()
-
- for line in data.splitlines():
+ self._stdin_data += data
+ while self._stdin_data.find('\n') >= 0:
+ line = self._stdin_data[:self._stdin_data.find('\n')]
+ self._stdin_data = self._stdin_data[self._stdin_data.find('\n')+1:]
command, args, kwargs = eval(line)
reply = getattr(self, "_handle_command_" + command)(*args,
**kwargs)
Modified: trunk/player/test/play.py
==============================================================================
--- trunk/player/test/play.py (original)
+++ trunk/player/test/play.py Mon Apr 17 14:06:36 2006
@@ -1,3 +1,5 @@
+import gtk
+
import kaa, sys
import kaa.player, kaa.canvas, kaa.input, kaa.input.stdin
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog