Author: duncan Date: Fri Oct 27 12:06:39 2006 New Revision: 8480 Modified: branches/rel-1/freevo/RELEASE_NOTES branches/rel-1/freevo/freevo_config.py branches/rel-1/freevo/local_conf.py.example branches/rel-1/freevo/src/plugins/weather.py branches/rel-1/freevo/src/tv/ivtv.py
Log: Merged changes from rel-1-6 Modified: branches/rel-1/freevo/RELEASE_NOTES ============================================================================== --- branches/rel-1/freevo/RELEASE_NOTES (original) +++ branches/rel-1/freevo/RELEASE_NOTES Fri Oct 27 12:06:39 2006 @@ -20,6 +20,20 @@ elementtree, include in Python-2.5+, is now a prerequisite for freevo, if can be downloaded from http://effbot.org/zone/elementtree.htm +idlebar and headlines plug-ins are now enabled by default, you will need +to remove the following plug-ins from local_conf.py: + +plugin.activate('headlines', level=XX) +plugin.activate('idlebar') +plugin.activate('idlebar.tv', level=20) +plugin.activate('idlebar.cdstatus', level=25) +plugin.activate('idlebar.diskfree', level=30) +plugin.activate('idlebar.clock', level=50, args='%a %d %H:%M') + +If you don't like and of these plug-ins the can be deactivated by: +plugin.remove('<plug-in name>') + + Known Problems -------------- Modified: branches/rel-1/freevo/freevo_config.py ============================================================================== --- branches/rel-1/freevo/freevo_config.py (original) +++ branches/rel-1/freevo/freevo_config.py Fri Oct 27 12:06:39 2006 @@ -108,7 +108,7 @@ # of the config file doesn't match, Freevo won't start. If the minor version # is different, there will be only a warning -LOCAL_CONF_VERSION = 5.16 +LOCAL_CONF_VERSION = 5.16 # Description of changes in each new version FREEVO_CONF_CHANGES = [ @@ -276,20 +276,20 @@ # General freevo settings: # ====================================================================== -AUDIO_DEVICE = '/dev/dsp' # e.g.: /dev/dsp0, /dev/audio, /dev/alsa/? -AUDIO_INPUT_DEVICE = '/dev/dsp1' # e.g.: /dev/dsp0, /dev/audio, /dev/alsa/? -MAJOR_AUDIO_CTRL = 'VOL' # Freevo takes control over one audio ctrl +AUDIO_DEVICE = '/dev/dsp' # e.g.: /dev/dsp0, /dev/audio, /dev/alsa/? +AUDIO_INPUT_DEVICE = '/dev/dsp1' # e.g.: /dev/dsp0, /dev/audio, /dev/alsa/? +MAJOR_AUDIO_CTRL = 'VOL' # Freevo takes control over one audio ctrl # 'VOL', 'PCM' 'OGAIN' etc. -CONTROL_ALL_AUDIO = 1 # Should Freevo take complete control of audio -MAX_VOLUME = 90 # Set what you want maximum volume level to be. -DEFAULT_VOLUME = 40 # Set default volume level. -TV_IN_VOLUME = 60 # Set this to your preferred level 0-100. -VCR_IN_VOLUME = 90 # If you use different input from TV -DEV_MIXER = '/dev/mixer' # mixer device +CONTROL_ALL_AUDIO = 1 # Should Freevo take complete control of audio +MAX_VOLUME = 90 # Set what you want maximum volume level to be. +DEFAULT_VOLUME = 40 # Set default volume level. +TV_IN_VOLUME = 60 # Set this to your preferred level 0-100. +VCR_IN_VOLUME = 90 # If you use different input from TV +DEV_MIXER = '/dev/mixer' # mixer device -START_FULLSCREEN_X = 0 # Start in fullscreen mode if using x11 or xv. +START_FULLSCREEN_X = 0 # Start in fullscreen mode if using x11 or xv. -CONFIRM_SHUTDOWN = 1 # ask before shutdown +CONFIRM_SHUTDOWN = 1 # ask before shutdown # # Physical ROM drives, multiple ones can be specified @@ -356,7 +356,7 @@ # CONFIRM_SHUTDOWN # Set to True to popup dialog boxes for confirmation. # this applies to menu items only. -AUTOSHUTDOWN_CONFIRM = True +AUTOSHUTDOWN_CONFIRM=True # -- autoshutdown timer configuration -- @@ -374,7 +374,7 @@ # PRETEND # Set to True to disable the actual shutdown command. -AUTOSHUTDOWN_PRETEND = False +AUTOSHUTDOWN_PRETEND=False # PROCESS_LIST # List the processes that will prevent an automatic @@ -460,7 +460,7 @@ # up with the rtc alarm that nvram-wakeup sets. The # boot loader options should be set too. Read the # nvram-wakeup documentation about this topic. -AUTOSHUTDOWN_BIOS_NEEDS_REBOOT = True +AUTOSHUTDOWN_BIOS_NEEDS_REBOOT=True # -- if the bios needs a reboot -- @@ -586,7 +586,7 @@ # # WARNING: you should not run 'freevo cache' when freevo is running. # -MEDIAINFO_USE_MEMORY = 1 +MEDIAINFO_USE_MEMORY = 1 # # Cache images. This uses a lot of disc space but it's a huge speed @@ -716,10 +716,10 @@ # Idlebar and plugins # ====================================================================== plugin.activate('idlebar') -plugin.activate('idlebar.tv', level = 20) -plugin.activate('idlebar.cdstatus', level = 25) -plugin.activate('idlebar.diskfree', level = 30) -plugin.activate('idlebar.clock', level = 50, args='%a %d %H:%M') +plugin.activate('idlebar.tv', level=20) +plugin.activate('idlebar.cdstatus', level=25) +plugin.activate('idlebar.diskfree', level=30) +plugin.activate('idlebar.clock', level=50, args='%a %d %H:%M') # ====================================================================== # Headlines @@ -785,7 +785,7 @@ # Format string for the audio item names. # # Possible strings: -# a = artist, n = tracknumber, t = title, y = year, f = filename +# a=artist, n=tracknumber, t=title, y=year, f=filename # # Example: # This will show the title and the track number: @@ -817,23 +817,23 @@ # Make all items a playlist. So when one is finished, the next one will # start. It's also possible to browse through the list with UP and DOWN # -DIRECTORY_CREATE_PLAYLIST = [ 'audio', 'image' ] +DIRECTORY_CREATE_PLAYLIST = [ 'audio', 'image' ] # # Add playlist files ('m3u') to the directory # -DIRECTORY_ADD_PLAYLIST_FILES = [ 'audio', 'image' ] +DIRECTORY_ADD_PLAYLIST_FILES = [ 'audio', 'image' ] # # Add the item 'Random Playlist' to the directory # -DIRECTORY_ADD_RANDOM_PLAYLIST = [ 'audio' ] +DIRECTORY_ADD_RANDOM_PLAYLIST = [ 'audio' ] # # Make 'Play' not 'Browse' the default action when only items and not # subdirectories are in the directory # -DIRECTORY_AUTOPLAY_ITEMS = [ ] +DIRECTORY_AUTOPLAY_ITEMS = [ ] # ====================================================================== @@ -924,7 +924,7 @@ # The list of filename suffixes that are used to match the files that # are played as audio. # -AUDIO_SUFFIX = [ 'mp3', 'ogg', 'wav','m4a', 'wma', 'aac', 'flac', 'mka','ac3' ] +AUDIO_SUFFIX = [ 'mp3', 'ogg', 'wav','m4a', 'wma', 'aac', 'flac', 'mka','ac3' ] # # Regular expression used to recognize filenames which are likely to be @@ -1033,8 +1033,7 @@ # NEW GAMES SYSTEM : # ================= # The GAMES_ITEMS structure is now build as follows : -# <NAME>, <FOLDER>, (<TYPE>, <COMMAND_PATH>, <COMMAND_ARGS>, <IMAGE_PATH>, \ -# [<FILE_SUFFIX_FOR_GENERIC>]) +# <NAME>, <FOLDER>, (<TYPE>, <COMMAND_PATH>, <COMMAND_ARGS>, <IMAGE_PATH>, [<FILE_SUFFIX_FOR_GENERIC>]) # where : # - <TYPE> : Internal game types (MAME or SNES) or # generic one (GENERIC) @@ -1043,16 +1042,18 @@ # - <IMAGE_PATH> : Optionnal path to the picture # - <FILE_SUFFIX_FOR_GENERIC> : If the folder use the GENERIC # type, then you must specify here -# the file suffix used by the emulator -# GAMES_ITEMS = [ ('MAME', '/home/media/games/xmame/roms', -# ('MAME', '/usr/local/bin/xmame.SDL', '-fullscreen -modenumber 6', -# '/home/media/games/xmame/shots', None)), -# ('SUPER NINTENDO', '/home/media/games/snes/roms', -# ('SNES', '/usr/local/bin/zsnes', '-m -r 3 -k 100 -cs -u', '', None )), -# ('Visual Boy Advance', '/home/media/games/vba/roms/', -# ('GENERIC', '/usr/local/vba/VisualBoyAdvance', ' ', '', [ 'gba' ] )), -# ('MEGADRIVE', '/home/media/games/megadrive/roms', -# ('GENESIS', '/usr/local/bin/generator-svgalib', '', '', '' )) ] +# the file suffix used by the emulator +# GAMES_ITEMS = [ +# ('MAME', '/home/media/games/xmame/roms', +# ('MAME', '/usr/local/bin/xmame.SDL', '-fullscreen -modenumber 6', +# '/home/media/games/xmame/shots', None)), +# ('SUPER NINTENDO', '/home/media/games/snes/roms', +# ('SNES', '/usr/local/bin/zsnes', '-m -r 3 -k 100 -cs -u', '', None )), +# ('Visual Boy Advance', '/home/media/games/vba/roms/', +# ('GENERIC', '/usr/local/vba/VisualBoyAdvance', ' ', '', [ 'gba' ] )), +# ('MEGADRIVE', '/home/media/games/megadrive/roms', +# ('GENESIS', '/usr/local/bin/generator-svgalib', '', '', '' )) +# ] GAMES_ITEMS = None @@ -1065,7 +1066,7 @@ # >0 - Lower priority # <0 - Higher priority # -GAMES_NICE = -20 +GAMES_NICE = -20 # # MAME cache directory @@ -1121,7 +1122,7 @@ # # System Path to search for fonts not included in the Freevo distribution # -OSD_EXTRA_FONT_PATH = [ '/usr/X11R6/lib/X11/fonts/truetype/' ] +OSD_EXTRA_FONT_PATH = [ '/usr/X11R6/lib/X11/fonts/truetype/' ] # # Font aliases @@ -1252,28 +1253,27 @@ MPLAYER_CMD = CONF.mplayer -MPLAYER_AO_DEV = 'oss:/dev/dsp' # e.g.: oss,sdl,alsa, see mplayer docs +MPLAYER_AO_DEV = 'oss:/dev/dsp' # e.g.: oss,sdl,alsa, see mplayer docs if CONF.display == 'x11': - MPLAYER_VO_DEV = 'xv,sdl,x11,' # X11 drivers in order of preference + MPLAYER_VO_DEV = 'xv,sdl,x11,' # X11 drivers in order of preference else: - MPLAYER_VO_DEV = CONF.display # e.g.: x11,mga,fbdev, see mplayer docs + MPLAYER_VO_DEV = CONF.display # e.g.: x11,mga,fbdev, see mplayer docs -MPLAYER_VO_DEV_OPTS = '' # e.g.: ':some_var=vcal' +MPLAYER_VO_DEV_OPTS = '' # e.g.: ':some_var=vcal' -DVD_LANG_PREF = 'en,se,no' # Order of preferred languages on DVD. -DVD_SUBTITLE_PREF = '' # Order of preferred subtitles on DVD. +DVD_LANG_PREF = 'en,se,no' # Order of preferred languages on DVD. +DVD_SUBTITLE_PREF = '' # Order of preferred subtitles on DVD. # Priority of mplayer process. 0 is unchanged, <0 is higher prio, >0 lower prio. # prio <0 has no effect unless run as root. -MPLAYER_NICE = -20 +MPLAYER_NICE = -20 if CONF.display in ( 'directfb', 'dfbmga' ): - MPLAYER_ARGS_DEF = ('-autosync 100 -nolirc ' + - '-autoq 100 -fs ') + MPLAYER_ARGS_DEF = ('-autosync 100 -nolirc -autoq 100 -fs ') else: - MPLAYER_ARGS_DEF = (('-autosync 100 -nolirc -autoq 100 -screenw %s ' - + '-screenh %s -fs') % (CONF.width, CONF.height)) + MPLAYER_ARGS_DEF = (('-autosync 100 -nolirc -autoq 100 -screenw %s ' + + '-screenh %s -fs') % (CONF.width, CONF.height)) # @@ -1333,12 +1333,12 @@ # # Mplayer video filter for interlaced or progressive videos. If you have # a slow pc, do not use post processing -# MPLAYER_VF_INTERLACED = '' +# MPLAYER_VF_INTERLACED = '' # MPLAYER_VF_PROGRESSIVE = 'pp=fd' # For pal and dvb-t recordings, the following looks good -# MPLAYER_VF_INTERLACED = 'pp=md/de,phase=U' +# MPLAYER_VF_INTERLACED = 'pp=md/de,phase=U' # -MPLAYER_VF_INTERLACED = 'pp=de/fd' +MPLAYER_VF_INTERLACED = 'pp=de/fd' MPLAYER_VF_PROGRESSIVE = 'pp=de' # default to XINE_VO/AO_DEV: @@ -1356,20 +1356,20 @@ XINE_COMMAND = '' if CONF.display in ('mga', 'fbdev') and CONF.fbxine: - XINE_VO_DEV = 'vidixfb' + XINE_VO_DEV = 'vidixfb' XINE_COMMAND = CONF.fbxine if CONF.display == 'dxr3' and CONF.fbxine: - XINE_VO_DEV = 'dxr3' + XINE_VO_DEV = 'dxr3' XINE_COMMAND = CONF.fbxine if CONF.display == 'x11' and CONF.xine: - XINE_VO_DEV = 'xv' + XINE_VO_DEV = 'xv' XINE_COMMAND = '%s --hide-gui -pq -g -B --geometry %sx%s+0+0 --no-splash' % \ (CONF.xine, CONF.width, CONF.height) if CONF.display in ('dfbmga', 'directfb') and CONF.df_xine: - XINE_VO_DEV = '' + XINE_VO_DEV = '' XINE_COMMAND = CONF.df_xine XINE_ARGS_DEF = "--no-lirc --post='pp:quality=10;expand'" @@ -1384,7 +1384,7 @@ # default to XINE_VO/AO_DEV: XINE_TV_VO_DEV = None XINE_TV_AO_DEV = None -XINE_TV_TIMESHIFT_FILEMASK = "/you must set XINE_TV_TIMESHIFT_FILEMASK in your local_conf.py" +XINE_TV_TIMESHIFT_FILEMASK = "you must set XINE_TV_TIMESHIFT_FILEMASK in your local_conf.py" # ====================================================================== # Freevo TV settings: Modified: branches/rel-1/freevo/local_conf.py.example ============================================================================== --- branches/rel-1/freevo/local_conf.py.example (original) +++ branches/rel-1/freevo/local_conf.py.example Fri Oct 27 12:06:39 2006 @@ -314,7 +314,7 @@ # # WARNING: you should not run 'freevo cache' when freevo is running. # -# MEDIAINFO_USE_MEMORY = 1 +# MEDIAINFO_USE_MEMORY = 1 # # Cache images. This uses a lot of disc space but it's a huge speed @@ -353,6 +353,23 @@ # Enable this for joystick support: # plugin.activate('joy') + +# ====================================================================== +# Headlines +# +# You are free to use any rss feeds in the HEADLINES_LOCATIONS below +# These are just working examples for the Freevo feeds. +# To turn off Headlines add plugin.remove('headlines') +# ====================================================================== +#plugin.activate('headlines', level=45) +#HEADLINES_LOCATIONS = [ +# ('Freevo news releases', 'http://sourceforge.net/export/rss2_projnews.php?group_id=46652'), +# ('Freevo file releases', 'http://sourceforge.net/export/rss2_projfiles.php?group_id=46652'), +# ('Freevo summary+stats', 'http://sourceforge.net/export/rss2_projsummary.php?group_id=46652'), +# ('Freevo donors', 'http://sourceforge.net/export/rss2_projdonors.php?group_id=46652'), +#] + + # ====================================================================== # Freevo directory settings: # ====================================================================== @@ -405,7 +422,7 @@ # Format string for the audio item names. # # Possible strings: -# a = artist, n = tracknumber, t = title, y = year, f = filename +# a=artist, n=tracknumber, t=title, y=year, f=filename # # Example: # This will show the title and the track number: @@ -436,20 +453,20 @@ # Make all items a playlist. So when one is finished, the next one will # start. It's also possible to browse through the list with UP and DOWN # -# DIRECTORY_CREATE_PLAYLIST = [ 'audio', 'image' ] +# DIRECTORY_CREATE_PLAYLIST = [ 'audio', 'image' ] # Add playlist files ('m3u') to the directory # -# DIRECTORY_ADD_PLAYLIST_FILES = [ 'audio', 'image' ] +# DIRECTORY_ADD_PLAYLIST_FILES = [ 'audio', 'image' ] # Add the item 'Random Playlist' to the directory # -# DIRECTORY_ADD_RANDOM_PLAYLIST = [ 'audio' ] +# DIRECTORY_ADD_RANDOM_PLAYLIST = [ 'audio' ] # Make 'Play' not 'Browse' the default action when only items and not # subdirectories are in the directory # -# DIRECTORY_AUTOPLAY_ITEMS = [ ] +# DIRECTORY_AUTOPLAY_ITEMS = [ ] # ====================================================================== @@ -519,7 +536,7 @@ # The list of filename suffixes that are used to match the files that # are played as audio. # -# AUDIO_SUFFIX = [ 'mp3', 'ogg', 'wav','m4a', 'wma', 'aac', 'flac', 'mka' ] +# AUDIO_SUFFIX = [ 'mp3', 'ogg', 'wav','m4a', 'wma', 'aac', 'flac', 'mka' ] # # Regular expression used to recognize filenames which are likely to be @@ -553,7 +570,7 @@ # The list of filename suffixes that are used to match the files that # are used for the image viewer. # -# IMAGE_SUFFIX = [ 'jpg','gif','png', 'jpeg','bmp','tiff','psd' ] +# IMAGE_SUFFIX = [ 'jpg','gif','png','jpeg','bmp','tiff','psd' ] # # The viewer now supports a new type of menu entry, a slideshow file. @@ -603,15 +620,17 @@ # - <FILE_SUFFIX_FOR_GENERIC> : If the folder use the GENERIC # type, then you must specify here # the file suffix used by the emulator -# GAMES_ITEMS = [ ('MAME', '/home/media/games/xmame/roms', -# ('MAME', '/usr/local/bin/xmame.SDL', '-fullscreen -modenumber 6', -# '/home/media/games/xmame/shots', None)), -# ('SUPER NINTENDO', '/home/media/games/snes/roms', -# ('SNES', '/usr/local/bin/zsnes', '-m -r 3 -k 100 -cs -u', '', None )), -# ('Visual Boy Advance', '/home/media/games/vba/roms/', -# ('GENERIC', '/usr/local/vba/VisualBoyAdvance', ' ', '', [ 'gba' ] )), -# ('MEGADRIVE', '/home/media/games/megadrive/roms', -# ('GENESIS', '/usr/local/bin/generator-svgalib', '', '', '' )) ] +# GAMES_ITEMS = [ +# ('MAME', '/home/media/games/xmame/roms', +# ('MAME', '/usr/local/bin/xmame.SDL', '-fullscreen -modenumber 6', +# '/home/media/games/xmame/shots', None)), +# ('SUPER NINTENDO', '/home/media/games/snes/roms', +# ('SNES', '/usr/local/bin/zsnes', '-m -r 3 -k 100 -cs -u', '', None )), +# ('Visual Boy Advance', '/home/media/games/vba/roms/', +# ('GENERIC', '/usr/local/vba/VisualBoyAdvance', ' ', '', [ 'gba' ] )), +# ('MEGADRIVE', '/home/media/games/megadrive/roms', +# ('GENESIS', '/usr/local/bin/generator-svgalib', '', '', '' )) +# ] # # GAMES_ITEMS = None @@ -666,7 +685,7 @@ # # System Path to search for fonts not included in the Freevo distribution # -# OSD_EXTRA_FONT_PATH = [ '/usr/X11R6/lib/X11/fonts/truetype/' ] +# OSD_EXTRA_FONT_PATH = [ '/usr/X11R6/lib/X11/fonts/truetype/' ] # # Font aliases @@ -768,16 +787,16 @@ # MPlayer settings: # ====================================================================== -# MPLAYER_AO_DEV = 'oss:/dev/dsp' # e.g.: oss,sdl,alsa, see mplayer docs +# MPLAYER_AO_DEV = 'oss:/dev/dsp' # e.g.: oss,sdl,alsa, see mplayer docs -# MPLAYER_VO_DEV_OPTS = '' # e.g.: ':some_var=vcal' +# MPLAYER_VO_DEV_OPTS = '' # e.g.: ':some_var=vcal' -# DVD_LANG_PREF = 'en,se,no' # Order of preferred languages on DVD. -# DVD_SUBTITLE_PREF = '' # Order of preferred subtitles on DVD. +# DVD_LANG_PREF = 'en,se,no' # Order of preferred languages on DVD. +# DVD_SUBTITLE_PREF = '' # Order of preferred subtitles on DVD. # Priority of mplayer process. 0 is unchanged, <0 is higher prio, >0 lower prio. # prio <0 has no effect unless run as root. -# MPLAYER_NICE = -20 +# MPLAYER_NICE = -20 # # Mplayer options to use the software scaler. If your CPU is fast enough, you @@ -911,7 +930,7 @@ # europe-east, italy, newzealand, australia, ireland, france, china-bcast, # southafrica, argentina, canada-cable, russia # -# TV_SETTINGS = 'NORM INPUT CHANLIST DEVICE' +# TV_SETTINGS = 'NORM INPUT CHANLIST DEVICE' # # Video input device @@ -1213,8 +1232,10 @@ # # Username / Password combinations to login to the web interface. # -# WWW_USERS = { "user1" : "changeme", -# "optional" : "changeme2" } +# WWW_USERS = { +# "user1" : "changeme", +# "optional" : "changeme2" +# } # # @@ -1275,10 +1296,13 @@ # LOCALE='latin-1' -# Idlebar with clock and system info is nice +# ====================================================================== +# Idlebar and plugins +# +# These are the default idlebar settings, there are many more see: +# freevo plugins -l for a complete list +# To turn off use plugin.remove('idlebar.cdstatus') # -# plugin.activate('idlebar') - # clock display # %A - Full weekday name. # %a - Abbreviated weekday name. @@ -1293,9 +1317,12 @@ # %p - Locale's equivalent of either AM or PM. # %y - Year without century as a decimal number [00,99]. # %Y - Year with century as a decimal number. -# plugin.activate( 'idlebar.clock', level=50, args=('%a %H:%M')) +# ====================================================================== +# plugin.activate('idlebar') +# plugin.activate('idlebar.tv', level = 20) +# plugin.activate('idlebar.cdstatus', level = 25) +# plugin.activate('idlebar.diskfree', level = 30) +# plugin.activate('idlebar.clock', level = 50, args='%a %d %H:%M') # # display proc-stats, CPU and RAM usage # plugin.activate('idlebar.system.procstats',level=20) - -# plugin.activate( 'idlebar.diskfree', level=10) Modified: branches/rel-1/freevo/src/plugins/weather.py ============================================================================== --- branches/rel-1/freevo/src/plugins/weather.py (original) +++ branches/rel-1/freevo/src/plugins/weather.py Fri Oct 27 12:06:39 2006 @@ -98,17 +98,26 @@ pass def toCelcius(fTemp): - tTemp = float ( fTemp ) + try: + tTemp = float ( fTemp ) + except ValueError: + tTemp = 0.0 nTemp = (5.0/9.0)*(tTemp - 32.0) return "%d" % (nTemp,) def toKilometers(miles): - tTemp = float( miles ) + try: + tTemp = float( miles ) + except ValueError: + tTemp = 0.0 nTemp = tTemp*1.6 return "%d" % ( int(nTemp),) def toBarometer( baro ): - tTemp = float( baro ) + try: + tTemp = float( baro ) + except ValueError: + tTemp = 0.0 nTemp = tTemp*3.386 return "%.1f" % (nTemp,) Modified: branches/rel-1/freevo/src/tv/ivtv.py ============================================================================== --- branches/rel-1/freevo/src/tv/ivtv.py (original) +++ branches/rel-1/freevo/src/tv/ivtv.py Fri Oct 27 12:06:39 2006 @@ -156,17 +156,25 @@ def getvbiembed(self): if self.version >= 0x800: return - r = fcntl.ioctl(self.device, i32(GETVBI_EMBED_NO), struct.pack(VBI_EMBED_ST,0)) - if DEBUG >= 3: - print "getvbiembed: val=%r, r=%r, res=%r" % (struct.pack(VBI_EMBED_ST,0), r, struct.unpack(VBI_EMBED_ST,r)) - return struct.unpack(VBI_EMBED_ST,r)[0] + try: + r = fcntl.ioctl(self.device, i32(GETVBI_EMBED_NO), struct.pack(VBI_EMBED_ST,0)) + if DEBUG >= 3: + print "getvbiembed: val=%r, r=%r, res=%r" % (struct.pack(VBI_EMBED_ST,0), r, + struct.unpack(VBI_EMBED_ST,r)) + return struct.unpack(VBI_EMBED_ST,r)[0] + except IOError: + print 'getvbiembed: failed' + return 0 def setvbiembed(self, value): if self.version >= 0x800: return - r = fcntl.ioctl(self.device, i32(SETVBI_EMBED_NO), struct.pack(VBI_EMBED_ST, value)) - if DEBUG: print "setvbiembed: val=%r, res=%r" % (struct.pack(VBI_EMBED_ST, value), r) + try: + r = fcntl.ioctl(self.device, i32(SETVBI_EMBED_NO), struct.pack(VBI_EMBED_ST, value)) + if DEBUG >= 3: print "setvbiembed: val=%r, res=%r" % (struct.pack(VBI_EMBED_ST, value), r) + except IOError: + print 'setvbiembed: failed' def gopend(self, value): @@ -263,6 +271,8 @@ if __name__ == '__main__': + DEBUG = 1 + ivtv_dev = IVTV('/dev/video0') print 'driver="%s"' % ivtv_dev.driver print 'version=%x' % ivtv_dev.version ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Freevo-cvslog mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freevo-cvslog
