IRC Log Viewer » #firebreath » 2011-07-04

IRC Nick Time (GMT-7) Message
FireBreathBot 01:07 JIRA issue issue created by hiroshi
ArthurTent 04:07 hello
I tried to generate my own new plugin project with
but somehow i receive a lot of error messages from inside the python script
first, the python interpreter was complaining about syntax error at print statements like this: print "Parent of %s is %s" % (dirName, parentDir)
so, i added a # in front of each line where a print command was...
after i removed all prints, i receive this error: C:\sdk\firebreath-src\firebreath-dev>python Traceback (most recent call last): File "", line 20, in <module> from ConfigParser import SafeConfigParser ImportError: No module named ConfigParser
i tried the fbgen on mac, and it worked like a charm...
any idea, why it doesn't at windows?
ArthurPennt 04:07 hi
ArthurTent 04:07 hi
is there a way of moving/porting the mac generated project to windows?
i read somewhere, that you have to setup a project on all platforms with the fbgen tool
but what, if the fbgen tool doesn't run?
someone-noone 04:07 Hello! I'm tryin' to make media player plugin based on BasicMediaPlayerPlugin and ffmpeg libraries. In the example i've found code that draws rectangles (mac version test.html). Here i can see that it uses RGB color scheme. But in ffmpeg it's faster (for CPU) to use YUV format. Is it possible to draw YUV pictures(without converting to RGB) on surface?
ArthurPennt 04:07 dont expect to receive an answer here... the chat is quite dead and the firebreath people aren't really a help, regarding answering questions...
expect to receive answers like: RTFM
"it seems that you should start with 'getting started' pages"
someone-noone 04:07 don't think so. People i have met here were always polite :D
ArthurPennt 04:07 polite, yes.. maybe... but useless
someone-noone 04:07 i guess taxillian could help me. But unfortunately i can't meet him when he is not "away" :(
ArthurPennt 05:07 same here... i was asking question regarding an opengl rendering context plugin... some1 told me, that's quite easy, and i found posts from richard, where he wrote: sure, no problem... easy cheesy... but why there is no example available, when a lot of people are asking for the same issue
is your fbgen script working on windows?
it only works at mac for me
the windows fbgen script quits with errors... first, it complains about syntax error (in a print statement)
jlaire 05:07 ArthurPennt: check your python's version
someone-noone 05:07 i have no windows :D
jlaire 05:07 that error sounds like python 2 vs. 3 mismatch
someone-noone 05:07 what was your question about opengl?
ArthurPennt 05:07 well, richard wrote, that you have to cast pluginWindow* to pluginWindowWin* in the onattach method.
but there is no suitable parameter for casting
i'm not sure about this syntax: bool FBTestPlugin::onDetached( FB::DetachedEvent *evt, FB::PluginWindow* )
i'm missing the parameter name...
someone-noone 05:07 bool BasicMediaPlayerPlugin::onWindowAttached(FB::AttachedEvent* evt, FB::PluginWindow* win)
isn't it here?
jlaire 05:07 you can leave it out if you don't use it
ArthurPennt 05:07 check FBTestPlugin
jlaire 05:07 one way to avoid compiler warnings about an unused parameter
ArthurPennt 05:07 so, if i add a var name, i can do the same with inside fbtestplugin::onDetached
ok, i think that helped me. will try it later when i'm at home
to the fbgen error. I'm using python 3.2 on windows and 2.6 on mac. so you're right with the different python 2 and 3 versions. will try installing python 2.6 on my windows mashine. hope this will help
ArthurPennt 05:07 python 2.7 works as expected. thx for the python 3 python 2 hint
someone-noone 05:07 what difference between "invalidating core animation" and "core animation" ?
linearray 05:07
someone-noone 05:07 thx
jlaire 05:07 ArthurPennt: when asking for help or reporting bugs, it's good to mention your platform and relevant version numbers etc.
too much info is rarely a problem
too little can frustrate everybody
ArthurPennt 05:07 jlaire: i now learned that ;-)
jlaire 05:07 :)
someone-noone 05:07 I'm reading the code of BasicMediaPlayer and trying to understand how it works. I can't find where property "drawingModel" is read. Is it some "default" property or what?
dougma 05:07 looks to me like it's read in NpapiPluginMac::init
linearray 06:07 someone-noone: my goal is quite similar to yours. However I'm still thinking about using VLC's player plugin instead
in fact, I put off the decision on that and work on the easy stuff for now ;)
someone-noone 06:07 VLC has own problems that i couldn't solve. I've already tried that way. My goal is to make plugin that can play video that is receiving from p2p-network.
linearray 06:07 I see
someone-noone 06:07 I already can do it in program on Mac, Win and Linux using ffmpeg+libevent+SDL
now all i need is to change SDL to other drawing mechanism that works on browsers
i need only one thing - draw picture on surface as fast as possible
all other stuff is already done
linearray 06:07 nice
how long did it take you?
someone-noone 06:07 i've started this project on September 2010
linearray 06:07 well, good luck
someone-noone 06:07 thx :)
linearray 06:07 I've seen lots of people use VLC's framework for their players
maybe I'll go that route
someone-noone 06:07 When i tried to make VLC player on desktop i've met many problems. I tried different mechanisms like : qt+vlc, gtk+vlc and some others. In theory it should be done in "one click". But there is a lot of hidden problems that you should to understand and that is not described in their API. Also feedback for developers is quite bad i think. Because some of my topics were deleted without any reason(yes, i've read rules), some wa
linearray 06:07 your sentence was cut off at "some wa"
someone-noone 06:07 some was answered like "it is some system error but i don't know what is it" and closed.
linearray 06:07 hehe
I was hoping that VLCframework would have tons of code and usage samples
someone-noone 06:07 Another reason is that i'm using own video-container that is suitable for p2p video exchange and can support "live" streams. So i need to write some patch for VLC player to support it. It is real to implement but it needs some time. Instead i'm using a native ffmpeg player which is understanding my container "from box"
yes, it is. But you may face some hidden OS-specific problems
linearray 06:07 hmm
someone-noone 06:07 but i think that if you don't need some specific things VLC is the best choice
linearray 06:07 Ideally I'd just like to use the plugin :)
parameterize it the way I need it and be done
someone-noone 06:07 what is your complete task?>
linearray 06:07 similar to yours, get video from a number of sources and play them in the browser
only standard formats
but it needs to be streaming... so it should handle incomplete data
etc. :)
graykos 06:07 hello
someone-noone 06:07 vlc can read incomplete data like np
linearray 06:07 good to know
someone-noone 06:07 you can even test it by yourself. Start to download any avi\mkv file with your browser and open it in VLC. You will see the warning that positioning is not correct and you may choose "auto-correcting mode". After that your video will start to play. You may even use Fwd\Re buttons/
linearray 06:07 cool
ArthurPennt 06:07 imho needs vlc the complete file for auto-correcting mode... it's recreating the indices
so, it may not work for streamed data
someone-noone 06:07 why it will not work? It will
ArthurPennt 06:07 because, if it needs the complete file for recreating the indices, than you won't be able to fast forward/backward unless you got the complete file, recreated the indices... just a thought
antoher question regarding firebreath: i created a new plugin with the fbgen script. i added a draw method, semilar to the draw mwethod from basicmediaplayer. now the problem: when i try to compile, than I receive the error "virtual bool draw(FB::RefreshEvent *evt, FB::PluginWindow*); - "'RefreshEvent' : is not a member of 'FB'"
the method "draw" is copy/pasted from the basicmediaplayer
someone-noone 06:07 Container file is a mix of video and audio raw parts. Several parts are united into block (in most containers). Every block has it own index. When you are downloading next block, you can jump on it like np. So you don't need complete file to do it. AVI container wasn't designed to support "streaming". But nevertheless smart players like VLC supports streaming. MKV is supporting streaming. Mpeg-ts, flv was designed for strea
linearray 06:07 hehe, cut off at "flv was designed for strea"
you really need to hit enter more often ;)
someone-noone 06:07 Mpeg-ts, flv was designed for streaming.
linearray 06:07 k
ArthurPennt: do you have the necessary includes?
someone-noone 06:07 i think developer of qwebirc has forgotten that IRC-message is limited to 512 bytes and it should be limitted in text-box too :)
linearray 06:07 hehe yes
ArthurPennt: RefreshEvent is in DrawingEvents.h, which is included by PluginEvents/MacEventCocoa.h
maybe that's the reason
ArthurPennt 06:07 yes, was missing to add #include "PluginEvents/DrawingEvents.h"
graykos 07:07 what should i include to use FB::HeaderMap?
linearray 07:07 SimpleStreamHelper.h
hint: if you don't know where something is declared, just 'grep -r something firebreath/src'
or if you prefer, this also works fairly well:
jlaire 07:07 there's also 'git grep something'
and all editors/IDEs should have some kind of search functionality
someone-noone 07:07 btw, what IDE do you prefer for developing on firebreath?
linearray 07:07 i'm using xcode4 right now
jlaire 07:07 I used code::blocks and vim
and vs on windows
ArthurPennt 07:07 well, my IDE (Visual Studio Exp.) keeps crashing when I search FB declarations...
i think i got to install unix tools on my windows system... the grep thing looks more promising and faster ;-)
ArthurPennt 07:07 my opengl test plugin is working.
i will later add the source and make it available, so others can take a look
linearray 07:07 cool
ArthurPennt 07:07 thanks a lot to all that helped :)
here's the source
but no detach function atm. so this still needs to be done
ArthurPennt 08:07 another thing: now, the opengl context is inside the browser... so far so good. but the triangle isn't rotating as expected. do i have to call some extra update functions? i thought, everytime the browser calls the plugin, it calls the "draw" function... can some1 take a look at my source above and tell me if/what I'm doing wrong :-$
ArthurPennt 09:07 weird. my triangle only rotates, when i move my mouse over the plugin. how can i update it regularly instead of a mouseover?
ArthurPennt 09:07 hello taxilian
taxilian 09:07 ArthurPennt: If you are going to complain about people here being useless you may want to first check what answerswehave tried to give you
I answeredyou yesterday but you never responded
It is 9am here... I just got going for the day. Not usually online before thator on Sundays
ArthurPennt 09:07 i answered to your mail. you didn't received it?
taxilian 09:07 I answered you in the channel as well. if yours are the posts on the list, I did receive them and haven't had a chance to answer them yet
also my internet connection is still down, which is somewhat annoying; I
ArthurPennt 09:07 :(
taxilian 09:07 I'm tethering currently on my ipad
I tried leaving a message for someone-noone but he keeps using a different screen name
ArthurPennt 09:07 but hope you enjoy your free day. you got holiday today, right?
taxilian 09:07 if you use the same nick on IRC each time then I can leave messages with FireBreathBot, but he doesn't deliver it if you use a different nick
yes, today is a holiday here
I'm going to try to finish cleaning my office
ArthurPennt 09:07 well, i want to create a regularly updated opengl rendering context. the context now is rendered, but I still got problems with updates.
hehe, good luck ;-)
taxilian 09:07 if you're going to use openGL on windows you really need to create a new thread and do all opengl stuff on the secondary thread
ArthurPennt 09:07 imho it's the same as with webgl canvas
taxilian 09:07 webgl is javascript driven, so I have no idea what it does thread-wise; but tha'ts one reason to be on your own thread, so you don't interfere with webgl
FireBreathBot: tell someone-noone I tried to leave you a message with FireBreathBot but you used a different nick. Tell me what the problem you have is and when I get in I'll try to help by leaving you a message. Alternately, ask on the forums; I'
FireBreathBot 09:07 taxilian: I'll pass that on when someone-noone is around.
taxilian 09:07 FireBreathBot: tell someone-noone I am not usually online during the night (my time) which is usally when you come in
FireBreathBot 09:07 taxilian: I'll pass that on when someone-noone is around.
ArthurPennt 09:07 i read from richard (you?) a thread about moving the enableopengl function in the onattach method. I'm using the "draw" function in the refreshevent. is there a FB method that is called regularly?
can you take a look at the src? .cpp file: .h file:
taxilian 09:07 yes, I am Richard. refreshevent is only called on a WM_PAINT
and that's on the main thread
ArthurPennt 09:07 where should i place the thread for opengl?
taxilian 09:07 I have learned since then that it's better (sometimes required) to create your own thread and render loop
ArthurPennt 09:07 ah, k
taxilian 09:07 start it in AttachedEvent, stop it in DetachedEvent
ArthurPennt 09:07 well, i really wanna get this working. if i did, i will share the example
taxilian 09:07 and then make sure you have some way of sending a message so you can send the RefreshEvent somehow and tell it to redraw
ArthurPennt 09:07 do you know, if i got to take care about update events from the browser? or will it be completly seperated and free? atm. my rotation only works, if i resize, or click a html test link
taxilian 09:07 because when you get a RefreshEvent you should redraw whatever you have
though if you are drawing 30fps it won't matter
resize may be an issue
clicking a link will close the plugin
you'll get a DetachedEvent and then shutdown() will be called
ArthurPennt 09:07 ah, and reload
taxilian 09:07 same thing
ResizedEvent would be good to handle on windows, though
ArthurPennt 09:07 sure, i mean... it will be detached, and reloaded
taxilian 09:07 all PluginWindow related stuff is different on Macv
it would be really neat if someone could create a wiki page with some of this on it
ArthurPennt 09:07 well, my goal is a linux, mac and windows opengl rendering context
taxilian 09:07 and you would be a great candidate, since you know what was confusing that you didn't understand what was there. =]
ArthurPennt 09:07 if i got it working, i will share my code/examples
taxilian 09:07 I have never been able to get opengl working on linux, though others have
ArthurPennt 09:07 i take it as a compliment ;-)
taxilian 09:07 that would be great
it's amazing how many people get all frustrated that the docs aren't up to date, but they won't update them themselves
I'm happy to document every line if someone wants to pay me to do it; until then, I know every line and don't need it, so I'm happy to answer questions but I leave most of hte documentation to users
there is just only so much I have time to do
ArthurPennt 09:07 sure
well, i know where i can find you ;-)
taxilian 09:07 I will however update the docs if someone writes them and they aren't quite accurate
or need to be fleshed out
ArthurPennt 09:07 got to go... talk to you later...
taxilian 09:07 good luck
ArthurPennt 09:07 can i edit the wiki aswell?
taxilian 09:07 yes
just create an account
ArthurPennt 09:07 ok
taxilian 09:07 anyone can
ArthurPennt 09:07 will do
cu later :)
taxilian 09:07 thanks =]\
linearray 09:07 maybe we should make the entire line red
taxilian 09:07 and I am going to go shower and eat breakfast
linearray 09:07 and insert <blink>
taxilian 09:07 lol
haven't they removed that tag yet?
linearray 09:07 clearly italic and red CAPS are not enough :)
taxilian 09:07 I'll be back in an hour or so, I hope.
linearray 09:07 it still works
taxilian 09:07 lol. this is true =]
linearray 09:07 later
i stand corrected, it does not work in webkit
jlaire 09:07 bold italics underlined red caps (lol)
NoAntzWk 09:07 Hi taxilian!
linearray 09:07 ha, firefox does it nicely
at leasy <marquee> works everywhere
NoAntzWk 09:07 Just a question.... why there are a setTimeout(pluginRunTests, 500) call on pluginLoaded() event?
It seems that is not necesary, isn't it?
Anyone have any idea?
linearray 10:07 what happens when you remove it?
NoAntzWk 10:07 Nothing... it seems that it works.
The question is that is necessary or not.
linearray 10:07
NoAntzWk 10:07 I don't know if the elapsed time (500 ms) has been introduced to solve an issue (in some scenario) or as protection.
linearray 10:07 maybe this has something to do with it
although that line has been in the source for much longer than that
NoAntzWk 10:07 Yes, I know.... I'm running 1.5.2 and the Richard explanation it's usefull and justifies the timeout. using the 1.5.2, is the timeout mandatory?
Reviewing last FBexample versions, the timeout still there and called on pluginLoaded() event.
taxilian 10:07 NoAntzWk: I can't remember where I fixed it to add the timeout from withing FireBreath
there does need to be a timeout for ff4, but I added one into FireBreath itself at some point
I think before 1.5.2
so you shouldn't need it
someone-noone 11:07 taxilian
FireBreathBot 11:07 someone-noone: 15:40Z <taxilian> tell someone-noone I tried to leave you a message with FireBreathBot but you used a different nick. Tell me what the problem you have is and when I get in I'll try to help by leaving you a message. Alternately, ask on the forums; I'
someone-noone: 15:40Z <taxilian> tell someone-noone I am not usually online during the night (my time) which is usally when you come in
someone-noone 11:07 hello!
taxilian 11:07 howdy
stop changing your screen name and I would be able to send you messages through FireBreathBot
someone-noone 11:07 fine! It's great that i've met you again!
okay, my nickname will be someone-noone
i have several questions
taxilian 11:07 .ask
FireBreathBot 11:07 If you need help, just ask your question and wait for people to come back.
taxilian 11:07 that's the other thing; if you have questions, just ask them; I'll see them when I get back
someone-noone 11:07 okay, ty. I will try to describe my question in general that you will understand what i'm trying to do (maybe my steps is wrong).
Sajty 11:07 Hi taxilian!
taxilian 11:07 hey
Sajty 11:07 How was your weekend?
taxilian 11:07 not bad
except that my internet went down and is still down
which really ticks me off
Sajty 11:07 ISP? :D
taxilian 11:07 yeah
it's a local ISP
I am considering changing to comcast
Sajty 11:07 I hate mine isp too :D
taxilian 11:07 would cost more, but I can get faster speeds and they don't go down as much
someone-noone 11:07 So, i have program that is decoding video in raw pixel data in YUV format. Video is decoding and synchronizing in several threads. In one thread i have each frame decoded which should be painted. Is it possible to draw YUV data?
taxilian 11:07 someone-noone: it depends on your platform; on Mac, yes
someone-noone 11:07 win, lin?
taxilian 11:07 on windows, it depends on your graphics card
ATI cards I have been able to, nvidia not
Sajty 11:07 The problem here is that there is no other fast ISP, so I can't change :(
taxilian 11:07 alternately, you can use a shader to convert from YUV to RGB on some cards
but none of that is plugin-related; it's all platform APIs and hardware acceleration
so it's not really inside the scope of this channel
Sajty: yeah, I've been in that situation before
fortunately where I am now there are a few choices
Sajty 11:07 taxilian: Back to firebreath, have you tested log4cplus on linux? The plugin is not starting up if I enable it.
I use fb 1.5.2
taxilian 11:07 yes, I have used it on linux
but it has been awhile
does FBTestPlugin work?
Sajty 11:07 yes, because its not using log
taxilian 11:07 yes it is
FBTestPlugin has log4cplus enabled
Sajty 11:07 hmmm then I will check that again
someone-noone 11:07 Okay. I understand this. Then my question is: should i convert YUV to RGB with ffmpeg (no hardware acceleration that costs +30% CPU time) or there are more common methods in NPAPI and others?
taxilian 11:07 NPAPI knows and cares nothing about pixel formats or rendering
30% CPU time is way higher than you should need; what is the resolution of your video rect?
someone-noone 11:07 ah... So i need to use only OS-specific i right?
taxilian 11:07 pretty much. the only thing you need to be careful of is to understand the drawing models that are available to you on mac
or if you want to support windowless plugins
Sajty 11:07 taxilian: Am I right that keyboard input is not working on linux? Do you have how can I enable it? I have tried X11Event too, but the event is not sent to the window
taxilian 11:07 Sajty: most likely nobody has implemented it yet
unfortunately I don't know much about drawing on linux
someone-noone 11:07 I can't tell you exact video resolution. But i can tell you that it will be some HD 1080p so i'm interesting in each %cpu
taxilian 11:07 I have never needed it enough to spend much time on it
someone-noone 11:07 What do you mean about "windowless"?
taxilian 11:07
on windows it's easiest to understand; with Windowed you get an HWND, with windowless you don't
Mac is always windowless
Sajty 11:07 taxilian: Then I will try to solve the keyboard input on linux.
taxilian 11:07 when you don't get an HWND you just get a hDC and must draw whenever instructed (in response to the draw event)
Sajty 11:07
taxilian 11:07 Sajty: that would be cool. The PluginWindowX11 may need to change to really be flexible enough to support all it should
someone-noone 11:07 i will read that and ask next question..
Sajty 11:07 Basically what I want is to use SDL for input and Ogre3D for drawing. I've got it running on windows and linux, but on linux the keyboard events are not working at the moment.
taxilian 11:07 Sajty: I wish you luck =]
someone-noone 11:07 Sajty: I don't know exactly, but on mac it's impossble to have several event loops(but windows can) at one time. I've similar problem with SDL on mac and i've solved it by integrating SDL events into main loop of my application. Maybe it can help you...
taxilian 11:07 someone-noone: what do you mean by several event loops? on mac with plugins you have to handle the events that the browser sends you
you don't *get* an event loop
and on windows you only kinda do
someone-noone 11:07 Several event loops = several event loops in different threads
on mac you can have event loop only in main thread
i mean that one process can have only 1 event loop on mac
for example, if you are using wxWidgets and SDL then you need integrate SDL event's into wxWidget (or in other way). But if you will try to catch events in different threads you will got crash
Sajty 11:07 On linux I needed to change PluginWindowX11.cpp to solve the input.
The reason is this:
I have requested the events manually for the SDL window, but button presses can only be sent to single client
I have tried gtk_widget_set_events, but then it still gives me a BasAccess error.
taxilian 11:07 what we need is a way to configure the PluginWindowX11 so that you can either subscribe to the events yourself or you can use the FireBreath ones, since you aparently can't do it both ways
the default should be that FireBreath events are used
but we should be able to override it
so that what you're doing will work
Sajty 11:07 yeah would be really nice!
taxilian 11:07 I can think of a few ways that could be done syntactically, but I can't do the work
because I don't have a plugin to test on
and, frankly, I don't need it
if you'd like to do it I can provide some guidance
someone-noone 11:07 taxilian: So if i want to use only Core Animation and it can be done only in windowless mode (now i understand why flash is so hungry :D) what is a good place to start in Firebreath? I need to inherit PluginWindowMacCA ?
Sajty 11:07 If you give guidance for the interface, I could do it, but thats low priority at the moment. First I want to fix keyboard focus on linux and try to implement it on osx.
taxilian 11:07 someone-noone: you just need to tell it to only allow CoreAnimation as the drawing model and that's what you will be given. it's a setting in PluginConfig.cmake
Sajty: basically you just need to change it to accept a parameter in the constructor (possibly an enum, so we could have multiple modes)
!findfile PluginWindowX11
FireBreathBot 11:07 Found 2 matching file(s) in the master branch. First 2 are:
someone-noone 11:07 And after that i need to implement some onDraw () event or what? Where can i draw my frame?
taxilian 11:07 someone-noone: BasicMediaPlayer has an example of drawing with CoreAnimation
the PluginWindowX11 object is created by a factory function which you can override to create a different object; the customization could simply be to override it and pass a different parameter into the constructor
Sajty: so bascially you'd just check that parameter (enum, bit mask, whatever) and it would tell it whether to register for events, whether to create the container, whether to create the canvas, etc
I'm not sure what level of customizability makes sense
Sajty 11:07 Later I want to provide online java installer, is there any limitation with this on any platform?
taxilian 11:07 yeah; java support on Windows is sometimes hard to detect and buggy
but good luck =]
and of course if you don't have java support installed on linux you're up a creek as far as using it
someone-noone 11:07 okay. I've already read that sources this day. But it is hard to me to understand everything. First, i don't understand Objective-C code. I can't understand what is going on in "drawInCGLContext" and when how one of the onDraw methods is selected in runtime
taxilian 11:07 someone-noone: that's a CoreAnimation question, not a plugin question
and frankly I don't have time (nor necessarily knowledge) to teach you how to use CoreAnimation today =]
linearray 11:07 on the upside, coreanimation docs are plentiful
someone-noone 11:07 okay, np. You've already given me enough information to think this evening :)
Btw, do you remember me?
taxilian 11:07 you're Russian, no?
someone-noone 11:07 no, i'm ukrainian :)
taxilian 11:07 sorry, I meant language speaking :-P
I realize that's a big difference
my bad ;-)
someone-noone 11:07 No problem. Actually, we (ukrainians) got used to be called russians. So we don't resent :)
taxilian 11:07 heh. some I've met do =]
someone-noone 12:07 It's very hard question for us, our country was divided in two countries that was under Austrian\Poland Empire(West Ukraine) and Russian Empire(East Ukraine) control for a long time. So we have 2 nearly different nations in one nation now. And some of us are getting angry when someone are calling us either russians or austrians or someone else :D
But smart people don't pay attention on it :D
taxilian 12:07 hehe. it has been said that "He who takes offense when none is intended is a fool. He who takes offense when offense is intended is an idiot"
someone-noone 12:07 nice :)
but i understand... you should never talk to ukrainian that he is russian language speaking... It's because now ~50% of people is talking russian and other part is talking ukrainian. And the bad thing that ukrainian speaking people is getting less year by year because of russian propaganda. That's a reason of loathing and that's why they were resent.
Sajty 12:07 taxilian: Is it possible to force reload the plugin? We have lot of static memory and singletons and we can only handle single plugin window at a time, but if that instance is closed, I need to free and reload the plugin memory to reset singletons and reset static memory to startup value.
taxilian 12:07 hehe. fair enough
Sajty: no, there is no way to force the plugin to restart
the solution to your problem is to not use static memory in that way
you can reload an instance, but not the module
singletons and static resources can be used safely in a plugin, but you really have to know what you're doing
and it needs to be set up so it gets released in StaticDeinitialize
what I normally do is instead of making something truly static I make a static shared_ptr to it
then I initialize the shared_ptr in staticinit, reset it in staticfinit
that way the only truly static variables are smart pointers with a very small amount of memory to free
also keep in mind that if you have any static objects that create threads they will be freed during DllMain, which will prevent them from stopping their threads
Sajty 12:07 Yeah I had problems with shutdown, but It's now fixed by joining the threads on StaticDeinitizalize. Also each thread has its own weak pointer for the main plugin object, so they can work independently from the plugin.
Removing static stuff would be huge amount of work with current sources, nearly impossible. Then I will use my current strategy. The resources will not be free-ed until StaticDeinitialize. And If a new window is opened, it will use the last sessions program, just reloads the level.
taxilian 12:07 this is why I cringe any time people start using globals and statics
it's just not plugin-friendly
unless you really know what you're doing
I actually use them semi-regularly, but very very carefully
kalev 12:07 I have a singleton to what I keep a shared_ptr in each of the main plugin API objects, so that when the last API object is destroyed and the shared_ptr's ref count drops to 0, the singleton also gets destroyed.
taxilian 12:07 that is another way to do it
kalev 12:07 there's a static weak_ptr in the singleton class and a getter which runs .lock() and returns the shared_ptr
Sajty 12:07 Yeah, really nice ideas, but for us even the dependency libraries are incompatible with plugin. :(
Keeping the plugin in memory until StaticDeinitalize consumes 400 MB of ram. :D
On windows, thanks to the runtime linking for mingw support, I can unload and reload the game, and all static memory are reset.
taxilian 12:07 hmm. actually, that would be a thought
if you put all your static stuff in a shared library (dylib on mac, .so on unix) you might be able to unload those
the plugin itself can't unload, but that doesn't mean you can't have your own shared library that can
Sajty 12:07 Yeah, plugin for the plugin. :P
taxilian 13:07 git pull requests
FireBreathBot 13:07 2 open pull requests:
dougma: detect disappearing async callback delegate
dougma: fix crash seen at page nav/shutdown
FireBreathBot 15:07 Commit 09e5f91 on master by dougma: "detect disappearing async callback delegate"
Commit 323f2c3 on master by Richard Bateman: "Merge pull request #23 from dougma/disappearing-delegate
Commit da0fc23 on master by Richard Bateman: "Merge pull request #22 from dougma/COMJavascriptObjects-weak..."
Skype 16:07 Hi all, if I want to use Boost 1.46.1 (shared across other projects) with FireBreath are there any issues I need to be aware of?
taxilian 16:07 not that I'm aware of
Skype 16:07 taxilian: this project is really great, the team was really happy with the results of a demo we presented and I have discussed the possibility of donation/contribution from the company for this project if all goes well
taxilian 16:07 I would sure love to see that ;-) you aren't the first to tell me that, but you would be the first to actually make it happen.
(at least on the "if all goes well" part, other companies have contributed)
Skype 16:07 taxilian: me a big fan of open source and run/develop Debian Linux exclusively for years at home, work is M$/Windows and now we use a lot of open source software but a mental shift needs to apply here and we're persuading the company to contribute back possibly financially
taxilian 16:07 I'll tell you this — I respond a lot more quickly to requests and problems experienced by people who contribute back in any form than I do to those who only take
Skype 16:07 FF 3.6 wouldn't load the plugin if the MozillaPlugins/*/Path to the plugin in the registry is too long, where can we capture this in the wiki?
taxilian 16:07 hmm. I'm really not sure; that's definitely something to put in there somewhere, though
Skype 17:07 If I am using external boost it -D Boost_USE_STATIC_LIBS=on the default if I don't specify this parameter?
taxilian 17:07 I honestly am not sure
you know you need -D WITH_SYSTEM_BOOST to use external boost, right?
man, I'm doing some more video tutorials; this is *way* harder than it sounds
Skype 17:07 Yes I am using -D WITH_SYSTEM_BOOST
taxilian 17:07 ok
Skype 17:07 It seems "-D Boost_USE_STATIC_LIBS=on" is required otherwise it can't find the boost static libraries ie. system thread
taxilian 21:07
taxilian 21:07
taxilian 22:07
linearray 23:07 awesome
taxilian 23:07 linearray: did you watch any of them?
linearray 23:07 just watched tut4 part1
will watch the rest once i get out of bed