FBX SDK Reference Guide: kfbxvideo.h Source File
Go to the documentation of this file.
00001 
00004 #ifndef FBXFILESDK_KFBXPLUGINS_KFBXVIDEO_H
00005 #define FBXFILESDK_KFBXPLUGINS_KFBXVIDEO_H
00006 
00007 /**************************************************************************************
00008 
00009  Copyright © 2001 - 2008 Autodesk, Inc. and/or its licensors.
00010  All Rights Reserved.
00011 
00012  The coded instructions, statements, computer programs, and/or related material 
00013  (collectively the "Data") in these files contain unpublished information 
00014  proprietary to Autodesk, Inc. and/or its licensors, which is protected by 
00015  Canada and United States of America federal copyright law and by international 
00016  treaties. 
00017  
00018  The Data may not be disclosed or distributed to third parties, in whole or in
00019  part, without the prior written consent of Autodesk, Inc. ("Autodesk").
00020 
00021  THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
00022  ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO
00023  WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR ARISING
00024  BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES OF TITLE, 
00025  NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR USE. 
00026  WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT WARRANT THAT THE OPERATION
00027  OF THE DATA WILL BE UNINTERRUPTED OR ERROR FREE. 
00028  
00029  IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS
00030  OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR EXPENSES
00031  OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE DAMAGES OR OTHER
00032  SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS OF PROFITS, REVENUE
00033  OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR DAMAGES OF ANY KIND),
00034  HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF LIABILITY, WHETHER DERIVED
00035  FROM CONTRACT, TORT (INCLUDING, BUT NOT LIMITED TO, NEGLIGENCE), OR OTHERWISE,
00036  ARISING OUT OF OR RELATING TO THE DATA OR ITS USE OR ANY OTHER PERFORMANCE,
00037  WHETHER OR NOT AUTODESK HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS
00038  OR DAMAGE. 
00039 
00040 **************************************************************************************/
00041 
00042 #include <fbxfilesdk/components/kbaselib/kaydaradef_h.h>
00043 #include <fbxfilesdk/components/kbaselib/kaydara.h>
00044 
00045 #include <fbxfilesdk/components/kbaselib/klib/kerror.h>
00046 #ifdef KARCH_DEV_MACOSX_CFM
00047     #include <CFURL.h>
00048     #include <Files.h>
00049 #endif
00050 
00051 #include <fbxfilesdk/kfbxmath/kfbxvector2.h>
00052 #include <fbxfilesdk/kfbxplugins/kfbxgroupname.h>
00053 #include <fbxfilesdk/kfbxplugins/kfbxtakenodecontainer.h>
00054 
00055 #include <fbxfilesdk/fbxfilesdk_nsbegin.h>
00056 
00057 
00061 class KFBX_DLL KFbxVideo : public KFbxTakeNodeContainer
00062 {
00063     KFBXOBJECT_DECLARE(KFbxVideo,KFbxTakeNodeContainer);
00064   public:
00069 
00071     void Reset();
00073 
00078 
00082     void ImageTextureSetMipMap(bool pUseMipMap);
00083 
00087     bool ImageTextureGetMipMap();
00088 
00094     bool SetFileName(char const* pName);
00095 
00099     KString GetFileName ();
00100 
00106     bool SetRelativeFileName(char const* pName);
00107 
00111     char* GetRelativeFileName();
00112 
00116     double GetFrameRate();
00117 
00121     int GetLastFrame();
00122 
00126     int GetWidth();
00127 
00131     int GetHeight();
00132 
00138     void SetStartFrame(int pStartFrame);
00139 
00143     int GetStartFrame();
00144 
00150     void SetStopFrame(int pStopFrame);
00151 
00155     int GetStopFrame();
00156 
00162     void SetPlaySpeed(double pPlaySpeed);
00163 
00167     double GetPlaySpeed();
00168 
00173     void SetOffset(KTime pTime);
00174 
00175     /* Retrieve the time offset.
00176      * \return     The current time shift.
00177      */
00178     KTime GetOffset();
00179 
00185     void SetFreeRunning(bool pState);
00186 
00190     bool GetFreeRunning();
00191 
00192 
00198     void SetLoop(bool pLoop);
00199 
00203     bool GetLoop();
00204 
00205 
00216     typedef enum
00217     {
00218         None,       // Progressive frame (full frame)
00219         Fields,     // Alternate even/odd fields
00220         HalfEven,   // Half of a frame, even fields only
00221         HalfOdd,    // Half of a frame, odd fields only
00222         FullEven,   // Extract and use the even field of a full frame
00223         FullOdd,    // Extract and use the odd field of a full frame
00224         FullEvenOdd, // Extract Fields and make full frame with each one beginning with Even (60fps)
00225         FullOddEven
00226     } EInterlaceMode;
00227 
00231     void SetInterlaceMode(EInterlaceMode pInterlaceMode);
00232 
00236     EInterlaceMode GetInterlaceMode();
00237 
00238 
00244     typedef enum
00245     {
00246         Disk,
00247         Memory,
00248         DiskAsync
00249     } EAccessMode;
00250 
00254     void SetAccessMode(EAccessMode pAccessMode);
00255 
00259     EAccessMode GetAccessMode();
00261     
00262 
00267 
00271     KError& GetError();
00272 
00277     typedef enum
00278     {
00279         eTAKE_NODE_ERROR,
00280         eERROR_COUNT
00281     } EError;
00282 
00286     EError GetLastErrorID() const;
00287 
00291     const char* GetLastErrorString() const;
00292 
00294 
00295 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00296 
00297     // Clone
00298     virtual KFbxObject* Clone(KFbxObject* pContainer, KFbxObject::ECloneType pCloneType) const;
00299 
00300 protected:
00301     KFbxVideo(KFbxSdkManager& pManager, char const* pName);
00302     virtual ~KFbxVideo();
00303 
00304     virtual void Construct(const KFbxVideo* pFrom);
00305     virtual bool ConstructProperties(bool pForceSet);
00306     virtual void Destruct(bool pRecursive, bool pDependents);
00307     virtual                 bool ConnecNotify (KFbxConnectEvent const &pEvent);
00308 
00309 public:
00310     virtual KString     GetTypeName() const;
00311     virtual KStringList GetTypeFlags() const;
00312 
00313     void SetOriginalFormat(bool pState);
00314     bool GetOriginalFormat();
00315     void SetOriginalFilename(const char* pOriginalFilename);
00316     const char* GetOriginalFilename() const;
00317 
00318 protected:
00319     void Init();
00320 
00321     static KError smError;
00322 
00323     KFbxTypedProperty<fbxDouble1> FrameRate;
00324     KFbxTypedProperty<fbxInteger1> LastFrame;
00325     KFbxTypedProperty<fbxInteger1> Width;
00326     KFbxTypedProperty<fbxInteger1> Height;
00327     KFbxTypedProperty<fbxString> Path;
00328     KFbxTypedProperty<fbxInteger1> StartFrame;
00329     KFbxTypedProperty<fbxInteger1> StopFrame;
00330     KFbxTypedProperty<fbxDouble1> PlaySpeed;
00331     KFbxTypedProperty<fbxTime> Offset;
00332     KFbxTypedProperty<EInterlaceMode> InterlaceMode;
00333     KFbxTypedProperty<fbxBool1> FreeRunning;
00334     KFbxTypedProperty<fbxBool1> Loop;
00335     KFbxTypedProperty<EAccessMode> AccessMode;
00336 
00337     bool                   mUseMipMap;
00338     bool                   mOriginalFormat;
00339     KString                mOriginalFilename;
00340 
00341     // Temporary values
00342     KString                mRelativeFilename;
00343 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00344 };
00345 
00346 typedef KFbxVideo* HKFbxVideo;
00347 
00348 inline EFbxType FbxTypeOf( KFbxVideo::EInterlaceMode const &pItem ) { return eENUM; }
00349 inline EFbxType FbxTypeOf( KFbxVideo::EAccessMode const &pItem ) { return eENUM; }
00350 
00351 #include <fbxfilesdk/fbxfilesdk_nsend.h>
00352 
00353 #endif // FBXFILESDK_KFBXPLUGINS_KFBXVIDEO_H
00354