I made a basic wowza player using the instructions given here :
https://www.wowza.com/docs/how-to-play-a-live-stream-with-wowza-gocoder-sdk-for-android
Note : the streaming part is working and is visible on the wowza streaming cloud website.
The connection settings are done as shown here :
https://www.wowza.com/docs/how-to-connect-to-wowza-streaming-cloud-with-gocoder-sdk-for-android
I am using wowza cloud streaming as the server however I get the following error :
FATAL EXCEPTION: main
Process: trial.drone.streamer, PID: 8450
java.lang.RuntimeException: Unable to start activity ComponentInfo{trial.drone.streamer/trial.drone.streamer.Player}: java.lang.RuntimeException: Invalid surface: null
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2455)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2515)
at android.app.ActivityThread.access$1000(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1379)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5571)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:745)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:635)
Caused by: java.lang.RuntimeException: Invalid surface: null
at com.wowza.gocoder.sdk.api.gles.EglCore.createWindowSurface(GoCoderSDK:225)
at com.wowza.gocoder.sdk.api.gles.EglSurfaceBase.createWindowSurface(GoCoderSDK:58)
at com.wowza.gocoder.sdk.api.gles.WindowSurface.(GoCoderSDK:39)
at com.wowza.gocoder.sdk.api.player.WOWZPlayerView.clear(GoCoderSDK:545)
at com.wowza.gocoder.sdk.api.player.WOWZPlayerView.a(GoCoderSDK:826)
at com.wowza.gocoder.sdk.api.player.WOWZPlayerView.play(GoCoderSDK:900)
at trial.drone.streamer.Player.onCreate(Player.java:41)
at android.app.Activity.performCreate(Activity.java:6357)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2408)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2515)
at android.app.ActivityThread.access$1000(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1379)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5571)
This is the code I am using :
private WOWZPlayerView mStreamPlayerView;
private WOWZPlayerConfig mStreamPlayerConfig; <br> private WowzaGoCoder goCoder;@Override<br>protected void onCreate(Bundle savedInstanceState) {<br> super.onCreate(savedInstanceState);<br>setContentView(R.layout.activity_player);<br>goCoder = WowzaGoCoder.init(getApplicationContext(), "license_key");<br>mStreamPlayerView = (WOWZPlayerView) findViewById(R.id.vwStreamPlayer);<br>mStreamPlayerConfig = new WOWZPlayerConfig();<br>mStreamPlayerConfig.setIsPlayback(true);<br>mStreamPlayerConfig.setHostAddress("host_address");<br>mStreamPlayerConfig.setApplicationName("app-xxxx");<br>mStreamPlayerConfig.setStreamName("stream_name");<br>mStreamPlayerConfig.setPortNumber(1935);<br>mStreamPlayerConfig.setAudioEnabled(true);<br>mStreamPlayerConfig.setVideoEnabled(true);<br>mStreamPlayerView.setScaleMode(WOWZMediaConfig.FILL_VIEW);<br>WOWZStatusCallback statusCallback = new StatusCallback();<br>mStreamPlayerView.play(mStreamPlayerConfig, statusCallback);}<br><br> class StatusCallback implements WOWZStatusCallback{<br> @Override<br>public void onWZStatus(WOWZStatus wzStatus) {<br> }<br> @Override<br>public void onWZError(WOWZStatus wzStatus) {<br> }<br> }