Author: dmeyer
Date: Sun Apr 29 20:00:22 2007
New Revision: 2664
Modified:
trunk/popcorn/src/backends/mplayer/player.py
trunk/popcorn/src/config.cxml
trunk/popcorn/src/generic.py
trunk/popcorn/src/ptypes.py
Log:
Rename fit-methad to scale and add the possible values to ptypes. The
scale type is only a runtime variable, it makes no sense to put it in
the config. New scale values are now to force 4:3 and 16:9. Only the
xine backend support these two new values.
Modified: trunk/popcorn/src/backends/mplayer/player.py
==============================================================================
--- trunk/popcorn/src/backends/mplayer/player.py (original)
+++ trunk/popcorn/src/backends/mplayer/player.py Sun Apr 29 20:00:22 2007
@@ -372,7 +372,7 @@
# This may be needed for some non X based displays
args.add(screenw=size[0], screenh=size[1])
- if not self._properties['fit-method'] == 'scaled':
+ if not self._properties['scale'] == SCALE_IGNORE:
# Expand to fit the given aspect. In scaled mode we don't
# do that which will result in a scaled image filling
# the whole screen
@@ -386,7 +386,7 @@
# FIXME: this only works if the window has the the aspect
# as the full screen. In all other cases the window is not
# fully used but at least with black bars.
- if self._properties['fit-method'] == 'zoom':
+ if self._properties['scale'] == SCALE_ZOOM:
# This DOES NOT WORK as it should. The hardware scaler
# will ignore the settings and keep aspect and does
# not crop as default. When using vo x11 and software
@@ -394,6 +394,7 @@
filters.append('dsize=%s:%s:1' % size)
else:
# scale to window size
+ # FIXME: add SCALE_4_3 and SCALE_16_9
filters.append('dsize=%s:%s:0' % size)
# add software scaler based on dsize arguments
Modified: trunk/popcorn/src/config.cxml
==============================================================================
--- trunk/popcorn/src/config.cxml (original)
+++ trunk/popcorn/src/config.cxml Sun Apr 29 20:00:22 2007
@@ -28,19 +28,6 @@
<var name="monitoraspect" default="4:3">
<desc>Aspect ratio of the monitor or tv.</desc>
</var>
- <var name="fit-method" default="bars">
- <values>
- <value>bars</value>
- <value>zoom</value>
- <value>scale</value>
- </values>
- <desc lang="en">
- How to handle 4:3 content on 16:9 screens. Possible values are
- bars: add black bars on the left and on the right
- zoom: zoom into the video, drop content on top and bottom
- scale: ignore aspect ratio and fill the screen
- </desc>
- </var>
<var name="postprocessing" default="False">
<desc>Activate postprocessing for playback as default.</desc>
</var>
Modified: trunk/popcorn/src/generic.py
==============================================================================
--- trunk/popcorn/src/generic.py (original)
+++ trunk/popcorn/src/generic.py Sun Apr 29 20:00:22 2007
@@ -110,8 +110,8 @@
# plays the audio before.
'audio-delay': 0.0,
- # fit method. One of 'bars', 'scale', 'zoom'
- 'fit-method': config.video.fit_method,
+ # scale method. One of SCALE_METHODS
+ 'scale': SCALE_KEEP,
# zoom into the movie
'zoom': 100,
Modified: trunk/popcorn/src/ptypes.py
==============================================================================
--- trunk/popcorn/src/ptypes.py (original)
+++ trunk/popcorn/src/ptypes.py Sun Apr 29 20:00:22 2007
@@ -44,6 +44,14 @@
STATE_STOPPING = 'STATE_STOPPING'
STATE_SHUTDOWN = 'STATE_SHUTDOWN'
+SCALE_KEEP = 'SCALE_KEEP'
+SCALE_IGNORE = 'SCALE_IGNORE'
+SCALE_4_3 = 'SCALE_4_3'
+SCALE_16_9 = 'SCALE_16_9'
+SCALE_ZOOM = 'SCALE_ZOOM'
+
+SCALE_METHODS = [ SCALE_KEEP, SCALE_IGNORE, SCALE_4_3, SCALE_16_9, SCALE_ZOOM ]
+
SEEK_RELATIVE = 'SEEK_RELATIVE'
SEEK_ABSOLUTE = 'SEEK_ABSOLUTE'
SEEK_PERCENTAGE = 'SEEK_PERCENTAGE'
-------------------------------------------------------------------------
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