player: rename dvdnav to discnav

Now, navigation works both of DVD and non-BD-J Blu-ray. Therefore,
rename all 'dvdnav' strings which are not DVD specific to 'discnav'
This commit is contained in:
xylosper 2014-03-30 11:42:49 +09:00
parent f2088c73e3
commit fb47f2f940
11 changed files with 30 additions and 29 deletions

View File

@ -192,19 +192,19 @@
#JOY_BTN2 add volume 1
#JOY_BTN3 add volume -1
# For dvdnav://
# For dvdnav:// and bdnav://
# dvdnav controls during playback
#ENTER {dvdnav} dvdnav menu # DVDNav MENU
# BS {dvdnav} dvdnav prev # DVDNav PREVIOUS menu (in the order chapter->title->root)
# dvdnav controls when showing menu (additionally to the controls above)
#UP {dvdnav-menu} dvdnav up # DVDNav UP
#DOWN {dvdnav-menu} dvdnav down # DVDNav DOWN
#LEFT {dvdnav-menu} dvdnav left # DVDNav LEFT
#RIGHT {dvdnav-menu} dvdnav right # DVDNav RIGHT
#ENTER {dvdnav-menu} dvdnav select # DVDNav SELECT (ok)
#MOUSE_BTN0 {dvdnav-menu} dvdnav mouse
#MOUSE_MOVE {dvdnav-menu} dvdnav mouse_move
# navigation controls during playback
#ENTER {discnav} discnav menu # DISCNAV MENU
# BS {discnav} discnav prev # DISCNAV PREVIOUS menu (in the order chapter->title->root)
# navigation controls when showing menu (additionally to the controls above)
#UP {discnav-menu} discnav up # DISCNAV UP
#DOWN {discnav-menu} discnav down # DISCNAV DOWN
#LEFT {discnav-menu} discnav left # DISCNAV LEFT
#RIGHT {discnav-menu} discnav right # DISCNAV RIGHT
#ENTER {discnav-menu} discnav select # DISCNAV SELECT (ok)
#MOUSE_BTN0 {discnav-menu} discnav mouse
#MOUSE_MOVE {discnav-menu} discnav mouse_move
#
# Not assigned by default

View File

