FBX SDK Reference Guide: kfbxvideo.h Source File
Go to the documentation of this file.
00001 
00004 #ifndef _FBXSDK_VIDEO_H_
00005 #define _FBXSDK_VIDEO_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 <kaydaradef.h>
00043 #ifndef KFBX_DLL
00044     #define KFBX_DLL K_DLLIMPORT
00045 #endif
00046 
00047 #include <kaydara.h>
00048 
00049 #include <klib/kerror.h>
00050 #ifdef KARCH_DEV_MACOSX_CFM
00051     #include <CFURL.h>
00052     #include <Files.h>
00053 #endif
00054 
00055 #include <kfbxmath/kfbxvector2.h>
00056 #include <kfbxplugins/kfbxgroupname.h>
00057 #include <kfbxplugins/kfbxtakenodecontainer.h>
00058 
00059 #include <fbxfilesdk_nsbegin.h>
00060 
00061 
00065 class KFBX_DLL KFbxVideo : public KFbxTakeNodeContainer
00066 {
00067     KFBXOBJECT_DECLARE(KFbxVideo,KFbxTakeNodeContainer);
00068   public:
00073 
00075     void Reset();
00077 
00082 
00086     void ImageTextureSetMipMap(bool pUseMipMap);
00087 
00091     bool ImageTextureGetMipMap();
00092 
00098     bool SetFileName(char const* pName);
00099 
00103     KString GetFileName ();
00104 
00110     bool SetRelativeFileName(char const* pName);
00111 
00115     char* GetRelativeFileName();
00116 
00120     double GetFrameRate();
00121 
00125     int GetLastFrame();
00126 
00130     int GetWidth();
00131 
00135     int GetHeight();
00136 
00142     void SetStartFrame(int pStartFrame);
00143 
00147     int GetStartFrame();
00148 
00154     void SetStopFrame(int pStopFrame);
00155 
00159     int GetStopFrame();
00160 
00166     void SetPlaySpeed(double pPlaySpeed);
00167 
00171     double GetPlaySpeed();
00172 
00177     void SetOffset(KTime pTime);
00178 
00179     /* Retrieve the time offset.
00180      * \return     The current time shift.
00181      */
00182     KTime GetOffset();
00183 
00189     void SetFreeRunning(bool pState);
00190 
00194     bool GetFreeRunning();
00195 
00196 
00202     void SetLoop(bool pLoop);
00203 
00207     bool GetLoop();
00208 
00209 
00220     typedef enum
00221     {
00222         None,       // Progressive frame (full frame)
00223         Fields,     // Alternate even/odd fields
00224         HalfEven,   // Half of a frame, even fields only
00225         HalfOdd,    // Half of a frame, odd fields only
00226         FullEven,   // Extract and use the even field of a full frame
00227         FullOdd,    // Extract and use the odd field of a full frame
00228         FullEvenOdd, // Extract Fields and make full frame with each one beginning with Even (60fps)
00229         FullOddEven
00230     } EInterlaceMode;
00231 
00235     void SetInterlaceMode(EInterlaceMode pInterlaceMode);
00236 
00240     EInterlaceMode GetInterlaceMode();
00241 
00242 
00248     typedef enum
00249     {
00250         Disk,
00251         Memory,
00252         DiskAsync
00253     } EAccessMode;
00254 
00258     void SetAccessMode(EAccessMode pAccessMode);
00259 
00263     EAccessMode GetAccessMode();
00265     
00266 
00271 
00275     KError& GetError();
00276 
00281     typedef enum
00282     {
00283         eTAKE_NODE_ERROR,
00284         eERROR_COUNT
00285     } EError;
00286 
00290     EError GetLastErrorID() const;
00291 
00295     const char* GetLastErrorString() const;
00296 
00298 
00299 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00300 
00301     // Clone
00302     virtual KFbxObject* Clone(KFbxObject* pContainer, KFbxObject::ECloneType pCloneType) const;
00303 
00304   protected:
00305     KFbxVideo(KFbxSdkManager& pManager, char const* pName);
00306     virtual ~KFbxVideo();
00307 
00308     virtual void Construct(const KFbxVideo* pFrom);
00309     virtual bool ConstructProperties(bool pForceSet);
00310     virtual void Destruct(bool pRecursive, bool pDependents);
00311     virtual                 bool ConnecNotify (KFbxConnectEvent const &pEvent);
00312 
00313     virtual KString     GetTypeName() const;
00314     virtual KStringList GetTypeFlags() const;
00315 
00316     void SetOriginalFormat(bool pState);
00317     bool GetOriginalFormat();
00318     void SetOriginalFilename(const char* pOriginalFilename);
00319     const char* GetOriginalFilename() const;
00320 
00321     void Init();
00322 
00323     static KError smError;
00324 
00325     KFbxTypedProperty<fbxDouble1> FrameRate;
00326     KFbxTypedProperty<fbxInteger1> LastFrame;
00327     KFbxTypedProperty<fbxInteger1> Width;
00328     KFbxTypedProperty<fbxInteger1> Height;
00329     KFbxTypedProperty<fbxString> Path;
00330     KFbxTypedProperty<fbxInteger1> StartFrame;
00331     KFbxTypedProperty<fbxInteger1> StopFrame;
00332     KFbxTypedProperty<fbxDouble1> PlaySpeed;
00333     KFbxTypedProperty<fbxTime> Offset;
00334     KFbxTypedProperty<EInterlaceMode> InterlaceMode;
00335     KFbxTypedProperty<fbxBool1> FreeRunning;
00336     KFbxTypedProperty<fbxBool1> Loop;
00337     KFbxTypedProperty<EAccessMode> AccessMode;
00338 
00339     bool                   mUseMipMap;
00340     bool                   mOriginalFormat;
00341     KString                mOriginalFilename;
00342 
00343     // Temporary values
00344     KString                mRelativeFilename;
00345 
00346     friend class KFbxWriterFbx6;
00347     friend struct KFbxWriterFbx7Impl;
00348     friend class KFbxReaderFbx;
00349     friend class KFbxReaderFbx6;
00350     friend class KFbxReaderFbx7;
00351     friend struct KFbxReaderFbx7Impl;
00352 
00353 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00354 };
00355 
00356 typedef KFbxVideo* HKFbxVideo;
00357 
00358 inline EFbxType FbxTypeOf( KFbxVideo::EInterlaceMode const &pItem ) { return eENUM; }
00359 inline EFbxType FbxTypeOf( KFbxVideo::EAccessMode const &pItem ) { return eENUM; }
00360 
00361 #include <fbxfilesdk_nsend.h>
00362 
00363 #endif // #ifndef _FBXSDK_VIDEO_H_
00364 
00365