Boris,

>
> http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/layout/base/nsPre...

Yeah. Just half an hour before reading your answer, I finally
discovered the damn nsIObjectLoadingContent which goes from a DOMNode
to the plugin instance. And yes, I saw the two static functions, but I
was able to use directly only the Start one, because the Stop has some
external-linkage stuff (nsIFrame, nsIObjectFrame etc...)... so I dug
into nsIObjectFrame::StopPlugin() code, and again - apart from some
stuff on frames and views which I cannot replicate and anyway should
not interest me, because I am NOT destroying anything, I am just
stopping and restarting the plugin - I finally understood that, to
stop a plugin, it is enough to call pluginInstance->Stop() and
pluginHost->StopPluginInstance(pluginInstance).

And - guess what? - IT WORKS! :) I am happily grabbing YouTube pixels
now. Thanks, once again.


> It might be good to have a saner API for this (say on
> nsIObjectLoadingContent).  File a bug?

well, in fact is quite complex, not for the plugins itself - sure it
should be stated somewhere that those two calls are enough for the
plugin itself to stop properly - but the real mess is all the code one
cannot replicate because is external linkage. All nsIFrames etc...

BTW: while digging, I found something I cannot understand: there is
the concept of "delayed stop", which you apply only ifdef WIN_XP and
with Real audio. See 
http://mxr.mozilla.org/firefox/source/layout/generic/nsObjectFrame.cpp#1904
... but then some funcs are called, BOOL delayedStop seems not to be
altered, and then I find 
http://mxr.mozilla.org/firefox/source/layout/generic/nsObjectFrame.cpp#1773
is called... how this could even return TRUE? delayedStop can be true
only if the plugin is Real, and if so, it cannot be QuickTime or
Flip4Mac.. Or I am missing something?

Anyway, it somewhat works. Gotta check listeners now... thanks again.

Aaron


_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to