Author: dmeyer
Date: Thu Dec 21 14:32:05 2006
New Revision: 2269
Modified:
trunk/popcorn/src/backends/base.py
trunk/popcorn/src/generic.py
Log:
update property handling
Modified: trunk/popcorn/src/backends/base.py
==============================================================================
--- trunk/popcorn/src/backends/base.py (original)
+++ trunk/popcorn/src/backends/base.py Thu Dec 21 14:32:05 2006
@@ -31,7 +31,6 @@
import os
import md5
import logging
-import copy
# kaa imports
import kaa.notifier
@@ -64,7 +63,7 @@
self._size = None
self._aspect = None
self._config = config
- self._properties = copy.copy(properties)
+ self._properties = properties
self._instance_id = "popcorn-%d-%d" % (os.getpid(),
self._instance_count)
MediaPlayer._instance_count += 1
@@ -303,6 +302,13 @@
return False
+ def set_property(self, prop, value):
+ """
+ Set a property to a new value.
+ """
+ self._properties[prop] = value
+
+
# For CAP_OSD
def osd_update(self, alpha = None, visible = None, invalid_regions = None):
Modified: trunk/popcorn/src/generic.py
==============================================================================
--- trunk/popcorn/src/generic.py (original)
+++ trunk/popcorn/src/generic.py Thu Dec 21 14:32:05 2006
@@ -245,11 +245,18 @@
properties = self._properties
if copy_properties and self._player:
properties = self._player._properties
+ properties = properties.copy()
+
+ if properties.get('deinterlace') == 'auto':
+ self._player._properties['deinterlace'] = False
+ if 'interlaced' in self._media an self._media.interlaced:
+ self._player._properties['deinterlace'] = True
+
self._player = cls(self._config, properties)
self._player._state_changed.connect_weak(self._state_change)
for signal in self._player.signals:
self._player.signals[signal].connect_weak(self.signals[signal].emit)
-
+
@required_states(STATE_NOT_RUNNING, STATE_IDLE)
def _open(self):
@@ -491,9 +498,8 @@
will only affect the current url.
"""
if self._player:
- self._player._properties[prop] = value
- else:
- self._properties[prop] = value
+ return self._player.set_property(prop, value)
+ self._properties[prop] = value
def get_property(self, prop):
-------------------------------------------------------------------------
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