2007-05-01 16:05:10 -04:00
|
|
|
$OpenBSD: patch-src_xine-engine_video_decoder_c,v 1.3 2007/05/01 20:05:10 naddy Exp $
|
|
|
|
--- src/xine-engine/video_decoder.c.orig Sun Jul 9 16:40:08 2006
|
|
|
|
+++ src/xine-engine/video_decoder.c Tue May 1 22:03:06 2007
|
2006-10-12 00:48:14 -04:00
|
|
|
@@ -43,6 +43,9 @@
|
2006-03-24 17:43:41 -05:00
|
|
|
|
|
|
|
#define SPU_SLEEP_INTERVAL (90000/2)
|
|
|
|
|
|
|
|
+#ifndef SCHED_OTHER
|
|
|
|
+#define SCHED_OTHER 0
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
static void update_spu_decoder (xine_stream_t *stream, int type) {
|
|
|
|
|
2007-05-01 16:05:10 -04:00
|
|
|
@@ -473,7 +476,9 @@ void _x_video_decoder_init (xine_stream_t *stream) {
|
2006-03-24 17:43:41 -05:00
|
|
|
} else {
|
|
|
|
|
|
|
|
pthread_attr_t pth_attrs;
|
|
|
|
+#if !defined(__OpenBSD__)
|
|
|
|
struct sched_param pth_params;
|
|
|
|
+#endif
|
|
|
|
int err, num_buffers;
|
|
|
|
/* The fifo size is based on dvd playback where buffers are filled
|
|
|
|
* with 2k of data. With 500 buffers and a typical video data rate
|
2007-05-01 16:05:10 -04:00
|
|
|
@@ -497,10 +502,12 @@ void _x_video_decoder_init (xine_stream_t *stream) {
|
2006-03-24 17:43:41 -05:00
|
|
|
stream->spu_track_map_entries = 0;
|
|
|
|
|
|
|
|
pthread_attr_init(&pth_attrs);
|
|
|
|
+#if !defined(__OpenBSD__)
|
|
|
|
pthread_attr_getschedparam(&pth_attrs, &pth_params);
|
|
|
|
pth_params.sched_priority = sched_get_priority_min(SCHED_OTHER);
|
|
|
|
pthread_attr_setschedparam(&pth_attrs, &pth_params);
|
|
|
|
pthread_attr_setscope(&pth_attrs, PTHREAD_SCOPE_SYSTEM);
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
stream->video_thread_created = 1;
|
|
|
|
if ((err = pthread_create (&stream->video_thread,
|