Hi Duncan,

On Mon, Dec 17, 2007 at 07:26:34AM +0100, Duncan Webb wrote:
> Freevo-1.7.5 and Freevo-1.8.0rc1 will be released this weekend.

Nice to see such quick progress :)

I'm running a 1.7.4 installation on a small amd64 box. I have a few patches
I planned to send out sometime, but I thought there was plenty of time :)
Anyway, here they are:


I - I'm using evdev for my remote control. It did not work out of the box,
because many structures (but not the time structure embedded in the event)
use ints and not longs. They have diff. sizes on amd64. This patch fixed it:

diff -ru freevo-1.7.4.orig/src/evdev.py freevo-1.7.4/src/evdev.py
--- freevo-1.7.4.orig/src/evdev.py      2007-06-16 12:32:37.000000000 -0700
+++ freevo-1.7.4/src/evdev.py   2007-12-16 03:39:14.000000000 -0800
@@ -147,7 +147,7 @@
         '''
         '''
         buf = ioctl(self._fd, EVIOCGVERSION, "    ")
-        l, =  struct.unpack("L", buf)
+        l, =  struct.unpack("I", buf)
         return (l >> 16, (l >> 8) & 0xff, l & 0xff)
 
     def get_id(self):
@@ -182,7 +182,7 @@
         l = ((keys[-1] + 7) / 8 + 3) & ~0x3
 
         buf = ioctl(self._fd, EVIOCGBIT(0, l), " " * l)
-        array = struct.unpack("L" * (l/4), buf)
+        array = struct.unpack("I" * (l/4), buf)
 
         self._events = {}
 
@@ -203,7 +203,7 @@
             except IOError:
                 # No events for a type results in Errno 22 (EINVAL)
                 break
-            subarray = struct.unpack("L" * (sl/4), buf)
+            subarray = struct.unpack("I" * (sl/4), buf)
 
             for j in xrange(sl * 8):
                 if not subarray[j / 32] & (1 << j % 32):
@@ -224,13 +224,13 @@
         '''
         '''
         try:
-            buf = os.read(self._fd, 16)
+            buf = os.read(self._fd, struct.calcsize("LLHHi"))
         except OSError, (errno, str):
             if errno == 11:
                 return None
             raise
 
-        sec, usec, type, code, value = struct.unpack("LLHHl", buf)
+        sec, usec, type, code, value = struct.unpack("LLHHi", buf)
 
         return (float(sec) + float(usec)/1000000.0, _types[type], 
_events[type][code], value)


II - I use shutdown confirmation, but prefer to have 'OK' as the
default choice. This change is probably not to be applied as is,
but I could do a better one if we can decide what's better :)
I think having a specific SHUTDOWN_CONFIRM value for this could work,
or maybe one could change the ConfirmBox code so that defaults can be
specified for a given 'text=' parameter. Anyway, here is what I have,
as a base for discussion:

diff -ru freevo-1.7.4.orig/src/plugins/shutdown.py 
freevo-1.7.4/src/plugins/shutdown.py
--- freevo-1.7.4.orig/src/plugins/shutdown.py   2007-10-17 13:44:37.000000000 
-0700
+++ freevo-1.7.4/src/plugins/shutdown.py        2007-12-16 03:40:44.000000000 
-0800
@@ -151,7 +151,7 @@
         """
         self.menuw = menuw
         what = _('Do you really want to shut down Freevo?')
-        ConfirmBox(text=what, handler=self.shutdown_freevo, 
default_choice=1).show()
+        ConfirmBox(text=what, handler=self.shutdown_freevo).show()
 
 
     def confirm_system(self, arg=None, menuw=None):
@@ -160,7 +160,7 @@
         """
         self.menuw = menuw
         what = _('Do you really want to shut down the system?')
-        ConfirmBox(text=what, handler=self.shutdown_system, 
default_choice=1).show()
+        ConfirmBox(text=what, handler=self.shutdown_system).show()
 
     def confirm_system_restart(self, arg=None, menuw=None):
         """
@@ -168,7 +168,7 @@
         """
         self.menuw = menuw
         what = _('Do you really want to restart the system?')
-        ConfirmBox(text=what, handler=self.shutdown_system_restart, 
default_choice=1).show()
+        ConfirmBox(text=what, handler=self.shutdown_system_restart).show()
 
 
     def shutdown_freevo(self, arg=None, menuw=None):


III - I don't actually have mplayer installed, as I needed xine for DVD menus
and I decided to use it for everything. I suggest mplayer should not be
specified as a mandatory dependancy (maybe only strongly recommended ?).
Also the lsdvd dependancy seems unused, 'grep' could not find anything
that uses it (I suppose it's all been replaced by the mminfo stuff ???).

diff -ru freevo-1.7.4.orig/src/setup_freevo.py freevo-1.7.4/src/setup_freevo.py
--- freevo-1.7.4.orig/src/setup_freevo.py       2007-05-19 07:24:52.000000000 
-0700
+++ freevo-1.7.4/src/setup_freevo.py    2007-12-16 03:39:58.000000000 -0800
@@ -49,13 +49,12 @@
     __builtin__.__dict__['_']= lambda m: m
 
 
-EXTERNAL_PROGRAMS = (("mplayer", "mplayer", 1),
+EXTERNAL_PROGRAMS = (("mplayer", "mplayer", 0),
                      ("mencoder", "mencoder", 0),
                      ("tvtime", "tvtime", 0),
                      ("xine", "xine", 0),
                      ("fbxine", "fbxine", 0),
                      ("df_xine", "df_xine", 0),
-                     ("lsdvd", "lsdvd", 0),
                      ("jpegtran", "jpegtran", 0),
                      ("xmame.x11", "xmame", 0),
                      ("xmame.SDL", "xmame", 0),

Is this the appropriate way/place to send patches ?

Hope this helps,

-- 
Michel Lespinasse

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Freevo-devel mailing list
Freevo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to