Skip to content

Commit 8b5efd6

Browse files
author
Uoti Urpala
committed
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.
1 parent b200583 commit 8b5efd6

27 files changed

+8
-4483
lines changed

DOCS/tech/slave.txt

+3-28
Original file line numberDiff line numberDiff line change
@@ -199,17 +199,6 @@ loop <value> [abs]
199199
Adjust/set how many times the movie should be looped. -1 means no loop,
200200
and 0 forever.
201201

202-
menu <command>
203-
Execute an OSD menu command.
204-
up Move cursor up.
205-
down Move cursor down.
206-
ok Accept selection.
207-
cancel Cancel selection.
208-
hide Hide the OSD menu.
209-
210-
set_menu <menu_name>
211-
Display the menu named <menu_name>.
212-
213202
mute [value]
214203
Toggle sound output muting or set it to [value] when [value] >= 0
215204
(1 == on, 0 == off).
@@ -269,6 +258,9 @@ radio_step_channel <-1|1>
269258
radio_step_freq <value>
270259
Tune frequency by the <value> (positive - up, negative - down).
271260

261+
run <value>
262+
Run <value> as shell command.
263+
272264
seek <value> [type] [hr-seek]
273265
Seek to some place in the movie.
274266
type = 0 is a relative seek of +/- <value> seconds (default).
@@ -495,23 +487,6 @@ volume <value> [abs]
495487
Increase/decrease volume or set it to <value> if [abs] is nonzero.
496488

497489

498-
The following commands are really only useful for OSD menu console mode:
499-
500-
help
501-
Displays help text, currently empty.
502-
503-
exit
504-
Exits from OSD menu console. Unlike 'quit', does not quit MPlayer.
505-
506-
hide
507-
Hides the OSD menu console. Clicking a menu command unhides it. Other
508-
keybindings act as usual.
509-
510-
run <value>
511-
Run <value> as shell command. In OSD menu console mode stdout and stdin
512-
are through the video output driver.
513-
514-
515490
Available properties:
516491

517492
name type min max get set step comment

Makefile

-13
Original file line numberDiff line numberDiff line change
@@ -466,18 +466,6 @@ SRCS_MPLAYER-$(JOYSTICK) += input/joystick.c
466466
SRCS_MPLAYER-$(JPEG) += libvo/vo_jpeg.c
467467
SRCS_MPLAYER-$(KAI) += libao2/ao_kai.c
468468
SRCS_MPLAYER-$(KVA) += libvo/vo_kva.c
469-
SRCS_MPLAYER-$(LIBMENU) += libmenu/menu.c \
470-
libmenu/menu_chapsel.c \
471-
libmenu/menu_cmdlist.c \
472-
libmenu/menu_console.c \
473-
libmenu/menu_filesel.c \
474-
libmenu/menu_list.c \
475-
libmenu/menu_param.c \
476-
libmenu/menu_pt.c \
477-
libmenu/menu_txt.c \
478-
libmenu/vf_menu.c \
479-
480-
SRCS_MPLAYER-$(LIBMENU_DVBIN) += libmenu/menu_dvbin.c
481469
SRCS_MPLAYER-$(LIRC) += input/lirc.c
482470
SRCS_MPLAYER-$(MD5SUM) += libvo/vo_md5sum.c
483471
SRCS_MPLAYER-$(MGA) += libvo/vo_mga.c
@@ -555,7 +543,6 @@ DIRS = . \
555543
libdvdnav \
556544
libdvdnav/vm \
557545
libdvdread4 \
558-
libmenu \
559546
libmpcodecs \
560547
libmpcodecs/native \
561548
libmpdemux \

cfg-mplayer.h

-27
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,6 @@ extern char *lirc_configfile;
4444
extern char *vo_geometry;
4545
extern int stop_xscreensaver;
4646

47-
extern int menu_startup;
48-
extern int menu_keepdir;
49-
extern char *menu_chroot;
50-
extern char *menu_fribidi_charset;
51-
extern int menu_flip_hebrew;
52-
extern int menu_fribidi_flip_commas;
53-
5447
extern char *unrar_executable;
5548

