summaryrefslogtreecommitdiffstats
path: root/apps/buffering.c
diff options
context:
space:
mode:
authorNicolas Pennequin <nicolas.pennequin@free.fr>2008-07-18 23:42:47 +0000
committerNicolas Pennequin <nicolas.pennequin@free.fr>2008-07-18 23:42:47 +0000
commitcf369575bc4ec21d456b00ed15f474c8c9af3c75 (patch)
tree244024890116a0078bbf2b4fc88041d8f8c7ae2c /apps/buffering.c
parent8d0126f355f6b95683a0e314868b4f1331b4578b (diff)
downloadrockbox-cf369575bc4ec21d456b00ed15f474c8c9af3c75.tar.gz
rockbox-cf369575bc4ec21d456b00ed15f474c8c9af3c75.tar.bz2
rockbox-cf369575bc4ec21d456b00ed15f474c8c9af3c75.zip
Add handle values to the buffering LOGFQUEUE messages for easier debugging.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18092 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/buffering.c')
-rw-r--r--apps/buffering.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/buffering.c b/apps/buffering.c
index 30601481e4..e39a4b6eca 100644
--- a/apps/buffering.c
+++ b/apps/buffering.c
@@ -711,7 +711,7 @@ static void rebuffer_handle(int handle_id, size_t newpos)
rebuffer the whole track, just read enough to satisfy */
if (newpos > h->offset && newpos - h->offset < BUFFERING_DEFAULT_FILECHUNK)
{
- LOGFQUEUE("buffering >| Q_BUFFER_HANDLE");
+ LOGFQUEUE("buffering >| Q_BUFFER_HANDLE %d", handle_id);
queue_send(&buffering_queue, Q_BUFFER_HANDLE, handle_id);
h->ridx = h->data + newpos;
return;
@@ -720,7 +720,7 @@ static void rebuffer_handle(int handle_id, size_t newpos)
h->offset = newpos;
/* Reset the handle to its new offset */
- LOGFQUEUE("buffering >| Q_RESET_HANDLE");
+ LOGFQUEUE("buffering >| Q_RESET_HANDLE %d", handle_id);
queue_send(&buffering_queue, Q_RESET_HANDLE, handle_id);
size_t next = (unsigned)((void *)h->next - (void *)buffer);
@@ -733,7 +733,7 @@ static void rebuffer_handle(int handle_id, size_t newpos)
}
/* Now we ask for a rebuffer */
- LOGFQUEUE("buffering >| Q_BUFFER_HANDLE");
+ LOGFQUEUE("buffering >| Q_BUFFER_HANDLE %d", handle_id);
queue_send(&buffering_queue, Q_BUFFER_HANDLE, handle_id);
}
@@ -970,7 +970,7 @@ int bufopen(const char *file, size_t offset, enum data_type type)
if (type == TYPE_CUESHEET) {
h->fd = fd;
/* Immediately start buffering those */
- LOGFQUEUE("buffering >| Q_BUFFER_HANDLE");
+ LOGFQUEUE("buffering >| Q_BUFFER_HANDLE %d", h->id);
queue_send(&buffering_queue, Q_BUFFER_HANDLE, h->id);
} else {
/* Other types will get buffered in the course of normal operations */
@@ -1337,7 +1337,7 @@ void buffering_thread(void)
switch (ev.id)
{
case Q_START_FILL:
- LOGFQUEUE("buffering < Q_START_FILL");
+ LOGFQUEUE("buffering < Q_START_FILL %d", (int)ev.data);
/* Call buffer callbacks here because this is one of two ways
* to begin a full buffer fill */
send_event(EVENT_BUFFER_LOW, 0);
@@ -1347,19 +1347,19 @@ void buffering_thread(void)
break;
case Q_BUFFER_HANDLE:
- LOGFQUEUE("buffering < Q_BUFFER_HANDLE");
+ LOGFQUEUE("buffering < Q_BUFFER_HANDLE %d", (int)ev.data);
queue_reply(&buffering_queue, 1);
buffer_handle((int)ev.data);
break;
case Q_RESET_HANDLE:
- LOGFQUEUE("buffering < Q_RESET_HANDLE");
+ LOGFQUEUE("buffering < Q_RESET_HANDLE %d", (int)ev.data);
queue_reply(&buffering_queue, 1);
reset_handle((int)ev.data);
break;
case Q_CLOSE_HANDLE:
- LOGFQUEUE("buffering < Q_CLOSE_HANDLE");
+ LOGFQUEUE("buffering < Q_CLOSE_HANDLE %d", (int)ev.data);
queue_reply(&buffering_queue, close_handle((int)ev.data));
break;
@@ -1370,7 +1370,7 @@ void buffering_thread(void)
break;
case Q_BASE_HANDLE:
- LOGFQUEUE("buffering < Q_BASE_HANDLE");
+ LOGFQUEUE("buffering < Q_BASE_HANDLE %d", (int)ev.data);
base_handle_id = (int)ev.data;
break;