Author: tack
Date: Sun Jan 14 18:42:07 2007
New Revision: 2394
Modified:
trunk/popcorn/src/backends/xine/child.py
trunk/popcorn/src/backends/xine/filter.py
Log:
Create vfilter object only once, and use new set_vo method when creating new
vo to rewrite filter chain to new vo; dump filter chain (for debugging) during
play, not open.
Modified: trunk/popcorn/src/backends/xine/child.py
==============================================================================
--- trunk/popcorn/src/backends/xine/child.py (original)
+++ trunk/popcorn/src/backends/xine/child.py Sun Jan 14 18:42:07 2007
@@ -56,6 +56,7 @@
Player.__init__(self)
self._xine = xine.Xine()
+ self._vfilter = FilterChain(self._xine)
self._stream = self._vo = self._ao = None
self._osd_shmkey = int(osd_shmkey)
self._frame_shmkey = int(frame_shmkey)
@@ -249,9 +250,8 @@
self._driver_control = None
self._vo_visible = False
- # setup filter chain and configure filter
- self._vfilter = FilterChain(self._xine, video_targets=[ self._vo ])
-
+ # Set new vo on filter chain and configure filters.
+ self._vfilter.set_vo(self._vo)
f = self._vfilter.get("tvtime")
f.set_parameters(method = self.config.xine.deinterlacer.method,
chroma_filter =
self.config.xine.deinterlacer.chroma_filter)
@@ -343,7 +343,6 @@
else:
self._goom_post = None
self._stream.get_audio_source().wire(self._ao)
- xine._debug_show_chain(self._stream._obj)
except xine.XineError:
self.parent.set_streaminfo(False, self._stream.get_error())
log.error('Open failed: %s', self._stream.get_error())
@@ -389,6 +388,7 @@
status = self._stream.get_status()
if status == xine.STATUS_STOP:
self._stream.play()
+ xine._debug_show_chain(self._stream._obj)
def pause(self):
Modified: trunk/popcorn/src/backends/xine/filter.py
==============================================================================
--- trunk/popcorn/src/backends/xine/filter.py (original)
+++ trunk/popcorn/src/backends/xine/filter.py Sun Jan 14 18:42:07 2007
@@ -1,3 +1,5 @@
+# FIXME: this whole approach nees an overhaul
+
class FilterChain(object):
def __init__(self, xine, video_targets=[], audio_targets=[]):
@@ -16,6 +18,11 @@
self._filter[name] = f
return f
+ def set_vo(self, vo):
+ self._video_targets = [ vo ]
+ if self._chain:
+ self.get(self._chain[-1]).get_default_output().wire(vo)
+
def get_chain(self):
return self._chain[1:]
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog