AJA NTV2 SDK  18.0.0.2717
NTV2 SDK 18.0.0.2717
Widget Signal Routing

NTV2 device FPGA firmware implements several types of Widgets for receiving, processing and transmitting video data. These can be classified as follows:

Most widgets typically have one or more registers associated with them for reporting status, or to control their operation. Rather than calling CNTV2Card::ReadRegister or CNTV2Card::WriteRegister, client applications should use the appropriate widget-related API calls in the CNTV2Card class to inquire about and/or control the widget of interest.


End-to-End (E-E) Routing

There are two demonstration applications that incorporate some E-E operation, but they’re not “pure” E-E applications — i.e., they both involve the Mixer/Keyer (see Mixer/Keyer Operation):

SD/HD YCbCr SDI End-to-End Pass-Through

This is very easy to do with AJA NTV2 devices and the SDK. Simply connect the primary (Data Stream 1) output crosspoint of the SDI Input widget to the primary (DS1) input crosspoint of the SDI Output widget.

// Example: Route SDI 1 (input) directly to SDI 3 (output)
const NTV2Channel sdiIn1(NTV2_CHANNEL1), sdiOut3(NTV2_CHANNEL3);
theDevice.Connect (NTV2_XptSDIOut3Input, NTV2_XptSDIIn1); // SDIOut3 <== SDIIn1
// Or, more generically...
const NTV2Channel sdiIn1(::GetNTV2ChannelForIndex(0)), sdiOut3(::GetNTV2ChannelForIndex(2));
theDevice.Connect (::GetSDIOutputInputXpt(sdiOut3), ::GetSDIInputOutputXptFromChannel(sdiIn1)); // SDIOut3 <== FB3
// Or, using NTV2XptConnection...
const NTV2XptConnection sdiInToSdiOut (::GetSDIOutputInputXpt(sdiOut3), ::GetSDIInputOutputXptFromChannel(sdiIn1));
theDevice.Connect (sdiInToSdiOut);

For E-E mode to work, other steps may need to be taken:


Routing for Capture

Please see the Capture Demos for examples of how to route for video input:


Routing for Playout

Please see the Playout Demos for examples of how to route for video output:

SD/HD YCbCr Playout From YCbCr Frame Buffer

// Example: Set up FrameStore3 for RGB playout, route to SDI 3...
theDevice.Connect (NTV2_XptSDIOut3Input, NTV2_XptFrameBuffer3YUV); // SDIOut3 <== FB3
// Or, more generically...
theDevice.SetFrameBufferFormat (chan, fbf);
theDevice.SetMode (chan, NTV2_MODE_OUTPUT);
theDevice.Connect (::GetSDIOutputInputXpt(chan), ::GetFrameBufferOutputXptFromChannel(chan, NTV2_IS_FBF_RGB(fbf))); // SDIOut3 <== FB3

SD/HD YCbCr Playout From RGB Frame Buffer

// Example: Set up FrameStore3 for RGB playout, route to SDI 3...
theDevice.Connect (NTV2_XptCSC3VidInput, NTV2_XptFrameBuffer3RGB); // CSC3 <== FB3RGB
theDevice.Connect (NTV2_XptSDIOut3Input, NTV2_XptCSC3VidRGB); // SDIOut3 <== CSC3RGB
// Or, more generically...
theDevice.SetFrameBufferFormat (chan, fbf);
theDevice.SetMode (chan, NTV2_MODE_OUTPUT);
theDevice.Connect (::GetCSCInputXptFromChannel(chan), ::GetFrameBufferOutputXptFromChannel(chan, NTV2_IS_FBF_RGB(fbf))); // CSC3 <== FB3RGB
theDevice.Connect (::GetSDIOutputInputXpt(chan), ::GetCSCOutputXptFromChannel(chan)); // SDIOut3 <== CSC3RGB

HD RGB Playout Over 1 × 3G Dual-Link SDI From RGB Frame Buffer

