00001 /* -- 2007-05-07 -- 00002 * ardev - an augmented reality library for robot developers 00003 * Copyright 2005-2007 - Toby Collett (ardev _at_ plan9.net.nz) 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Lesser General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2.1 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Lesser General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Lesser General Public 00016 * License along with this library; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 * 00019 */ 00020 #include <ardev/ardevconfig.h> 00021 #ifdef HAVE_FFMPEG 00022 00023 #ifndef OUTPUT_FFMPEG_H 00024 #define OUTPUT_FFMPEG_H 00025 00026 /*************************************************************************** 00027 * output_ffmpeg.h 00028 * 00029 * Tue Apr 27 15:34:26 2004 00030 * Copyright 2004 Toby Collett 00031 * Email 00032 ****************************************************************************/ 00033 00034 #include <ardev/ardev.h> 00035 #include <pthread.h> 00036 #include <GL/glut.h> 00037 #include <GL/glx.h> 00038 #include <X11/Xlib.h> 00039 00040 #include <ardev/ffmpeg.h> 00041 00042 #define STREAM_FRAME_RATE 12 /* images/s */ 00043 00046 class OutputMovie : public FrameProcessObject 00047 { 00048 public: 00050 OutputMovie(const char * Filename = "Output.mpeg", int x=300,int y=300); 00051 int Initialise(bool); 00052 void Terminate(); 00053 void ProcessFrame(const ARImage & Frame); 00054 private: 00055 char * Filename; 00056 ffmpeg * encoder; 00057 int width; 00058 int height; 00059 }; 00060 00061 #endif 00062 00063 #endif