summaryrefslogtreecommitdiff
path: root/src/img_encoder.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2014-05-28 15:05:57 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2014-05-28 15:05:57 +0200
commit0332e496347f6b563abb86d4ef9650bbd6ebc3e1 (patch)
tree74dadbe6e4f3216c8a3c8570e203aad0187febf3 /src/img_encoder.cc
parent8eb0759e2e8a5405b2dd9e6d72d3bd620b51bee4 (diff)
Port server to hugin.
Diffstat (limited to 'src/img_encoder.cc')
-rw-r--r--src/img_encoder.cc21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/img_encoder.cc b/src/img_encoder.cc
index 28702cf..907f282 100644
--- a/src/img_encoder.cc
+++ b/src/img_encoder.cc
@@ -33,24 +33,21 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "img_encoder.h"
-#include <stdio.h>
-
-#include "miav_config.h"
+#include <stdio.h>
+#include <libdv/dv.h>
+#include <libdv/dv_types.h>
extern "C" {
#include <jpeglib.h>
}
-#include "jpeg_mem_dest.h"
+#include <hugin.hpp>
-// Use libdv
-#include <libdv/dv.h>
-#include <libdv/dv_types.h>
+#include "jpeg_mem_dest.h"
+#include "miav_config.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;
@@ -92,7 +89,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");
}
@@ -157,7 +154,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);
+ DEBUG(jpeg, "JPEG buffersize: %d", buffersize);
file->Write(jpeg_output_buffer, buffersize);
delete jpeg_output_buffer;
}