summaryrefslogtreecommitdiff
path: root/server/mov_encoder_writer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'server/mov_encoder_writer.cc')
-rw-r--r--server/mov_encoder_writer.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/mov_encoder_writer.cc b/server/mov_encoder_writer.cc
index 8f432ee..54c816d 100644
--- a/server/mov_encoder_writer.cc
+++ b/server/mov_encoder_writer.cc
@@ -40,9 +40,8 @@
#include <errno.h>
#include <string>
-using namespace std;
-#include "miav_config.h"
+#include "configuration.h"
#include "info.h"
#include <time.h>
@@ -60,12 +59,13 @@ MovEncoderWriter::MovEncoderWriter(const char *clientip, const char* cpr,
// Create path and filename
char fname[256];
- string *server_root;
+ std::string server_root;
char birthmonth[3];
char date[32];
// Get server root
- server_root = MIaV::config->readString("server_movie_root");
+ if(MIaV::config->get("server_movie_root", &server_root))
+ MIaV::info->error("Could not read the symbol [server_movie_root] from the conf file!");
// Copy the bytes representing the birth month from the cpr
// [dd][mm][yy]-[nn][nn]
@@ -81,7 +81,7 @@ MovEncoderWriter::MovEncoderWriter(const char *clientip, const char* cpr,
ltime->tm_mon + 1, // Ranging from 0 to 11
ltime->tm_mday);
- sprintf(fname, "%s/%s/%s/%s-%s-", server_root->c_str(), birthmonth, cpr, cpr, date);
+ sprintf(fname, "%s/%s/%s/%s-%s-", server_root.c_str(), birthmonth, cpr, cpr, date);
file = new File(fname, "mpg");