obs-studio/plugins/aja/aja-props.hpp
Paul Hindt ce3ae8e423
aja: Capture and Output plugin for AJA Video Systems IO devices
* aja: Initial commit of AJA capture/output plugin

* aja: Fix clang-format on aja-output-ui code

* aja: Remove script used during dev/testing

* aja: Address pull request feedback from @RytoEX

* aja: Remove the SDK sources and update CMakeLists to point to new headers-only/static libs dependency distribution.

* aja: Only build AJA plugin on x64 on macOS for now

* aja: Remove the non-English placeholder locale files. The english strings/files will be produced via crowdin, according to @ddrboxman.

* aja: Add FindLibAJANTV2.cmake script to locate the ajantv2 headers and static libs in the OBS external deps package(s). Tested on Windows x64. macOS and Linux x64 TBD.

* aja: Add ajantv2/includes to FindLibAJANTV2 include search paths

* aja: Remove commented code from aja CMakeLists

* aja: Remove debug code and comments that are no longer needed.

* aja: Fix indentation

* aja: Remove disablement of clang-format in routing table and SDIWireFormat map

* aja: Use spaces for all indentation in widget crosspoint arrays where we disable clang-format

* aja: Address code style comments made by @RytoEX

* aja: Fix uneven indentation

* aja: More fixes to if/else placement and remove superfluous comments.

* aja: Rename 'dwns' to 'deactivateWhileNotShowing' for clarity. The DeckLink plugin still uses the variable name 'dwns' and should be changed, if desired, in a separate PR.

* aja: Remove X11Extras dependency from AJA Output frontend plugin

* aja: Add patch from Jim to find AJA release/debug libs

* aja: Improve AV sync of queued video/audio sent to the AJA card in the AJA Output plugin.
2021-11-23 20:31:11 -06:00

109 lines
2.6 KiB
C++

#pragma once
#include "aja-enums.hpp"
#include <media-io/audio-io.h>
#include <ajantv2/includes/ntv2enums.h>
#include <ajantv2/includes/ntv2formatdescriptor.h>
#include <map>
#include <string>
#include <vector>
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;
private:
ULWord mVpidA;
ULWord mVpidB;
VPIDStandard mStandardA;
VPIDSampling mSamplingA;
VPIDStandard mStandardB;
VPIDSampling mSamplingB;
};
using VPIDDataList = std::vector<VPIDData>;
//TODO(paulh): Consolidate the two Props classes
class SourceProps {
public:
explicit SourceProps();
explicit SourceProps(NTV2DeviceID devID);
~SourceProps() = default;
SourceProps(const SourceProps &props);
SourceProps(SourceProps &&props);
void operator=(const SourceProps &props);
void operator=(SourceProps &&props);
bool operator==(const SourceProps &props);
bool operator!=(const SourceProps &props);
NTV2Channel Channel() const;
NTV2AudioSystem AudioSystem() const;
NTV2AudioRate AudioRate() const;
size_t AudioSize() const;
audio_format AudioFormat() const;
speaker_layout SpeakerLayout() const;
NTV2DeviceID deviceID;
IOSelection ioSelect;
NTV2InputSource inputSource;
NTV2VideoFormat videoFormat;
NTV2PixelFormat pixelFormat;
SDI4KTransport sdi4kTransport;
VPIDDataList vpids;
uint32_t audioNumChannels;
uint32_t audioSampleSize;
uint32_t audioSampleRate;
bool autoDetect;
bool deactivateWhileNotShowing;
};
class OutputProps {
public:
explicit OutputProps(NTV2DeviceID devID);
~OutputProps() = default;
OutputProps(const OutputProps &props);
OutputProps(OutputProps &&props);
void operator=(const OutputProps &props);
void operator=(OutputProps &&props);
bool operator==(const OutputProps &props);
bool operator!=(const OutputProps &props);
NTV2FormatDesc FormatDesc();
NTV2Channel Channel() const;
NTV2AudioSystem AudioSystem() const;
NTV2AudioRate AudioRate() const;
size_t AudioSize() const;
audio_format AudioFormat() const;
speaker_layout SpeakerLayout() const;
NTV2DeviceID deviceID;
IOSelection ioSelect;
NTV2OutputDestination outputDest;
NTV2VideoFormat videoFormat;
NTV2PixelFormat pixelFormat;
SDI4KTransport sdi4kTransport;
uint32_t audioNumChannels;
uint32_t audioSampleSize;
uint32_t audioSampleRate;
};