summaryrefslogtreecommitdiff
path: root/apps/plugins/mpegplayer/stream_mgr.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2008-03-25 02:34:12 +0000
committerMichael Sevakis <jethead71@rockbox.org>2008-03-25 02:34:12 +0000
commit27cf67733936abd75fcb1f8da765977cd75906ee (patch)
treef894211a8a0c77b402dd3250b2bee2d17dcfe13f /apps/plugins/mpegplayer/stream_mgr.c
parentbc2f8fd8f38a3e010cd67bbac358f6e9991153c6 (diff)
downloadrockbox-27cf67733936abd75fcb1f8da765977cd75906ee.tar.gz
rockbox-27cf67733936abd75fcb1f8da765977cd75906ee.zip
Add a complete priority inheritance implementation to the scheduler (all mutex ownership and queue_send calls are inheritable). Priorities are differential so that dispatch depends on the runnable range of priorities. Codec priority can therefore be raised in small steps (pcmbuf updated to enable). Simplify the kernel functions to ease implementation and use the same kernel.c for both sim and target (I'm tired of maintaining two ;_). 1) Not sure if a minor audio break at first buffering issue will exist on large-sector disks (the main mutex speed issue was genuinely resolved earlier). At this point it's best dealt with at the buffering level. It seems a larger filechunk could be used again. 2) Perhaps 64-bit sims will have some minor issues (finicky) but a backroll of the code of concern there is a 5-minute job. All kernel objects become incompatible so a full rebuild and update is needed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16791 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/mpegplayer/stream_mgr.c')
-rw-r--r--apps/plugins/mpegplayer/stream_mgr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/plugins/mpegplayer/stream_mgr.c b/apps/plugins/mpegplayer/stream_mgr.c
index 9da664effe..b962c5b993 100644
--- a/apps/plugins/mpegplayer/stream_mgr.c
+++ b/apps/plugins/mpegplayer/stream_mgr.c
@@ -987,7 +987,6 @@ int stream_init(void)
987 987
988 stream_mgr.q = &stream_mgr_queue; 988 stream_mgr.q = &stream_mgr_queue;
989 rb->queue_init(stream_mgr.q, false); 989 rb->queue_init(stream_mgr.q, false);
990 rb->queue_enable_queue_send(stream_mgr.q, &stream_mgr_queue_send);
991 990
992 /* sets audiosize and returns buffer pointer */ 991 /* sets audiosize and returns buffer pointer */
993 mem = rb->plugin_get_audio_buffer(&memsize); 992 mem = rb->plugin_get_audio_buffer(&memsize);
@@ -1028,6 +1027,9 @@ int stream_init(void)
1028 stream_mgr_thread_stack, sizeof(stream_mgr_thread_stack), 1027 stream_mgr_thread_stack, sizeof(stream_mgr_thread_stack),
1029 0, "mpgstream_mgr" IF_PRIO(, PRIORITY_SYSTEM) IF_COP(, CPU)); 1028 0, "mpgstream_mgr" IF_PRIO(, PRIORITY_SYSTEM) IF_COP(, CPU));
1030 1029
1030 rb->queue_enable_queue_send(stream_mgr.q, &stream_mgr_queue_send,
1031 stream_mgr.thread);
1032
1031 if (stream_mgr.thread == NULL) 1033 if (stream_mgr.thread == NULL)
1032 { 1034 {
1033 rb->splash(HZ, "Could not create stream manager thread!"); 1035 rb->splash(HZ, "Could not create stream manager thread!");