CNTV2SignalRouter implementation.
More...
#include "ntv2signalrouter.h"
#include "ntv2routingexpert.h"
#include "ntv2debug.h"
#include "ntv2utils.h"
#include "ntv2devicefeatures.hh"
#include "ntv2registerexpert.h"
#include "ajabase/system/debug.h"
#include "ajabase/common/common.h"
#include <memory.h>
#include <stdio.h>
#include <assert.h>
#include <algorithm>
Go to the source code of this file.
|
#define | HEX16(__x__) "0x" << hex << setw(16) << setfill('0') << uint64_t(__x__) << dec |
|
#define | INSTP(_p_) HEX16(uint64_t(_p_)) |
|
#define | SRiFAIL(__x__) AJA_sERROR (AJA_DebugUnit_RoutingGeneric, INSTP(this) << "::" << AJAFUNC << ": " << __x__) |
|
#define | SRiWARN(__x__) AJA_sWARNING(AJA_DebugUnit_RoutingGeneric, INSTP(this) << "::" << AJAFUNC << ": " << __x__) |
|
#define | SRiNOTE(__x__) AJA_sNOTICE (AJA_DebugUnit_RoutingGeneric, INSTP(this) << "::" << AJAFUNC << ": " << __x__) |
|
#define | SRiINFO(__x__) AJA_sINFO (AJA_DebugUnit_RoutingGeneric, INSTP(this) << "::" << AJAFUNC << ": " << __x__) |
|
#define | SRiDBG(__x__) AJA_sDEBUG (AJA_DebugUnit_RoutingGeneric, INSTP(this) << "::" << AJAFUNC << ": " << __x__) |
|
#define | SRFAIL(__x__) AJA_sERROR (AJA_DebugUnit_RoutingGeneric, AJAFUNC << ": " << __x__) |
|
#define | SRWARN(__x__) AJA_sWARNING(AJA_DebugUnit_RoutingGeneric, AJAFUNC << ": " << __x__) |
|
#define | SRNOTE(__x__) AJA_sNOTICE (AJA_DebugUnit_RoutingGeneric, AJAFUNC << ": " << __x__) |
|
#define | SRINFO(__x__) AJA_sINFO (AJA_DebugUnit_RoutingGeneric, AJAFUNC << ": " << __x__) |
|
#define | SRDBG(__x__) AJA_sDEBUG (AJA_DebugUnit_RoutingGeneric, AJAFUNC << ": " << __x__) |
|
|
static NTV2StringList & | Tokenize (const string &inString, NTV2StringList &outTokens, const string &inDelimiters=" ", bool inTrimEmpty=false) |
|
NTV2InputXptID | GetFrameBufferInputXptFromChannel (const NTV2Channel inChannel, const bool inIsBInput) |
|
NTV2InputXptID | GetCSCInputXptFromChannel (const NTV2Channel inChannel, const bool inIsKeyInput) |
|
NTV2InputXptID | GetLUTInputXptFromChannel (const NTV2Channel inLUT) |
|
NTV2InputXptID | GetDLInInputXptFromChannel (const NTV2Channel inChannel, const bool inLinkB) |
|
NTV2InputXptID | GetDLOutInputXptFromChannel (const NTV2Channel inChannel) |
|
NTV2OutputXptID | GetCSCOutputXptFromChannel (const NTV2Channel inChannel, const bool inIsKey, const bool inIsRGB) |
|
NTV2OutputXptID | GetLUTOutputXptFromChannel (const NTV2Channel inLUT) |
|
NTV2OutputXptID | GetFrameBufferOutputXptFromChannel (const NTV2Channel inChannel, const bool inIsRGB, const bool inIs425) |
|
NTV2OutputXptID | GetInputSourceOutputXpt (const NTV2InputSource inInputSource, const bool inIsSDI_DS2, const bool inIsHDMI_RGB, const UWord inHDMI_Quadrant) |
|
NTV2OutputXptID | GetSDIInputOutputXptFromChannel (const NTV2Channel inChannel, const bool inIsDS2) |
|
NTV2OutputXptID | GetDLOutOutputXptFromChannel (const NTV2Channel inChannel, const bool inIsLinkB) |
|
NTV2OutputXptID | GetDLInOutputXptFromChannel (const NTV2Channel inChannel) |
|
NTV2InputXptID | GetOutputDestInputXpt (const NTV2OutputDestination inOutputDest, const bool inIsSDI_DS2, const UWord inHDMI_Quadrant) |
|
NTV2InputXptID | GetSDIOutputInputXpt (const NTV2Channel inChannel, const bool inIsDS2) |
|
NTV2OutputXptID | GetMixerOutputXptFromChannel (const NTV2Channel inChannel, const bool inIsKey) |
|
NTV2InputXptID | GetMixerFGInputXpt (const NTV2Channel inChannel, const bool inIsKey) |
|
NTV2InputXptID | GetMixerBGInputXpt (const NTV2Channel inChannel, const bool inIsKey) |
|
NTV2InputXptID | GetTSIMuxInputXptFromChannel (const NTV2Channel inChannel, const bool inLinkB) |
|
NTV2OutputXptID | GetTSIMuxOutputXptFromChannel (const NTV2Channel inChannel, const bool inLinkB, const bool inIsRGB) |
|
ostream & | operator<< (ostream &inOutStream, const CNTV2SignalRouter &inObj) |
|
ostream & | operator<< (ostream &inOutStream, const NTV2OutputXptIDSet &inObj) |
|
ostream & | operator<< (ostream &inOutStream, const NTV2InputXptIDSet &inObj) |
|
ostream & | operator<< (ostream &inOutStream, const NTV2WidgetIDSet &inObj) |
|
ostream & | operator<< (ostream &inOutStream, const NTV2XptConnections &inObj) |
|
CNTV2SignalRouter implementation.
- Copyright
- (C) 2014-2022 AJA Video Systems, Inc.
Definition in file ntv2signalrouter.cpp.
◆ HEX16
#define HEX16 |
( |
|
__x__ | ) |
"0x" << hex << setw(16) << setfill('0') << uint64_t(__x__) << dec |
◆ INSTP
#define INSTP |
( |
|
_p_ | ) |
HEX16(uint64_t(_p_)) |
◆ SRDBG
◆ SRFAIL
◆ SRiDBG
◆ SRiFAIL
◆ SRiINFO
◆ SRINFO
◆ SRiNOTE
◆ SRiWARN
◆ SRNOTE
◆ SRWARN
◆ GetCSCInputXptFromChannel()
- Returns
- The appropriate NTV2InputXptID for the given color space converter (CSC) widget, or NTV2_INPUT_CROSSPOINT_INVALID upon failure.
- Parameters
-
[in] | inCSC | Specifies the CSC of interest, expressed as an NTV2Channel (a zero-based index value). |
[in] | inIsKeyInput | Specify true to obtain the key (alpha) input crosspoint. Defaults to false (the video input crosspoint). |
Definition at line 775 of file ntv2signalrouter.cpp.
◆ GetCSCOutputXptFromChannel()
- Returns
- The appropriate NTV2OutputCrosspointID for the given color space converter (CSC) widget, or NTV2_OUTPUT_CROSSPOINT_INVALID upon failure.
- Parameters
-
[in] | inCSC | Specifies the CSC of interest, expressed as an NTV2Channel (a zero-based index value). |
[in] | inIsKey | Specify true to obtain the key (alpha) output crosspoint. Defaults to false (the video output crosspoint). |
[in] | inIsRGB | Specify true to obtain the RGB video output crosspoint. Defaults to false (the YUV video output crosspoint). Ignored if true passed to inIsKey. |
Definition at line 819 of file ntv2signalrouter.cpp.
◆ GetDLInInputXptFromChannel()
- Returns
- The appropriate NTV2InputXptID for the given Dual-Link Input widget, or NTV2_INPUT_CROSSPOINT_INVALID upon failure.
- Parameters
-
[in] | inChannel | Specifies the Dual-Link Input converter of interest, expressed as an NTV2Channel (a zero-based index value). |
[in] | inLinkB | Specifies whether to return the A or the B link crosspoint ID. Defaults to the A link crosspoint. |
Definition at line 796 of file ntv2signalrouter.cpp.
◆ GetDLInOutputXptFromChannel()
◆ GetDLOutInputXptFromChannel()
◆ GetDLOutOutputXptFromChannel()
◆ GetFrameBufferInputXptFromChannel()
- Returns
- The appropriate NTV2InputXptID for the given FrameStore, or NTV2_INPUT_CROSSPOINT_INVALID upon failure.
- Parameters
-
[in] | inFrameStore | Specifies the FrameStore of interest, expressed as an NTV2Channel (a zero-based index value). |
[in] | inIsBInput | Specify true to obtain the "B" input crosspoint (for dual-link). Defaults to false (the "A" input crosspoint). |
Definition at line 762 of file ntv2signalrouter.cpp.
◆ GetFrameBufferOutputXptFromChannel()
- Returns
- The appropriate NTV2OutputCrosspointID for the given FrameStore, or NTV2_OUTPUT_CROSSPOINT_INVALID upon failure.
- Parameters
-
[in] | inFrameStore | Specifies the FrameStore of interest, expressed as an NTV2Channel (a zero-based index value). |
[in] | inIsRGB | Specify true to obtain the RGB output crosspoint. Defaults to false (the YUV output crosspoint). |
[in] | inIs425 | Specify true to obtain the 425 output crosspoint. Defaults to false (the normal non-425 output crosspoint). |
Definition at line 845 of file ntv2signalrouter.cpp.
◆ GetInputSourceOutputXpt()
- Returns
- The appropriate NTV2OutputCrosspointID for the given NTV2InputSource, or NTV2_OUTPUT_CROSSPOINT_INVALID upon failure.
- Parameters
-
[in] | inInputSource | Specifies the NTV2InputSource of interest. |
[in] | inIsSDI_DS2 | Specify true to obtain the DS2 output crosspoint (for SDI input sources). Defaults to false (the DS1 output crosspoint). Ignored for non-SDI input sources. |
[in] | inIsHDMI_RGB | Specify true to obtain the RGB output crosspoint (for HDMI input sources). Defaults to false (the YUV output crosspoint). Ignored for non-HDMI input sources. |
[in] | inHDMI_Quadrant | Specifies the 4K/UHD quadrant of interest (for HDMI input sources), where 0=upperLeft, 1=upperRight, 2=lowerLeft, 3=lowerRight. Defaults to 0 (upperLeft). Ignored for non-HDMI input sources. |
Definition at line 865 of file ntv2signalrouter.cpp.
◆ GetLUTInputXptFromChannel()
◆ GetLUTOutputXptFromChannel()
- Returns
- The appropriate NTV2OutputCrosspointID for the given LUT widget.
- Parameters
-
[in] | inLUT | Specifies the LUT of interest, expressed as an NTV2Channel (a zero-based index value). |
Definition at line 838 of file ntv2signalrouter.cpp.
◆ GetMixerBGInputXpt()
◆ GetMixerFGInputXpt()
◆ GetMixerOutputXptFromChannel()
◆ GetOutputDestInputXpt()
- Returns
- The appropriate NTV2InputXptID for the given NTV2OutputDestination, or NTV2_INPUT_CROSSPOINT_INVALID upon failure.
- Parameters
-
[in] | inOutputDest | Specifies the NTV2OutputDestination of interest. |
[in] | inIsSDI_DS2 | Specify true to obtain the DS2 input crosspoint (SDI output destinations only). Defaults to false (the DS1 input). Ignored for non-SDI output destinations. |
[in] | inHDMI_Quadrant | Specifies the 4K/UHD quadrant of interest (for HDMI output destinations), where 0=upperLeft, 1=upperRight, 2=lowerLeft, 3=lowerRight. Values above 3 are deemed to be non-4K/UHD (the default). Ignored for non-HDMI output destinations. |
Definition at line 928 of file ntv2signalrouter.cpp.
◆ GetSDIInputOutputXptFromChannel()
◆ GetSDIOutputInputXpt()
- Returns
- The appropriate NTV2InputXptID for the given SDI Output, or NTV2_INPUT_CROSSPOINT_INVALID upon failure.
- Parameters
-
[in] | inSDIOutput | Specifies the SDI Output widget of interest, expressed as an NTV2Channel (a zero-based index value). |
[in] | inIsDS2 | Specify true to obtain the DS2 input crosspoint. Defaults to false (the DS1 input). |
Definition at line 942 of file ntv2signalrouter.cpp.
◆ GetTSIMuxInputXptFromChannel()
- Returns
- The appropriate NTV2InputXptID for the given TSI Muxer widget, or NTV2_INPUT_CROSSPOINT_INVALID upon failure.
- Parameters
-
[in] | inTSIMuxer | Specifies the 425Mux widget of interest, expressed as an NTV2Channel (a zero-based index value). |
[in] | inLinkB | Specify true to obtain the "B" input crosspoint. Defaults to false, the "A" input. |
Definition at line 993 of file ntv2signalrouter.cpp.
◆ GetTSIMuxOutputXptFromChannel()
- Returns
- The appropriate NTV2OutputXptID for the given TSI Muxer, or NTV2_OUTPUT_CROSSPOINT_INVALID upon failure.
- Parameters
-
[in] | inTSIMuxer | Specifies the 425Mux widget of interest, expressed as an NTV2Channel (a zero-based index value). |
[in] | inLinkB | Specify true to obtain the "B" output crosspoint. Defaults to false, the "A" output. |
[in] | inIsRGB | Specify true to obtain the RGB output crosspoint. Defaults to false, the YUV output. |
Definition at line 1005 of file ntv2signalrouter.cpp.
◆ operator<<() [1/5]
◆ operator<<() [2/5]
◆ operator<<() [3/5]
◆ operator<<() [4/5]
ostream& operator<< |
( |
ostream & |
inOutStream, |
|
|
const NTV2WidgetIDSet & |
inObj |
|
) |
| |
◆ operator<<() [5/5]
◆ Tokenize()
◆ sSignalRouterRegMasks
const ULWord sSignalRouterRegMasks[] = { 0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000 } |
|
static |
◆ sSignalRouterRegShifts
const ULWord sSignalRouterRegShifts[] = { 0, 8, 16, 24 } |
|
static |