AJA NTV2 SDK  18.0.0.2122
NTV2 SDK 18.0.0.2122
ancillarydata_framestatusinfo5251.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
9 #include <ios>
10 #include <iomanip>
11 
12 using namespace std;
13 
14 
15 #define AJAAncillaryData_FrameStatusInfo5251_PayloadSize 0x08
16 
17 
19  : AJAAncillaryData ()
20 {
21  Init();
22 }
23 
24 
26  : AJAAncillaryData ()
27 {
28  Init();
29  *this = inClone;
30 }
31 
32 
34  : AJAAncillaryData ()
35 {
36  Init();
37  if (pInClone)
38  *this = *pInClone;
39 }
40 
41 
43  : AJAAncillaryData (pInData)
44 {
45  Init();
46 }
47 
48 
50 {
51 }
52 
53 
55 {
60  m_IsRecording = false;
61  m_IsValidFrame = true;
62 }
63 
64 
66 {
68  Init();
69 }
70 
71 
73 {
74  // Ignore self-assignment
75  if (this != &rhs)
76  {
77  // Copy the base class members
79 
80  // Copy the local members
81  m_IsRecording = rhs.m_IsRecording;
82  m_IsValidFrame = rhs.m_IsValidFrame;
83  }
84  return *this;
85 }
86 
87 
89 {
90  // The size is specific to Canon
92  {
93  // Load default values
94  Init();
95  m_rcvDataValid = false;
96  return AJA_STATUS_FAIL;
97  }
98 
99  // This is valid for the Canon C500
100  m_IsRecording = (((m_payload[0] & 0x60) == 0x20) ? true : false);
101 
102  // This is in the Canon specification, but the Canon C500 doesn't set
103  // this, thus we're placing this here just for completion in order
104  // to follow the DID:52h SDID:51h packet format.
105  m_IsValidFrame = (((m_payload[0] & 0x80) == 0x00) ? true : false);
106 
107  m_rcvDataValid = true;
108  return AJA_STATUS_SUCCESS;
109 }
110 
111 
113 {
114  if (pInAncData->GetDataCoding() == AJAAncDataCoding_Digital)
119  return AJAAncDataType_Unknown;
120 }
121 
122 
123 ostream & AJAAncillaryData_FrameStatusInfo5251::Print (ostream & debugStream, const bool bShowDetail) const
124 {
125  AJAAncillaryData::Print (debugStream, bShowDetail);
126  debugStream << endl
127  << "Recording: " << (m_IsRecording ? "Active" : "Inactive");
128  return debugStream;
129 }
virtual uint8_t GetDID(void) const
#define AJAAncillaryData_FrameStatusInfo5251_PayloadSize
AJAAncillaryData & operator=(const AJAAncillaryData &inRHS)
virtual uint8_t GetSID(void) const
This class handles "5251" Frame Status Information packets.
AJAStatus
Definition: types.h:380
virtual void Clear(void)
Frees my allocated memory, if any, and resets my members to their default values. ...
static AJAAncDataType RecognizeThisAncillaryData(const AJAAncillaryData *pInAncData)
AJAAncDataType m_ancType
One of a known set of ancillary data types (or "Custom" if not identified)
AJAAncDataType
Identifies the ancillary data types that are known to this module.
Definition: ancillarydata.h:44
const uint8_t AJAAncillaryData_FrameStatusInfo5251_SID
Definition: json.hpp:5362
virtual void Clear(void)
Frees my allocated memory, if any, and resets my members to their default values. ...
virtual AJAStatus ParsePayloadData(void)
Parses out (interprets) the "local" ancillary data from my payload data.
ByteVector m_payload
My payload data (DC = size)
AJAAncDataCoding m_coding
Analog or digital data.
virtual std::ostream & Print(std::ostream &inOutStream, const bool inDetailed=false) const
Streams a human-readable representation of me to the given output stream.
#define true
Includes data that is valid, but we don&#39;t recognize.
Definition: ancillarydata.h:46
virtual AJAAncillaryData_FrameStatusInfo5251 & operator=(const AJAAncillaryData_FrameStatusInfo5251 &inRHS)
Assignment operator – replaces my contents with the right-hand-side value.
Declares the AJAAncillaryData_FrameStatusInfo5251 class.
Frame Status Information, such as Active Frame flag.
Definition: ancillarydata.h:56
uint8_t m_SID
Official SMPTE secondary ID (or DBN - w/o parity)
virtual AJAAncDataCoding GetDataCoding(void) const
uint8_t m_DID
Official SMPTE ancillary packet ID (w/o parity)
const uint8_t AJAAncillaryData_FrameStatusInfo5251_DID
virtual uint32_t GetDC(void) const
I am the principal class that stores a single SMPTE-291 SDI ancillary data packet OR the digitized co...
virtual std::ostream & Print(std::ostream &inOutStream, const bool inDetailed=false) const
Streams a human-readable representation of me to the given output stream.
bool m_rcvDataValid
This is set true (or not) by ParsePayloadData()
The ancillary data is in the form of a SMPTE-291 Ancillary Packet.