IRC Log Viewer » #firebreath » 2012-06-27

IRC Nick Time (GMT-7) Message
Bharath 11:06 hi
Taxilian
i have been following for a couple of days on stackoverflow
thanks for all the posts there
taxilian 11:06 yw
Bharath 11:06 I have a specific problem
regaring the same old NSView :-)
I have reached the point of frustration
taxilian 11:06 what are you trying to do?
Bharath 11:06 I have a third party library which take NSView to render video
and i am unable to provide that
i then went back and researched
a bit on cocoa
basically i am MFC windows guy
i learnt Layers views and nswindow
and now i know how i can draw in to a layer
with CoreANimation drawing model
i have seen some samples that can capture the view contents
so i want to see if can some how create a view render the video capture the view contents and then draw it into the layer
hopefully i am not crazy.....
taxilian 11:06 theoretically possible, but it may depend on how your lib is drawing to the NSView
look at the WebView example in the firebreath codebase
(src/libs/WebView/Mac)
Bharath 11:06 ok
taxilian 11:06 it does that with a WebView NSView
Bharath 11:06 ok
thanks
i will have look at
thanks once again
Bharath 12:06 Sorry just one more thing
Richard
The view on which the library renders the video is NSOpenGLView
so i think i need to add a subview to webview
right?
taxilian 12:06 I don't know of any way to do what you're trying to do, then
it might be possible if you can find a way to either make the NSOpenGLView use a CAOpenGLLayer as a backing layer or if you can scrape the bits out of the NSOpenGLView and then draw them to CoreGraphics or CA
Bharath 12:06 hmmm... ok
oh ok
ok
taxilian 12:06 I don't know if those things are possible or not; I have roughly similar level of experience with the mac drawing layers that you do
Bharath 12:06 ok
ok
i will try and let u know
thanks
taxilian 12:06 good luck
joe_ 16:06 i want to draw in the plugin's area using its handle , but im not able to get the handle,please help
taxilian 16:06 joe_ you'll have to be a tad bit more specific
little details that completely change the answer; things like "what platform? what browser?"
joe_ 16:06 browser-firefox, platform-windows
right now im using FB::PluginWindowWin *pwnd = wnd->get_as<FB::PluginWindowWin>(); and HWND hwnd=pwnd->getHWND();
to get the windows handle
taxilian 16:06 that should work
as long as you're waiting until after the AtachedEvent fires
have you read http://colonelpanic.net/2010/11/firebreath-tips-drawing-on-windows/?
joe_ 16:06 yes im waiting for onWindowAttached() coz i though that signals tthat a wnidow has been allocated .yes i did read that.
taxilian 16:06 okay
whats the problem, then?
joe_ 16:06 im not able to get the handle for the plugin's window
taxilian 16:06 yeah, I caught that part. What specifically is happening when you try? You get a NULL? it crashes? the computer explodes? Aliens attach every time you try?
joe_ 16:06 lol. i tried debugging and in VS2010 i get error that expression cannot be evaluated
taxilian 16:06 hmm. can you pastebin me the file? sounds like you have a syntax error or are perhaps missing an include
.pb
FireBreathBot 16:06 When you need to share code, logs, or anything else longer than a couple of lines, use a pastebin. http://fpaste.org, https://pzt.me/, and https://gist.github.com are all good options
joe_ 16:06 one modification that i did from my side is to use get_as<FB::PluginWindowWin>() instead of get_as<FB::PluginWindowWin*>()
taxilian 16:06 and why did you make that change?
joe_ 16:06 coz VS2010 was showing me that a ** cannot be converted to *
and code wasnt compiling
taxilian 16:06 okay, yeah, looking at the source that makes sense
https://github.com/firebreath/FireBreath/blob/master/src/PluginCore/PluginEvent.h
sorry, wrong file
https://github.com/firebreath/FireBreath/blob/master/src/PluginCore/PluginEventSource.h#L89
well, pastebin me the file and I'll see if I can spot what is wrong
also the exact compiler output would help
joe_ 16:06 have you tried similar stuff...where u able to get handle?
taxilian 16:06 I wrote FireBreath
yes, I have tried similar stuff and it works just fine
I also wrote the article I just linked you to
joe_ 16:06 so if i get the handle ad=nd then the device context...then the drawing functions such as LineTo, etc must work?
taxilian 16:06 Anything that works with a HWND should work
joe_ 16:06 hmm..thx
taxilian 16:06 if you're using only hDC methods then you may want to consider using a windowless plugin, though
then you get an hDC from the browser and you can participate in the browser's z-order
which means other HTML elements can optionally be placed on top of you
joe_ 16:06 true
ill try