Open Reality Reference Guide
fbvideograbber.h
Go to the documentation of this file.
1 #ifndef __FBVIDEOGRABBER_H__
2 #define __FBVIDEOGRABBER_H__
3 /**************************************************************************
4  Copyright (c) 1994 - 2009 Autodesk, Inc. and/or its licensors.
5  All Rights Reserved.
6 
7  The coded instructions, statements, computer programs, and/or related
8  material (collectively the "Data") in these files contain unpublished
9  information proprietary to Autodesk, Inc. and/or its licensors, which is
10  protected by Canada and United States of America federal copyright law
11  and by international treaties.
12 
13  The Data may not be disclosed or distributed to third parties, in whole
14  or in part, without the prior written consent of Autodesk, Inc.
15  ("Autodesk").
16 
17  THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
18  ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO
19  WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR
20  ARISING BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES
21  OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
22  PURPOSE OR USE. WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT
23  WARRANT THAT THE OPERATION OF THE DATA WILL BE UNINTERRUPTED OR ERROR
24  FREE.
25 
26  IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS
27  OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR
28  EXPENSES OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE
29  DAMAGES OR OTHER SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS
30  OF PROFITS, REVENUE OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR
31  DAMAGES OF ANY KIND), HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF
32  LIABILITY, WHETHER DERIVED FROM CONTRACT, TORT (INCLUDING, BUT NOT
33  LIMITED TO, NEGLIGENCE), OR OTHERWISE, ARISING OUT OF OR RELATING TO THE
34  DATA OR ITS USE OR ANY OTHER PERFORMANCE, WHETHER OR NOT AUTODESK HAS
35  BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.
36 
37 **************************************************************************/
38 
43 #include <kaydaradef.h>
44 #ifndef FBSDK_DLL
48  #define FBSDK_DLL K_DLLIMPORT
49 #endif
50 
51 #include <fbsdk/fbcomponent.h>
52 #include <fbsdk/fbaudiofmt.h>
53 #include <fbsdk/fbimage.h>
54 #include <fbsdk/fbcamera.h>
55 #include <fbsdk/fbrenderer.h>
56 
57 #ifdef FBSDKUseNamespace
58  namespace FBSDKNamespace {
59 #endif
60 
62 FB_DEFINE_COMPONENT( FBSDK_DLL, VideoGrabber );
63 
71 };
80 };
86 };
93 };
94 
99 {
102  FBCameraResolutionMode mCameraResolution;
120 };
121 
126 {
133 };
134 
139 {
140  //--- Open Reality declaration.
142  public:
143 
147  FBVideoGrabber(HIObject pObject=NULL);
148 
149  //--- Grabbing options management
154 
159 
163  void ResetOptions();
164 
165  //--- Rendering functions setup
172  void SetRefreshViewFunc(void* pThis, void(*pCallbackFuncPtr)(void*));
173 
180  void SetPostRenderFrameCallback(void* pThis, void(*pCallbackFuncPtr)(void*));
181 
182  //--- Grabbing control
188  bool BeginGrab();
189 
193  void Grab();
194 
198  void EndGrab();
199 
213  FBImage* 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);
214 
215  //--- Grabbing statistics query
220 
221  //--- Errors management
225  const char* GetLastErrorMsg();
226 };
227 
228 
229 #ifdef FBSDKUseNamespace
230  }
231 #endif
232 #endif /* this must be the last line of this file */
MotionBuilder SDK base class.
Definition: fbcomponent.h:651
Image class.
Definition: fbimage.h:105
Basic string class.
Definition: fbstring.h:67
Time data structure.
Definition: fbtime.h:88
TimeSpan class.
Definition: fbtime.h:384
Video Grabber class.
FBVideoGrabStats GetStatistics()
GetStatistics.
bool BeginGrab()
BeginGrab.
const char * GetLastErrorMsg()
GetLastErrorMsg.
void SetRefreshViewFunc(void *pThis, void(*pCallbackFuncPtr)(void *))
SetRefreshViewFunc.
FBVideoGrabOptions GetOptions()
GetOptions give you a copy of current grabbing options.
FBImage * 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)
Render a snapshot of the actual display.
void SetPostRenderFrameCallback(void *pThis, void(*pCallbackFuncPtr)(void *))
SetPostRenderFrameCallback.
void Grab()
Grab.
void EndGrab()
EndGrab.
FBVideoGrabber(HIObject pObject=NULL)
Constructor.
void SetOptions(FBVideoGrabOptions *pOptions)
SetOptions.
void ResetOptions()
SetDefaultOptions.
Audio formats definition.
int FBAudioFmt
Definition: fbaudiofmt.h:56
Basic class definitions.
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:131
FB_DEFINE_COMPONENT(K_DLLIMPORT, AnimationNode)
Animation node class.
Image interface for FBSDK.
Rendering engine.
FBStereoDisplayMode
Definition: fbrenderer.h:93
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
FBVideoRenderFieldMode
Enum FBVideoRenderFieldMode.
@ FBFieldModeHalfField0
Half Field 0.
@ FBFieldModeField1
Field 1.
@ FBFieldModeField0
Field 0.
@ FBFieldModeHalfField1
Half Field 1.
@ FBFieldModeNoField
No Field.
@ FBFieldModeCount
Count.
FBAudioOutputLocation
Type of locations where the audio is rendered when rendering a scene using a video format.
@ FBAudioOutputLocationEmbedded
The audio is embedded within the video output file.
@ FBAudioOutputLocationEmbeddedAndStandalone
The audio is embedded within the video output file and is also rendered in a standalone output file.
@ FBAudioOutputLocationStandalone
The audio is rendered in a standalone output file.
@ FBAudioOutputLocationCount
Count.
FBVideoRenderDepth
Enum FBVideoRenderDepth.
@ FBVideoRender24Bits
24 bits
@ FBVideoRender32Bits
32 bits
@ FBVideoRenderDepthCount
Depth Count.
FBVideoRenderViewingMode
Enum FBVideoRenderViewingMode.
@ FBViewingModeCount
Count.
@ FBViewingModeModelsOnly
Model Only.
@ FBViewingModeCurrent
Current.
@ FBViewingModeXRay
X-Ray.
@ FBViewingModeStandard
Standard.
Video Grabbing Options structure.
FBString mAudioCustomStandaloneFileName
Destination for the custom audio standalone file, if mAudioUseCustomStandaloneFileName is set to true...
FBVideoRenderViewingMode mViewingMode
Video grab viewing mode.
bool mShowCameraLabel
If true, display camera label information. NOTE: If you use your own FBView, set also this option in ...
bool mAudioUseCustomStandaloneFileName
If true and if the audio is rendered in a standalone output file, the audio file is generated at the ...
FBTime mTimeSteps
Time step length between each grab.
FBVideoRenderDepth mBitsPerPixel
Video grab color depth.
int mStillImageCompression
Compression ratio for image(jpg) 0-100 where 0=Greatest compression, 100=Least Compression....
bool mShowTimeCode
If true, display time code information. NOTE: If you use your own FBView, set also this option in FBV...
int mRendererCallbackPrefIndex
Specify custom renderer callback's preference index.
FBCameraResolutionMode mCameraResolution
Camera Resolution.
bool mAntiAliasing
If true, video frames will be anti-aliased.
FBString mOutputFileName
Grabbing destination file. When the image files are being rendered, the hash letters (###) specified ...
int mRendererCallbackIndex
Specify renderer callback index. Set to -1 to use MotionBuilder default renderer, or any valid non-ne...
FBStereoDisplayMode mStereoDisplayMode
Video grab stereo display mode. default (kFBStereoDisplayModeCount) to use current viewpane's setting...
FBTimeSpan mTimeSpan
Start and stop selection time to grab.
FBAudioFmt mAudioRenderFormat
Audio render format.
FBAudioOutputLocation mAudioOutputLocation
Audio output location when rendering using a video format (for still image formats & SWF (Flash) form...
FBVideoRenderFieldMode mFieldMode
Video grab field mode.
bool mRenderAudio
If true and there's audio in the scene, render the audio as well.
bool mShowSafeArea
If true, display safe area. NOTE: If you use your own FBView, set also this option in FBViewingOption...
Video Grabbing Statistics structure.
int mTotalFrameCount
Total frame count to grab.
FBTime mEstimatedTimeRemaining
Remaining estimated time to complete grab.
FBTime mTotalTimeElapsed
Current total time elapsed since grabbing has started.
FBTime mEstimatedTime
Estimated time to complete grab.
int mRemainingFrameCount
Remaining frame count to grab.
FBTime mTimePerFrame
Time it took to render and grab previous frame.