summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUoti Urpala <uau@mplayer2.org>2011-10-25 07:05:47 +0300
committerUoti Urpala <uau@mplayer2.org>2011-10-25 07:05:47 +0300
commit8b5efd6455370c02211f9fec2a3dbb74f5d0fcbc (patch)
tree4a8222fbf5ed2c8e7b7766435820183ff641c97d
parentb200583403219136363b755afab2b05c0937a928 (diff)
downloadmpv-8b5efd6455370c02211f9fec2a3dbb74f5d0fcbc.tar.bz2
mpv-8b5efd6455370c02211f9fec2a3dbb74f5d0fcbc.tar.xz
libmenu: remove OSD menu functionality (--menu)
Something like the OSD menu functionality could be useful. However the current implementation has several problems and would require a relatively large amount of work to get into good shape. As far as I know there are few users of the existing functionality. Nobody is working on the existing code and keeping it compiling at all while changing other code would require extra work. So delete the menu code and some related code elsewhere that's used by nothing else.
-rw-r--r--DOCS/tech/slave.txt31
-rw-r--r--Makefile13
-rw-r--r--cfg-mplayer.h27
-rw-r--r--command.c11
-rwxr-xr-xconfigure26
-rw-r--r--etc/dvb-menu.conf106
-rw-r--r--etc/input.conf27
-rw-r--r--etc/menu.conf151
-rw-r--r--input/input.c49
-rw-r--r--input/input.h17
-rw-r--r--libmenu/menu.c776
-rw-r--r--libmenu/menu.h127
-rw-r--r--libmenu/menu_chapsel.c186
-rw-r--r--libmenu/menu_cmdlist.c177
-rw-r--r--libmenu/menu_console.c498
-rw-r--r--libmenu/menu_dvbin.c301
-rw-r--r--libmenu/menu_filesel.c506
-rw-r--r--libmenu/menu_list.c331
-rw-r--r--libmenu/menu_list.h106
-rw-r--r--libmenu/menu_param.c301
-rw-r--r--libmenu/menu_pt.c179
-rw-r--r--libmenu/menu_txt.c205
-rw-r--r--libmenu/vf_menu.c267
-rw-r--r--mp_core.h3
-rw-r--r--mp_msg.h2
-rw-r--r--mplayer.c63
-rw-r--r--rpm/mplayer.spec5
27 files changed, 8 insertions, 4483 deletions
diff --git a/DOCS/tech/slave.txt b/DOCS/tech/slave.txt
index f68d5e9c1b..3b249f75d1 100644
--- a/DOCS/tech/slave.txt
+++ b/DOCS/tech/slave.txt
@@ -199,17 +199,6 @@ loop <value> [abs]
Adjust/set how many times the movie should be looped. -1 means no loop,
and 0 forever.
-menu <command>
- Execute an OSD menu command.
- up Move cursor up.
- down Move cursor down.
- ok Accept selection.
- cancel Cancel selection.
- hide Hide the OSD menu.
-
-set_menu <menu_name>
- Display the menu named <menu_name>.
-
mute [value]
Toggle sound output muting or set it to [value] when [value] >= 0
(1 == on, 0 == off).
@@ -269,6 +258,9 @@ radio_step_channel <-1|1>
radio_step_freq <value>
Tune frequency by the <value> (positive - up, negative - down).
+run <value>
+ Run <value> as shell command.
+
seek <value> [type] [hr-seek]
Seek to some place in the movie.
type = 0 is a relative seek of +/- <value> seconds (default).
@@ -495,23 +487,6 @@ volume <value> [abs]
Increase/decrease volume or set it to <value> if [abs] is nonzero.
-The following commands are really only useful for OSD menu console mode:
-
-help
- Displays help text, currently empty.
-
-exit
- Exits from OSD menu console. Unlike 'quit', does not quit MPlayer.
-
-hide
- Hides the OSD menu console. Clicking a menu command unhides it. Other
- keybindings act as usual.
-
-run <value>
- Run <value> as shell command. In OSD menu console mode stdout and stdin
- are through the video output driver.
-
-
Available properties:
name type min max get set step comment
diff --git a/Makefile b/Makefile
index a0a6edb51f..6013ca3c88 100644
--- a/Makefile
+++ b/Makefile
@@ -466,18 +466,6 @@ SRCS_MPLAYER-$(JOYSTICK) += input/joystick.c
SRCS_MPLAYER-$(JPEG) += libvo/vo_jpeg.c
SRCS_MPLAYER-$(KAI) += libao2/ao_kai.c
SRCS_MPLAYER-$(KVA) += libvo/vo_kva.c
-SRCS_MPLAYER-$(LIBMENU) += libmenu/menu.c \
- libmenu/menu_chapsel.c \
- libmenu/menu_cmdlist.c \
- libmenu/menu_console.c \
- libmenu/menu_filesel.c \
- libmenu/menu_list.c \
- libmenu/menu_param.c \
- libmenu/menu_pt.c \
- libmenu/menu_txt.c \
- libmenu/vf_menu.c \
-
-SRCS_MPLAYER-$(LIBMENU_DVBIN) += libmenu/menu_dvbin.c
SRCS_MPLAYER-$(LIRC) += input/lirc.c
SRCS_MPLAYER-$(MD5SUM) += libvo/vo_md5sum.c
SRCS_MPLAYER-$(MGA) += libvo/vo_mga.c
@@ -555,7 +543,6 @@ DIRS = . \
libdvdnav \
libdvdnav/vm \
libdvdread4 \
- libmenu \
libmpcodecs \
libmpcodecs/native \
libmpdemux \
diff --git a/cfg-mplayer.h b/cfg-mplayer.h
index 12d4b582c4..9c97caa93a 100644
--- a/cfg-mplayer.h
+++ b/cfg-mplayer.h
@@ -44,13 +44,6 @@ extern char *lirc_configfile;
extern char *vo_geometry;
extern int stop_xscreensaver;
-extern int menu_startup;
-extern int menu_keepdir;
-extern char *menu_chroot;
-extern char *menu_fribidi_charset;
-extern int menu_flip_hebrew;
-extern int menu_fribidi_flip_commas;
-
extern char *unrar_executable;
extern char *mp_msg_charset;
@@ -321,7 +314,6 @@ const m_option_t msgl_config[]={
{ "afilter", &mp_msg_levels[MSGT_AFILTER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
{ "netst", &mp_msg_levels[MSGT_NETST], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
{ "muxer", &mp_msg_levels[MSGT_MUXER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
- { "osd-menu", &mp_msg_levels[MSGT_OSD_MENU], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
{ "identify", &mp_msg_levels[MSGT_IDENTIFY], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
{ "ass", &mp_msg_levels[MSGT_ASS], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
{ "statusline", &mp_msg_levels[MSGT_STATUSLINE], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
@@ -362,7 +354,6 @@ const m_option_t msgl_config[]={
" sws\n"
" vobsub\n"
" subreader\n"
- " osd-menu - OSD menu messages\n"
" afilter - Audio filter messages\n"
" netst - Netstream\n"
" muxer - muxer layer\n"
@@ -854,24 +845,6 @@ const m_option_t mplayer_opts[]={
OPT_INTRANGE("osdlevel", osd_level, 0, 0, 3),
OPT_INTRANGE("osd-duration", osd_duration, 0, 0, 3600000),
OPT_INTRANGE("osd-fractions", osd_fractions, 0, 0, 2),
-#ifdef CONFIG_MENU
- {"menu", &use_menu, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
- {"nomenu", &use_menu, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
- {"menu-root", &menu_root, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
- {"menu-cfg", &menu_cfg, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
- {"menu-startup", &menu_startup, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
- {"menu-keepdir", &menu_keepdir, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
- {"menu-chroot", &menu_chroot, CONF_TYPE_STRING, 0, 0, 0, NULL},
-#ifdef CONFIG_FRIBIDI
- {"menu-fribidi-charset", &menu_fribidi_charset, CONF_TYPE_STRING, 0, 0, 0, NULL},
- {"menu-flip-hebrew", &menu_flip_hebrew, CONF_TYPE_FLAG, 0, 0, 1, NULL},
- {"menu-noflip-hebrew", &menu_flip_hebrew, CONF_TYPE_FLAG, 0, 1, 0, NULL},
- {"menu-flip-hebrew-commas", &menu_fribidi_flip_commas, CONF_TYPE_FLAG, 0, 1, 0, NULL},
- {"menu-noflip-hebrew-commas", &menu_fribidi_flip_commas, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-#endif /* CONFIG_FRIBIDI */
-#else
- {"menu", "OSD menu support was not compiled in.\n", CONF_TYPE_PRINT,0, 0, 0, NULL},
-#endif /* CONFIG_MENU */
OPT_STRING("vobsub", vobsub_name, 0),
{"vobsubid", &vobsub_id, CONF_TYPE_INT, CONF_RANGE, 0, 31, NULL},
diff --git a/command.c b/command.c
index 789b60186c..4b1dc9c8e2 100644
--- a/command.c
+++ b/command.c
@@ -66,14 +66,11 @@
#endif
#include "stream/stream_dvdnav.h"
#include "m_struct.h"
-#include "libmenu/menu.h"
#include "mp_core.h"
#include "mp_fifo.h"
#include "libavutil/avstring.h"
-extern int use_menu;
-
static void rescale_input_coordinates(struct MPContext *mpctx, int ix, int iy,
double *dx, double *dy)
{
@@ -2979,10 +2976,6 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
add_step_frame(mpctx);
break;
- case MP_CMD_FILE_FILTER:
- file_filter = cmd->args[0].v.i;
- break;
-
case MP_CMD_QUIT:
exit_player_with_rc(mpctx, EXIT_QUIT,
(cmd->nargs > 0) ? cmd->args[0].v.i : 0);
@@ -3557,10 +3550,6 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
"Selected button number %d", button);
}
#endif
-#ifdef CONFIG_MENU
- if (use_menu && dx >= 0.0 && dy >= 0.0)
- menu_update_mouse_pos(dx, dy);
-#endif
break;
}
diff --git a/configure b/configure
index f79b8cec08..9221501729 100755
--- a/configure
+++ b/configure
@@ -334,7 +334,6 @@ Optional features:
--disable-freetype disable FreeType 2 font rendering [autodetect]
--disable-fontconfig disable fontconfig font lookup [autodetect]
--disable-unrarexec disable using of UnRAR executable [enabled]
- --enable-menu enable OSD menu (not DVD menu) [disabled]
--disable-sortsub disable subtitle sorting [enabled]
--enable-fribidi enable the FriBiDi libs [autodetect]
--disable-enca disable ENCA charset oracle library [autodetect]
@@ -678,7 +677,6 @@ _big_endian=auto
_bitmap_font=yes
_freetype=auto
_fontconfig=auto
-_menu=no
_qtx=auto
_coreaudio=auto
_corevideo=auto
@@ -1110,9 +1108,6 @@ for ac_option do
--enable-dga2) _dga2=yes ;;
--disable-dga2) _dga2=no ;;
- --enable-menu) _menu=yes ;;
- --disable-menu) _menu=no ;;
-
--enable-qtx) _qtx=yes ;;
--disable-qtx) _qtx=no ;;
@@ -6388,17 +6383,6 @@ fi
echores "$_vstream"
-echocheck "OSD menu"
-if test "$_menu" = yes ; then
- def_menu='#define CONFIG_MENU 1'
- test $_dvbin = "yes" && _menu_dvbin=yes
-else
-def_menu='#undef CONFIG_MENU'
- _menu_dvbin=no
-fi
-echores "$_menu"
-
-
echocheck "Subtitles sorting"
if test "$_sortsub" = yes ; then
def_sortsub='#define CONFIG_SORTSUB 1'
@@ -6716,8 +6700,6 @@ LIBDCA = $_libdca
LIBDV = $_libdv
LIBDVDCSS_INTERNAL = $_libdvdcss_internal
LIBMAD = $_mad
-LIBMENU = $_menu
-LIBMENU_DVBIN = $_menu_dvbin
LIBNEMESI = $_nemesi
LIBNUT = $_libnut
LIBSMBCLIENT = $_smb
@@ -6938,7 +6920,6 @@ $def_charset
$def_crash_debug
$def_debug
$def_fastmemcpy
-$def_menu
$def_runtime_cpudetection
$def_sighandler
$def_sortsub
@@ -7245,9 +7226,10 @@ skipping autodetection. This behavior is unlike what you may be used to from
autoconf-based configure scripts that can decide to override you. This greater
level of control comes at a price. You may have to provide the correct compiler
and linker flags yourself.
-If you used one of these options (except --enable-menu and similar ones that
-turn on internal features) and experience a compilation or linking failure,
-make sure you have passed the necessary compiler/linker flags to configure.
+If you used one of these options (except --enable-runtime-cpudetection and
+similar ones that turn on internal features) and experience a compilation or
+linking failure, make sure you have passed the necessary compiler/linker flags
+to configure.
If you suspect a bug, please read DOCS/HTML/$language_doc/bugreports.html.
diff --git a/etc/dvb-menu.conf b/etc/dvb-menu.conf
deleted file mode 100644
index 7da289048e..0000000000
--- a/etc/dvb-menu.conf
+++ /dev/null
@@ -1,106 +0,0 @@
-
-<txt name="man" file="manpage.txt"/>
-
-<filesel name="open_file"/>
-<filesel name="open_list" file-action="loadlist '%p'" auto-close="yes"
- title="Open a playlist: %p" />
-
-<dvbsel title="Channel List" name="dvbsel" />
-
-
-<pt name="jump_to"/>
-
-<console name="console0" height="80" vspace="0">Welcome to MPlayer</console>
-
-<txt name="man" file="manpage.txt"/>
-
-<pref name="general_pref" title="General">
- <e name="autoq"/>
- <e name="autosync" />
- <e name="framedrop"/>
- <e name="quiet"/>
- <e name="softsleep" />
-</pref>
-
-<pref name="demuxer_pref" title="Demuxer">
- <e name="aid"/>
- <e name="alang" />
- <e name="cache"/>
- <e name="channels"/>
- <e name="dvdangle" />
- <e name="forceidx"/>
- <e name="fps"/>
- <e name="hr-mp3-seek"/>
- <e name="idx"/>
- <e name="mc"/>
- <e name="ni"/>
- <e name="nobps"/>
- <e name="srate"/>
- <e name="vid"/>
-</pref>
-
-
-<pref name="osd_sub_pref" title="OSD & Subs">
- <e name="ffactor"/>
- <e name="noautosub"/>
- <e name="osdlevel"/>
- <e name="sid"/>
- <e name="slang"/>
- <e name="subdelay"/>
- <e name="subfps"/>
- <e name="subpos"/>
- <e name="unicode"/>
- <e name="utf8"/>
- <e name="vobsubid"/>
-</pref>
-
-<pref name="audio_pref" title="Audio">
- <e name="abs"/>
- <e name="af"/>
- <e name="ao"/>
- <e name="delay"/>
- <e name="mixer"/>
-</pref>
-
-<pref name="video_pref" title="Video">
- <e name="bpp"/>
- <e name="brightness"/>
- <e name="contrast"/>
- <e name="display"/>
- <e name="double"/>
- <e name="dr"/>
- <e name="fs"/>
- <e name="geometry"/>
- <e name="hue"/>
- <e name="icelayer"/>
- <e name="noslices"/>
- <e name="panscan"/>
- <e name="rootwin"/>
- <e name="saturation"/>
- <e name="vm"/>
- <e name="vo"/>
- <e name="vf"/>
- <e name="xineramascreen"/>
- </pref>
-
-
-<cmdlist name="pref_main" title="Preferences" ptr="<>" >
- <e name="General ..." ok="set_menu general_pref"/>
- <e name="Demuxer ..." ok="set_menu demuxer_pref"/>
- <e name="Osd/Subtitles ..." ok="set_menu osd_sub_pref"/>
- <e name="Audio ..." ok="set_menu audio_pref"/>
- <e name="Video ..." ok="set_menu video_pref"/>
-</cmdlist>
-
-<cmdlist name="main" title="MPlayer OSD menu" ptr="<>" >
- <e name="Pause" ok="pause"/>
- <e name="Prev/Next" ok="pt_step 1" cancel="pt_step -1"/>
- <e name="Jump to ..." ok="set_menu jump_to"/>
- <e name="Open ..." ok="set_menu open_file"/>
- <e name="Open playlist ..." ok="set_menu open_list"/>
- <e name="DVB" ok="set_menu dvbsel"/>
- <e name="Help" ok="set_menu man"/>
- <e name="Pref" ok="set_menu pref_main"/>
- <e name="Console" ok="set_menu console0"/>
- <e name="Quit" ok="quit"/>
-</cmdlist>
diff --git a/etc/input.conf b/etc/input.conf
index 45b20f9b23..509f1bf876 100644
--- a/etc/input.conf
+++ b/etc/input.conf
@@ -109,14 +109,10 @@ JOY_BTN0 pause
JOY_BTN1 osd
JOY_BTN2 volume 1
JOY_BTN3 volume -1
-JOY_BTN4 set_menu main
##
## Apple Remote section
##
-## To use OSD menu with Apple Remote, set key AR_MENU to any OSD menu command,
-## or just comment out the 'AR_MENU osd' line and uncomment the line after it.
-##
AR_PLAY pause
AR_PLAY_HOLD quit
@@ -124,34 +120,11 @@ AR_NEXT seek 30
AR_NEXT_HOLD seek 120
AR_PREV seek -10
AR_PREV_HOLD seek -120
-AR_MENU menu up
-#AR_MENU menu cancel
AR_MENU_HOLD mute
AR_VUP volume 1
AR_VDOWN volume -1
##
-## OSD Menu movement keys
-##
-## If you are using only the keyboard it is enough to define one command (like
-## "menu up"), because then that single key will display the menu, which can
-## then be navigated with the cursor keys and ENTER (defined in menu.conf).
-##
-## LIRC users should bind each "menu" command to a button on their remote.
-##
-## The set_menu command directly displays the (sub)menu specified as
-## its argument. Usage should be self-explanatory (although not likely
-## to be needed), after reading input.conf.
-##
-
-#MOUSE_BTN0 menu up
-#y menu down
-#y menu ok
-#y menu cancel
-#y menu hide
-#y set_menu general_pref
-
-##
## DVDNAV
## Requires dvdnav://
##
diff --git a/etc/menu.conf b/etc/menu.conf
deleted file mode 100644
index 635a2f2a1c..0000000000
--- a/etc/menu.conf
+++ /dev/null
@@ -1,151 +0,0 @@
-<keybindings name="default">
- <binding key="UP" cmd="menu up" />
- <binding key="DOWN" cmd="menu down" />
- <binding key="LEFT" cmd="menu left" />
- <binding key="RIGHT" cmd="menu right" />
- <binding key="ENTER" cmd="menu ok" />
- <binding key="ESC" cmd="menu cancel" />
- <binding key="HOME" cmd="menu home" />
- <binding key="END" cmd="menu end" />
- <binding key="PGUP" cmd="menu pageup" />
- <binding key="PGDWN" cmd="menu pagedown" />
- <binding key="JOY_UP" cmd="menu up" />
- <binding key="JOY_DOWN" cmd="menu down" />
- <binding key="JOY_LEFT" cmd="menu left" />
- <binding key="JOY_RIGHT" cmd="menu right" />
- <binding key="JOY_BTN0" cmd="menu ok" />
- <binding key="JOY_BTN1" cmd="menu cancel" />
- <binding key="AR_VUP" cmd="menu up" />
- <binding key="AR_VDOWN" cmd="menu down" />
- <binding key="AR_PREV" cmd="menu left" />
- <binding key="AR_NEXT" cmd="menu right" />
- <binding key="AR_PLAY" cmd="menu ok" />
- <binding key="AR_MENU" cmd="menu cancel" />
- <binding key="AR_PREV_HOLD" cmd="menu home" />
- <binding key="AR_NEXT_HOLD" cmd="menu end" />
- <binding key="MOUSE_BTN0" cmd="menu click" />
- <binding key="MOUSE_BTN2" cmd="menu cancel" />
-</keybindings>
-<keybindings name="list" parent="default">
- <binding key="AR_PREV" cmd="menu pageup" />
- <binding key="AR_NEXT" cmd="menu pagedown" />
-</keybindings>
-<keybindings name="filesel" parent="list">
- <binding key="BS" cmd="menu left" />
-</keybindings>
-<keybindings name="chapsel" parent="list" />
-<keybindings name="cmdlist" parent="list">
- <binding key="AR_PREV" cmd="menu left" />
- <binding key="AR_NEXT" cmd="menu right" />
-</keybindings>
-<keybindings name="txt" parent="list" />
-<keybindings name="pt" parent="list" />
-<keybindings name="pref" parent="list">
- <binding key="AR_PREV" cmd="menu left" />
- <binding key="AR_NEXT" cmd="menu right" />
- <binding key="AR_PREV_HOLD" cmd="menu left" />
- <binding key="AR_NEXT_HOLD" cmd="menu right" />
-</keybindings>
-
-<txt name="man" file="manpage.txt"/>
-
-<filesel name="open_file"/>
-<filesel name="open_list" file-action="loadlist '%p'"
- title="Open a playlist: %p"
- filter="/etc/mplayer/extensions_filter"
- actions="d:run 'mp_loader \'%p\' d',c:run 'mp_loader \'%p\' c'" />
-
-<chapsel name="select_chapter" />
-
-<pt name="jump_to"/>
-
-<console name="console0" height="80" vspace="0">Welcome to MPlayer</console>
-
-<txt name="man" file="manpage.txt"/>
-
-<pref name="general_pref" title="General">
- <e property="osdlevel" name="OSD level"/>
- <e property="speed" name="Speed"/>
- <e property="loop" name="Loop"/>
-</pref>
-
-<pref name="demuxer_pref" title="Demuxer">
-</pref>
-
-
-<pref name="osd_sub_pref" title="Subtitles">
- <e property="sub" name="Subtitles"/>
- <e property="sub_visibility" name="Visibility"/>
- <e property="sub_forced_only" name="Forced sub only"/>
- <e property="sub_alignment" name="Alignment"/>
- <e property="sub_pos" name="Position"/>
- <e property="sub_delay" name="Delay"/>
- <e property="sub_scale" name="Scale"/>
-</pref>
-
-<pref name="audio_pref" title="Audio">
- <e property="volume" name="Volume"/>
- <e property="balance" name="Balance"/>
- <e property="mute" name="Mute"/>
- <e property="audio_delay" name="Delay"/>
-</pref>
-
-<pref name="colors_pref" title="Colors">
- <e property="gamma" name="Gamma"/>
- <e property="brightness" name="Brightness"/>
- <e property="contrast" name="Contrast"/>
- <e property="saturation" name="Saturation"/>
- <e property="hue" name="Hue"/>
-</pref>
-
-<pref name="video_pref" title="Video">
- <e property="fullscreen" name="Fullscreen"/>
- <e property="panscan" name="Panscan"/>
- <menu menu="colors_pref" name="Colors ..."/>
- <e property="ontop" name="Always on top"/>
- <e property="rootwin" name="Root window"/>
- <e property="framedropping" name="Frame dropping"/>
- <e property="vsync" name="VSync"/>
- </pref>
-
-
-<cmdlist name="pref_main" title="Preferences" ptr="<>" >
- <e name="General ..." ok="set_menu general_pref"/>
- <e name="Audio ..." ok="set_menu audio_pref"/>
- <e name="Video ..." ok="set_menu video_pref"/>
- <e name="Subtitles ..." ok="set_menu osd_sub_pref"/>
- <e name="Back" ok="menu cancel"/>
-</cmdlist>
-
-<pref name="properties" title="Stream Properties">
- <e txt="${filename}" name="Name"/>
- <e txt="${video_format}" name="Video Codec"/>
- <e txt="${video_bitrate}" name="Video Bitrate"/>
- <e txt="${width} x ${height}" name="Resolution"/>
- <e txt="${audio_codec}" name="Audio Codec"/>
- <e txt="${audio_bitrate}" name="Audio Bitrate"/>
- <e txt="${samplerate}, ${channels}" name="Audio Samples"/>
- <e txt="${metadata/Title}" name="Title"/>
- <e txt="${metadata/Artist}" name="Artist"/>
- <e txt="${metadata/Album}" name="Album"/>
- <e txt="${metadata/Year}" name="Year"/>
- <e txt="${metadata/Comment}" name="Comment"/>
- <e txt="${metadata/Track}" name="Track"/>
- <e txt="${metadata/Genre}" name="Genre"/>
- <e txt="${metadata/Software}" name="Software"/>
-</pref>
-
-<cmdlist name="main" title="MPlayer OSD menu" ptr="<>" >
- <e name="Pause" ok="pause"/>
- <e name="Chapter ..." ok="set_menu select_chapter"
- left="seek_chapter -1" right="seek_chapter +1"/>
- <e name="Prev/Next ..." ok="set_menu jump_to"
- left="pt_step -1" right="pt_step 1"/>
- <e name="Open ..." ok="set_menu open_file"/>
- <e name="Open playlist ..." ok="set_menu open_list"/>
- <e name="Help" ok="set_menu man"/>
- <e name="Pref" ok="set_menu pref_main"/>
- <e name="Properties" ok="set_menu properties"/>
- <e name="Console" ok="set_menu console0"/>
- <e name="Quit" ok="quit"/>
-</cmdlist>
diff --git a/input/input.c b/input/input.c
index 29b462a49f..7c02be5fa9 100644
--- a/input/input.c
+++ b/input/input.c
@@ -174,7 +174,6 @@ static const mp_cmd_t mp_cmds[] = {
{ MP_CMD_SWITCH_RATIO, "switch_ratio", 0, { {MP_CMD_ARG_FLOAT,{0}}, {-1,{0}} } },
{ MP_CMD_VO_FULLSCREEN, "vo_fullscreen", 0, { {MP_CMD_ARG_INT,{-1}}, {-1,{0}} } },
{ MP_CMD_VO_ONTOP, "vo_ontop", 0, { {MP_CMD_ARG_INT,{-1}}, {-1,{0}} } },
- { MP_CMD_FILE_FILTER, "file_filter", 1, { { MP_CMD_ARG_INT, {0}}, {-1,{0}}}},
{ MP_CMD_VO_ROOTWIN, "vo_rootwin", 0, { {MP_CMD_ARG_INT,{-1}}, {-1,{0}} } },
{ MP_CMD_VO_BORDER, "vo_border", 0, { {MP_CMD_ARG_INT,{-1}}, {-1,{0}} } },
{ MP_CMD_SCREENSHOT, "screenshot", 0, { {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
@@ -192,14 +191,6 @@ static const mp_cmd_t mp_cmds[] = {
{ MP_CMD_DVDNAV, "dvdnav", 1, { {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } },
#endif
-#ifdef CONFIG_MENU
- { MP_CMD_MENU, "menu",1, { {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } },
- { MP_CMD_SET_MENU, "set_menu",1, { {MP_CMD_ARG_STRING, {0}}, {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } },
- { MP_CMD_CHELP, "help", 0, { {-1,{0}} } },
- { MP_CMD_CEXIT, "exit", 0, { {-1,{0}} } },
- { MP_CMD_CHIDE, "hide", 0, { {MP_CMD_ARG_INT,{3000}}, {-1,{0}} } },
-#endif
-
{ MP_CMD_GET_VO_FULLSCREEN, "get_vo_fullscreen", 0, { {-1,{0}} } },
{ MP_CMD_GET_SUB_VISIBILITY, "get_sub_visibility", 0, { {-1,{0}} } },
{ MP_CMD_KEYDOWN_EVENTS, "key_down_event", 1, { {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
@@ -570,12 +561,6 @@ struct input_fd {
int pos, size;
};
-struct cmd_filter {
- mp_input_cmd_filter filter;
- void *ctx;
- struct cmd_filter *next;
-};
-
struct cmd_bind_section {
struct cmd_bind *cmd_binds;
char *section;
@@ -630,11 +615,6 @@ struct input_ctx {
};
-static struct cmd_filter *cmd_filters = NULL;
-
-// Callback to allow the menu filter to grab the incoming keys
-int (*mp_input_key_cb)(int code) = NULL;
-
int async_quit_request;
static int print_key_list(m_option_t *cfg);
@@ -1099,17 +1079,6 @@ static int default_cmd_func(int fd, char *buf, int l)
}
-void mp_input_add_cmd_filter(mp_input_cmd_filter func, void *ctx)
-{
- struct cmd_filter *filter = talloc_ptrtype(NULL, filter);
-
- filter->filter = func;
- filter->ctx = ctx;
- filter->next = cmd_filters;
- cmd_filters = filter;
-}
-
-
static char *find_bind_for_key(const struct cmd_bind *binds, int n, int *keys)
{
int j;
@@ -1203,14 +1172,6 @@ static mp_cmd_t *interpret_key(struct input_ctx *ictx, int code)
if (unmod < 256 && unmod != KEY_ENTER && unmod != KEY_TAB)
code &= ~KEY_MODIFIER_SHIFT;
- if (mp_input_key_cb) {
- if (code & MP_KEY_DOWN)
- return NULL;
- code &= ~(MP_KEY_DOWN | MP_NO_REPEAT_KEY);
- if (mp_input_key_cb(code))
- return NULL;
- }
-
if (code & MP_KEY_DOWN) {
if (ictx->num_key_down > MP_MAX_KEY_DOWN) {
mp_tmsg(MSGT_INPUT, MSGL_ERR, "Too many key down events "
@@ -1483,16 +1444,6 @@ mp_cmd_t *mp_input_get_cmd(struct input_ctx *ictx, int time, int peek_only)
} else
ret = queue->first;
- for (struct cmd_filter *cf = cmd_filters; cf; cf = cf->next) {
- if (cf->filter(ret, cf->ctx)) {
- // The filter ate the cmd, so remove it from the queue
- queue_pop(queue);
- mp_cmd_free(ret);
- // Retry with next command
- return mp_input_get_cmd(ictx, 0, peek_only);
- }
- }
-
if (!peek_only)
queue_pop(queue);
diff --git a/input/input.h b/input/input.h
index aaacfbe164..4058ce3d99 100644
--- a/input/input.h
+++ b/input/input.h
@@ -54,8 +54,6 @@ enum mp_command_type {
MP_CMD_GAMMA,
MP_CMD_SUB_VISIBILITY,
MP_CMD_VOBSUB_LANG, // deprecated: combined with SUB_SELECT
- MP_CMD_MENU,
- MP_CMD_SET_MENU,
MP_CMD_GET_TIME_LENGTH,
MP_CMD_GET_PERCENT_POS,
MP_CMD_SUB_STEP,
@@ -96,7 +94,6 @@ enum mp_command_type {
MP_CMD_OSD_SHOW_PROPERTY_TEXT,
MP_CMD_OSD_SHOW_PROGRESSION,
MP_CMD_SEEK_CHAPTER,
- MP_CMD_FILE_FILTER,
MP_CMD_GET_FILENAME,
MP_CMD_GET_VIDEO_CODEC,
MP_CMD_GET_VIDEO_BITRATE,
@@ -147,11 +144,6 @@ enum mp_command_type {
/// DVB commands
MP_CMD_DVB_SET_CHANNEL = 5101,
- /// Console commands
- MP_CMD_CHELP = 7000,
- MP_CMD_CEXIT,
- MP_CMD_CHIDE,
-
/// Audio Filter commands
MP_CMD_AF_SWITCH,
MP_CMD_AF_ADD,
@@ -207,11 +199,6 @@ typedef struct mp_cmd {
} mp_cmd_t;
-// Set this to grab all incoming key codes
-extern int (*mp_input_key_cb)(int code);
-// Should return 1 if the command was processed
-typedef int (*mp_input_cmd_filter)(struct mp_cmd *cmd, void *ctx);
-
/* Add a new command input source.
* "fd" is a file descriptor (use a negative value if you don't use any fd)
* "select" tells whether to use select() on the fd to determine when to
@@ -264,10 +251,6 @@ struct mp_cmd *mp_input_parse_cmd(char *str);
*/
int mp_input_parse_and_queue_cmds(struct input_ctx *ictx, const char *str);
-// These filters allow you to process the command before MPlayer.
-// If a filter returns a true value mp_input_get_cmd will return NULL.
-void mp_input_add_cmd_filter(mp_input_cmd_filter, void *ctx);
-
// After getting a command from mp_input_get_cmd you need to free it using this
// function
void mp_cmd_free(struct mp_cmd *cmd);
diff --git a/libmenu/menu.c b/libmenu/menu.c
deleted file mode 100644
index 3e003900ce..0000000000
--- a/libmenu/menu.c
+++ /dev/null
@@ -1,776 +0,0 @@
-/*
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include "config.h"
-#include "mp_msg.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>