[Swfdec] Mac OS X Port Update
Benjamin Otte
otte at gnome.org
Sat Sep 13 03:50:41 PDT 2008
On Sat, Sep 13, 2008 at 6:12 AM, Nick Zitzmann <seiryu at comcast.net> wrote:
> I'm looking at releasing a public beta of Swfdec 0.8.0 for Mac OS X in
> a few days.
>
> Here's my source code so far; don't check this into anything yet
> because I've got some more things to do over the weekend: <http://seiryu.home.comcast.net/macosx.zip
>
Awesome news. I'll have a look at that soon and comment about it. For
now, I'll just answer your questions:
> 1. I've noticed that JPEG rendering is really slow for some reason,
> and I hope it's from something I'm doing incorrectly. But every time
> an animation uses at least one JPEG, drawing the frame seems to
> monopolize the CPU. This makes JPEG-heavy animations unplayable. Can
> anyone look at my -drawRect: method in SDFlashView and tell me if I'm
> missing something?
>
Usually the image is decoded once and then cached until the cache is
reclaimed. So it might very well be a problem with Cairo's OS X
backend or our caching as well as the JPEG decoder. Someone would need
to experiment and profile there.
> 2. Also, I've noticed that on some animations, when the swfdec_player
> structure is deallocated, when it tries to deallocate some of the
> ActionScript variables, it causes a crash. Is this happening to anyone
> else? Should I file a bug? I can't reproduce the problem 100% of the
> time.
>
It's weird if it's only happening on OS X, might be your problem. The
last garbage collection is somewhat tricky, because it happens in a
pretty much random order, and sometimes objects refer to each other in
their destructors (aka dispose/finalize vfuncs), which shouldn't
happen.
Anyway, if you get a crash, the file that caused it and a stacktrace
are a good start.
> 3. In the video decoder, I'm getting the frames, but is there some way
> to get the container, and if so, then how? I'm trying to use QuickTime
> to load the Flash video, but QuickTime apparently needs the whole
> container format, and can't do much with just frames.
>
Nope, you get just the frames. Making available the container doesn't
work because Swfdec needs to access the data parts of the stream, so
needs to parse it itself.
I'd have thought quicktime gives you access to the video codecs
somehow in its low level APIs. How would other people integrate their
codecs/containers with Quicktime otherwise?
Cheers,
Benjamin
More information about the Swfdec
mailing list