diff options
author | deva <deva> | 2006-07-20 17:53:17 +0000 |
---|---|---|
committer | deva <deva> | 2006-07-20 17:53:17 +0000 |
commit | 7d39c063ea84b9b30dbe669ac4ae641a49506836 (patch) | |
tree | ef1ead10d1736e9ad7ffe139872c86fd2ee00901 /server/img_encoder.cc | |
parent | c8df40b62cf30029a4acd1a57c8c54add54dda9b (diff) |
Utilized the global info object.
Utilized the global info object.
Utilized the global info object.
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; } |