kfbxvideo.h

Go to the documentation of this file.
00001 /****************************************************************************************
00002 
00003    Copyright (C) 2011 Autodesk, Inc.
00004    All rights reserved.
00005 
00006    Use of this software is subject to the terms of the Autodesk license agreement
00007    provided at the time of installation or download, or which otherwise accompanies
00008    this software in either electronic or hard copy form.
00009 
00010 ****************************************************************************************/
00011 
00015 #ifndef FBXFILESDK_KFBXPLUGINS_KFBXVIDEO_H
00016 #define FBXFILESDK_KFBXPLUGINS_KFBXVIDEO_H
00017 
00018 
00019 #include <fbxfilesdk/fbxfilesdk_def.h>
00020 
00021 #include <fbxfilesdk/components/kbaselib/klib/kerror.h>
00022 
00023 #include <fbxfilesdk/kfbxmath/kfbxvector2.h>
00024 #include <fbxfilesdk/kfbxplugins/kfbxgroupname.h>
00025 #include <fbxfilesdk/kfbxplugins/kfbxobject.h>
00026 
00027 #include <fbxfilesdk/fbxfilesdk_nsbegin.h>
00028 
00032 class KFBX_DLL KFbxVideo : public KFbxObject
00033 {
00034     KFBXOBJECT_DECLARE(KFbxVideo, KFbxObject);
00035 
00036 public:
00041 
00042         void Reset();
00044 
00052         void ImageTextureSetMipMap(bool pUseMipMap);
00053 
00057         bool ImageTextureGetMipMap() const;
00058 
00064         bool SetFileName(char const* pName);
00065 
00069         KString GetFileName () const;
00070 
00076         bool SetRelativeFileName(char const* pName);
00077 
00081         const char* GetRelativeFileName() const;
00082 
00097         void SetImageSequence(bool pImageSequence);
00098 
00102         bool GetImageSequence() const;
00103 
00107         void SetImageSequenceOffset(int pOffset);
00108 
00112         int GetImageSequenceOffset() const;
00114 
00118         double GetFrameRate() const;
00119 
00123         int GetLastFrame() const;
00124 
00128         int GetWidth() const;
00129 
00133         int GetHeight() const;
00134 
00140         void SetStartFrame(int pStartFrame);
00141 
00145         int GetStartFrame() const;
00146 
00152         void SetStopFrame(int pStopFrame);
00153 
00157         int GetStopFrame() const;
00158 
00164         void SetPlaySpeed(double pPlaySpeed);
00165 
00169         double GetPlaySpeed() const;
00170 
00175         void SetOffset(KTime pTime);
00176 
00177         /* Retrieve the time offset.
00178          * \return     The current time shift.
00179          */
00180         KTime GetOffset() const;
00181 
00187         void SetFreeRunning(bool pState);
00188 
00192         bool GetFreeRunning() const;
00193 
00194 
00200         void SetLoop(bool pLoop);
00201 
00205         bool GetLoop() const;
00206 
00207 
00210         typedef enum
00211         {
00212             None,           
00213             Fields,         
00214             HalfEven,       
00215             HalfOdd,        
00216             FullEven,       
00217             FullOdd,        
00218             FullEvenOdd,    
00219             FullOddEven     
00220         } EInterlaceMode;
00221 
00225         void SetInterlaceMode(EInterlaceMode pInterlaceMode);
00226 
00230         EInterlaceMode GetInterlaceMode() const;
00231 
00232 
00235         typedef enum
00236         {
00237             Disk,
00238             Memory,
00239             DiskAsync
00240         } EAccessMode;
00241 
00245         void SetAccessMode(EAccessMode pAccessMode);
00246 
00250         EAccessMode GetAccessMode() const;
00252     
00260         KError& GetError();
00261 
00264         typedef enum
00265         {
00266             eTAKE_NODE_ERROR,
00267             eERROR_COUNT        
00268         } EError;
00269 
00273         EError GetLastErrorID() const;
00274 
00278         const char* GetLastErrorString() const;
00280 
00281 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00282 protected:
00283     KFbxVideo(KFbxSdkManager& pManager, char const* pName);
00284 
00285     virtual void Construct(const KFbxVideo* pFrom);
00286     virtual bool ConstructProperties(bool pForceSet);
00287     virtual bool ConnecNotify(KFbxConnectEvent const &pEvent);
00288 
00289 public:
00290     virtual KFbxObject& Copy(const KFbxObject& pObject);
00291 
00292     virtual KStringList GetTypeFlags() const;
00293 
00294     void SetOriginalFormat(bool pState);
00295     bool GetOriginalFormat() const;
00296     void SetOriginalFilename(const char* pOriginalFilename);
00297     const char* GetOriginalFilename() const;
00298 
00299 protected:
00300     void Init();
00301 
00302     static KError smError;
00303 
00304     KFbxTypedProperty<fbxBool1>   ImageSequence;
00305     KFbxTypedProperty<fbxInteger1> ImageSequenceOffset;
00306     KFbxTypedProperty<fbxDouble1> FrameRate;
00307     KFbxTypedProperty<fbxInteger1> LastFrame;
00308     KFbxTypedProperty<fbxInteger1> Width;
00309     KFbxTypedProperty<fbxInteger1> Height;
00310     KFbxTypedProperty<fbxString> Path;
00311     KFbxTypedProperty<fbxInteger1> StartFrame;
00312     KFbxTypedProperty<fbxInteger1> StopFrame;
00313     KFbxTypedProperty<fbxDouble1> PlaySpeed;
00314     KFbxTypedProperty<fbxTime> Offset;
00315     KFbxTypedProperty<EInterlaceMode> InterlaceMode;
00316     KFbxTypedProperty<fbxBool1> FreeRunning;
00317     KFbxTypedProperty<fbxBool1> Loop;
00318     KFbxTypedProperty<EAccessMode> AccessMode;
00319 
00320     bool                   mUseMipMap;
00321     bool                   mOriginalFormat;
00322     KString                mOriginalFilename;
00323 
00324     // Temporary values
00325     KString                mRelativeFilename;
00326 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00327 };
00328 
00329 typedef KFbxVideo* HKFbxVideo;
00330 
00331 inline EFbxType FbxTypeOf( KFbxVideo::EInterlaceMode const &pItem ) { return eENUM; }
00332 inline EFbxType FbxTypeOf( KFbxVideo::EAccessMode const &pItem ) { return eENUM; }
00333 
00334 #include <fbxfilesdk/fbxfilesdk_nsend.h>
00335 
00336 #endif // FBXFILESDK_KFBXPLUGINS_KFBXVIDEO_H
00337