Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

ffostream.hh

00001 /*
00002  * PIAVE - PIAVE Is A Video Editor
00003  *
00004  * Copyright (C) 2002 Rolf Dubitzky, rolf@dubitzky.de
00005  *
00006  */
00007 
00008 /*
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software Foundation,
00021  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00022  */
00023 
00024 
00031 #if ! defined( FFOSTREAM_HH )
00032 #define FFOSTREAM_HH
00033 
00034 // stdc++
00035 #include <string>
00036 
00037 // PIAVE
00038 #include "libpiave/piave_base.hh"
00039 #include "libpiave/avstream.hh"
00040 
00041 #include "ffmpeg.hh"
00042 
00043 namespace PIAVE {
00044 
00050     class OutFFMpegStream : public OutAVFStream
00051     {
00052       public:
00053         OutFFMpegStream( const std::string& fileName );
00054         virtual ~OutFFMpegStream();
00055         virtual void putFrame( Frame & f );
00056 
00057       private:
00058         void initEncoder();
00059         
00060       private:
00061         AVCodec          * _avCodec;
00062         AVCodecContext   _avCodecContext;
00063         FILE             * _file;
00064         AVPicture          _picture;
00065         static const int OUTBUFSIZE = 100000;
00066         uint8_t            * _picture_buf;
00067         uint8_t              _outbuf[ OUTBUFSIZE ]; // FIXME
00068     };
00069 
00070 }
00071 
00072 
00073 #endif

Generated on Tue Oct 14 20:45:36 2003 for piave by doxygen1.2.18