diff --git a/.gitmodules b/.gitmodules index e69de29b..185e02f3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "essentials-framework/pepperdashcore-builds"] + path = essentials-framework/pepperdashcore-builds + url = https://ndorin@bitbucket.org/Pepperdash_Products/pepperdashcore-builds.git + branch = development diff --git a/PepperDashEssentials/Bridges/DmChassisControllerBridge.cs b/PepperDashEssentials/Bridges/DmChassisControllerBridge.cs index d78e3bc5..6bce77c4 100644 --- a/PepperDashEssentials/Bridges/DmChassisControllerBridge.cs +++ b/PepperDashEssentials/Bridges/DmChassisControllerBridge.cs @@ -57,7 +57,7 @@ namespace PepperDash.Essentials.Bridges var txKey = dmChassis.TxDictionary[ioSlot]; var basicTxDevice = DeviceManager.GetDeviceForKey(txKey) as BasicDmTxControllerBase; - var txDevice = basicTxDevice as DmTxControllerBase; + var advancedTxDevice = basicTxDevice as DmTxControllerBase; if (dmChassis.Chassis is DmMd8x8Cpu3 || dmChassis.Chassis is DmMd8x8Cpu3rps || dmChassis.Chassis is DmMd16x16Cpu3 || dmChassis.Chassis is DmMd16x16Cpu3rps @@ -67,43 +67,83 @@ namespace PepperDash.Essentials.Bridges } else { - if (txDevice != null) + if (advancedTxDevice != null) { - txDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]); + advancedTxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]); + Debug.Console(2, "Linking Tx Online Feedback from Advanced Transmitter at input {0}", ioSlot); + } + else if (dmChassis.InputEndpointOnlineFeedbacks[ioSlot] != null) + { + Debug.Console(2, "Linking Tx Online Feedback from Input Card {0}", ioSlot); + dmChassis.InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]); } } - if (basicTxDevice != null && txDevice == null) + if (basicTxDevice != null && advancedTxDevice == null) trilist.BooleanInput[joinMap.TxAdvancedIsPresent + ioSlot].BoolValue = true; - - if (txDevice != null) + if (advancedTxDevice != null) { - txDevice.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]); + advancedTxDevice.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]); } - else + else if(advancedTxDevice == null || basicTxDevice != null) { + Debug.Console(1, "Setting up actions and feedbacks on input card {0}", ioSlot); dmChassis.VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]); var inputPort = dmChassis.InputPorts[string.Format("inputCard{0}--hdmiIn", ioSlot)]; if (inputPort != null) { - var hdmiInPort = inputPort.Port; + Debug.Console(1, "Port value for input card {0} is set", ioSlot); + var port = inputPort.Port; - if (hdmiInPort != null) + if (port != null) { - if (hdmiInPort is HdmiInputWithCEC) + if (port is HdmiInputWithCEC) { - var hdmiInPortWCec = hdmiInPort as HdmiInputWithCEC; + Debug.Console(1, "Port is HdmiInputWithCec"); + + var hdmiInPortWCec = port as HdmiInputWithCEC; if (hdmiInPortWCec.HdcpSupportedLevel != eHdcpSupportedLevel.Unknown) { - SetHdcpCapabilityAction(true, hdmiInPortWCec, joinMap.HdcpSupportState + ioSlot, trilist); + SetHdcpStateAction(true, hdmiInPortWCec, joinMap.HdcpSupportState + ioSlot, trilist); } dmChassis.InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState + ioSlot]); - trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = (ushort)dmChassis.InputCardHdcpCapabilityTypes[ioSlot]; + if(dmChassis.InputCardHdcpCapabilityTypes.ContainsKey(ioSlot)) + trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = (ushort)dmChassis.InputCardHdcpCapabilityTypes[ioSlot]; + else + trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = 1; + } + } + } + else + { + inputPort = dmChassis.InputPorts[string.Format("inputCard{0}--dmIn", ioSlot)]; + + if(inputPort != null) + { + var port = inputPort.Port; + + if (port is DMInputPortWithCec) + { + Debug.Console(1, "Port is DMInputPortWithCec"); + + var dmInPortWCec = port as DMInputPortWithCec; + + if (dmInPortWCec != null) + { + SetHdcpStateAction(dmChassis.PropertiesConfig.InputSlotSupportsHdcp2[ioSlot], dmInPortWCec, joinMap.HdcpSupportState + ioSlot, trilist); + } + + dmChassis.InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState + ioSlot]); + + if (dmChassis.InputCardHdcpCapabilityTypes.ContainsKey(ioSlot)) + trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = (ushort)dmChassis.InputCardHdcpCapabilityTypes[ioSlot]; + else + trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = 1; } } } @@ -120,7 +160,7 @@ namespace PepperDash.Essentials.Bridges if (hdmiPort != null) { - SetHdcpCapabilityAction(true, hdmiPort, joinMap.HdcpSupportState + ioSlot, trilist); + SetHdcpStateAction(true, hdmiPort, joinMap.HdcpSupportState + ioSlot, trilist); dmChassis.InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState + ioSlot]); } } @@ -128,18 +168,19 @@ namespace PepperDash.Essentials.Bridges if (dmChassis.RxDictionary.ContainsKey(ioSlot)) { Debug.Console(2, "Creating Rx Feedbacks {0}", ioSlot); - var RxKey = dmChassis.RxDictionary[ioSlot]; - var RxDevice = DeviceManager.GetDeviceForKey(RxKey) as DmRmcControllerBase; + var rxKey = dmChassis.RxDictionary[ioSlot]; + var rxDevice = DeviceManager.GetDeviceForKey(rxKey) as DmRmcControllerBase; + var hdBaseTDevice = DeviceManager.GetDeviceForKey(rxKey) as DmHdBaseTControllerBase; if (dmChassis.Chassis is DmMd8x8Cpu3 || dmChassis.Chassis is DmMd8x8Cpu3rps || dmChassis.Chassis is DmMd16x16Cpu3 || dmChassis.Chassis is DmMd16x16Cpu3rps - || dmChassis.Chassis is DmMd32x32Cpu3 || dmChassis.Chassis is DmMd32x32Cpu3rps) + || dmChassis.Chassis is DmMd32x32Cpu3 || dmChassis.Chassis is DmMd32x32Cpu3rps || hdBaseTDevice != null) { dmChassis.OutputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]); } - else if (RxDevice != null) + else if (rxDevice != null) { - RxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]); - } + rxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]); + } } // Feedback @@ -156,7 +197,7 @@ namespace PepperDash.Essentials.Bridges } } - static void SetHdcpCapabilityAction(bool hdcpTypeSimple, HdmiInputWithCEC port, uint join, BasicTriList trilist) + static void SetHdcpStateAction(bool hdcpTypeSimple, HdmiInputWithCEC port, uint join, BasicTriList trilist) { if (hdcpTypeSimple) { @@ -176,14 +217,14 @@ namespace PepperDash.Essentials.Bridges else { trilist.SetUShortSigAction(join, - new Action(s => + new Action(u => { - port.HdcpReceiveCapability = (eHdcpCapabilityType)s; + port.HdcpReceiveCapability = (eHdcpCapabilityType)u; })); } } - static void SetHdcpCapabilityAction(bool hdcpTypeSimple, EndpointHdmiInput port, uint join, BasicTriList trilist) + static void SetHdcpStateAction(bool hdcpTypeSimple, EndpointHdmiInput port, uint join, BasicTriList trilist) { if (hdcpTypeSimple) { @@ -203,9 +244,36 @@ namespace PepperDash.Essentials.Bridges else { trilist.SetUShortSigAction(join, - new Action(s => + new Action(u => { - port.HdcpCapability = (eHdcpCapabilityType)s; + port.HdcpCapability = (eHdcpCapabilityType)u; + })); + } + } + + static void SetHdcpStateAction(bool supportsHdcp2, DMInputPortWithCec port, uint join, BasicTriList trilist) + { + if (!supportsHdcp2) + { + trilist.SetUShortSigAction(join, + new Action(s => + { + if (s == 0) + { + port.HdcpSupportOff(); + } + else if (s > 0) + { + port.HdcpSupportOn(); + } + })); + } + else + { + trilist.SetUShortSigAction(join, + new Action(u => + { + port.HdcpReceiveCapability = (eHdcpCapabilityType)u; })); } } diff --git a/PepperDashEssentials/Bridges/JoinMaps/DmChassisControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/DmChassisControllerJoinMap.cs index 439cd949..d04004b9 100644 --- a/PepperDashEssentials/Bridges/JoinMaps/DmChassisControllerJoinMap.cs +++ b/PepperDashEssentials/Bridges/JoinMaps/DmChassisControllerJoinMap.cs @@ -107,7 +107,6 @@ namespace PepperDash.Essentials.Bridges OutputAudio = 300; //301-499 OutputUsb = 500; //501-699 InputUsb = 700; //701-899 - VideoSyncStatus = 100; //101-299 HdcpSupportState = 1000; //1001-1199 HdcpSupportCapability = 1200; //1201-1399 @@ -118,8 +117,6 @@ namespace PepperDash.Essentials.Bridges OutputCurrentVideoInputNames = 2000; //2001-2199 OutputCurrentAudioInputNames = 2200; //2201-2399 InputCurrentResolution = 2400; // 2401-2599 - InputEndpointOnline = 500; //501-699 - OutputEndpointOnline = 700; //701-899 } public override void OffsetJoinNumbers(uint joinStart) diff --git a/PepperDashEssentials/PepperDashEssentials.csproj b/PepperDashEssentials/PepperDashEssentials.csproj index 55bd769b..6ef7e20f 100644 --- a/PepperDashEssentials/PepperDashEssentials.csproj +++ b/PepperDashEssentials/PepperDashEssentials.csproj @@ -71,9 +71,9 @@ ..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll - + False - ..\essentials-framework\references\PepperDash_Core.dll + ..\essentials-framework\pepperdashcore-builds\PepperDash_Core.dll False @@ -183,6 +183,7 @@ + @@ -206,6 +207,7 @@ + diff --git a/PepperDashEssentials/Properties/AssemblyInfo.cs b/PepperDashEssentials/Properties/AssemblyInfo.cs index 015ff45a..83beada4 100644 --- a/PepperDashEssentials/Properties/AssemblyInfo.cs +++ b/PepperDashEssentials/Properties/AssemblyInfo.cs @@ -4,5 +4,5 @@ [assembly: AssemblyCompany("PepperDash Technology Corp")] [assembly: AssemblyProduct("PepperDashEssentials")] [assembly: AssemblyCopyright("Copyright © PepperDash Technology Corp 2018")] -[assembly: AssemblyVersion("1.4.444.*")] +[assembly: AssemblyVersion("1.4.0.*")] diff --git a/PepperDashEssentials/Room/Config/EssentialsNDisplayRoomPropertiesConfig.cs b/PepperDashEssentials/Room/Config/EssentialsNDisplayRoomPropertiesConfig.cs new file mode 100644 index 00000000..6bd2009e --- /dev/null +++ b/PepperDashEssentials/Room/Config/EssentialsNDisplayRoomPropertiesConfig.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; + +namespace PepperDash.Essentials.Room.Config +{ + /// + /// + /// + public class EssentialsNDisplayRoomPropertiesConfig : EssentialsRoomPropertiesConfig + { + public string DefaultAudioBehavior { get; set; } + public string DefaultAudioKey { get; set; } + public string DefaultVideoBehavior { get; set; } + public Dictionary Displays { get; set; } + public string SourceListKey { get; set; } + + public EssentialsNDisplayRoomPropertiesConfig() + { + Displays = new Dictionary(); + } + } +} \ No newline at end of file diff --git a/PepperDashEssentials/Room/Types/EssentialsNDisplayRoomBase.cs b/PepperDashEssentials/Room/Types/EssentialsNDisplayRoomBase.cs new file mode 100644 index 00000000..9cdb14c9 --- /dev/null +++ b/PepperDashEssentials/Room/Types/EssentialsNDisplayRoomBase.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; + +using Newtonsoft.Json; + +using PepperDash.Core; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Room.Config; + +namespace PepperDash.Essentials.Room.Types +{ + /// + /// Base class for rooms with more than a single display + /// + public abstract class EssentialsNDisplayRoomBase : EssentialsRoomBase + { + public event SourceInfoChangeHandler CurrentSingleSourceChange; + + public Dictionary Displays { get; protected set; } + + protected override Func IsWarmingFeedbackFunc { get { return () => false; ; } } + protected override Func IsCoolingFeedbackFunc { get { return () => false; } } + + public EssentialsNDisplayRoomBase(DeviceConfig config) + : base (config) + { + Displays = new Dictionary(); + + var propertiesConfig = JsonConvert.DeserializeObject(config.Properties.ToString()); + + foreach (var display in propertiesConfig.Displays) + { + var displayDevice = DeviceManager.GetDeviceForKey(display.Value) as IRoutingSinkWithSwitching; + + if (displayDevice != null) + Displays.Add(display.Key, displayDevice); + } + } + } +} \ No newline at end of file diff --git a/PepperDashEssentials/Room/Types/EssentialsPresentationRoom.cs b/PepperDashEssentials/Room/Types/EssentialsPresentationRoom.cs index c21c265f..10a87dca 100644 --- a/PepperDashEssentials/Room/Types/EssentialsPresentationRoom.cs +++ b/PepperDashEssentials/Room/Types/EssentialsPresentationRoom.cs @@ -33,7 +33,7 @@ // public Dictionary Displays { get; private set; } // public IRoutingSinkNoSwitching DefaultAudioDevice { get; private set; } -// public IBasicVolumeControls DefaultVolumeControls { get; private set; } +// public IBasicVolumeControls DefaultVolumeControls { get; private set; }C:\Working Directories\PD\essentials\PepperDashEssentials\Room\Types\EssentialsPresentationRoom.cs // /// // /// The config name of the source list diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj b/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj index f564d970..9eca4e25 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj @@ -71,9 +71,9 @@ ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll - + False - ..\..\references\PepperDash_Core.dll + ..\..\pepperdashcore-builds\PepperDash_Core.dll False diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs index d5ecfce4..99abf890 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs @@ -23,6 +23,8 @@ namespace PepperDash.Essentials.DM /// public class DmChassisController : CrestronGenericBaseDevice, IRoutingInputsOutputs, IRouting, IHasFeedback { + public DMChassisPropertiesConfig PropertiesConfig { get; set; } + public DmMDMnxn Chassis { get; private set; } // Feedbacks for EssentialDM @@ -91,10 +93,10 @@ namespace PepperDash.Essentials.DM else if (type == "dmmd32x32cpu3") { chassis = new DmMd32x32Cpu3(ipid, Global.ControlSystem); } else if (type == "dmmd32x32cpu3rps") { chassis = new DmMd32x32Cpu3rps(ipid, Global.ControlSystem); } - if (chassis == null) - { - return null; - } + if (chassis == null) + { + return null; + } var controller = new DmChassisController(key, name, chassis); // add the cards and port names @@ -126,6 +128,7 @@ namespace PepperDash.Essentials.DM controller.InputNames = properties.InputNames; controller.OutputNames = properties.OutputNames; + controller.PropertiesConfig = properties; return controller; } catch (System.Exception e) @@ -177,104 +180,154 @@ namespace PepperDash.Essentials.DM { var tempX = x; - VideoOutputFeedbacks[tempX] = new IntFeedback(() => { - if (Chassis.Outputs[tempX].VideoOutFeedback != null) { return (ushort)Chassis.Outputs[tempX].VideoOutFeedback.Number;} - else { return 0; }; - }); - AudioOutputFeedbacks[tempX] = new IntFeedback(() => { - if (Chassis.Outputs[tempX].AudioOutFeedback != null) { return (ushort)Chassis.Outputs[tempX].AudioOutFeedback.Number; } - else { return 0; }; - }); - UsbOutputRoutedToFeebacks[tempX] = new IntFeedback(() => { - if(Chassis.Outputs[tempX].USBRoutedToFeedback != null) { return (ushort)Chassis.Outputs[tempX].USBRoutedToFeedback.Number; } - else {return 0; }; - }); - UsbInputRoutedToFeebacks[tempX] = new IntFeedback(() => { - if(Chassis.Inputs[tempX].USBRoutedToFeedback != null) { return (ushort)Chassis.Inputs[tempX].USBRoutedToFeedback.Number; } - else {return 0; }; - }); - VideoInputSyncFeedbacks[tempX] = new BoolFeedback(() => { - return Chassis.Inputs[tempX].VideoDetectedFeedback.BoolValue; - }); - InputNameFeedbacks[tempX] = new StringFeedback(() => { - if (Chassis.Inputs[tempX].NameFeedback != null) - { - return Chassis.Inputs[tempX].NameFeedback.StringValue; - } - else - { - return ""; - } - }); - OutputNameFeedbacks[tempX] = new StringFeedback(() => { - if (Chassis.Outputs[tempX].NameFeedback != null) - { - return Chassis.Outputs[tempX].NameFeedback.StringValue; - } - else - { - return ""; - } - }); - OutputVideoRouteNameFeedbacks[tempX] = new StringFeedback(() => - { - if (Chassis.Outputs[tempX].VideoOutFeedback != null) - { - return Chassis.Outputs[tempX].VideoOutFeedback.NameFeedback.StringValue; - } - else - { - return ""; - } - }); - OutputAudioRouteNameFeedbacks[tempX] = new StringFeedback(() => + if (Chassis.Outputs[tempX] != null) + { + VideoOutputFeedbacks[tempX] = new IntFeedback(() => { - if (Chassis.Outputs[tempX].AudioOutFeedback != null) + if (Chassis.Outputs[tempX].VideoOutFeedback != null) { return (ushort)Chassis.Outputs[tempX].VideoOutFeedback.Number; } + else { return 0; }; + }); + AudioOutputFeedbacks[tempX] = new IntFeedback(() => + { + if (Chassis.Outputs[tempX].AudioOutFeedback != null) { return (ushort)Chassis.Outputs[tempX].AudioOutFeedback.Number; } + else { return 0; }; + }); + UsbOutputRoutedToFeebacks[tempX] = new IntFeedback(() => + { + if (Chassis.Outputs[tempX].USBRoutedToFeedback != null) { return (ushort)Chassis.Outputs[tempX].USBRoutedToFeedback.Number; } + else { return 0; }; + }); + + OutputNameFeedbacks[tempX] = new StringFeedback(() => + { + if (Chassis.Outputs[tempX].NameFeedback != null) { - return Chassis.Outputs[tempX].AudioOutFeedback.NameFeedback.StringValue; + return Chassis.Outputs[tempX].NameFeedback.StringValue; } else { return ""; + } + }); + OutputVideoRouteNameFeedbacks[tempX] = new StringFeedback(() => + { + if (Chassis.Outputs[tempX].VideoOutFeedback != null) + { + return Chassis.Outputs[tempX].VideoOutFeedback.NameFeedback.StringValue; + } + else + { + return ""; + } + }); + OutputAudioRouteNameFeedbacks[tempX] = new StringFeedback(() => + { + if (Chassis.Outputs[tempX].AudioOutFeedback != null) + { + return Chassis.Outputs[tempX].AudioOutFeedback.NameFeedback.StringValue; + } + else + { + return ""; + } + }); + + OutputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() => + { + return Chassis.Outputs[tempX].EndpointOnlineFeedback; + }); + } + + if (Chassis.Inputs[tempX] != null) + { + UsbInputRoutedToFeebacks[tempX] = new IntFeedback(() => + { + if (Chassis.Inputs[tempX].USBRoutedToFeedback != null) { return (ushort)Chassis.Inputs[tempX].USBRoutedToFeedback.Number; } + else { return 0; }; + }); + VideoInputSyncFeedbacks[tempX] = new BoolFeedback(() => + { + if (Chassis.Inputs[tempX].VideoDetectedFeedback != null) + return Chassis.Inputs[tempX].VideoDetectedFeedback.BoolValue; + else + return false; + }); + InputNameFeedbacks[tempX] = new StringFeedback(() => + { + if (Chassis.Inputs[tempX].NameFeedback != null) + { + return Chassis.Inputs[tempX].NameFeedback.StringValue; + } + else + { + return ""; } }); - InputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() => { return Chassis.Inputs[tempX].EndpointOnlineFeedback; }); - - OutputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() => { return Chassis.Outputs[tempX].EndpointOnlineFeedback; }); - - InputCardHdcpCapabilityFeedbacks[tempX] = new IntFeedback(() => - { - var inputCard = Chassis.Inputs[tempX]; - - if (inputCard.Card is DmcHd) + InputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() => { - InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport; + return Chassis.Inputs[tempX].EndpointOnlineFeedback; + }); - if ((inputCard.Card as DmcHd).HdmiInput.HdcpSupportOnFeedback.BoolValue) - return 1; + InputCardHdcpCapabilityFeedbacks[tempX] = new IntFeedback(() => + { + var inputCard = Chassis.Inputs[tempX]; + + if (inputCard.Card is DmcHd) + { + InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport; + + if ((inputCard.Card as DmcHd).HdmiInput.HdcpSupportOnFeedback.BoolValue) + return 1; + else + return 0; + } + else if (inputCard.Card is DmcHdDsp) + { + InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport; + + if ((inputCard.Card as DmcHdDsp).HdmiInput.HdcpSupportOnFeedback.BoolValue) + return 1; + else + return 0; + } + else if (inputCard.Card is Dmc4kHdBase) + { + InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.Hdcp2_2Support; + + return (int)(inputCard.Card as Dmc4kHdBase).HdmiInput.HdcpReceiveCapability; + } + else if (inputCard.Card is Dmc4kCBase) + { + if (PropertiesConfig.InputSlotSupportsHdcp2[tempX]) + { + InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport; + + return (int)(inputCard.Card as Dmc4kCBase).DmInput.HdcpReceiveCapability; + } + else if ((inputCard.Card as Dmc4kCBase).DmInput.HdcpSupportOnFeedback.BoolValue) + return 1; + else + return 0; + } + else if (inputCard.Card is Dmc4kCDspBase) + { + if (PropertiesConfig.InputSlotSupportsHdcp2[tempX]) + { + InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport; + + return (int)(inputCard.Card as Dmc4kCDspBase).DmInput.HdcpReceiveCapability; + } + else if ((inputCard.Card as Dmc4kCDspBase).DmInput.HdcpSupportOnFeedback.BoolValue) + return 1; + else + return 0; + } else return 0; - } - else if (inputCard.Card is DmcHdDsp) - { - InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport; - - if ((inputCard.Card as DmcHdDsp).HdmiInput.HdcpSupportOnFeedback.BoolValue) - return 1; - else - return 0; - } - else if (inputCard.Card is Dmc4kHdBase) - { - InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.Hdcp2_2Support; - - return (int)(inputCard.Card as Dmc4kHdBase).HdmiInput.HdcpReceiveCapability; - } - else - return 0; - }); + }); + } } } @@ -327,33 +380,39 @@ namespace PepperDash.Essentials.DM } else if (type == "dmcc") { - new DmcC(number, this.Chassis); - AddDmInCardPorts(number); + var inputCard = new DmcC(number, this.Chassis); + var cecPort = inputCard.DmInput as ICec; + AddDmInCardPorts(number, cecPort); } else if (type == "dmccdsp") { - new DmcCDsp(number, this.Chassis); - AddDmInCardPorts(number); + var inputCard = new DmcCDsp(number, this.Chassis); + var cecPort = inputCard.DmInput as ICec; + AddDmInCardPorts(number, cecPort); } else if (type == "dmc4kc") { - new Dmc4kC(number, this.Chassis); - AddDmInCardPorts(number); + var inputCard = new Dmc4kC(number, this.Chassis); + var cecPort = inputCard.DmInput as ICec; + AddDmInCardPorts(number, cecPort); } else if (type == "dmc4kcdsp") { - new Dmc4kCDsp(number, this.Chassis); - AddDmInCardPorts(number); + var inputCard = new Dmc4kCDsp(number, this.Chassis); + var cecPort = inputCard.DmInput as ICec; + AddDmInCardPorts(number, cecPort); } else if (type == "dmc4kzc") { - new Dmc4kzC(number, this.Chassis); - AddDmInCardPorts(number); + var inputCard = new Dmc4kzC(number, this.Chassis); + var cecPort = inputCard.DmInput as ICec; + AddDmInCardPorts(number, cecPort); } else if (type == "dmc4kzcdsp") { - new Dmc4kzCDsp(number, this.Chassis); - AddDmInCardPorts(number); + var inputCard = new Dmc4kzCDsp(number, this.Chassis); + var cecPort = inputCard.DmInput as ICec; + AddDmInCardPorts(number, cecPort); } else if (type == "dmccat") { @@ -453,6 +512,11 @@ namespace PepperDash.Essentials.DM AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat); AddInCardHdmiAndAudioLoopPorts(number); } + void AddDmInCardPorts(uint number, ICec cecPort) + { + AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, cecPort); + AddInCardHdmiAndAudioLoopPorts(number); + } void AddHdmiInCardPorts(uint number, ICec cecPort) { @@ -536,7 +600,7 @@ namespace PepperDash.Essentials.DM AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1); AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber, 2 * (number - 1) + 2); } - else if (type == "dmcStro") + else if (type == "dmcstro") { var outputCard = new DmcStroSingle(number, Chassis); AddOutputPortWithDebug(string.Format("outputCard{0}", number), "streamOut", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Streaming, 2 * (number - 1) + 1); @@ -583,10 +647,15 @@ namespace PepperDash.Essentials.DM Debug.Console(2, this, "Adding input port '{0}'", portKey); var inputPort = new RoutingInputPort(portKey, sigType, portType, cardNum, this); - if (cecPort != null) - inputPort.Port = cecPort; + if (inputPort != null) + { + if (cecPort != null) + inputPort.Port = cecPort; - InputPorts.Add(inputPort); + InputPorts.Add(inputPort); + } + else + Debug.Console(2, this, "inputPort is null"); } /// diff --git a/essentials-framework/Essentials DM/Essentials_DM/Config/DMChassisConfig.cs b/essentials-framework/Essentials DM/Essentials_DM/Config/DMChassisConfig.cs index 81f28afa..22da6c44 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Config/DMChassisConfig.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Config/DMChassisConfig.cs @@ -31,7 +31,15 @@ namespace PepperDash.Essentials.DM.Config [JsonProperty("outputNames")] public Dictionary OutputNames { get; set; } - } + + [JsonProperty("inputSlotSupportsHdcp2")] + public Dictionary InputSlotSupportsHdcp2 { get; set; } + + public DMChassisPropertiesConfig() + { + InputSlotSupportsHdcp2 = new Dictionary(); + } + } /// /// diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx401CController.cs b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx401CController.cs index b4b3ddff..b0356f0d 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx401CController.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx401CController.cs @@ -21,6 +21,8 @@ namespace PepperDash.Essentials.DM { public DmTx401C Tx { get; private set; } + + public RoutingInputPortWithVideoStatuses HdmiIn { get; private set; } public RoutingInputPortWithVideoStatuses DisplayPortIn { get; private set; } public RoutingInputPortWithVideoStatuses VgaIn { get; private set; } diff --git a/essentials-framework/Essentials DM/Essentials_DM/Essentials_DM.csproj b/essentials-framework/Essentials DM/Essentials_DM/Essentials_DM.csproj index 721647ca..b66e5ab4 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Essentials_DM.csproj +++ b/essentials-framework/Essentials DM/Essentials_DM/Essentials_DM.csproj @@ -59,9 +59,9 @@ ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll - + False - ..\..\references\PepperDash_Core.dll + ..\..\pepperdashcore-builds\PepperDash_Core.dll False diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj index 04fd9f53..ec276366 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj @@ -63,9 +63,9 @@ ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Lighting.dll - + False - ..\..\references\PepperDash_Core.dll + ..\..\pepperdashcore-builds\PepperDash_Core.dll False diff --git a/essentials-framework/pepperdashcore-builds b/essentials-framework/pepperdashcore-builds new file mode 160000 index 00000000..de8b9f59 --- /dev/null +++ b/essentials-framework/pepperdashcore-builds @@ -0,0 +1 @@ +Subproject commit de8b9f592ee7918691ad3a88359c93ffe0ec39c5 diff --git a/essentials-framework/references/PepperDash_Core.dll b/essentials-framework/references/PepperDash_Core.dll deleted file mode 100644 index 428b9249..00000000 Binary files a/essentials-framework/references/PepperDash_Core.dll and /dev/null differ