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

IRC Nick Time (GMT-7) Message
grifo 01:04 good morning!
nitrogenycs 01:04 good morning
grifo 06:04 I'm back
I'm watching the link you provided me yesterdau
where do I have to add these lines inside the cmake configuration file for windows?
grifo 06:04 when I modify the cmake configuration file
what do I have to recompile
to make it working?
is there someone????
grifo 06:04 ...
grifo 06:04 @taxilian are you there?
cxo 08:04 How do i include files in myplugin>X11 into the build (Q)
do I have to explicitly add them into CMakeLists.txt
There is a comment in X11/projectDef.cmake saying that it is included, but the cpp files in there are not being added to the build
taxilian 08:04 cxo: could you pastebin me the contents of your X11/projectDef.cmake file?
cxo 08:04 sure. But its stock. I havent touched it
I did add a link library, but thats it,
project/x11/blah.cpp is not being linked with project/myproject.cpp
taxilian 08:04 hmm. the glob at the top of the file should include X11/*.cpp
try doing a message("Platform files: ${PLATFORM}") after that file (GLOB …) block at the top
and rerun the prep script
see if it's finding the file
cxo 08:04 Ah looks like i didnt run prep again. Now its found it
taxilian 08:04 that would do it
you have to rerun cmake for it to find them
grifo: I am back now. you would download that file and include it from one of your cmake files (CMakeLists.txt or projectDef.cmake) and then you would use the variables that it defines, which you can find by reading the FindFFMPEG.cmake file
and then you'd re-run the prep script
grifo 09:04 for a first try
I solved using absolute path
in the cmake file
and it's working
SET( FFMPEG_LIBRARY_DIR $ENV{FFMPEGDIR}\\lib ) SET( FFMPEG_INCLUDE_PATHS $ENV{FFMPEGDIR}\\include ) #include_directories(${FOO_INCLUDE_DIRS}) include_directories(${FFMPEG_INCLUDE_PATHS}) include_directories(${FFMPEG_INCLUDE_PATHS}/libavcodec) include_directories(${FFMPEG_INCLUDE_PATHS}/libavdevice) include_directories(${FFMPEG_INCLUDE_PATHS}/libavfilter) include_directories(${FFMPEG_INCLUDE_PATHS}/libavformat) include_directories($
I'm working on the code
one question
I uncommented the line
bool test02::onMouseDown(FB::MouseDownEvent *evt, FB::PluginWindow *){printf("Mouse down at: %d, %d\n", evt->m_x, evt->m_y); return false; }
Where do I see the output in the browser?
where is redirected the printf?
grifo 09:04 each time a modify some source files
and I try to compile it
I got an error
saying that is not able to open the plugin dll file foe writing
and I need to close firefox
to let it compile
it's really annoying
some solutions?
another question
taxilian 09:04 grifo: use / instead of \\
printf isn't visible on windows
and no, there are no solutions to compiling without closing the browser; you just have to close it
grifo 10:04 so each time
I modify the sources
taxilian 10:04 grifo: also, you can put all of the include_directories in a single call; just seperate them by spaces
grifo 10:04 I close all the browsers and compile again
and regarding
registering the dll?
do I have to do iy each time?
taxilian 10:04 no
grifo 10:04 it
taxilian 10:04 dude; could you please write complete sentences on one line instead of breaking htem up across several? it's very hard to read =]
grifo 10:04 when is it necessary to use again regsvr32?
taxilian 10:04 you only have to register the dll once; it stores the path to the dll in the registry
so if the dll moves you need to do it again, but otherwise you should be good
grifo 10:04 ah ok
one question to start the right way:
on my sample c++ console application that uses ffmpeg to display a video, I wrote everything in the main file (it's a sample...)
main function sorry
where is the right place to put this code inside the plugin project?
it's composed by some initializations routines..., and a main loop that grab the frames and display them
taxilian 10:04 that's really hard to say, since I have no idea what "this code" entails; things that should only be one-time initialization for the whole project should go in staticinitialize/staticdeinitialize, other things go wherever appropriate. read the docs, read the generated plugin cpp file, etc
the rendering code should go on its own thread
make sure you look at the FAQ, Tips and Tricks, and Best practices; there are a lot of useful tidbits there
grifo 10:04 thanks
I modified the StaticInitialize() function
compiled and reloaded
the FBControl.htm# page. If I don't see the message box ("plugin loaded") -> what happened?
taxilian 10:04 hard to say; try debugging
grifo 10:04 how?
taxilian 10:04 !wiki debugging
FireBreathBot 10:04 8 results found. Note: Results limited to 8
"Debugging Plugins":
"Building on Mac OS X":
"Building on Windows":
"Using FireBreath":
"Prep Scripts":
"Using Libraries":
"WiX Installer Help":
"Creating a New Plugin Project":
taxilian 10:04 I don't mind answering questions, but please try to figure things out yourself before asking
and ask specific questions
if I don't feel like you're working yourself I will get grumpy =]
I am quite happy to help you get started, but I'm not going to teach you C++
grifo 10:04 :)
jlaire 10:04 fullscreen problem on Linux: I reparent my plugin window to the root window so that it can go fullscreen, and so far so good, but when I reparent it back to its original parent (the browser) it gets messed up (starts to scroll with the webpage, doesn't always resize)
anyone know a good way to do the fullscreen->browser transition?
I suppose I could create a new window for the fullscreen, but reparenting is much easier in this case if I just could get it to work
taxilian 10:04 jlaire: I can't even get a basic opengl example working on linux, so I can't help you =]
jlaire 10:04 taxilian: ok :)
I've got a few ideas to try, just wanted to make sure I'm not reinventing a wheel
taxilian 10:04 understandable =] on that note, if someone were to contribute an example doing basic drawing it would be really really useful =]
FireBreathBot 12:04 Commit 571292b on master by Jarom Loveridge: "Added switcher test page for load/unload plugin testing."
sabotaged|wk 14:04 hmm, after updating to head of 1.5 the other day and now running on windows, pluginMain is null in NpapiPlugin constructor
taxilian 14:04 … that's weird. does the test plugin work?
sabotaged|wk 14:04 oh nevermind i think it's my fault. i was messing around with my PluginFactory
taxilian 14:04 lol
that would do it
jshanab_wcw 14:04 Any DirectX (9) officianatoa out there? My plugin draws video tot he screen. i was having some troublr with SFML and am trying directX. It works great for one instance of the plugin, but when I use 4 the first and second video is fine, the third contains a mix and the fource is really mixxed up, containg pieces of the other 3. Then it crashes usually on a memcopy of the video data.
taxilian 14:04 jshanab_wcw: my guess would be that you're not keeping your instances cleanly seperated or you have a memory access problem
I've used multiple copies of DX-enabled plugins with no trouble
are you keeping all the directx stuff on the same (not the main) thread?
(one thread per instance)
jshanab_wcw 14:04 HUmm...In each instance. I have a run thread that initsD3D before entering a while loop. It pulls decoded frames off of a decoding Queue. In that thread it calls the displayImage which renders it. This is my first week in directX, i have really been fighting which of the zillion functions to use, i am using a surface now.
taxilian 14:04 nothing in that sounds obviously wrong; I'm not a dx expert, though
I've just used it
jshanab_wcw 14:04 The error is very consistant and is obviously mixing of the info. Almost like there is only one surface. In a singel video it is beutiful.
jshanab_wcw 14:04 Got it! Scaling was not correct and crashed it
taxilian 15:04 that'll do it
sabotaged|wk 15:04 will PluginCore's SetHost always be called before AttachedEvent is fired? the wiki seems to say so, but i wanted to check since comments in code about onPluginReady may or may not occur the AttachedEvent is fired
and onPluginReady seems to happen near SetHost
taxilian 15:04 yes
sabotaged|wk 15:04 ok
taxilian 15:04 onPluginReady will always be after SetHost as well
jshanab_wcw 15:04 I am switching form sowtware yuv-->rgb and scaling to hardware (shudder)
taxilian 15:04 I still haven't had time to figure out how to do that in dx
need to
jshanab_wcw 15:04 well, If i do I will kick back the info.
taxilian 15:04 cool
starakaj 17:04 sup all
so here's a question
what can I add to the cmake files to specify that a particular file get compiled as objective-c++
I've got platform-specific chunks of my plugin
that I'm splitting into two classes
my idea was to have my main plugin, which when it's created calls a factory class to get the platform specific stuff
that factory class returns the right platform-specific class depending on the operating system
taxilian 17:04 starakaj: just add a .mm file and it will be objective c
starakaj 17:04 right
here's the problem
if my factory class includes mac stuff, then the factory class has to compile as objective-c++, because it includes headers for the obj-c++ class it's going to create
but that same factory class has to compile on windows
so I can't make the factory class .mm, or windows won't like it
so problem
taxilian 17:04 starakaj: call me on skype; I don't have a lot of time, and that will be faster
starakaj 17:04 k