开发者

how to accomplish the video chat between ios devices using AVFoundation framework and asp.net ( server side)

I want to make a video chat app which allows two users to do video chat using there iphones or ipad2, I started with using AVFoundation framework and using socket connection (CFStreams) to open a socket connection with my server (server side language is asp.net) let me explain in detail what I have achieved till now :)

1) I created avcapture session which gives the frames at regular intervals using captureOutput:didOutputSampleBuffer:fromConnection delegate.

2) I have established a socket connection to my server and have obtained two streams

3) In the delegate I convert the sample buffer in to (uint8_t *)buffer and send to my output stream

4) at .net end I write those bytes in a file

5) when my stream delegates receives the data back 开发者_如何学Cfrom server I create a assest with the url of the file made in server, create a avplayeritem and then play it in avplayer.

unfortunately it does not show anything.. please can anyone give me directions regarding whether this approach is right or wrong, what else I can do to achieve my aim?


I think you are writing out to a file unnecessarily. If this was me, when I receive the sample buffer I would just display it in a UIView directly. There should be plenty of guides and sample projects around for this.


May be you would have got an answer, if not try using Wowza Media server with RTMP library. But both of these involves a cost for using. But definitely this will help you acheive what you were looking for.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