Author: duncan
Date: Sat Jun 2 17:52:06 2007
New Revision: 9634
Modified:
branches/rel-1/freevo/freevo_config.py
branches/rel-1/freevo/src/video/configure.py
branches/rel-1/freevo/src/video/plugins/mplayer.py
branches/rel-1/freevo/src/video/videoitem.py
Log:
Made certain autovars optional
We don't need to clutter the menus with unwanted items
Modified: branches/rel-1/freevo/freevo_config.py
==============================================================================
--- branches/rel-1/freevo/freevo_config.py (original)
+++ branches/rel-1/freevo/freevo_config.py Sat Jun 2 17:52:06 2007
@@ -276,6 +276,7 @@
''' ),
(5.20,
'''Added PERSONAL_WWW_PAGE config item to allow private web pages in the
webserver
+ Changed VIDEO_INTERLACING to VIDEO_DEINTERLACE to be more consistent
with autovars
''' ),
]
@@ -979,7 +980,13 @@
#
# try to find out if deinterlacing is needed or not
#
-VIDEO_INTERLACING = 1
+VIDEO_DEINTERLACE = None
+
+# Instruct player to use XVMC for playback
+VIDEO_USE_XVMC = None
+
+# Pass field dominance parameter to MPlayer
+VIDEO_FIELD_DOMINANCE = None
# PRE and POST playing commands. Set these to a runnable command if
# you wish to do something before and after playing a video, like
@@ -1955,8 +1962,3 @@
TIME_DEBUG = 0
-# Instruct player to use XVMC for playback
-USE_XVMC = 0
-
-# Pass field dominance parameter to MPlayer
-FIELD_DOMINANCE = 0
Modified: branches/rel-1/freevo/src/video/configure.py
==============================================================================
--- branches/rel-1/freevo/src/video/configure.py (original)
+++ branches/rel-1/freevo/src/video/configure.py Sat Jun 2 17:52:06 2007
@@ -268,9 +268,14 @@
if item.mode in ('dvd', 'vcd') or \
(item.filename and item.info.has_key('type') and \
item.info['type'] and item.info['type'].lower().find('mpeg') !=
-1):
- items += [ add_toogle(_('Deinterlacing'), item, 'deinterlace') ]
- items += [ add_toogle(_('X-Video Motion Compensation (xvmc)'), item,
'xvmc') ]
- if hasattr(config, 'MPLAYER_HAS_FIELD_DOMINANCE') and
config.MPLAYER_HAS_FIELD_DOMINANCE:
+
+ if hasattr(config, 'VIDEO_DEINTERLACE') and config.VIDEO_DEINTERLACE
!= None:
+ items += [ add_toogle(_('Deinterlacing'), item, 'deinterlace') ]
+
+ if hasattr(config, 'VIDEO_USE_XVMC') and config.VIDEO_USE_XVMC != None:
+ items += [ add_toogle(_('X-Video Motion Compensation (xvmc)'),
item, 'xvmc') ]
+
+ if hasattr(config, 'VIDEO_FIELD_DOMINANCE') and
config.VIDEO_FIELD_DOMINANCE != None:
items += [ add_toogle3(_('Turn BOTTOM field first'), item,
'field-dominance') ]
return items
Modified: branches/rel-1/freevo/src/video/plugins/mplayer.py
==============================================================================
--- branches/rel-1/freevo/src/video/plugins/mplayer.py (original)
+++ branches/rel-1/freevo/src/video/plugins/mplayer.py Sat Jun 2 17:52:06 2007
@@ -205,7 +205,7 @@
elif config.MPLAYER_VF_PROGRESSIVE:
additional_args += [ '-vf', config.MPLAYER_VF_PROGRESSIVE ]
- if hasattr(config, 'MPLAYER_HAS_FIELD_DOMINANCE') and
config.MPLAYER_HAS_FIELD_DOMINANCE:
+ if hasattr(config, 'VIDEO_FIELD_DOMINANCE') and
config.VIDEO_FIELD_DOMINANCE != None:
additional_args += [ '-field-dominance', '%d' %
int(item['field-dominance']) ]
if os.path.isfile(os.path.splitext(item.filename)[0]+'.edl'):
Modified: branches/rel-1/freevo/src/video/videoitem.py
==============================================================================
--- branches/rel-1/freevo/src/video/videoitem.py (original)
+++ branches/rel-1/freevo/src/video/videoitem.py Sat Jun 2 17:52:06 2007
@@ -52,7 +52,14 @@
class VideoItem(Item):
def __init__(self, url, parent, info=None, parse=True):
- self.autovars = [ ('deinterlace', 0), ('xvmc', config.USE_XVMC),
('field-dominance', config.FIELD_DOMINANCE) ]
+ self.autovars = []
+ if config.VIDEO_DEINTERLACE != None:
+ self.autovars.append(('deinterlace', config.VIDEO_DEINTERLACE)
+ if config.VIDEO_USE_XVMC != None:
+ self.autovars.append(('xvmc', config.VIDEO_USE_XVMC)
+ if config.VIDEO_FIELD_DOMINANCE != None:
+ self.autovars.append(('field-dominance',
config.VIDEO_FIELD_DOMINANCE)
+
Item.__init__(self, parent)
self.type = 'video'
@@ -174,7 +181,7 @@
self.image = image
self.files.image = image
- if config.VIDEO_INTERLACING and self.info['interlaced']:
+ if config.VIDEO_DEINTERLACE and self.info['interlaced']:
# force deinterlacing
self['deinterlace'] = 1
else:
-------------------------------------------------------------------------
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