1

I am developing an Android application, where I want to be able to stream live picture from the GoPro camera. I am able to stream what the GoPro sees, but when I send a command to GoPro to change the aspect ratio of the stream or to flip the stream 180 degree my stream freezes.

I am using AsynkTask for the URL GoPro commands so I don't freeze the main UI thread. For the stream I am using the MeadiPlayer and the SurfaceView. This is the URL what I pass to the MediaPlayer: http://10.5.5.9:8080/live/amba.m3u8

I am implementing both SurfaceView callbacks and MediaPlayer onPrepare listener. When I send a command to the GoPro, for example changing the orientation of the screen by 180 degree while streaming, I first stop the stream. Then when the AsyncTask finishes I call prepareAsynk of my MediaPlayer instance and when onPrepare gets called I start the stream again with start, but the stream just stays froze.

Then if I call stop again following with the prepareAsynk, then start in onPrepare the stream starts playing again.

Anybody has any hint how can I overcome this issue?

Silex
  • 2,583
  • 3
  • 35
  • 59

0 Answers0