- Main Page
- Classes
- Files
- Directories
- Examples

- File List
- File Members

# fbxtimecode.h

Go to the documentation of this file.

    00001 /****************************************************************************************
    00002
    00003    Copyright (C) 2012 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
    00013 #ifndef _FBXSDK_CORE_BASE_TIMECODE_H_
    00014 #define _FBXSDK_CORE_BASE_TIMECODE_H_
    00015
    00016 #include <fbxsdk/fbxsdk_def.h>
    00017
    00018 #include <fbxsdk/fbxsdk_nsbegin.h>
    00019
    00020 #define FBXSDK_TC_ZERO                  FBXSDK_LONGLONG(0)
    00021 #define FBXSDK_TC_EPSILON               FBXSDK_LONGLONG(1)
    00022 #define FBXSDK_TC_MINFINITY             FBXSDK_LONGLONG(-0x7fffffffffffffff)
    00023 #define FBXSDK_TC_INFINITY              FBXSDK_LONGLONG(0x7fffffffffffffff)
    00024 #define FBXSDK_TC_FIX_DEN               FBXSDK_LONGLONG(100000000)
    00025
    00026 #define FBXSDK_TC_MILLISECOND           FBXSDK_LONGLONG(46186158)
    00027 #define FBXSDK_TC_SECOND                FbxLongLong(FBXSDK_TC_MILLISECOND*1000)
    00028 #define FBXSDK_TC_MINUTE                FbxLongLong(FBXSDK_TC_SECOND*60)
    00029 #define FBXSDK_TC_HOUR                  FbxLongLong(FBXSDK_TC_MINUTE*60)
    00030 #define FBXSDK_TC_DAY                   FbxLongLong(FBXSDK_TC_HOUR*24)
    00031
    00032 // Frame @ 30 Hz
    00033 #define FBXSDK_TC_NTSC_FIELD            FbxLongLong(FBXSDK_TC_SECOND/30/2)
    00034 #define FBXSDK_TC_NTSC_FRAME            FbxLongLong(FBXSDK_TC_SECOND/30)
    00035
    00036 // Frame @ 29.9700299700 Hz
    00037 #define FBXSDK_TC_MNTSC_FIELD           FbxLongLong(FBXSDK_TC_MNTSC_FRAME/2)
    00038 #define FBXSDK_TC_MNTSC_FRAME           FbxLongLong(FBXSDK_TC_SECOND/30*1001/1000)
    00039 #define FBXSDK_TC_MNTSC_2_FRAMES        FbxLongLong(FBXSDK_TC_MNTSC_FRAME*2)
    00040 #define FBXSDK_TC_MNTSC_30_FRAMES       FbxLongLong(FBXSDK_TC_MNTSC_FRAME*30)
    00041 #define FBXSDK_TC_MNTSC_1798_FRAMES     FbxLongLong(FBXSDK_TC_MNTSC_FRAME*1798)     // leap minute
    00042 #define FBXSDK_TC_MNTSC_1800_FRAMES     FbxLongLong(FBXSDK_TC_MNTSC_FRAME*1800)     // ~1 minute
    00043 #define FBXSDK_TC_MNTSC_17982_FRAMES    FbxLongLong(FBXSDK_TC_MNTSC_FRAME*17982)    // ~10 minutes
    00044 #define FBXSDK_TC_MNTSC_107892_FRAMES   FbxLongLong(FBXSDK_TC_MNTSC_FRAME*107892)   // ~1 hour
    00045 #define FBXSDK_TC_MNTSC_108000_FRAMES   FbxLongLong(FBXSDK_TC_MNTSC_FRAME*108000)
    00046
    00047 // For 29.9700299700 non-drop, btw : same values as with 23.976
    00048 #define FBXSDK_TC_MNTSC_1_SECOND        FbxLongLong(FBXSDK_TC_MNTSC_FRAME*30)       // 1 frame * 30
    00049 #define FBXSDK_TC_MNTSC_1_MINUTE        FbxLongLong(FBXSDK_TC_MNTSC_1_SECOND*60)    // 1 minute (1800 frames)
    00050 #define FBXSDK_TC_MNTSC_1_HOUR          FbxLongLong(FBXSDK_TC_MNTSC_1_SECOND*3600)  // 1 hour
    00051
    00052 #define FBXSDK_TC_MNTSC_NUM             FbxULong(FBXSDK_TC_FIX_DEN*1000*30/1001)
    00053 #define FBXSDK_TC_MNTSC_DEN             FBXSDK_TC_FIX_DEN
    00054
    00055 // Frame @ 25 Hz
    00056 #define FBXSDK_TC_PAL_FIELD             FbxLongLong(FBXSDK_TC_SECOND/25/2)
    00057 #define FBXSDK_TC_PAL_FRAME             FbxLongLong(FBXSDK_TC_SECOND/25)
    00058
    00059 // Frame @ 24 Hz
    00060 #define FBXSDK_TC_FILM_FRAME            FbxLongLong(FBXSDK_TC_SECOND/24)
    00061
    00062 // Frame @ 23.9760239760 Hz
    00063 #define FBXSDK_TC_MFILM_FIELD           FbxLongLong(FBXSDK_TC_MFILM_FRAME/2)
    00064 #define FBXSDK_TC_MFILM_FRAME           FbxLongLong(FBXSDK_TC_SECOND/24*1001/1000)
    00065 #define FBXSDK_TC_MFILM_1_SECOND        FbxLongLong(FBXSDK_TC_MFILM_FRAME*24)       // 1 frame * 24
    00066 #define FBXSDK_TC_MFILM_1_MINUTE        FbxLongLong(FBXSDK_TC_MFILM_1_SECOND*60)    // 1 minute (1440 frames)
    00067 #define FBXSDK_TC_MFILM_1_HOUR          FbxLongLong(FBXSDK_TC_MFILM_1_SECOND*3600)  // 1 hour
    00068
    00069 #define FBXSDK_TC_MFILM_NUM             FbxULong(FBXSDK_TC_FIX_DEN*1000*24/1001)
    00070 #define FBXSDK_TC_MFILM_DEN             FBXSDK_TC_FIX_DEN
    00071
    00073
    00074 #define FBXSDK_TC_REM(quot, num, den)       ((quot) = (num) / (den), (quot) * (den))
    00075 #define FBXSDK_TC_HOUR_REM(quot, num, den)  ((quot) = ((num - (-FbxLongLong(num < 0) & (den - 1))) / (den)), (quot) * (den))
    00076
    00077 FBXSDK_DLL FbxLongLong FbxTCSeconds(FbxLongLong pTime);
    00078 FBXSDK_DLL FbxLongLong FbxTCMinutes(FbxLongLong pTime);
    00079 FBXSDK_DLL FbxLongLong FbxTCHours(FbxLongLong pTime);
    00080 FBXSDK_DLL FbxLongLong FbxTCSetRate(int pHour, int pMinute, int pSecond, FbxLongLong pFrame, FbxLongLong pPeriod);
    00081 FBXSDK_DLL FbxLongLong FbxTCGetRate(FbxLongLong pTime, int& pHour, int& pMinute, int& pSecond, int& pFrame, FbxLongLong pPeriod);
    00082 FBXSDK_DLL FbxLongLong FbxTCSetNTSC(int pHour, int pMinute, int pSecond, FbxLongLong pFrame, int pField);
    00083 FBXSDK_DLL FbxLongLong FbxTCGetNTSC(FbxLongLong pTime, int& pHour, int& pMinute, int& pSecond, int& pFrame, int& pField);
    00084 FBXSDK_DLL FbxLongLong FbxTCSetMNTSCnd(int pHour, int pMinute, int pSecond, FbxLongLong pFrame, int pField);
    00085 FBXSDK_DLL FbxLongLong FbxTCGetMNTSCnd(FbxLongLong pTime, int& pHour, int& pMinute, int& pSecond, int& pFrame, int& pField);
    00086 FBXSDK_DLL FbxLongLong FbxTCSetMNTSC_2Xnd(int pHour, int pMinute, int pSecond, FbxLongLong pFrame, int pField);
    00087 FBXSDK_DLL FbxLongLong FbxTCGetMNTSC_2Xnd(FbxLongLong pTime, int& pHour, int& pMinute, int& pSecond, int& pFrame, int& pField);
    00088 FBXSDK_DLL FbxLongLong FbxTCSetMNTSC(int pHour, int pMinute, int pSecond, FbxLongLong pFrame, int pField);
    00089 FBXSDK_DLL FbxLongLong FbxTCGetMNTSC(FbxLongLong pTime, int& pHour, int& pMinute, int& pSecond, int& pFrame, int& pField);
    00090 FBXSDK_DLL FbxLongLong FbxTCSetPAL(int pHour, int pMinute, int pSecond, FbxLongLong pFrame, int pField);
    00091 FBXSDK_DLL FbxLongLong FbxTCGetPAL(FbxLongLong pTime, int& pHour, int& pMinute, int& pSecond, int& pFrame, int& pField);
    00092 FBXSDK_DLL FbxLongLong FbxTCSetFILM(int pHour, int pMinute, int pSecond, FbxLongLong pFrame);
    00093 FBXSDK_DLL FbxLongLong FbxTCGetFILM(FbxLongLong pTime, int& pHour, int& pMinute, int& pSecond, int& pFrame);
    00094 FBXSDK_DLL FbxLongLong FbxTCSetFILMND(int pHour, int pMinute, int pSecond, FbxLongLong pFrame, int pField);
    00095 FBXSDK_DLL FbxLongLong FbxTCGetFILMND(FbxLongLong pTime, int& pHour, int& pMinute, int& pSecond, int& pFrame, int& pField);
    00096
    00097 #include <fbxsdk/fbxsdk_nsend.h>
    00098
    00099 #endif /* _FBXSDK_CORE_BASE_TIMECODE_H_ */