aja-vpid-data.hpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #pragma once
  2. #include <ajantv2/includes/ntv2enums.h>
  3. #include <ajantv2/includes/ntv2vpid.h>
  4. /*
  5. * Wrapper class for handling SMPTE 352M Video Payload ID (VPID) data
  6. * Each SDI data stream contains two 32-bit VPID bitfields, representing
  7. * characteristics about the video streams on the SDI wire. AJA and other SDI
  8. * devices may use VPID to help determine what kind of video data is being
  9. * conveyed by the incoming/outgoing streams.
  10. */
  11. class VPIDData {
  12. public:
  13. VPIDData();
  14. VPIDData(ULWord vpidA, ULWord vpidB);
  15. VPIDData(const VPIDData &other);
  16. VPIDData(VPIDData &&other);
  17. ~VPIDData() = default;
  18. VPIDData &operator=(const VPIDData &other);
  19. VPIDData &operator=(VPIDData &&other);
  20. bool operator==(const VPIDData &rhs) const;
  21. bool operator!=(const VPIDData &rhs) const;
  22. void SetA(ULWord vpidA);
  23. void SetB(ULWord vpidB);
  24. void Parse();
  25. bool IsRGB() const;
  26. VPIDStandard Standard() const;
  27. VPIDSampling Sampling() const;
  28. VPIDBitDepth BitDepth() const;
  29. private:
  30. ULWord mVpidA;
  31. ULWord mVpidB;
  32. VPIDStandard mStandardA;
  33. VPIDSampling mSamplingA;
  34. VPIDStandard mStandardB;
  35. VPIDSampling mSamplingB;
  36. VPIDBitDepth mBitDepthA;
  37. VPIDBitDepth mBitDepthB;
  38. };
  39. using VPIDDataList = std::vector<VPIDData>;