Browse Source

aja: Fix Kona5/io4K+ 6G/12G-SDI routing and RGB HD-DualLink routing

Paul Hindt 3 years ago
parent
commit
cb51c974f4
4 changed files with 291 additions and 311 deletions
  1. 3 1
      plugins/aja/aja-common.cpp
  2. 260 299
      plugins/aja/aja-presets.cpp
  3. 5 4
      plugins/aja/aja-presets.hpp
  4. 23 7
      plugins/aja/aja-routing.cpp

+ 3 - 1
plugins/aja/aja-common.cpp

@@ -1067,7 +1067,9 @@ VPIDStandard DetermineVPIDStandard(NTV2DeviceID id, IOSelection io,
 					else if (trx == SDITransport::SDI3Gb)
 						vpid = VPIDStandard_720_3Gb;
 				} else if (IsStandard1080p(standard)) {
-					if (trx == SDITransport::SDI3Ga)
+					if (trx == SDITransport::HDDualLink) {
+						vpid = VPIDStandard_1080_DualLink;
+					} else if (trx == SDITransport::SDI3Ga)
 						vpid = VPIDStandard_1080_Dual_3Ga;
 					else if (trx == SDITransport::SDI3Gb)
 						vpid = VPIDStandard_1080_Dual_3Gb;

File diff suppressed because it is too large
+ 260 - 299
plugins/aja/aja-presets.cpp


+ 5 - 4
plugins/aja/aja-presets.hpp

@@ -14,15 +14,16 @@ struct RoutingPreset {
 	std::string name;
 	ConnectionKind kind;
 	NTV2Mode mode;
+	RasterDefinition raster_def;
+	HDMIWireFormat hdmi_wire_format;
+	VPIDStandard vpid_standard;
 	uint32_t num_channels;
 	uint32_t num_framestores;
 	uint32_t flags;
-	bool is_rgb;
 	std::string route_string;
 	std::vector<NTV2DeviceID> device_ids;
-	RasterDefinition raster_def;
-	HDMIWireFormat hdmi_wire_format;
-	VPIDStandard vpid_standard;
+	bool is_rgb;
+	bool verbatim;
 };
 
 using RoutingPresets = std::vector<RoutingPreset>;

+ 23 - 7
plugins/aja/aja-routing.cpp

@@ -332,9 +332,8 @@ bool Routing::ConfigureOutputRoute(const OutputProps &props, NTV2Mode mode,
 		     "No Output Destinations specified to configure routing!");
 		return false;
 	}
-
 	auto init_dest = *outputDests.begin();
-	auto init_channel = NTV2OutputDestinationToChannel(init_dest);
+
 	RoutingConfigurator rc;
 	RoutingPreset rp;
 	if (NTV2_OUTPUT_DEST_IS_SDI(init_dest)) {
@@ -384,14 +383,28 @@ bool Routing::ConfigureOutputRoute(const OutputProps &props, NTV2Mode mode,
 	std::string route_string = rp.route_string;
 
 	// Replace framestore channel placeholders
+	auto init_channel = NTV2OutputDestinationToChannel(init_dest);
 	ULWord start_framestore_index = InitialFramestoreOutputIndex(
 		deviceID, props.ioSelect, init_channel);
+	if (rp.verbatim) {
+		// Presets marked "verbatim" must only be routed on the specified channels
+		start_framestore_index = 0;
+		init_channel = NTV2_CHANNEL1;
+	}
+
+	// Channel-substitution for widgets associated with framestore channel(s)
+	const std::vector<std::string> fs_associated = {"fb", "tsi", "dlo"};
 	for (ULWord c = 0; c < NTV2_MAX_NUM_CHANNELS; c++) {
-		std::string fs_channel_placeholder =
-			std::string("fb[{ch" + aja::to_string(c + 1) + "}]");
-		route_string = aja::replace(
-			route_string, fs_channel_placeholder,
-			"fb[" + aja::to_string(start_framestore_index++) + "]");
+		for (const auto &name : fs_associated) {
+			std::string placeholder = std::string(
+				name + "[{ch" + aja::to_string(c + 1) + "}]");
+			route_string = aja::replace(
+				route_string, placeholder,
+				name + "[" +
+					aja::to_string(start_framestore_index) +
+					"]");
+		}
+		start_framestore_index++;
 	}
 
 	// Replace other channel placeholders
@@ -440,6 +453,9 @@ bool Routing::ConfigureOutputRoute(const OutputProps &props, NTV2Mode mode,
 	// Apply Framestore settings
 	start_framestore_index = InitialFramestoreOutputIndex(
 		deviceID, props.ioSelect, init_channel);
+	if (rp.verbatim) {
+		start_framestore_index = 0;
+	}
 	for (uint32_t i = (uint32_t)start_framestore_index;
 	     i < (start_framestore_index + rp.num_framestores); i++) {
 		NTV2Channel channel = GetNTV2ChannelForIndex(i);

Some files were not shown because too many files changed in this diff