diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/img_encoder.cc | 2 | ||||
-rw-r--r-- | server/libfame_wrapper.cc | 12 | ||||
-rw-r--r-- | server/liblame_wrapper.cc | 4 | ||||
-rw-r--r-- | server/miav_daemon.cc | 9 | ||||
-rw-r--r-- | server/miav_server.cc | 2 | ||||
-rw-r--r-- | server/mov_encoder.cc | 4 | ||||
-rw-r--r-- | server/mov_encoder_thread.cc | 4 | ||||
-rw-r--r-- | server/mov_encoder_writer.cc | 2 | ||||
-rw-r--r-- | server/multicast.cc | 2 | ||||
-rw-r--r-- | server/multicast_configuration.cc | 2 |
10 files changed, 22 insertions, 21 deletions
diff --git a/server/img_encoder.cc b/server/img_encoder.cc index bb36009..2ed0113 100644 --- a/server/img_encoder.cc +++ b/server/img_encoder.cc @@ -57,7 +57,7 @@ ImgEncoder::ImgEncoder(const char* cpr, Info *i) char encrypted_cpr[32]; // Get server root - server_root = config->readString("server_image_root"); + server_root = MIaV::config->readString("server_image_root"); // Copy the bytes representing the birth month from the cpr // [dd][mm][yy]-[nn][nn] diff --git a/server/libfame_wrapper.cc b/server/libfame_wrapper.cc index a663df6..e1d3660 100644 --- a/server/libfame_wrapper.cc +++ b/server/libfame_wrapper.cc @@ -94,13 +94,13 @@ LibFAMEWrapper::LibFAMEWrapper(Info *i) // to JPEG), whereas P and B frames are motion compressed, respectively // predicted from past reference (I or P) frame, or bidirectionally predicted // from past and future reference frame. - fame_par.coding = config->readString("frame_sequence")->c_str(); + fame_par.coding = MIaV::config->readString("frame_sequence")->c_str(); // quality is a percentage, which controls compression versus quality. - fame_par.quality = config->readInt("video_quality"); + fame_par.quality = MIaV::config->readInt("video_quality"); // Bitrate - fame_par.bitrate = config->readInt("video_bitrate") * 1000; // video bitrate in bytes pr second (0=VBR) + fame_par.bitrate = MIaV::config->readInt("video_bitrate") * 1000; // video bitrate in bytes pr second (0=VBR) // slices_per_frame is the number of frame slices per frame. More slices provide // better error recovery. There must be at least one slice per frame, and at most @@ -133,7 +133,7 @@ LibFAMEWrapper::LibFAMEWrapper(Info *i) fame_par.profile = profilename; // profile name fame_par.total_frames = 0; // total number of frames - if(strcmp(config->readString("encoding_codec")->c_str(), "mpeg4") == 0) { + if(strcmp(MIaV::config->readString("encoding_codec")->c_str(), "mpeg4") == 0) { info->info("Using mpeg4 compression."); fame_object_t *object; @@ -141,7 +141,7 @@ LibFAMEWrapper::LibFAMEWrapper(Info *i) object = fame_get_object(fame_context, "profile/mpeg4/simple"); if(object) fame_register(fame_context, "profile", object); - } else if(strcmp(config->readString("encoding_codec")->c_str(), "mpeg1") == 0) { + } else if(strcmp(MIaV::config->readString("encoding_codec")->c_str(), "mpeg1") == 0) { info->info("Using mpeg1 compression."); fame_object_t *object; @@ -149,7 +149,7 @@ LibFAMEWrapper::LibFAMEWrapper(Info *i) object = fame_get_object(fame_context, "profile/mpeg1"); if(object) fame_register(fame_context, "profile", object); - } else if(strcmp(config->readString("encoding_codec")->c_str(), "mpeg1") == 0) { + } else if(strcmp(MIaV::config->readString("encoding_codec")->c_str(), "mpeg1") == 0) { } else { info->info("Using default (mpeg1) compression."); } diff --git a/server/liblame_wrapper.cc b/server/liblame_wrapper.cc index 5603d6f..137ac6a 100644 --- a/server/liblame_wrapper.cc +++ b/server/liblame_wrapper.cc @@ -46,9 +46,9 @@ LibLAMEWrapper::LibLAMEWrapper(Info *i) // lame_set_num_samples(gfp, SAMPLES); // lame_set_num_samples(gfp, 0); - lame_set_quality(gfp, config->readInt("mp3_quality")); + lame_set_quality(gfp, MIaV::config->readInt("mp3_quality")); lame_set_mode(gfp, STEREO); - lame_set_brate(gfp, config->readInt("mp3_bitrate")); + lame_set_brate(gfp, MIaV::config->readInt("mp3_bitrate")); lame_set_strict_ISO(gfp, 1); diff --git a/server/miav_daemon.cc b/server/miav_daemon.cc index 500e92a..06c6c3e 100644 --- a/server/miav_daemon.cc +++ b/server/miav_daemon.cc @@ -44,11 +44,12 @@ MiavDaemon::~MiavDaemon() int MiavDaemon::daemon_main() { - MiavConfig cfg(ETC"/miav.conf", NULL); - InfoConsole info(&cfg); - config = new MiavConfig(ETC"/miav.conf", &info); + MiavConfig config(ETC"/miav.conf"); + MIaV::initConfig(&config); + + InfoConsole info(&config); - int port = config->readInt("server_port"); + int port = MIaV::config->readInt("server_port"); pid_t childpid; // variable to store the child's pid signal(SIGCLD, SIG_IGN); // Ved SIGCHILD til IGNORE maa wait/waitpid ikke kaldes diff --git a/server/miav_server.cc b/server/miav_server.cc index 5b5a29d..2005afd 100644 --- a/server/miav_server.cc +++ b/server/miav_server.cc @@ -41,7 +41,7 @@ int main(int argc, char *argv[]) { MiavDaemon daemon; - MiavConfig cfg(ETC"/miav.conf", NULL); + MiavConfig cfg(ETC"/miav.conf"); string *user = cfg.readString("server_user"); string *group = cfg.readString("server_group"); diff --git a/server/mov_encoder.cc b/server/mov_encoder.cc index 0c97e18..e9049a6 100644 --- a/server/mov_encoder.cc +++ b/server/mov_encoder.cc @@ -100,7 +100,7 @@ void MovEncoder::thread_main() *running = false; // Kick them sleepy ones so they get the message. - int threads = config->readInt("encoding_threads") - 1; // -1 cause we only need the others! + int threads = MIaV::config->readInt("encoding_threads") - 1; // -1 cause we only need the others! for(int cnt = 0; cnt < threads; cnt++) { inputqueue->push(NULL); } @@ -230,7 +230,7 @@ void MovEncoder::thread_main() *running = false; // Kick them sleepy ones so they get the message. - int threads = config->readInt("encoding_threads"); + int threads = MIaV::config->readInt("encoding_threads"); for(int cnt = 0; cnt < threads; cnt++) sem_post(input_sem); } // Encode video diff --git a/server/mov_encoder_thread.cc b/server/mov_encoder_thread.cc index 2ff013d..c0b8b27 100644 --- a/server/mov_encoder_thread.cc +++ b/server/mov_encoder_thread.cc @@ -50,11 +50,11 @@ MovEncoderThread::MovEncoderThread(const char *clientip, const char *cpr, Info * block = new FrameVector(); - num_frames_in_block = config->readString("frame_sequence")->length(); + num_frames_in_block = MIaV::config->readString("frame_sequence")->length(); info->info("Frame sequence length %d", num_frames_in_block); - threads = config->readInt("encoding_threads"); + threads = MIaV::config->readInt("encoding_threads"); movencodersrunning = true; diff --git a/server/mov_encoder_writer.cc b/server/mov_encoder_writer.cc index 1773527..d3eb0ef 100644 --- a/server/mov_encoder_writer.cc +++ b/server/mov_encoder_writer.cc @@ -64,7 +64,7 @@ MovEncoderWriter::MovEncoderWriter(const char *clientip, const char* cpr, char date[32]; // Get server root - server_root = config->readString("server_movie_root"); + server_root = MIaV::config->readString("server_movie_root"); // Copy the bytes representing the birth month from the cpr // [dd][mm][yy]-[nn][nn] diff --git a/server/multicast.cc b/server/multicast.cc index 0072c19..dd12c27 100644 --- a/server/multicast.cc +++ b/server/multicast.cc @@ -59,7 +59,7 @@ Multicast::Multicast(Info *i, mcastconf_t &mcclientconf) mcclientconf.addr.c_str(), mcclientconf.port); - int mtu = config->readInt("udp_packet_size"); + int mtu = MIaV::config->readInt("udp_packet_size"); // Create buffer with the size of MTU // socklen_t mtu_sz; diff --git a/server/multicast_configuration.cc b/server/multicast_configuration.cc index 969faca..f4e7414 100644 --- a/server/multicast_configuration.cc +++ b/server/multicast_configuration.cc @@ -28,7 +28,7 @@ #include "multicast_configuration.h" MulticastConfiguration::MulticastConfiguration(Info *info, char *file) - : MiavConfig(file, info) + : MiavConfig(file) { mcastconf_t conf; |