AJA NTV2 SDK  17.1.1.1245
NTV2 SDK 17.1.1.1245
timecode.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
8 #ifndef AJA_TIMECODE_H
9 #define AJA_TIMECODE_H
11 
18 {
19 public:
20  AJATimeCode();
21  AJATimeCode(uint32_t frame);
22  AJATimeCode(const std::string &str, const AJATimeBase& timeBase, bool bDropFrame, bool bStdTc=false);
23  AJATimeCode(const std::string &str, const AJATimeBase& timeBase);
24  AJATimeCode(const AJATimeCode& other);
25 
26  virtual ~AJATimeCode();
27 
35  void QueryString(std::string &str, const AJATimeBase& timeBase, bool bDropFrame);
36  void QueryString(char *pString, const AJATimeBase& timeBase, bool bDropFrame);
37 
45  void QuerySMPTEString(char *pString, const AJATimeBase& timeBase, bool bDropFrame);
46 
52  static int QuerySMPTEStringSize(void);
53 
59  uint32_t QueryFrame(void) const;
60 
61 
67  bool QueryStdTimecodeForHfr() { return m_stdTimecodeForHfr; }
68 
79  void QueryHmsf(uint32_t &h, uint32_t &m, uint32_t &s, uint32_t &f, const AJATimeBase& timeBase, bool bDropFrame) const;
80 
86  void Set(uint32_t frame);
87 
94  void Set(const std::string &str, const AJATimeBase& timeBase);
95 
103  void SetWithCleanup(const std::string &str, const AJATimeBase& timeBase, bool bDrop);
104 
112  void Set(const std::string &str, const AJATimeBase& timeBase, bool bDropFrame);
113 
124  void SetHmsf(uint32_t h, uint32_t m, uint32_t s, uint32_t f, const AJATimeBase& timeBase, bool bDropFrame);
125 
132  void SetSMPTEString(const char *pBufr, const AJATimeBase& timeBase);
133 
142  void SetRP188 (const uint32_t inDBB, const uint32_t inLo, const uint32_t inHi, const AJATimeBase & inTimeBase);
143 
155  void QueryRP188(uint32_t *pDbb, uint32_t *pLow, uint32_t *pHigh, const AJATimeBase& timeBase, bool bDrop);
156 
168  void QueryRP188(uint32_t & outDBB, uint32_t & outLo, uint32_t & outHi, const AJATimeBase & timeBase, const bool bDrop);
169 
175  void SetStdTimecodeForHfr(bool bStdTc) {m_stdTimecodeForHfr = bStdTc;}
176 
177 
183  static bool QueryIsDropFrame(const std::string &str);
184 
185 
186  static int QueryStringSize(void);
187 
195  static bool QueryIsRP188DropFrame (const uint32_t inDBB, const uint32_t inLo, const uint32_t inHi);
196 
197  AJATimeCode& operator=(const AJATimeCode &val);
198  AJATimeCode& operator+=(const AJATimeCode &val);
199  AJATimeCode& operator-=(const AJATimeCode &val);
200  AJATimeCode& operator+=(const int32_t val);
201  AJATimeCode& operator-=(const int32_t val);
202  const AJATimeCode operator+(const AJATimeCode &val) const;
203  const AJATimeCode operator+(const int32_t val) const;
204  const AJATimeCode operator-(const AJATimeCode &val) const;
205  const AJATimeCode operator-(const int32_t val) const;
206  bool operator==(const AJATimeCode &val) const;
207  bool operator<(const AJATimeCode &val) const;
208  bool operator<(const int32_t val) const;
209  bool operator>(const AJATimeCode &val) const;
210  bool operator>(const int32_t val) const;
211  bool operator!=(const AJATimeCode &val) const;
212 
213  uint32_t m_frame;
215 protected:
216 private:
217 };
218 
219 #endif // AJA_TIMECODE_H
AJA_EXPORT
#define AJA_EXPORT
Definition: export.h:34
nlohmann::json_abiNLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON_v3_11_NLOHMANN_JSON_VERSION_PATCH::detail::operator<
bool operator<(const value_t lhs, const value_t rhs) noexcept
comparison operator for JSON types
Definition: json.hpp:2902
nlohmann::json_abiNLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON_v3_11_NLOHMANN_JSON_VERSION_PATCH::operator==
bool operator==(const json_pointer< RefStringTypeLhs > &lhs, const json_pointer< RefStringTypeRhs > &rhs) noexcept
Definition: json.hpp:14737
AJATimeCode::m_stdTimecodeForHfr
bool m_stdTimecodeForHfr
Definition: timecode.h:214
AJATimeBase
Definition: timebase.h:18
operator+=
NTV2PixelFormats & operator+=(NTV2PixelFormats &inOutSet, const NTV2PixelFormats inSet)
Appends the given NTV2FrameBufferFormatSet contents into the given set.
Definition: ntv2publicinterface.cpp:1040
AJATimeCode::SetStdTimecodeForHfr
void SetStdTimecodeForHfr(bool bStdTc)
Definition: timecode.h:175
AJATimeCode::m_frame
uint32_t m_frame
Definition: timecode.h:213
nlohmann::json_abiNLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON_v3_11_NLOHMANN_JSON_VERSION_PATCH::operator!=
bool operator!=(const json_pointer< RefStringTypeLhs > &lhs, const json_pointer< RefStringTypeRhs > &rhs) noexcept
Definition: json.hpp:14762
AJATimeCode::QueryStdTimecodeForHfr
bool QueryStdTimecodeForHfr()
Definition: timecode.h:67
AJATimeCode
Utility class for timecodes.
Definition: timecode.h:17
timebase.h
Declares the AJATimeBase class.