kfbxvideo.h

Go to the documentation of this file.
00001 
00004 #ifndef _FBXSDK_VIDEO_H_
00005 #define _FBXSDK_VIDEO_H_
00006 
00007 /**************************************************************************************
00008 
00009  Copyright © 2004 - 2007 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 <kfbxplugins/kfbxtakenodecontainer.h>
00056 #include <kfbxmath/kfbxvector2.h>
00057 #include <kfbxplugins/kfbxgroupname.h>
00058 
00059 #include <fbxfilesdk_nsbegin.h>
00060 
00061 class KFbxVideo_internal;
00062 
00063 class KFBX_DLL KFbxVideo : public KFbxTakeNodeContainer
00064 {
00065     KFBXOBJECT_DECLARE(KFbxVideo);
00066   public:
00068     void Reset();
00069     
00074 
00078     void ImageTextureSetMipMap(bool pUseMipMap);
00079 
00083     bool ImageTextureGetMipMap();
00084 
00089     bool SetFileName(char const* pName);
00090 
00094     char* GetFileName ();
00095 
00100     bool SetRelativeFileName(char const* pName);
00101 
00105     char* GetRelativeFileName();
00106 
00110     double GetFrameRate();
00111 
00115     int GetLastFrame();
00116 
00120     int GetWidth();
00121 
00125     int GetHeight();
00126 
00132     void SetStartFrame(int pStartFrame);
00133 
00137     int GetStartFrame();
00138 
00144     void SetStopFrame(int pStopFrame);
00145 
00149     int GetStopFrame();
00150 
00156     void SetPlaySpeed(double pPlaySpeed);
00157 
00161     double GetPlaySpeed();
00162 
00167     void SetOffset(KTime pTime);
00168 
00169     /* Retrieve the time offset.
00170      * \return     The current time shift.
00171      */
00172     KTime GetOffset();
00173 
00179     void SetFreeRunning(bool pState);
00180 
00184     bool GetFreeRunning();
00185 
00186 
00192     void SetLoop(bool pLoop);
00193 
00197     bool GetLoop();
00198 
00199 
00210     typedef enum
00211     {
00212         None,       // Progressive frame (full frame)
00213         Fields,     // Alternate even/odd fields
00214         HalfEven,   // Half of a frame, even fields only
00215         HalfOdd,    // Half of a frame, odd fields only
00216         FullEven,   // Extract and use the even field of a full frame
00217         FullOdd,    // Extract and use the odd field of a full frame
00218         FullEvenOdd, // Extract Fields and make full frame with each one beginning with Even (60fps)
00219         FullOddEven
00220     } EInterlaceMode;
00221 
00225     void SetInterlaceMode(EInterlaceMode pInterlaceMode);
00226 
00230     EInterlaceMode GetInterlaceMode();
00231 
00232 
00238     typedef enum
00239     {
00240         Disk,
00241         Memory,
00242         DiskAsync
00243     } EAccessMode;
00244 
00248     void SetAccessMode(EAccessMode pAccessMode);
00249 
00253     EAccessMode GetAccessMode();
00254 
00255 
00256 
00261 
00265     KError& GetError();
00266 
00271     typedef enum 
00272     {
00273         eTAKE_NODE_ERROR,
00274         eERROR_COUNT
00275     } EError;   
00276 
00280     EError GetLastErrorID();
00281 
00285     char* GetLastErrorString();
00286 
00288 
00289 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00290 
00291     virtual KObject* GetFbxObject_internal();
00292     virtual KObject const*  GetFbxObject_internal() const;
00293 
00294     // Clone
00295     virtual KFbxObject* Clone(KFbxObject::ECloneType pCloneType) const;
00296 
00297   protected:
00298     static char const* GetNamePrefix() { return VIDEO_PREFIX; }
00299     
00300     KFbxVideo(KFbxSdkManager& pManager, char const* pName);  
00301     virtual ~KFbxVideo();
00302 
00303     virtual void Destruct(bool pRecursive, bool pDependents);
00304     virtual                 bool FbxPlugNotify(KFbxPlugEvent const &pEvent);
00305 
00306     virtual KFbxObject::ENameSpace GetNameSpace() const;
00307     virtual KString     GetTypeName() const;
00308     virtual KStringList GetTypeFlags() const;
00309         
00310     virtual void AddChannels(KFbxTakeNode *pTakeNode);
00311 
00312     void SetOriginalFormat(bool pState);
00313     bool GetOriginalFormat();
00314     void SetOriginalFilename(char* pOriginalFilename);
00315     char* GetOriginalFilename();
00316 
00317     void Init();
00318 
00319     static KError smError;
00320 
00321     KFbxVideo_internal *mPH;
00322 
00323     friend class KFbxWriterFbx6;
00324     friend class KFbxReaderFbx;
00325     friend class KFbxReaderFbx6;
00326     friend class KFbxVideo_internal;
00327 
00328 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00329 };
00330 
00331 typedef KFbxVideo* HKFbxVideo;
00332 
00333 #include <fbxfilesdk_nsend.h>
00334 
00335 #endif // #ifndef _FBXSDK_VIDEO_H_
00336 
00337