Author: duncan
Date: Fri Jun 8 16:53:19 2007
New Revision: 9670
Modified:
branches/rel-1/freevo/src/video/plugins/xine.py
Log:
[ 1729024 ] bookmarks for xine
Patch from Christian Lyra applied
Modified: branches/rel-1/freevo/src/video/plugins/xine.py
==============================================================================
--- branches/rel-1/freevo/src/video/plugins/xine.py (original)
+++ branches/rel-1/freevo/src/video/plugins/xine.py Fri Jun 8 16:53:19 2007
@@ -38,6 +38,7 @@
import time, os, re
+import subprocess
import copy
import config # Configuration handler. reads config file.
@@ -194,18 +195,23 @@
'''
Stop xine
'''
+
if not self.app:
return
- command = "%s -S get_time" % config.CONF.xine
- handle = os.popen(command,'r')
+ command = "%s -S get_time --stdctl --no-splash --hide-gui " %
config.CONF.xine
+ handle = subprocess.Popen(command, shell=True, stdin=subprocess.PIPE,
stdout=subprocess.PIPE )
+ (cin, cout) = (handle.stdin, handle.stdout)
try:
- position = handle.read();
+ position = cout.read();
_debug_("Elapsed = %s" % position)
if position:
self.item.elapsed = int(position)
finally:
- handle.close()
+ #xine should exit nicely, but if the first xine is already closed
this xine will hang
+ exit_code = handle.poll()
+ if not exit_code:
+ cin.write('quit\n')
self.app.stop('quit\n')
rc.app(None)
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog