[Opera-Linux] video playback using the mplayerplugin succesor "Gecko media player" is broken due to a bug in Opera

Eirik Byrkjeflot Anonsen eirik at opera.com
Wed May 30 14:40:20 UTC 2007


Kevin DeKorte <kdekorte at gmail.com> writes:

> Eirik Byrkjeflot Anonsen wrote:
>
>> Not necessarily.  There are certain parts of the mozilla plug-in
>> interface we do not emulate.  The most important things being that
>> we're not running a gtk main loop, and we don't implement XUL, XPCOM
>> or anything built on top of that.  At least some plug-ins depend on
>> these things (mplayer plug-in used to depend on gtk.)
>> 
>> I haven't been keeping an eye on the mozilla plug-in interface, so I
>> don't know if they still recommend making plug-ins depend on gtk.  I'm
>> pretty sure they used to do so.
>> 
>> eirik
>
> Actually, I know that gtk is not the toolkit you should be using when
> developing a cross browser plugin. In mplayerplug-in X mode was
> developed for this purpose, and X mode would have been dropped if not
> for the Opera users of it begging for it. The example plugin I gave does
> not have anything but X in it I believe so all the events in it should work.

Then there's a pretty good chance that it will work.  Well, except
that I'm sure we still have lots of bugs in the plug-in javascript
interface.  (I didn't have anything to test with when I implemented
it...)

>
> With gecko-mediaplayer, there is no widget toolkit in the plugin at all.
> As part of the design of it the gui was contained in the GNOME MPlayer
> application and gecko-mediaplayer uses dbus to instruct gnome-mplayer
> what to play and where to play it. Part of that instruction is to embed
> gnome-mplayer in the window that Opera gives it via the SetWindow event.
> Now if Opera destroys this window to soon then this causes all kinds of
> problems.

Sounds like good design (under the circumstances).  That should work.

I have recently (well, during the flash 9 release period) fixed some
problems with timing issues between SetWindow events and things
actually happening to the window.  Basically, I've added XSync() calls
at strategic places in an attempt to ensure that the window is really
created before SetWindow() is called and something similar during
destruction (i.e. the destruction of the window does not happen until
SetWindow() has returned).

>
> I also took a look at the plugin code and and there is a block of code
> called npp_gate.cpp. This code handles all the events like NPP_Destroy
> and NPP_SetWindow. I believe everything is there that Opera expects.
> After doing a little research is seems the shut call is called from
> NPP_Destroy. So that is where that event is coming from.
>
> Kevin
>

We may have some weird behaviour with SetWindow().  I think I've seen
strange stuff there sometimes.

eirik



More information about the Opera-Linux mailing list