diff options
author | deva <deva> | 2005-10-13 11:56:10 +0000 |
---|---|---|
committer | deva <deva> | 2005-10-13 11:56:10 +0000 |
commit | 38e4cbdb7aabf90d9a56ac95f1c8beca810c9436 (patch) | |
tree | c98a9b239838b3900809ceaea98bab669b06d188 | |
parent | 56632c4b32abc705f613475c3b78ae7a5dd4a3d2 (diff) |
*** empty log message ***
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | etc/miav.conf | 8 | ||||
-rw-r--r-- | src/mov_encoder.cc | 8 | ||||
-rw-r--r-- | src/mov_encoder_thread.cc | 14 |
4 files changed, 13 insertions, 19 deletions
diff --git a/configure.in b/configure.in index af7fb9e..06a8073 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,6 @@ # Filename: configure.in AC_INIT(src/miav.cc) -AM_INIT_AUTOMAKE( miav, 0.2.8 ) +AM_INIT_AUTOMAKE( miav, 0.3.0 ) AC_PROG_CXX diff --git a/etc/miav.conf b/etc/miav.conf index 62f1e9a..13770e3 100644 --- a/etc/miav.conf +++ b/etc/miav.conf @@ -1,6 +1,6 @@ -# -# The MIaV configuration file -# +############################## +## The MIaV configuration file +## # Log files of the server and the client client_log_file = "/tmp/miav_client.log" @@ -21,7 +21,7 @@ pixel_width = 1024 pixel_height = 768 # mcast conf file -multicast_configurationfile= "../etc/multicast.conf" +multicast_configurationfile= "/home/miav/etc/miav/multicast.conf" # Set to 1 if client is slow ( less than 1.5 ghz ) player_skip_frames = 1 diff --git a/src/mov_encoder.cc b/src/mov_encoder.cc index a4d3483..6ac5876 100644 --- a/src/mov_encoder.cc +++ b/src/mov_encoder.cc @@ -73,8 +73,6 @@ MovEncoder::~MovEncoder() void MovEncoder::thread_main() { info->info("MovEncoder::run"); - // static volatile int test = 0; - // int insize = 0; // Run with slightly lower priority than MovEncoderWriter AND AudioEncoder nice(2); @@ -103,8 +101,10 @@ void MovEncoder::thread_main() *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);*/} // FIXME: Kick the other encoders + int threads = config->readInt("encoding_threads") - 1; // -1 cause we only need the others! + for(int cnt = 0; cnt < threads; cnt++) { + inputqueue->push(NULL); + } } // Encode video diff --git a/src/mov_encoder_thread.cc b/src/mov_encoder_thread.cc index 6c54191..35f62a6 100644 --- a/src/mov_encoder_thread.cc +++ b/src/mov_encoder_thread.cc @@ -35,7 +35,6 @@ MovEncoderThread::MovEncoderThread(const char *clientip, const char *cpr, Info * info->info("MovEncoderThread"); // Queue - // inputqueue = new ThreadSafeQueueFIFO<FrameVector*>(); inputqueue = new ThreadSafeQueueFIFO(); // Initialize read semaphore @@ -94,31 +93,26 @@ MovEncoderThread::~MovEncoderThread() info->info("~MovEncoderThread"); // First we destroy the movie encoders - // for(int cnt = 0; cnt < threads; cnt++) sem_post(&in_sem); // Kick them for(int cnt = 0; cnt < threads; cnt++) { encs[cnt]->wait_stop(); // Wait for it to stop delete encs[cnt]; // Delete it } - info->info("Deleted the movie encoders"); + // Then we destroy the audio encoder audioenc->wait_stop(); // Wait for it to stop. delete audioenc; // delete the audio encoder - info->info("Deleted the audio encoder"); - // Finally we destroy the writer. - writer->running = false; - // FIXME: Post writer + // Finally we destroy the writer. writer->wait_stop(); // Wait for it to stop. delete writer; // delete the writer (end thereby close the file) - info->info("Deleted the writer"); - // Destroy the semaphores. - // sem_destroy(&in_sem); + + // Destroy the semaphore. sem_destroy(&read_sem); info->info("~MovEncoderThread::done"); |