Author: duncan
Date: Wed Oct 11 08:37:57 2006
New Revision: 8347

Modified:
   branches/rel-1-5/freevo/freevo_config.py
   branches/rel-1-5/freevo/local_conf.py.example
   branches/rel-1-5/freevo/src/config.py
   branches/rel-1-5/freevo/src/tv/channels.py
   branches/rel-1-5/freevo/src/tv/plugins/mplayer.py
   branches/rel-1-5/freevo/src/tv/plugins/tvtime.py
   branches/rel-1-5/freevo/src/tv/plugins/xawtv.py

Log:
Changed video groups from player to record_group
Replaced evil tabs and removed old cvs logs


Modified: branches/rel-1-5/freevo/freevo_config.py
==============================================================================
--- branches/rel-1-5/freevo/freevo_config.py    (original)
+++ branches/rel-1-5/freevo/freevo_config.py    Wed Oct 11 08:37:57 2006
@@ -1533,7 +1533,7 @@
                tuner_norm=CONF.tv,
                tuner_chanlist=CONF.chanlist,
                desc='Default Video Group',
-               player=None),
+               record_group=None),
 ]
 
 #

Modified: branches/rel-1-5/freevo/local_conf.py.example
==============================================================================
--- branches/rel-1-5/freevo/local_conf.py.example       (original)
+++ branches/rel-1-5/freevo/local_conf.py.example       Wed Oct 11 08:37:57 2006
@@ -1064,13 +1064,22 @@
 # channels use different Video Groups.
 
 # VIDEO_GROUPS = [
+#     # Use this group for watching tv
 #     VideoGroup(vdev=TV_DEVICE,
 #                adev=AUDIO_DEVICE,
 #                input_type='tuner',
 #                tuner_norm=CONF.tv,
 #                tuner_chanlist=CONF.chanlist,
-#                desc='Default Video Group',
-#                recordable=True),
+#                desc='Watching Video Group',
+#                record_group=1),
+#     # Use this group for recording tv
+#     VideoGroup(vdev='/dev/video1',
+#                adev=AUDIO_DEVICE,
+#                input_type='tuner',
+#                tuner_norm=CONF.tv,
+#                tuner_chanlist=CONF.chanlist,
+#                desc='Recording Video Group',
+#                record_group=None),
 # ]
 
 

Modified: branches/rel-1-5/freevo/src/config.py
==============================================================================
--- branches/rel-1-5/freevo/src/config.py       (original)
+++ branches/rel-1-5/freevo/src/config.py       Wed Oct 11 08:37:57 2006
@@ -121,25 +121,25 @@
 
 class VideoGroup:
     """
-    vdev:        The video recording device, such as /dev/video0.
-    adev:        The audio device, such as /dev/dsp.
-    input_type:  tuner, composite, svideo, webcam
-    input_num:   The number of this input according to V4L
-    tuner_type:  internal (on a v4l device), or external (cable or sat box)
-    tuner_norm:  NTSC, PAL, SECAM
+    vdev:         The video recording device, such as /dev/video0.
+    adev:         The audio device, such as /dev/dsp.
+    input_type:   tuner, composite, svideo, webcam
+    input_num:    The number of this input according to V4L
+    tuner_type:   internal (on a v4l device), or external (cable or sat box)
+    tuner_norm:   NTSC, PAL, SECAM
     tuner_chanlist:  us-cable, 
-    tuner_chan:  If using input_type=tuner and tuner_type=external set this to
-                 what channel it needs to be to get the signal, usually 3 or 4.
-    player:      VideoGroup that plays for this tuner, default is to use the 
same device for record and play
-    desc:        A nice description for this VideoGroup.
-    group_type:  Special variable to identify devices like dvb or ivtv.  This
-                 can be left as default, 'normal', or set to 'ivtv' or 'dvb'.
+    tuner_chan:   If using input_type=tuner and tuner_type=external set this to
+                  what channel it needs to be to get the signal, usually 3 or 
4.
+    record_group: VideoGroup that records for this tuner, default is to use 
the same device for record and play
+    desc:         A nice description for this VideoGroup.
+    group_type:   Special variable to identify devices like dvb or ivtv.  This
+                  can be left as default, 'normal', or set to 'ivtv' or 'dvb'.
     """
 
     def __init__(self, vdev='/dev/video', adev='/dev/dsp', input_type='tuner',
                  input_num=0, tuner_norm='NTSC', tuner_chanlist='us-cable', 
                  tuner_type='internal', tuner_chan=None,
-                 player=None, desc='Freevo default VideoGroup',
+                 record_group=None, desc='Freevo default VideoGroup',
                  group_type='normal'):
 
         # XXX: Put checks in here for supplied values.
