[MPlayer-dev-eng] [PATCH] '-priority' option support on OS/2
KO Myung-Hun
komh at chollian.net
Tue Aug 12 16:36:42 CEST 2008
Diego Biurrun wrote:
> On Sat, Aug 09, 2008 at 04:30:20AM +0900, KO Myung-Hun wrote:
>
>> This patch enable a '-priority' option support on OS/2.
>>
>> --- mplayer.c (revision 27376)
>> +++ mplayer.c (working copy)
>> @@ -6,6 +6,11 @@
>>
>> +#ifdef __OS2__
>> +#define INCL_DOS
>> +#include <os2.h>
>> +#endif
>> +
>> @@ -2642,7 +2653,14 @@
>> }
>> mp_msg(MSGT_CPLAYER,MSGL_STATUS,"Setting process priority: %s\n",
>> priority_presets_defs[i].name);
>> + #ifdef __OS2__
>> + DosSetPriority(PRTYS_PROCESS,
>> + HIBYTE(priority_presets_defs[i].prio),
>> + LOBYTE(priority_presets_defs[i].prio),
>> + 0 );
>> + #else
>> SetPriorityClass(GetCurrentProcess(), priority_presets_defs[i].prio);
>> + #endif
>>
>
> Maybe you can move the #include below this #ifdef.
>
>
cfg-common.h need it, too.
>> --- mencoder.c (revision 27376)
>> +++ mencoder.c (working copy)
>> @@ -525,7 +534,14 @@
>> }
>> mp_msg(MSGT_CPLAYER,MSGL_STATUS,MSGTR_SettingProcessPriority,
>> priority_presets_defs[i].name);
>> +#ifdef __OS2__
>> + DosSetPriority(PRTYS_PROCESS,
>> + HIBYTE(priority_presets_defs[i].prio),
>> + LOBYTE(priority_presets_defs[i].prio),
>> + 0 );
>> +#else
>> SetPriorityClass(GetCurrentProcess(), priority_presets_defs[i].prio);
>>
>
> All of this is duplicated in mplayer.c and mencoder.c. Refactoring it is
> not necessarily your job, but I'm nonetheless unhappy about this.
>
>
Me, too. It bothers me that I should write the same codes at two place.
I'm looking forward to your good refactoring. ^^
--
KO Myung-Hun
Using Mozilla SeaMonkey 1.1.11
Under OS/2 Warp 4 for Korean with FixPak #15
On AMD ThunderBird 1 GHz with 512 MB RAM
Korean OS/2 User Community : http://www.ecomstation.co.kr
More information about the MPlayer-dev-eng
mailing list