00001 #ifndef __FBVIDEO_H__
00002 #define __FBVIDEO_H__
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
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00043 #include <kaydaradef.h>
00044 #ifndef FBSDK_DLL
00045
00048 #define FBSDK_DLL K_DLLIMPORT
00049 #endif
00050
00051 #include <fbsdk/fbcomponent.h>
00052 #include <fbsdk/fbcore.h>
00053
00054 #ifdef FBSDKUseNamespace
00055 namespace FBSDKNamespace {
00056 #endif
00057
00058 FB_DEFINE_COMPONENT( FBSDK_DLL, Video );
00059 FB_DEFINE_COMPONENT( FBSDK_DLL, VideoIn );
00060 FB_DEFINE_COMPONENT( FBSDK_DLL, VideoOut );
00061 FB_DEFINE_COMPONENT( FBSDK_DLL, VideoClip );
00062 FB_DEFINE_COMPONENT( FBSDK_DLL, VideoClipImage );
00063 FB_DEFINE_COMPONENT( FBSDK_DLL, VideoSwitcher );
00064
00069 #define FBVideoDeclare( ClassName, Parent ) \
00070 FBClassDeclare( ClassName,Parent ); \
00071 public: \
00072 ClassName(char * pName):Parent(pName) { FBClassInit; } \
00073 private:
00074
00078 #define FBVideoImplementation( ThisComponent ) \
00079 FBClassImplementation( ThisComponent )
00080
00082
00084 __FB_FORWARD( FBVideo );
00085 __FB_FORWARD( FBVideoClip );
00086
00088 enum FBVideoProxyMode {
00089 kFBVideoProxyNone,
00090 kFBVideoProxyOnPlay,
00091 kFBVideoProxyAlways
00092 };
00093
00095 enum FBVideoStorageMode {
00096 kFBVideoStorageDisk,
00097 kFBVideoStorageMemory,
00098 kFBVideoStorageDiskAsync
00099 };
00100
00102 enum FBVideoInterlaceMode {
00103 kFBVideoInterlaceNone,
00104 kFBVideoInterlaceHalfFrameEven,
00105 kFBVideoInterlaceHalfFrameOdd,
00106 kFBVideoInterlaceFullFrameEven,
00107 kFBVideoInterlaceFullFrameOdd
00108 };
00109
00111 enum FBVideoFormat {
00112 kFBVideoFormat_Any,
00113 kFBVideoFormat_Other,
00114 kFBVideoFormat_RGBA_32,
00115 kFBVideoFormat_RGB_24,
00116 kFBVideoFormat_BGRA_32,
00117 kFBVideoFormat_BGR_24,
00118 kFBVideoFormat_BGR_16,
00119 kFBVideoFormat_ABGR_32,
00120 kFBVideoFormat_ARGB_32,
00121 kFBVideoFormat_422
00122 };
00123
00124
00125 FB_DEFINE_ENUM( FBSDK_DLL, VideoProxyMode );
00126 FB_DEFINE_ENUM( FBSDK_DLL, VideoStorageMode );
00127 FB_DEFINE_ENUM( FBSDK_DLL, VideoInterlaceMode );
00128 FB_DEFINE_ENUM( FBSDK_DLL, VideoFormat );
00129
00145 class FBSDK_DLL FBVideo : public FBBox {
00146 __FBClassDeclare( FBVideo,FBBox );
00147 public:
00155 FBVideo(char *pName, HIObject pObject=NULL);
00156 };
00157
00158 class FBSDK_DLL FBVideoClip : public FBVideo {
00159 __FBClassDeclare( FBVideoClip,FBVideo );
00160 public:
00168 FBVideoClip(char *pName, HIObject pObject=NULL);
00169
00170 virtual void FBDelete();
00171
00175 bool IsValid();
00176
00177
00178 FBPropertyString Filename;
00179 FBPropertyString RelativePath;
00180 FBPropertyVideoProxyMode ProxyMode;
00181 FBPropertyVideoStorageMode StorageMode;
00182 FBPropertyInt Width;
00183 FBPropertyInt Height;
00184 FBPropertyInt PowerOfTwoWidth;
00185 FBPropertyInt PowerOfTwoHeight;
00186 FBPropertyVideoInterlaceMode InterlaceMode;
00187 FBPropertyVideoFormat Format;
00188
00189
00190 FBPropertyTime TimeOffset;
00191 FBPropertyInt StartFrame;
00192 FBPropertyInt StopFrame;
00193 FBPropertyDouble FPS;
00194 FBPropertyDouble PlaySpeed;
00195 FBPropertyBool FreeRunning;
00196 FBPropertyBool Loop;
00197
00198 FBPropertyTime FrameTime;
00199 FBPropertyInt CurrentFrame;
00200 FBPropertyInt LastFrame;
00201 FBPropertyTime LastFrameTime;
00202 FBPropertyTime CurrentFrameTime;
00203
00211 virtual void DrawImage(int pX = 0, int pY = 0, int pW = -1, int pH = -1, int pFrame = -1);
00212
00217 virtual unsigned char* GetImage(int pFrame = -1 );
00218
00222 virtual unsigned char* GetPowerOfTwoImage();
00223
00227 int GetTextureID();
00228 };
00229
00230 __FB_FORWARD( FBVideoClipImage );
00231
00232 class FBSDK_DLL FBVideoClipImage : public FBVideoClip {
00233 __FBClassDeclare( FBVideoClipImage,FBVideoClip );
00234 public:
00239 FBVideoClipImage(char *pName, HIObject pObject=NULL);
00240
00241 FBPropertyBool ImageSequence;
00242 };
00243
00245
00247 __FB_FORWARD( FBVideoMemory );
00248
00250 class FBSDK_DLL FBVideoMemory : public FBVideo {
00251 __FBClassDeclare( FBVideoMemory,FBVideo );
00252 public:
00257 FBVideoMemory(char *pName, HIObject pObject=NULL);
00258
00263 virtual void SetObjectImageSize(int pW,int pH);
00264
00265 FBPropertyInt TextureOGLId;
00266 };
00267
00269
00271 __FB_FORWARD( FBVideoIn );
00272
00274 enum FBVideoLiveType {
00275 kFBVideoLiveDefault,
00276 kFBVideoLiveBasic
00277 };
00278
00280 class FBSDK_DLL FBVideoIn : public FBVideo {
00281 __FBClassDeclare( FBVideoIn, FBVideo );
00282 public:
00286 FBVideoIn(HIObject pObject=NULL);
00287
00288 FBPropertyBool Online;
00289 FBPropertyBool Recording;
00290 FBPropertyBool RecordAudio;
00291 FBPropertyString FilePath;
00292
00297 virtual bool LiveSetCompressor(int pCompressorIndex);
00298
00302 virtual int LiveGetCompressor();
00303
00307 virtual int LiveGetCompressorCount();
00308
00312 virtual char* LiveGetCompressorName(int pCompressorIndex);
00313
00317 virtual void LiveSetResolutionFR(int pIndex);
00318
00322 virtual int LiveGetResolutionFR();
00323
00327 virtual int LiveGetResolutionFRCount();
00328
00333 virtual char* LiveGetResolutionFRName(int pIndex);
00334
00338 virtual FBVideoLiveType LiveGetType();
00339 };
00340
00342
00344 __FB_FORWARD( FBVideoOut );
00345
00347 class FBSDK_DLL FBVideoOut : public FBVideo {
00348 __FBClassDeclare( FBVideoOut, FBVideo );
00349 public:
00353 FBVideoOut(HIObject pObject=NULL);
00354 };
00355
00356
00358
00360 __FB_FORWARD( FBVideoSwitcher );
00361 __FB_FORWARD( FBEventVideoSwitcher );
00362
00364 enum FBClipEnd {
00365 kFBClipEndEnd,
00366 kFBClipEndLoop
00367 };
00369 enum FBPlayMode {
00370 kFBPlayModeNoPlay,
00371 kFBPlayModePreviewToEnd,
00372 kFBPlayModePlay,
00373 kFBPlayModeLoop,
00374 kFBPlayModePlayToEnd
00375 };
00376
00377 FB_DEFINE_ENUM( FBSDK_DLL, ClipEnd );
00378 FB_DEFINE_ENUM( FBSDK_DLL, PlayMode );
00379
00381 class FBSDK_DLL FBEventVideoSwitcher : public FBEvent
00382 {
00383 public:
00387 FBEventVideoSwitcher( HKEventBase pEvent );
00388
00389 FBPropertyVideoSwitcher VideoSwitcher;
00390 FBPropertykReference Reference;
00391 FBPropertyClipEnd EndType;
00392 };
00393
00395 class FBSDK_DLL FBVideoSwitcher : public FBVideo
00396 {
00397 __FBClassDeclare( FBVideoSwitcher, FBVideo );
00398 public:
00403 FBVideoSwitcher( char* pName = NULL, HIObject pObject = NULL );
00404
00407 virtual void ResetVideoSwitcher();
00410 virtual void FinishCurrentVideo();
00413 virtual void PrepareNextFrame();
00417 virtual void SwapCurrent( HFBVideo pVideo );
00422 virtual void SetNextClip( HFBVideo pVideo, FBPlayMode pMode );
00423
00426 virtual bool IsSDKSwitcher();
00427
00428 FBPropertyInt CurrentFrame;
00429 FBPropertyPlayMode PlayMode;
00430 FBPropertyTime TimeRemaining;
00431
00432 FBPropertyVideo CurrentVideo;
00433 FBPropertyEvent OnClipEnd;
00434 FBPropertyDevice DeviceOwner;
00435 FBPropertyBool UsingSystemTime;
00436 };
00437
00439
00442 class FBSDK_DLL FBPropertyListVideoClip : public FBPropertyListComponent
00443 {
00444 public:
00445 FBPropertyListVideoClip();
00450 FBVideoClip* operator[](int pIndex);
00451 };
00452
00454
00457 class FBSDK_DLL FBPropertyListVideoIn : public FBPropertyListComponent
00458 {
00459 public:
00460 FBPropertyListVideoIn();
00465 FBVideoIn* operator[](int pIndex);
00466 };
00467
00469
00472 class FBSDK_DLL FBPropertyListVideoOut : public FBPropertyListComponent
00473 {
00474 public:
00475 FBPropertyListVideoOut();
00480 FBVideoOut* operator[](int pIndex);
00481 };
00482
00483 #ifdef FBSDKUseNamespace
00484 }
00485 #endif
00486 #endif