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 };
87 
92 {
110 };
111 
116 {
123 };
124 
129 {
130  //--- Open Reality declaration.
132  public:
133 
137  FBVideoGrabber(HIObject pObject=NULL);
138 
139  //--- Grabbing options management
143  void SetOptions(FBVideoGrabOptions* pOptions);
144 
148  FBVideoGrabOptions GetOptions();
149 
153  void ResetOptions();
154 
155  //--- Rendering functions setup
162  void SetRefreshViewFunc(void* pThis, void(*pCallbackFuncPtr)(void*));
163 
170  void SetPostRenderFrameCallback(void* pThis, void(*pCallbackFuncPtr)(void*));
171 
172  //--- Grabbing control
178  bool BeginGrab();
179 
183  void Grab();
184 
188  void EndGrab();
189 
203  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);
204 
205  //--- Grabbing statistics query
209  FBVideoGrabStats GetStatistics();
210 
211  //--- Errors management
215  const char* GetLastErrorMsg();
216 };
217 
218 
219 #ifdef FBSDKUseNamespace
220  }
221 #endif
222 #endif /* this must be the last line of this file */
FBTime mEstimatedTime
Estimated time to complete grab.
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:132
FBCameraResolutionMode mCameraResolution
Camera Resolution.
int mRendererCallbackPrefIndex
Specify custom renderer callback's preference index.
#define FB_DEFINE_COMPONENT(DllTag, Type)
Define a component and give it the ability to be a property.
Definition: fbproperties.h:139
FBVideoRenderFieldMode mFieldMode
Video grab field mode.
FBVideoRenderViewingMode
Enum FBVideoRenderViewingMode.
FBVideoRenderDepth mBitsPerPixel
Video grab color depth.
FBTime mEstimatedTimeRemaining
Remaining estimated time to complete grab.
Basic string class.
Definition: fbstring.h:66
int mStillImageCompression
Compression ratio for image(jpg) 0-100 where 0=Greatest compression, 100=Least Compression.
int mRemainingFrameCount
Remaining frame count to grab.
int FBAudioFmt
A type definition for FBAudioFmt.
Definition: fbaudiofmt.h:56
#define NULL
Definition: kaydara.h:169
int mRendererCallbackIndex
Specify renderer callback index.
int mTotalFrameCount
Total frame count to grab.
FBTime mTotalTimeElapsed
Current total time elapsed since grabbing has started.
FBTime mTimePerFrame
Time it took to render and grab previous frame.
FBVideoRenderFieldMode
Enum FBVideoRenderFieldMode.
Image class.
Definition: fbimage.h:104
MotionBuilder SDK base class.
Definition: fbcomponent.h:668
FBCameraResolutionMode
Resolution modes.
Definition: fbcamera.h:77
FBString mOutputFileName
Grabbing destination file.
Video Grabbing Statistics structure.
Image interface for FBSDK.
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68
#define FBSDKNamespace
FBSDKNamespace define.
Definition: fbversion.h:64
Audio formats definition.
FBTime mTimeSteps
Time step length between each grab.
bool mShowCameraLabel
If true, display camera label information.
FBAudioFmt mAudioRenderFormat
Audio render format.
Basic class definitions.
Time data structure.
Definition: fbtime.h:86
bool mRenderAudio
If true and there's audio in the scene, add audio to the output file.
FBStereoDisplayMode
Definition: fbrenderer.h:92
bool mShowTimeCode
If true, display time code information.
bool mAntiAliasing
If true, video frames will be anti-aliased.
FBTimeSpan mTimeSpan
Start and stop selection time to grab.
bool mShowSafeArea
If true, display safe area.
TimeSpan class.
Definition: fbtime.h:381
FBVideoRenderViewingMode mViewingMode
Video grab viewing mode.
Video Grabber class.
Video Grabbing Options structure.
FBStereoDisplayMode mStereoDisplayMode
Video grab stereo display mode.
Rendering engine.
FBVideoRenderDepth
Enum FBVideoRenderDepth.
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...