We need to include a headers defining nsrefcnt and NS_IsMainThread(),
and make sure we reference the CMLinker versions of the CoreMedia
functions rather than the system ones.
This fixes the frame drops on test.mp4. For now it just
assumes a reorder depth of 3, but we need to plumb the
actual value through the demuxer.
Based on now-removed code from Edwin's FFmpegH264Decoder.
UInt32 is an unsigned long on i686 while uint32_t is an unsigned int.
The compiler can't covert from a pointer to one to the pointer to
the other, so just use the MacOS type.
There's no problem on 64-bit.
Implement an h.264 decoder using Apple's VideoToolbox framework.
Based on gstreamer's vtdec because there's very little documentation
for this API beyond the framework's header file.
Reuse the MOZ_APPLEMEDIA define from the mp3 decoder.
AAC decoding is stubbed to use the BlankDecoderModule's 440A tone.
Provide a stub header for the VideoToolbox framework and load
it dynamically at run time so we can build and run on versions
prior to MacOS X 10.8 where it's not available.
Dynamically load the CoreMedia framework as well, but build
against its headers since it's available on MacOS X 10.7 or
later, which is our minimum build version.