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

sdlstream.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 
00029 #if ! defined( SDLOUTSTREAM_HH )
00030 #define SDLOUTSTREAM_HH
00031 
00032 // PIAVE
00033 #include "libpiave/piave_base.hh"
00034 #include "libpiave/avstream.hh"
00035 
00036 // SDL
00037 #include <SDL/SDL.h>
00038 #include <SDL/SDL_syswm.h>
00039 
00040 namespace PIAVE {
00041 
00042     class PropertyNode;
00043 
00044     class SDLStreamPlugin : public Plugin
00045     {
00046       public:
00047         SDLStreamPlugin();
00048         virtual PluginBase * newElement( const PropertyNode * p = 0 );
00049     };
00050 
00055     class OutSDLStream : public OutAVStreamIFace
00056     {
00057       public:
00058         enum fmt_e { no_fmt, yuv_overlay, rgb_surface };
00059         
00060         OutSDLStream();
00061         ~OutSDLStream();
00062         virtual void putFrame( Frame & f );
00063 
00064         virtual PropertyNode * getProperties( PropertyNode * p=0 ) const;
00065 
00066         void init();
00067         const SDL_SysWMinfo & getSysWMinfo();
00068 
00069         void setIgnoreInputEvents();
00070 
00071       private:
00072         bool                   _SDL_init_OK;
00073         SDL_Surface          * _screen;
00074         SDL_Surface          * _image;
00075         SDL_SysWMinfo          _sysWMinfo;
00076         const SDL_VideoInfo  * _videoInfo;
00077         SDL_Overlay          * _overlay;
00078         SDL_Rect               _rect;
00079         fmt_e                  _fmt;
00080 
00081         friend class SDLStreamPlugin;
00082     };
00083 
00084 }
00085 
00086 #endif

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