Search code examples
javaandroidsocketsvideo-streamingmedia-player

Using media player and camera to realize live video chat in android,based sockets


Yes,I have a requirement list as follows(maybe it can called simple ideas)

1.Using Camera and MediaRecoder to recording a video (Now I can record and save it to a file)

refer: http://developer.android.com/guide/topics/media/camera.html

2.When recording video,I need send it to my Server for transit (I plan to use socket[TCP] to realize)

3.Server receive socket data and transit it to another client(android/PC)

4.At the same time,Server send video streaming to Android client by socket
(I try to using ParcelFileDescriptor.fromSocket(client),but it always catch IOException:setDataSourceFD failed.: status=0x80000000)

refer: Stream live video from phone to phone using socket fd

5.Android client receive Server's data and play it using MediaPlay and SurfaceView

6.In addition,I want server can switch video streaming from socket data or local file,when server transit data

This is my idea,but don't know if feasible and don't know how to achieve it
I wonder if you can give me some references or examples, thanks


btw, i am first time ask question in stackoverflow,before i always view questions in here,it helpful.if my question not clearly,please tell me,thank you.if i make some mistake,else i hope you tell me,thanks.


Solution

  • you need to read about sipdroid have a look on https://code.google.com/p/sipdroid/ here you can find your answer additional links.

    1.http://blog.kylehasegawa.com/google-voice-voip-on-android-just-got-a-lot-easier-with-pbxes-peering

    2.http://seethisnowreadthis.com/2009/07/11/get-sipdroid-to-work-with-any-sip-provider-on-your-android-phone/

    3.http://blog.voipsupply.com/first-look-sipdroid-open-source-sip-client-for-android-mobile-phones

    4.http://guardianproject.info/2010/05/26/how-to-setup-a-private-mobile-phone-system-for-android-and-beyond/