The Code Kingdom

viva la programmers!

Skip to content

1.0.8 + OS X + Flash workaround questions

Get help and support for Awesomium

1.0.8 + OS X + Flash workaround questions

Postby vade » Fri Jul 03, 2009 11:41 pm

Hello.

Thanks so much for Awesomium. I spent an evening working with it and got it integrated into a plugin for Apples Quartz Composer, which lets you mix it with video, run effects on the output of the image, etc. Much fun.

However, I was wondering how the flash plugin workaround works on OS X if you are using straight Objective-c and no SDL or other things with Ogre or whatnot?

Im using view->pause & view->resume via methods that are performed on the main thread via:

Code: Select all
[self performSelectorOnMainThread:@selector(pauseCore) withObject:nil waitUntilDone:NO];


where i define pause (and similarly resume) like:

Code: Select all
- (void) pauseCore
{
   core->pause();
}


Any pointers would be hot.

Just FYI, I noticed the framework under OS X looks like the the soft links were weird and may have caused deployment issues. I had to manually re-make them to get things working. Also, building release was messy at first because I did not realize that Awesomium was compiled 32 bit only. Not an issue just a pointer to others :)

Do you know if Java support would be possible at all? I have a version of this plugin using standard Webkit on OS X, and it works with Java and flash sans issue, but I cant get a rendering callback for the equivalent of 'isDirty', which as you know is a huge performance improver. Doing the smart things that you are doing in Awesomium are a no go, like trapping pop ups, etc.

Getting Flash working would be amazing, and Java a coup. Good luck and Thanks for any pointers. Oh, and apologies for the email + comment + forum post, can you tell this Awesomium excites me?
User avatar
vade
 
Posts: 5
Joined: Fri Jul 03, 2009 11:28 pm


Re: 1.0.8 + OS X + Flash workaround questions

Postby adam » Sat Jul 04, 2009 6:05 am

You're welcome, glad you like it!

As for Flash, even the current pause/resume thread synchronization workaround for Mac OSX isn't foolproof (crashes still occur 5% of the time). I know what the real solution is now but it's going to take quite a bit of time and effort to achieve as it will require a major architecture change within Awesomium.

Sorry about the soft links getting messed up in the SDK-- I had transferred the files over to Windows before zipping it up (I should've just created a tar.gz on Mac OSX to preserve the structure).

As long as Java supports windowless rendering of some sort, it might be possible. Could you give me a little more info about the plain-WebKit-based plugin you previously used? Maybe I could figure something out there.
User avatar
adam
Site Admin
 
Posts: 191
Joined: Tue Feb 03, 2009 11:05 pm

Re: 1.0.8 + OS X + Flash workaround questions

Postby vade » Sat Jul 04, 2009 6:17 am

Sure, I can give you the source to the plugin :) Its for Quartz Composer, so you have to mess with it in there,

http://kineme.net/files/Archive_2.zip

You can see a discussion about it on this thread: http://kineme.net/Discussion/General/CoGeWebkitPlugin

The original code is not mine, but I pretty much re-wrote it. Its not asyncronous (is this an inherit property of Chromiums webkit port, something you hacked, or something lower level in webcore? Im *really* curious about that, this plugin stalls the OpenGL rendering when it loads), nor does it have isDirty as I mentioned (I can use [myWebView needsDisplay], but that seems to ignore NPApi plugins within the webview, which pisses me off to NO end :P - this is why I reallllyyyyy want Awesomium to work for this project, it solves the offscreen rendering performance issues so well).

Thanks for the reply, super curious, and thanks again!
User avatar
vade
 
Posts: 5
Joined: Fri Jul 03, 2009 11:28 pm

Re: 1.0.8 + OS X + Flash workaround questions

Postby adam » Mon Jul 13, 2009 10:03 am

Ah, thanks for sharing the code!

As for the asynchronous bit, I pretty much implemented it completely on my own using the typical multithreading techniques and the double-buffering concept of modern videocards.
User avatar
adam
Site Admin
 
Posts: 191
Joined: Tue Feb 03, 2009 11:05 pm

Re: 1.0.8 + OS X + Flash workaround questions

Postby vade » Mon Jul 13, 2009 5:16 pm

Just so you know we put our QC plugin project up on sourceforge, so the latest is there:

http://sourceforge.net/projects/cogewebkit/

Thanks for letting me know about async. Whats interesting is it seems that Webkit rendering (the building of the bitmap views of the HTML) seems to not block Gl drawing either. You are also doing that in the background, or is that Chromium? It seems webkit on OS X in a webview does block when loading resources and putting the view together :(
User avatar
vade
 
Posts: 5
Joined: Fri Jul 03, 2009 11:28 pm

Re: 1.0.8 + OS X + Flash workaround questions

Postby psenough » Tue Jul 14, 2009 11:23 am

awesomium on quartz?! thats sick :o
but i guess its leopard only, no? :cry:
User avatar
psenough
 
Posts: 56
Joined: Mon Feb 09, 2009 11:07 am
Location: gaia / coimbra (.pt)

Re: 1.0.8 + OS X + Flash workaround questions

Postby vade » Tue Sep 15, 2009 8:59 pm

Hi

So is this something that will be fixed in Awesomium 1.5? I'd love to have flash / java working in Mac OS X Awesomium for offscreen rendering.

Let me know, or if there is an example of the above workaround you mention, because I've not been able to get it to work, kind of waiting for 1.5 to try things again :)

Thanks,
User avatar
vade
 
Posts: 5
Joined: Fri Jul 03, 2009 11:28 pm


Return to Get Help

Who is online

Users browsing this forum: No registered users and 1 guest

cron