Author: dmeyer
Date: Fri Dec 22 14:40:03 2006
New Revision: 2278
Modified:
trunk/popcorn/src/backends/xine/child.py
trunk/popcorn/src/backends/xine/filter.py
trunk/popcorn/src/backends/xine/player.py
Log:
make it possible to toggle deinterlace and postprocessing, creates memory leak
Modified: trunk/popcorn/src/backends/xine/child.py
==============================================================================
--- trunk/popcorn/src/backends/xine/child.py (original)
+++ trunk/popcorn/src/backends/xine/child.py Fri Dec 22 14:40:03 2006
@@ -450,4 +450,11 @@
"""
Set a property to a new value.
"""
- pass
+ current = self._vfilter.get_chain()
+ chain = []
+ if (prop == 'deinterlace' and value) or 'tvtime' in current:
+ chain.append('tvtime')
+ if (prop == 'postprocessing' and value) or 'pp' in current:
+ chain.append('pp')
+ chain.append('expand')
+ self._vfilter.rewire(chain)
Modified: trunk/popcorn/src/backends/xine/filter.py
==============================================================================
--- trunk/popcorn/src/backends/xine/filter.py (original)
+++ trunk/popcorn/src/backends/xine/filter.py Fri Dec 22 14:40:03 2006
@@ -25,7 +25,7 @@
def __init__(self):
self._filter = {}
-
+ self._chain = [ None, None, [], None ]
def get(self, name):
f = self._filter.get(name)
@@ -34,8 +34,15 @@
self._filter[name] = f
return f
+ def get_chain(self):
+ return self._chain[2]
+ def rewire(self, chain):
+ self._chain[2] = chain
+ self.wire(*self._chain)
+
def wire(self, xine, src, chain, dst):
+ self._chain = [ xine, src, chain, dst ]
chain = chain[:]
chain.reverse()
for f in chain:
@@ -45,3 +52,4 @@
# FIXME: rewrire support
src.wire(dst)
+
Modified: trunk/popcorn/src/backends/xine/player.py
==============================================================================
--- trunk/popcorn/src/backends/xine/player.py (original)
+++ trunk/popcorn/src/backends/xine/player.py Fri Dec 22 14:40:03 2006
@@ -366,8 +366,8 @@
Set a property to a new value.
"""
super(Xine, self).set_property(prop, value)
- if self.xine:
- self.xine.set_property(prop, value)
+ if self._xine:
+ self._xine.set_property(prop, value)
#
# Methods and helper for MediaPlayer subclasses for CAP_OSD
-------------------------------------------------------------------------
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