diff options
author | deva <deva> | 2005-09-19 09:23:50 +0000 |
---|---|---|
committer | deva <deva> | 2005-09-19 09:23:50 +0000 |
commit | 5298cdacd41efbf2ffd0282b14e401734b31d90a (patch) | |
tree | 7628bbc4317824f8e90d031d551c5c34e52c8508 /src/mov_encoder.cc | |
parent | 8e52138ba8a6fe9b92192512ba510451a2655384 (diff) |
*** empty log message ***
Diffstat (limited to 'src/mov_encoder.cc')
-rw-r--r-- | src/mov_encoder.cc | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/mov_encoder.cc b/src/mov_encoder.cc index 09e6fa3..3d30bbb 100644 --- a/src/mov_encoder.cc +++ b/src/mov_encoder.cc @@ -80,8 +80,8 @@ MovEncoder::~MovEncoder() // this runs in a thread void MovEncoder::thread_main() { - info->info("MovEncoder thread is running."); - static volatile int test = 0; + info->info("MovEncoder::run"); + // static volatile int test = 0; int v_outsize = 0; int a_outsize = 0; int insize = 0; @@ -115,8 +115,13 @@ void MovEncoder::thread_main() // Check for end of stream if(in_frame->endOfFrameStream == true) { info->info("endOfFrameStream in MovEncoder"); - // Stop running + + // Signal to stop running *running = false; + + // Kick them sleepy ones so they get the message. + int threads = config->readInt("encoding_threads"); + for(int cnt = 0; cnt < threads; cnt++) sem_post(input_sem); } // Encode video out_v_frame = fame.encode(in_frame); @@ -149,20 +154,20 @@ void MovEncoder::thread_main() delete item; item = NULL; - + /* test++; if(test % (25 * 24) == 0) info->info("Input pool size: %d, video output pool size: %d, audio output pool size: %d", insize, v_outsize, a_outsize); - + */ // Kick reader sem_post(read_sem); } } - + /* info->info("Input pool size: %d, video output pool size: %d, audio output pool size: %d", insize, v_outsize, a_outsize); - + */ // Kick audio encoder sem_post(audio_output_sem); @@ -170,5 +175,5 @@ void MovEncoder::thread_main() // Kick multiplexer (video) sem_post(video_output_sem); - info->info("MovEncoder thread has stopped."); + info->info("MovEncoder::stop"); } |