Open Reality Reference Guide
 
Loading...
Searching...
No Matches
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
62FB_DEFINE_COMPONENT( FBSDK_DLL, VideoGrabber );
63
71};
80};
86};
93};
94
99{
102 FBCameraResolutionMode mCameraResolution;
116#ifdef _MSC_VER
117 K_DEPRECATED_2024 int mStillImageCompression;
118#else
119 // There is a build break on Linux with the default undeclared constructor.
120 /*K_DEPRECATED_2024*/ int mStillImageCompression;
121#endif
127};
128
133{
140};
141
146{
147 //--- Open Reality declaration.
149 public:
150
154 FBVideoGrabber(HIObject pObject=NULL);
155
156 //--- Grabbing options management
161
166
171
172 //--- Rendering functions setup
179 void SetRefreshViewFunc(void* pThis, void(*pCallbackFuncPtr)(void*));
180
187 void SetPostRenderFrameCallback(void* pThis, void(*pCallbackFuncPtr)(void*));
188
189 //--- Grabbing control
195 bool BeginGrab();
196
200 void Grab();
201
205 void EndGrab();
206
220 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);
221
222 //--- Grabbing statistics query
227
228 //--- Errors management
232 const char* GetLastErrorMsg();
233};
234
235
236#ifdef FBSDKUseNamespace
237 }
238#endif
239#endif /* this must be the last line of this file */
MotionBuilder SDK base class.
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:410
Video Grabber class.
FBVideoGrabStats GetStatistics()
GetStatistics.
bool BeginGrab()
BeginGrab.
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 SetRefreshViewFunc(void *pThis, void(*pCallbackFuncPtr)(void *))
SetRefreshViewFunc.
const char * GetLastErrorMsg()
GetLastErrorMsg.
FBVideoGrabOptions GetOptions()
GetOptions give you a copy of current grabbing options.
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.
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
Image interface for FBSDK.
#define FB_DEFINE_COMPONENT(DllTag, Type)
Define a component and give it the ability to be a property.
Rendering engine.
FBStereoDisplayMode
Definition fbrenderer.h:93
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition fbtypes.h:68
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...
int mStillImageQuality
Quality of the image for image formats that support it. Depends on the image format....
FBVideoRenderViewingMode mViewingMode
Video grab viewing mode.
int mStillImageCompressionType
Compression type of image for image formats that support it. Depends on the image format....
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.
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.