00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef OSDL_OVERLAY_H_
00028 #define OSDL_OVERLAY_H_
00029
00030
00031 #include "OSDLVideoTypes.h"
00032
00033 #include "Ceylan.h"
00034
00035 #include <string>
00036
00037
00038
00039
00040 #if ! defined(OSDL_USES_SDL) || OSDL_USES_SDL
00041
00042
00043 struct SDL_Overlay ;
00044
00045 #endif // ! defined(OSDL_USES_SDL) || OSDL_USES_SDL
00046
00047
00048
00049 namespace OSDL
00050 {
00051
00052
00053 namespace Video
00054 {
00055
00056
00057
00059 #if ! defined(OSDL_USES_SDL) || OSDL_USES_SDL
00060
00061 typedef ::SDL_Overlay LowLevelOverlay ;
00062
00063 #else // OSDL_USES_SDL
00064
00065 struct LowLevelOverlay {} ;
00066
00067 #endif // OSDL_USES_SDL
00068
00069
00070
00071
00073 class OSDL_DLL OverlayException: public VideoException
00074 {
00075
00076 public:
00077
00078 OverlayException( const std::string & message ) ;
00079 virtual ~OverlayException() throw() ;
00080
00081 } ;
00082
00083
00084
00085
00109 class OSDL_DLL Overlay: public Ceylan::Lockable
00110 {
00111
00112
00113 public:
00114
00115
00116
00130 enum EncodingFormat { YV12, IYUV, YUY2,UYVY, YVYU } ;
00131
00132
00133
00151 Overlay( Length width, Length height, EncodingFormat format ) ;
00152
00153
00154
00156 virtual ~Overlay() throw() ;
00157
00158
00159
00173 virtual void blit( Coordinate x, Coordinate y ) const ;
00174
00175
00176
00183 virtual void blit() const ;
00184
00185
00186
00200 virtual bool mustBeLocked() const ;
00201
00202
00203
00215 virtual const std::string toString(
00216 Ceylan::VerbosityLevels level = Ceylan::high ) const ;
00217
00218
00219
00220
00221 protected:
00222
00223
00224
00234 virtual void preUnlock() ;
00235
00236
00237
00247 virtual void postLock() ;
00248
00249
00250
00252 LowLevelOverlay * _overlay ;
00253
00254
00256 Length _width ;
00257
00258
00260 Length _height ;
00261
00262
00263
00264
00265 private:
00266
00267
00268
00277 Overlay( const Overlay & source ) ;
00278
00279
00280
00289 Overlay & operator = ( const Overlay & source ) ;
00290
00291
00292
00293 } ;
00294
00295
00296
00297 }
00298
00299
00300 }
00301
00302
00303
00304 #endif // OSDL_OVERLAY_H_
00305