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

Is there any callback that tells if streaming has started? #151

Open ghost opened 9 years ago

ghost commented 9 years ago

Hi,

I am using libstreaming to stream my camera feed from Android phone to Wowza media server. Currently, I am calling the startStream method to start the stream.

Is there any method or callback that indicates that streaming has begun?

Thanks!

Locnath commented 9 years ago

Are you using MODE_MEDIACODEC_API or MODE_MEDIARECORDER_API ?

If you are using MODE_MEDIACODEC_API, then you can check if you are getting the onPreviewFrame callbacks defined in encodeWithMediaCodecMethod1().

If you are using MODE_MEDIARECORDER_API mode, then it is a bit involved since the frames from camera dont actually come to the app layer(it is directly rendered on the surface provided to native layers).

ghost commented 9 years ago

Thanks! I will try this and let your know. BTW, I am using the MODE_MEDIACODEC_API