ogg.k.ogg.k at googlemail.com
2008-Apr-28 10:15 UTC
[ogg-dev] [PATCH] browser_plugin - kate support, build fixes, and misc
Hi, this patch adds: - kate support (what else) - this bumps the Javascript API to 1.1 - a few build fixes (note that the adding of -L/usr/X11/lib -lX11 looks suspect to me, that shouldn't be needed, so you may want to leave it out if you think so as well - it's odd as X11 using programs do configure fine on that box) - bad pointer dereference fix (mouse callback) - avoid the input widget in test.html firing hotkey'd functions Note that the rendering code is only implemented for the Linux version at the moment, and I don't have a Mac or Windows machine, so I'm hoping a coder with either might be interested in having it working for him/her :) The callback should work on all platforms though (heavily piggybacking on the CMML code here). Note also that this uses simple text from liboggplay, so directionality is not taken into account (eg, Arabic text displays in the wrong order). This is not really fixable now anyway as Imlib doesn't seem to support this (if I draw right to left as a test, characters are flipped too, which we don't want). This will get fixed once I get my rendering lib done, and liboggplay will have the ability to send Kate streams as YUV overlay data (which can then be drawn over a Theora video). This is longer term though (and will add more dependencies to liboggplay, like cairo and pango). Only one Kate stream may be selected at a time, but they can be changed on the fly, with language/category exposed to Javascript so they can be put in a menu or something. See the new test buttons in test.html. The font selection is not great - it picks the first font it finds in a list of predefined paths - though the font can be overridden by Javascript. I wanted to get the default font from the Mozilla preferences, but it seems that it's not possible to get to this from a plugin (as opposed to an extension), correct me if I'm wrong. First time I've written code for a Mozilla plugin, so I'll be missing a lot. If anyone happens to be interested, I'd welcome comments on the Javascript API. I'm just thinking it might be a good idea to add text color setters. Or maybe rendering text twice at different sizes to give an outline so it's readable for all backgrounds. Thanks -------------- next part -------------- A non-text attachment was scrubbed... Name: browser_plugin-with-kate.diff.gz Type: application/x-gzip Size: 10386 bytes Desc: not available Url : http://lists.xiph.org/pipermail/ogg-dev/attachments/20080428/5bb2a174/attachment-0001.bin
Conrad Parker
2008-Apr-29 02:12 UTC
[ogg-dev] [PATCH] browser_plugin - kate support, build fixes, and misc
2008/4/28 ogg.k.ogg.k at googlemail.com <ogg.k.ogg.k at googlemail.com>:> Hi,Hi, I've tried to separate out the general bugfixes from the new implementation work in this patch:> this patch adds: > > - kate support (what else) - this bumps the Javascript API to 1.1I've not yet committed this to trunk. It does sound pretty cool though. I don't see any problem with adding pango etc. support, it's pretty much where we wanted to go for CMML handling anyway. (btw. I'm tracking the Kate-specific stuff in a local git branch)> - a few build fixescommitted in changeset:3570> (note that the adding of -L/usr/X11/lib -lX11 > looks suspect to me, that shouldn't be needed, so you may want to > leave it out if you think so as well - it's odd as X11 using programs > do configure fine on that box)thanks for noticing, the configure script wasn't looking for the X11 install location at all. I've updated it to use the autoconf macro AC_PATH_XTRA, which defines X_CFLAGS, X_LIBS etc. in changeset:3571 Let me know if this works for you or not; eg. it may be necessary to also put X_EXTRA_LIBS etc. in src/Makefile.am.> - bad pointer dereference fix (mouse callback)I couldn't find that particular hunk, could you please provide a patch which just fixes this?> - avoid the input widget in test.html firing hotkey'd functionsis this specific to the Kate changes? I noticed that it adds a focus tracking variable, but that seems to be used by some of the Kate UI also so I'm not sure if it's a general bugfix or Kate-specific. cheers, Conrad.
ogg.k.ogg.k at googlemail.com
2008-Apr-29 09:33 UTC
[ogg-dev] [PATCH] browser_plugin - kate support, build fixes, and misc
> I've tried to separate out the general bugfixes from the new > implementation work in this patch:Sorry, I should have done that, I do tend to fix stuff I find while coding and neglect splitting up afterwards. Bad me.> I've not yet committed this to trunk. It does sound pretty cool > though. I don't see any problem with adding pango etc. support, it's > pretty much where we wanted to go for CMML handling anyway.Ah, good. At the moment, it's still imlib2 only though. Not great but will do for now. Cairo/Pango will be needed if/when I add my rendering lib, but I'm just starting on it, so imlib2 it will be for the near future. If you have any comments/concerns about the Kate code, feel free to comment. Especially on the Javascript API side (never done any of this before).> Let me know if this works for you or not; eg. it may be necessary to > also put X_EXTRA_LIBS etc. in src/Makefile.am.will try this.> > - bad pointer dereference fix (mouse callback) > > I couldn't find that particular hunk, could you please provide a patch > which just fixes this?Two hunks, the first one to initialize the mouse callback pointer to NULL, and the second one to test for NULL before actually using it: --- svn/annodex/browser_plugin/src/plugin.cpp 2008-04-04 15:14:28.000000000 +0100 +++ svn/annodex/browser_plugin-with-kate/src/plugin.cpp 2008-04-27 22:08:08.000000000 +0100 @@ -245,7 +244,8 @@ mCmmlCallback(NULL), mAsyncCmmlCallback(NULL), mEndPlayCallback(NULL), - mPlaylistCallback(NULL) + mPlaylistCallback(NULL), + mMouseClickCallback(NULL) #if defined(XP_MACOSX) , mOutputCleared(FALSE) @@ -1037,7 +1175,9 @@ if (mMouseButtonDown) { mMouseButtonDown = FALSE; - mMouseClickCallback->Call(); + if (this->mMouseClickCallback != NULL) { + mMouseClickCallback->Call(); + } } if (useSemaphore) {> > - avoid the input widget in test.html firing hotkey'd functions > > is this specific to the Kate changes? I noticed that it adds a focus > tracking variable, but that seems to be used by some of the Kate UI > also so I'm not sure if it's a general bugfix or Kate-specific.Well, not really, more like only useful for the new kate test functions: the keypress routine would be called for every keypress, but all existing test routines would expect numbers in the input box, and no numbers were hotkeys for any function, so nothing would get done. Since I added a function (to see the font to use) that expects input with other characters than numbers, some test functions would be invoked. However, looking at the patch, the input_focus variable isn't used by the Kate UI. Were you talking about something else ? Thanks for your time.
ogg.k.ogg.k at googlemail.com
2008-May-01 10:22 UTC
[ogg-dev] [PATCH] browser_plugin - kate support, build fixes, and misc
> > - kate support (what else) - this bumps the Javascript API to 1.1 > > I've not yet committed this to trunk. It does sound pretty coolCan you let me know the reasons (eg, wanting to test first, concerns over the substance of the changes, or other) ? There were no comments so far about the changes to the Javascript API, so I'll assume people have no problem with those ? Cheers
Seemingly Similar Threads
- [PATCH] browser_plugin - kate support, build fixes, and misc
- [PATCH] liboggplay - kate support, build fixes, and misc
- [PATCH] browser_plugin - kate support, build fixes, and misc
- [PATCH] browser_plugin - kate support, build fixes, and misc
- [PATCH] browser_plugin - kate support, build fixes, and misc