head 1.4; access; symbols pkgsrc-2013Q2:1.4.0.28 pkgsrc-2013Q2-base:1.4 pkgsrc-2012Q4:1.4.0.26 pkgsrc-2012Q4-base:1.4 pkgsrc-2011Q4:1.4.0.24 pkgsrc-2011Q4-base:1.4 pkgsrc-2011Q2:1.4.0.22 pkgsrc-2011Q2-base:1.4 pkgsrc-2009Q4:1.4.0.20 pkgsrc-2009Q4-base:1.4 pkgsrc-2008Q4:1.4.0.18 pkgsrc-2008Q4-base:1.4 pkgsrc-2008Q3:1.4.0.16 pkgsrc-2008Q3-base:1.4 cube-native-xorg:1.4.0.14 cube-native-xorg-base:1.4 pkgsrc-2008Q2:1.4.0.12 pkgsrc-2008Q2-base:1.4 pkgsrc-2008Q1:1.4.0.10 pkgsrc-2008Q1-base:1.4 pkgsrc-2007Q4:1.4.0.8 pkgsrc-2007Q4-base:1.4 pkgsrc-2007Q3:1.4.0.6 pkgsrc-2007Q3-base:1.4 pkgsrc-2007Q2:1.4.0.4 pkgsrc-2007Q2-base:1.4 pkgsrc-2007Q1:1.4.0.2 pkgsrc-2007Q1-base:1.4 pkgsrc-2006Q4:1.3.0.2 pkgsrc-2006Q4-base:1.3 pkgsrc-2006Q3:1.2.0.2 pkgsrc-2006Q3-base:1.2 pkgsrc-2006Q2:1.1.0.2 pkgsrc-2006Q2-base:1.1; locks; strict; comment @# @; 1.4 date 2007.01.05.14.54.29; author drochner; state dead; branches; next 1.3; 1.3 date 2006.10.17.16.23.47; author drochner; state Exp; branches; next 1.2; 1.2 date 2006.08.01.14.56.06; author joerg; state Exp; branches; next 1.1; 1.1 date 2006.05.03.12.47.47; author drochner; state Exp; branches; next ; desc @@ 1.4 log @update to 0.5.9 New features: prevent screen blanking in windowed mode; show time remaining; include a JPEG version of the logo for when distributors are scared to include MPEG codecs in xine-lib. gxine also now knows about xscreensaver. And some minor fixes. @ text @$NetBSD: patch-al,v 1.3 2006/10/17 16:23:47 drochner Exp $ --- src/engine.c.orig 2006-08-11 15:45:07.000000000 +0200 +++ src/engine.c @@@@ -36,7 +36,7 @@@@ se_t *gse; /* global script engine */ xine_t *xine; /* global xine instance */ -pthread_mutex_t engine_lock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; +pthread_mutex_t engine_lock; gboolean initialised = FALSE; @@@@ -300,9 +300,18 @@@@ static gboolean js_queue_cb (GtkWidget * /* js_lock must be recursive since, if the engine is busy, this function * WILL be re-entered from the same thread with the lock already held. */ - static pthread_mutex_t js_lock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; + static pthread_mutex_t js_lock; + static int jslock_inited = 0; + pthread_mutexattr_t ma; exec_t *js; + if (!jslock_inited) { + pthread_mutexattr_init(&ma); + pthread_mutexattr_settype(&ma, PTHREAD_MUTEX_RECURSIVE); + pthread_mutex_init(&js_lock, &ma); + jslock_inited++; + } + pthread_mutex_lock (&js_lock); while ((js = g_async_queue_try_pop (js_queue))) { @@@@ -428,6 +437,11 @@@@ void engine_init (void) { char *cfgfilename; GtkWidget *w; + pthread_mutexattr_t ma; + + pthread_mutexattr_init(&ma); + pthread_mutexattr_settype(&ma, PTHREAD_MUTEX_RECURSIVE); + pthread_mutex_init(&engine_lock, &ma); /* * init the global xine engine @ 1.3 log @update to 0.5.8 changes: -UI improvements (editable menu shortcuts, eject) -bugfixes and cleanup @ text @d1 1 a1 1 $NetBSD$ @ 1.2 log @Replace while (pthread_mutex_trylock) sched_yield() with a simple pthread_mutex_lock. This avoids xine taking 100% CPU load on DragonFly. Issue reported on DragoFly mailing list and pointed out by YONETANI Tomokazu. Bump revision. @ text @d3 1 a3 1 --- src/engine.c.orig 2006-06-30 14:56:00.000000000 +0000 d14 18 a31 1 @@@@ -299,8 +299,7 @@@@ static gboolean js_queue_cb (GtkWidget * d34 1 a34 8 /* spin; play_exec gets this & the GDK lock in reverse order */ - while (pthread_mutex_trylock (&widgets_update_lock)) - sched_yield (); + pthread_mutex_lock (&widgets_update_lock); pthread_mutex_unlock (&widgets_update_lock); /* JS 'play()' needs it */ engine_exec_obj (js->cmd, js->obj, js->cb, js->cb_data, js->ecb, js->src); free (js->cmd); @@@@ -412,7 +411,12 @@@@ void engine_init (void) d39 1 a39 1 d43 1 a43 1 + a45 1 */ @ 1.1 log @update to 0.5.6 New features include automatic handling of separate subtitles files, DVD title/chapter display, and improved playlist item management and creation. There are some small but potentially useful Javascript additions too, and quite a few small tweaks and fixes @ text @d3 1 a3 1 --- src/engine.c.orig 2006-03-16 18:16:18.000000000 +0100 d14 11 a24 1 @@@@ -277,7 +277,12 @@@@ void engine_init (void) @