diff options
Diffstat (limited to 'server/img_encoder.cc')
-rw-r--r-- | server/img_encoder.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/server/img_encoder.cc b/server/img_encoder.cc index 2ed0113..df44686 100644 --- a/server/img_encoder.cc +++ b/server/img_encoder.cc @@ -35,6 +35,9 @@ #include "img_encoder.h" #include <stdio.h> +#include "miav_config.h" +#include "info.h" + extern "C" { #include <jpeglib.h> } @@ -45,13 +48,11 @@ extern "C" { #include <libdv/dv.h> #include <libdv/dv_types.h> -ImgEncoder::ImgEncoder(const char* cpr, Info *i) +ImgEncoder::ImgEncoder(const char* cpr) { - info = i; - // Create path and filename char fname[256]; - string *server_root; + std::string *server_root; char birthmonth[3]; char date[32]; char encrypted_cpr[32]; @@ -90,7 +91,7 @@ ImgEncoder::ImgEncoder(const char* cpr, Info *i) sprintf(fname, "%s/%s/%s/%s-%s-", server_root->c_str(), birthmonth, encrypted_cpr, cpr, date); - file = new File(fname, "jpg", info); + file = new File(fname, "jpg"); } @@ -155,7 +156,7 @@ void ImgEncoder::writeJPEGFile(int quality, unsigned char *rgb, int image_width, // Release JPEG compression object jpeg_destroy_compress(&cinfo); - info->info("JPEG buffersize: %d", buffersize); + MIaV::info->info("JPEG buffersize: %d", buffersize); file->Write(jpeg_output_buffer, buffersize); delete jpeg_output_buffer; } |