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

IRC Nick Time (GMT-7) Message
y0h4n 09:07 hi all !!
someone-noone 09:07 hello
y0h4n 09:07 any one know where can i find how can i build a addon with my NPAPI plugin for FireFox, Chrome and IE :S
kylehuff 09:07 y0h4n: for chrome, I believe it is on the wiki
y0h4n 09:07 mm ok sry i know it but for FF and IE i dont know where find info
kylehuff 09:07 for that, google search will have to be your friend
y0h4n 09:07 for FF its necesary to load ctypes.open ¿?
kylehuff 09:07 for firefox, you want to search for bundles
this has some relevant info: https://developer.mozilla.org/en/Bundles
y0h4n 09:07 ^^ google is a good friend but he dont help me enough with this :(
kylehuff 09:07 that link I gave should have most of what you need for FF. that is the best I can do.
y0h4n 09:07 im trying to put my npapi into plugins florder of the xpi, and i try to load it using ctypes on overlay but it dont works
i forgot any step ?
kylehuff 09:07 I have only ever done it with much older versions of FF, and never using ctypes... so I don't know. what are you using as your information guide? link?
y0h4n 09:07 https://developer.mozilla.org/en/js-ctypes
taxilian 09:07 y0h4n: you won't find much help for firefox (or other) extensions here; we only do plugins, for the most part
y0h4n 09:07 ok thx anyway ;)
kylehuff 10:07 from what I know, ctypes isn't really for NPAPI plugins anyway, and while it may work, it is a round-about way of doing it -- for plugins packaged with FF extensions, I think you want the link I gave earlier regarding "Bundles" -- I have had success using that method.
oh yeah, since you are here taxilian; my C++ is improving thanks to the book you recommended. I can't say much for the coding style/readability or methodology -- but I run into fewer compiler errors...
taxilian 10:07 kylehuff: which book?
kylehuff 10:07 "C++ Coding Standards: 101 Rules, Guidelines, and Best Practices"
someone-noone 11:07 woohoo, made drawing with CA!
taxilian 11:07 =]
well did
now you can put together an example project to help the next poor sap who wants to do so! ;-)
someone-noone 11:07 it is not over yet :)
have memory leaks on CA
and crashes on Chrome and Safari
:)
also i need full-screen. and only after that, there will be a manual:)
taxilian 11:07 hehe
fair enough
if you need to, write it in Russian, and I'll translate it
someone-noone 11:07 i will be improving my english skills :)
btw, CA drawing seemd to be the same as CG drawing, but not sure yet because have some troubles and can't say if it's a clear test
i mean for performance
also CA, no-no, APPLE doesn't support any fast drawing of yuv420p
in that format are encoded most of videos (for example h264)
APPLE only supports 2yuv format. facepalm.jpg
btw, i did it with Core Video. So it's a fastests way that is possible
i know another method that is faster and that is drawing yuv420p on apple, but... it is so painful, so i didn't even try this. You should be guru of OpenGL and Apple-developing for doing this correct
taxilian 11:07 what about if you use CAOpenGLLayer
someone-noone 11:07 i did it with CAOpenGLLayer
taxilian 11:07 huh
that's too bad
someone-noone 11:07 you can do it
but, you should be an expert in a lot of things
taxilian 11:07 for such a niche thing, developing plugins requires a lot of random skills
someone-noone 11:07 they are: shader-working, working with power-of-two\non-power-of-two textures, should know everything about all apple's optimizations. And if you're good with it all, you can make yuv420p drawing
+ opengl and mac-guru included
yeah, you're rigth... but i'm a network-developer...
so for me it's 20x harder
because network works on all OS
by the same scheme
tcp\udp and friends - no problems. mac devel? pain :)
on safari getting error while trying to do: this->GetWindow()->getWindowHeight() in onWindowAttached
not error, but height is 0
shouldn't i do it there?
taxilian 11:07 sometimes when the window is attached the size is still not set; watch for a resizedevent
someone-noone 11:07 thanks
y0h4n 12:07 i resolve my problems with this http://firefm.svn.sourceforge.net/viewvc/firefm/trunk/implementation/src/resources/fmPlayerInitializer.js?revision=614&view=markup 311-343 for anyone who was interested
FireBreathBot 12:07 Commit 39f2935 on master by Richard Bateman: "Added a timed wait to SafeQueue" http://goo.gl/4oGIh
Firing 13:07 Hey all, So i finished building my plugin and was ready to deploy. After building my project and looking at dll i realized that its 4mb!
thats prty big i think because it has to be part of my installer
taxilian 13:07 couple of questions
first, did you build in release mode?
Firing 13:07 hmm im not sure what u mean by that
i just selected build in the top menu (using VS 2010)
taxilian 13:07 ...
okay
on the top bar, there is a dropdown that will say something like "Debug", "Release", "RelWithDebInfo", or "MinSizeRel" on it
which does it say?
Firing 13:07 Oh I see what you mean
yes it is in Debug mode
Ill try release
mode
taxilian 13:07 okay; Debug mode has no optimizations in it for size or speed
RelWithDebInfo can be good if you want release mode size but you'd also like to have symbols
and MinSizeRel will optimize for size (smallest possible) but possibly will not run quite as fast (though still faster than debug mode)
Firing 13:07 Well my plugin is only activated on a context menu click so Im not sure how much speed will factor into it
ill try each one though
taxilian 13:07 if you're mostly just concerned about size, then do MinSizeRel
Firing 13:07 Will try that. Thanks!
taxilian 13:07 and before you panic about the binary size, make sure you try compressing it to see how much space it will actually take up in the installer
Firing 13:07 K will do
my mac is cranking on all cylinders building in minsizerel few warnings but looks good so far
taxilian 13:07 are you on 1.5 or 1.6?
(1.6 is master)
Firing 13:07 Im on 1.5
On the downloads page it shows 1.5 as reccomended
taxilian 13:07 it is still; 1.6 is probably pretty stable. As soon as I find time to actually do so I'll be releasing a RC
one of the main differences in 1.6 is it supports precompiled headers on windows, which drastically speeds up the compilation speed
that's why I brought it up =]
Firing 13:07 Oic that sounds good!
Oh sweet
now the dll is only 835 kb
much better
taxilian 13:07 =]
Firing 13:07 Thanks again!
taxilian 13:07 yw
please contribute back however you can =]
Firing 13:07 will do was just about to ask: Is this size thing a feature of VS or part of firebreath
i was looking at the docs
taxilian 13:07 what size thing?
the Debug/Release/etc?
Firing 13:07 and i cant seem to find something that talks about size
yes
that
taxilian 13:07 that's a c++ thing
though the specific configurations of what debug vs release, etc do depends on the system and the configuration
cmake introduces relwithdebinfo and minsizerel, which are nonstandard
Firing 13:07 Oh ok. Would be nice for total noobs like me if it was in docs perhaps on this page: http://www.firebreath.org/display/documentation/Deploying+and+updating+your+plugin
I could add that info
taxilian 13:07 but they are just configurations for what compilation options and such are there
Firing 13:07 if its ok
taxilian 13:07 sure
Firing 13:07 K Ill add it sometime today.
Firing 14:07 Just added a new header with that info. Not exactly sure where it will fit in best
Pretty much used your wording for descriptions
since I dont know much
someone-noone 14:07 !bothelp
damn it
i fogot it again :)
!findfile
taxilian 15:07 .bothelp
FireBreathBot 15:07 Bot help -- most used commands:
!findfile <regex> - Search for files in the project tree on github
!find <symbol> - use ctags to search for a symbol in the source tree
!wiki <search string> - search the wiki for the given string
git pull requests - list all open pull requests for the project
.pb - remind users about pastebin services
.ask - remind users to ask their question rather than waiting for someone to come
.g <search string> - search google for <search string> and return the url of the first response
.lmgt <search string> - display 'Let me Google that for you' link for <search string>
.extensions - Display a summary of the difference between a plugin and an extension.
taxilian 15:07 you have to tell it a file to look for or it does nothing
someone-noone 15:07 ok, thanks. i will remember it
taxilian: i have a question, how can i access pluginwindowmac from my plugin class ?
or how should i do it right
taxilian 15:07 getWindow()
!find getWindow
FireBreathBot 15:07 Found 20 possible matches. Displaying 5
/^FB::DOM::WindowPtr Document::getWindow() const$/ (f) found in src/ActiveXCore/AXDOM/Document.cpp: http://goo.gl/SG3I5
/^GdkNativeWindow PluginWindowX11::getWindow()$/ (f) found in src/PluginAuto/X11/PluginWindowX11.cpp: http://goo.gl/dkUR9
/^WindowPtr Document::getWindow() const$/ (f) found in src/ScriptingCore/DOM/Document.cpp: http://goo.gl/ezqGy
/^FB::Rect FB::PluginWindowWin::getWindowClipping() const$/ (f) found in src/PluginAuto/Win/PluginWindowWin.cpp: http://goo.gl/NdqTe
/^FB::Rect FB::PluginWindowlessWin::getWindowClipping() const {$/ (f) found in src/PluginAuto/Win/PluginWindowlessWin.cpp: http://goo.gl/pMsj1
taxilian 15:07 lol. several of those, it seems
!find PluginCore
FireBreathBot 15:07 Found 3 possible matches. Displaying 3
/^PluginCore::PluginCore() : m_paramsSet(false), m_Window(NULL),$/ (f) found in src/PluginCore/PluginCore.cpp: http://goo.gl/96BTo
/^ class PluginCore : public PluginEventSink$/ (c) found in src/PluginCore/PluginCore.h: http://goo.gl/M31V9
/^ typedef boost::shared_ptr<PluginCore> PluginCorePtr;$/ (t) found in src/PluginCore/FactoryBase.h: http://goo.gl/SKAie
taxilian 15:07 ahh
!find GetWindow
FireBreathBot 15:07 Found 3 possible matches. Displaying 3
/^ virtual PluginWindow* GetWindow() const$/ (f) found in src/PluginCore/PluginCore.h: http://goo.gl/M31V9
/^ HRESULT __stdcall GetWindow(HWND *phwnd) {$/ (f) found in src/libs/WebView/Win/SupportComImpl.h: http://goo.gl/azPP9
taxilian 15:07 that one
FireBreathBot 15:07 /^ HRESULT __stdcall GetWindow(HWND *phwnd) {$/ (f) found in src/libs/WebView/Win/SupportComImpl.h: http://goo.gl/azPP9
/^ HRESULT __stdcall GetWindowContext($/ (f) found in src/libs/WebView/Win/SupportComImpl.h: http://goo.gl/azPP9
taxilian 15:07 then cast it
make sure you check if it's NULL; that means the window hasn't been attached yet
someone-noone 15:07 i'm sending pointer in callback just in onattach event :)
why it is not one class?
taxilian 15:07 ?
someone-noone 15:07 ah, just because one is window is attach context and another yours, or what?
taxilian 15:07 I don't understand your question
someone-noone 15:07 what difference between PluginCore class with which i'm working and PluginWindow ?
i mean, i see it in functions
but don't understand why it wasn't be done in 1 class
taxilian 15:07 because they aren't the same thing
someone-noone 15:07 haven't*
taxilian 15:07 for one thing, your window could change partway through
if someone drags the tab from one firefox instance to another, for example, on some platforms will change your window
someone-noone 15:07 shouldn't be it hidden for user?
taxilian 15:07 also you may not even have a window
how would I hide it? I don't know what you're doing
it's logically not the same thing
also this way you can have multiple event sinks; the plugin object is one, but you could have another class that receives all the drawing events and such
someone-noone 15:07 i understand. but for me end-user. I should don't care about when it attached or so. May be i should be notified somehow by event that window was changed. but i think it should be in 1 class. just my opinion
taxilian 15:07 you are not the end user
you are the developer
someone-noone 15:07 :)
taxilian 15:07 and you need to understand what is happening
otherwise you'll make assumptions that are going to cause you problems
if I were to hide that more then it would limit what you could do
and it would be really problematic for a large number of plugins
someone-noone 15:07 i mean, it's easier to imagine that you have 1 object, called plugin. And all details, if it needs should be described below after general level "Plugin"
taxilian 15:07 the lifecycle is not tied to the winodw
sure it's easier
it's wrong, and it doesn't work that way
but it would be easier if it did
someone-noone 15:07 but why it shouldn't be done in 1 object?
it cannot be done*
sorry
taxilian 15:07 they aren't the same thing at all
someone-noone 15:07 i understand :)
one is for when browser give you a window
and another when you "init"
right?
taxilian 15:07 right
there are even potential cases when the browser might not *give* you a window
the window and the plugin are not the same thing
similarly the JSAPI object
someone-noone 15:07 So isn't be easier to represent it in such model:
taxilian 15:07 it would be possible to make the plugin object a jsapi object, but it would limit the flexibility of the system; a jsapi object does not have to be inherently tied to a single plugin object
someone-noone 15:07 you may have onWindowChanged event
for all that stuff when you can't control window
you may even lock all methods during this change
taxilian 15:07 there are some cases where that would make sense
someone-noone 15:07 if it's need
taxilian 15:07 but the window class will never be merged with the plugin class
someone-noone 15:07 not mergerd
merged
but represented as 1
i mean you can access it from code
but it all going to have 1 class :)
but it's just my opinion... so
taxilian 15:07 I don't understand what you're suggesting
PluginCore != PluginWindow; they dont' have the same function, they don't have the same lifecycle, and they share absolutely nothing in common *except* that they are both tied to the same object tag
PluginWindow is a PluginEventSource, whereas PluginCore is a PluginEventSink
someone-noone 15:07 forget it :) i understand you
but can't represent good my opinion
taxilian 15:07 explain it in Russian if it helps
someone-noone 15:07 you know i even agreed it should be done like it is now
i just weighted all +\-
taxilian 15:07 hehe. okay
I have strong opinions, but I do try to listen to alternate ideas is all
someone-noone 15:07 that is normal
kylehuff 15:07 I think he just called you boring, richard...
someone-noone 16:07 haha
taxilian 16:07 lol
someone-noone 16:07 :)
taxilian 16:07 I took one of those color personality tests once… according to the results, I'm literally almost no fun at all
kylehuff 16:07 did they offer you a job at the IRS or the FBI?
taxilian 16:07 lol
no
I was still 2/45 in the "fun" category, so it was probably still too high
kylehuff 16:07 oh, yeah - that won't do... you have to be in the negative-fun scale for that sort of thing
taxilian 16:07 exactly
have you heard Weird Al's new(ish) "Party in the CIA" (parody of Party in the USA)
?
kylehuff 16:07 lol
no
but it sounds great
taxilian 16:07 it's not bad
there is a animated music video too
kylehuff 16:07 my wife will get a kick out of that
taxilian 16:07 =]
kylehuff 16:07 so, I moved to 1.5 (from, 1.3 I think)
taxilian 16:07 bet that was fun. how long did it take to update?
kylehuff 16:07 well, I just did fbgen again, and copied over my methods because I was creating the same project with a new name
taxilian 16:07 ahh
kylehuff 16:07 so it was quick
taxilian 16:07 that was probably easy, then =]
kylehuff 16:07 yeah, it was easy.
I need to move the original project though -- this was just a fork of sorts
taxilian 16:07 you'll be happy to know that there are no breaking changes from 1.5 to 1.6
kylehuff 16:07 cool
I figured I might as well move to 1.5, to get any bug-fixes there might be
taxilian 16:07 from 1.3? very very good idea
kylehuff 16:07 anyway, it nothing broke after the move -- at least not in linux.
yeah, I can't tell which version I was on, because I was using trunk...
*master
oh, nevermind, it was 1.4
it wasn't master after all, the submodule is pegged at 1.4
someone-noone 16:07 so window may be attached and not resized ?
getting strange error
and looks like it can be
isn't it?
taxilian 16:07 the window is attached when the browser gives it to us; if the browser chooses to give it to us before it sets a size, then yes that could happen
someone-noone 16:07 and is there an event when window attached+resized ?
taxilian 16:07 there is an attached event
and a resizedevent
the other isn't an actual event, so why would there be a special event?
someone-noone 16:07 i understood :)
taxilian 16:07 the windows is attached and either has already been sized or hasn't been
someone-noone 16:07 wouldn't it be normal if you get event when you can get size+window itself (can draw on it)
?
that will tell user that window and size appering in different time
:)
all draw functions need size
at least cannot this events appear in one atomical time?
are they alway sequent?
on firefox attached is before resized event, on chrome and safari in other order
that have meaning if you for example decoding in other thread
taxilian 17:07 that does seem like it would make sense
however, if I get a window from the browser with no size, I have no guarantee that it will change
so waiting wouldn't make sense
I just provide things in the order that the browser gives it to us
talk to them, not me =]
taxilian 23:07 anyone available tomorrow to help me try to clear out the bug list on jira?
kylehuff 23:07 I could make myself available, but I don't know how much help I'd be...
kylehuff 23:07 taxilian: I reviewed the list of open issues, I don't see anything I would be very useful in resolving - in fact, I don't even know what half of them are talking about - but if there is something I can do for testing or documentation, let me know.
taxilian 23:07 cool; do you have a windows machine by chance, and a copy of visual studio?
kylehuff 23:07 I have a windows XP VM instance I will be dusting off tomorrow, and I can't remember which version of VS is on it, but yes, I have VS.
taxilian 23:07 even if you could just help me reproduce things that would be a big help
hmm. some seem to already be closed
rather fixed
and need to be closed
FireBreathBot 23:07 JIRA issue http://jira.firebreath.org/browse/FIREBREATH-113 issue resolved by richard "Thanks for the fix!"
taxilian 23:07 kylehuff: how is your python?
kylehuff 23:07 taxilian: fair
taxilian 23:07 one of the bugs in there is related to the python script that imports the doxygen stuff
FireBreathBot 23:07 JIRA issue http://jira.firebreath.org/browse/FIREBREATH-104 issue resolved by richard "My hope is that this is completely resolved; I know it is at least partially resolved in 1.6. If ..."
taxilian 23:07 if you could try to reproduce FIREBREATH-94 that would be useful as well
FireBreathBot 23:07 FIREBREATH-94: Summary: return variant based on wstring
FIREBREATH-94: Assigned To: richard
FIREBREATH-94: Priority: Major, Status: Open, http://jira.firebreath.org/browse/FIREBREATH-94
taxilian 23:07 FIREBREATH-107 is the python related one
FireBreathBot 23:07 FIREBREATH-107: Summary: Graphical Class Hierarchy unavailable
FIREBREATH-107: Assigned To: richard
FIREBREATH-107: Priority: Minor, Status: Open, http://jira.firebreath.org/browse/FIREBREATH-107
taxilian 23:07 my goal is to clear all the bugs out tomorrow and then be able to release FB 1.6 RC1
anyway, I appreciate any help you or anyone else can give on that; I'm going to bed
g'night all, talk to you tomorrow