kfbxvideo.h

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 (C) 2001 - 2009 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 #include <fbxfilesdk/fbxfilesdk_def.h>
00042 
00043 #include <fbxfilesdk/components/kbaselib/klib/kerror.h>
00044 
00045 #include <fbxfilesdk/kfbxmath/kfbxvector2.h>
00046 #include <fbxfilesdk/kfbxplugins/kfbxgroupname.h>
00047 #include <fbxfilesdk/kfbxplugins/kfbxobject.h>
00048 
00049 #include <fbxfilesdk/fbxfilesdk_nsbegin.h>
00050 
00054 class KFBX_DLL KFbxVideo : public KFbxObject
00055 {
00056     KFBXOBJECT_DECLARE(KFbxVideo,KFbxObject);
00057   public:
00062 
00064     void Reset();
00066 
00071 
00075     void ImageTextureSetMipMap(bool pUseMipMap);
00076 
00080     bool ImageTextureGetMipMap() const;
00081 
00087     bool SetFileName(char const* pName);
00088 
00092     KString GetFileName () const;
00093 
00099     bool SetRelativeFileName(char const* pName);
00100 
00104     const char* GetRelativeFileName() const;
00105 
00109     double GetFrameRate() const;
00110 
00114     int GetLastFrame() const;
00115 
00119     int GetWidth() const;
00120 
00124     int GetHeight() const;
00125 
00131     void SetStartFrame(int pStartFrame);
00132 
00136     int GetStartFrame() const;
00137 
00143     void SetStopFrame(int pStopFrame);
00144 
00148     int GetStopFrame() const;
00149 
00155     void SetPlaySpeed(double pPlaySpeed);
00156 
00160     double GetPlaySpeed() const;
00161 
00166     void SetOffset(KTime pTime);
00167 
00168     /* Retrieve the time offset.
00169      * \return     The current time shift.
00170      */
00171     KTime GetOffset() const;
00172 
00178     void SetFreeRunning(bool pState);
00179 
00183     bool GetFreeRunning() const;
00184 
00185 
00191     void SetLoop(bool pLoop);
00192 
00196     bool GetLoop() const;
00197 
00198 
00209     typedef enum
00210     {
00211         None,       // Progressive frame (full frame)
00212         Fields,     // Alternate even/odd fields
00213         HalfEven,   // Half of a frame, even fields only
00214         HalfOdd,    // Half of a frame, odd fields only
00215         FullEven,   // Extract and use the even field of a full frame
00216         FullOdd,    // Extract and use the odd field of a full frame
00217         FullEvenOdd, // Extract Fields and make full frame with each one beginning with Even (60fps)
00218         FullOddEven
00219     } EInterlaceMode;
00220 
00224     void SetInterlaceMode(EInterlaceMode pInterlaceMode);
00225 
00229     EInterlaceMode GetInterlaceMode() const;
00230 
00231 
00237     typedef enum
00238     {
00239         Disk,
00240         Memory,
00241         DiskAsync
00242     } EAccessMode;
00243 
00247     void SetAccessMode(EAccessMode pAccessMode);
00248 
00252     EAccessMode GetAccessMode() const;
00254     
00255 
00260 
00264     KError& GetError();
00265 
00270     typedef enum
00271     {
00272         eTAKE_NODE_ERROR,
00273         eERROR_COUNT
00274     } EError;
00275 
00279     EError GetLastErrorID() const;
00280 
00284     const char* GetLastErrorString() const;
00285 
00287 
00288 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00289 
00290     // Clone
00291     virtual KFbxObject* Clone(KFbxObject* pContainer, KFbxObject::ECloneType pCloneType) const;
00292 
00293 protected:
00294     KFbxVideo(KFbxSdkManager& pManager, char const* pName);
00295 
00296     virtual void Construct(const KFbxVideo* pFrom);
00297     virtual bool ConstructProperties(bool pForceSet);
00298     virtual bool ConnecNotify(KFbxConnectEvent const &pEvent);
00299 
00300 public:
00301     virtual KString     GetTypeName() const;
00302     virtual KStringList GetTypeFlags() const;
00303 
00304     void SetOriginalFormat(bool pState);
00305     bool GetOriginalFormat() const;
00306     void SetOriginalFilename(const char* pOriginalFilename);
00307     const char* GetOriginalFilename() const;
00308 
00309 protected:
00310     void Init();
00311 
00312     static KError smError;
00313 
00314     KFbxTypedProperty<fbxDouble1> FrameRate;
00315     KFbxTypedProperty<fbxInteger1> LastFrame;
00316     KFbxTypedProperty<fbxInteger1> Width;
00317     KFbxTypedProperty<fbxInteger1> Height;
00318     KFbxTypedProperty<fbxString> Path;
00319     KFbxTypedProperty<fbxInteger1> StartFrame;
00320     KFbxTypedProperty<fbxInteger1> StopFrame;
00321     KFbxTypedProperty<fbxDouble1> PlaySpeed;
00322     KFbxTypedProperty<fbxTime> Offset;
00323     KFbxTypedProperty<EInterlaceMode> InterlaceMode;
00324     KFbxTypedProperty<fbxBool1> FreeRunning;
00325     KFbxTypedProperty<fbxBool1> Loop;
00326     KFbxTypedProperty<EAccessMode> AccessMode;
00327 
00328     bool                   mUseMipMap;
00329     bool                   mOriginalFormat;
00330     KString                mOriginalFilename;
00331 
00332     // Temporary values
00333     KString                mRelativeFilename;
00334 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00335 };
00336 
00337 typedef KFbxVideo* HKFbxVideo;
00338 
00339 inline EFbxType FbxTypeOf( KFbxVideo::EInterlaceMode const &pItem ) { return eENUM; }
00340 inline EFbxType FbxTypeOf( KFbxVideo::EAccessMode const &pItem ) { return eENUM; }
00341 
00342 #include <fbxfilesdk/fbxfilesdk_nsend.h>
00343 
00344 #endif // FBXFILESDK_KFBXPLUGINS_KFBXVIDEO_H
00345