From 1cea503e08bd8103a59c64024a32523ef4dd5076 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Wed, 9 May 2007 04:56:07 +0000 Subject: #ifdef'ed out sched_setscheduler on Mac OS X since its not supported there svn path=/trunk/externals/pidip/; revision=7636 --- modules/pdp_icedthe~.c | 2 ++ modules/pdp_live~.c | 3 ++- modules/pdp_mp4player~.cpp | 2 ++ modules/pdp_theorin~.c | 3 ++- 4 files changed, 8 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/pdp_icedthe~.c b/modules/pdp_icedthe~.c index bd4970d..34a4351 100644 --- a/modules/pdp_icedthe~.c +++ b/modules/pdp_icedthe~.c @@ -488,10 +488,12 @@ static void *pdp_icedthe_decode(void *tdata) twait.tv_nsec = 25000000; // 25 ms schedprio.sched_priority = sched_get_priority_min(SCHED_FIFO) + x->x_priority; +#ifdef __gnu_linux__ if ( sched_setscheduler(0, SCHED_FIFO, &schedprio) == -1) { post("pdp_icedthe~ : couldn't set priority for decoding thread."); } +#endif while ( x->x_decodechild ) { diff --git a/modules/pdp_live~.c b/modules/pdp_live~.c index 1d4327d..1e8ca8f 100644 --- a/modules/pdp_live~.c +++ b/modules/pdp_live~.c @@ -535,11 +535,12 @@ static void *pdp_decode_stream_from_url(void *tdata) twait.tv_nsec = 10000000; // 10 ms schedprio.sched_priority = sched_get_priority_min(SCHED_FIFO) + x->x_priority; +#ifdef __gnu_linux__ if ( sched_setscheduler(0,SCHED_FIFO,&schedprio) == -1) { post("pdp_live~ : couldn't set priority for decoding thread."); } - +#endif if ( ! (x->x_avcontext->iformat->flags & AVFMT_NOHEADER ) ) { if (x->x_avcontext->iformat->read_header(x->x_avcontext, &x->x_avparameters) < 0) diff --git a/modules/pdp_mp4player~.cpp b/modules/pdp_mp4player~.cpp index de47614..afb7634 100644 --- a/modules/pdp_mp4player~.cpp +++ b/modules/pdp_mp4player~.cpp @@ -127,10 +127,12 @@ static void *pdp_mp4player_decode(void *tdata) twait.tv_nsec = 10000000; // 10 ms schedprio.sched_priority = 0; +#ifdef __gnu_linux__ if ( sched_setscheduler(0, SCHED_OTHER, &schedprio) == -1) { post("pdp_mp4player~ : couldn't set scheduler for decoding thread.\n"); } +#endif if ( setpriority( PRIO_PROCESS, 0, x->x_priority ) < 0 ) { post("pdp_mp4player~ : couldn't set priority to %d for decoding thread.\n", x->x_priority ); diff --git a/modules/pdp_theorin~.c b/modules/pdp_theorin~.c index 4ebd4d3..b2a0c5a 100644 --- a/modules/pdp_theorin~.c +++ b/modules/pdp_theorin~.c @@ -404,11 +404,12 @@ static void *pdp_decode_file(void *tdata) twait.tv_nsec = 10000000; // 10 ms schedprio.sched_priority = sched_get_priority_min(SCHED_FIFO) + x->x_priority; +#ifdef __gnu_linux__ if ( sched_setscheduler(0, SCHED_FIFO, &schedprio) == -1) { post("pdp_theorin~ : couldn't set priority for decoding thread."); } - +#endif while ( x->x_decodechild ) { if ( ( x->x_reading ) && ( ( x->x_autoplay ) || ( x->x_nextimage == 1 ) ) ) -- cgit v1.2.1