IRC Log Viewer » #firebreath » 2012-06-14

IRC Nick Time (GMT-7) Message
tonychen 01:06 hello?
tonychen 02:06 how to update plugin realtime?
who knows?
tim_ 09:06 hello all. Just found firebreath = looks like you've done an excellent job!
johannes 09:06 they have!
tim_ 09:06 I've just seen the chat logs & people are talking about vode rendering. Is there any public work on H.264 plugins? I've been looking at porting our H.264 renderer from Windows native to Chrome, but it's impossible in Native Client. Looks like it could work in firebreath
vode = video, sorry.
ch 09:06 there are a few users that have implemented video rendering using ffmpeg or other libraries
not sure if anything is public
tim_ 09:06 ok, thanks. I'll try a few things. I've found the threadedOpenGL example - I think that providing I can get a render surface, then I should be able to decide whether it's possible. Basically I'm scoping some work to see if it's worth doing - streaming H.264 via UDP as aprt of a research project, not commercial software.
ch 09:06 targetting windows, you'll probably want Direct3D, targeting mac you want OpenGL
just a hint
tim_ 09:06 thanks, ch.
taxilian 09:06 tim_: I have worked on a plugin that rendered h.264
it can definitely be done
but I don't have the source
nor is it open
tim_ 09:06 currently have some directshow filters that render (via Windows DMODecoder) using our h.264 decoder. However I'm interested in trying to get this into a browser.
thanks taxilian
taxilian 09:06 directshow works too
you get an HWND, so you can render using anything that renders to an HWND
if you need a windowless plugin (you need DOM elements to float over the plugin) it gets a lot trickier
tim_ 09:06 ok. I spent about a week trying to understand Chrome's plugin frameworks & decided it's too un-documented, so was quite excited to find Firebreath. Thanks for note about window/less.
taxilian 09:06 chrome doesn't have a plugin framework, chrome has an extension framework
you'll be a lot happier if you can train yourself to use the terms correctly… a lot of confusion stems from the fact that too many people confuse the two
tim_ 09:06 There's also plugins (unless I've got the terminology wrong): Native plugins via NaCl (compile to .nexe files) and Trusted Plugins (regular .dlls) which sit in the outer sandbox. TP is what I'd require since Native Client can't use UDP. However most of the docs refer to Native Client since they're safe & fully sandboxed.
taxilian 09:06 Hmm; not familiar with Trusted Plugins. NaCl aren't real plugins, but it does definitely increase the confusion
perhaps "trusted plugins" are PPAPI, or what is left of it
tim_ 09:06 exactly :-) I believe that "trusted plugins" are close to PPAPI, but Chrome sort of discourage their use (and say they are going to deprecate them sometime). It sort-of goes PPAPI->Pepper->NaCl in terms of 'strictness' of sandboxing.
taxilian 09:06 I was under the impression that PPAPI *was* pepper
tim_ 09:06 maybe it is - the more I read the less I think I know
taxilian 09:06 yeah; once I realized it was never going to be supported by anyone but chrome I lost interest. for any of my projects I need cross-browser compatibility
and that means NPAPI
tim_ 10:06 yes. It does look like Chrome's security model is really good though - these .nexe plugins are compiled native, but with really strong sandboxing, & op-code analysis during the compile phase to catch self-modifying code, stack errors etc.
taxilian 10:06 yeah, and there is something to be said for that
the only problem being that they can't do any of what I need to do anyway
because of that same sandboxing
tim_ 10:06 same here - need UDP streaming of video, which is impossible.I think I'll have acouple of days playing with firebreath & see what's possible.
taxilian 10:06 it's definitely possible with firebreath, but it will be tricky. dealing with d3d and such really stinks
but it's doable
tim_ 10:06 might be ok with a windowed plugin? It looks from the docs that that can render into an HWND? Slow, but possible.
taxilian 10:06 windowed plugins are not slow
should work just fine
just remember to keep everything on the same thread
as far as d3d or directdraw goes
and remember you're not allowed to block the main thread
tim_ 10:06 The rendering I mean, sorry. We've found d2d rendering is faster.
taxilian 10:06 we found the opposite, but it may depend on how and what you're rendering
d2d is usually compatible with more cards
no reason you couldn't use d2d, though
tim_ 10:06 currently have our proprietory h.264 decoder, with a DMODecoder DirectShow filter, and another filter to handle the UDP/RTSP. Throw that lot into a native Windows filtergraph, & it works fine: 25fps live video, no problem. Challenge is getting that lot in a browser :-)
taxilian 10:06 a few things to remember: 1) all instances of the plugin run in the same memoryspace, so be real careful with statics, globals, and singletons. 2) you'll probalby need to run your filtergraph on a different thread than main if you want it to perform. 3) you need to stop using the window as soon as DetachedEvent fires -- you don't own the window, the browser does
tim_ 10:06 Thanks! I've registered on the google groups dev list, so will keep a eye open. Thanks for your help!