[MPlayer-dev-eng] [PATCH] OS/2 Patches

KO Myung-Hun komh at chollian.net
Thu Jul 12 16:39:31 CEST 2007


Hi/2.

Diego Biurrun wrote:
> On Tue, Jul 10, 2007 at 11:13:26PM +0900, KO Myung-Hun wrote:
>  
>> Hi/2, all.
>>
>> I attach OS/2 patches using InnoTek GCC v3.3.5.
>>     
>
> You may wish to join the discussion there, OS/2 support has just been
> removed from FFmpeg due to lack of maintenance and parts of your patch
> touch FFmpeg.
>
>   

Ok, I'll join to FFmpeg.

>> --- libao2/ao_dart.c    (revision 0)
>> +++ libao2/ao_dart.c    (revision 0)
>> @@ -0,0 +1,253 @@
>> +/*
>> + * ao_dart.c - libao2 DART Audio Output Driver for MPlayer
>> + *
>> + * Copyleft 2007 by KO Myung-Hun (komh at chollian.net)
>> + *
>> + * Changes :
>> + *     KO Myung-Hun <komh at chollian.net> 2007/07/08
>> + *         - Call fast_memcpy instead of memcpy()
>> + */
>>     
>
> If you add a new file please put in a proper license header like
> vidix/vidixlib.c for example.
>
>   

Ok.

>> --- dvdread/dvd_reader.c    (revision 23757)
>> +++ dvdread/dvd_reader.c    (working copy)
>> @@ -460,7 +460,7 @@
>>              }
>>              fclose( mntfile );
>>      }
>> -#elif defined(__MINGW32__)   
>> +#elif defined(__MINGW32__) || defined( __OS2__ )
>>      dev_name = strdup(path);
>>      auth_drive = DVDOpenImageFile( path, have_css );
>>  #endif
>>     
>
> This patch should be sent upstream to libdvdread (as well).
>
>   

How to ?

>> --- libdvdcss/device.c    (revision 23757)
>> +++ libdvdcss/device.c    (working copy)
>>     
>
> This patch should be sent upstream to libdvdcss (as well).
>
>   

How to ?

>> @@ -110,6 +123,10 @@
>>      {
>>          return 1;
>>      }
>> +#elif defined( __OS2__ )
>> +    /* We should consider a case of file ? */
>> +
>> +    return 1;
>>  #else
>>      struct stat fileinfo;
>>      int ret;
>>     
>
> I don't understand the comment.
>
>   

It means whether or not we should process a normal file and a block 
device such as drive access, separately as Win32 does. But currently 
assume a block device mode.

>> Index: configure
>> ===================================================================
>> --- configure    (revision 23757)
>> +++ configure    (working copy)
>> @@ -1175,6 +1185,9 @@
>>    MINGW32*)
>>      system_name=MINGW32
>>      ;;
>> +  OS/2)
>> +    system_name=OS/2
>> +    ;;
>>     
>
> This is wrong, no system_name mangling is necessary.
>   

Why ? Without this, the operating system is detected as OS/2-Unknown. 
Why should 'Unknown' be followed by 'OS/2' ?


>  
>> @@ -7402,7 +7479,7 @@
>>  LIBDIR = \$(DESTDIR)$_libdir
>>  # FFmpeg uses libdir instead of LIBDIR
>>  libdir = \$(LIBDIR)
>> -#AR = ar
>> +AR = $_ar
>>  CC = $_cc
>>  CXX = $_cc
>>  HOST_CC = $_host_cc
>>     
>
> This is unused.
>   

In OS/2, emxomfar can be used instead of ar. Of course, my patches use 
emxomfar. So this should be used for compatibility with other OSes.

>> --- libavformat/os_support.c    (revision 9571)
>> +++ libavformat/os_support.c    (working copy)
>> @@ -24,7 +24,7 @@
>>  #if defined(__MINGW32__)
>>  #include <sys/types.h>
>>  #include <sys/timeb.h>
>> -#elif defined(CONFIG_OS2)
>> +#elif defined(__OS2__)
>>  #include <string.h>
>>  #include <sys/time.h>
>>  #else
>> --- libavformat/os_support.h    (revision 9571)
>> +++ libavformat/os_support.h    (working copy)
>> @@ -26,7 +26,7 @@
>>   * @file os_support.h
>>   * miscellaneous OS support macros and functions.
>>   *
>> - * - socklen_t typedef (BeOS, Innotek libc)
>> + * - socklen_t typedef (BeOS, OS/2)
>>   * - usleep() (Win32, BeOS, OS/2)
>>   * - lseek() (Win32)
>>   * - floatf() (OS/2)
>> @@ -35,7 +35,7 @@
>>   * - poll() (BeOS, MinGW)
>>   */
>>  
>> -#if defined(__BEOS__) || defined(__INNOTEK_LIBC__)
>> +#if defined(__BEOS__) || defined(__OS2__)
>>  typedef int socklen_t;
>>  #endif
>>  
>> @@ -68,7 +68,7 @@
>>  #  endif
>>  #endif
>>  
>> -#if defined(CONFIG_OS2)
>> +#if defined(__OS2__) && !defined(__INNOTEK_LIBC__)
>>  #include <stdlib.h>
>>  static inline int usleep(unsigned int t) { return _sleep2(t / 1000); }
>>  static inline int strcasecmp(const char* s1, const char* s2) { 
>> return stricmp(s1,s2); }
>> --- libavutil/internal.h    (revision 9571)
>> +++ libavutil/internal.h    (working copy)
>> @@ -102,12 +102,12 @@
>>  #    define vsnprintf _vsnprintf
>>  
>>  /* __MINGW32__ end */
>> -#elif defined (CONFIG_OS2)
>> +#elif defined (__OS2__)
>>  /* OS/2 EMX */
>>  
>>  #    include <float.h>
>>  
>> -#endif /* !__MINGW32__ && CONFIG_OS2 */
>> +#endif /* !__MINGW32__ && __OS2__ */
>>  
>>  #ifdef USE_FASTMEMCPY
>>  #    include "libvo/fastmemcpy.h"
>>     
>
> FFmpeg patches should be sent to ffmpeg-devel.
>
>   
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