diff options
author | deva <deva> | 2005-06-19 20:04:43 +0000 |
---|---|---|
committer | deva <deva> | 2005-06-19 20:04:43 +0000 |
commit | 6d7a1f124f38a4358f517437757f6f0c3fe21d8b (patch) | |
tree | 48beeb9589d50b8293ca71473a3e344036872cfa /src/mov_encoder.cc | |
parent | 52fd913be8b044f1d064973c53b4467e5bd153fe (diff) |
ImgEncoder now uses the file class for output, through jpeg_mem_dest.
Diffstat (limited to 'src/mov_encoder.cc')
-rw-r--r-- | src/mov_encoder.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/mov_encoder.cc b/src/mov_encoder.cc index b31e1c9..3aa7a49 100644 --- a/src/mov_encoder.cc +++ b/src/mov_encoder.cc @@ -39,6 +39,9 @@ /* * $Log$ + * Revision 1.32 2005/06/19 20:04:43 deva + * ImgEncoder now uses the file class for output, through jpeg_mem_dest. + * * Revision 1.31 2005/06/19 11:44:14 deva * Cleaned up a log of logging. * Fixed server queue (shouldn't happen). @@ -122,6 +125,9 @@ #include <errno.h> +// For nice +#include <unistd.h> + #include "miav_config.h" #include "debug.h" @@ -385,6 +391,13 @@ void MovEncoder::encode_audio(Frame *dvframe) void MovEncoder::thread_main() { info->info("MovEncoder thread is running."); + static volatile int test = 0; + int outsize = 0; + int insize = 0; + + // Run with slightly lower priority than MovEncoderWriter + nice(1); + FrameVector *item; Frame *in_frame; @@ -397,6 +410,9 @@ void MovEncoder::thread_main() pthread_mutex_lock(input_mutex); item = inputqueue->front(); inputqueue->pop(); + + insize = inputqueue->size(); + pthread_mutex_unlock(input_mutex); // Unlock input mutex @@ -411,12 +427,18 @@ void MovEncoder::thread_main() // Lock output mutex pthread_mutex_lock(output_mutex); outputqueue->push(out_frame); + + outsize = outputqueue->size(); + pthread_mutex_unlock(output_mutex); // Unlock output mutex } delete item; + test++; + if(test % (25 * 24) == 0) info->info("Input pool size: %d, output pool size: %d", insize, outsize); + // Kick frame writer sem_post(output_sem); |