|
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
There’s many old posts about this but I was wondering somebody would be willing to tell me if there is a way to extract PCM data from an M4P file using Quicktime 7.3 on Windows? Currently my code calls these functions to extract PCM (leaving out variable declarations and other error checking code): InitializeQTML(0); EnterMovies(); QTNewDataReferenceFromFullPathCFString(input, kQTNativeDefaultPathStyle, 0, &dataRef, &dataRefType); NewMovieFromDataRef(&movie, newMovieActive, &id, dataRef, dataRefType); GetMovieTrackCount(movie); GetMovieIndTrack(movie, 0); GetTrackMedia(track); GetMediaHandlerDescription(media, &trackType, NULL, NULL); MovieAudioExtractionBegin(movie, 0, &audioExtraction); MovieAudioExtractionGetProperty(audioExtraction, kQTPropertyClass_MovieAudioExtraction_Audio, kQTMovieAudioExtractionAudioPropertyID_AudioStreamBasicDescription, sizeof(audioDesc), &audioDesc, NULL); MovieAudioExtractionSetProperty(audioExtraction, kQTPropertyClass_MovieAudioExtraction_Audio, kQTMovieAudioExtractionAudioPropertyID_RenderQuality, sizeof(quality), &quality); GetMediaDuration(audioMedia); GetMediaTimeScale(audioMedia); MovieAudioExtractionFillBuffer(audioExtraction, &requestFrames, abl, &flags); MovieAudioExtractionEnd(audioExtraction); DisposeHandle(dataRef); ExitMovies(); TerminateQTML(); The code I’ve written extracts valid PCM for M4A and MP3 files, but when I try to extract audio from an M4P file (one authorized to play on my machine), it brings up a dialog asking me to play the file in iTunes. All the functions return noErr but the PCM data is all 0’s. Also, and I imagine this is by design, the code will exit if I’m debugging. The files do contain the drms atom so they are proper M4P files. Am I missing something, using the wrong API, or is this just impossible? Is it possible with another API available on Windows and Mac? Will this code work on the Mac? Thanks BA |
_______________________________________________ Do not post admin requests to the list. They will be ignored. QuickTime-API mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
| Home | Archives | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2011 Apple Inc. All rights reserved.