diff options
author | wm4 <wm4@nowhere> | 2012-08-12 18:40:21 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-08-16 17:17:49 +0200 |
commit | 41fbcee1f557c3ddbfefc79b2b1b4719c6442265 (patch) | |
tree | 6c15b7631ad817a68207d2d04e4969ec0e128a8a /command.c | |
parent | aebfbbf2bdda8e18beef90c16da97bd335f7d3b0 (diff) | |
download | mpv-41fbcee1f557c3ddbfefc79b2b1b4719c6442265.tar.bz2 mpv-41fbcee1f557c3ddbfefc79b2b1b4719c6442265.tar.xz |
Remove dvdnav support (DVD menus)
When the internal mplayer MPEG demuxer was removed (commit 1fde09db),
the default demuxer when using dvdnav was set to libavformat. Now it
turns out that this doesn't work with libavformat. It will terminate
playback right after the audio runs out (instead of looping it like the
video, or whatever it's supposed to do). I'm not sure what exactly the
problem is, but since 1. even mplayer-svn can't handle DVD menus
directly (missing highlights), 2. DVD menus are essentially worthless,
and 3. I don't directly watch DVDs, don't bother with it and remove it.
For basic playback, there's still libdvdread support.
Also, use pkg-config for libdvdread, and drop support for in-tree
libdvdread. Remove support for in-tree libdvdcss as well.
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 79 |
1 files changed, 3 insertions, 76 deletions
@@ -65,7 +65,6 @@ #ifdef CONFIG_DVDREAD #include "stream/stream_dvd.h" #endif -#include "stream/stream_dvdnav.h" #include "m_struct.h" #include "screenshot.h" @@ -1690,10 +1689,9 @@ static int mp_property_sub(m_option_t *prop, int action, void *arg, } } #ifdef CONFIG_DVDREAD - if (vo_spudec - && (mpctx->stream->type == STREAMTYPE_DVD - || mpctx->stream->type == STREAMTYPE_DVDNAV) - && opts->sub_id < 0 && reset_spu) { + if (vo_spudec && (mpctx->stream->type == STREAMTYPE_DVD) + && opts->sub_id < 0 && reset_spu) + { d_sub->id = -2; d_sub->sh = NULL; } @@ -2513,36 +2511,6 @@ static bool set_property_command(MPContext *mpctx, mp_cmd_t *cmd) return 1; } -#ifdef CONFIG_DVDNAV -static const struct { - const char *name; - const enum mp_command_type cmd; -} mp_dvdnav_bindings[] = { - { "up", MP_CMD_DVDNAV_UP }, - { "down", MP_CMD_DVDNAV_DOWN }, - { "left", MP_CMD_DVDNAV_LEFT }, - { "right", MP_CMD_DVDNAV_RIGHT }, - { "menu", MP_CMD_DVDNAV_MENU }, - { "select", MP_CMD_DVDNAV_SELECT }, - { "prev", MP_CMD_DVDNAV_PREVMENU }, - { "mouse", MP_CMD_DVDNAV_MOUSECLICK }, - - /* - * keep old dvdnav sub-command options for a while in order not to - * break slave-mode API too suddenly. - */ - { "1", MP_CMD_DVDNAV_UP }, - { "2", MP_CMD_DVDNAV_DOWN }, - { "3", MP_CMD_DVDNAV_LEFT }, - { "4", MP_CMD_DVDNAV_RIGHT }, - { "5", MP_CMD_DVDNAV_MENU }, - { "6", MP_CMD_DVDNAV_SELECT }, - { "7", MP_CMD_DVDNAV_PREVMENU }, - { "8", MP_CMD_DVDNAV_MOUSECLICK }, - { NULL, 0 } -}; -#endif - static const char *property_error_string(int error_value) { switch (error_value) { @@ -3392,50 +3360,9 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) pointer_x = cmd->args[0].v.i; pointer_y = cmd->args[1].v.i; rescale_input_coordinates(mpctx, pointer_x, pointer_y, &dx, &dy); -#ifdef CONFIG_DVDNAV - if (mpctx->stream->type == STREAMTYPE_DVDNAV - && dx > 0.0 && dy > 0.0) { - int button = -1; - pointer_x = (int) (dx * (double) sh_video->disp_w); - pointer_y = (int) (dy * (double) sh_video->disp_h); - mp_dvdnav_update_mouse_pos(mpctx->stream, - pointer_x, pointer_y, &button); - if (opts->osd_level > 1 && button > 0) - set_osd_msg(mpctx, OSD_MSG_TEXT, 1, osd_duration, - "Selected button number %d", button); - } -#endif break; } -#ifdef CONFIG_DVDNAV - case MP_CMD_DVDNAV: { - int button = -1; - int i; - enum mp_command_type command = 0; - if (mpctx->stream->type != STREAMTYPE_DVDNAV) - break; - - for (i = 0; mp_dvdnav_bindings[i].name; i++) - if (cmd->args[0].v.s && - !strcasecmp(cmd->args[0].v.s, - mp_dvdnav_bindings[i].name)) - command = mp_dvdnav_bindings[i].cmd; - - mp_dvdnav_handle_input(mpctx->stream, command, &button); - if (opts->osd_level > 1 && button > 0) - set_osd_msg(mpctx, OSD_MSG_TEXT, 1, osd_duration, - "Selected button number %d", button); - break; - } - - case MP_CMD_SWITCH_TITLE: - if (mpctx->stream->type == STREAMTYPE_DVDNAV) - mp_dvdnav_switch_title(mpctx->stream, cmd->args[0].v.i); - break; - -#endif - case MP_CMD_VO_CMDLINE: if (mpctx->video_out) { char *s = cmd->args[0].v.s; |