[Android] libvlc: move INPUT_NAV_* to MediaPlayer

Thomas Guillem git at videolan.org
Thu May 28 16:48:51 CEST 2015


vlc-ports/android | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu May 28 16:48:32 2015 +0200| [6b2bfc20c3dba9e3bb08088b70d0985c60731f4e] | committer: Thomas Guillem

libvlc: move INPUT_NAV_* to MediaPlayer

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=6b2bfc20c3dba9e3bb08088b70d0985c60731f4e
---

 libvlc/src/org/videolan/libvlc/LibVLC.java                   |    6 ------
 libvlc/src/org/videolan/libvlc/MediaPlayer.java              |    8 ++++++++
 .../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java  |   10 +++++-----
 3 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/libvlc/src/org/videolan/libvlc/LibVLC.java b/libvlc/src/org/videolan/libvlc/LibVLC.java
index 80459d4..aa4b4a6 100644
--- a/libvlc/src/org/videolan/libvlc/LibVLC.java
+++ b/libvlc/src/org/videolan/libvlc/LibVLC.java
@@ -35,12 +35,6 @@ import org.videolan.libvlc.util.VLCUtil;
 public class LibVLC {
     private static final String TAG = "VLC/LibVLC";
 
-    public static final int INPUT_NAV_ACTIVATE = 0;
-    public static final int INPUT_NAV_UP = 1;
-    public static final int INPUT_NAV_DOWN = 2;
-    public static final int INPUT_NAV_LEFT = 3;
-    public static final int INPUT_NAV_RIGHT = 4;
-
     public static final boolean HAS_WINDOW_VOUT = AndroidUtil.isGingerbreadOrLater();
 
     /** libVLC instance C pointer */
diff --git a/libvlc/src/org/videolan/libvlc/MediaPlayer.java b/libvlc/src/org/videolan/libvlc/MediaPlayer.java
index 28db82e..0629560 100644
--- a/libvlc/src/org/videolan/libvlc/MediaPlayer.java
+++ b/libvlc/src/org/videolan/libvlc/MediaPlayer.java
@@ -41,6 +41,14 @@ public class MediaPlayer extends VLCObject {
         public static final int bottom_right = 8;
     }
 
+    public static class Navigate {
+        public static final int activate = 0;
+        public static final int up = 1;
+        public static final int down = 2;
+        public static final int left = 3;
+        public static final int right = 4;
+    }
+
     private Media mMedia = null;
 
     /**
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index e7c7b5d..0110db5 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -1082,22 +1082,22 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVideoPlay
     private boolean navigateDvdMenu(int keyCode) {
         switch (keyCode) {
             case KeyEvent.KEYCODE_DPAD_UP:
-                MediaPlayer().playerNavigate(LibVLC.INPUT_NAV_UP);
+                MediaPlayer().playerNavigate(MediaPlayer.Navigate.up);
                 return true;
             case KeyEvent.KEYCODE_DPAD_DOWN:
-                MediaPlayer().playerNavigate(LibVLC.INPUT_NAV_DOWN);
+                MediaPlayer().playerNavigate(MediaPlayer.Navigate.down);
                 return true;
             case KeyEvent.KEYCODE_DPAD_LEFT:
-                MediaPlayer().playerNavigate(LibVLC.INPUT_NAV_LEFT);
+                MediaPlayer().playerNavigate(MediaPlayer.Navigate.left);
                 return true;
             case KeyEvent.KEYCODE_DPAD_RIGHT:
-                MediaPlayer().playerNavigate(LibVLC.INPUT_NAV_RIGHT);
+                MediaPlayer().playerNavigate(MediaPlayer.Navigate.right);
                 return true;
             case KeyEvent.KEYCODE_DPAD_CENTER:
             case KeyEvent.KEYCODE_ENTER:
             case KeyEvent.KEYCODE_BUTTON_X:
             case KeyEvent.KEYCODE_BUTTON_A:
-                MediaPlayer().playerNavigate(LibVLC.INPUT_NAV_ACTIVATE);
+                MediaPlayer().playerNavigate(MediaPlayer.Navigate.activate);
                 return true;
             default:
                 return false;



More information about the Android mailing list