IRC Log Viewer » #firebreath » 2011-08-18

IRC Nick Time (GMT-7) Message
FireBreathBot 05:08 JIRA issue http://jira.firebreath.org/browse/FIREBREATH-118 issue created by mauceri
FireBreathBot 09:08 JIRA issue http://jira.firebreath.org/browse/FIREBREATH-118 issue commented by richard "It appears that vs2010 express may not work correctly with cmake to create 64 bit binaries; is th..."
ilan 09:08 hello
taxilian 09:08 hi
Guest97170 09:08 in BasicMediaPlayer example
there is setwindow function
which is empty
in MediaPlyaerMac.cpp
why is is empty
taxilian 09:08 it isn't used
!find MediaPlayerMac.cpp
FireBreathBot 09:08 Could not find any tags matching MediaPlayerMac.cpp
taxilian 09:08 !find .*MediaPlayerMac.cpp
FireBreathBot 09:08 Could not find any tags matching .*MediaPlayerMac.cpp
taxilian 09:08 find BasicMedi.*Mac.cpp
!findfile MediaPlayerMac
FireBreathBot 09:08 Found 1 matching file(s) in the master branch. First 1 are:
examples/BasicMediaPlayer/Mac/MediaPlayerMac.cpp http://goo.gl/B1FJo
taxilian 09:08 duh; wrong command :-P
Guest97170 09:08 and what should be the code to init a window and get the reference to it ?
taxilian 09:08 the basicmediaplayer example was hijacked on mac to be a basic drawing example
what are you expecting to get as a window?
Guest97170 09:08 ca
core animation type window
taxilian 09:08 a CALayer, then
Guest97170 09:08 yep
taxilian 09:08 !findfile BasicMediaPlayerPluginMac
FireBreathBot 09:08 Found 2 matching file(s) in the master branch. First 2 are:
examples/BasicMediaPlayer/Mac/BasicMediaPlayerPluginMac.h http://goo.gl/zkzY5
examples/BasicMediaPlayer/Mac/BasicMediaPlayerPluginMac.mm http://goo.gl/iJz5k
taxilian 09:08 the code you need is in there
you'll get your window in the AttachedEvent
it will be of type PluginWindowMacCA or PluginWindowMacICA
after you draw to it you need to call InvalidateWindow
Guest97170 09:08 and can I get the pointer back to the script ?
taxilian 09:08 the what?
Guest97170 09:08 how can I recieve the pointer value to the script ?
taxilian 09:08 I don't know what you are asking; what are you trying to do?
Guest97170 09:08 I need to creaye a window on mac and get back to the client a refernce to that window that I will be able to send it to other Plugins
create
taxilian 09:08 what client?
Guest97170 09:08 js
taxilian 09:08 sorry, you're just using a lot of terminology that I don't know what you're getting at
Guest97170 09:08 ok
taxilian 09:08 first of all, have you read the interacting with javascript pages on the wiki?
!wiki javascript
FireBreathBot 09:08 8 results found. Note: Results limited to 8
"Interacting with Javascript": http://goo.gl/kN03n
"file NPJavascriptObject.h": http://goo.gl/03Ka9
"file COMJavascriptObject.h": http://goo.gl/wRRd9
"file NPJavascriptObject.cpp": http://goo.gl/gN1rb
"JSAPI Attributes": http://goo.gl/lh6hF
"JSAPI Properties": http://goo.gl/uBqyk
"Features": http://goo.gl/xXK1q
"Supported JSAPI types": http://goo.gl/m9gzK
Guest97170 09:08 I got and html and java script
ok?
I need to create a window
taxilian 09:08 step back
have you read the interacting with javascript page?
Guest97170 09:08 yes
there is no problem with that
taxilian 09:08 all of them?
so you understand what a JSAPI object is?
Guest97170 09:08 I just need to know how to create a window, and hold the refernce to it
taxilian 09:08 and I told you that
you get the PluginWindowMacCA in the AttachedEvent
which you should have a handler for
do a dynamic cast to make sure it's the right window type (and make sure that you have only enabled CA in your PluginConfig.cmake)
it's all in that example
then you ask about how to get back to javascript, and that's what I was trying to help you understand
Guest97170 09:08 so its all from the BasicMediaPlayerPluginMac.mm file ?
taxilian 09:08 all the CA related code is in there or in the header file, yes
Guest97170 09:08 can I interact with this mm file from my java script code?
taxilian 09:08 do you know what JSAPI is?
Guest97170 09:08 it is an object that let me intercat with my plugin
taxilian 09:08 right; you can interact with the JSAPI object from javascript code
Guest97170 09:08 can I create jsapi in the mm file ?
taxilian 09:08 you can create whatever you want
that doesn't mean it would make sense, but you can
as long as you can figure out how to do it
there are two objects you need to really understand: JSAPI and PluginCore
in the BasicMediaPlayer example, the object in that file is a PluginCore object
it extends PluginCore
it is not directly visible to javascript
if you look at how things are set up, it is a mac-specific specialization of the BasicMediaPlayerPlugin class
so if you only care about mac, then sure — you can make any of those files be a .mm file
Guest97170 09:08 till now I interacted throw BasicMediaPlayer.cpp where I register each method I wanted to be recognised in the java script
taxilian 09:08 are you actually modifying the basicmediaplayer example directly, then? \
Guest97170 09:08 yep
taxilian 09:08 hmm. okay; keep in mind that the structure of that example is fairly nonstandard
Guest97170 09:08 I just need the window
taxilian 09:08 so you have said… repeatedly. Usually right before asking about something else that you need
I would strongly recommend against trying to do your development in the BasicMediaPlayer example
Guest97170 09:08 so what do you recommand me to do ?
taxilian 09:08 and you definitely, definitely do not want to copy that file into your project
if I were you I'd add a subclass of your main plugin class in the Mac/ subdirectory of your project
look at the BasicMediaPlayerPlugin.h and BasicMediaPlayerPluginMac.h files for an example
Guest97170 09:08 man please, my question is very simple. in the windowAttached method the window is being created
how do I get the CALayer object back to the javascript
taxilian 10:08 oh, is that what you're asking? you can't
javascript can't deal with a CALAyer
and there is certainly no way to pass it back through the javascript gateway
now, what you could do is you could write APIs in your JSAPI class
Guest97170 10:08 a pointer to that object which I will cast it to long
taxilian 10:08 that would then forward the calls to the CALayer in some way or another
well, since you obviously think I don't know what I'm doing and couldn't comprehend what you're actually doing I won't bother asking you why you want to do that. Yes, you could do that; there are two ways. You can either give it to the JSAPI object, which could then return it from a method or property, or you could call a function in javascript or set a property on the window through m_host->getDOMWindow()
this is all on the wiki, by the way
linearray 10:08 why would anyone assume you know what you're doing? you only wrote the thing.
taxilian 10:08 yeah; it's just the general lack of credentials, I suspect ;-)
linearray 10:08 but I'm really curious what good a pointer to the window will do in javascript
taxilian 10:08 (note that he asked; I'm curious as well, but I Specifically did not ask :-P)
linearray 10:08 :D
Guest97170 10:08 Thet pointer will be sent to other plugin that direct a video stream to that window
linearray 10:08 I've got the feeling that this will not work in many browsers
because of separate process spaces
Guest97170 10:08 it should work only in safary
by the way, in windows (explorer) ot works
it works
linearray 10:08 this will not work in safari
Guest97170 10:08 why
linearray 10:08 because safari starts a separate process for every plugin
go to youtube.com, click on any video and look at activity monitor -> new Flash Player process
Guest97170 10:08 ok, so it will be in the same plugin
taxilian 10:08 Gues97170: if you're using it in the same plugin, in the same memory space, why not just put it in a global variable?
or assign an id to each CALayer instance and put it in a global map
then instead of trying to cast a pointer back and forth (with is really prone to breaking, btw, since javascript sometimes does funny things with longs; at the very least, pass it as a string) you can just pass the CALayer id back and forth
and incidently, linearray is absolutely right that using the same CALayer from different plugins would not work on any current browsers
Guest97170 10:08 thanks, I will use global variable
taxilian 10:08 I wish you luck; make sure you have some way that whatever is using the other CALayer can a) call invalidateWindow on the associated PluginWindow object whenever you draw and b) tell when the plugin owning the CALayer is gone so that it doesn't keep trying to use the CALayer after it's no longer valid
FireBreathBot 12:08 JIRA issue http://jira.firebreath.org/browse/FIREBREATH-118 issue commented by mauceri "Richard,
JIRA issue http://jira.firebreath.org/browse/FIREBREATH-118 issue updated by richard "Changing this to minor priority; it appears that 64 bit builds don't work on vs2010."
JIRA issue http://jira.firebreath.org/browse/FIREBREATH-118 issue comment edited by richard "Changing this to minor priority; it appears that 64 bit builds don't work on vs2010 express."
JIRA issue http://jira.firebreath.org/browse/FIREBREATH-118 issue commented by mauceri "I do not see any button to mark the issue solved."
JIRA issue http://jira.firebreath.org/browse/FIREBREATH-118 issue commented by richard "The issue is not solved; it just isn't an issue you're concerned about =] the fact remains that 6..."
linearray 12:08 does anyone use 64-bit plugins anywhere?
taxilian 12:08 dougma does
FireBreathBot 12:08 JIRA issue http://jira.firebreath.org/browse/FIREBREATH-118 issue commented by mauceri "You are right :) and again, thank you for your wonderful job."
taxilian 12:08 aparently he needs to be able to use more than 2 gig of memory
also on mac 64 bit plugins are pretty common
linearray 15:08 hm, interesting. Apparently NULL can not be used in place of any object.
taxilian 15:08 what do you mean?
linearray 15:08 context: I want to return a shared_ptr to a client, when there is something to do for him.
taxilian 15:08 and NULL otherwise?
linearray 15:08 when there is nothing to do, I would like to return NULL, so he can check for it and terminate
yes
taxilian 15:08 you can do that
but remember, this isn't java
linearray 15:08 :)
taxilian 15:08 you can't just return NULL
you have to return a NULL shared_ptr
for example, you could return FB::JSAPIPtr() and it will return a NULL pointer if that's the return type
linearray 15:08 ah ok, got it
taxilian 15:08 bbl
superY 20:08 Excuse me,I have learned FB recently.I have doubt that in chapter "Getting Started-----requirements" ,R3 said that "When asked, tell the installer to add cmake to your system path",what does it mean?
When I install the cmake 8.5 , I only uncompress it and there is not the installer.exe .....
dougma 20:08 cmake 8.5?
http://www.cmake.org/files/v2.8/cmake-2.8.5-win32-x86.exe
superY 20:08 yes,I have downloaded it.
dougma 20:08 and you ran it? that is the installer.
superY 20:08 Thank you..
I had downloaded a compressed one..
dougma 20:08 from where?
superY 20:08 Wait a while,let me find..
http://www.cmake.org/cmake/resources/software.html
dougma 20:08 yes, and you want the one called "Windows (Win32 Installer)"
which is the link i gave you.
superY 20:08 what is the difference between it with cmake-2.8.5-win32-x86.zip
dougma 20:08 one is a zip file, and one is an installer!
superY 20:08 zip file is the file that has installed?
dougma 20:08 http://www.cmake.org/files/v2.8/cmake-2.8.5-win32-x86.exe
you want that one