summaryrefslogtreecommitdiff
path: root/src/xine-engine/video_decoder.c
diff options
context:
space:
mode:
authorGuenter Bartsch <guenter@users.sourceforge.net>2001-08-11 18:27:10 +0000
committerGuenter Bartsch <guenter@users.sourceforge.net>2001-08-11 18:27:10 +0000
commitc38630b9c3347823727a0e5b7fdb9da8029eae4c (patch)
treee162169a74982fba1fc14d1360b0aed0d96d700d /src/xine-engine/video_decoder.c
parent6112a1d56d5c5c25d8e42b8e96c90e4bc0a2f76a (diff)
downloadxine-lib-c38630b9c3347823727a0e5b7fdb9da8029eae4c.tar.gz
xine-lib-c38630b9c3347823727a0e5b7fdb9da8029eae4c.tar.bz2
thread priorities to improve performance on freebsd (and possibly others)
CVS patchset: 411 CVS date: 2001/08/11 18:27:10
Diffstat (limited to 'src/xine-engine/video_decoder.c')
-rw-r--r--src/xine-engine/video_decoder.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c
index 5b44e2758..bb777ac63 100644
--- a/src/xine-engine/video_decoder.c
+++ b/src/xine-engine/video_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_decoder.c,v 1.34 2001/08/05 00:59:51 ehasenle Exp $
+ * $Id: video_decoder.c,v 1.35 2001/08/11 18:27:10 guenter Exp $
*
*/
@@ -189,9 +189,17 @@ void *video_decoder_loop (void *this_gen) {
void video_decoder_init (xine_t *this) {
+ pthread_attr_t pth_attrs;
+ struct sched_param pth_params;
+
this->video_fifo = fifo_buffer_new (500, 65536);
- pthread_create (&this->video_thread, NULL, video_decoder_loop, this) ;
+ pthread_attr_init(&pth_attrs);
+ 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_create (&this->video_thread, &pth_attrs, video_decoder_loop, this) ;
}
void video_decoder_shutdown (xine_t *this) {