diff options
author | deva <deva> | 2005-10-08 15:18:10 +0000 |
---|---|---|
committer | deva <deva> | 2005-10-08 15:18:10 +0000 |
commit | a8b1750ede6e942430bc25e0c9c90c8e4624b250 (patch) | |
tree | 4418e3b10f088183813ea8c764667300521d5f85 /src/mov_encoder_writer.cc | |
parent | 8437a0c200ddbde70d64884f42dcff651749b066 (diff) |
*** empty log message ***
Diffstat (limited to 'src/mov_encoder_writer.cc')
-rw-r--r-- | src/mov_encoder_writer.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mov_encoder_writer.cc b/src/mov_encoder_writer.cc index 572a81e..7f3bfec 100644 --- a/src/mov_encoder_writer.cc +++ b/src/mov_encoder_writer.cc @@ -81,7 +81,15 @@ MovEncoderWriter::MovEncoderWriter(const char* cpr, file = new File(fname, "mpg", info); - multicast = new Multicast(info); + if(config->readBool("server_multicast")) { + string *addr = config->readString("server_multicast_addr"); + int port = config->readInt("server_multicast_port"); + info->info("Enabling multicast %s : %d", addr->c_str(), port); + multicast = new Multicast(info, (char*)addr->c_str(), port); + } else { + info->info("Disabling multicast"); + multicast = NULL; + } video_queue = video_q; audio_queue = audio_q; @@ -93,7 +101,7 @@ MovEncoderWriter::~MovEncoderWriter() { info->info("~MovEncoderWriter"); delete file; - delete multicast; + if(multicast) delete multicast; } |