fbsdk/fbvideo.h Source File

fbvideo.h
Go to the documentation of this file.
1 #ifndef __FBVIDEO_H__
2 #define __FBVIDEO_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/fbcore.h>
53 
54 #ifdef FBSDKUseNamespace
55 namespace FBSDKNamespace {
56 #endif
57 
62  FB_DEFINE_COMPONENT( FBSDK_DLL, VideoClipImage );
63  FB_DEFINE_COMPONENT( FBSDK_DLL, VideoSwitcher );
64 
69 #define FBVideoDeclare( ClassName, Parent ) \
70  FBClassDeclare( ClassName,Parent ); \
71 public: \
72  ClassName(const char* pName):Parent(pName) { FBClassInit; } \
73 private:
74 
78 #define FBVideoImplementation( ThisComponent ) \
79  FBClassImplementation( ThisComponent )
80 
82  // FBVideo
84  __FB_FORWARD( FBVideo );
85  __FB_FORWARD( FBVideoClip );
86 
92  };
93 
99  };
100 
108  };
109 
122  };
123 
126  {
143  };
144 
145  FB_DEFINE_ENUM( FBSDK_DLL, TimeMode );
146  FB_DEFINE_ENUM( FBSDK_DLL, VideoProxyMode );
147  FB_DEFINE_ENUM( FBSDK_DLL, VideoStorageMode );
148  FB_DEFINE_ENUM( FBSDK_DLL, VideoInterlaceMode );
149  FB_DEFINE_ENUM( FBSDK_DLL, VideoFormat );
150  FB_DEFINE_ENUM( FBSDK_DLL, VideoResolution );
151 
167  class FBSDK_DLL FBVideo : public FBBox {
169  public:
177  FBVideo(const char* pName, HIObject pObject=NULL);
178 
180  };
181 
182  class FBSDK_DLL FBVideoClip : public FBVideo {
184  public:
192  FBVideoClip(const char* pName, HIObject pObject=NULL);
193 
194  virtual void FBDelete();
195 
199  bool IsValid();
200 
201  //--- Video (generic) properties.
212 
213  //--- Video (clip) properties
221 
227 
229 
237  virtual void DrawImage(int pX = 0, int pY = 0, int pW = -1, int pH = -1, int pFrame = -1);
238 
243  virtual unsigned char* GetImage(int pFrame = -1 );
244 
247  virtual void ImageIncUpdateID();
248 
252  virtual unsigned char* GetPowerOfTwoImage();
253 
257  int GetTextureID();
258 
264  virtual bool GetEmbeddedTimecode( int pFrame, FBTimeCode& pTimeCode );
265  };
266 
268 
271  public:
276  FBVideoClipImage(const char* pName, HIObject pObject=NULL);
277 
287  };
288 
290  // FBVideoMemory
293 
302  class FBSDK_DLL FBVideoMemory : public FBVideo {
304  public:
309  FBVideoMemory(const char* pName, HIObject pObject=NULL);
310 
315  virtual void SetObjectImageSize(int pW,int pH);
316 
318  };
319 
321  // FBVideoIn
324 
329  };
330 
332  class FBSDK_DLL FBVideoIn : public FBVideo {
334  public:
338  FBVideoIn(HIObject pObject=NULL);
339 
344 
349  virtual bool LiveSetCompressor(int pCompressorIndex);
350 
354  virtual int LiveGetCompressor();
355 
359  virtual int LiveGetCompressorCount();
360 
364  virtual const char* LiveGetCompressorName(int pCompressorIndex);
365 
369  virtual void LiveSetResolutionFR(int pIndex);
370 
374  virtual int LiveGetResolutionFR();
375 
379  virtual int LiveGetResolutionFRCount();
380 
385  virtual const char* LiveGetResolutionFRName(int pIndex);
386 
390  virtual FBVideoLiveType LiveGetType();
391  };
392 
394  // FBVideoOut
397 
399  class FBSDK_DLL FBVideoOut : public FBVideo {
401  public:
405  FBVideoOut(HIObject pObject=NULL);
407  };
408 
409 
411  // FBVideoSwitcher
415 
417  enum FBClipEnd {
420  };
422  enum FBPlayMode {
428  };
429 
431  FB_DEFINE_ENUM( FBSDK_DLL, PlayMode );
432 
435  {
436  public:
441 
445  };
446 
449  {
451  public:
456  FBVideoSwitcher( const char* pName = NULL, HIObject pObject = NULL );
457 
460  virtual void ResetVideoSwitcher();
463  virtual void FinishCurrentVideo();
466  virtual void PrepareNextFrame();
470  virtual void SwapCurrent( FBVideo* pVideo );
475  virtual void SetNextClip( FBVideo* pVideo, FBPlayMode pMode );
476 
479  virtual bool IsSDKSwitcher();
480 
484 
489  };
490 
492  // FBPropertyListVideoClip
496  {
497  public:
503  FBVideoClip* operator[](int pIndex);
504  };
505 
507  // FBPropertyListVideoIn
511  {
512  public:
518  FBVideoIn* operator[](int pIndex);
519  };
520 
522  // FBPropertyListVideoOut
526  {
527  public:
533  FBVideoOut* operator[](int pIndex);
534  };
535 
536 #ifdef FBSDKUseNamespace
537 }
538 #endif
539 #endif
class FBPropertyBase< kReference, kFBPT_kReference > FBPropertykReference
Property: kReference
PropertyEvent: Base event class.
Definition: fbproperties.h:507
FBPropertyTime CurrentFrameTimeCode
Read Only Property: Embedded timecode from current frame in clip.
Definition: fbvideo.h:228
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:132
FBPropertyInt CurrentFrame
Read Write Property: Current frame.
Definition: fbvideo.h:481
class FBPropertyBaseComponent< FBVideoSwitcher * > FBPropertyVideoSwitcher
Definition: fbvideo.h:63
FBPropertyInt Height
Read Only Property: Height of image.
Definition: fbvideo.h:207
FBPropertyDevice DeviceOwner
Read Write Property: Hook onto owner device.
Definition: fbvideo.h:487
class FBPropertyBaseEnum< enum FBVideoProxyMode > FBPropertyVideoProxyMode
Definition: fbvideo.h:146
A box is a fundamental building block in the application architecture.
Definition: fbcore.h:218
FBVideoResolution
Video Resolution (1D)
Definition: fbvideo.h:125
FBPropertyClipEnd EndType
Read Only Property: Clip end action.
Definition: fbvideo.h:444
Full frame (odd field).
Definition: fbvideo.h:107
#define FB_DEFINE_COMPONENT(DllTag, Type)
Define a component and give it the ability to be a property.
Definition: fbproperties.h:139
FBPropertyEvent OnClipEnd
Event: Clip end event.
Definition: fbvideo.h:486
class FBPropertyBaseComponent< FBVideo * > FBPropertyVideo
Definition: fbstory.h:80
FBPropertyTime TimeOffset
Read Write Property: Temporal offset for beginning of video.
Definition: fbvideo.h:214
FBVideoFormat
Video color modes.
Definition: fbvideo.h:111
Property class: const char * (String).
FBPropertyTime FrameTime
Read Only Property: Inverse of FPS, time per frame
Definition: fbvideo.h:222
FBPropertyTime TimeRemaining
Read Only Property: Time remaining.
Definition: fbvideo.h:483
PropertyList: VideoOut
Definition: fbvideo.h:525
Half frame (odd field).
Definition: fbvideo.h:105
Always video proxy.
Definition: fbvideo.h:91
No play (most common).
Definition: fbvideo.h:423
Storage in memory.
Definition: fbvideo.h:97
FBPropertyBool UseSystemFrameRate
Read Write Property: Clip is using system frame rate?
Definition: fbvideo.h:285
FBPropertyInt PowerOfTwoHeight
Read Only Property: Closest power of two value superior to height of image.
Definition: fbvideo.h:209
FBPlayMode
Play modes.
Definition: fbvideo.h:422
FBPropertyVideoStorageMode StorageMode
Read Write Property: Storage mode.
Definition: fbvideo.h:205
#define NULL
Definition: kaydara.h:179
class FBPropertyBase< int, kFBPT_int > FBPropertyInt
Property: int
FBVideoLiveType
Video Live type.
Definition: fbvideo.h:326
FBPropertyVideo CurrentVideo
Read Only Property: Current video.
Definition: fbvideo.h:485
FBPropertyBool Online
Read Write Property: If true, the device is online and will output display.
Definition: fbvideo.h:406
class FBPropertyBaseEnum< enum FBVideoStorageMode > FBPropertyVideoStorageMode
Definition: fbvideo.h:147
FBPropertyBool ImageSequence
Read Write Property: Clip is an image sequence?
Definition: fbvideo.h:284
Contains definitions for devices, boxes and models.
Play clip to end.
Definition: fbvideo.h:427
FBPropertyDouble FrameRate
Read Write Property: Frame rate.
Definition: fbvideo.h:217
Base Event class.
Definition: fbcomponent.h:955
FBClipEnd
Clip end actions.
Definition: fbvideo.h:417
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
Definition: fbproperties.h:148
FBPropertyVideoInterlaceMode InterlaceMode
Read Write Property: Interlace mode.
Definition: fbvideo.h:210
FBPropertykReference Reference
Read Only Property: Data.
Definition: fbvideo.h:443
FBPropertyVideoResolution MaxMipMapResolution
Read Write Property: Maximum MipMap resolution will be loaded into GPU.
Definition: fbvideo.h:286
class FBPropertyBaseComponent< FBDevice * > FBPropertyDevice
Definition: fbcore.h:67
TimeCode data structure.
Definition: fbtime.h:280
FBVideoMemory allow external media source (which can't be supported by MoBu natively) ...
Definition: fbvideo.h:302
FBVideoProxyMode
Video proxy modes.
Definition: fbvideo.h:88
FBPropertyInt StopFrame
Read Write Property: Frame to end video playback at.
Definition: fbvideo.h:216
class FBPropertyBaseEnum< enum FBVideoResolution > FBPropertyVideoResolution
Definition: fbvideo.h:150
PropertyList: VideoClip
Definition: fbvideo.h:495
PropertyList: VideoIn
Definition: fbvideo.h:510
FBPropertyTime CurrentFrameTime
Read Write Property: Current time in clip.
Definition: fbvideo.h:226
FBPropertyVideoProxyMode ProxyMode
Read Write Property: Proxy mode.
Definition: fbvideo.h:204
PropertyList: Concrete class for PropertyList of component
Definition: fbcomponent.h:549
FBPropertyBool Online
Read Write Property: If true, the device is online and will display the current video feed...
Definition: fbvideo.h:340
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
Definition: fbvideo.h:48
FBPropertyInt Width
Read Only Property: Width of image.
Definition: fbvideo.h:206
Storage on disk.
Definition: fbvideo.h:96
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68
FBPropertyBool Recording
Read Write Property: If true, the device will record during a recording session.
Definition: fbvideo.h:341
Video media class.
Definition: fbvideo.h:167
#define FBSDKNamespace
FBSDKNamespace define.
Definition: fbversion.h:64
FBVideoInterlaceMode
Video interlace modes.
Definition: fbvideo.h:102
Video proxy on play.
Definition: fbvideo.h:90
Storage on disk async access.
Definition: fbvideo.h:98
FBPropertyVideoFormat Format
Read Only Property: Video format.
Definition: fbvideo.h:211
Basic class definitions.
FBPropertyDouble PlaySpeed
Read Write Property: Playback speed.
Definition: fbvideo.h:218
FBPropertyBool UsingSystemTime
Read Write Property: Using the system time?
Definition: fbvideo.h:488
KEventBase * HKEventBase
Definition: fbcomponent.h:75
FBPropertyInt PowerOfTwoWidth
Read Only Property: Closest power of two value superior to width of image.
Definition: fbvideo.h:208
FBPropertyString FilePath
Read Write Property: Location of the generated movie file after a recording session.
Definition: fbvideo.h:343
FBPropertyTime LastFrameTime
Read Only Property: Time of last frame
Definition: fbvideo.h:225
FBPropertyVideoSwitcher VideoSwitcher
Read Only Property: Video switcher.
Definition: fbvideo.h:442
class FBPropertyBase< double, kFBPT_double > FBPropertyDouble
Property: double
No video proxy.
Definition: fbvideo.h:89
class FBPropertyBase< FBTime, kFBPT_Time > FBPropertyTime
Property: FBTime
FBPropertyInt LastFrame
Read Only Property: Last frame in clip.
Definition: fbvideo.h:224
FBPropertyBool RecordAudio
Read Write Property: If true, the device will also record audio during a recording session...
Definition: fbvideo.h:342
On clip end loop clip.
Definition: fbvideo.h:419
FBPropertyPlayMode PlayMode
Read Write Property: Current play mode.
Definition: fbvideo.h:482
Video switcher callback event.
Definition: fbvideo.h:434
Generic video input, type not specified.
Definition: fbvideo.h:327
FBPropertyBool Loop
Read Write Property: Loop video clip?
Definition: fbvideo.h:220
Video Switcher class.
Definition: fbvideo.h:448
Preview clip until end.
Definition: fbvideo.h:424
FBPropertyBool KeepOnGPU
Read Write Property: Don't auto flush from GPU if true.
Definition: fbvideo.h:179
class FBPropertyBaseEnum< enum FBVideoInterlaceMode > FBPropertyVideoInterlaceMode
Definition: fbvideo.h:148
FBVideoStorageMode
Video storage modes.
Definition: fbvideo.h:95
FBPropertyString Filename
Read Write Property: Filename of media.
Definition: fbvideo.h:202
class FBPropertyBaseEnum< enum FBPlayMode > FBPropertyPlayMode
Definition: fbvideo.h:431
FBPropertyInt StartFrame
Read Write Property: Frame to begin video playback from.
Definition: fbvideo.h:215
Full frame (even field).
Definition: fbvideo.h:106
Basic video input class, supporting webcam and DV device.
Definition: fbvideo.h:332
class FBPropertyBaseEnum< enum FBVideoFormat > FBPropertyVideoFormat
Definition: fbvideo.h:149
On clip end stop clip.
Definition: fbvideo.h:418
class FBPropertyBaseEnum< enum FBClipEnd > FBPropertyClipEnd
Definition: fbvideo.h:430
Video media class.
Definition: fbvideo.h:399
FBPropertyInt TextureOGLId
Read Write Property: OpenGL texture buffer object id (GL_TEXTURE_2D type).
Definition: fbvideo.h:317
FBPropertyBool FreeRunning
Read Write Property: Is free Running on?
Definition: fbvideo.h:219
Half frame (even field).
Definition: fbvideo.h:104
FBPropertyInt CurrentFrame
Read Write Property: Current frame.
Definition: fbvideo.h:223
Basic video input, like webcam and dv camera.
Definition: fbvideo.h:328
FBPropertyString RelativePath
Read Only Property: Relative path of media.
Definition: fbvideo.h:203
class FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool