Go to the
documentation of this file.
00001 #ifndef __FBVIDEOGRABBER_H__
00002 #define __FBVIDEOGRABBER_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/fbaudiofmt.h>
00053 #include <fbsdk/fbimage.h>
00054 #include <fbsdk/fbrenderer.h>
00055
00056 #ifdef FBSDKUseNamespace
00057 namespace FBSDKNamespace {
00058 #endif
00059
00060 __FB_FORWARD( FBVideoGrabber );
00061 FB_DEFINE_COMPONENT( FBSDK_DLL, VideoGrabber );
00062
00064 enum FBVideoRenderViewingMode {
00065 FBViewingModeStandard,
00066 FBViewingModeModelsOnly,
00067 FBViewingModeXRay,
00068 FBViewingModeCurrent,
00069 FBViewingModeCount
00070 };
00072 enum FBVideoRenderFieldMode {
00073 FBFieldModeNoField,
00074 FBFieldModeField0,
00075 FBFieldModeField1,
00076 FBFieldModeHalfField0,
00077 FBFieldModeHalfField1,
00078 FBFieldModeCount
00079 };
00081 enum FBVideoRenderDepth {
00082 FBVideoRender24Bits,
00083 FBVideoRender32Bits,
00084 FBVideoRenderDepthCount
00085 };
00086
00090 struct FBVideoGrabOptions
00091 {
00092 FBTimeSpan mTimeSpan;
00093 FBTime mTimeSteps;
00094 FBCameraResolutionMode mCameraResolution;
00095 FBVideoRenderDepth mBitsPerPixel;
00096 FBVideoRenderFieldMode mFieldMode;
00097 FBVideoRenderViewingMode mViewingMode;
00098 FBStereoDisplayMode mStereoDisplayMode;
00099 FBString mOutputFileName;
00100 bool mShowSafeArea;
00101 bool mShowTimeCode;
00102 bool mShowCameraLabel;
00103 bool mAntiAliasing;
00104 bool mRenderAudio;
00105 FBAudioFmt mAudioRenderFormat;
00106 int mStillImageCompression;
00107 };
00109 typedef FBVideoGrabOptions* HFBVideoGrabOptions;
00110
00114 struct FBVideoGrabStats
00115 {
00116 int mTotalFrameCount;
00117 int mRemainingFrameCount;
00118 FBTime mTotalTimeElapsed;
00119 FBTime mEstimatedTime;
00120 FBTime mEstimatedTimeRemaining;
00121 FBTime mTimePerFrame;
00122 };
00123
00127 class FBSDK_DLL FBVideoGrabber : public FBComponent
00128 {
00129
00130 __FBClassDeclare(FBVideoGrabber, FBComponent);
00131 public:
00132
00136 FBVideoGrabber(HIObject pObject=NULL);
00137
00138
00142 void SetOptions(HFBVideoGrabOptions pOptions);
00143
00147 FBVideoGrabOptions GetOptions();
00148
00152 void ResetOptions();
00153
00154
00161 void SetRefreshViewFunc(void* pThis, void(*pCallbackFuncPtr)(void*));
00162
00169 void SetPostRenderFrameCallback(void* pThis, void(*pCallbackFuncPtr)(void*));
00170
00171
00177 bool BeginGrab();
00178
00182 void Grab();
00183
00187 void EndGrab();
00188
00202 HFBImage RenderSnapshot(int pWidth=-1, int pHeight=-1, bool pCameraLabel=false, bool pTimeCode=false, bool pSafeArea=false, bool pAxis=false, bool pGrid=false, bool pFrontPlate=false, bool pBackPlate=false);
00203
00204
00208 FBVideoGrabStats GetStatistics();
00209
00210
00214 FBString GetLastErrorMsg();
00215 };
00216
00217
00218 #ifdef FBSDKUseNamespace
00219 }
00220 #endif
00221 #endif