How do I get PCM audio from QTKit in a 64-bit application?

I have a 64-bit Mac OS X Cocoa application that uses the AV Foundation for most of its media I / O tasks, however I would like it to be able to read other formats as well, most notably Motion JPEG inside an AVI container, but, possibly others (other codecs and formats supported by third party QuickTime plugins). This of course brings me to QTKit as QuickTime itself is not available for 64-bit applications.

This is a video processing and editing application, so I need to capture decoded sample data.

I've already got around the biggest performance issues when grabbing frames in QTKit. For those interested, you want to direct QTMovie to the desired frame fetch time and then grab it with QTMovie -frameImageAtTime with the QTMovieFrameImageSessionMode attribute enabled and set the QTMovieFrameImageType to give you CVPixelBufferRef instead of NSImage.

However, I am having difficulty getting the decoded PCM audio data. It was pretty easy to go back to QuickTime 7 days ago, but of course I cannot call the QuickTime API from a 64 bit application. I don't see anything suitable in the QTMovie class, or I am going to QTTrack level too. So ... How does a 64-bit application get PCM audio from QTKit or QuickTime?

thank

+3


source to share


1 answer


I am just struggling with a similar problem. The parts of the QT API required to extract audio data are simply not available for 64-bit applications. All relevant messages for receiving any audio data are for MovieAudioExtractionFillBuffer and the like.



My solution will be split into applications and projects, so I will have a 32-bit audio allocation process and a 64-bit main application process using some IPC memory transfer to receive audio data.

+2


source







All Articles