瀏覽代碼

aja: Add framestore index helpers to Source/OutputProps

Paul Hindt 3 年之前
父節點
當前提交
71e3fcc5de
共有 2 個文件被更改,包括 38 次插入1 次删除
  1. 36 1
      plugins/aja/aja-props.cpp
  2. 2 0
      plugins/aja/aja-props.hpp

+ 36 - 1
plugins/aja/aja-props.cpp

@@ -149,6 +149,15 @@ NTV2Channel SourceProps::Channel() const
 	return NTV2InputSourceToChannel(InitialInputSource());
 }
 
+NTV2Channel SourceProps::Framestore() const
+{
+	if (deviceID == DEVICE_ID_KONAHDMI && ioSelect == IOSelection::HDMI2 &&
+	    NTV2_IS_4K_VIDEO_FORMAT(videoFormat)) {
+		return NTV2_CHANNEL3;
+	}
+	return NTV2InputSourceToChannel(InitialInputSource());
+}
+
 NTV2AudioSystem SourceProps::AudioSystem() const
 {
 	return NTV2ChannelToAudioSystem(Channel());
@@ -301,13 +310,39 @@ NTV2Channel OutputProps::Channel() const
 		return NTV2_CHANNEL4;
 	}
 
-	if (NTV2_OUTPUT_DEST_IS_HDMI(outputDest))
+	if (NTV2_OUTPUT_DEST_IS_HDMI(outputDest)) {
+		if (aja::CardCanDoHDMIMonitorOutput(deviceID) &&
+		    NTV2_IS_4K_VIDEO_FORMAT(videoFormat))
+			return NTV2_CHANNEL3;
 		return static_cast<NTV2Channel>(
 			NTV2DeviceGetNumFrameStores(deviceID) - 1);
+	}
 
 	return NTV2OutputDestinationToChannel(outputDest);
 }
 
+NTV2Channel OutputProps::Framestore() const
+{
+	if (deviceID == DEVICE_ID_TTAP_PRO) {
+		return NTV2_CHANNEL1;
+	} else if (deviceID == DEVICE_ID_KONA1) {
+		return NTV2_CHANNEL2;
+	} else if (deviceID == DEVICE_ID_IO4K ||
+		   deviceID == DEVICE_ID_IO4KPLUS) {
+		// SDI Monitor output uses framestore 4
+		if (ioSelect == IOSelection::SDI5)
+			return NTV2_CHANNEL4;
+	}
+	// HDMI Monitor output uses framestore 4
+	if (ioSelect == IOSelection::HDMIMonitorOut) {
+		if (NTV2_IS_4K_VIDEO_FORMAT(videoFormat))
+			return NTV2_CHANNEL3;
+		else
+			return NTV2_CHANNEL4;
+	}
+	return NTV2OutputDestinationToChannel(outputDest);
+}
+
 NTV2AudioSystem OutputProps::AudioSystem() const
 {
 	return NTV2ChannelToAudioSystem(Channel());

+ 2 - 0
plugins/aja/aja-props.hpp

@@ -28,6 +28,7 @@ public:
 	NTV2InputSource InitialInputSource() const;
 	NTV2InputSourceSet InputSources() const;
 	NTV2Channel Channel() const;
+	NTV2Channel Framestore() const;
 	NTV2AudioSystem AudioSystem() const;
 	NTV2AudioRate AudioRate() const;
 	size_t AudioSize() const;
@@ -61,6 +62,7 @@ public:
 
 	NTV2FormatDesc FormatDesc();
 	NTV2Channel Channel() const;
+	NTV2Channel Framestore() const;
 	NTV2AudioSystem AudioSystem() const;
 	NTV2AudioRate AudioRate() const;
 	size_t AudioSize() const;