@@ -151,7 +151,7 @@
         self.tuner_norm = string.upper(tuner_norm)
         self.tuner_chanlist = tuner_chanlist
         self.tuner_chan = tuner_chan
-        self.player = player
+        self.record_group = record_group
         self.desc = desc
         self.group_type = group_type
         self.in_use = FALSE

Modified: branches/rel-1-5/freevo/src/tv/channels.py
==============================================================================
--- branches/rel-1-5/freevo/src/tv/channels.py  (original)
+++ branches/rel-1-5/freevo/src/tv/channels.py  Wed Oct 11 08:37:57 2006
@@ -8,17 +8,6 @@
 # Todo:        
 #
 # -----------------------------------------------------------------------
-# $Log$
-# Revision 1.19  2004/07/11 12:33:29  dischi
-# no tuner id is ok for dvb
-#
-# Revision 1.18  2004/07/10 12:33:41  dischi
-# header cleanup
-#
-# Revision 1.17  2004/03/05 04:04:10  rshortt
-# Only call setChannel on an external tuner plugin if we really have one.
-#
-# -----------------------------------------------------------------------
 # Freevo - A Home Theater PC framework
 # Copyright (C) 2003 Krister Lagerstrom, et al. 
 # Please see the file freevo/Docs/CREDITS for a complete list of authors.
@@ -56,25 +45,25 @@
 #               input_type='tuner',
 #               tuner_type='external',
 #               tuner_chan='3',
-#               desc='Bell ExpressVu',
-#               player=1),
+#               desc='Bell ExpressVu (for playing)',
+#               record_group=1),
 #    VideoGroup(vdev='/dev/video1',
 #               adev=None,
 #               input_type='tuner',
 #               tuner_type='external',
 #               tuner_chan='3',
-#               desc='Bell ExpressVu (second card)',
-#               player=None),
+#               desc='Bell ExpressVu (for recording)',
+#               record_group=None),
 #    VideoGroup(vdev='/dev/video2',
 #               adev='/dev/dsp1',
 #               input_type='tuner',
-#               desc='ATI TV-Wonder',
-#               player=None),
+#               desc='ATI TV-Wonder (both playing and recording)',
+#               record_group=None),
 #    VideoGroup(vdev='/dev/video3',
 #               adev=None,
 #               input_type='webcam',
 #               desc='Logitech Quickcam',
-#               player=None),
+#               record_group=None),
 #]
 
 class FreevoChannels:
@@ -87,7 +76,7 @@
             plugin.init_special_plugin(config.plugin_external_tuner)
 
 
-    def getVideoGroup(self, chan, player):
+    def getVideoGroup(self, chan, isplayer):
         """
         Gets the VideoGroup object used by this Freevo channel.
         """
@@ -102,34 +91,36 @@
                         group = int(chan_info[4])
                     except: # XXX: put a better exception here
                         group = 0
-            if player:
-                play_group = config.VIDEO_GROUPS[group].player
-                if play_group:
+            if not isplayer:
+                record_group = config.VIDEO_GROUPS[group].record_group
+                if record_group:
                     try:
-                        group = int(play_group)
+                        # some simple checks
+                        group = int(record_group)
+                        record_vg = config.VIDEO_GROUPS[group]
                     except:
-                        print 'VIDEO_GROUPS[%s].player=%s is invalid' % 
(group, play_group)
+                        print 'VIDEO_GROUPS[%s].record_group=%s is invalid' % 
(group, record_group)
         finally:
             self.lock.release()
 
         return config.VIDEO_GROUPS[group]
 
 
