From 7d39c063ea84b9b30dbe669ac4ae641a49506836 Mon Sep 17 00:00:00 2001 From: deva Date: Thu, 20 Jul 2006 17:53:17 +0000 Subject: Utilized the global info object. Utilized the global info object. Utilized the global info object. --- server/mov_encoder_writer.cc | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) (limited to 'server/mov_encoder_writer.cc') diff --git a/server/mov_encoder_writer.cc b/server/mov_encoder_writer.cc index d3eb0ef..a8eb190 100644 --- a/server/mov_encoder_writer.cc +++ b/server/mov_encoder_writer.cc @@ -41,6 +41,7 @@ using namespace std; #include "miav_config.h" +#include "info.h" #include @@ -51,11 +52,9 @@ using namespace std; MovEncoderWriter::MovEncoderWriter(const char *clientip, const char* cpr, ThreadSafeQueuePriority *video_q, - ThreadSafeQueuePriority *audio_q, - Info *i) + ThreadSafeQueuePriority *audio_q) { - info = i; - info->info("MovEncoderWriter"); + MIaV::info->info("MovEncoderWriter"); // Create path and filename char fname[256]; @@ -82,13 +81,13 @@ MovEncoderWriter::MovEncoderWriter(const char *clientip, const char* cpr, sprintf(fname, "%s/%s/%s/%s-%s-", server_root->c_str(), birthmonth, cpr, cpr, date); - file = new File(fname, "mpg", info); + file = new File(fname, "mpg"); - MulticastConfiguration mcconfig(info, ETC"/multicast.conf"); + MulticastConfiguration mcconfig(ETC"/multicast.conf"); mcastconf_t mcclientconf = mcconfig.getConf((char*)clientip); - info->info("Client: %s - Enabled: %s - Addr: %s - Port: %d - WithAudio: %s", + MIaV::info->info("Client: %s - Enabled: %s - Addr: %s - Port: %d - WithAudio: %s", mcclientconf.client.c_str(), mcclientconf.enabled?"Yes\0":"No\0", mcclientconf.addr.c_str(), @@ -97,8 +96,7 @@ MovEncoderWriter::MovEncoderWriter(const char *clientip, const char* cpr, multicast = NULL; - if(mcclientconf.enabled) multicast = new Multicast(info, - mcclientconf); + if(mcclientconf.enabled) multicast = new Multicast(mcclientconf); video_queue = video_q; audio_queue = audio_q; @@ -108,30 +106,24 @@ MovEncoderWriter::MovEncoderWriter(const char *clientip, const char* cpr, MovEncoderWriter::~MovEncoderWriter() { - info->info("~MovEncoderWriter"); + MIaV::info->info("~MovEncoderWriter"); delete file; if(multicast) delete multicast; } void MovEncoderWriter::thread_main() { - info->info("MovEncoderWriter::run"); + MIaV::info->info("MovEncoderWriter::run"); #ifdef WITH_LIBMPLEX - LibMPlexWrapper mplex(info, - file, - video_queue, - audio_queue); + LibMPlexWrapper mplex(file, video_queue, audio_queue); mplex.multiplex(); #else/*WITH_LIBMPLEX*/ - Multiplexer multiplexer(file, multicast, - info, &running, - video_queue, - audio_queue); + Multiplexer multiplexer(file, multicast, &running, video_queue, audio_queue); multiplexer.multiplex(); #endif/*WITH_LIBMPLEX*/ - info->info("MovEncoderWriter::stop"); + MIaV::info->info("MovEncoderWriter::stop"); } void MovEncoderWriter::setSaveState(n_savestate savestate) -- cgit v1.2.3