[MPlayer-dev-eng] [PATCH] Refreshed OS/2 Patches 1/3

KO Myung-Hun komh at chollian.net
Sun Jul 29 15:40:10 CEST 2007


Hi/2.

Attila Kinali wrote:
> 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.
>
>   

Some parts need it, but other parts can become more confuse because 
there are the common codes  both WIN32 and OS/2 share. So I'll change 
them partially.

>> 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.
>   

Ok.

>   
>> +#ifdef HAVE_KVA
>> +extern vo_functions_t video_out_kva;
>> +#endif
>>     
>
> This belongs into the kva patch
>
>   

Ok.

>> 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.
>
>   

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?
>   

This function enable VIO(text mode) program to be run as PM(GUI) mode. 
I'll add simple comments for this.

>   
>> +#ifdef __OS2__
>> +  _fmode_bin = 1; // to make binary mode default
>> +
>> +  _envargs( &argc, &argv, "MPLAYER_OPTIONS" );
>>     
>
> What does _envargs do?
>   

_envargs() pass env vars to arguments. So it is similar to config file 
but it is env var not file.

>
>   
>> ===================================================================
>> --- 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
>
>
>   

Ok.

-- 
KO Myung-Hun

Using Mozilla SeaMonkey 1.1.2
Under OS/2 Warp 4 for Korean with FixPak #15
On AMD ThunderBird 750 MHz with 512 MB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr





More information about the MPlayer-dev-eng mailing list