diff options
Diffstat (limited to 'apps/plugins')
| -rw-r--r-- | apps/plugins/mpegplayer/audio_thread.c | 6 | ||||
| -rw-r--r-- | apps/plugins/mpegplayer/disk_buf.c | 4 | ||||
| -rw-r--r-- | apps/plugins/mpegplayer/stream_mgr.c | 4 | ||||
| -rw-r--r-- | apps/plugins/mpegplayer/video_thread.c | 6 |
4 files changed, 14 insertions, 6 deletions
diff --git a/apps/plugins/mpegplayer/audio_thread.c b/apps/plugins/mpegplayer/audio_thread.c index 2bb766a..7d2f849 100644 --- a/apps/plugins/mpegplayer/audio_thread.c +++ b/apps/plugins/mpegplayer/audio_thread.c @@ -714,12 +714,14 @@ bool audio_thread_init(void) /* Start the audio thread */ audio_str.hdr.q = &audio_str_queue; rb->queue_init(audio_str.hdr.q, false); - rb->queue_enable_queue_send(audio_str.hdr.q, &audio_str_queue_send); /* One-up on the priority since the core DSP over-yields internally */ audio_str.thread = rb->create_thread( audio_thread, audio_stack, audio_stack_size, 0, - "mpgaudio" IF_PRIO(,PRIORITY_PLAYBACK-1) IF_COP(, CPU)); + "mpgaudio" IF_PRIO(,PRIORITY_PLAYBACK-4) IF_COP(, CPU)); + + rb->queue_enable_queue_send(audio_str.hdr.q, &audio_str_queue_send, + audio_str.thread); if (audio_str.thread == NULL) return false; diff --git a/apps/plugins/mpegplayer/disk_buf.c b/apps/plugins/mpegplayer/disk_buf.c index a408b90..289918f 100644 --- a/apps/plugins/mpegplayer/disk_buf.c +++ b/apps/plugins/mpegplayer/disk_buf.c @@ -837,7 +837,6 @@ bool disk_buf_init(void) disk_buf.q = &disk_buf_queue; rb->queue_init(disk_buf.q, false); - rb->queue_enable_queue_send(disk_buf.q, &disk_buf_queue_send); disk_buf.state = TSTATE_EOS; disk_buf.status = STREAM_STOPPED; @@ -886,6 +885,9 @@ bool disk_buf_init(void) disk_buf_thread, disk_buf_stack, sizeof(disk_buf_stack), 0, "mpgbuffer" IF_PRIO(, PRIORITY_BUFFERING) IF_COP(, CPU)); + rb->queue_enable_queue_send(disk_buf.q, &disk_buf_queue_send, + disk_buf.thread); + if (disk_buf.thread == NULL) return false; diff --git a/apps/plugins/mpegplayer/stream_mgr.c b/apps/plugins/mpegplayer/stream_mgr.c index 9da664e..b962c5b 100644 --- a/apps/plugins/mpegplayer/stream_mgr.c +++ b/apps/plugins/mpegplayer/stream_mgr.c @@ -987,7 +987,6 @@ int stream_init(void) stream_mgr.q = &stream_mgr_queue; rb->queue_init(stream_mgr.q, false); - rb->queue_enable_queue_send(stream_mgr.q, &stream_mgr_queue_send); /* sets audiosize and returns buffer pointer */ mem = rb->plugin_get_audio_buffer(&memsize); @@ -1028,6 +1027,9 @@ int stream_init(void) stream_mgr_thread_stack, sizeof(stream_mgr_thread_stack), 0, "mpgstream_mgr" IF_PRIO(, PRIORITY_SYSTEM) IF_COP(, CPU)); + rb->queue_enable_queue_send(stream_mgr.q, &stream_mgr_queue_send, + stream_mgr.thread); + if (stream_mgr.thread == NULL) { rb->splash(HZ, "Could not create stream manager thread!"); diff --git a/apps/plugins/mpegplayer/video_thread.c b/apps/plugins/mpegplayer/video_thread.c index 6508d28..d16eb77 100644 --- a/apps/plugins/mpegplayer/video_thread.c +++ b/apps/plugins/mpegplayer/video_thread.c @@ -955,7 +955,7 @@ static void video_thread(void) else { /* Just a little left - spin and be accurate */ - rb->priority_yield(); + rb->yield(); if (str_have_msg(&video_str)) goto message_wait; } @@ -998,13 +998,15 @@ bool video_thread_init(void) video_str.hdr.q = &video_str_queue; rb->queue_init(video_str.hdr.q, false); - rb->queue_enable_queue_send(video_str.hdr.q, &video_str_queue_send); /* We put the video thread on another processor for multi-core targets. */ video_str.thread = rb->create_thread( video_thread, video_stack, VIDEO_STACKSIZE, 0, "mpgvideo" IF_PRIO(,PRIORITY_PLAYBACK) IF_COP(, COP)); + rb->queue_enable_queue_send(video_str.hdr.q, &video_str_queue_send, + video_str.thread); + if (video_str.thread == NULL) return false; |