// Example: Set up FrameStore3 for RGB playout, route to SDI 3...
theDevice.Connect (NTV2_XptDualLinkOut3Input, NTV2_XptFrameBuffer3RGB); // DLOut3 <== FB3RGB
theDevice.Connect (NTV2_XptSDIOut3Input, NTV2_XptDuallinkOut3); // SDIOut3 <== DLOut3
theDevice.Connect (NTV2_XptSDIOut3InputDS2, NTV2_XptDuallinkOut3DS2); // SDIOut3DS <== DLOut3DS
// Or, more generically...
theDevice.SetFrameBufferFormat (chan, fbf);
theDevice.SetMode (chan, NTV2_MODE_OUTPUT);
theDevice.Connect (::GetDLOutInputXptFromChannel(chan), ::GetFrameBufferOutputXptFromChannel(chan, NTV2_IS_FBF_RGB(fbf))); // DLOut3 <== FB3RGB
theDevice.Connect (::GetSDIOutputInputXpt(chan, false), ::GetDLOutOutputXptFromChannel(chan, false)); // SDIOut3 <== DLOut3
theDevice.Connect (::GetSDIOutputInputXpt(chan, true), ::GetDLOutOutputXptFromChannel(chan, true)); // SDIOut3DS <== DLOut3DS
NTV2InputSourceToReferenceSource
NTV2ReferenceSource NTV2InputSourceToReferenceSource(const NTV2InputSource inInputSource)
Converts a given NTV2InputSource to its equivalent NTV2ReferenceSource value.
Definition: ntv2utils.cpp:5020
GetSDIOutputInputXpt
NTV2InputXptID GetSDIOutputInputXpt(const NTV2Channel inSDIOutput, const bool inIsDS2=false)
Definition: ntv2signalrouter.cpp:972
NTV2ChannelToInputSource
NTV2InputSource NTV2ChannelToInputSource(const NTV2Channel inChannel, const NTV2IOKinds inKinds=NTV2_IOKINDS_SDI)
Definition: ntv2utils.cpp:5129
GetNTV2ChannelForIndex
NTV2Channel GetNTV2ChannelForIndex(const ULWord inIndex0)
Definition: ntv2utils.cpp:4694
NTV2_FBF_ARGB
@ NTV2_FBF_ARGB
See 8-Bit ARGB, RGBA, ABGR Formats.
Definition: ntv2enums.h:220
GetSDIInputOutputXptFromChannel
NTV2OutputXptID GetSDIInputOutputXptFromChannel(const NTV2Channel inSDIInput, const bool inIsDS2=false)
Definition: ntv2signalrouter.cpp:923
CNTV2Card::SetVideoFormat
virtual bool SetVideoFormat(const NTV2VideoFormat inVideoFormat, const bool inIsAJARetail=(!(0)), const bool inKeepVancSettings=(0), const NTV2Channel inChannel=NTV2_CHANNEL1)
Configures the AJA device to handle a specific video format.
Definition: ntv2register.cpp:204
NTV2_XptSDIOut3InputDS2
@ NTV2_XptSDIOut3InputDS2
Definition: ntv2enums.h:2800
NTV2Channel
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They're also commonly use...
Definition: ntv2enums.h:1353
NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_1
@ NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_1
Definition: ntv2enums.h:1965
NTV2_XptFrameBuffer3YUV
@ NTV2_XptFrameBuffer3YUV
Definition: ntv2enums.h:2571
NTV2_AUDIOSYSTEM_1
@ NTV2_AUDIOSYSTEM_1
This identifies the first Audio System.
Definition: ntv2enums.h:3882
NTV2XptConnection
std::pair< NTV2InputXptID, NTV2OutputXptID > NTV2XptConnection
Definition: ntv2signalrouter.h:38
NTV2FrameBufferFormat
NTV2FrameBufferFormat
Identifies a particular video frame buffer format. See Device Frame Buffer Formats for details.
Definition: ntv2enums.h:215
CNTV2Card::SetAudioLoopBack
virtual bool SetAudioLoopBack(const NTV2AudioLoopBack inMode, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Enables or disables NTV2AudioLoopBack mode for the given NTV2AudioSystem.
Definition: ntv2audio.cpp:300
NTV2_CHANNEL1
@ NTV2_CHANNEL1
Specifies channel or FrameStore 1 (or the first item).
Definition: ntv2enums.h:1355
CNTV2Card::SetFrameBufferFormat
virtual bool SetFrameBufferFormat(NTV2Channel inChannel, NTV2FrameBufferFormat inNewFormat, bool inIsAJARetail=(!(0)), 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:1856
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:3859
NTV2_XptFrameBuffer3RGB
@ NTV2_XptFrameBuffer3RGB
Definition: ntv2enums.h:2572
CNTV2Card::SetAudioSystemInputSource
virtual bool SetAudioSystemInputSource(const NTV2AudioSystem inAudioSystem, const NTV2AudioSource inAudioSource, const NTV2EmbeddedAudioInput inEmbeddedInput)
Sets the audio source for the given NTV2AudioSystem on the device.
Definition: ntv2audio.cpp:485
CNTV2Card::features
virtual class DeviceCapabilities & features(void)
Definition: ntv2card.h:148
NTV2_XptCSC3VidRGB
@ NTV2_XptCSC3VidRGB
Definition: ntv2enums.h:2591
NTV2_IS_FBF_RGB
#define NTV2_IS_FBF_RGB(__fbf__)
Definition: ntv2enums.h:279
NTV2_XptDuallinkOut3
@ NTV2_XptDuallinkOut3
Definition: ntv2enums.h:2586
CNTV2Card::SetSDIOutputAudioSystem
virtual bool SetSDIOutputAudioSystem(const NTV2Channel inSDIOutputConnector, const NTV2AudioSystem inAudioSystem)
Sets the device's NTV2AudioSystem that will provide audio for the given SDI output's audio embedder....
Definition: ntv2register.cpp:4014
CNTV2Card::SetMode
virtual bool SetMode(const NTV2Channel inChannel, const NTV2Mode inNewValue, const bool inIsRetail=(!(0)))
Determines if a given FrameStore on the AJA device will be used to capture or playout video.
Definition: ntv2register.cpp:1625
GetCSCOutputXptFromChannel
NTV2OutputXptID GetCSCOutputXptFromChannel(const NTV2Channel inCSC, const bool inIsKey=false, const bool inIsRGB=false)
Definition: ntv2signalrouter.cpp:849
NTV2_CHANNEL3
@ NTV2_CHANNEL3
Specifies channel or FrameStore 3 (or the 3rd item).
Definition: ntv2enums.h:1357
NTV2_XptCSC3VidInput
@ NTV2_XptCSC3VidInput
Definition: ntv2enums.h:2771
GetCSCInputXptFromChannel
NTV2InputXptID GetCSCInputXptFromChannel(const NTV2Channel inCSC, const bool inIsKeyInput=false)
Definition: ntv2signalrouter.cpp:805
CNTV2Card::GetInputVideoFormat
virtual NTV2VideoFormat GetInputVideoFormat(const NTV2InputSource inVideoSource=NTV2_INPUTSOURCE_SDI1, const bool inIsProgressive=(0))
Returns the video format of the signal that is present on the given input source.
Definition: ntv2register.cpp:3428
CNTV2Card::Connect
virtual bool Connect(const NTV2InputCrosspointID inInputXpt, const NTV2OutputCrosspointID inOutputXpt, const bool inValidate=(0))
Connects the given widget signal input (sink) to the given widget signal output (source).
Definition: ntv2regroute.cpp:87
NTV2_FBF_10BIT_YCBCR
@ NTV2_FBF_10BIT_YCBCR
See 10-Bit YCbCr Format.
Definition: ntv2enums.h:218
NTV2_AUDIO_LOOPBACK_ON
@ NTV2_AUDIO_LOOPBACK_ON
Embeds SDI input source audio into the data stream.
Definition: ntv2enums.h:2027
NTV2_XptDualLinkOut3Input
@ NTV2_XptDualLinkOut3Input
Definition: ntv2enums.h:2829
GetFrameBufferOutputXptFromChannel
#define GetFrameBufferOutputXptFromChannel
Definition: ntv2signalrouter.h:731
NTV2_MODE_OUTPUT
@ NTV2_MODE_OUTPUT
Output (playout, display) mode, which reads from device SDRAM.
Definition: ntv2enums.h:1238
NTV2_AUDIO_EMBEDDED
@ NTV2_AUDIO_EMBEDDED
Obtain audio samples from the audio that's embedded in the video HANC.
Definition: ntv2enums.h:2003
NTV2_XptSDIIn1
@ NTV2_XptSDIIn1
Definition: ntv2enums.h:2527
CNTV2Card::SetReference
virtual bool SetReference(const NTV2ReferenceSource inRefSource, const bool inKeepFramePulseSelect=(0))
Sets the device's clock reference source. See Video Output Clocking & Synchronization for more inform...
Definition: ntv2register.cpp:1484
GetDLOutInputXptFromChannel
NTV2InputXptID GetDLOutInputXptFromChannel(const NTV2Channel inDLOutWidget)
Definition: ntv2signalrouter.cpp:838
NTV2_XptSDIOut3Input
@ NTV2_XptSDIOut3Input
Definition: ntv2enums.h:2799
GetDLOutOutputXptFromChannel
NTV2OutputXptID GetDLOutOutputXptFromChannel(const NTV2Channel inDLOutput, const bool inIsLinkB=false)
Definition: ntv2signalrouter.cpp:935
NTV2_XptDuallinkOut3DS2
@ NTV2_XptDuallinkOut3DS2
Definition: ntv2enums.h:2587