[Android] LibVLC Java: add an OnNativeCrashListener
Adrien Maglo
git at videolan.org
Thu May 8 11:50:57 CEST 2014
vlc-ports/android | branch: master | Adrien Maglo <magsoft at videolan.org> | Thu May 8 11:42:53 2014 +0200| [4946b4f26e9ff716e7d774c7cd5801a9524b93b1] | committer: Adrien Maglo
LibVLC Java: add an OnNativeCrashListener
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=4946b4f26e9ff716e7d774c7cd5801a9524b93b1
---
vlc-android/src/org/videolan/libvlc/LibVLC.java | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/vlc-android/src/org/videolan/libvlc/LibVLC.java b/vlc-android/src/org/videolan/libvlc/LibVLC.java
index a86541e..e386566 100644
--- a/vlc-android/src/org/videolan/libvlc/LibVLC.java
+++ b/vlc-android/src/org/videolan/libvlc/LibVLC.java
@@ -75,6 +75,9 @@ public class LibVLC {
private boolean frameSkip = false;
private int networkCaching = 0;
+ /** Native crash handler */
+ private OnNativeCrashListener mOnNativeCrashListener;
+
/** Check in libVLC already initialized otherwise crash */
private boolean mIsInitialized = false;
public native void attachSurface(Surface surface, IVideoPlayer player);
@@ -684,6 +687,16 @@ public class LibVLC {
public native float[] getPreset(int index);
+ public static interface OnNativeCrashListener {
+ public void onNativeCrash();
+ }
+
+ public void setOnNativeCrashListener(OnNativeCrashListener l) {
+ mOnNativeCrashListener = l;
+ }
+
private void onNativeCrash() {
+ if (mOnNativeCrashListener != null)
+ mOnNativeCrashListener.onNativeCrash();
}
}
More information about the Android
mailing list