fyhertz / libstreaming

A solution for streaming H.264, H.263, AMR, AAC using RTP on Android
Apache License 2.0
3.49k stars 1.08k forks source link

Showing preview whether client connects or not #161

Open aacanakin opened 8 years ago

aacanakin commented 8 years ago

In example 1, a new rtsp server service is triggered and it doesn't show the camera preview unless a client connects. I want to use the example 1 approach but I want to still show the camera preview to the surface view. mSession.startCameraPreview() throws CameraInUseException when the client connects.

Is there any way to do this?

apavlenko commented 8 years ago

I guess that in addition to the existing RtspServer.MESSAGE_STREAMING_STARTED and RtspServer.MESSAGE_STREAMING_STOPPED callback messages the RtspServer should post two more messages like RtspServer.MESSAGE_CAMERA_LOCKING and RtspServer.MESSAGE_CAMERA_RELEASED that could be used to stop/start external preview mode...