00001 #ifndef OSDL_OVERLAY_H_
00002 #define OSDL_OVERLAY_H_
00003
00004
00005 #include "OSDLVideoTypes.h"
00006
00007 #include "Ceylan.h"
00008
00009 #include <string>
00010
00011
00012
00013 struct SDL_Overlay ;
00014
00015
00016 namespace OSDL
00017 {
00018
00019
00020 namespace Video
00021 {
00022
00023
00024
00026 class OSDL_DLL OverlayException : public VideoException
00027 {
00028
00029 public:
00030
00031 OverlayException( const std::string & message ) throw() ;
00032 virtual ~OverlayException() throw() ;
00033
00034 } ;
00035
00036
00037
00061 class OSDL_DLL Overlay : public Ceylan::Lockable
00062 {
00063
00064
00065 public:
00066
00067
00081 enum EncodingFormat { YV12, IYUV, YUY2,UYVY, YVYU } ;
00082
00083
00101 Overlay( Length width, Length height, EncodingFormat format )
00102 throw( OverlayException ) ;
00103
00104
00106 virtual ~Overlay() throw() ;
00107
00108
00122 virtual void blit( Coordinate x, Coordinate y ) const
00123 throw( OverlayException ) ;
00124
00125
00132 virtual void blit() const throw( OverlayException ) ;
00133
00134
00148 virtual bool mustBeLocked() const throw() ;
00149
00150
00151
00163 virtual const std::string toString(
00164 Ceylan::VerbosityLevels level = Ceylan::high )
00165 const throw() ;
00166
00167
00168
00169 protected:
00170
00171
00181 virtual void preUnlock() throw() ;
00182
00183
00193 virtual void postLock() throw() ;
00194
00195
00197 SDL_Overlay * _overlay ;
00198
00199
00201 Length _width ;
00202
00203
00205 Length _height ;
00206
00207
00208
00209
00210 private:
00211
00212
00221 Overlay( const Overlay & source ) throw() ;
00222
00223
00232 Overlay & operator = ( const Overlay & source ) throw() ;
00233
00234
00235
00236
00237 } ;
00238
00239
00240 }
00241
00242
00243 }
00244
00245
00246
00247 #endif // OSDL_OVERLAY_H_
00248