[MPlayer-cygwin] [PATCH] Activating OSD Menu for MinGW
Diego Biurrun
diego at biurrun.de
Thu Aug 28 18:30:03 CEST 2003
christophe.perinaud at free.fr wrote:
> First i hope to do all good. This is my first patch so ...
> The attached file will modify 3 files :
> . input/input.c : this is to disable the "run" command in the console
> . libmenu/menu_param.c : to change names of open and close methods. Else you will get conflicts with some headers.
> . libmenu/menu_console.c : idem as menu_param.c for the open method. And to disable some methods that are used for the "run" command in the console.
The last part of your patch is bogus, it creates a file named
OSD-Menu.patch.
> With that patch, the compilation (with --enable-menu) is running fine. And you will be able to get the menu and navigate.
> Don't forget to copy etc/menu.conf in the data dir of mplayer.
> I added a line in input.conf to activate the menu with the 'm' key :
> m menu down
Yes, compilation works fine now. The menu does not work, however:
$ ./mplayer.exe -v -menu ../../samples/Mastercard.asf
[...]
Reading config file
/c/programme/cygwin/home/Administrator/.mplayer/mplayer.conf: No such
file or directory
Reading config file C:/Programme/msys/1.0/home/Administrator/mplayer/config
Reading C:/Programme/msys/1.0/home/Administrator/mplayer/codecs.conf:
Can't open
'C:/Programme/msys/1.0/home/Administrator/mplayer/codecs.conf': No such
file or directory
Reading /c/programme/cygwin/home/Administrator/.mplayer/codecs.conf:
Can't open
'/c/programme/cygwin/home/Administrator/.mplayer/codecs.conf': No such
file or directory
Using built-in default codecs.conf
CommandLine: '-v' '-menu' '../../samples/Mastercard.asf'
get_path('font/font.desc') ->
'C:/Programme/msys/1.0/home/Administrator/mplayer/font/font.desc'
font: can't open file:
C:/Programme/msys/1.0/home/Administrator/mplayer/font/font.desc
font: can't open file:
/c/programme/cygwin/home/Administrator/.mplayer/font/font.desc
Using MMX (with tiny bit 3DNow) Optimized OnScreenDisplay
Using usleep() timing
get_path('input.conf') ->
'C:/Programme/msys/1.0/home/Administrator/mplayer/input.conf'
Parsing input config file
C:/Programme/msys/1.0/home/Administrator/mplayer/input.conf
Input config file
C:/Programme/msys/1.0/home/Administrator/mplayer/input.conf parsed: 53 binds
get_path('menu.conf') ->
'C:/Programme/msys/1.0/home/Administrator/mplayer/menu.conf'
Menu init failed
> I first post the patch here, to have your opinion.
> --- ../Original/libmenu/menu_console.c Tue Jun 24 21:59:14 2003
> +++ ./libmenu/menu_console.c Mon Aug 25 15:13:04 2003
> @@ -7,7 +7,13 @@
> #include <ctype.h>
> #include <sys/time.h>
> #include <sys/types.h>
> +
> +#ifndef __MINGW32__
> #include <sys/wait.h>
> +#else
> +#define WNOHANG 1
> +#endif
> +
> #include <unistd.h>
> #include <errno.h>
Hmm, if we only need that single define, I think we don't need to
include all of wait.h if it causes portability problems, so I suggest
-#include <sys/wait.h>
+#define WNOHANG 1
Diego
More information about the MPlayer-cygwin
mailing list