fbsdk/fbvideograbber.h Source File

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 
61 __FB_FORWARD( FBVideoGrabber );
62 FB_DEFINE_COMPONENT( FBSDK_DLL, VideoGrabber );
63 
71 };
80 };
86 };
93 };
94 
99 {
120 };
121 
126 {
133 };
134 
139 {
140  //--- Open Reality declaration.
142  public:
143 
147  FBVideoGrabber(HIObject pObject=NULL);
148 
149  //--- Grabbing options management
153  void SetOptions(FBVideoGrabOptions* pOptions);
154 
158  FBVideoGrabOptions GetOptions();
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
219  FBVideoGrabStats GetStatistics();
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 */
int mRendererCallbackIndex
Specify renderer callback index.
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:132
FBStereoDisplayMode
Definition: fbrenderer.h:92
#define FB_DEFINE_COMPONENT(DllTag, Type)
Define a component and give it the ability to be a property.
Definition: fbproperties.h:139
Time data structure.
Definition: fbtime.h:86
Basic string class.
Definition: fbstring.h:66
FBTime mEstimatedTimeRemaining
Remaining estimated time to complete grab.
FBVideoRenderDepth mBitsPerPixel
Video grab color depth.
int FBAudioFmt
A type definition for FBAudioFmt.
Definition: fbaudiofmt.h:56
FBAudioOutputLocation
Type of locations where the audio is rendered when rendering a scene using a video format...
#define NULL
Definition: kaydara.h:179
int mTotalFrameCount
Total frame count to grab.
Video Grabbing Statistics structure.
int mRendererCallbackPrefIndex
Specify custom renderer callback's preference index.
Image class.
Definition: fbimage.h:104
int mStillImageCompression
Compression ratio for image(jpg) 0-100 where 0=Greatest compression, 100=Least Compression.
FBVideoRenderFieldMode mFieldMode
Video grab field mode.
FBTime mTotalTimeElapsed
Current total time elapsed since grabbing has started.
bool mAudioUseCustomStandaloneFileName
If true and if the audio is rendered in a standalone output file, the audio file is generated at the ...
FBString mOutputFileName
Grabbing destination file.
Image interface for FBSDK.
FBTime mTimeSteps
Time step length between each grab.
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68
FBVideoRenderDepth
Enum FBVideoRenderDepth.
FBTime mTimePerFrame
Time it took to render and grab previous frame.
bool mShowCameraLabel
If true, display camera label information.
TimeSpan class.
Definition: fbtime.h:381
#define FBSDKNamespace
FBSDKNamespace define.
Definition: fbversion.h:64
Audio formats definition.
bool mAntiAliasing
If true, video frames will be anti-aliased.
The audio is embedded within the video output file.
The audio is embedded within the video output file and is also rendered in a standalone output file...
Basic class definitions.
bool mRenderAudio
If true and there's audio in the scene, render the audio as well.
Video Grabber class.
int pWidth
Definition: fbtool.h:209
FBAudioFmt mAudioRenderFormat
Audio render format.
Video Grabbing Options structure.
FBVideoRenderViewingMode mViewingMode
Video grab viewing mode.
FBVideoRenderViewingMode
Enum FBVideoRenderViewingMode.
The audio is rendered in a standalone output file.
MotionBuilder SDK base class.
Definition: fbcomponent.h:664
bool mShowSafeArea
If true, display safe area.
FBTimeSpan mTimeSpan
Start and stop selection time to grab.
FBTime mEstimatedTime
Estimated time to complete grab.
FBVideoRenderFieldMode
Enum FBVideoRenderFieldMode.
int int pHeight
Definition: fbtool.h:209
FBStereoDisplayMode mStereoDisplayMode
Video grab stereo display mode.
FBCameraResolutionMode
Resolution modes.
Definition: fbcamera.h:77
bool mShowTimeCode
If true, display time code information.
FBString mAudioCustomStandaloneFileName
Destination for the custom audio standalone file, if mAudioUseCustomStandaloneFileName is set to true...
int mRemainingFrameCount
Remaining frame count to grab.
FBCameraResolutionMode mCameraResolution
Camera Resolution.
Rendering engine.
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
FBAudioOutputLocation mAudioOutputLocation
Audio output location when rendering using a video format (for still image formats & SWF (Flash) form...