5649
extern char *mp_msg_charset;
@@ -321,7 +314,6 @@ const m_option_t msgl_config[]={
321314
{ "afilter", &mp_msg_levels[MSGT_AFILTER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
322315
{ "netst", &mp_msg_levels[MSGT_NETST], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
323316
{ "muxer", &mp_msg_levels[MSGT_MUXER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
324-
{ "osd-menu", &mp_msg_levels[MSGT_OSD_MENU], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
325317
{ "identify", &mp_msg_levels[MSGT_IDENTIFY], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
326318
{ "ass", &mp_msg_levels[MSGT_ASS], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
327319
{ "statusline", &mp_msg_levels[MSGT_STATUSLINE], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
@@ -362,7 +354,6 @@ const m_option_t msgl_config[]={
362354
" sws\n"
363355
" vobsub\n"
364356
" subreader\n"
365-
" osd-menu - OSD menu messages\n"
366357
" afilter - Audio filter messages\n"
367358
" netst - Netstream\n"
368359
" muxer - muxer layer\n"
@@ -854,24 +845,6 @@ const m_option_t mplayer_opts[]={
854845
OPT_INTRANGE("osdlevel", osd_level, 0, 0, 3),
855846
OPT_INTRANGE("osd-duration", osd_duration, 0, 0, 3600000),
856847
OPT_INTRANGE("osd-fractions", osd_fractions, 0, 0, 2),
857-
#ifdef CONFIG_MENU
858-
{"menu", &use_menu, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
859-
{"nomenu", &use_menu, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
860-
{"menu-root", &menu_root, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
861-
{"menu-cfg", &menu_cfg, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
862-
{"menu-startup", &menu_startup, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
863-
{"menu-keepdir", &menu_keepdir, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
864-
{"menu-chroot", &menu_chroot, CONF_TYPE_STRING, 0, 0, 0, NULL},
865-
#ifdef CONFIG_FRIBIDI
866-
{"menu-fribidi-charset", &menu_fribidi_charset, CONF_TYPE_STRING, 0, 0, 0, NULL},
867-
{"menu-flip-hebrew", &menu_flip_hebrew, CONF_TYPE_FLAG, 0, 0, 1, NULL},
868-
{"menu-noflip-hebrew", &menu_flip_hebrew, CONF_TYPE_FLAG, 0, 1, 0, NULL},
869-
{"menu-flip-hebrew-commas", &menu_fribidi_flip_commas, CONF_TYPE_FLAG, 0, 1, 0, NULL},
870-
{"menu-noflip-hebrew-commas", &menu_fribidi_flip_commas, CONF_TYPE_FLAG, 0, 0, 1, NULL},
871-
#endif /* CONFIG_FRIBIDI */
872-
#else
873-
{"menu", "OSD menu support was not compiled in.\n", CONF_TYPE_PRINT,0, 0, 0, NULL},
874-
#endif /* CONFIG_MENU */
875848

876849
OPT_STRING("vobsub", vobsub_name, 0),
877850
{"vobsubid", &vobsub_id, CONF_TYPE_INT, CONF_RANGE, 0, 31, NULL},

command.c

-11
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,11 @@
6666
#endif
6767
#include "stream/stream_dvdnav.h"
6868
#include "m_struct.h"
69-
#include "libmenu/menu.h"
7069

7170
#include "mp_core.h"
7271
#include "mp_fifo.h"
7372
#include "libavutil/avstring.h"
7473

75-
extern int use_menu;
76-
7774
static void rescale_input_coordinates(struct MPContext *mpctx, int ix, int iy,
7875
double *dx, double *dy)
7976
{
@@ -2979,10 +2976,6 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
29792976
add_step_frame(mpctx);
29802977
break;
29812978

2982-
case MP_CMD_FILE_FILTER:
2983-
file_filter = cmd->args[0].v.i;
2984-
break;
2985-
29862979
case MP_CMD_QUIT:
29872980
exit_player_with_rc(mpctx, EXIT_QUIT,
29882981
(cmd->nargs > 0) ? cmd->args[0].v.i : 0);
@@ -3556,10 +3549,6 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
35563549
set_osd_msg(OSD_MSG_TEXT, 1, osd_duration,
35573550
"Selected button number %d", button);
35583551
}
3559-
#endif
3560-
#ifdef CONFIG_MENU
3561-
if (use_menu && dx >= 0.0 && dy >= 0.0)
3562-
menu_update_mouse_pos(dx, dy);
35633552
#endif
35643553
break;
35653554
}

configure

+4-22
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,6 @@ Optional features:
334334
--disable-freetype disable FreeType 2 font rendering [autodetect]
335335
--disable-fontconfig disable fontconfig font lookup [autodetect]
336336
--disable-unrarexec disable using of UnRAR executable [enabled]
337-
--enable-menu enable OSD menu (not DVD menu) [disabled]
338337
--disable-sortsub disable subtitle sorting [enabled]
339338
--enable-fribidi enable the FriBiDi libs [autodetect]
340339
--disable-enca disable ENCA charset oracle library [autodetect]
@@ -678,7 +677,6 @@ _big_endian=auto
678677
_bitmap_font=yes
679678
_freetype=auto
680679
_fontconfig=auto
681-
_menu=no
682680
_qtx=auto
683681
_coreaudio=auto
684682
_corevideo=auto
@@ -1110,9 +1108,6 @@ for ac_option do
11101108
--enable-dga2) _dga2=yes ;;
11111109
--disable-dga2) _dga2=no ;;
11121110

1113-
--enable-menu) _menu=yes ;;
1114-
--disable-menu) _menu=no ;;
1115-
11161111
--enable-qtx) _qtx=yes ;;
11171112
--disable-qtx) _qtx=no ;;
11181113

@@ -6388,17 +6383,6 @@ fi
63886383
echores "$_vstream"
63896384

63906385

6391-
echocheck "OSD menu"
6392-
if test "$_menu" = yes ; then
6393-
def_menu='#define CONFIG_MENU 1'
6394-
test $_dvbin = "yes" && _menu_dvbin=yes
6395-
else
6396-
def_menu='#undef CONFIG_MENU'
6397-
_menu_dvbin=no
6398-
fi
6399-
echores "$_menu"
6400-
6401-
64026386
echocheck "Subtitles sorting"
64036387
if test "$_sortsub" = yes ; then
64046388
def_sortsub='#define CONFIG_SORTSUB 1'
@@ -6716,8 +6700,6 @@ LIBDCA = $_libdca
67166700
LIBDV = $_libdv
67176701
LIBDVDCSS_INTERNAL = $_libdvdcss_internal
67186702
LIBMAD = $_mad
6719-
LIBMENU = $_menu
6720-
LIBMENU_DVBIN = $_menu_dvbin
67216703
LIBNEMESI = $_nemesi
67226704
LIBNUT = $_libnut
67236705
LIBSMBCLIENT = $_smb
@@ -6938,7 +6920,6 @@ $def_charset
69386920
$def_crash_debug
69396921
$def_debug
69406922
$def_fastmemcpy
6941-
$def_menu
69426923
$def_runtime_cpudetection
69436924
$def_sighandler
69446925
$def_sortsub
@@ -7245,9 +7226,10 @@ skipping autodetection. This behavior is unlike what you may be used to from
72457226
autoconf-based configure scripts that can decide to override you. This greater
72467227
level of control comes at a price. You may have to provide the correct compiler
72477228
and linker flags yourself.
7248-
If you used one of these options (except --enable-menu and similar ones that
7249-
turn on internal features) and experience a compilation or linking failure,
7250-
make sure you have passed the necessary compiler/linker flags to configure.
7229+
If you used one of these options (except --enable-runtime-cpudetection and
7230+
similar ones that turn on internal features) and experience a compilation or
7231+
linking failure, make sure you have passed the necessary compiler/linker flags
7232+
to configure.
72517233
72527234
If you suspect a bug, please read DOCS/HTML/$language_doc/bugreports.html.
72537235

etc/dvb-menu.conf

-106
This file was deleted.

0 commit comments

Comments
 (0)