-    def chanUp(self, player, app=None, app_cmd=None):
+    def chanUp(self, isplayer, app=None, app_cmd=None):
         """
         Using this method will not support custom frequencies.
         """
-        return self.chanSet(self.getNextChannel(), player, app, app_cmd)
+        return self.chanSet(self.getNextChannel(), isplayer, app, app_cmd)
 
 
-    def chanDown(self, player, app=None, app_cmd=None):
+    def chanDown(self, isplayer, app=None, app_cmd=None):
         """
         Using this method will not support custom frequencies.
         """
-        return self.chanSet(self.getPrevChannel(), player, app, app_cmd)
+        return self.chanSet(self.getPrevChannel(), isplayer, app, app_cmd)
 
 
-    def chanSet(self, chan, player, app=None, app_cmd=None):
+    def chanSet(self, chan, isplayer, app=None, app_cmd=None):
         new_chan = None
 
         for pos in range(len(config.TV_CHANNELS)):
@@ -143,7 +134,7 @@
                         (_('Cannot find tuner channel "%s" in the TV channel 
listing') % chan))
             return
 
-        vg = self.getVideoGroup(new_chan, player)
+        vg = self.getVideoGroup(new_chan, isplayer)
 
         if vg.tuner_type == 'external':
             tuner = plugin.getbyname('EXTERNAL_TUNER')
@@ -157,14 +148,14 @@
             return 0
 
         else:
-            return self.tunerSetFreq(chan, player, app, app_cmd)
+            return self.tunerSetFreq(chan, isplayer, app, app_cmd)
 
         return 0
 
 
-    def tunerSetFreq(self, chan, player, app=None, app_cmd=None):
+    def tunerSetFreq(self, chan, isplayer, app=None, app_cmd=None):
         chan = str(chan)
-        vg = self.getVideoGroup(chan, player)
+        vg = self.getVideoGroup(chan, isplayer)
 
         freq = config.FREQUENCY_TABLE.get(chan)
         if freq:

Modified: branches/rel-1-5/freevo/src/tv/plugins/mplayer.py
==============================================================================
--- branches/rel-1-5/freevo/src/tv/plugins/mplayer.py   (original)
+++ branches/rel-1-5/freevo/src/tv/plugins/mplayer.py   Wed Oct 11 08:37:57 2006
@@ -8,32 +8,6 @@
 # Todo:        
 #
 # -----------------------------------------------------------------------
-# $Log$
-# Revision 1.38  2004/07/11 11:32:47  dischi
-# move mplayer dvb args to config
-#
-# Revision 1.37  2004/07/10 12:33:42  dischi
-# header cleanup
-#
-# Revision 1.36  2004/07/04 08:15:29  dischi
-# add config.MPLAYER_ARGS_DEF (why was that missing?)
-#
-# Revision 1.35  2004/06/28 17:12:22  dischi
-# reduce cache for dvb
-#
-# Revision 1.34  2004/06/25 20:03:33  dischi
-# basic dvb support
-#
-# Revision 1.33  2004/02/13 17:36:54  dischi
-# fixed crash on stop
-#
-# Revision 1.32  2004/02/05 14:23:50  outlyer
-# Patch from Viggo Fredriksen
-#
-# o Move to ChildApp2 for mplayer TV plugin
-# o Channel changing via the number pad on the remote
-#
-# -----------------------------------------------------------------------
 # Freevo - A Home Theater PC framework
 # Copyright (C) 2002 Krister Lagerstrom, et al. 
 # Please see the file freevo/Docs/CREDITS for a complete list of authors.

Modified: branches/rel-1-5/freevo/src/tv/plugins/tvtime.py
==============================================================================
--- branches/rel-1-5/freevo/src/tv/plugins/tvtime.py    (original)
+++ branches/rel-1-5/freevo/src/tv/plugins/tvtime.py    Wed Oct 11 08:37:57 2006
@@ -8,24 +8,6 @@
 # Todo:        
 #
 # -----------------------------------------------------------------------
-# $Log$
-# Revision 1.38.2.1  2004/12/13 00:05:32  mikeruelle
-# allow for new tvtime not using the -D option anymore
-#
-# Revision 1.38  2004/07/10 12:33:42  dischi
-# header cleanup
-#
-# Revision 1.37  2004/07/08 12:44:40  rshortt
-# Add directfb as a display option.
-#
-# Revision 1.36  2004/06/06 17:15:10  mikeruelle
-# removed some old bad code. mplayer debug has been superceded by childapp 
debug.
-# the kill method is just plain bad.
-#
-# Revision 1.35  2004/05/29 23:01:03  mikeruelle
-# make better use of freevo channels. getting better video group support slowly
-#
-# -----------------------------------------------------------------------
 # Freevo - A Home Theater PC framework
 # Copyright (C) 2002 Krister Lagerstrom, et al. 
 # Please see the file freevo/Docs/CREDITS for a complete list of authors.

Modified: branches/rel-1-5/freevo/src/tv/plugins/xawtv.py
==============================================================================
--- branches/rel-1-5/freevo/src/tv/plugins/xawtv.py     (original)
+++ branches/rel-1-5/freevo/src/tv/plugins/xawtv.py     Wed Oct 11 08:37:57 2006
@@ -5,22 +5,11 @@
 # $Id$
 #
 # Notes:
-# Todo:        
-#
-# -----------------------------------------------------------------------
-# $Log$
-# Revision 1.5  2004/07/10 12:33:42  dischi
-# header cleanup
-#
-# Revision 1.4  2004/06/06 17:18:39  mikeruelle
-# removing unnecessary and bad kill method
-#
-# Revision 1.3  2004/03/21 23:03:23  mikeruelle
-# docs fro devels, this is not for newbs yet
+# Todo:
 #
 # -----------------------------------------------------------------------
 # Freevo - A Home Theater PC framework
-# Copyright (C) 2002 Krister Lagerstrom, et al. 
+# Copyright (C) 2002 Krister Lagerstrom, et al.
 # Please see the file freevo/Docs/CREDITS for a complete list of authors.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -75,8 +64,8 @@
     def __init__(self, app, remote):
         plugin.Plugin.__init__(self)
 
-       #XXX might want to check to see if .xawtv present.
-       # we really don't have much of a prayer if it isn't
+        #XXX might want to check to see if .xawtv present.
+        # we really don't have much of a prayer if it isn't
 
         # create the xawtv object and register it
         plugin.register(Xawtv(app, remote), plugin.TV)
@@ -85,14 +74,14 @@
 
     __muted    = 0
     __igainvol = 0
-    
+
     def __init__(self, app, remote):
         self.tuner_chidx = 0    # Current channel, index into 
config.TV_CHANNELS
         self.app_mode = 'tv'
-       self.fc = FreevoChannels()
+        self.fc = FreevoChannels()
         self.current_vg = None
-       self.xawtv_prog = app
-       self.remote_prog = remote
+        self.xawtv_prog = app
+        self.remote_prog = remote
 
     def TunerSetChannel(self, tuner_channel):
         for pos in range(len(config.TV_CHANNELS)):
@@ -106,7 +95,7 @@
 
     def TunerGetChannelInfo(self):
         '''Get program info for the current channel'''
-        
+
         tuner_id = config.TV_CHANNELS[self.tuner_chidx][2]
         chan_name = config.TV_CHANNELS[self.tuner_chidx][1]
         chan_id = config.TV_CHANNELS[self.tuner_chidx][0]
@@ -121,7 +110,7 @@
             prog_info = '%s %s' % (ts, channels[0].programs[0].title)
         else:
             prog_info = 'No info'
-            
+
         return tuner_id, chan_name, prog_info
 
 
@@ -136,7 +125,7 @@
     def TunerPrevChannel(self):
         self.tuner_chidx = (self.tuner_chidx-1) % len(config.TV_CHANNELS)
 
-        
+
     def Play(self, mode, tuner_channel=None, channel_change=0):
 
         if tuner_channel != None:
@@ -153,26 +142,26 @@
             return
 
         if mode == 'tv' or mode == 'vcr':
-            
+
             w, h = config.TV_VIEW_SIZE
-           cf_norm = vg.tuner_norm
-           cf_input = vg.input_num
-           cf_device = vg.vdev
+            cf_norm = vg.tuner_norm
+            cf_input = vg.input_num
+            cf_device = vg.vdev
 
             s_norm = cf_norm.upper()
 
             if mode == 'vcr':
-               cf_input = '1'
-               if hasattr(config, "TV_VCR_INPUT_NUM") and 
config.TV_VCR_INPUT_NUM:
-                   cf_input = config.TV_VCR_INPUT_NUM
+                cf_input = '1'
+                if hasattr(config, "TV_VCR_INPUT_NUM") and 
config.TV_VCR_INPUT_NUM:
+                    cf_input = config.TV_VCR_INPUT_NUM
 
             if hasattr(config, "TV_XAWTV_OPTS") and config.TV_XAWTV_OPTS:
-               daoptions = config.TV_XAWTV_OPTS
+                daoptions = config.TV_XAWTV_OPTS
             else:
-               daoptions = '-xv -f'
+                daoptions = '-xv -f'
 
             command = '%s %s -device %s ' % (self.xawtv_prog,
-                                            daoptions,
+                                             daoptions,
                                              cf_device)
 
         else:
@@ -195,11 +184,11 @@
             mixer.setPcmVolume(0)
 
         # Start up the TV task
-        self.app=XawtvApp(command, self.remote_prog)        
+        self.app=XawtvApp(command, self.remote_prog)
 
-       if tuner_channel:
-           time.sleep(0.5)
-           self.app.sendcmd('setstation %s' % tuner_channel)
+        if tuner_channel:
+            time.sleep(0.5)
+            self.app.sendcmd('setstation %s' % tuner_channel)
         #XXX use remote to change the input we want
 
         self.prev_app = rc.app()
@@ -213,15 +202,15 @@
         elif mixer:
             mixer.setLineinVolume(config.TV_IN_VOLUME)
             mixer.setIgainVolume(config.TV_IN_VOLUME)
-            
+
         if mixer and config.MAJOR_AUDIO_CTRL == 'VOL':
             mixer.setMainVolume(mixer_vol)
         elif mixer and config.MAJOR_AUDIO_CTRL == 'PCM':
             mixer.setPcmVolume(mixer_vol)
 
         if DEBUG: print '%s: started %s app' % (time.time(), self.mode)
-        
-        
+
+
     def Stop(self, channel_change=0):
         mixer = plugin.getbyname('MIXER')
         if mixer and not channel_change:
@@ -240,41 +229,41 @@
             self.Stop()
             rc.post_event(em.PLAY_END)
             return True
-        
+
         elif event == em.TV_CHANNEL_UP or event == em.TV_CHANNEL_DOWN:
             if self.mode == 'vcr':
                 return
-             
+
             if event == em.TV_CHANNEL_UP:
                 self.TunerPrevChannel()
                 self.app.sendcmd('setstation next')
             else:
                 self.TunerNextChannel()
                 self.app.sendcmd('setstation prev')
-           
+
             return True
-            
+
         elif event == em.TOGGLE_OSD:
-           #try to send channel name
+            #try to send channel name
             self.app.sendcmd('msg \'%s\'' % self.TunerGetChannel())
             return True
-        
+
         elif event == em.OSD_MESSAGE:
             self.app.sendcmd('msg \'%s\'' % event.arg)
             return True
-       
+
         elif event in em.INPUT_ALL_NUMBERS:
             self.app.sendcmd('keypad %s' % event.arg)
-           
+
         elif event == em.BUTTON:
             if event.arg == 'PREV_CH':
                 self.app.sendcmd('setstation back')
                 return True
-               
+
 
         return False
-        
-            
+
+
 
 # ======================================================================
 class XawtvApp(childapp.ChildApp2):

-------------------------------------------------------------------------
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

Reply via email to