Pierre Ossman wrote: > Duncan Webb wrote: >> It is a great idea to use the event driver in freevo, I said that >> before, and it's something we should definitely have. >> >> This is exactly the way, that I would like the event driver to work. >> There are too many different kernels out there that I think parsing the >> linux/input.h at run-time is a bad idea too higher a chance that it will >> cause problems; generating a configuration file *is* the way to go. The >> configuration script can be python code or a simple text file. >> >> Not everybody will have kernel rpm installed so having the fall-back is >> a good idea too. >> >> There is a freevo helper makelircrc, so we should have one that does the >> same for events. > > There is a slight difference in that this file isn't something the user > should be mucking about in. So basically we're doing an optimisation > hack (pre-parsing input.h), nothing else. So what's the point? > > If we really do not want runtime parsing of input.h, then we should just > remove it and manually (using scripts of course) update evfallback.py > with the freevo releases.
Hi Pierre, I think that you have done all the work here and done a great job too; it just needs a little finishing off. Regular expressions are generally a bad thing for programs, other than being difficult to read and so hard to maintain, they do tend to cause problems over time. For example just parsing the version string from mplayer, xine and xmame cause problems so mplayer and xine version checks have been removed. Parsing a kernel header file is really not a great idea, it is just asking for problems, they changed too often. The trickiest part is to determine which devices the events come from, you have chosen to open each device in /dev/input/eventX, which is can be a bit problematic as users can change udev rules to what they wish. Another way is to check /sys/class/input/inputX/name. Using an event number will cause problems as input USB devices are added and removed. All that is need is to rework the program a little so that the events are not generated to run-time. How you choose to do this is completely up to you. As I've said before, I think that using events is a terrific idea and I'm looking forward to using it. However, I will not add it as it stands. Regards, Duncan ------------------------------------------------------------------------- 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-devel mailing list Freevo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-devel