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
45 
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 */
FBVideoRenderDepth
FBVideoRenderDepth
Enum FBVideoRenderDepth.
Definition: fbvideograbber.h:82
FBVideoGrabber::SetRefreshViewFunc
void SetRefreshViewFunc(void *pThis, void(*pCallbackFuncPtr)(void *))
SetRefreshViewFunc.
FBVideoGrabOptions::mTimeSteps
FBTime mTimeSteps
Time step length between each grab.
Definition: fbvideograbber.h:101
fbimage.h
Image interface for FBSDK.
FBVideoGrabOptions::mViewingMode
FBVideoRenderViewingMode mViewingMode
Video grab viewing mode.
Definition: fbvideograbber.h:105
FBAudioFmt
int FBAudioFmt
Definition: fbaudiofmt.h:56
FBVideoGrabber::ResetOptions
void ResetOptions()
SetDefaultOptions.
FBVideoGrabOptions::mShowCameraLabel
bool mShowCameraLabel
If true, display camera label information. NOTE: If you use your own FBView, set also this option in ...
Definition: fbvideograbber.h:112
FBVideoGrabOptions::mRendererCallbackIndex
int mRendererCallbackIndex
Specify renderer callback index. Set to -1 to use MotionBuilder default renderer, or any valid non-ne...
Definition: fbvideograbber.h:107
FBTimeSpan
TimeSpan class.
Definition: fbtime.h:384
FBVideoGrabOptions::mRenderAudio
bool mRenderAudio
If true and there's audio in the scene, render the audio as well.
Definition: fbvideograbber.h:114
FBVideoRenderDepthCount
@ FBVideoRenderDepthCount
Depth Count.
Definition: fbvideograbber.h:85
FBAudioOutputLocationStandalone
@ FBAudioOutputLocationStandalone
The audio is rendered in a standalone output file.
Definition: fbvideograbber.h:90
FBStereoDisplayMode
FBStereoDisplayMode
Definition: fbrenderer.h:93
fbaudiofmt.h
Audio formats definition.
FBVideoGrabber::BeginGrab
bool BeginGrab()
BeginGrab.
FBVideoGrabOptions::mShowSafeArea
bool mShowSafeArea
If true, display safe area. NOTE: If you use your own FBView, set also this option in FBViewingOption...
Definition: fbvideograbber.h:110
FBVideoGrabOptions::mStillImageCompression
int mStillImageCompression
Compression ratio for image(jpg) 0-100 where 0=Greatest compression, 100=Least Compression....
Definition: fbvideograbber.h:116
FBVideoGrabOptions::mShowTimeCode
bool mShowTimeCode
If true, display time code information. NOTE: If you use your own FBView, set also this option in FBV...
Definition: fbvideograbber.h:111
FBVideoGrabOptions::mAudioRenderFormat
FBAudioFmt mAudioRenderFormat
Audio render format.
Definition: fbvideograbber.h:115
FBTime
Time data structure.
Definition: fbtime.h:88
FBFieldModeNoField
@ FBFieldModeNoField
No Field.
Definition: fbvideograbber.h:74
FBAudioOutputLocation
FBAudioOutputLocation
Type of locations where the audio is rendered when rendering a scene using a video format.
Definition: fbvideograbber.h:88
FBVideoRenderFieldMode
FBVideoRenderFieldMode
Enum FBVideoRenderFieldMode.
Definition: fbvideograbber.h:73
FBVideoGrabber::Grab
void Grab()
Grab.
FBVideoGrabber::GetLastErrorMsg
const char * GetLastErrorMsg()
GetLastErrorMsg.
FBAudioOutputLocationCount
@ FBAudioOutputLocationCount
Count.
Definition: fbvideograbber.h:92
FBFieldModeHalfField1
@ FBFieldModeHalfField1
Half Field 1.
Definition: fbvideograbber.h:78
FBVideoGrabStats
Video Grabbing Statistics structure.
Definition: fbvideograbber.h:126
FBVideoGrabOptions::mOutputFileName
FBString mOutputFileName
Grabbing destination file. When the image files are being rendered, the hash letters (###) specified ...
Definition: fbvideograbber.h:109
FBVideoGrabber::EndGrab
void EndGrab()
EndGrab.
FBVideoGrabStats::mRemainingFrameCount
int mRemainingFrameCount
Remaining frame count to grab.
Definition: fbvideograbber.h:128
FBVideoGrabOptions::mAudioOutputLocation
FBAudioOutputLocation mAudioOutputLocation
Audio output location when rendering using a video format (for still image formats & SWF (Flash) form...
Definition: fbvideograbber.h:117
FBString
Basic string class.
Definition: fbstring.h:67
FBVideoGrabStats::mEstimatedTime
FBTime mEstimatedTime
Estimated time to complete grab.
Definition: fbvideograbber.h:130
__FBClassDeclare
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:131
FBVideoRender24Bits
@ FBVideoRender24Bits
24 bits
Definition: fbvideograbber.h:83
FBFieldModeField0
@ FBFieldModeField0
Field 0.
Definition: fbvideograbber.h:75
FBVideoGrabber::FBVideoGrabber
FBVideoGrabber(HIObject pObject=NULL)
Constructor.
FBVideoRender32Bits
@ FBVideoRender32Bits
32 bits
Definition: fbvideograbber.h:84
__FB_FORWARD
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68
fbrenderer.h
Rendering engine.
FBVideoGrabber::RenderSnapshot
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.
FBVideoGrabOptions::mAudioCustomStandaloneFileName
FBString mAudioCustomStandaloneFileName
Destination for the custom audio standalone file, if mAudioUseCustomStandaloneFileName is set to true...
Definition: fbvideograbber.h:119
FBVideoGrabber
Video Grabber class.
Definition: fbvideograbber.h:139
FBSDK_DLL
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
Definition: fbvideograbber.h:48
FBVideoGrabber::SetOptions
void SetOptions(FBVideoGrabOptions *pOptions)
SetOptions.
FBViewingModeXRay
@ FBViewingModeXRay
X-Ray.
Definition: fbvideograbber.h:68
FBViewingModeModelsOnly
@ FBViewingModeModelsOnly
Model Only.
Definition: fbvideograbber.h:67
FBVideoGrabStats::mTimePerFrame
FBTime mTimePerFrame
Time it took to render and grab previous frame.
Definition: fbvideograbber.h:132
FBViewingModeCurrent
@ FBViewingModeCurrent
Current.
Definition: fbvideograbber.h:69
FBVideoGrabber::SetPostRenderFrameCallback
void SetPostRenderFrameCallback(void *pThis, void(*pCallbackFuncPtr)(void *))
SetPostRenderFrameCallback.
FBViewingModeStandard
@ FBViewingModeStandard
Standard.
Definition: fbvideograbber.h:66
fbcomponent.h
Basic class definitions.
FBVideoGrabOptions::mBitsPerPixel
FBVideoRenderDepth mBitsPerPixel
Video grab color depth.
Definition: fbvideograbber.h:103
FBFieldModeCount
@ FBFieldModeCount
Count.
Definition: fbvideograbber.h:79
FBVideoGrabOptions::mCameraResolution
FBCameraResolutionMode mCameraResolution
Camera Resolution.
Definition: fbvideograbber.h:102
FBViewingModeCount
@ FBViewingModeCount
Count.
Definition: fbvideograbber.h:70
FBVideoGrabber::GetOptions
FBVideoGrabOptions GetOptions()
GetOptions give you a copy of current grabbing options.
FBVideoGrabOptions::mRendererCallbackPrefIndex
int mRendererCallbackPrefIndex
Specify custom renderer callback's preference index.
Definition: fbvideograbber.h:108
FBVideoGrabStats::mTotalTimeElapsed
FBTime mTotalTimeElapsed
Current total time elapsed since grabbing has started.
Definition: fbvideograbber.h:129
FBVideoGrabOptions::mAntiAliasing
bool mAntiAliasing
If true, video frames will be anti-aliased.
Definition: fbvideograbber.h:113
FBFieldModeHalfField0
@ FBFieldModeHalfField0
Half Field 0.
Definition: fbvideograbber.h:77
FB_DEFINE_COMPONENT
FB_DEFINE_COMPONENT(K_DLLIMPORT, AnimationNode)
Animation node class.
FBVideoGrabOptions::mFieldMode
FBVideoRenderFieldMode mFieldMode
Video grab field mode.
Definition: fbvideograbber.h:104
FBFieldModeField1
@ FBFieldModeField1
Field 1.
Definition: fbvideograbber.h:76
FBAudioOutputLocationEmbeddedAndStandalone
@ FBAudioOutputLocationEmbeddedAndStandalone
The audio is embedded within the video output file and is also rendered in a standalone output file.
Definition: fbvideograbber.h:91
FBImage
Image class.
Definition: fbimage.h:105
FBVideoGrabOptions::mStereoDisplayMode
FBStereoDisplayMode mStereoDisplayMode
Video grab stereo display mode. default (kFBStereoDisplayModeCount) to use current viewpane's setting...
Definition: fbvideograbber.h:106
FBComponent
MotionBuilder SDK base class.
Definition: fbcomponent.h:651
FBVideoGrabber::GetStatistics
FBVideoGrabStats GetStatistics()
GetStatistics.
FBVideoGrabStats::mTotalFrameCount
int mTotalFrameCount
Total frame count to grab.
Definition: fbvideograbber.h:127
FBVideoGrabStats::mEstimatedTimeRemaining
FBTime mEstimatedTimeRemaining
Remaining estimated time to complete grab.
Definition: fbvideograbber.h:131
FBVideoGrabOptions::mAudioUseCustomStandaloneFileName
bool mAudioUseCustomStandaloneFileName
If true and if the audio is rendered in a standalone output file, the audio file is generated at the ...
Definition: fbvideograbber.h:118
FBAudioOutputLocationEmbedded
@ FBAudioOutputLocationEmbedded
The audio is embedded within the video output file.
Definition: fbvideograbber.h:89
FBVideoGrabOptions::mTimeSpan
FBTimeSpan mTimeSpan
Start and stop selection time to grab.
Definition: fbvideograbber.h:100
FBVideoRenderViewingMode
FBVideoRenderViewingMode
Enum FBVideoRenderViewingMode.
Definition: fbvideograbber.h:65
FBVideoGrabOptions
Video Grabbing Options structure.
Definition: fbvideograbber.h:99