From 856ab0ece3e73e2b520d55aeab9adfbccdb6aa93 Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 16 May 2005 16:00:56 +0000 Subject: Lots of stuff! --- src/queue.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/queue.h') diff --git a/src/queue.h b/src/queue.h index 1967c0c..de7b8ff 100644 --- a/src/queue.h +++ b/src/queue.h @@ -38,6 +38,10 @@ /* * $Log$ + * Revision 1.15 2005/05/16 16:00:57 deva + * + * Lots of stuff! + * * Revision 1.14 2005/05/07 10:25:34 deva * * Removed ffmpeg code from img_encoder and corrected decoding errors in mov_encoder @@ -84,7 +88,7 @@ public: void lock(); void unlock(); - void plength(); + int length(); private: volatile bool locked; @@ -235,12 +239,13 @@ T *Queue::peek() * Print current length of queue */ template -void Queue::plength() +int Queue::length() { + int length; pthread_mutex_lock(&mutex); - fprintf(stderr, "[ql: %d]", count); - fflush(stderr); + length = count; pthread_mutex_unlock(&mutex); + return length; } /** -- cgit v1.2.3