mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
Catch the exception thrown by GStreamer.init() and terminate application.
This commit is contained in:
parent
56697bc5d5
commit
81bb469d72
1 changed files with 7 additions and 0 deletions
|
@ -32,6 +32,7 @@ import android.widget.ImageButton;
|
|||
import android.widget.SeekBar;
|
||||
import android.widget.SeekBar.OnSeekBarChangeListener;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
public class Tutorial1 extends Activity implements SurfaceHolder.Callback, OnSeekBarChangeListener {
|
||||
private native void nativeInit();
|
||||
|
@ -56,7 +57,13 @@ public class Tutorial1 extends Activity implements SurfaceHolder.Callback, OnSee
|
|||
{
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
try {
|
||||
GStreamer.init(this);
|
||||
} catch (Exception e) {
|
||||
Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
|
||||
setContentView(R.layout.main);
|
||||
|
||||
|
|
Loading…
Reference in a new issue