开发者

ios - Is it possible to record audio and play video from network stream at the same time?

I'm doing research for a iPhone video chat app project.

I've tried this t开发者_如何学编程o capture image,

use AVCaptureVideoPreviewLayer to display camera view

and put a MPMoviePlayerController to play network stream video at the back.

They all work until I add an audio input to the AVCaptureSession.

The MPMoviePlayerController stop the AVCaptureSession if there is audio input.

I think of using AVAudioSession for both playing and recording audio and some other way to play video, but the documentation of AVAudioPlayer said

"Apple recommends that you use this class for audio playback unless you are playing audio captured from a network stream or require very low I/O latency."

I found the Multimedia Programming Guide saying that

"To provide lowest latency audio, especially when doing simultaneous input and output (such as for a VoIP application), use the I/O unit or the Voice Processing I/O unit."

Is it the correct direction to implement video chat in iphone?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