Author: duncan
Date: Thu Oct 19 21:32:58 2006
New Revision: 8431
Removed:
branches/rel-1/freevo/src/evdev.py
branches/rel-1/freevo/src/evfallback.py
Modified:
branches/rel-1/freevo/ChangeLog
branches/rel-1/freevo/Docs/CREDITS
branches/rel-1/freevo/freevo_config.py
branches/rel-1/freevo/local_conf.py.example
branches/rel-1/freevo/src/event.py
branches/rel-1/freevo/src/rc.py
Log:
[ 1579124 ] Support for Linux event devices
Patches reversed.
Modified: branches/rel-1/freevo/ChangeLog
==============================================================================
--- branches/rel-1/freevo/ChangeLog (original)
+++ branches/rel-1/freevo/ChangeLog Thu Oct 19 21:32:58 2006
@@ -19,7 +19,6 @@
* New XM online plugin (F#1580412)
* Updated DEBUGGING, IP, PORT, UID and GUI based on helper name (F#1580628)
* Updated helper convert_config (F#1578183)
- * Updated Linux event device support (#1579124)
Release 1.6.0 (2006-10-31):
---------------------------
@@ -30,7 +29,6 @@
* New plug-in 'idlebar.diskfree' to show the available recording disk space
(B#1567491)
* New plug-in 'ivtv_xine_tv' to allow pausing of live tv (B#1566518)
* New plug-in 'upsoon' interrupt tv or radio when a recording is about to
start (F#1567895)
- * New Linix event device support (F#1579124)
* Added Catalan translation (F#1512162)
* Added checks for prerequisite packages that were missing
(B#1392996,B#1566374)
* Added forcing of font and its size to override skin definitions
(B#1563296,B#1563299)
Modified: branches/rel-1/freevo/Docs/CREDITS
==============================================================================
--- branches/rel-1/freevo/Docs/CREDITS (original)
+++ branches/rel-1/freevo/Docs/CREDITS Thu Oct 19 21:32:58 2006
@@ -71,7 +71,7 @@
o xmltv2 patches
Pierre Ossman <[EMAIL PROTECTED]>
-o Linux event device input handler
+o Apple trailers plug-in
Gorka Olaizola <[EMAIL PROTECTED]>
o Various bug fixes and patches
Modified: branches/rel-1/freevo/freevo_config.py
==============================================================================
--- branches/rel-1/freevo/freevo_config.py (original)
+++ branches/rel-1/freevo/freevo_config.py Thu Oct 19 21:32:58 2006
@@ -235,9 +235,7 @@
Added TV_RECORDFILE_OKLETTERS for characters allowed in recording
filenames.
Added AUTOSHUTDOWN_ settings to turn off and on the machine automatically
Added Multi-tuner support to allow recording and watching at the same time
- Added plug-in "upsoon" to stop the player when a recording is about to
start
- Added USE_SDL_KEYBOARD to specify if generic keyboard handler should be
used
- Added EVENT_DEVS and EVENTMAP for the new Linux event device handler''' ),
+ Added plug-in "upsoon" to stop the player when a recording is about to
start''' ),
(5.17,
'''Using the name of the helper in local_conf.py
Changed the TV_RECORD_SERVER_* to RECORDSERVER_*,
@@ -501,37 +499,12 @@
MENU_ARROW_NAVIGATION = 0
#
-# Process keyboard events from SDL. You want this unless you use only lirc
-# or event devices below.
-#
-USE_SDL_KEYBOARD = 1
-
-#
# Keymap to map keyboard keys to event strings. You can also add new keys
# here, e.g. KEYMAP[key.K_x] = 'SUBTITLE'. The K_-names are defined by pygame.
#
KEYMAP = DEFAULT_KEYMAP
#
-# List of /dev/input/event# devices to monitor. You can specify either the
-# device node (e.g. '/dev/input/event1') or the name of the device (e.g.
-# 'ATI Remote Wonder II'). If you monitor your keyboard both here and with
-# USE_SDL_KEYBOARD, then you will get duplicate events.
-#
-
-EVENT_DEVS = []
-
-#
-# Keymap to map input events to event strings. You can change current mappings
-# and add new ones here, e.g. EVENTMAP['KEY_COFFEE'] = 'SUBTITLE'. Key names
-# are defined by the Linux input layer (input.h). An axis is described by a
-# pair, one for positive and one for negative movement, e.g.
-# EVENTMAP['REL_Z'] = ('LEFT', 'RIGHT')
-#
-
-EVENTMAP = DEFAULT_EVENTMAP
-
-#
# Use Internet resources to fetch information?
# For example, Freevo can use CDDB for album information,
# the IMDB movie database for movie info, and Amazon for cover searches.
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 Thu Oct 19 21:32:58 2006
@@ -241,33 +241,11 @@
# MENU_ARROW_NAVIGATION = 0
#
-# Process keyboard events from SDL. You want this unless you use only lirc
-# or event devices below.
-#
-# USE_SDL_KEYBOARD = 1
-
-#
# Keymap to map keyboard keys to event strings. You can also add new keys
# here, e.g. KEYMAP[key.K_x] = 'SUBTITLE'. The K_-names are defined by pygame.
#
#
-# List of /dev/input/event# devices to monitor. You can specify either the
-# device node (e.g. '/dev/input/event1') or the name of the device (e.g.
-# 'ATI Remote Wonder II'). If you monitor your keyboard both here and with
-# USE_SDL_KEYBOARD, then you will get duplicate events.
-#
-# EVENT_DEVS = []
-
-#
-# Keymap to map input events to event strings. You can change current mappings
-# and add new ones here, e.g. EVENTMAP['KEY_COFFEE'] = 'SUBTITLE'. Key names
-# are defined by the Linux input layer (input.h). An axis is described by a
-# pair, one for positive and one for negative movement, e.g.
-# EVENTMAP['REL_Z'] = ('LEFT', 'RIGHT')
-#
-
-#
# Use Internet resources to fetch information?
# For example, Freevo can use CDDB for album information,
# the IMDB movie database for movie info, and Amazon for cover searches.
Modified: branches/rel-1/freevo/src/event.py
==============================================================================
--- branches/rel-1/freevo/src/event.py (original)
+++ branches/rel-1/freevo/src/event.py Thu Oct 19 21:32:58 2006
@@ -538,76 +538,6 @@
}
-DEFAULT_EVENTMAP = {
- 'KEY_F1' : 'SLEEP',
- 'KEY_HOME' : 'MENU',
- 'KEY_G' : 'GUIDE',
- 'KEY_ESC' : 'EXIT',
- 'KEY_UP' : 'UP',
- 'KEY_DOWN' : 'DOWN',
- 'KEY_LEFT' : 'LEFT',
- 'KEY_RIGHT' : 'RIGHT',
- 'KEY_OK' : 'SELECT',
- 'KEY_SPACE' : 'SELECT',
- 'KEY_ENTER' : 'SELECT',
- 'KEY_KPENTER' : 'SELECT',
- 'KEY_POWER' : 'POWER',
- 'KEY_F2' : 'POWER',
- 'KEY_MUTE' : 'MUTE',
- 'KEY_F3' : 'MUTE',
- 'KEY_VOLUMEDOWN' : 'VOL-',
- 'KEY_KPMINUS' : 'VOL-',
- 'KEY_N' : 'VOL-',
- 'KEY_VOLUMEUP' : 'VOL+',
- 'KEY_KPPLUS' : 'VOL+',
- 'KEY_M' : 'VOL+',
- 'KEY_CHANNELUP' : 'CH+',
- 'KEY_C' : 'CH+',
- 'KEY_CHANNELDOWN' : 'CH-',
- 'KEY_V' : 'CH-',
- 'KEY_1' : '1',
- 'KEY_2' : '2',
- 'KEY_3' : '3',
- 'KEY_4' : '4',
- 'KEY_5' : '5',
- 'KEY_6' : '6',
- 'KEY_7' : '7',
- 'KEY_8' : '8',
- 'KEY_9' : '9',
- 'KEY_0' : '0',
- 'KEY_VENDOR' : 'DISPLAY',
- 'KEY_D' : 'DISPLAY',
- 'KEY_MENU' : 'ENTER',
- 'KEY_E' : 'ENTER',
- 'KEY_MINUS' : 'PREV_CH',
- 'KEY_O' : 'PIP_ONOFF',
- 'KEY_W' : 'PIP_SWAP',
- 'KEY_I' : 'PIP_MOVE',
- 'KEY_F4' : 'TV_VCR',
- 'KEY_REWIND' : 'REW',
- 'KEY_R' : 'REW',
- 'KEY_PLAY' : 'PLAY',
- 'KEY_P' : 'PLAY',
- 'KEY_FORWARD' : 'FFWD',
- 'KEY_F' : 'FFWD',
- 'KEY_PAUSE' : 'PAUSE',
- 'KEY_U' : 'PAUSE',
- 'KEY_STOP' : 'STOP',
- 'KEY_S' : 'STOP',
- 'KEY_RECORD' : 'RECORD',
- 'KEY_F6' : 'REC',
- 'KEY_PERIOD' : 'EJECT',
- 'KEY_L' : 'SUBTITLE',
- 'KEY_A' : 'LANG',
-
- 'REL_X' : ('LEFT', 'RIGHT'),
- 'REL_Y' : ('UP', 'DOWN'),
-
- 'BTN_LEFT' : 'SELECT',
- 'BTN_RIGHT' : 'EXIT',
- }
-
-
#
# Internal events, don't map any button on them
Modified: branches/rel-1/freevo/src/rc.py
==============================================================================
--- branches/rel-1/freevo/src/rc.py (original)
+++ branches/rel-1/freevo/src/rc.py Thu Oct 19 21:32:58 2006
@@ -36,7 +36,6 @@
import types
import config
-import evdev
from event import Event, BUTTON
@@ -300,67 +299,6 @@
# No data available
return None
-#
--------------------------------------------------------------------------------
-
-class Evdev:
- """
- Class to handle evdev events
- """
- def __init__(self):
- """
- init all specified devices
- """
- self._devs = []
-
- for dev in config.EVENT_DEVS:
- e = None
-
- if os.path.exists(dev):
- try:
- e = evdev.evdev(dev)
- except:
- print "Problem opening event device '%s'" % dev
- else:
- name = dev
- for dev in os.listdir('/dev/input'):
- if not dev.startswith('event'):
- continue
-
- try:
- dev = '/dev/input/' + dev
- e = evdev.evdev(dev)
- except:
- continue
-
- if e.get_name() == name:
- break
- else:
- e = None
- print "Could not find any device named '%s'" % name
-
- if e is not None:
- print "Added input device '%s': %s" % (dev, e.get_name())
- self._devs.append(e)
-
- def poll(self, rc):
- """
- return next event
- """
- for dev in self._devs:
- event = dev.read()
- if event is None:
- continue
-
- if config.EVENTMAP.has_key(event[2]):
- if event[1] == 'EV_KEY':
- # 0 = release, 1 = press, 2 = repeat
- if event[3] > 0:
- return config.EVENTMAP[event[2]]
- elif event[1] == 'EV_REL':
- if event[3] < -10:
- return config.EVENTMAP[event[2]][0]
- elif event[3] > 10:
- return config.EVENTMAP[event[2]][1]
#
--------------------------------------------------------------------------------
@@ -378,14 +316,8 @@
except:
pass
- if config.USE_SDL_KEYBOARD:
- try:
- self.inputs.append(Keyboard())
- except:
- pass
-
try:
- self.inputs.append(Evdev())
+ self.inputs.append(Keyboard())
except:
pass
-------------------------------------------------------------------------
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