iOS: RT Audio Processing of a Video Asset
iOS: RT Audio Processing of a Video Asset
- Subject: iOS: RT Audio Processing of a Video Asset
- From: Brandon Adams <email@hidden>
- Date: Wed, 24 Aug 2011 11:31:42 -0700
Hi,
If anyone can offer any insight on this topic it would be much appreciated. I've already searched the lists and developer forums on this topic
and found nothing on this topic.
Here is what I need to do: Process the audio track of a video asset during playback.
I have tried using both an AVPlayer and AVAssetReader. The AVPlayer is used to play the video track and the AVAssetReader is used to
load audio samples into a circular buffer and played back through the RemoteIO Audio Unit. Apparently, this can't be done asynchronously
because any attempt from AVAssetReader to read samples during playback stops AVPlayer (i.e. makes player.rate == 0.0). I'm assuming
AVPlayer uses some sort of internal lock, flag, or semaphore to prevent anything from accessing its asset.
I also can't create two AVAssets assigned to the same file.
The only way this seems possible to me is to create an AVAssetReader, add two outputs one for audio the other for video, use the audio as
stated above, load the video into a circular buffer and vend that content to a CALayer.
This seems like a cumbersome approach to what seems like a simple task, which leads me to think I've missed something. Is there a better
approach to this problem?
Thanks,
Brandon
_______________________________________________
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