set kAudioFilePropertyAlbumArtwork: fail
set kAudioFilePropertyAlbumArtwork: fail
- Subject: set kAudioFilePropertyAlbumArtwork: fail
- From: Alex _ <email@hidden>
- Date: Mon, 05 Aug 2013 10:37:07 +0200
- Importance: Normal
Hello folks,
I'm struggling to set the artwork to a M4P created audio file.
I can:
- setup the converter
- create the file
- set the cookie
- write packet into it
- set every property that's allowed to be written
- close the file
-> listen to it (if I haven't try to set the artwork)
Unfortunately, as soon as I try to set the artwork, the AudioFileSetProperty doesn't fail, but AudioFileClose does.
Specifically I get: +[NSConcreteData bytes]: unrecognized selector sent to class
...
NSData *image = [NSData dataWithContentsOfFile:@"/tmp/test.jpg"];
if (image != NULL)
{
checkError("AudioFileSetProperty",
AudioFileSetProperty(audioID,
kAudioFilePropertyAlbumArtwork,
(UInt32)[image length],
CFBridgingRetain(image)));
}
checkError("AudioFileClose",
AudioFileClose(audioID));
...
image is a regular JPEG picture.
This error happens in the AudioFileClose context.
I also tried to overcome the problem by using AVAssetExportSession, but instead of failing, the cover isn't written as a metadata.
Do you have any idea?
Thank you very much
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden