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

IRC Nick Time (GMT-7) Message
firing 00:07 Got another question: Is there a way to get an iframe's parent url with firebreath? I saw in the tips and tricks section how to get a URL but that is the iframes url
I'm trying to get the parent pages' url
(and title) though Ill gladly do it one step at a time
Tonku 01:07 I want to add a folder under projects/Myproject/Mac folder how can I do it..?
rasmus_ 01:07 hello
i need help converting an FB::variant variable
to char *
is it possible?
someone-noone 03:07 hello!
someone-noone 05:07 jshanab_wcw: hello. Are you here?
jshanab_wcw 07:07 someone-noone Good morning
someone-noone 07:07 morning!
how do you do?
jshanab_wcw 07:07 pretty good but man am I frustrated about SDL-1.3. Removing it again, it just won't work reliably :-(
someone-noone 07:07 dude, use mercurial\git or smth else. That wil save your time if you want to switch back..
jshanab_wcw 07:07 using git, but code was not written to be modular (refactoring now) so there was some manuall stuff to do on all the library packaging and such. Anyway talk about weird I was here really late when the code i was compileing didn't seem to make a difference. Do not ask me how but Visual studio compiled,build and ran, but if you debugged an entire section was not run, cuold not even set...
...breakpoints on it. had to move the very same fiels to another machine. I broke the MS compiler!
1/2 Time was spent on getting it to work, well not work, other half chasing MS bug, rollback takes seconds :-)
someone-noone 07:07 it's weird
i'm also spending most of time on resolving compiler problems, not for coding itself
do you know how(in what order) exact RGBA and YUV pixels are stored in buffer?
jshanab_wcw 07:07 Kinda, but wikipedia has better memory than me. In my case the YUV is planer 420 or 422. It is a single buffer array with pointers at the dividing lines between Y,U,and V. I just copy them into the texture. For directX the texture is of typy YUY2 or YV12 and directX transforms to RGBA for me. Or i use SwScale and it transforms. MSDN also has a great writeup,
I am always reminded on that first image when the colors look entertaining, that MS reverse the display byte order for RGB
someone-noone 07:07 can you look this ?
It works, but channels seem to be not wrong
jshanab_wcw 07:07 k
Actually. I can't look at this in depth right now, (I am at work)
someone-noone 07:07 ok
jshanab_wcw 08:07 If i want to have subdirectories with some classes inside the Win forlder of my project, do I add a cmakeLists.txt to the win folder?
someone-noone 08:07 you should add 'em to projectDef.cmake
with "file" option
jshanab_wcw 08:07 thanks
someone-noone 09:07 hello taxilian!
how are you and your son ?:)
taxilian 09:07 morning
we're good
someone-noone 09:07 that's good!
btw, i've realized precalculated algorithm for YUV 2 RGB
it's slower than sws_scale
taxilian 09:07 huh
sws_scale may use an assembly-optimized version
someone-noone 09:07 and it eats 48mb of RAM :D
they got a lot of optimizations
taxilian 09:07 it what? pb me the code you're using
that doesn't make any sense
someone-noone 09:07
ConvertFrom420 is not working correct, so do not look that
taxilian 09:07 oh… yeah, you're using 3 16MB tables
so yeah, it'll definitely take up that much room
there should be a better way
someone-noone 09:07 i know
but my first goal was to make it at least fast drawing
but i understood one thing
taxilian 09:07 huh; how big are the frames you are converting?
someone-noone 09:07 any video. i was tested on 300x300 and 1000x1000. but imagine it can be some HD hight resolution video
the only way you can "fast draw yuv" is using CA
that 's because you can't just "fast convert yuv to rgb"
you can only "fast convert and draw yuv to rgb"
taxilian 09:07 interesting; we've done software conversion of yuv to rgb on 720p video at least, maybe 1080p (not certain) and the rgb to yuv conversion was only taking something like 2% of the processor cycles during the draw process
and we were drawing on semi-modern computers at 24fps
someone-noone 09:07 and you were using precalculated values?
taxilian 09:07 nope
standard c
or c++
I forget
but it was just a normal algortihm
someone-noone 09:07 if so, than sws_scale should do it at least not slower then your algo
but it doesn't
taxilian 09:07 are you absolutely sure that's where your bottleneck is?
or are you just assuming that it is because things aren't running fast enough?
someone-noone 09:07 i'm absolutely sure
taxilian 09:07 huh
someone-noone 09:07 if so, i will made one more test right now
to be sure absolutely on 100%
you know, you were right.
but, the problem is in drawing
not converting
if you use CA you convert YUV to RGB on card and in that moment you're drawing
but if you convert software and draw... it takes a lot of CPU
i can compare 2 SDL video player
one with software RGB convertion and another with hardware
you will see at least 30% boost
taxilian 09:07 hmm
someone-noone 10:07 one more question: can i access tab's NSWindow pointer ?
taxilian 10:07 nope
someone-noone 10:07 that is bad :)
taxilian 10:07 that is what it is
FireBreathBot 12:07 Commit b676c72 on firebreath-1.5 by Richard Bateman: "Fixed issue with updated version of libcurl and openssl"
Commit 55a1790 on firebreath-1.5 by Richard Bateman: "Added isScriptingOnly() call to PluginCore"
Commit ffdf9c0 on firebreath-1.5 by Richard Bateman: "Fixed minor bugs in HTTPRequest post field generation"
firing 12:07 Hey all! Anyone know how to display a messagebox or alert with a variable?
taxilian 12:07 well, you can use host->getDOMWindow()->alert if you want
firing 12:07 so far when i do: (MessageBox(NULL, myVar, L"hello", MB_OK);
taxilian 12:07 !find alert
FireBreathBot 12:07 Found 3 possible matches. Displaying 3
/^void Window::alert(const std::string& str) const$/ (f) found in src/ActiveXCore/AXDOM/Window.cpp:
/^void Window::alert(const std::string& str) const$/ (f) found in src/ScriptingCore/DOM/Window.cpp:
/^void Window::alert(const std::wstring& str) const$/ (f) found in src/ScriptingCore/DOM/Window.cpp:
taxilian 12:07 don't ever, ever, ever do that
it blocks the main thread
if you need to do a messagebox start a new thread for it
firing 12:07 o ok
firing 12:07 another Q: If I embed my plugin into a page with the parent document and then separately once again in an iframe on the same main page. Do 2 instances of my plugin get created? Basically would I be able to access a property or stored variable from each other?
taxilian 12:07 each object tag has it's own instance
but they all share the same memory space
firing 12:07 according to my testing I think not but just want to confirm becasue I really need to find a way to acces parent url from inside an iframe embedded plugin
taxilian 12:07 so if you're careful with it you can use static or global variables to share data
firing 12:07 hmm I see so would that be different than just a read/write property i create?
because I thought that was global
firing 13:07 Reading up on global vars here: I don't think it will do what I accomplish
Is there any way I can access a parent documents url from inside an iframe?
the code in tips and tricks only get url of iframe
which is not what I want
taxilian 13:07 firing: yes, you could do that by storing a global reference to the parent instance
but be very, very, very careful with that
because it bypasses the native security features of the browser
and if you aren't careful you'll create a plugin that allows malware writers to do so as well
a read/write property is only attached to one JSAPI object, which is general attached to one Plugin object
but you get one Plugin object per instance
per object tag
so if you want to share them, you need a global (or static) variable to store a weak_ptr to the plugin class so you can access it and pull the info in
but again, that's a huge security risk, so be really careful
firing 13:07 Ok my concern was though its seems like if I open a new tab then the gloabl var would change to that new tab and I would not have way of accessing first tab
and my plugin is present on all tabs so if i try to do an action on first tab to get url of page itll actually get second
taxilian 13:07 you'll have to have some way to keep track of them
I did something along those lines once and I just created an instance_id for each plugin; then when I instantiated the one inside the iframe I passed instance_id as a param tag and specified the instance id of the parent instance
then I kept a global map of int -> weak_ptr<pluginobject>
there is no implicit way to just detect which plugin instance is in the parent page that I know of
firing 13:07 hmm ok Thanks for your help. I'll do a bit more research to see if I come up with anything else, i may just have to do it your way or else though I do also fear the security risk
taxilian 13:07 what problem are you actually trying to solve?
firing 13:07 Basically I'm trying to attatch a button to the facebook like button on any site
that button should then fire up a local program i have when clicked on
i successfully implemented in firefox and ie
in chrome though because of security i turned to plugins
the way i attatch buttons right now is when ondocument complete (which actually fires for each iframe) i search for a known id the fb button with have
and then i attatch my button inside frame
problem is i need the url of the main page
because that is point of button: to pass url and title of page
i successfully open up local program on comp with button
just cant get the main url
taxilian 13:07 huh; yeah, I wouldn't want to install an extension that did that anyway
what program is it that you are launching? and why?
firing 13:07 its a messaging client
its to make it easier to share stuff
p.s i wouldnt want a button like that either (main feature is actually the context menu which works already)
someone-noone 13:07 i guess, better way is to associate some url with your messaging client, then installing new plugin on system
firing 13:07 like a web app?
someone-noone 13:07 for example: myproto://open_this
and associate url with your applicaiton
when you click on myproto://open_this browser transfer this request to your app
and you can handle it
firing 13:07 hmm thats an interesting idea but i think i would have same security problem no?
because it is inside an iframe
someone-noone 13:07 don't know
taxilian 13:07 would probably be better to pass whatever the info you needed into the iframe
when you create the iframe
using a protocol handler is annoying; different on each browser
but you could download a file with an extension that was associated with the app you want to run
then when they click it it would prompt them to open with that app
someone-noone 13:07 yeah
it's the easiest way
firing 13:07 too intrusive though, one of selling point of the app is its supposed to be dead simple to use
it will hopefully be used by just average consumers one day
Im considering scraping the button though and just leaving context menu jsut for chrome
im guessing ppl that use chrome will be more tech savvy
and wont want button
someone-noone 13:07 is there any common method of debugging open gl errors? Receiving GL_INVALID_OPERATION when calling glTexSubImage2d, but it's one of 5 possible troubles. I've checked all, but everything is seemd to be ok.. Don't know how to move forward
taxilian 13:07 not a clue :-/
someone-noone 13:07 taxilian: you know what.
i was talking on opengl. And people said me to use Core Video
what do you think, is it possible for browser?
taxilian 13:07 I don't know; if CoreVideo can work with a CGContext, then yes
FireBreathBot 13:07 Commit 3891a60 on master by Richard Bateman: "Fixed PCH on windows to be configuration-specific"
Commit 6e64f45 on master by Richard Bateman: "IE browser set moved to static init"
Commit d16890f on master by Richard Bateman: "Fixed issue with updated version of libcurl and openssl"
Commit e9a921e on master by Richard Bateman: "Added isScriptingOnly() call to PluginCore"
Commit cba0dee on master by Richard Bateman: "Fixed minor bugs in HTTPRequest post field generation"
Commit 90f9f64 on firebreath-1.6 by dougma: "FIREBREATH-113: fix crash by removing _asyncCallData when _s..."
Commit 86b49ae on firebreath-1.6 by Richard Bateman: "Merge pull request #25 from dougma/FB-113
Commit 1fcc879 on firebreath-1.6 by Jonathan "Duke" Leto: "Allow the project directory to be a symlink"
Commit 4941b3d on firebreath-1.6 by Richard Bateman: "Merge pull request #27 from letolabs/symlinks
Commit 3891a60 on firebreath-1.6 by Richard Bateman: "Fixed PCH on windows to be configuration-specific"
Commit 6e64f45 on firebreath-1.6 by Richard Bateman: "IE browser set moved to static init"
Commit d16890f on firebreath-1.6 by Richard Bateman: "Fixed issue with updated version of libcurl and openssl"
Commit e9a921e on firebreath-1.6 by Richard Bateman: "Added isScriptingOnly() call to PluginCore"
Commit cba0dee on firebreath-1.6 by Richard Bateman: "Fixed minor bugs in HTTPRequest post field generation"
rashmi 23:07 hello
is anybody here?
I need help with firebreath code
taxilian 23:07 .ask
FireBreathBot 23:07 If you need help, just ask your question and wait for people to come back.
rashmi 23:07 how do i allocate memory in Firebreath code?
taxilian 23:07 the same way you do in any other C++ application
or program
rashmi 23:07 is der any FB function available for it?
taxilian 23:07 let's back up a bit; what exactly are you trying to do?
and what is it that leads you to believe that there should be anything special that FireBreath does for memory management?
rashmi 23:07 I thought der might b some helper api for it
taxilian 23:07 for what purpose? what problem would it solve?
we try not to solve nonexistent problems =]
rashmi 23:07 ohk i get it
n also
n also i created an installer
which registers d dll with the system
using Firebreath framework
taxilian 23:07 using dllregisterserver?
rashmi 23:07 no! actually using WiX installer
taxilian 23:07 oh, good
rashmi 23:07 so
d installer gives no message as to wer it is writing to system
it just ends after installin
so can i customize dis installer
which says dat u hav successfully installed d plugin
taxilian 23:07 of course
you just need to learn how to use wix
rashmi 23:07 ohk! thnks for ur help
taxilian 23:07 keep in mind that the WXS file in your plugin directory is a template, so you need to run the prep script after changing it
rashmi 23:07 ohk
taxilian 23:07 good luck
Imran 23:07 Hello can some one tell me how to pass string as a parameter actually i got the error when i pass char arrray error discription is as error C2665: 'FB::variant_detail::conversion::convert_variant' : none of the 5 overloads could convert all the argument types
FireBreathBot 23:07 Imran: 28 Jun 15:05Z <taxilian> tell Imran don't use JSAPISimple. Open the code! Read things on the wiki! Search for "interacting with javascript". Your very question shows that you haven't read very much, because all the answers are tehre
taxilian 23:07 Imran: what was the exact datatype you were using?
Imran 23:07 i have used CString char array
taxilian 23:07 Imran: what was the exact datatype you were using?
Imran 23:07 LPCSTR
with all i got that error
taxilian 23:07 you could probably do it using an actual char*
rather than an LPCSTR
but the easiest way would be to just pass a std::string(lpcstrvar)
Imran 23:07 i have used char* but i got same error
taxilian 23:07 hmm. possible it has to be const char*, I guess
but I didn't think so
anyway, what it's telling you is that FireBreath doesn't recognize the datatype you're trying to use
so you can force it to accept it, but it will end up not working the way you want
Imran 23:07 but in the case of integer i did'nt get any error
taxilian 23:07 FireBreath converts char* to std::string internally anyway, so just pass that and you should be good
that's because it knows what an integer is
I'm honestly not sure why it didn't like char*, because it should be okay with that
Imran 23:07 but now wat should i do??
taxilian 23:07 I've told you 3 times
use std::string
Imran 23:07 okay i will
taxilian 23:07 for example, FB::variant var = std::string(yourLPCSTRVar)
Imran 23:07 thanks
taxilian 23:07 good luck
rashmi 23:07 Hi again
This time i am using a function
that returns a LONG type integer
Hw do i convert dis LONG int to FB::variant type?
when i directly assign this LONG value
to my FB::variant variable
it says
there is no acceptable conversion
hw do i tackle dis problem?
taxilian 23:07 try using a long type instead
rashmi 23:07 instead of FB::variant?
taxilian 23:07 instead of LONG
make your function return type long
rashmi 23:07 ohk
taxilian 23:07 LONG is not a real C++ type, long is
though again I'm surprised that it matters
rashmi 23:07 I changed the return type to long
hwever i get d same error
taxilian 23:07 .pb
FireBreathBot 23:07 When you need to share code, logs, or anything else longer than a couple of lines, use a pastebin.,, and are all good options