From 6d7a1f124f38a4358f517437757f6f0c3fe21d8b Mon Sep 17 00:00:00 2001 From: deva Date: Sun, 19 Jun 2005 20:04:43 +0000 Subject: ImgEncoder now uses the file class for output, through jpeg_mem_dest. --- src/img_encoder.h | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) (limited to 'src/img_encoder.h') diff --git a/src/img_encoder.h b/src/img_encoder.h index 4ffec57..eb702b2 100644 --- a/src/img_encoder.h +++ b/src/img_encoder.h @@ -38,6 +38,9 @@ /* * $Log$ + * Revision 1.8 2005/06/19 20:04:43 deva + * ImgEncoder now uses the file class for output, through jpeg_mem_dest. + * * Revision 1.7 2005/05/07 10:25:34 deva * * Removed ffmpeg code from img_encoder and corrected decoding errors in mov_encoder @@ -69,33 +72,26 @@ extern "C" { #endif } +#include "info.h" +#include "file.h" + #define VIDEO_BUFFER_SIZE (1024*1024) // FIXME: One size fits all... +#define JPEG_HEADER_PAD 500 class ImgEncoder { - public: - ImgEncoder(); +public: + ImgEncoder(const char* cpr, Info *info); ~ImgEncoder(); - void encode(Frame *frame, char* filename, int quality); - void writeJPEGFile(char *filename, - int quality, + void encode(Frame *frame, int quality); + void writeJPEGFile(int quality, JSAMPLE * image_buffer, // Points to large array of R,G,B-order data int image_width, // Number of columns in image int image_height); // Number of rows in image - private: +private: + File *file; + Info *info; void getRGB(Frame *frame, unsigned char *rgb); - /* - // Decoder - AVFormatContext *dfc; - AVCodecContext *dcc; - - // Encoder - AVFormatContext *efc; - AVCodecContext *ecc; - AVPacket epkt; - unsigned char *video_buffer; - // AVPacket pkt; - */ }; #endif /*__RTVIDEOREC_IMGENCODER_H*/ -- cgit v1.2.3