@ -159,7 +159,7 @@ const struct mp_cmd_def mp_cmds[] = {
}},
{ MP_CMD_DISABLE_INPUT_SECTION, "disable_section", { ARG_STRING } },
{ MP_CMD_DVDNAV, "dvdnav", { ARG_STRING } },
{ MP_CMD_DISCNAV, "discnav", { ARG_STRING } },
{ MP_CMD_AF, "af", { ARG_STRING, ARG_STRING } },
@ -234,6 +234,7 @@ static const struct legacy_cmd legacy_cmds[] = {
{"show_tracks", "show_text ${track-list}"},
{"show_playlist", "show_text ${playlist}"},
{"speed_mult", "multiply speed"},
{"dvdnav", "discnav"},
// Approximate (can fail if user added additional whitespace)
{"pt_step 1", "playlist_next"},

View File

@ -84,7 +84,7 @@ enum mp_command_type {
MP_CMD_ENABLE_INPUT_SECTION,
MP_CMD_DISABLE_INPUT_SECTION,
MP_CMD_DVDNAV,
MP_CMD_DISCNAV,
/// DVB commands
MP_CMD_DVB_SET_CHANNEL,

View File

@ -222,7 +222,7 @@ SOURCES = audio/audio.c \
player/client.c \
player/configfiles.c \
player/command.c \
player/dvdnav.c \
player/discnav.c \
player/loadfile.c \
player/main.c \
player/misc.c \

View File

@ -3333,7 +3333,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
mp_input_disable_section(mpctx->input, cmd->args[0].v.s);
break;
case MP_CMD_DVDNAV:
case MP_CMD_DISCNAV:
mp_nav_user_input(mpctx, cmd->args[0].v.s);
break;

View File

@ -371,7 +371,7 @@ void mp_write_watch_later_conf(struct MPContext *mpctx);
struct playlist_entry *mp_check_playlist_resume(struct MPContext *mpctx,
struct playlist *playlist);
// dvdnav.c
// discnav.c
void mp_nav_init(struct MPContext *mpctx);
void mp_nav_reset(struct MPContext *mpctx);
void mp_nav_destroy(struct MPContext *mpctx);

View File

@ -24,7 +24,7 @@
#include "common/common.h"
#include "input/input.h"
#include "stream/stream_dvdnav.h"
#include "stream/discnav.h"
#include "sub/dec_sub.h"
#include "sub/osd.h"
@ -86,12 +86,12 @@ void mp_nav_init(struct MPContext *mpctx)
return;
mpctx->nav_state = talloc_zero(NULL, struct mp_nav_state);
mpctx->nav_state->log = mp_log_new(mpctx->nav_state, mpctx->log, "dvdnav");
mpctx->nav_state->log = mp_log_new(mpctx->nav_state, mpctx->log, "discnav");
MP_VERBOSE(mpctx->nav_state, "enabling\n");
mp_input_enable_section(mpctx->input, "dvdnav", 0);
mp_input_set_section_mouse_area(mpctx->input, "dvdnav-menu",
mp_input_enable_section(mpctx->input, "discnav", 0);
mp_input_set_section_mouse_area(mpctx->input, "discnav-menu",
INT_MIN, INT_MIN, INT_MAX, INT_MAX);
}
@ -107,7 +107,7 @@ void mp_nav_reset(struct MPContext *mpctx)
nav->nav_menu = false;
nav->nav_draining = false;
nav->nav_still_frame = 0;
mp_input_disable_section(mpctx->input, "dvdnav-menu");
mp_input_disable_section(mpctx->input, "discnav-menu");
// Prevent demuxer init code to seek to the "start"
mpctx->stream->start_pos = stream_tell(mpctx->stream);
stream_control(mpctx->stream, STREAM_CTRL_RESUME_CACHE, NULL);
@ -118,8 +118,8 @@ void mp_nav_destroy(struct MPContext *mpctx)
osd_set_nav_highlight(mpctx->osd, NULL);
if (!mpctx->nav_state)
return;
mp_input_disable_section(mpctx->input, "dvdnav");
mp_input_disable_section(mpctx->input, "dvdnav-menu");
mp_input_disable_section(mpctx->input, "discnav");
mp_input_disable_section(mpctx->input, "discnav-menu");
talloc_free(mpctx->nav_state);
mpctx->nav_state = NULL;
}
@ -188,10 +188,10 @@ void mp_handle_nav(struct MPContext *mpctx)
case MP_NAV_EVENT_MENU_MODE:
nav->nav_menu = ev->u.menu_mode.enable;
if (nav->nav_menu) {
mp_input_enable_section(mpctx->input, "dvdnav-menu",
mp_input_enable_section(mpctx->input, "discnav-menu",
MP_INPUT_ON_TOP);
} else {
mp_input_disable_section(mpctx->input, "dvdnav-menu");
mp_input_disable_section(mpctx->input, "discnav-menu");
}
break;
case MP_NAV_EVENT_HIGHLIGHT: {

View File

@ -45,7 +45,7 @@
#include "options/m_option.h"
#include "stream.h"
#include "osdep/timer.h"
#include "stream_dvdnav.h"
#include "discnav.h"
#include "sub/osd.h"
#include "sub/img_convert.h"
#include "video/mp_image.h"

View File

@ -35,7 +35,7 @@
#include "osdep/timer.h"
#include "stream.h"
#include "demux/demux.h"
#include "stream_dvdnav.h"
#include "discnav.h"
#include "video/out/vo.h"
#include "stream_dvd_common.h"

View File

@ -209,7 +209,7 @@ def build(ctx):
( "player/client.c" ),
( "player/command.c" ),
( "player/configfiles.c" ),
( "player/dvdnav.c" ),
( "player/discnav.c" ),
( "player/loadfile.c" ),
( "player/main.c" ),
( "player/misc.c" ),