[MPlayer-dev-eng] [PATCH] Refreshed OS/2 Patches 1/3
Attila Kinali
attila at kinali.ch
Wed Jul 25 13:33:47 CEST 2007
On Thu, 19 Jul 2007 20:43:18 +0900
KO Myung-Hun <komh at chollian.net> wrote:
> I've modified those patches in order to check feature-specific condition
> instead of OS one. And removed cosmetics. ^^
> [os2_patch.diff text/plain (15.8KB)]
> Index: stream/stream_livedotcom.c
> ===================================================================
> --- stream/stream_livedotcom.c (revision 23825)
> +++ stream/stream_livedotcom.c (working copy)
> @@ -61,7 +61,7 @@
>
> if(strncmp("sdp://",filename,6) == 0) {
> filename += 6;
> -#if defined(__CYGWIN__) || defined(__MINGW32__)
> +#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__OS2__)
> f = open(filename,O_RDONLY|O_BINARY);
> #else
> f = open(filename,O_RDONLY);
> Index: stream/cache2.c
> ===================================================================
> --- stream/cache2.c (revision 23825)
> +++ stream/cache2.c (working copy)
> @@ -16,12 +16,16 @@
> #include <unistd.h>
>
> #include "osdep/timer.h"
> -#ifndef WIN32
> +#if !defined(WIN32) && !defined(__OS2__)
[...]
> +#elif defined(WIN32)
[...]
> +#else // OS2
[...]
> #endif
Could you reorder the #ifdef... clauses to
#ifdef WIN32
...
#elif defined(__OS2__)
...
#else
...
#endif
or something similar. The #if !defined(A) && !defined(B) && !defined(C)...
is a bit confusing.
> Index: libao2/audio_out.c
> ===================================================================
> --- libao2/audio_out.c (revision 23825)
> +++ libao2/audio_out.c (working copy)
> @@ -62,6 +62,9 @@
> #ifdef HAVE_DIRECTX
> extern ao_functions_t audio_out_dsound;
> #endif
> +#ifdef HAVE_DART
> +extern ao_functions_t audio_out_dart;
> +#endif
This belongs into the dart patch.
> +#ifdef HAVE_KVA
> +extern vo_functions_t video_out_kva;
> +#endif
This belongs into the kva patch
> Index: configure
> ===================================================================
> --- configure (revision 23825)
> +++ configure (working copy)
> + --enable-kva enable KVA (DIVE/WarpOverlay!) video output [autodetect]
> + --disable-dart disable DART audio output [autodetect]
kva & dart patch
The rest of the configure patch needs Diego's Ok.
> Index: mplayer.c
> ===================================================================
> --- mplayer.c (revision 23825)
> +++ mplayer.c (working copy)
> +#ifdef __OS2__
> +extern int _fmode_bin;
> +
> + void MorphToPM()
> + {
> + PPIB pib;
> + PTIB tib;
> +
> + DosGetInfoBlocks(&tib, &pib);
> +
> + // Change flag from VIO to PM:
> + if (pib->pib_ultype==2) pib->pib_ultype = 3;
> + }
> +#endif
What is this function good for? What does it do?
Where is the doxygen comment?
> +#ifdef __OS2__
> + _fmode_bin = 1; // to make binary mode default
> +
> + _envargs( &argc, &argv, "MPLAYER_OPTIONS" );
What does _envargs do?
> ===================================================================
> --- osdep/Makefile (revision 23825)
> +++ osdep/Makefile (working copy)
> @@ -24,6 +24,9 @@
> ifeq ($(TARGET_OS),MINGW32)
> getch = getch2-win.c
> endif
> +ifeq ($(TARGET_OS),OS/2)
> +getch = getch2-os2.c
> +endif
getch2-os2.c is missing from the patch
Attila Kinali
--
Praised are the Fountains of Shelieth, the silver harp of the waters,
But blest in my name forever this stream that stanched my thirst!
-- Deed of Morred
More information about the MPlayer-dev-eng
mailing list