INDExOS / media-for-mobile

Media for Mobile
Other
456 stars 177 forks source link

Stop AudioRecord while streaming and release mic for sip call then start AudioRecord without interrupting the streaming #47

Open Meamo opened 8 years ago

Meamo commented 8 years ago

Hi, I am streaming video and audio to Wowza streaming server with the cameraStreamerActivity. In my application, there is a fragment that allows SIP calls to other devices. What I would like to achieve is to stop streaming voice when needed - during the sip call - and then resume the voice streaming after the sip call ends. In my app, I have a background service to do the streaming.

I have made several trials to achieve this. First I commented out the capture.setTargetAudioFormat(audioFormat) before capture.start(). This will stream video only. After that, I modified android library so that I add the microphone source and audio encoder to the pipeline. When I do this, the stream is completely disconnected from wowza engine.

Could you please help me in this, it is an important requirement to be able to release the microphone and attach it back when needed, without interrupting the streaming to the server.