00001
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef VIDEO_ENCODER_H
00027 #define VIDEO_ENCODER_H
00028
00029 #include <stdio.h>
00030 #include <stdlib.h>
00031 #include "filehandler.h"
00032 #include "imglist.h"
00033 extern "C"{
00034 #include "ffmpeg_rw.h"
00035 #include "image.h"
00036 #include "jpeg.h"
00037 }
00038
00039
00040 #define FRAME_DURATION 1
00041 #define MAX_FRAMES 10000
00042 #define MAX_FILE_SIZE 10000
00043 #define JPEG_QUALITY 75
00044
00045
00046 class VideoEncoder{
00047 public:
00059 bool avi_write( char *fname, ImgList *imgl, int file_format, int max_frames,
00060 off_t max_file_size, bool time_stamp, bool isOpenDML );
00067 bool avi_read( ImgList *imgl, char *fname, int load_mode );
00068
00069 bool verify_frame_duplication(Frame *f1, Frame *f2, int load_mode);
00070 bool verify_image_duplication(unsigned char *i1, unsigned char *i2, int size);
00071
00072 bool jpg_write( ImgList *imgl, char *fname, int quality);
00073 bool jpg_read( ImgList *imgl, char *dirname, int load_mode );
00074 bool mpg_write( ImgList *imgl, char *fname);
00075 bool mpg_read( ImgList *imgl, char *fname);
00076 };
00077
00078
00079 #endif