diff options
Diffstat (limited to 'src/img_encoder.h')
-rw-r--r-- | src/img_encoder.h | 32 |
1 files changed, 14 insertions, 18 deletions
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*/ |