[vlc-commits] bluray: use navigation keys (DEMUX_NAV_...)

Petri Hintukainen git at videolan.org
Fri Aug 16 13:26:07 CEST 2013


vlc | branch: master | Petri Hintukainen <phintuka at users.sourceforge.net> | Thu Aug  8 09:30:55 2013 +0300| [256184cb3c39f55042981c850a715a676d9c3e82] | committer: Rafaël Carré

bluray: use navigation keys (DEMUX_NAV_...)

Signed-off-by: Rafaël Carré <funman at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=256184cb3c39f55042981c850a715a676d9c3e82
---

 modules/access/bluray.c |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index c1f25b3..be2d39c 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -654,6 +654,15 @@ static int onMouseEvent(vlc_object_t *p_vout, const char *psz_var, vlc_value_t o
     return VLC_SUCCESS;
 }
 
+static int sendKeyEvent(demux_sys_t *p_sys, unsigned int key)
+{
+    mtime_t now = mdate();
+    if (bd_user_input(p_sys->bluray, now, key) < 0) {
+        return VLC_EGENERIC;
+    }
+    return VLC_SUCCESS;
+}
+
 /*****************************************************************************
  * libbluray overlay handling:
  *****************************************************************************/
@@ -1124,6 +1133,17 @@ static int blurayControl(demux_t *p_demux, int query, va_list args)
             return VLC_SUCCESS;
         }
 
+        case DEMUX_NAV_ACTIVATE:
+            return sendKeyEvent(p_sys, BD_VK_ENTER);
+        case DEMUX_NAV_UP:
+            return sendKeyEvent(p_sys, BD_VK_UP);
+        case DEMUX_NAV_DOWN:
+            return sendKeyEvent(p_sys, BD_VK_DOWN);
+        case DEMUX_NAV_LEFT:
+            return sendKeyEvent(p_sys, BD_VK_LEFT);
+        case DEMUX_NAV_RIGHT:
+            return sendKeyEvent(p_sys, BD_VK_RIGHT);
+
         case DEMUX_CAN_RECORD:
         case DEMUX_GET_FPS:
         case DEMUX_SET_GROUP:



More information about the vlc-commits mailing list