[MPlayer-cvslog] r19774 - in trunk/stream: stream_dvdnav.c stream_dvdnav.h
nicodvb
subversion at mplayerhq.hu
Sat Sep 9 23:37:58 CEST 2006
Author: nicodvb
Date: Sat Sep 9 23:37:57 2006
New Revision: 19774
Modified:
trunk/stream/stream_dvdnav.c
trunk/stream/stream_dvdnav.h
Log:
added mp_dvdnav_handle_input to handle user's input (revived from the repository with few changes)
Modified: trunk/stream/stream_dvdnav.c
==============================================================================
--- trunk/stream/stream_dvdnav.c (original)
+++ trunk/stream/stream_dvdnav.c Sat Sep 9 23:37:57 2006
@@ -430,6 +430,46 @@
return STREAM_OK;
}
+
+int mp_dvdnav_handle_input(stream_t *stream, int cmd) {
+ dvdnav_priv_t * dvdnav_priv=(dvdnav_priv_t*)stream->priv;
+ dvdnav_t *nav = dvdnav_priv->dvdnav;
+ dvdnav_status_t status;
+ pci_t *pci = dvdnav_get_current_nav_pci(nav);
+ int reset = 0;
+
+ if(cmd != MP_CMD_DVDNAV_SELECT && !pci)
+ return 0;
+
+ switch(cmd) {
+ case MP_CMD_DVDNAV_UP:
+ status = dvdnav_upper_button_select(nav, pci);
+ break;
+ case MP_CMD_DVDNAV_DOWN:
+ status = dvdnav_lower_button_select(nav, pci);
+ break;
+ case MP_CMD_DVDNAV_LEFT:
+ status = dvdnav_left_button_select(nav, pci);
+ break;
+ case MP_CMD_DVDNAV_RIGHT:
+ status = dvdnav_right_button_select(nav, pci);
+ break;
+ case MP_CMD_DVDNAV_MENU:
+ status = dvdnav_menu_call(nav,DVD_MENU_Root);
+ reset = 1;
+ break;
+ case MP_CMD_DVDNAV_SELECT:
+ status = dvdnav_button_activate(nav, pci);
+ reset = 1;
+ break;
+ default:
+ mp_msg(MSGT_CPLAYER, MSGL_V, "Unknown DVDNAV cmd %d\n", cmd);
+ break;
+ }
+
+ return reset;
+}
+
stream_info_t stream_info_dvdnav = {
"DVDNAV stream",
"null",
Modified: trunk/stream/stream_dvdnav.h
==============================================================================
--- trunk/stream/stream_dvdnav.h (original)
+++ trunk/stream/stream_dvdnav.h Sat Sep 9 23:37:57 2006
@@ -43,5 +43,6 @@
void dvdnav_stream_fullstart(dvdnav_priv_t *dvdnav_priv);
unsigned int * dvdnav_stream_get_palette(dvdnav_priv_t * dvdnav_priv);
+int mp_dvdnav_handle_input(stream_t *stream, int cmd);
#endif
More information about the MPlayer-cvslog
mailing list