IRC Log Viewer » #firebreath » 2011-03-03

IRC Nick Time (GMT-7) Message
Benjamin_ 05:03 hello
i hope you can help me. I've got an problem with receiving an js array in my plugin. There is no problem when i do this via JSObjectPtr and then query every index but this seems far too slow. Is there any other method how i can get a whole array? Is it possiblie to stream the array from js to my plugin ?
saiaman 06:03 hello everone
saiaman 06:03 taxilian i've got a question : in the RC1 wix installer, there are registry keys in HKCR is it normal ?
event in a perUser install ?
DFUN 07:03 Hi FireBreath fellows
@taxilian: Thanks for the information. I will wait for the official release to update my project.
Our tester reported a minor bug using my plugin on Chrome and Safari and I don't know how to handle it.
I'm querying the free disk space using "GetDiskFreeSpaceEx" (Win API) on card reader drives that do not contain a memory card. On firefox it returns false as I would expect it
but Chrome displays an error message in the browser:
"Windows - No volume - Exception Processing Message c0000013 Parameters 75b0bf7c 4 75b0bf7c 75b0bf7c"
can I suppress this message in the browser?
DFUN 07:03 happens in release and debug mode.
neilg_ 07:03 You should use DeviceIoControl first passing in IOCTL_STORAGE_CHECK_VERIFY
That will let you find out if the removable drive has a disk in it
Amusingly c0000013 is complaining that there's no disk in the drive
You could also try SetErrorMode(SEM_FAILCRITICALERRORS)
That would probably disable the error box - but it would disable all error boxes for the entire process (for the browser) so it's probably not the best idea
Tonku 08:03 hi guys where can I write my core graphics drawing code in the mac plugin..
neilg_ 08:03 Tonku: You get the CGContextRef and WindowRef out of the plugin class and you can draw using that
I assume you're only drawing in 2D and are not planning to use OpenGL?
ed__ 08:03 Hi..
I know I can use use a stream handler to GET a url, is it possible within Firebreath to also perform POSTs?
jeromee 08:03 and if firebreath perform POSTs, is that support multipart request?
ed__ 08:03 youd probably have to handle the body yourself..
DFUN 08:03 tahnk you very much, neil. I think that'll do it.
neilg_ 08:03 Glad to hear it!
I don't see any classes in FB that will POST... I haven't tried to do that myself so there could be something I'm not familiar with!
ed__ 08:03 Cheers Neil.
I guess I should look into Firebreath source and see whether it is possible implement. A bit deep for where I am at currently though..
Is it worth making this a feature request?
Tonku 08:03 hi Neil..
I want to us openGL as well
taxilian 08:03 neilg_: POST support is in 1.5
NoAntzWk implemented it
Pushed it yesterday
neilg_ 08:03 Tonku: Then you need to use CoreAnimation
Oh, cool - I wasn't looking at the code, I was reading through the documentation online
That's good to know!
Tonku 08:03 ok
neilg_ 08:03 Well there you go ed__ and jeromee - you CAN do it. :)
Tonku 08:03 I know how to draw on a NSOpenGLView sub class using cocoa.. how can I get a start point using the cpp class in FB..
taxilian 08:03 ed__: See my comment to neilg_
Benjamin_ 08:03 hello @ll
taxilian 08:03 Tonku: You cant use opengl with coregraphics
jeromee: Afaik you cant do multipart with browserstreams
neilg_ 08:03 Tonku: You'll get a CLayerRef out of FireBreath's PluginWindow class. You should then attach a CAOpenGLLayer to it and you can draw using that layer
taxilian 08:03 Benjamin_: There are two ways to pass in an array
neilg_ 08:03 It creates an OpenGL context for you
Benjamin_ 08:03 I tried it with the JSObjectPtr and then pulles every element but ... far too slow
taxilian 08:03 neilg_: I dont know the details, but im pretty certain opengl wont work in most browsers with coregraphics
Benjamin_: Both ways do that
neilg_ 08:03 taxilian: You are 100% correct
taxilian 08:03 Just one firebreath does it for you
neilg_ 08:03 I did a heck of a lot of research into it - you have to use CoreAnimation
taxilian 08:03 Are you on the main thread?
neilg_: Right, or Quickdraw
ed__ 08:03 nice one Taxilian..
neilg_ 08:03 Yeah, let's ignore QuickDraw
taxilian 08:03 Lots of new faces today. Good to have you all
Benjamin_ 08:03 okay but how can i speed up things ? Because i need to deliver a video frame to the plugin :)
neilg_ 08:03 Anything that involves hackery is something I want to stay far away from
taxilian 08:03 Benjamin_: Are you on thr main thread?
Benjamin_ 08:03 yes
ed__ 08:03 (and NoAntzWk)
taxilian 08:03 neilg_: Plugins might not be your thing, then... ;-)
Benjamin_: Dont know what to tell you then
Benjamin_ 08:03 :P
jeromee 08:03 hi all.
taxilian 08:03 Use somethhing other than an array
sundevils 08:03 hey, taxilian, I was talking to you about multi-mime type support over the email, do you have time to help me out?
Benjamin_ 08:03 What would you suggest :), I am really new to firebreath :)
taxilian 08:03 Let me get out of bed
And get a keyboatd
Im on an ipad right now :)
sundevils 08:03 :D
taxilian 08:03 Be back in 10
Tonku 08:03 ok thanks guys.. let me have a look into it
Benjamin_ 08:03 hehe, yeah typing on it is quite cumbersome ^^
jeromee 08:03 wow, the time is AM12:54. i'm so sleepy... but i has many many question.
DFUN 08:03 ok, I got it. Thanks again, neilg. And that's my last word for today. See you
jeromee 08:03 i already implement plugin program using NPAPI
but that has some problem on linux
XDND and paint message like EraseBackground.
is firebreath support them?
oh, that is windowed plugin.
taxilian 09:03 Benjamin_: where is the data coming from? why do you have a video frame in a JS array?
Benjamin_ 09:03 okay the data is coming from an canvas element
which gets the data out of an html5 video element
taxilian 09:03 jeromee: All I know about drawing on X11 is that it uses GDK and XEmbed
Benjamin_ 09:03 and with getImageData i pull out the data of the canvas
this returns me an array
taxilian 09:03 Benjamin_: does the canvas element have another way of querying it? to get a pixel at a time, for example, instead of an array of pixels?
Benjamin_ 09:03 you mean accessing the canvas within the plugin ?
and then query the pixels ?
taxilian 09:03 sundevils: could you pastebin me your Info.plist file (from the resulting bundle) and the template file (from bundle_template)?
sundevils 09:03 sure, let me do that.
taxilian 09:03 Benjamin_: yes
copying the data is obviously going to require overhead
so if you can get the data directly from the canvas it might be faster
you pass the canvas object into the plugin (as a JSObjectPtr) and access it directly
it might be faster; it's the only thing I can think of
javascript isn't really made for passing data around :-/
Benjamin_ 09:03 okay so i just should try to pass in the canvas or better the 2D context to the plugin
with an JSObjectPtr and then try to query it
taxilian 09:03 Benjamin_: what browser(s) does this need to support?
keep in mind that if you request something that returns a JS array it won't make any difference
only if you can query the data directly it might be faster
Benjamin_ 09:03 nearly all browser which support npruntime
taxilian 09:03 okay; 'cause someone told me yesterday that Webkit browsers seem to be able to handle binary data in a string, but Firefox definitely does not
Benjamin_ 09:03 yes, the first version of my plugin was made with xpcom but they are dropping the support
taxilian 09:03 dropping? dropped
Benjamin_ 09:03 yeah dropped ^^
taxilian 09:03 =]
well, here is another thought
if you know the exact type that you need to get
you could create an optimized method for getting array data somewhere
currently when you query the JSObject it goes through the abstraction
but that's a common enough thing that you could wire in an abstraction for specifically pulling data out of a JS array
which would eliminate a lot of overhead
it would probably all have to be a specific type for that to be useful
Benjamin_ 09:03 already tried this, just to pull the data with NPN_GetProperty without the overhead coming with the JSObject but 180k calls are ..
taxilian 09:03 then I don't know of another option
Benjamin_ 09:03 okay so i am not alone :)
├╝erhaps i can pass back an reference to an js array to js an fill it there
taxilian 09:03 it doesn't matter where the JS array comes from
it's still a JS array
and you have to call into JS to get it
I can't imagine that having JS iterate through the array is any faster than doing it from C++
hmm. well, I guess it could be
Benjamin_ 09:03 i will give it a try
taxilian 09:03 but you'd still have to pass it through the wall
and that'd still have overhead
Benjamin_ 09:03 i would like to buy a pointer to the js array :(
but things are never so easy
taxilian 09:03 yeah
sorry :-/
Benjamin_ 09:03 not your fault :)
thanks a lot for your help
taxilian 09:03 good luck
Benjamin_ 09:03 i wil try to find a solution because this project is part of my master thesis :)
have a nice day
taxilian 09:03 yout oo
jeromee 09:03 hmm.
sundevils 09:03 hey, taxilian, sorry it took so long, my colleague interrupted me. Here is the link for the generated Info.plist: here is the template:
taxilian 09:03 darn colleagues =]
jeromee 09:03 i don't speak english very well.. so i need information about license
taxilian 09:03 jeromee: what is your native language?
jeromee 09:03 is new BSD and LGPL effect commertial plugins program?
sundevils 09:03 I think there are two issue with the current fbgen script and template: 1) fbgen does not prompt for multiple mimetype, 2) the template should have variables for descriptions for each type. currently it is using FBControl_FileDescription for each type, so having multiple FBControl_FileDescription really messed up the plugin description itself.
taxilian 09:03 jeromee: cool. BSD license basically says "you can do whatever you want with this code as long as you don't remove the copyright notice"
so you can do commercial plugins with the BSD license and you don't have to distribute the source
jeromee 09:03 how about LPGL
neilg_ 09:03 LGPL would affect commercial products, yes. I actually don't understand how LGPL works with FireBreath because it statically links
But the New BSD license is just as Taxilian says
jeromee 09:03 oh.. i see.
taxilian 09:03 neilg_: it makes it possible to use firebreath easily with LGPL libraries is all
neilg_ 09:03 Sure, but by statically linking with FireBreath it means that the only way to satisfy LGPL is to release the object files so that anybody else could link against a new version of FireBreath
I much prefer the LGPL to the GPL but it definitely gets confusing once static linking is involved :)
I'm very glad that FB exists and is dual-licensed. :)
taxilian 09:03 neilg_: yeah, LGPL isn't really different from GPL with FireBreath, since you can't just link against it
but it was a contractual obligation when I first wrote FireBreath to support LGPL
neilg_ 09:03 Ah! That makes total sense
In any case the New BSD license makes it suitable for commercial solutions - and I'm really happy that Richard dual-licensed FireBreath!
taxilian 09:03 it was originally the EPL, which was nearly as permissive and just basically said "if you make any changes to firebreath itself you have to open source it, but you can do whatever you want with derivitive works" (which would include your plugin)
but too many people didn't like that license
so we changed it
neilg_ 09:03 Interesting. I don't actually know much about the EPL - I've never used anything that had that license
jeromee 09:03 very thanks for your response. i will be come here again. : ) bye.
sundevils 09:03 taxilian: are you still there?
taxilian 09:03 yeah
sorry, got sidetracked
sundevils 09:03 :D
cmake + python is killing me...
taxilian 09:03 cmake + python?
what are you using python for?
sundevils 09:03 I am trying to look at the fbgen script... :D
taxilian 09:03 ahh
it's pretty simple
it just replaces values in the files in fbgen/src/
sundevils 09:03 looks simple, but I never used python before. kind of confused...
taxilian 09:03 ahh. python is pretty easy to read and use, but only after you get used to it =]
hmm. so the problem with the WebPluginDescription
is that I really wasn't sure what to put there =]
it is (slowly) coming back to me now
sundevils 09:03 so, there are WebPluginDescription and WebPluginTypeDescription, but the template did not differentiate them.
taxilian 09:03 yeah
we don't need both values on any other platform
my vote is that we just make something up for the first :-P
${FBSTRING_PluginName} Plugin or something
gotta go to class; I'll be on in 30 minutes or so
sundevils 09:03 sure, no problem with me
taxilian 10:03 back
jshanab_wcw 12:03 I need to open a popup window and send the window handle to the plugin so I can paint on it. What is the best way of doing that?
taxilian 12:03 what do you mean "sendt he window handle tot he plugin"?
is it a different process that is opening the window?
jshanab_wcw 12:03 Well I have a video player. Once is pause mode, I want to display 30 frames on a seperate window. I figured the javascript could opena window then call the plugin with a handle to it
taxilian 12:03 uh, no
you could maybe use the plugin to make a javascript call to open a window with another plugin in it
in which case you could then link the plugin instances
but if you just want a video window, you need to open that with c++
there is no such thing as a "window handle" in javascript
Benjamin_ 15:03 Hello it's me again :)
taxilian 16:03 oops, didn't see the window
mital 21:03 taxilian: hey
wasssup with the my pull request ? any more changes u want ?
taxilian 21:03 mital: yes; I discussed it with Ben the toher day
hang on
I will be back in 15, okay?
mital 21:03 okei
taxilian 21:03 sorry this is taking so long; I promise most of hte time code changes aren't this much hassle to contribute =]
taxilian 21:03 okay, I'm back
mital 21:03 yeh
so now master is 1.5 right ?
taxilian 21:03 yes
mital 21:03 kewl so i will switch my branch to master.. so do we have anything else required for that change ?
taxilian 21:03 couple of questions
what is the default value for disable_gui?
it prompts for it during fbgen, right?
mital 21:03 its "false"... and yes it prompts in fbgen
taxilian 21:03 okay; I was thinking I'd seen it set to true, but not seeing that now
one more change I'd like, if you don't mind
mital 21:03 sure
taxilian 21:03 could you have it set all of the FBMAC_USE_* to 0 if gui is disabled?
if those aren't set to 0 and FB_GUI_DISABLED is set then it won't build on mac
mital 21:03 hmm ok i will do that ...
taxilian 21:03 thanks, mital; and thanks for your patience on this =]
mital 21:03 wc :) i know you would have been busy.
taxilian 21:03 insanely. I'm hoping to nail down the last issue for releasing 1.4 tonight
good news, though; Facebook has decided to continue the contract
mital 21:03 hey thats awesome :) congratulations :)
taxilian 21:03 yep; it means I can keep working on FireBreath and getting paid for it for awhile longer =] (well, at least as applies to what I'm doing for Facebook)
that benefits everyone