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  };
259 
261 
264  public:
269  FBVideoClipImage(const char* pName, HIObject pObject=NULL);
270 
280  };
281 
283  // FBVideoMemory
286 
295  class FBSDK_DLL FBVideoMemory : public FBVideo {
297  public:
302  FBVideoMemory(const char* pName, HIObject pObject=NULL);
303 
308  virtual void SetObjectImageSize(int pW,int pH);
309 
311  };
312 
314  // FBVideoIn
317 
322  };
323 
325  class FBSDK_DLL FBVideoIn : public FBVideo {
327  public:
331  FBVideoIn(HIObject pObject=NULL);
332 
337 
342  virtual bool LiveSetCompressor(int pCompressorIndex);
343 
347  virtual int LiveGetCompressor();
348 
352  virtual int LiveGetCompressorCount();
353 
357  virtual const char* LiveGetCompressorName(int pCompressorIndex);
358 
362  virtual void LiveSetResolutionFR(int pIndex);
363 
367  virtual int LiveGetResolutionFR();
368 
372  virtual int LiveGetResolutionFRCount();
373 
378  virtual const char* LiveGetResolutionFRName(int pIndex);
379 
383  virtual FBVideoLiveType LiveGetType();
384  };
385 
387  // FBVideoOut
390 
392  class FBSDK_DLL FBVideoOut : public FBVideo {
394  public:
398  FBVideoOut(HIObject pObject=NULL);
400  };
401 
402 
404  // FBVideoSwitcher
408 
410  enum FBClipEnd {
413  };
415  enum FBPlayMode {
421  };
422 
424  FB_DEFINE_ENUM( FBSDK_DLL, PlayMode );
425 
428  {
429  public:
434 
438  };
439 
442  {
444  public:
449  FBVideoSwitcher( const char* pName = NULL, HIObject pObject = NULL );
450 
453  virtual void ResetVideoSwitcher();
456  virtual void FinishCurrentVideo();
459  virtual void PrepareNextFrame();
463  virtual void SwapCurrent( FBVideo* pVideo );
468  virtual void SetNextClip( FBVideo* pVideo, FBPlayMode pMode );
469 
472  virtual bool IsSDKSwitcher();
473 
477 
482  };
483 
485  // FBPropertyListVideoClip
489  {
490  public:
496  FBVideoClip* operator[](int pIndex);
497  };
498 
500  // FBPropertyListVideoIn
504  {
505  public:
511  FBVideoIn* operator[](int pIndex);
512  };
513 
515  // FBPropertyListVideoOut
519  {
520  public:
526  FBVideoOut* operator[](int pIndex);
527  };
528 
529 #ifdef FBSDKUseNamespace
530 }
531 #endif
532 #endif
FBPropertyInt Width
Read Only Property: Width of image.
Definition: fbvideo.h:206
FBVideoInterlaceMode
Video interlace modes.
Definition: fbvideo.h:102
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:132
FBPropertyTime CurrentFrameTime
Read Write Property: Current time in clip.
Definition: fbvideo.h:226
FBPropertyBool UseSystemFrameRate
Read Write Property: Clip is using system frame rate?
Definition: fbvideo.h:278
FBPropertyVideoProxyMode ProxyMode
Read Write Property: Proxy mode.
Definition: fbvideo.h:204
FBPropertyEvent OnClipEnd
Event: Clip end event.
Definition: fbvideo.h:479
Video proxy on play.
Definition: fbvideo.h:90
Storage on disk async access.
Definition: fbvideo.h:98
#define FB_DEFINE_COMPONENT(DllTag, Type)
Define a component and give it the ability to be a property.
Definition: fbproperties.h:139
FBPropertyClipEnd EndType
Read Only Property: Clip end action.
Definition: fbvideo.h:437
PropertyList: VideoOut
Definition: fbvideo.h:518
Storage on disk.
Definition: fbvideo.h:96
FBPropertyDouble PlaySpeed
Read Write Property: Playback speed.
Definition: fbvideo.h:218
FBPropertyInt PowerOfTwoWidth
Read Only Property: Closest power of two value superior to width of image.
Definition: fbvideo.h:208
class FBPropertyBase< double, kFBPT_double > FBPropertyDouble
Property: double
class FBPropertyBase< FBTime, kFBPT_Time > FBPropertyTime
Property: FBTime
FBPropertyTime TimeRemaining
Read Only Property: Time remaining.
Definition: fbvideo.h:476
FBPropertyVideoFormat Format
Read Only Property: Video format.
Definition: fbvideo.h:211
#define NULL
Definition: kaydara.h:169
FBPropertyInt LastFrame
Read Only Property: Last frame in clip.
Definition: fbvideo.h:224
FBPropertyTime LastFrameTime
Read Only Property: Time of last frame
Definition: fbvideo.h:225
On clip end loop clip.
Definition: fbvideo.h:412
Video switcher callback event.
Definition: fbvideo.h:427
class FBPropertyBaseEnum< enum FBVideoInterlaceMode > FBPropertyVideoInterlaceMode
Definition: fbvideo.h:148
FBVideoStorageMode
Video storage modes.
Definition: fbvideo.h:95
FBPropertyBool Loop
Read Write Property: Loop video clip?
Definition: fbvideo.h:220
No video proxy.
Definition: fbvideo.h:89
Contains definitions for devices, boxes and models.
FBPropertyVideo CurrentVideo
Read Only Property: Current video.
Definition: fbvideo.h:478
Property class: const char * (String).
FBPropertyInt TextureOGLId
Read Write Property: OpenGL texture buffer object id (GL_TEXTURE_2D type).
Definition: fbvideo.h:310
Base Event class.
Definition: fbcomponent.h:959
FBVideoMemory allow external media source (which can't be supported by MoBu natively) ...
Definition: fbvideo.h:295
FBPropertyString Filename
Read Write Property: Filename of media.
Definition: fbvideo.h:202
class FBPropertyBaseEnum< enum FBVideoFormat > FBPropertyVideoFormat
Definition: fbvideo.h:149
class FBPropertyBaseEnum< enum FBClipEnd > FBPropertyClipEnd
Definition: fbvideo.h:423
FBPropertyInt StartFrame
Read Write Property: Frame to begin video playback from.
Definition: fbvideo.h:215
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
Definition: fbproperties.h:148
FBPropertykReference Reference
Read Only Property: Data.
Definition: fbvideo.h:436
Generic video input, type not specified.
Definition: fbvideo.h:320
Video Switcher class.
Definition: fbvideo.h:441
Preview clip until end.
Definition: fbvideo.h:417
class FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool
FBPropertyBool FreeRunning
Read Write Property: Is free Running on?
Definition: fbvideo.h:219
class FBPropertyBase< kReference, kFBPT_kReference > FBPropertykReference
Property: kReference
FBPropertyInt CurrentFrame
Read Write Property: Current frame.
Definition: fbvideo.h:223
Basic video input, like webcam and dv camera.
Definition: fbvideo.h:321
class FBPropertyBaseComponent< FBVideoSwitcher * > FBPropertyVideoSwitcher
Definition: fbvideo.h:63
Full frame (even field).
Definition: fbvideo.h:106
Basic video input class, supporting webcam and DV device.
Definition: fbvideo.h:325
FBPropertyTime CurrentFrameTimeCode
Read Only Property: Embedded timecode from current frame in clip.
Definition: fbvideo.h:228
class FBPropertyBaseEnum< enum FBPlayMode > FBPropertyPlayMode
Definition: fbvideo.h:424
On clip end stop clip.
Definition: fbvideo.h:411
FBVideoResolution
Video Resolution (1D)
Definition: fbvideo.h:125
FBPropertyInt Height
Read Only Property: Height of image.
Definition: fbvideo.h:207
class FBPropertyBaseComponent< FBVideo * > FBPropertyVideo
Definition: fbstory.h:76
Half frame (even field).
Definition: fbvideo.h:104
FBPropertyVideoResolution MaxMipMapResolution
Read Write Property: Maximum MipMap resolution will be loaded into GPU.
Definition: fbvideo.h:279
PropertyList: Concrete class for PropertyList of component
Definition: fbcomponent.h:553
FBPropertyString RelativePath
Read Only Property: Relative path of media.
Definition: fbvideo.h:203
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
Definition: fbvideo.h:48
FBPropertyBool ImageSequence
Read Write Property: Clip is an image sequence?
Definition: fbvideo.h:277
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68
FBPropertyBool Online
Read Write Property: If true, the device is online and will display the current video feed...
Definition: fbvideo.h:333
FBPropertyBool UsingSystemTime
Read Write Property: Using the system time?
Definition: fbvideo.h:481
Video media class.
Definition: fbvideo.h:167
FBPlayMode
Play modes.
Definition: fbvideo.h:415
FBPropertyString FilePath
Read Write Property: Location of the generated movie file after a recording session.
Definition: fbvideo.h:336
#define FBSDKNamespace
FBSDKNamespace define.
Definition: fbversion.h:64
FBPropertyBool Recording
Read Write Property: If true, the device will record during a recording session.
Definition: fbvideo.h:334
Full frame (odd field).
Definition: fbvideo.h:107
class FBPropertyBaseEnum< enum FBVideoProxyMode > FBPropertyVideoProxyMode
Definition: fbvideo.h:146
FBPropertyTime TimeOffset
Read Write Property: Temporal offset for beginning of video.
Definition: fbvideo.h:214
Basic class definitions.
FBPropertyTime FrameTime
Read Only Property: Inverse of FPS, time per frame
Definition: fbvideo.h:222
PropertyEvent: Base event class.
Definition: fbproperties.h:507
KEventBase * HKEventBase
Definition: fbcomponent.h:75
Half frame (odd field).
Definition: fbvideo.h:105
FBVideoFormat
Video color modes.
Definition: fbvideo.h:111
FBVideoLiveType
Video Live type.
Definition: fbvideo.h:319
class FBPropertyBaseEnum< enum FBVideoStorageMode > FBPropertyVideoStorageMode
Definition: fbvideo.h:147
Always video proxy.
Definition: fbvideo.h:91
A box is a fundamental building block in the application architecture.
Definition: fbcore.h:218
No play (most common).
Definition: fbvideo.h:416
Video media class.
Definition: fbvideo.h:392
Storage in memory.
Definition: fbvideo.h:97
FBPropertyVideoSwitcher VideoSwitcher
Read Only Property: Video switcher.
Definition: fbvideo.h:435
FBClipEnd
Clip end actions.
Definition: fbvideo.h:410
FBPropertyInt PowerOfTwoHeight
Read Only Property: Closest power of two value superior to height of image.
Definition: fbvideo.h:209
FBPropertyVideoStorageMode StorageMode
Read Write Property: Storage mode.
Definition: fbvideo.h:205
PropertyList: VideoClip
Definition: fbvideo.h:488
FBPropertyDouble FrameRate
Read Write Property: Frame rate.
Definition: fbvideo.h:217
FBPropertyBool KeepOnGPU
Read Write Property: Don't auto flush from GPU if true.
Definition: fbvideo.h:179
FBPropertyBool RecordAudio
Read Write Property: If true, the device will also record audio during a recording session...
Definition: fbvideo.h:335
class FBPropertyBaseEnum< enum FBVideoResolution > FBPropertyVideoResolution
Definition: fbvideo.h:150
class FBPropertyBase< int, kFBPT_int > FBPropertyInt
Property: int
FBPropertyInt StopFrame
Read Write Property: Frame to end video playback at.
Definition: fbvideo.h:216
Play clip to end.
Definition: fbvideo.h:420
FBPropertyBool Online
Read Write Property: If true, the device is online and will output display.
Definition: fbvideo.h:399
FBPropertyPlayMode PlayMode
Read Write Property: Current play mode.
Definition: fbvideo.h:475
FBPropertyVideoInterlaceMode InterlaceMode
Read Write Property: Interlace mode.
Definition: fbvideo.h:210
PropertyList: VideoIn
Definition: fbvideo.h:503
FBPropertyInt CurrentFrame
Read Write Property: Current frame.
Definition: fbvideo.h:474
FBPropertyDevice DeviceOwner
Read Write Property: Hook onto owner device.
Definition: fbvideo.h:480
class FBPropertyBaseComponent< FBDevice * > FBPropertyDevice
Definition: fbcore.h:67
FBVideoProxyMode
Video proxy modes.
Definition: fbvideo.h:88