Open Reality Reference Guide
 
Loading...
Searching...
No Matches
fbvideo.h
Go to the documentation of this file.
1#ifndef __FBVIDEO_H__
2#define __FBVIDEO_H__
3/**************************************************************************
4Copyright (c) 1994 - 2009 Autodesk, Inc. and/or its licensors.
5All Rights Reserved.
6
7The coded instructions, statements, computer programs, and/or related
8material (collectively the "Data") in these files contain unpublished
9information proprietary to Autodesk, Inc. and/or its licensors, which is
10protected by Canada and United States of America federal copyright law
11and by international treaties.
12
13The Data may not be disclosed or distributed to third parties, in whole
14or in part, without the prior written consent of Autodesk, Inc.
15("Autodesk").
16
17THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
18ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO
19WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR
20ARISING BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES
21OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
22PURPOSE OR USE. WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT
23WARRANT THAT THE OPERATION OF THE DATA WILL BE UNINTERRUPTED OR ERROR
24FREE.
25
26IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS
27OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR
28EXPENSES OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE
29DAMAGES OR OTHER SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS
30OF PROFITS, REVENUE OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR
31DAMAGES OF ANY KIND), HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF
32LIABILITY, WHETHER DERIVED FROM CONTRACT, TORT (INCLUDING, BUT NOT
33LIMITED TO, NEGLIGENCE), OR OTHERWISE, ARISING OUT OF OR RELATING TO THE
34DATA OR ITS USE OR ANY OTHER PERFORMANCE, WHETHER OR NOT AUTODESK HAS
35BEEN 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/fbcore.h>
53
54#ifdef FBSDKUseNamespace
55namespace FBSDKNamespace {
56#endif
57
60 FB_DEFINE_COMPONENT( FBSDK_DLL, VideoOut );
61 FB_DEFINE_COMPONENT( FBSDK_DLL, VideoClip );
62 FB_DEFINE_COMPONENT( FBSDK_DLL, VideoClipImage );
63 FB_DEFINE_COMPONENT( FBSDK_DLL, VideoClipImageDDS );
64 FB_DEFINE_COMPONENT( FBSDK_DLL, VideoSwitcher );
65
70#define FBVideoDeclare( ClassName, Parent ) \
71 FBClassDeclare( ClassName,Parent ); \
72public: \
73 ClassName(const char* pName):Parent(pName) { FBClassInit; } \
74private:
75
79#define FBVideoImplementation( ThisComponent ) \
80 FBClassImplementation( ThisComponent )
81
83 // FBVideo
87
93 };
94
100 };
101
109 };
110
113 kFBVideoFormat_Any,
114 kFBVideoFormat_Other,
115 kFBVideoFormat_RGBA_32,
116 kFBVideoFormat_RGB_24,
117 kFBVideoFormat_BGRA_32,
118 kFBVideoFormat_BGR_24,
119 kFBVideoFormat_BGR_16,
120 kFBVideoFormat_ABGR_32,
121 kFBVideoFormat_ARGB_32,
122 kFBVideoFormat_422
123 };
124
127 {
128 kFBVideo_RES_FULL = 0,
129 kFBVideo_RES_1,
130 kFBVideo_RES_2,
131 kFBVideo_RES_4,
132 kFBVideo_RES_8,
133 kFBVideo_RES_16,
134 kFBVideo_RES_32,
135 kFBVideo_RES_64,
136 kFBVideo_RES_128,
137 kFBVideo_RES_256,
138 kFBVideo_RES_512,
139 kFBVideo_RES_1K,
140 kFBVideo_RES_2K,
141 kFBVideo_RES_4K,
142 kFBVideo_RES_8K,
143 kFBVideo_RES_16K
144 };
145
146 FB_DEFINE_ENUM( FBSDK_DLL, TimeMode );
147 FB_DEFINE_ENUM( FBSDK_DLL, VideoProxyMode );
148 FB_DEFINE_ENUM( FBSDK_DLL, VideoStorageMode );
149 FB_DEFINE_ENUM( FBSDK_DLL, VideoInterlaceMode );
150 FB_DEFINE_ENUM( FBSDK_DLL, VideoFormat );
151 FB_DEFINE_ENUM( FBSDK_DLL, VideoResolution );
152
154 // FBVideo
156
172 class FBSDK_DLL FBVideo : public FBBox {
174 public:
182 FBVideo(const char* pName, HIObject pObject=NULL);
183
185 };
186
188 // FBVideoClip
190
194 public:
202 FBVideoClip(const char* pName, HIObject pObject=NULL);
203
204 virtual void FBDelete() override;
205
209 bool IsValid();
210
211 //--- Video (generic) properties.
214 FBPropertyVideoProxyMode ProxyMode;
215 FBPropertyVideoStorageMode StorageMode;
220 FBPropertyVideoInterlaceMode InterlaceMode;
221 FBPropertyVideoFormat Format;
222
223 //--- Video (clip) properties
231
237
242
250 virtual void DrawImage(int pX = 0, int pY = 0, int pW = -1, int pH = -1, int pFrame = -1);
251
256 virtual unsigned char* GetImage(int pFrame = -1 );
257
260 virtual void ImageIncUpdateID();
261
265 virtual unsigned char* GetPowerOfTwoImage();
266
271
277 virtual bool GetEmbeddedTimecode( int pFrame, FBTimeCode& pTimeCode );
278 };
279
281 // FBVideoClipImage
284
288 public:
293 FBVideoClipImage(const char* pName, HIObject pObject=NULL);
294
303 FBPropertyVideoResolution MaxMipMapResolution;
304 };
305
307 // FBVideoClipImageDDS
310
314 public:
319 FBVideoClipImageDDS( const char* pName, HIObject pObject = nullptr );
320 };
321
323 // FBVideoMemory
326
337 public:
342 FBVideoMemory(const char* pName, HIObject pObject=NULL);
343
348 virtual void SetObjectImageSize(int pW,int pH);
349
351 };
352
354 // FBVideoIn
357
362 };
363
365 class FBSDK_DLL FBVideoIn : public FBVideo {
367 public:
371 FBVideoIn(HIObject pObject=NULL);
372
377
382 virtual bool LiveSetCompressor(int pCompressorIndex);
383
387 virtual int LiveGetCompressor();
388
393
397 virtual const char* LiveGetCompressorName(int pCompressorIndex);
398
402 virtual void LiveSetResolutionFR(int pIndex);
403
407 virtual int LiveGetResolutionFR();
408
413
418 virtual const char* LiveGetResolutionFRName(int pIndex);
419
424 };
425
427 // FBVideoOut
430
432 class FBSDK_DLL FBVideoOut : public FBVideo {
434 public:
438 FBVideoOut(HIObject pObject=NULL);
440 };
441
442
444 // FBVideoSwitcher
448
450 enum FBClipEnd {
453 };
461 };
462
463 FB_DEFINE_ENUM( FBSDK_DLL, ClipEnd );
464 FB_DEFINE_ENUM( FBSDK_DLL, PlayMode );
465
468 {
469 public:
473 FBEventVideoSwitcher( HKEventBase pEvent );
474
475 FBPropertyVideoSwitcher VideoSwitcher;
477 FBPropertyClipEnd EndType;
478 };
479
482 {
484 public:
489 FBVideoSwitcher( const char* pName = NULL, HIObject pObject = NULL );
490
493 virtual void ResetVideoSwitcher();
496 virtual void FinishCurrentVideo();
499 virtual void PrepareNextFrame();
503 virtual void SwapCurrent( FBVideo* pVideo );
508 virtual void SetNextClip( FBVideo* pVideo, FBPlayMode pMode );
509
512 virtual bool IsSDKSwitcher();
513
515 FBPropertyPlayMode PlayMode;
517
518 FBPropertyVideo CurrentVideo;
520 FBPropertyDevice DeviceOwner;
522 };
523
525 // FBPropertyListVideoClip
529 {
530 public:
537 };
538
540 // FBPropertyListVideoIn
544 {
545 public:
551 FBVideoIn* operator[](int pIndex);
552 };
553
555 // FBPropertyListVideoOut
559 {
560 public:
566 FBVideoOut* operator[](int pIndex);
567 };
568
569#ifdef FBSDKUseNamespace
570}
571#endif
572#endif
A box is a fundamental building block in the application architecture.
Definition fbcore.h:218
Base Event class.
Video switcher callback event.
Definition fbvideo.h:468
FBEventVideoSwitcher(HKEventBase pEvent)
Constructor.
FBPropertykReference Reference
Read Only Property: Data.
Definition fbvideo.h:476
FBPropertyVideoSwitcher VideoSwitcher
Read Only Property: Video switcher.
Definition fbvideo.h:475
FBPropertyClipEnd EndType
Read Only Property: Clip end action.
Definition fbvideo.h:477
PropertyEvent: Base event class.
PropertyList: Concrete class for PropertyList of component
PropertyList: VideoClip
Definition fbvideo.h:529
FBVideoClip * operator[](int pIndex)
Get the video at pIndex.
PropertyList: VideoIn
Definition fbvideo.h:544
FBVideoIn * operator[](int pIndex)
Get the video at pIndex.
PropertyList: VideoOut
Definition fbvideo.h:559
FBVideoOut * operator[](int pIndex)
Get the video at pIndex.
Property class: const char * (String).
TimeCode data structure.
Definition fbtime.h:308
Video clip media class.
Definition fbvideo.h:192
FBPropertyVideoProxyMode ProxyMode
Read Write Property: Proxy mode.
Definition fbvideo.h:214
FBPropertyVideoFormat Format
Read Only Property: Video format.
Definition fbvideo.h:221
FBPropertyInt CurrentFrame
Read Write Property: Current frame.
Definition fbvideo.h:233
FBPropertyTime LastFrameTime
Read Only Property: Time of last frame
Definition fbvideo.h:235
virtual bool GetEmbeddedTimecode(int pFrame, FBTimeCode &pTimeCode)
Get the embedded timecode associated to a video clip frame.
FBPropertyInt Height
Read Only Property: Height of image.
Definition fbvideo.h:217
virtual void FBDelete() override
Open Reality deletion function.
FBPropertyTime FrameTime
Read Only Property: Inverse of FPS, time per frame
Definition fbvideo.h:232
FBPropertyBool Loop
Read Write Property: Loop video clip?
Definition fbvideo.h:230
FBPropertyTime CustomEmbeddedStartTimecode
Read Write Property:The custom timecode of the first frame of the video. To be effective,...
Definition fbvideo.h:241
FBPropertyTime CurrentFrameTimeCode
Read Only Property: Embedded timecode from current frame in clip. Use the method GetEmbeddedTimecode ...
Definition fbvideo.h:238
FBPropertyDouble PlaySpeed
Read Write Property: Playback speed.
Definition fbvideo.h:228
FBPropertyInt StopFrame
Read Write Property: Frame to end video playback at.
Definition fbvideo.h:226
FBPropertyTime TimeOffset
Read Write Property: Temporal offset for beginning of video.
Definition fbvideo.h:224
FBVideoClip(const char *pName, HIObject pObject=NULL)
Constructor.
FBPropertyBool FreeRunning
Read Write Property: Is free Running on?
Definition fbvideo.h:229
FBPropertyString RelativePath
Read Only Property: Relative path of media.
Definition fbvideo.h:213
virtual unsigned char * GetPowerOfTwoImage()
Get the current image buffer resized with width and height power of two.
int GetTextureID()
Get the texture ID.
FBPropertyBool ShowEmbeddedTimecode
Read Write Property: True if the video clip is showing its embedded timecode (real,...
Definition fbvideo.h:239
bool IsValid()
Verifies the validity of the FBVideo object.
FBPropertyVideoStorageMode StorageMode
Read Write Property: Storage mode.
Definition fbvideo.h:215
FBPropertyInt PowerOfTwoHeight
Read Only Property: Closest power of two value superior to height of image.
Definition fbvideo.h:219
FBPropertyInt LastFrame
Read Only Property: Last frame in clip.
Definition fbvideo.h:234
FBPropertyInt PowerOfTwoWidth
Read Only Property: Closest power of two value superior to width of image.
Definition fbvideo.h:218
FBPropertyDouble FrameRate
Read Write Property: Frame rate.
Definition fbvideo.h:227
virtual void DrawImage(int pX=0, int pY=0, int pW=-1, int pH=-1, int pFrame=-1)
Draw a frame of the image to the current view.
FBPropertyString Filename
Read Write Property: Filename of media.
Definition fbvideo.h:212
FBPropertyInt Width
Read Only Property: Width of image.
Definition fbvideo.h:216
FBPropertyInt StartFrame
Read Write Property: Frame to begin video playback from.
Definition fbvideo.h:225
FBPropertyBool UseCustomEmbeddedStartTimecode
Read Write Property: True if the video clip is using the custom embedded start timecode value,...
Definition fbvideo.h:240
virtual void ImageIncUpdateID()
Increase Image update id after modification to trigger internal state refresh.
FBPropertyVideoInterlaceMode InterlaceMode
Read Write Property: Interlace mode.
Definition fbvideo.h:220
FBPropertyTime CurrentFrameTime
Read Write Property: Current time in clip.
Definition fbvideo.h:236
virtual unsigned char * GetImage(int pFrame=-1)
Get the current image buffer.
Video clip image media class for DDS images.
Definition fbvideo.h:312
FBVideoClipImageDDS(const char *pName, HIObject pObject=nullptr)
Constructor.
Video clip image media class. Used for a variety of image types. For DDS images, use the FBVideoClipI...
Definition fbvideo.h:286
FBVideoClipImage(const char *pName, HIObject pObject=NULL)
Constructor.
FBPropertyVideoResolution MaxMipMapResolution
Read Write Property: Maximum MipMap resolution will be loaded into GPU.
Definition fbvideo.h:303
FBPropertyBool ImageSequence
Read Write Property: Clip is an image sequence?
Definition fbvideo.h:301
FBPropertyBool UseSystemFrameRate
Read Write Property: Clip is using system frame rate?
Definition fbvideo.h:302
Video media class.
Definition fbvideo.h:172
FBPropertyBool KeepOnGPU
Read Write Property: Don't auto flush from GPU if true. session runtime flag, won't be saved.
Definition fbvideo.h:184
FBVideo(const char *pName, HIObject pObject=NULL)
Constructor.
Basic video input class, supporting webcam and DV device.
Definition fbvideo.h:365
FBPropertyString FilePath
Read Write Property: Location of the generated movie file after a recording session.
Definition fbvideo.h:376
FBPropertyBool Recording
Read Write Property: If true, the device will record during a recording session.
Definition fbvideo.h:374
virtual const char * LiveGetResolutionFRName(int pIndex)
Get the resolution and frame rate string description at the specified index.
virtual void LiveSetResolutionFR(int pIndex)
Set the current resolution and frame rate for the device.
virtual int LiveGetCompressor()
Get the current compressor index.
virtual bool LiveSetCompressor(int pCompressorIndex)
Set the current compressor to be used when recording.
virtual const char * LiveGetCompressorName(int pCompressorIndex)
Get the compressor name at a particular index.
virtual FBVideoLiveType LiveGetType()
Get the type of the video input device.
FBPropertyBool RecordAudio
Read Write Property: If true, the device will also record audio during a recording session.
Definition fbvideo.h:375
virtual int LiveGetResolutionFRCount()
Get the number of resolution and frame rate available for the device.
virtual int LiveGetResolutionFR()
Get the current resolution and frame rate index.
FBVideoIn(HIObject pObject=NULL)
Constructor.
virtual int LiveGetCompressorCount()
Get the compressor count.
FBPropertyBool Online
Read Write Property: If true, the device is online and will display the current video feed.
Definition fbvideo.h:373
FBVideoMemory allow external media source (which can't be supported by MoBu natively)
Definition fbvideo.h:335
virtual void SetObjectImageSize(int pW, int pH)
Set image size to allow MoBu preview texture with proper dimension / aspect.
FBVideoMemory(const char *pName, HIObject pObject=NULL)
Constructor.
FBPropertyInt TextureOGLId
Read Write Property: OpenGL texture buffer object id (GL_TEXTURE_2D type).
Definition fbvideo.h:350
Video media class.
Definition fbvideo.h:432
FBVideoOut(HIObject pObject=NULL)
Constructor.
FBPropertyBool Online
Read Write Property: If true, the device is online and will output display.
Definition fbvideo.h:439
Video Switcher class.
Definition fbvideo.h:482
FBPropertyInt CurrentFrame
Read Write Property: Current frame.
Definition fbvideo.h:514
virtual void PrepareNextFrame()
Prepare the next frame.
virtual void SwapCurrent(FBVideo *pVideo)
Swap the current video.
virtual void ResetVideoSwitcher()
Reset the video switcher (clear all clips).
FBPropertyEvent OnClipEnd
Event: Clip end event.
Definition fbvideo.h:519
FBPropertyVideo CurrentVideo
Read Only Property: Current video.
Definition fbvideo.h:518
FBVideoSwitcher(const char *pName=NULL, HIObject pObject=NULL)
Constructor.
FBPropertyPlayMode PlayMode
Read Write Property: Current play mode.
Definition fbvideo.h:515
FBPropertyDevice DeviceOwner
Read Write Property: Hook onto owner device.
Definition fbvideo.h:520
virtual void FinishCurrentVideo()
Finish the current video.
virtual void SetNextClip(FBVideo *pVideo, FBPlayMode pMode)
Set the next clip.
FBPropertyBool UsingSystemTime
Read Write Property: Using the system time?
Definition fbvideo.h:521
FBPropertyTime TimeRemaining
Read Only Property: Time remaining.
Definition fbvideo.h:516
Basic class definitions.
#define __FBClassDeclare(Name, Parent)
For internal use only.
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
Contains definitions for devices, boxes and models.
class K_DLLIMPORT FBPropertyBase< kReference, kFBPT_kReference > FBPropertykReference
Property: kReference
class K_DLLIMPORT FBPropertyBase< int, kFBPT_int > FBPropertyInt
Property: int
class K_DLLIMPORT FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool
class K_DLLIMPORT FBPropertyBase< FBTime, kFBPT_Time > FBPropertyTime
Property: FBTime
#define FB_DEFINE_COMPONENT(DllTag, Type)
Define a component and give it the ability to be a property.
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
class K_DLLIMPORT FBPropertyBase< double, kFBPT_double > FBPropertyDouble
Property: double
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition fbtypes.h:68
FBVideoInterlaceMode
Video interlace modes.
Definition fbvideo.h:103
@ kFBVideoInterlaceHalfFrameOdd
Half frame (odd field).
Definition fbvideo.h:106
@ kFBVideoInterlaceNone
No interacling.
Definition fbvideo.h:104
@ kFBVideoInterlaceFullFrameEven
Full frame (even field).
Definition fbvideo.h:107
@ kFBVideoInterlaceFullFrameOdd
Full frame (odd field).
Definition fbvideo.h:108
@ kFBVideoInterlaceHalfFrameEven
Half frame (even field).
Definition fbvideo.h:105
FBClipEnd
Clip end actions.
Definition fbvideo.h:450
@ kFBClipEndLoop
On clip end loop clip.
Definition fbvideo.h:452
@ kFBClipEndEnd
On clip end stop clip.
Definition fbvideo.h:451
FBPlayMode
Play modes.
Definition fbvideo.h:455
@ kFBPlayModeNoPlay
No play (most common).
Definition fbvideo.h:456
@ kFBPlayModePlayToEnd
Play clip to end.
Definition fbvideo.h:460
@ kFBPlayModeLoop
Loop clip.
Definition fbvideo.h:459
@ kFBPlayModePreviewToEnd
Preview clip until end.
Definition fbvideo.h:457
@ kFBPlayModePlay
Play clip.
Definition fbvideo.h:458
FBVideoProxyMode
Video proxy modes.
Definition fbvideo.h:89
@ kFBVideoProxyOnPlay
Video proxy on play.
Definition fbvideo.h:91
@ kFBVideoProxyAlways
Always video proxy.
Definition fbvideo.h:92
@ kFBVideoProxyNone
No video proxy.
Definition fbvideo.h:90
FBVideoStorageMode
Video storage modes.
Definition fbvideo.h:96
@ kFBVideoStorageDiskAsync
Storage on disk async access.
Definition fbvideo.h:99
@ kFBVideoStorageDisk
Storage on disk.
Definition fbvideo.h:97
@ kFBVideoStorageMemory
Storage in memory.
Definition fbvideo.h:98
FBVideoLiveType
Video Live type.
Definition fbvideo.h:359
@ kFBVideoLiveDefault
Generic video input, type not specified.
Definition fbvideo.h:360
@ kFBVideoLiveBasic
Basic video input, like webcam and dv camera.
Definition fbvideo.h:361
FBVideoFormat
Video color modes.
Definition fbvideo.h:112
FBVideoResolution
Video Resolution (1D)
Definition fbvideo.h:127