IRC Log Viewer » #firebreath » 2011-02-21

IRC Nick Time (GMT-7) Message
john 06:02 hey. Anyone know if FB's event system wraps a way for me to _cause_ a re-paint, as well as respond to one? I have a timer and want to cause a WM_PAINT... is there platform-independent functionality for this in FB?
john 06:02 actually, nevermind I remembered InvalidateRect() will work.
raffaello 08:02 hi
i have a question..i would like to add some strings as resources(.rc)..where do i have to add them?
taxilian 09:02 good morning all
jshanab_wcw 09:02 Morning
taxilian 09:02 you working today, or do you have the day off?
jshanab_wcw 09:02 I had saturday off, (which was dangerous, I bought a MB,Processor and 12G of ram) today is my monday morning, I am at work
taxilian 09:02 lol
jshanab_wcw 09:02 Saturday was the first day I had officially off since i got here Oct 1 :-) workaholic
taxilian 09:02 lol. you sound like me...
taxilian 09:02 jshanab_wcw: were you the one who was having trouble using log4cplus in multiple projects?
jshanab_wcw 10:02 At one point. I have a new issue with the shared codebase which has it's own log4cplus and not in a plugin but is also used in the plugin :-(
taxilian 10:02 jshanab_wcw: if you're using a different copy of log4cplus, I recommend you make your own logger
well, two options
either use log4cplus that comes with firebreath for your own projects
or use your own log4cplus with FireBreath
to use your own logging engine you need to set(CUSTOM_LOGGING 1) in your pluginconfig
and then it won't include NullLogger or log4cplus logger and you need to provide your own
if you want to use firebreath's log4cplus, I'm about to commit a fix for the issue you had
jshanab_wcw 10:02 because of the difrfernt "contexts" that plugins and applications run in, I think i really just need to refactor the code, it is an awful inherited mess. When i used my own it wouldn;t log when it was ran as a service. It is something I am planning on getting back to as someone just gave 1/2 my plugins responsibility to wowza+flash (flowplayer) :-)
Excellent!
taxilian 10:02 hehe. :-/
so you're not playing video anymore?
jshanab_wcw 11:02 Well our archive video for sure, it is in it's own storage format that allows extream random access. My live viewer is close, but they want to deploy at the end of the week, Not quite ready for that!
taxilian 11:02 hehe
guess I should backport the fix to 1.4 as well
jshanab_wcw 11:02 The live and archive use 90% same code, it actually worked live in 5 min but the 10 min buffer/camera was a bit much! So i wrote a live view optimized player and I just select it by chaning one of the html params
I am trying to add HW acceleration for the YUV->RGBA conversion :-)
taxilian 11:02 cool =] I may actually need to figure that out soon as well
except I'll be going from YUY2
jshanab_wcw 11:02 The SFML library accepts shaders written in GLSL, Nvidia provides a toolkit to write in Cg and you just compile with the profile glslf and put it in a file. I just haven't gotten past the fact that SFML expects all images to be in RGBA32. The fragment shader loads into the graphics card now.
well mine is YUV12_422 or something like that, it is the output format of avcodec
FB_GitHubBot 11:02 FireBreath: firebreath-1.4 Richard Bateman * 109adce (6 files in 6 dirs): Fixed issue with using log4cplus in multiple projects in the same solution ... - http://bit.ly/hbAy6M
taxilian 11:02 jshanab_wcw: then if you figure it out and are allowed, pass it along =] I'm going to need it
that's the format I'm using
as an alternative, btw, there are some very good assembly routines you can get for highly optimized software conversion; not as fast as using a shader, but not terrible
FB_GitHubBot 11:02 FireBreath: firebreath-1.4 Richard Bateman * f25c582 (1 files in 1 dirs): Removed debug msg - http://bit.ly/i6qSXd
FireBreath: master Richard Bateman * 439957f (1 files in 1 dirs): Removed debug msg - http://bit.ly/ersBAL
taxilian 12:02 off to lunch
dan2 12:02 taxilian, I just miss you?
dan2 12:02 taxilian, what do I need to add to PluginConfig.cmake for my plugin to make 2 separate plugins
taxilian 13:02 dan2: I'm back
dan2: look at examples/FBTestPlugin/PluginConfig.cmake for an example
dan2 13:02 k
think I got it
taxilian, so, are Plugin instances returned as shared pointers or such?
ok I see that in factory
so that should help me deal with situations where scope isn't easy to determine
right?
basically I'm asking to make sure there's no catch-22 about the browser deleting the object or something
taxilian 13:02 right
I'd be really careful about making a shared_ptr outlive its plugin instance
but technically you can
keep in mind that it will also force the browserhost instance to stick around, but it will not be valid
however, you can check host->isShutDown() to find out if the plugin instance has been shut down already
dan2: YMMV =] I haven't tried it, but it should work fine. The main thing to be careful of is to have all objects cleaned up before the module/plugin is unloaded from the browser
dan2 13:02 ya I got that
it's just that I'm crossing several threads
and managing scope on a case like window detached
is a problem
solan5891 15:02 hi guys, anyone up this late? :)
taxilian 15:02 lol
late?
it's 15:10 here
=]
sup?
solan5891 15:02 oh :d
23.12 here, bit of a difference
jshanab_wcw 15:02 I have a problem with dependent dll's for my plugin, If there are dlls with the same name in sysWow64, it tries to load them first and that crashes becuase I was linked to a different version lib. How do i specify it should look in it's own directory
taxilian 15:02 happens
jshanab_wcw: err...
I don't know
jshanab_wcw 15:02 I miis symlinks and version numbers
taxilian 15:02 welcome to what is commonly referred to as "dll hell" and one of the reasons that I statically link everything I possibly can
solan5891: so did you have a question / problem, or just saying hi?
solan5891 15:02 yes, indeed i have one :)
i'm still a n00b regarding browser npapi plugin development and a newbie at firebreath too, and i'm working on a project right now...
developing a plugin, which can interact with the sorrounding dom, and i just read on this cool wiki page, that this indeed is possible and there are methods for it too
err i mean classes
taxilian 15:02 amazing the things you can find on the wiki, isn't it?
solan5891 15:02 yup! :)
like this little guy: FB DOM Element getElementById
taxilian 15:02 useful. there is some question as to whether or not that works on all browsers is the only problem
but the one on FB DOM Document should at least
solan5891 15:02 thanks for that tip, i'm developing for chrome under linux
jshanab_wcw 15:02 taxilian, does firebreath call setDllDirectory?
solan5891 15:02 i want to try all these neat things out, but my beginner question goes like this: where should i instantiate these objects to work?
taxilian 15:02 jshanab_wcw: never heard of it before
jshanab_wcw 15:02 ie http://msdn.microsoft.com/en-us/library/ms684175%28v=vs.85%29.aspx
taxilian 15:02 solan5891: the browserhost has three methods: getDOMDocument, getDOMWindow, and getDOMElement
solan5891 15:02 yes
jshanab_wcw 15:02 It looks like that is the "recommended" way, over using the full path
taxilian 15:02 interesting
the only problem is you probably aren't loading the libs at runtime, right? they get loaded automatically?
well, you must be, because if it doesn't find them regsvr32 doesno't work
so by the time you run that, they have already loaded
however, it might be possible to set them to delay load and then maybe it would work
solan5891: those are the three methods that you use to get access to the DOM
everything else is a result of calls you make on the object those return
solan5891: alternately, I suppose you could pass a DOM element or something into a JSAPI method
and then use FB::DOM::Element::create(obj)
etc
solan5891 15:02 nice, i didn't even think of this
taxilian 15:02 but generally you get access to everthing through the window or the document
anything global in javascript is actually on the window
jshanab_wcw 15:02 libs load on my machine fine, My coworkers machine cannot load them because it finds them in syswow64 and exits on some error.
rcohn 15:02 Hi - Is there an easy way to turn on FBLOG_TRACE? I see that you are using log4cplus, but it doesn't appear to be built. What I am seeing is that the null logger is configured. Thanks.
taxilian 15:02 add_firebreath_library(log4cplus) in your PluginConfig.cmake file
search the logs (logs.firebreath.org) for log4cplus for more information on configuring it
and feel free to write some docs on the website on it =]
I just don't have time right now
rcohn 15:02 Thanks! I'll give it a try. Best regards.
taxilian 15:02 good luck
update to the latest 1.4, btw
solan5891 15:02 taxilian: thanks for the reply, though one question remains due to the fact that i'm pretty new with fb: should i call these methods in MyPlugin.cpp or MyPluginApi.cpp? The latter is the one responsible for the jsapi object, so i'm a bit confused as of yet :)
taxilian 15:02 you can do it anywhere you have a reference to the browserhost
the default fbgen template passes the host into the JSAPI object, so you could use it there
solan5891 15:02 ah, all clear now
thanks for the help, oh and btw firebreath is a godsend :)
jshanab_wcw 15:02 taxilian, it looks like dll redirection would work for an application and is super simple, but our test shows it seems to not work for a dll having dependent dlls. I am still looking, but .. http://msdn.microsoft.com/en-us/library/ms682600%28v=vs.85%29.aspx
taxilian 15:02 that sounds likely
like I said, the only thing I can think of would be to delay-load those dlls
that *might* help
solan5891 15:02 'rright, time to sleep :) c ya guys!
jshanab_wcw 15:02 The other thing one could do is put a full path in the loadlibrary call or at least a ".\\" at the beginning?
taxilian 15:02 well, if you're using loadlibrary then there is plenty you can do
but you aren't
jshanab_wcw 15:02 oh, well someone is using it? right? How does the plugin load dependent dlls?
taxilian 15:02 the DLL depends on them so the OS loads them automatically when the DLL is loaded
that's why I was saying that you'd need to delay load the DLLs and maybe that would work
jshanab_wcw 15:02 ok, I see there is a distinction between implicit and explicit dll. Looking at .manifests now
taxilian 15:02 that makes it so it doesn't load the DLL until you try to call a function from that DLL
right
jshanab_wcw 15:02 OK, well I am gonna let this bug simmer for a while and work on something less stressful
taxilian 15:02 jshanab_wcw: it looks like this post indicates that delay-loading the dlls and calling setdlldirectory should work: http://social.msdn.microsoft.com/Forums/en/vcgeneral/thread/0ba82809-add0-43c7-930b-d1cdcadafd84
jshanab_wcw: I think an easy way to try it would be to add /DELAYLOAD:dllname.dll in a set_definitions(...) block in your plugin project and then put the setDllDirectory call in staticinitialize
jshanab_wcw 16:02 Wow, gotta read that again
Will that change the dll for the "exe" , the browser?
taxilian 16:02 probably
http://www.codeproject.com/KB/DLL/Delay_Loading_Dll.aspx
sabotaged|wk 17:02 32-bit plugin running in 64-bit safari; first load is ok. browse away from page, browse back. NpapiPluginModule.cpp line 31 asserts
assert(!PluginModuleInitialized)
anyone seen that before?
taxilian 17:02 hmm. no, but let me glance at it
hmm
they are breaking some rules, then
but maybe that's something unique to mac
can you find out if PluginModuleDeinitialized is true at that point as well?
sabotaged|wk 17:02 it's true as well
taxilian 17:02 hmm. so the browser is calling NP_Shutdown, but not unloading the module
then it calls NP_Initialize again
I guess we could change it to just enforce that they aren't called out of sequence :-/
that's something, anyway
sabotaged|wk 17:02 so things won't horribly break if our module isn't unloaded when it's time to run the plugin again?
taxilian 17:02 well, hopefully not
it depends on your module
as long as you clean things up in the deinit
sabotaged|wk 17:02 ok
taxilian 17:02 good to know, though; thanks for telling me
I'll have to change that in the codebase :-/
could you file an issue so I don't forget?
sabotaged|wk 17:02 sure
taxilian 17:02 or submit a pull request, whichever :-P
sabotaged|wk 17:02 ahah ok
dan2 17:02 taxilian, what is a pull request?
taxilian 17:02 dan2: http://help.github.com/pull-requests/
dan2 17:02 so it's something specific to github?