0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 04:42:18 +02:00
obs-studio/plugins/aja/aja-vpid-data.hpp
Paul Hindt 4d5e0e89ad aja: Add v210 pixel format support.
Allow selecting v210 in AJA capture plugin.

Enable auto-detection of SDI v210 pixel format.
2024-07-29 19:26:49 -04:00

47 lines
1.2 KiB
C++

#pragma once
#include <ajantv2/includes/ntv2enums.h>
#include <ajantv2/includes/ntv2vpid.h>
/*
* Wrapper class for handling SMPTE 352M Video Payload ID (VPID) data
* Each SDI data stream contains two 32-bit VPID bitfields, representing
* characteristics about the video streams on the SDI wire. AJA and other SDI
* devices may use VPID to help determine what kind of video data is being
* conveyed by the incoming/outgoing streams.
*/
class VPIDData {
public:
VPIDData();
VPIDData(ULWord vpidA, ULWord vpidB);
VPIDData(const VPIDData &other);
VPIDData(VPIDData &&other);
~VPIDData() = default;
VPIDData &operator=(const VPIDData &other);
VPIDData &operator=(VPIDData &&other);
bool operator==(const VPIDData &rhs) const;
bool operator!=(const VPIDData &rhs) const;
void SetA(ULWord vpidA);
void SetB(ULWord vpidB);
void Parse();
bool IsRGB() const;
VPIDStandard Standard() const;
VPIDSampling Sampling() const;
VPIDBitDepth BitDepth() const;
private:
ULWord mVpidA;
ULWord mVpidB;
VPIDStandard mStandardA;
VPIDSampling mSamplingA;
VPIDStandard mStandardB;
VPIDSampling mSamplingB;
VPIDBitDepth mBitDepthA;
VPIDBitDepth mBitDepthB;
};
using VPIDDataList = std::vector<VPIDData>;