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

rawdvstream.hh

Go to the documentation of this file.
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 
00029 #if ! defined( RAWDVSTREAM_HH )
00030 #define RAWDVSTREAM_HH
00031 
00032 // PIAVE
00033 #include "libpiave/plugin.hh"
00034 #include "libpiave/avstream.hh"
00035 
00036 
00037 namespace PIAVE {
00038 
00039     class LibDVDecoder;
00040     class LibDVEncoder;
00041     class PropertyNode;
00042     class Frame;
00043 
00044     /*
00045      *    plugin wrapper for raw DV stream
00046      */
00047     class InRawDVStreamPlugin : public Plugin
00048     {
00049       public:
00050         InRawDVStreamPlugin();
00051         virtual PluginBase * newElement( const PropertyNode * p = 0 );
00052     };
00053 
00054     class OutRawDVStreamPlugin : public Plugin
00055     {
00056       public:
00057         OutRawDVStreamPlugin();
00058         virtual PluginBase * newElement( const PropertyNode * p = 0 );
00059     };
00060 
00061 
00062     /*
00063      *  Class InRawDVStream
00064      *  handles raw dv streams as produced by libdv, i.e. dvgrab
00065      *  \todo check VideoInfo and compare to PIAVE::Global
00066      */
00067     class InRawDVStream : public InAVFStream
00068     {
00069       public:
00070         InRawDVStream( const std::string& fileName ) throw(exception);
00071         virtual Frame getFrame( Time t );
00072 
00073         virtual void decodeMetaData( Frame & f );
00074         virtual void decodeVideo( Frame & f, uint8_t * dest = 0 );
00075         virtual void decodeAudio( Frame & f, uint8_t * dest = 0 );
00076 
00077         virtual PropertyNode * getProperties( PropertyNode * p ) const;
00078 
00079       private:
00080         LibDVDecoder  * _dvDecoder;
00081         int _frameSize;
00082     };
00083 
00084     class OutRawDVStream : public OutAVFStream
00085     {
00086       public:
00087         OutRawDVStream( const std::string& fileName );
00088         virtual ~OutRawDVStream() { INFO( "~OutRawDVStream" ); }
00089 
00090         virtual void putFrame( Frame & f );
00091 
00092         virtual PropertyNode * getProperties( PropertyNode * p=0 ) const;
00093 
00094       private:
00095         LibDVEncoder  * _dvEncoder;
00096         int _frameSize;
00097     };
00098 
00099 
00100 }
00101 
00102 #endif

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