IRC Log Viewer » #firebreath » 2011-11-28

IRC Nick Time (GMT-7) Message
tchristensen 01:11 Good morning (my time is 9 am). Are there anyone who has worked on making the Mac OS X BasicMediaPlayer plugin play video?
tchristensen 01:11 I believe a plugin that plays http live streams across browsers and operating systems would be very useful and a great alternative to VLC.
raffa 02:11 hi
is there anybody?
linearray 02:11 .ask
FireBreathBot 02:11 If you need help, just ask your question and wait for people to come back.
raffa 03:11 ok thanks
i started developing a plugin with firebreath and i have some problems to understand how the events are processed by the framework
in my plugin class i have registered callbacks for example for the window attached and detached events
but the functions are never called
i didn't understand what i'm doing wrong..
linearray 05:11 well
did you start out with a new plugin, generated by fbgen
do you run the latest version of firebreath
and did you try another browser?
raffa *highlight
raffa 06:11 hi linearray
i started with a new plugin generated by fbgen
i got firebreath from git, latest version
and i tried with both IE9 and firefox
linearray 06:11 and what are you trying to do in the event handler?
raffa 06:11 at the moment i just want to receive the event.. :)
linearray 06:11 I understand, but how do you know?
raffa 06:11 but what i need to do is to draw some openGL code in the browser..
i put a breakpoint in the callbacks
and those breakpoint are never reached
in my .h file i have
EVENTTYPE_CASE(FB::AttachedEvent, onWindowAttached, FB::PluginWindow)
virtual bool onWindowAttached(FB::AttachedEvent *evt, FB::PluginWindow *);
but the implementation of this function is never called
linearray 06:11 hmm, strange
oh well
I suggest you stick around until the boss comes back :)
raffa 06:11 :)
in the meanwhile i try with another question
the plugin need to download a file.
i have subclassed the DefaultBrowserStreamHandler
and i successfully open a stream to download the file
but i didn't understand exactly how i should implement the code to download a file..
i receive the first two events, StreamCreatedEvent and StreamOpenedEvent, but then i never receive a StreamDataArrivedEvent
in the callbacks of created event and opened event i do nothing..
linearray 06:11 huh
best I can suggest is to take a look at FB::SimpleStreamHelper
taxilian 08:11 good morning
linearray 08:11 hi
taxilian 11:11 bizarre… last week was again the highest traffic week to date for
and last week was a holiday in the US
linearray 11:11 do you have stats for individual days?
taxilian 11:11 yes
thursday and friday were the lowest of the weekdays… but still had 432 and 367 hits
this last month is about 20% higher traffic than the previous highest
I don't know what is causing the spike in traffic
manoj 13:11 hi guys... i wanted to link some of the DirectX libraries into my FB plugin, but lack of linking experience fails me miserably
would this be the goto place?
mohito 13:11 hi
taxilian 13:11 hello
manoj: yes, those are the correct instructions
mohito 13:11 I just downloaded FB and managed to build Plugin Test. I'm not very familiar with C++ but can you tell me is it possible to use FB to make plugin that uses other DLL which call web service and get XML and then to parse this XML and make JSON from it and pass it to JavaScript?
taxilian 13:11 yes
though using other DLLs from a plugin can be a pain
you have to make sure that it finds them
mohito 13:11 ok, what's the best way to do it?
taxilian 13:11 depends. many have reported success with delayloading the DLL and then using SetDLLPath
you may not have any trouble, if you keep the extra DLLs in the same dir as the plugin DLL
you'll just have to try it and see what happens
mohito 13:11 ok will try to do that. What's some good resources or tutorials I can use to see how to parse XML ?
Also, can I pop up window from FB to make user enter pin code?
taxilian 13:11 !lmgt xml C++
.lmgt xml C++
FireBreathBot 13:11 Let me google that for you:
taxilian 13:11 you can pop up a dialog, but be careful; you can't use a modal dialog on the main thread
linearray 13:11 why not?
taxilian 13:11 because a modal dialog blocks
and you can't block the main thread
linearray 13:11 what happens if you do?
taxilian 13:11 if you do, the whole browser will lock up and/or your plugin will get killed by the browser
mohito 13:11 so normal dialog will do it?
taxilian 13:11 normal dialog will work, but could get pushed to the background
I'd use a modal dialog on a different thread
but that's me
it's just platform APIs
linearray 13:11 I was told this is a bad idea in Cocoa
taxilian 13:11 whats that? a modal dialog on a secondary thread?
linearray 13:11 yes
taxilian 13:11 dunno. it works fine for me
on all browsers
windows it definitely works
but I can only share my experience; this isn't a plugin question, so it's outside of my expertise =]
linearray 13:11 I have a workaround for cocoa that I will push once I did the windows part
mohito 13:11 you can use it as you are familiar with C++. I'm working with Java since its beginning but now I got project to make plugin :(
I used to use C++ a lot like 15 years ago but I forgot everything and at that time I wasn't using objects
taxilian 13:11 well, this'll be a good opportunity to better understand Java, then… ;-) (since Java is written in C++...)
linearray 13:11 just use Boost!
taxilian 13:11 well, yes, boost will give you a lot of hte datastructures that you don't have from Java
pay particular attention to shared_ptr and weak_ptr; they don't give you garbage collection, but they do give you reliable reference counting
linearray 13:11 then you'll spend less time dealing with c++ and more time learning the library hehe
I switched half my shared_ptr to auto_ptr
taxilian 13:11 be careful with auto_ptr
linearray 13:11 initially I thought I'm not gonna deal with any smart_ptrs besides shared_ptr
taxilian 13:11 there are many times when scoped_ptr would be a better choice
linearray 13:11 but auto_ptr is actually an asset
taxilian 14:11 as a general rule of thumb, always use scoped_ptr unless you specifically need an auto_ptr
the reason being that it's far easier to accidentally shoot yourself in the foot with auto_ptr
linearray 14:11 yeah, I specifically need the semantics :)
taxilian 14:11 semantics?
linearray 14:11 of auto_ptr
taxilian 14:11 meaning the ability to pass ownership around?
BenjaminPoiesz 14:11 This may be a bit more general plugin question. But has anyone seen behavior in Lion with Safari 5.1.1 unloading your plugin when you minimize the browser window to the dock?
linearray 14:11 yes
taxilian 14:11 hmm. I have never seen that
mohito 14:11 Where is fire_echo(msg, n++); method defined?
BenjaminPoiesz 14:11 to the auto_ptr question, banned them for the team a while ago and use shared/weak_ptr work for all our cases. Had some real nasty problems with auto_ptr created by someone not really understanding what they were doing and the implications.
taxilian 14:11 mohito: it's defined by a macro
BenjaminPoiesz: yeah, the difference between passing an auto_ptr by value and by reference is a *really* big and critical one, where most types it's just a performance implication
linearray 14:11 passing auto_ptr by reference seems to be a recipe for disaster
taxilian 14:11 it can definitely lead to some unexpected behavior
mohito 14:11 I guess I'll need few lessons on "modern" C++ :)
taxilian 14:11 !findfile FBTestPluginAPI.h
FireBreathBot 14:11 Found 1 matching file(s) in the master branch. First 1 are:
taxilian 14:11 !find events
FireBreathBot 14:11 Could not find any tags matching events
taxilian 14:11 !wiki events
FireBreathBot 14:11 8 results found. Note: Results limited to 8
"Firing Events from JSAPI":
"Event models and drawing models":
"Mac Plugins":
"PluginCore base class":
"FireBreath 1.6.0 Release Candidate 2 released!":
"Handling downloads using FireBreath":
"FireBreath 1.5.0 Released!":
linearray 14:11 mohito: Accelerated C++ is a good book (for the most part)
taxilian 14:11 mohito: that's actually a slightly unusual case. For info on the fire_* method definitions, see the firing events from JSAPI page
mohito 14:11 linearray: thanks, will look at it
taxilian 14:11 also
linearray 14:11 taxilian: one example is my socket buffers. If everything goes well I pass ownership to a different class, if it doesn't I want the network class to retain ownership
taxilian 14:11 makes sense
mohito 14:11 Are there any security restrictions like in Java sandbox if you use FB?
taxilian 14:11 in IE you may be in low integrity mode
otherwise, no
mohito 14:11 Is it possible to get source for FBTestPlugin as one zip?
taxilian 14:11 its' in the FireBreath codebase
just download FireBreath; it's in the examples directory
there are instructions for building it on the website
read through the getting started pages
mohito 14:11 ah found it, thanks :)
I think it'll be good example to start with everything
Then I'll be back here to fill you up with more questions
Thanks for your help and good night everybody!
Rickk 17:11 is there a way to catch a "closed tab" message in the plugin?
and "closed browser"
taxilian 17:11 nope
but you can tell when the plugin is about to be removed from the page
which may happen when the page and/or browser closes
that would require knownig about the browser, rather than just knowing about the page
plugins only know about the page
Rickk 18:11 So I guess I should develop an extension (instead of a plugin) for every browser and for every OS separately?
taxilian 18:11 if that's what you need to do, then yes
Rickk 18:11 I am not quite familiar with browser plugin/extension terminology.. So I'm trying to figure out what i need to delve into to get my external application notified about closed tabs and the corresponding pages URLs (text from the address bar) for each of this tab.
taxilian 18:11 that would definitely be an extension problem
you can't do that with a plugin
Rickk 18:11 thanks