Friday, November 25, 2011

mplayerplug-in and Firefox 8

I've received a few emails that mplayerplug-in may not be working with Firefox 8. While I have not personally looked into this yet I believe this may be due to the removal of XPCOM in Firefox. The best option going forward would be to migrate from mplayerplug-in to gecko-mediaplayer. gecko-mediaplayer uses the nsapi that Mozilla recommends for plugins.

Now I know everyone's first thought is that gecko-mediaplayer and gnome-mplayer have to many dependencies or that gnome-mplayer requires gnome. Well lets be frank. The only main requirement difference and dependency, if you are using Firefox, is that gecko-mediaplayer/gnome-mplayer require that dbus is present and running on the system. I've done some testing and dbus does not really add much RAM or CPU usage when it is not being used.


top - 08:10:30 up 7 days, 31 min,  8 users,  load average: 1.08, 0.35, 0.16
Tasks:   3 total,   0 running,   3 sleeping,   0 stopped,   0 zombie
Cpu(s):  3.1%us,  2.8%sy,  0.0%ni, 93.7%id,  0.2%wa,  0.2%hi,  0.0%si,  0.0%st
Mem:   8179620k total,  6119660k used,  2059960k free,   608028k buffers
Swap:  2103292k total,        0k used,  2103292k free,  2992068k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND           
 1686 kdekorte  20   0 24992 3572  704 S  0.3  0.0   9:45.59 dbus-daemon       
  899 dbus      20   0 22996 2684 1236 S  0.0  0.0   0:09.42 dbus-daemon       
 1685 kdekorte  20   0 22220  508  300 S  0.0  0.0   0:00.00 dbus-launch

As stated before gnome-mplayer does not require any gnome components, it originally did, but those components have been replaced with GTK/GLIB or other optional libraries. It can be configured to not use gconf or dconf. gnome-mplayer can be compiled to support GTK2 or GTK3 and since GTK is used by Firefox no additional library is added there.

mplayerplug-in does not support many of the features that gecko-mediaplayer does. The javascript is better, the support for Quicktime is better, and many of the problems that mplayerplug-in has are resolved in gecko-mediaplayer. So it is time for mplayerplug-in to finally go away.