我尝试将 google glass 连接到我自己的 android 应用程序,并尝试使用 wowza live 在其上显示实时流,但我不知道为什么它不起作用。任何人有想法????
这是我的所有代码: https ://github.com/andermaco/GlassStream
这是我的代码的一部分,它给出了错误,出了什么问题?
try {
// We parse the URI written in the Editext
Pattern uri = Pattern.compile("rtsp://(.+):(\\d+)/(.+)");
Matcher m = uri.matcher(url); m.find();
ip = m.group(1);
port = m.group(2);
path = m.group(3);
// Connection to the RTSP server
if (mSession.getVideoTrack() != null) {
mSession.getVideoTrack().setVideoQuality(mQuality);
}
mClient.setCredentials(user, password);
mClient.setServerAddress(ip, Integer.parseInt(port));
mClient.setStreamPath("/"+path);
mClient.startStream(1);
// Init recording flag
recording = true;
return START_SUCCEEDED;
} catch (Exception e) {
Log.e(TAG, "Error starting streaiming.", e);
Toast.makeText(getApplicationContext(), e.getLocalizedMessage(), Toast.LENGTH_SHORT).show();
return START_FAILED;
}
这是错误:
E/CameraActivity: Error starting streaiming.
java.lang.IllegalStateException: No successful match so far com.mundoglass.worldglass.CameraActivity$ToggleStreamAsyncTask.doInBackground(CameraActivity.java:190)