MUAN
video_encoder.h
Go to the documentation of this file.
00001 
00005 /*
00006  * Copyright (C) 2006  Lab. Visgraf/IMPA and AnimaMundi
00007  * 
00008  * This program is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU General Public License
00010  * as published by the Free Software Foundation; either version 2
00011  * of the License, or (at your option) any later version.
00012  * 
00013  * This program is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  * 
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00021  * 
00022 */
00023 #ifndef VIDEO_ENCODER_H
00024 #define VIDEO_ENCODER_H
00025 
00026 #include <stdio.h>
00027 #include <stdlib.h>
00028 
00029 #include "imglist.h"
00030 extern "C"{
00031 #include "ffmpeg_rw.h"
00032 #include "image.h"
00033 #include "jpeg.h"
00034 }
00035 
00036 #define FRAME_DURATION 1
00037 #define MAX_FRAMES 10000
00038 #define MAX_FILE_SIZE 10000
00039 #define JPEG_QUALITY 90
00040 
00041 #define AVI_DV2_FORMAT 0 // temporary !!!
00042 
00043 class VideoEncoder{
00044 public:
00045    bool avi_write( char *fname, ImgList *imgl, int file_format, int max_frames,
00046                    off_t max_file_size, bool time_stamp, bool isOpenDML );                
00047    bool avi_read( ImgList *imgl, const char *fname, int load_mode ); // lv: integrate
00048 
00049    bool mpg_write( ImgList *imgl, const char *fname);
00050    bool mpg_read( ImgList *imgl, const char *fname); // lv: integrate
00051 
00052    bool avffmpeg_write( ImgList *imgl, const char *fname);
00053    bool avffmpeg_read( ImgList *imgl, const char *fname);
00054 
00055    bool jpg_write( ImgList *imgl, const char *fname, int quality);
00056    bool jpg_read( ImgList *imgl, const char *dirname, int load_mode );
00057 
00058    bool verify_frame_duplication(unsigned char *i1, unsigned char *i2, int load_mode,  int w, int h, int key);
00059    bool verify_image_duplication(unsigned char *i1, unsigned char *i2, int w, int h);
00060 };
00061 
00062 
00063 #endif