Update of /cvsroot/freevo/freevo/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5065
Modified Files:
config.py
Log Message:
first draft of new tv card setup
Index: config.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/config.py,v
retrieving revision 1.111
retrieving revision 1.112
diff -C2 -d -r1.111 -r1.112
*** config.py 1 Aug 2004 10:57:12 -0000 1.111
--- config.py 9 Aug 2004 14:02:52 -0000 1.112
***************
*** 23,26 ****
--- 23,29 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.112 2004/08/09 14:02:52 dischi
+ # first draft of new tv card setup
+ #
# Revision 1.111 2004/08/01 10:57:12 dischi
# add messages for deactivated plugins
***************
*** 180,183 ****
--- 183,187 ----
+
def print_config_changes(conf_version, file_version, changelist):
"""
***************
*** 306,309 ****
--- 310,353 ----
#
+ # TV card settup
+ #
+
+ class TVSettings(dict):
+ def __setitem__(self, key, val):
+ # FIXME: key has to end with number or we crash here
+ number = key[-1]
+ dict.__setitem__(self, key, val(number))
+
+
+ class TVCard:
+ def __init__(self, number):
+ self.vdev = '/dev/video' + number
+ self.adev = None
+
+
+ class DVBCard:
+ def __init__(self, number):
+ self.adapter = '/dev/dvb/adapter' + number
+ _debug_('register dvb device %s' % self.adapter)
+
+ TV_SETTINGS = TVSettings()
+
+ # auto-load TV_SETTINGS:
+ for i in range(10):
+ if os.path.isdir('/dev/dvb/adapter%s' % i):
+ TV_SETTINGS['dvb%s' % i] = DVBCard
+ if os.path.isdir('/dev/video%s' % i):
+ TV_SETTINGS['tv%s' % i] = TVCard
+
+
+ # TESTCODE FOR freevo_config.py:
+ TV_SETTINGS['tv0'] = TVCard
+ TV_SETTINGS['tv0'].adev = '/dev/dsp'
+ TV_SETTINGS['dvb0'] = DVBCard
+
+
+
+
+ #
# Config file handling
#
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog