![]() |
AJA NTV2 SDK
17.0.1.1246
NTV2 SDK 17.0.1.1246
|
Utility class for timecodes. More...
#include <timecode.h>
Public Member Functions | |
| AJATimeCode () | |
| AJATimeCode (uint32_t frame) | |
| AJATimeCode (const std::string &str, const AJATimeBase &timeBase, bool bDropFrame, bool bStdTc=false) | |
| AJATimeCode (const std::string &str, const AJATimeBase &timeBase) | |
| AJATimeCode (const AJATimeCode &other) | |
| virtual | ~AJATimeCode () |
| void | QueryString (std::string &str, const AJATimeBase &timeBase, bool bDropFrame) |
| void | QueryString (char *pString, const AJATimeBase &timeBase, bool bDropFrame) |
| void | QuerySMPTEString (char *pString, const AJATimeBase &timeBase, bool bDropFrame) |
| uint32_t | QueryFrame (void) const |
| bool | QueryStdTimecodeForHfr () |
| void | QueryHmsf (uint32_t &h, uint32_t &m, uint32_t &s, uint32_t &f, const AJATimeBase &timeBase, bool bDropFrame) const |
| void | Set (uint32_t frame) |
| void | Set (const std::string &str, const AJATimeBase &timeBase) |
| void | SetWithCleanup (const std::string &str, const AJATimeBase &timeBase, bool bDrop) |
| void | Set (const std::string &str, const AJATimeBase &timeBase, bool bDropFrame) |
| void | SetHmsf (uint32_t h, uint32_t m, uint32_t s, uint32_t f, const AJATimeBase &timeBase, bool bDropFrame) |
| void | SetSMPTEString (const char *pBufr, const AJATimeBase &timeBase) |
| void | SetRP188 (const uint32_t inDBB, const uint32_t inLo, const uint32_t inHi, const AJATimeBase &inTimeBase) |
| void | QueryRP188 (uint32_t *pDbb, uint32_t *pLow, uint32_t *pHigh, const AJATimeBase &timeBase, bool bDrop) |
| void | QueryRP188 (uint32_t &outDBB, uint32_t &outLo, uint32_t &outHi, const AJATimeBase &timeBase, const bool bDrop) |
| void | SetStdTimecodeForHfr (bool bStdTc) |
| AJATimeCode & | operator= (const AJATimeCode &val) |
| AJATimeCode & | operator+= (const AJATimeCode &val) |
| AJATimeCode & | operator-= (const AJATimeCode &val) |
| AJATimeCode & | operator+= (const int32_t val) |
| AJATimeCode & | operator-= (const int32_t val) |
| const AJATimeCode | operator+ (const AJATimeCode &val) const |
| const AJATimeCode | operator+ (const int32_t val) const |
| const AJATimeCode | operator- (const AJATimeCode &val) const |
| const AJATimeCode | operator- (const int32_t val) const |
| bool | operator== (const AJATimeCode &val) const |
| bool | operator< (const AJATimeCode &val) const |
| bool | operator< (const int32_t val) const |
| bool | operator> (const AJATimeCode &val) const |
| bool | operator> (const int32_t val) const |
| bool | operator!= (const AJATimeCode &val) const |
Static Public Member Functions | |
| static int | QuerySMPTEStringSize (void) |
| static bool | QueryIsDropFrame (const std::string &str) |
| static int | QueryStringSize (void) |
| static bool | QueryIsRP188DropFrame (const uint32_t inDBB, const uint32_t inLo, const uint32_t inHi) |
Public Attributes | |
| uint32_t | m_frame |
| bool | m_stdTimecodeForHfr |
Utility class for timecodes.
This is a storage and conversion class for timecodes.
Definition at line 17 of file timecode.h.
| AJATimeCode::AJATimeCode | ( | ) |
Definition at line 44 of file timecode.cpp.
| AJATimeCode::AJATimeCode | ( | uint32_t | frame | ) |
Definition at line 50 of file timecode.cpp.
| AJATimeCode::AJATimeCode | ( | const std::string & | str, |
| const AJATimeBase & | timeBase, | ||
| bool | bDropFrame, | ||
| bool | bStdTc = false |
||
| ) |
Definition at line 56 of file timecode.cpp.
| AJATimeCode::AJATimeCode | ( | const std::string & | str, |
| const AJATimeBase & | timeBase | ||
| ) |
Definition at line 62 of file timecode.cpp.
| AJATimeCode::AJATimeCode | ( | const AJATimeCode & | other | ) |
Definition at line 68 of file timecode.cpp.
|
virtual |
Definition at line 77 of file timecode.cpp.
| bool AJATimeCode::operator!= | ( | const AJATimeCode & | val | ) | const |
Definition at line 589 of file timecode.cpp.
| const AJATimeCode AJATimeCode::operator+ | ( | const AJATimeCode & | val | ) | const |
Definition at line 635 of file timecode.cpp.
| const AJATimeCode AJATimeCode::operator+ | ( | const int32_t | val | ) | const |
Definition at line 640 of file timecode.cpp.
| AJATimeCode & AJATimeCode::operator+= | ( | const AJATimeCode & | val | ) |
Definition at line 597 of file timecode.cpp.
| AJATimeCode & AJATimeCode::operator+= | ( | const int32_t | val | ) |
Definition at line 603 of file timecode.cpp.
| const AJATimeCode AJATimeCode::operator- | ( | const AJATimeCode & | val | ) | const |
Definition at line 648 of file timecode.cpp.
| const AJATimeCode AJATimeCode::operator- | ( | const int32_t | val | ) | const |
Definition at line 653 of file timecode.cpp.
| AJATimeCode & AJATimeCode::operator-= | ( | const AJATimeCode & | val | ) |
Definition at line 612 of file timecode.cpp.
| AJATimeCode & AJATimeCode::operator-= | ( | const int32_t | val | ) |
Definition at line 622 of file timecode.cpp.
| bool AJATimeCode::operator< | ( | const AJATimeCode & | val | ) | const |
Definition at line 557 of file timecode.cpp.
| bool AJATimeCode::operator< | ( | const int32_t | val | ) | const |
Definition at line 563 of file timecode.cpp.
| AJATimeCode & AJATimeCode::operator= | ( | const AJATimeCode & | val | ) |
Definition at line 531 of file timecode.cpp.
| bool AJATimeCode::operator== | ( | const AJATimeCode & | val | ) | const |
Definition at line 544 of file timecode.cpp.
| bool AJATimeCode::operator> | ( | const AJATimeCode & | val | ) | const |
Definition at line 573 of file timecode.cpp.
| bool AJATimeCode::operator> | ( | const int32_t | val | ) | const |
Definition at line 579 of file timecode.cpp.
| uint32_t AJATimeCode::QueryFrame | ( | void | ) | const |
| void AJATimeCode::QueryHmsf | ( | uint32_t & | h, |
| uint32_t & | m, | ||
| uint32_t & | s, | ||
| uint32_t & | f, | ||
| const AJATimeBase & | timeBase, | ||
| bool | bDropFrame | ||
| ) | const |
Query hmsf values showing timecode for current frame count given the passed parameters.
| [out] | h | place in which to put hours value. |
| [out] | m | place in which to put minutes value. |
| [out] | s | place in which to put seconds value. |
| [out] | f | place in which to put frames value. |
| [in] | timeBase | frame rate from which to calculate string. |
| [in] | bDropFrame | drop frame value for string. |
Definition at line 109 of file timecode.cpp.
|
static |
Query string showing timecode for current frame count given the passed parameters.
| [in] | str | string with timecode |
Definition at line 81 of file timecode.cpp.
|
static |
Query if rp188 data is drop frame or not
| [in] | inDBB | Specifies the DBB bits of the RP188 struct. |
| [in] | inLo | Specifies the lo-order 32-bit word of the RP188 struct. |
| [in] | inHi | Specifies the hi-order 32-bit word of the RP188 struct. |
Definition at line 449 of file timecode.cpp.
| void AJATimeCode::QueryRP188 | ( | uint32_t & | outDBB, |
| uint32_t & | outLo, | ||
| uint32_t & | outHi, | ||
| const AJATimeBase & | timeBase, | ||
| const bool | bDrop | ||
| ) |
Get RP188 register values using the given timebase, and drop frame.
| [out] | outDBB | Receives the DBB component. |
| [out] | outLo | Receives the low byte component. |
| [out] | outHi | Receives the high byte component. |
| [in] | timeBase | Specifies the AJATimeBase to use. |
| [in] | bDrop | Specify true if forcing drop-frame; otherwise false. |
Definition at line 513 of file timecode.cpp.
| void AJATimeCode::QueryRP188 | ( | uint32_t * | pDbb, |
| uint32_t * | pLow, | ||
| uint32_t * | pHigh, | ||
| const AJATimeBase & | timeBase, | ||
| bool | bDrop | ||
| ) |
Get RP188 register values using the given timebase, and drop frame.
| [in] | pDbb | If non-NULL, points to the variable to receive the DBB component. |
| [in] | pLow | If non-NULL, points to the variable to receive the low byte component. |
| [in] | pHigh | If non-NULL, points to the variable to receive the high byte component. |
| [in] | timeBase | Specifies the AJATimeBase to use. |
| [in] | bDrop | Specify true if forcing drop-frame; otherwise false. |
Definition at line 504 of file timecode.cpp.
| void AJATimeCode::QuerySMPTEString | ( | char * | pString, |
| const AJATimeBase & | timeBase, | ||
| bool | bDropFrame | ||
| ) |
Query SMPTE string showing timecode for current frame count given the passed parameters.
| [out] | pString | buffer in which to place string. |
| [in] | timeBase | frame rate from which to calculate string. |
| [in] | bDropFrame | drop frame value for string. |
Definition at line 261 of file timecode.cpp.
|
static |
Query SMPTE string byte count.
Definition at line 256 of file timecode.cpp.
|
inline |
Query HFR divide-by-two flag.
Definition at line 67 of file timecode.h.
| void AJATimeCode::QueryString | ( | char * | pString, |
| const AJATimeBase & | timeBase, | ||
| bool | bDropFrame | ||
| ) |
Definition at line 248 of file timecode.cpp.
| void AJATimeCode::QueryString | ( | std::string & | str, |
| const AJATimeBase & | timeBase, | ||
| bool | bDropFrame | ||
| ) |
Query string showing timecode for current frame count given the passed parameters.
| [out] | str | string in which to place timecode. |
| [in] | timeBase | frame rate from which to calculate string. |
| [in] | bDropFrame | drop frame value for string. |
Definition at line 225 of file timecode.cpp.
|
static |
Definition at line 89 of file timecode.cpp.
| void AJATimeCode::Set | ( | const std::string & | str, |
| const AJATimeBase & | timeBase | ||
| ) |
Set current frame number.
| [in] | str | xx:xx:xx:xx style string representing new frame number. |
| [in] | timeBase | frame rate associated with pString. |
Definition at line 370 of file timecode.cpp.
| void AJATimeCode::Set | ( | const std::string & | str, |
| const AJATimeBase & | timeBase, | ||
| bool | bDropFrame | ||
| ) |
Set current frame number.
| [in] | str | xx:xx:xx:xx style string representing new frame number. |
| [in] | timeBase | frame rate associated with pString. |
| [in] | bDropFrame | true if forcing dropframe, false otherwise. |
Definition at line 337 of file timecode.cpp.
| void AJATimeCode::Set | ( | uint32_t | frame | ) |
Set current frame number.
| [in] | frame | new frame number. |
Definition at line 279 of file timecode.cpp.
| void AJATimeCode::SetHmsf | ( | uint32_t | h, |
| uint32_t | m, | ||
| uint32_t | s, | ||
| uint32_t | f, | ||
| const AJATimeBase & | timeBase, | ||
| bool | bDropFrame | ||
| ) |
Set current frame number.
| [in] | h | hours value. |
| [in] | m | minutes value. |
| [in] | s | seconds value. |
| [in] | f | frames value. |
| [in] | timeBase | frame rate associated with hmsf. |
| [in] | bDropFrame | true if forcing dropframe, false otherwise. |
Definition at line 284 of file timecode.cpp.
| void AJATimeCode::SetRP188 | ( | const uint32_t | inDBB, |
| const uint32_t | inLo, | ||
| const uint32_t | inHi, | ||
| const AJATimeBase & | inTimeBase | ||
| ) |
Set timecode via RP188 bytes.
| [in] | inDBB | Specifies the DBB bits of the RP188 struct. |
| [in] | inLo | Specifies the lo-order 32-bit word of the RP188 struct. |
| [in] | inHi | Specifies the hi-order 32-bit word of the RP188 struct. |
| [in] | inTimeBase | Specifies the time base to use. |
Definition at line 457 of file timecode.cpp.
| void AJATimeCode::SetSMPTEString | ( | const char * | pBufr, |
| const AJATimeBase & | timeBase | ||
| ) |
Set timecode via a SMPTE string.
| [in] | pBufr | pointer to string. |
| [in] | timeBase | time base associated with string. |
Definition at line 435 of file timecode.cpp.
|
inline |
Set HFR divide-by-two flag.
| [in] | bStdTc | Set true when using standard TC notation for HFR (e.g 01:00:00:59 -> 01:00:00:29*), set to true by default |
Definition at line 175 of file timecode.h.
| void AJATimeCode::SetWithCleanup | ( | const std::string & | str, |
| const AJATimeBase & | timeBase, | ||
| bool | bDrop | ||
| ) |
Set current frame number. A variant which may have junk in the string.
| [in] | str | xx:xx:xx:xx style string representing new frame number. |
| [in] | timeBase | frame rate associated with pString. |
| [in] | bDrop | true if drop frame |
Definition at line 386 of file timecode.cpp.
| uint32_t AJATimeCode::m_frame |
Definition at line 213 of file timecode.h.
| bool AJATimeCode::m_stdTimecodeForHfr |
Definition at line 214 of file timecode.h.