AJA NTV2 SDK  17.0.1.1246
NTV2 SDK 17.0.1.1246
ntv2outputtestpattern.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
9 // Includes
10 #include "ntv2outputtestpattern.h"
11 #include "ntv2devicescanner.h"
12 #include "ntv2testpatterngen.h"
13 #include "ajabase/system/process.h"
14 
15 #define AsULWordPtr(_p_) reinterpret_cast<const ULWord*> (_p_)
16 
17 
18 using namespace std;
19 
20 
21 const uint32_t kAppSignature (NTV2_FOURCC('T','e','s','t'));
22 
23 
24 AJALabelValuePairs TestPatConfig::Get (const bool inCompact) const
25 {
26  AJALabelValuePairs result (PlayerConfig::Get (inCompact));
27  AJASystemInfo::append(result, "Background Pattern", fTestPatternName);
28  return result;
29 }
30 
31 std::ostream & operator << (std::ostream & ioStrm, const TestPatConfig & inObj)
32 {
33  return ioStrm << AJASystemInfo::ToString(inObj.Get());
34 }
35 
36 
38  : mConfig (inConfig),
39  mDeviceID (DEVICE_ID_NOTFOUND),
40  mSavedTaskMode (NTV2_TASK_MODE_INVALID),
41  mSavedConnections ()
42 {
43 } // constructor
44 
45 
47 {
48  // Restore prior widget routing...
49  mDevice.ApplySignalRoute(mSavedConnections, /*replace?*/true);
50 
51  // Restore the prior service level, and release the device...
52  mDevice.SetEveryFrameServices(mSavedTaskMode);
53  mDevice.ReleaseStreamForApplication (kAppSignature, static_cast<int32_t>(AJAProcess::GetPid()));
54 
55 } // destructor
56 
57 
59 {
60  // Open the device...
62  {cerr << "## ERROR: Device '" << mConfig.fDeviceSpec << "' not found" << endl; return AJA_STATUS_OPEN;}
63  mDeviceID = mDevice.GetDeviceID(); // Keep this ID handy -- it's used frequently
64 
65  if (!mDevice.IsDeviceReady(false))
66  {cerr << "## ERROR: Device '" << mDevice.GetDisplayName() << "' not ready" << endl; return AJA_STATUS_INITIALIZE;}
67  if (!::NTV2DeviceCanDoPlayback(mDeviceID))
68  {cerr << "## ERROR: '" << mDevice.GetDisplayName() << "' is capture-only" << endl; return AJA_STATUS_FEATURE;}
69 
70  const UWord maxNumChannels (::NTV2DeviceGetNumFrameStores(mDeviceID));
71 
72  if ((mConfig.fOutputChannel == NTV2_CHANNEL1) && (!::NTV2DeviceCanDoFrameStore1Display(mDeviceID)))
73  { // Some older devices (e.g. Corvid1) can only output from FrameStore 2...
74  mConfig.fOutputChannel = NTV2_CHANNEL2;
75  cerr << "## WARNING: '" << mDevice.GetDisplayName() << "' switched to Ch2 (Ch1 is input-only)" << endl;
76  }
77  if (UWord(mConfig.fOutputChannel) >= maxNumChannels)
78  {
79  cerr << "## ERROR: '" << mDevice.GetDisplayName() << "' can't use Ch" << DEC(mConfig.fOutputChannel+1)
80  << " -- only supports Ch1" << (maxNumChannels > 1 ? string("-Ch") + string(1, char(maxNumChannels+'0')) : "") << endl;
82  }
83 
84  if (!mConfig.fDoMultiFormat)
85  {
86  mDevice.GetConnections(mSavedConnections); // Save current routing, so it can be restored later
87  mDevice.GetEveryFrameServices(mSavedTaskMode); // Save the current task mode
89  return AJA_STATUS_BUSY; // Device is in use by another app -- fail
90  }
91  mDevice.SetEveryFrameServices(NTV2_OEM_TASKS); // Set OEM service level
92 
93  if (::NTV2DeviceCanDoMultiFormat(mDeviceID))
94  mDevice.SetMultiFormatMode(mConfig.fDoMultiFormat);
95  else
96  mConfig.fDoMultiFormat = false;
97 
98  // Set up the desired video configuration...
99  AJAStatus status (SetUpVideo());
100  if (AJA_FAILURE(status))
101  return status;
102 
103  #if defined(_DEBUG)
104  cerr << mConfig << endl;
105  #endif // defined(_DEBUG)
106  return AJA_STATUS_SUCCESS;
107 
108 } // Init
109 
110 
112 {
113  if (mConfig.fVideoFormat == NTV2_FORMAT_UNKNOWN)
114  {
115  // User didn't specify a video format.
116  // Get the device's current video format and use it to create the test pattern...
117  bool enabled(false);
118  mDevice.IsChannelEnabled(mConfig.fOutputChannel, enabled);
119  if (!enabled)
120  if (!mDevice.GetVideoFormat (mConfig.fVideoFormat, mConfig.fOutputChannel))
121  return AJA_STATUS_FAIL;
122 
123  // Read the current VANC mode, as this can affect the NTV2FormatDescriptor and host frame buffer size...
124  if (!mDevice.GetVANCMode (mConfig.fVancMode, mConfig.fOutputChannel))
125  return AJA_STATUS_FAIL;
126  }
127 
128  if (mConfig.fVideoFormat != NTV2_FORMAT_UNKNOWN)
129  {
130  // User specified a video format -- is it legal for this device?
131  if (!::NTV2DeviceCanDoVideoFormat(mDeviceID, mConfig.fVideoFormat))
132  { cerr << "## ERROR: '" << mDevice.GetDisplayName() << "' cannot do " << ::NTV2VideoFormatToString(mConfig.fVideoFormat) << endl;
133  return AJA_STATUS_UNSUPPORTED;
134  }
135 
136  // Set the video format -- is it legal for this device?
137  if (!mDevice.SetVideoFormat (mConfig.fVideoFormat, /*retail?*/false, /*keepVANC*/false, mConfig.fOutputChannel))
138  { cerr << "## ERROR: SetVideoFormat '" << ::NTV2VideoFormatToString(mConfig.fVideoFormat) << "' failed" << endl;
139  return AJA_STATUS_FAIL;
140  }
141 
142  // Set the VANC mode
144  { cerr << "## ERROR: SetEnableVANCData '" << ::NTV2VANCModeToString(mConfig.fVancMode,true) << "' failed" << endl;
145  return AJA_STATUS_FAIL;
146  }
147  }
148 
149  // SD/HD/2K only -- no 4K or 8K...
151  { cerr << "## ERROR: This demo only supports SD/HD/2K1080, not '" << ::NTV2VideoFormatToString(mConfig.fVideoFormat) << "'" << endl;
152  return AJA_STATUS_UNSUPPORTED;
153  }
154 
155  // This is a "playback" application, so set the board reference to free run...
156  if (!mDevice.SetReference(NTV2_REFERENCE_FREERUN))
157  return AJA_STATUS_FAIL;
158 
159  // Set the FrameStore's pixel format...
160  if (!mDevice.SetFrameBufferFormat (mConfig.fOutputChannel, mConfig.fPixelFormat))
161  return AJA_STATUS_FAIL;
162 
163  // Enable the FrameStore (if currently disabled)...
164  mDevice.EnableChannel(mConfig.fOutputChannel);
165 
166  // Set the FrameStore mode to "playout" (not capture)...
167  if (!mDevice.SetMode (mConfig.fOutputChannel, NTV2_MODE_DISPLAY))
168  return AJA_STATUS_FAIL;
169 
170  // Enable SDI output from the channel being used, but only if the device supports bi-directional SDI...
171  if (::NTV2DeviceHasBiDirectionalSDI(mDeviceID))
172  mDevice.SetSDITransmitEnable (mConfig.fOutputChannel, true);
173 
174  return AJA_STATUS_SUCCESS;
175 
176 } // SetUpVideo
177 
178 
180 {
181  NTV2XptConnections connections;
182 
183  // Build a set of crosspoint connections (input-to-output)
184  // between the relevant signal processing widgets on the device.
185  // By default, the main output crosspoint that feeds the SDI output widgets is the FrameStore's video output:
187  if (::IsRGBFormat(mConfig.fPixelFormat))
188  { // Even though this demo defaults to using an 8-bit YUV frame buffer,
189  // this code block allows it to work with RGB frame buffers, which
190  // necessitate inserting a CSC between the FrameStore and the SDI output(s)...
191  connections.insert(NTV2Connection(::GetCSCInputXptFromChannel(mConfig.fOutputChannel), outputXpt)); // CSC video input to FrameStore output
192  outputXpt = ::GetCSCOutputXptFromChannel(mConfig.fOutputChannel); // The CSC output feeds all SDIOut inputs
193  }
194 
195  // Route all SDI outputs to the outputXpt...
197  const NTV2Standard videoStd (::GetNTV2StandardFromVideoFormat(mConfig.fVideoFormat));
198  const NTV2ChannelList sdiOuts (::NTV2MakeChannelList(sdiOutputs));
199 
200  // Some devices have bi-directional SDI connectors...
201  if (::NTV2DeviceHasBiDirectionalSDI(mDeviceID))
202  mDevice.SetSDITransmitEnable (sdiOutputs, true); // Set to "transmit"
203 
204  // For every SDI output, set video standard, and disable level A/B conversion...
205  mDevice.SetSDIOutputStandard (sdiOutputs, videoStd);
206  mDevice.SetSDIOutLevelAtoLevelBConversion(sdiOutputs, false);
207  mDevice.SetSDIOutRGBLevelAConversion(sdiOutputs, false);
208 
209  // Connect each SDI output to the main output crosspoint...
210  for (size_t ndx(0); ndx < sdiOutputs.size(); ndx++)
211  {
212  const NTV2Channel sdiOut(sdiOuts.at(ndx));
213  connections.insert(NTV2Connection(::GetSDIOutputInputXpt(sdiOut), outputXpt));
214  }
215 
216  // And connect analog video output, if the device has one...
217  if (::NTV2DeviceGetNumAnalogVideoOutputs(mDeviceID))
218  connections.insert(NTV2Connection(::GetOutputDestInputXpt(NTV2_OUTPUTDESTINATION_ANALOG), outputXpt));
219 
220  // And connect HDMI video output, if the device has one...
221  if (::NTV2DeviceGetNumHDMIVideoOutputs(mDeviceID))
222  connections.insert(NTV2Connection(::GetOutputDestInputXpt(NTV2_OUTPUTDESTINATION_HDMI), outputXpt));
223 
224  // Apply all the accumulated connections...
225  mDevice.ApplySignalRoute(connections, /*replaceExistingRoutes*/true);
226 
227 } // RouteOutputSignal
228 
229 
231 {
232  // Connect the FrameStore to the video output...
234 
235  // Allocate a host video buffer that will hold our test pattern raster...
236  NTV2FormatDescriptor fd (mConfig.fVideoFormat, mConfig.fPixelFormat, mConfig.fVancMode);
237  NTV2Buffer hostBuffer (fd.GetTotalBytes());
238  if (hostBuffer.IsNULL())
239  return AJA_STATUS_MEMORY;
240 
241  // Write the requested test pattern into host buffer...
242  NTV2TestPatternGen testPatternGen;
243  testPatternGen.setVANCToLegalBlack(fd.IsVANC());
244  if (!testPatternGen.DrawTestPattern (mConfig.fTestPatternName, fd, hostBuffer))
245  return AJA_STATUS_FAIL;
246 
247  // Find out which frame is currently being output from the frame store...
248  uint32_t currentOutputFrame(0);
249  if (!mDevice.GetOutputFrame (mConfig.fOutputChannel, currentOutputFrame))
250  return AJA_STATUS_FAIL; // ReadRegister failure?
251 
252  // Now simply transfer the contents of the host buffer to the device's current output frame...
253  if (!mDevice.DMAWriteFrame (currentOutputFrame, // Device frame number
254  AsULWordPtr(fd.GetRowAddress(hostBuffer.GetHostPointer(), 0)), // Host buffer address
255  hostBuffer.GetByteCount())) // # bytes to xfer
256  return AJA_STATUS_FAIL;
257 
258  return AJA_STATUS_SUCCESS;
259 
260 } // EmitPattern
NTV2TestPatternGen::DrawTestPattern
virtual bool DrawTestPattern(const std::string &inTPName, const NTV2FormatDescriptor &inFormatDesc, NTV2Buffer &inBuffer)
Renders the given test pattern or color into a host raster buffer.
CNTV2Card::GetConnections
virtual bool GetConnections(NTV2XptConnections &outConnections)
Answers with the device's current widget routing connections.
Definition: ntv2regroute.cpp:345
PlayerConfig::Get
AJALabelValuePairs Get(const bool inCompact=false) const
Renders a human-readable representation of me.
Definition: ntv2democommon.cpp:1715
CNTV2Card::SetMultiFormatMode
virtual bool SetMultiFormatMode(const bool inEnable)
Enables or disables multi-format (per channel) device operation. If enabled, each device channel can ...
Definition: ntv2register.cpp:4281
GetSDIOutputInputXpt
NTV2InputXptID GetSDIOutputInputXpt(const NTV2Channel inSDIOutput, const bool inIsDS2=false)
Definition: ntv2signalrouter.cpp:942
NTV2_IS_VANCMODE_TALLER
#define NTV2_IS_VANCMODE_TALLER(__v__)
Definition: ntv2enums.h:3721
ntv2outputtestpattern.h
NTV2_FOURCC
#define NTV2_FOURCC(_a_, _b_, _c_, _d_)
Definition: ntv2publicinterface.h:5413
NTV2_CHANNEL2
@ NTV2_CHANNEL2
Specifies channel or Frame Store 2 (or the 2nd item).
Definition: ntv2enums.h:1308
NTV2FormatDescriptor
Describes a video frame for a given video standard or format and pixel format, including the total nu...
Definition: ntv2formatdescriptor.h:41
NTV2FormatDescriptor::GetRowAddress
const void * GetRowAddress(const void *pInStartAddress, const ULWord inRowIndex0, const UWord inPlaneIndex0=0) const
Definition: ntv2formatdescriptor.cpp:997
CNTV2Card::ApplySignalRoute
virtual bool ApplySignalRoute(const CNTV2SignalRouter &inRouter, const bool inReplace=false)
Applies the given routing table to the AJA device.
Definition: ntv2regroute.cpp:242
NTV2Channel
NTV2Channel
These enum values are mostly used to identify a specific Frame Store. They're also commonly used to i...
Definition: ntv2enums.h:1305
NTV2Buffer
A generic user-space buffer object that has an address and a length. Used most often to share an arbi...
Definition: ntv2publicinterface.h:5967
AJA_STATUS_SUCCESS
@ AJA_STATUS_SUCCESS
Definition: types.h:368
TestPatConfig
Configures an NTV2OutputTestPattern instance.
Definition: ntv2outputtestpattern.h:18
NTV2Buffer::GetByteCount
ULWord GetByteCount(void) const
Definition: ntv2publicinterface.h:6040
AJA_STATUS_BUSY
@ AJA_STATUS_BUSY
Definition: types.h:378
CNTV2DeviceScanner::GetFirstDeviceFromArgument
static bool GetFirstDeviceFromArgument(const std::string &inArgument, CNTV2Card &outDevice)
Rescans the host, and returns an open CNTV2Card instance for the AJA device that matches a command li...
Definition: ntv2devicescanner.cpp:327
NTV2MakeChannelList
NTV2ChannelList NTV2MakeChannelList(const NTV2Channel inFirstChannel, const UWord inNumChannels=1)
Definition: ntv2publicinterface.cpp:3311
NTV2DeviceCanDoMultiFormat
bool NTV2DeviceCanDoMultiFormat(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:4065
ntv2testpatterngen.h
Declares the NTV2TestPatternGen class.
AsULWordPtr
#define AsULWordPtr(_p_)
Definition: ntv2outputtestpattern.cpp:15
CNTV2MacDriverInterface::ReleaseStreamForApplication
virtual bool ReleaseStreamForApplication(ULWord inApplicationType, int32_t inProcessID)
Releases exclusive use of the AJA device for the given process, permitting other processes to acquire...
Definition: ntv2macdriverinterface.cpp:832
AJA_STATUS_MEMORY
@ AJA_STATUS_MEMORY
Definition: types.h:384
PlayerConfig::fDoMultiFormat
bool fDoMultiFormat
If true, enable device-sharing; otherwise take exclusive control of device.
Definition: ntv2democommon.h:323
NTV2DeviceCanDoFrameStore1Display
bool NTV2DeviceCanDoFrameStore1Display(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:2716
CNTV2Card::GetVANCMode
virtual bool GetVANCMode(NTV2VANCMode &outVancMode, const NTV2Channel inChannel=NTV2_CHANNEL1)
Retrieves the current VANC mode for the given FrameStore.
Definition: ntv2register.cpp:2744
NTV2OutputTestPattern::NTV2OutputTestPattern
NTV2OutputTestPattern(const TestPatConfig &inConfig)
Constructs me using the given configuration settings.
Definition: ntv2outputtestpattern.cpp:37
NTV2_IS_8K_VIDEO_FORMAT
#define NTV2_IS_8K_VIDEO_FORMAT(__f__)
Definition: ntv2enums.h:852
PlayerConfig::fVancMode
NTV2VANCMode fVancMode
VANC mode to use.
Definition: ntv2democommon.h:320
NTV2_CHANNEL1
@ NTV2_CHANNEL1
Specifies channel or Frame Store 1 (or the first item).
Definition: ntv2enums.h:1307
CNTV2Card::SetSDITransmitEnable
virtual bool SetSDITransmitEnable(const NTV2Channel inChannel, const bool inEnable)
Sets the specified bidirectional SDI connector to act as an input or an output.
Definition: ntv2register.cpp:3805
NTV2OutputTestPattern::RouteOutputSignal
void RouteOutputSignal(void)
Sets up board routing for playout.
Definition: ntv2outputtestpattern.cpp:179
CNTV2Card::SetVideoFormat
virtual bool SetVideoFormat(const NTV2VideoFormat inVideoFormat, const bool inIsAJARetail=true, const bool inKeepVancSettings=false, const NTV2Channel inChannel=NTV2_CHANNEL1)
Configures the AJA device to handle a specific video format.
Definition: ntv2register.cpp:204
NTV2DeviceCanDoVideoFormat
bool NTV2DeviceCanDoVideoFormat(const NTV2DeviceID inDeviceID, const NTV2VideoFormat inVideoFormat)
Definition: ntv2devicefeatures.hpp:18535
NTV2_IS_4K_VIDEO_FORMAT
#define NTV2_IS_4K_VIDEO_FORMAT(__f__)
Definition: ntv2enums.h:746
NTV2OutputTestPattern::EmitPattern
AJAStatus EmitPattern(void)
Generates, transfers and displays the test pattern on the output.
Definition: ntv2outputtestpattern.cpp:230
GetOutputDestInputXpt
NTV2InputXptID GetOutputDestInputXpt(const NTV2OutputDestination inOutputDest, const bool inIsSDI_DS2=false, const UWord inHDMI_Quadrant=99)
Definition: ntv2signalrouter.cpp:928
CNTV2Card::GetDisplayName
virtual std::string GetDisplayName(void)
Answers with this device's display name.
Definition: ntv2card.cpp:84
AJAStatus
AJAStatus
Definition: types.h:365
NTV2OutputTestPattern::~NTV2OutputTestPattern
~NTV2OutputTestPattern(void)
Definition: ntv2outputtestpattern.cpp:46
process.h
Declares the AJAProcess class.
CNTV2Card::GetOutputFrame
virtual bool GetOutputFrame(const NTV2Channel inChannel, ULWord &outValue)
Answers with the current output frame number for the given FrameStore (expressed as an NTV2Channel).
Definition: ntv2register.cpp:2216
NTV2Standard
NTV2Standard
Identifies a particular video standard.
Definition: ntv2enums.h:153
AJA_STATUS_FEATURE
@ AJA_STATUS_FEATURE
Definition: types.h:380
CNTV2Card::GetVideoFormat
virtual bool GetVideoFormat(NTV2VideoFormat &outValue, NTV2Channel inChannel=NTV2_CHANNEL1)
Definition: ntv2register.cpp:332
AJA_STATUS_FAIL
@ AJA_STATUS_FAIL
Definition: types.h:369
NTV2Buffer::IsNULL
bool IsNULL(void) const
Definition: ntv2publicinterface.h:6062
TestPatConfig::fTestPatternName
std::string fTestPatternName
Name of the test pattern to use.
Definition: ntv2outputtestpattern.h:21
AJASystemInfo::append
static AJALabelValuePairs & append(AJALabelValuePairs &inOutTable, const std::string &inLabel, const std::string &inValue=std::string())
A convenience function that appends the given label and value strings to the provided AJALabelValuePa...
Definition: info.h:168
ntv2devicescanner.h
Declares the CNTV2DeviceScanner class.
NTV2DeviceHasBiDirectionalSDI
bool NTV2DeviceHasBiDirectionalSDI(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:6454
NTV2FormatDescriptor::GetTotalBytes
ULWord GetTotalBytes(void) const
Definition: ntv2formatdescriptor.cpp:851
CNTV2Card::SetReference
virtual bool SetReference(const NTV2ReferenceSource inRefSource, const bool inKeepFramePulseSelect=false)
Sets the device's clock reference source. See Device Clocking and Synchronization for more informatio...
Definition: ntv2register.cpp:1486
CNTV2Card::SetSDIOutRGBLevelAConversion
virtual bool SetSDIOutRGBLevelAConversion(const UWord inOutputSpigot, const bool inEnable)
Enables or disables an RGB-over-3G-level-A conversion at the SDI output widget (assuming the AJA devi...
Definition: ntv2register.cpp:4249
GetCSCOutputXptFromChannel
NTV2OutputXptID GetCSCOutputXptFromChannel(const NTV2Channel inCSC, const bool inIsKey=false, const bool inIsRGB=false)
Definition: ntv2signalrouter.cpp:819
AJASystemInfo::ToString
virtual void ToString(std::string &outAllLabelsAndValues) const
Answers with a multi-line string that contains the complete host system info table.
AJAProcess::GetPid
static uint64_t GetPid()
Definition: process.cpp:35
NTV2DeviceGetNumHDMIVideoOutputs
UWord NTV2DeviceGetNumHDMIVideoOutputs(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:10855
UWord
uint16_t UWord
Definition: ajatypes.h:244
PlayerConfig::fVideoFormat
NTV2VideoFormat fVideoFormat
The video format to use.
Definition: ntv2democommon.h:319
NTV2VANCModeToString
std::string NTV2VANCModeToString(const NTV2VANCMode inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:6521
NTV2_IS_VANCMODE_ON
#define NTV2_IS_VANCMODE_ON(__v__)
Definition: ntv2enums.h:3722
NTV2_REFERENCE_FREERUN
@ NTV2_REFERENCE_FREERUN
Specifies the device's internal clock.
Definition: ntv2enums.h:1404
PlayerConfig::fOutputChannel
NTV2Channel fOutputChannel
The device channel to use.
Definition: ntv2democommon.h:315
NTV2VideoFormatToString
std::string NTV2VideoFormatToString(const NTV2VideoFormat inValue, const bool inUseFrameRate=false)
Definition: ntv2utils.cpp:6750
GetCSCInputXptFromChannel
NTV2InputXptID GetCSCInputXptFromChannel(const NTV2Channel inCSC, const bool inIsKeyInput=false)
Definition: ntv2signalrouter.cpp:775
NTV2DeviceGetNumFrameStores
UWord NTV2DeviceGetNumFrameStores(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:10487
NTV2DeviceGetNumAnalogVideoOutputs
UWord NTV2DeviceGetNumAnalogVideoOutputs(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:9775
NTV2Connection
std::pair< NTV2InputXptID, NTV2OutputXptID > NTV2Connection
This links an NTV2InputXptID and an NTV2OutputXptID.
Definition: ntv2signalrouter.h:38
NTV2_TASK_MODE_INVALID
@ NTV2_TASK_MODE_INVALID
Definition: ntv2publicinterface.h:4262
CNTV2DriverInterface::IsDeviceReady
virtual bool IsDeviceReady(const bool inCheckValid=(0))
Definition: ntv2driverinterface.cpp:1228
NTV2DeviceCanDoPlayback
bool NTV2DeviceCanDoPlayback(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:4438
kDemoAppSignature
static const ULWord kDemoAppSignature((((uint32_t)( 'D'))<< 24)|(((uint32_t)( 'E'))<< 16)|(((uint32_t)( 'M'))<< 8)|(((uint32_t)( 'O'))<< 0))
NTV2ChannelSet
std::set< NTV2Channel > NTV2ChannelSet
A set of distinct NTV2Channel values.
Definition: ntv2publicinterface.h:3823
NTV2OutputTestPattern::Init
AJAStatus Init(void)
Initializes me and prepares me to Run.
Definition: ntv2outputtestpattern.cpp:58
CNTV2Card::SetEveryFrameServices
virtual bool SetEveryFrameServices(const NTV2EveryFrameTaskMode inMode)
Sets the device's task mode.
Definition: ntv2register.cpp:179
AJA_STATUS_UNSUPPORTED
@ AJA_STATUS_UNSUPPORTED
Definition: types.h:381
NTV2TestPatternGen
The NTV2 test pattern generator.
Definition: ntv2testpatterngen.h:67
NTV2ChannelList
std::vector< NTV2Channel > NTV2ChannelList
An ordered sequence of NTV2Channel values.
Definition: ntv2publicinterface.h:3804
NTV2Buffer::GetHostPointer
void * GetHostPointer(void) const
Definition: ntv2publicinterface.h:6023
NTV2_FORMAT_UNKNOWN
@ NTV2_FORMAT_UNKNOWN
Definition: ntv2enums.h:498
AJA_STATUS_INITIALIZE
@ AJA_STATUS_INITIALIZE
Definition: types.h:373
DEC
#define DEC(__x__)
Definition: ntv2publicinterface.h:5579
CNTV2Card::SetSDIOutputStandard
virtual bool SetSDIOutputStandard(const UWord inOutputSpigot, const NTV2Standard inValue)
Sets the SDI output spigot's video standard.
Definition: ntv2register.cpp:3216
NTV2_OUTPUTDESTINATION_HDMI
@ NTV2_OUTPUTDESTINATION_HDMI
Definition: ntv2enums.h:1279
operator<<
std::ostream & operator<<(std::ostream &ioStrm, const TestPatConfig &inObj)
Definition: ntv2outputtestpattern.cpp:31
GetFrameBufferOutputXptFromChannel
NTV2OutputXptID GetFrameBufferOutputXptFromChannel(const NTV2Channel inFrameStore, const bool inIsRGB=false, const bool inIs425=false)
Definition: ntv2signalrouter.cpp:845
PlayerConfig::fDeviceSpec
std::string fDeviceSpec
The AJA device to use.
Definition: ntv2democommon.h:313
NTV2XptConnections
std::map< NTV2InputXptID, NTV2OutputXptID > NTV2XptConnections
Definition: ntv2signalrouter.h:39
NTV2MakeChannelSet
NTV2ChannelSet NTV2MakeChannelSet(const NTV2Channel inFirstChannel, const UWord inNumChannels=1)
Definition: ntv2publicinterface.cpp:3294
IsRGBFormat
bool IsRGBFormat(const NTV2FrameBufferFormat format)
Definition: ntv2utils.cpp:5442
CNTV2MacDriverInterface::AcquireStreamForApplication
virtual bool AcquireStreamForApplication(ULWord inApplicationType, int32_t inProcessID)
Reserves exclusive use of the AJA device for a given process, preventing other processes on the host ...
Definition: ntv2macdriverinterface.cpp:808
CNTV2Card::IsChannelEnabled
virtual bool IsChannelEnabled(const NTV2Channel inChannel, bool &outEnabled)
Answers whether or not the given FrameStore is enabled.
Definition: ntv2register.cpp:2138
CNTV2DriverInterface::GetDeviceID
virtual NTV2DeviceID GetDeviceID(void)
Definition: ntv2driverinterface.cpp:371
CNTV2Card::GetEveryFrameServices
virtual bool GetEveryFrameServices(NTV2EveryFrameTaskMode &outMode)
Retrieves the device's current "retail service" task mode.
Definition: ntv2register.cpp:184
CNTV2Card::DMAWriteFrame
virtual bool DMAWriteFrame(const ULWord inFrameNumber, const ULWord *pInFrameBuffer, const ULWord inByteCount)
Transfers a single frame from the host to the AJA device.
Definition: ntv2dma.cpp:65
CNTV2Card::SetEnableVANCData
virtual bool SetEnableVANCData(const bool inVANCenabled, const bool inTallerVANC, const NTV2Standard inStandard, const NTV2FrameGeometry inGeometry, const NTV2Channel inChannel=NTV2_CHANNEL1)
Definition: ntv2register.cpp:2736
kAppSignature
const uint32_t kAppSignature(((((uint32_t)( 'T'))<< 24)|(((uint32_t)( 'e'))<< 16)|(((uint32_t)( 's'))<< 8)|(((uint32_t)( 't'))<< 0)))
GetNTV2StandardFromVideoFormat
NTV2Standard GetNTV2StandardFromVideoFormat(const NTV2VideoFormat inVideoFormat)
Definition: ntv2utils.cpp:2277
PlayerConfig::fPixelFormat
NTV2PixelFormat fPixelFormat
The pixel format to use.
Definition: ntv2democommon.h:318
NTV2OutputXptID
enum NTV2OutputCrosspointID NTV2OutputXptID
NTV2DeviceGetNumVideoOutputs
UWord NTV2DeviceGetNumVideoOutputs(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:12012
AJA_STATUS_OPEN
@ AJA_STATUS_OPEN
Definition: types.h:375
CNTV2Card::SetFrameBufferFormat
virtual bool SetFrameBufferFormat(NTV2Channel inChannel, NTV2FrameBufferFormat inNewFormat, bool inIsAJARetail=true, NTV2HDRXferChars inXferChars=NTV2_VPID_TC_SDR_TV, NTV2HDRColorimetry inColorimetry=NTV2_VPID_Color_Rec709, NTV2HDRLuminance inLuminance=NTV2_VPID_Luminance_YCbCr)
Sets the frame buffer format for the given FrameStore on the AJA device.
Definition: ntv2register.cpp:1828
CNTV2Card::SetMode
virtual bool SetMode(const NTV2Channel inChannel, const NTV2Mode inNewValue, const bool inIsRetail=true)
Determines if a given FrameStore on the AJA device will be used to capture or playout video.
Definition: ntv2register.cpp:1613
AJALabelValuePairs
std::vector< AJALabelValuePair > AJALabelValuePairs
An ordered sequence of label/value pairs.
Definition: info.h:69
AJA_FAILURE
#define AJA_FAILURE(_status_)
Definition: types.h:358
CNTV2Card::EnableChannel
virtual bool EnableChannel(const NTV2Channel inChannel)
Enables the given FrameStore.
Definition: ntv2register.cpp:2113
NTV2_MODE_DISPLAY
@ NTV2_MODE_DISPLAY
Playout (output) mode, which reads from device SDRAM.
Definition: ntv2enums.h:1200
NTV2_OUTPUTDESTINATION_ANALOG
@ NTV2_OUTPUTDESTINATION_ANALOG
Definition: ntv2enums.h:1278
DEVICE_ID_NOTFOUND
@ DEVICE_ID_NOTFOUND
Invalid or "not found".
Definition: ntv2enums.h:90
NTV2OutputTestPattern::SetUpVideo
AJAStatus SetUpVideo(void)
Sets up my AJA device to play video.
Definition: ntv2outputtestpattern.cpp:111
TestPatConfig::Get
AJALabelValuePairs Get(const bool inCompact=false) const
Definition: ntv2outputtestpattern.cpp:24
NTV2TestPatternGen::setVANCToLegalBlack
NTV2TestPatternGen & setVANCToLegalBlack(const bool inClearVANC)
Changes my "clear VANC lines to legal black" setting.
Definition: ntv2testpatterngen.h:196
CNTV2Card::SetSDIOutLevelAtoLevelBConversion
virtual bool SetSDIOutLevelAtoLevelBConversion(const UWord inOutputSpigot, const bool inEnable)
Enables or disables 3G level A to 3G level B conversion at the SDI output widget (assuming the AJA de...
Definition: ntv2register.cpp:4217
NTV2_OEM_TASKS
@ NTV2_OEM_TASKS
2: OEM: Device is configured by controlling application(s), with minimal driver involvement.
Definition: ntv2publicinterface.h:4261