After more than two months of hard work, we have achieved initial results in real-time audio/video conversations on the iPhone 4 platform. I checked a lot of information and thanked the information provider. In the future, I will write down this article. I will only list the key points, the specific code and the platform port, and try your best. Follow these steps.
1. avcapturesession in the iPhone 4 SDK is used for video collection. Sample Code is available on the official website of apple.
2. FFmpeg is used for video encoding. To support h264 encoding, You need to introduce the x264 library. FFMPEG and x264 are two different libraries that need to be compiled separately.
3. For more information about video decoding and playback, see the open-source project iframeextractor.
4. audioqueue is available for Audio Acquisition and playback. Because audioqueue itself supports the collection and playback of various audio data, no coding/decoding is required. The official website of Apple has an example called speakhere.
Solution
Use live555 to obtain the h264 video stream and push it to FFMPEG for decoding. Then use the iPhone's imageview for display.
The audio is also processed separately and then synchronized.
Live555 And FFMPEG iPhone versions have their own digging
Http://blog.csdn.net/zxc110110/article/details/7188210