summaryrefslogtreecommitdiff
path: root/server/mov_encoder_writer.cc
diff options
context:
space:
mode:
authordeva <deva>2006-07-20 17:53:17 +0000
committerdeva <deva>2006-07-20 17:53:17 +0000
commit7d39c063ea84b9b30dbe669ac4ae641a49506836 (patch)
treeef1ead10d1736e9ad7ffe139872c86fd2ee00901 /server/mov_encoder_writer.cc
parentc8df40b62cf30029a4acd1a57c8c54add54dda9b (diff)
Utilized the global info object.
Utilized the global info object. Utilized the global info object.
Diffstat (limited to 'server/mov_encoder_writer.cc')
-rw-r--r--server/mov_encoder_writer.cc32
1 files changed, 12 insertions, 20 deletions
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 <time.h>
@@ -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)