mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-11 19:44:52 +00:00
feat: add bridge to show number of HDCP-Compatible DM Endpoints
feat: expose HDCP Settings for DM-RMC-4K-XXX endpoints resolve: #1088 resolve: #1089
This commit is contained in:
@@ -36,6 +36,28 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
public JoinDataComplete AudioVideoSource = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
|
||||
new JoinMetadata { Description = "DM RMC Audio Video Source Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||
|
||||
[JoinName("HdcpSupportCapability")]
|
||||
public JoinDataComplete HdcpSupportCapability = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
|
||||
new JoinMetadata { Description = "DM RMC HDCP Support Capability", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
|
||||
|
||||
[JoinName("Port1HdcpState")]
|
||||
public JoinDataComplete Port1HdcpState = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 },
|
||||
new JoinMetadata { Description = "DM RMC Port 1 (DM) HDCP State Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||
|
||||
[JoinName("Port2HdcpState")]
|
||||
public JoinDataComplete Port2HdcpState = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 },
|
||||
new JoinMetadata { Description = "DM TX Port 2 (HDMI) HDCP State Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||
|
||||
[JoinName("HdmiInputSync")]
|
||||
public JoinDataComplete HdmiInputSync = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
|
||||
new JoinMetadata { Description = "DM RMC HDMI Input Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("HdcpInputPortCount")]
|
||||
public JoinDataComplete HdcpInputPortCount = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 },
|
||||
new JoinMetadata { Description = "Number of Input Ports that support HDCP", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Constructor to use when instantiating this Join Map without inheriting from it
|
||||
/// </summary>
|
||||
|
||||
@@ -68,6 +68,11 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
public JoinDataComplete Port3HdcpState = new JoinDataComplete(new JoinData { JoinNumber = 8, JoinSpan = 1 },
|
||||
new JoinMetadata { Description = "DM TX Port 3 HDCP State Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||
|
||||
[JoinName("HdcpInputPortCount")]
|
||||
public JoinDataComplete HdcpInputPortCount = new JoinDataComplete(new JoinData { JoinNumber = 9, JoinSpan = 1 },
|
||||
new JoinMetadata { Description = "Number of Input Ports that support HDCP", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Constructor to use when instantiating this Join Map without inheriting from it
|
||||
|
||||
@@ -20,7 +20,6 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
//*******************************************************************************************
|
||||
// Interfaces
|
||||
|
||||
/// <summary>
|
||||
/// For rooms with a single presentation source, change event
|
||||
/// </summary>
|
||||
|
||||
@@ -692,14 +692,14 @@ namespace PepperDash.Essentials.DM
|
||||
|
||||
var cecPort = hdmiInputCard.HdmiInputPort;
|
||||
|
||||
AddInputPortWithDebug(number, string.Format("HdmiIn{0}", number), eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, cecPort);
|
||||
AddInputPortWithDebug(number, string.Format("HdmiIn1{0}", number), eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, cecPort);
|
||||
}
|
||||
else if (inputCard is Card.Dmps3HdmiInput)
|
||||
{
|
||||
var hdmiInputCard = inputCard as Card.Dmps3HdmiInput;
|
||||
var cecPort = hdmiInputCard.HdmiInputPort;
|
||||
|
||||
AddInputPortWithDebug(number, string.Format("HdmiIn{0}", number), eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, cecPort);
|
||||
AddInputPortWithDebug(number, string.Format("HdmiIn1{0}", number), eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, cecPort);
|
||||
AddInputPortWithDebug(number, string.Format("HudioIn{1}", number), eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
|
||||
}
|
||||
else if (inputCard is Card.Dmps3HdmiVgaInput)
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace PepperDash.Essentials.DM
|
||||
public const string DmOut2 = "DmOut2";
|
||||
public const string FromTx = "FromTx";
|
||||
public const string Hdmi = "Hdmi";
|
||||
public const string HdmiIn = "HdmiIn";
|
||||
public const string HdmiIn = "HdmiIn1";
|
||||
public const string HdmiIn1 = "HdmiIn1";
|
||||
public const string HdmiIn2 = "HdmiIn2";
|
||||
public const string HdmiOut1 = "HdmiOut1";
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro.DM;
|
||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
||||
using PepperDash.Essentials.Core;
|
||||
|
||||
namespace PepperDash_Essentials_DM
|
||||
{
|
||||
public interface IHasDmInHdcpSet
|
||||
{
|
||||
void SetDmInHdcpState(eHdcpCapabilityType hdcpState);
|
||||
}
|
||||
|
||||
public interface IHasDmInHdcpGet
|
||||
{
|
||||
IntFeedback DmInHdcpStateFeedback { get; }
|
||||
}
|
||||
|
||||
public interface IHasDmInHdcp : IHasDmInHdcpGet, IHasDmInHdcpSet
|
||||
{
|
||||
eHdcpCapabilityType DmInHdcpCapability { get; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public interface IHasHdmiInHdcpSet
|
||||
{
|
||||
void SetHdmiInHdcpState(eHdcpCapabilityType hdcpState);
|
||||
}
|
||||
|
||||
public interface IHasHdmiInHdcpGet
|
||||
{
|
||||
IntFeedback HdmiInHdcpStateFeedback { get; }
|
||||
}
|
||||
|
||||
public interface IHasHdmiInHdcp : IHasHdmiInHdcpGet, IHasHdmiInHdcpSet
|
||||
{
|
||||
eHdcpCapabilityType HdmiInHdcpCapability { get; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public interface IHasHdmiIn1HdcpSet
|
||||
{
|
||||
void SetHdmiIn1HdcpState(eHdcpCapabilityType hdcpState);
|
||||
}
|
||||
|
||||
public interface IHasHdmiIn1HdcpGet
|
||||
{
|
||||
IntFeedback HdmiIn1HdcpStateFeedback { get; }
|
||||
}
|
||||
|
||||
public interface IHasHdmiIn1Hdcp : IHasHdmiIn1HdcpGet, IHasHdmiIn1HdcpSet
|
||||
{
|
||||
eHdcpCapabilityType HdmiIn1HdcpCapability { get; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public interface IHasHdmiIn2HdcpSet
|
||||
{
|
||||
void SetHdmiIn2HdcpState(eHdcpCapabilityType hdcpState);
|
||||
}
|
||||
|
||||
public interface IHasHdmiIn2HdcpGet
|
||||
{
|
||||
IntFeedback HdmiInIn2HdcpStateFeedback { get; }
|
||||
}
|
||||
|
||||
public interface IHasHdmi2InHdcp : IHasHdmiIn2HdcpGet, IHasHdmiIn2HdcpSet
|
||||
{
|
||||
eHdcpCapabilityType Hdmi2InHdcpCapability { get; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public interface IHasDisplayPortInHdcpGet
|
||||
{
|
||||
IntFeedback DisplayPortInHdcpStateFeedback { get; }
|
||||
}
|
||||
|
||||
public interface IHasDisplayPortInHdcpSet
|
||||
{
|
||||
void SetDisplayPortInHdcpState(eHdcpCapabilityType hdcpState);
|
||||
}
|
||||
|
||||
public interface IHasDisplayPortInHdcp : IHasDisplayPortInHdcpGet, IHasDisplayPortInHdcpSet
|
||||
{
|
||||
eHdcpCapabilityType DisplayPortInHdcpCapability { get; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -5,8 +5,9 @@ using Crestron.SimplSharpPro.DM.Endpoints;
|
||||
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Bridges;
|
||||
|
||||
using PepperDash.Essentials.Core.Bridges;
|
||||
using PepperDash_Essentials_DM;
|
||||
|
||||
namespace PepperDash.Essentials.DM
|
||||
{
|
||||
/// <summary>
|
||||
@@ -15,7 +16,7 @@ namespace PepperDash.Essentials.DM
|
||||
/// </summary>
|
||||
[Description("Wrapper Class for DM-RMC-4K-SCALER-C")]
|
||||
public class DmRmc4kScalerCController : DmRmcControllerBase, IRoutingInputsOutputs, IBasicVolumeWithFeedback,
|
||||
IIROutputPorts, IComPorts, ICec, IRelayPorts
|
||||
IIROutputPorts, IComPorts, ICec, IRelayPorts, IHasDmInHdcp
|
||||
{
|
||||
private readonly DmRmc4kScalerC _rmc;
|
||||
|
||||
@@ -27,6 +28,12 @@ namespace PepperDash.Essentials.DM
|
||||
|
||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||
|
||||
public EndpointDmInputStreamWithCec DmInput { get; private set; }
|
||||
|
||||
public IntFeedback DmInHdcpStateFeedback { get; private set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Make a Crestron RMC and put it in here
|
||||
/// </summary>
|
||||
@@ -55,7 +62,12 @@ namespace PepperDash.Essentials.DM
|
||||
InputPorts = new RoutingPortCollection<RoutingInputPort> {DmIn};
|
||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort> {HdmiOut, BalancedAudioOut};
|
||||
|
||||
VideoOutputResolutionFeedback = new StringFeedback(() => _rmc.HdmiOutput.GetVideoResolutionString());
|
||||
VideoOutputResolutionFeedback = new StringFeedback(() => _rmc.HdmiOutput.GetVideoResolutionString());
|
||||
DmInHdcpStateFeedback = new IntFeedback("DmInHdcpCapability",
|
||||
() => (int)_rmc.DmInput.HdcpCapabilityFeedback);
|
||||
|
||||
AddToFeedbackList(DmInHdcpStateFeedback);
|
||||
|
||||
|
||||
_rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
|
||||
_rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
|
||||
@@ -191,6 +203,18 @@ namespace PepperDash.Essentials.DM
|
||||
_rmc.AudioOutput.Volume.StopRamp();
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
public eHdcpCapabilityType DmInHdcpCapability
|
||||
{
|
||||
get { return eHdcpCapabilityType.Hdcp2_2Support; }
|
||||
}
|
||||
|
||||
public void SetDmInHdcpState(eHdcpCapabilityType hdcpState)
|
||||
{
|
||||
if (_rmc == null) return;
|
||||
_rmc.DmInput.HdcpCapability = hdcpState;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -9,12 +9,13 @@ using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Bridges;
|
||||
using PepperDash.Core;
|
||||
using PepperDash_Essentials_DM;
|
||||
|
||||
namespace PepperDash.Essentials.DM
|
||||
{
|
||||
[Description("Wrapper Class for DM-RMC-4K-Z-SCALER-C")]
|
||||
public class DmRmc4kZScalerCController : DmRmcControllerBase, IRmcRoutingWithFeedback,
|
||||
IIROutputPorts, IComPorts, ICec, IRelayPorts
|
||||
IIROutputPorts, IComPorts, ICec, IRelayPorts, IHasDmInHdcp, IHasHdmiInHdcp
|
||||
{
|
||||
private readonly DmRmc4kzScalerC _rmc;
|
||||
|
||||
@@ -22,6 +23,13 @@ namespace PepperDash.Essentials.DM
|
||||
public RoutingInputPort HdmiIn { get; private set; }
|
||||
public RoutingOutputPort HdmiOut { get; private set; }
|
||||
|
||||
public IntFeedback DmInHdcpStateFeedback { get; private set; }
|
||||
public IntFeedback HdmiInHdcpStateFeedback { get; private set; }
|
||||
|
||||
public BoolFeedback HdmiVideoSyncFeedback { get; private set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The value of the current video source for the HDMI output on the receiver
|
||||
/// </summary>
|
||||
@@ -42,13 +50,13 @@ namespace PepperDash.Essentials.DM
|
||||
{
|
||||
var newEvent = NumericSwitchChange;
|
||||
if (newEvent != null) newEvent(this, e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public DmRmc4kZScalerCController(string key, string name, DmRmc4kzScalerC rmc)
|
||||
: base(key, name, rmc)
|
||||
{
|
||||
_rmc = rmc;
|
||||
|
||||
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
|
||||
eRoutingPortConnectionType.DmCat, 0, this)
|
||||
{
|
||||
@@ -62,6 +70,16 @@ namespace PepperDash.Essentials.DM
|
||||
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
|
||||
eRoutingPortConnectionType.Hdmi, null, this);
|
||||
|
||||
HdmiInHdcpStateFeedback = new IntFeedback("HdmiInHdcpCapability",
|
||||
() => (int)_rmc.HdmiIn.HdcpCapabilityFeedback);
|
||||
DmInHdcpStateFeedback = new IntFeedback("DmInHdcpCapability",
|
||||
() => (int)_rmc.DmInput.HdcpCapabilityFeedback);
|
||||
HdmiVideoSyncFeedback = new BoolFeedback("HdmiInVideoSync",
|
||||
() => _rmc.HdmiIn.SyncDetectedFeedback.BoolValue);
|
||||
|
||||
AddToFeedbackList(HdmiInHdcpStateFeedback, DmInHdcpStateFeedback, HdmiVideoSyncFeedback);
|
||||
|
||||
|
||||
EdidManufacturerFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);
|
||||
EdidNameFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Name.StringValue);
|
||||
EdidPreferredTimingFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.PreferredTiming.StringValue);
|
||||
@@ -74,6 +92,8 @@ namespace PepperDash.Essentials.DM
|
||||
|
||||
_rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
|
||||
_rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
|
||||
_rmc.HdmiIn.InputStreamChange += InputStreamChangeEvent;
|
||||
_rmc.DmInput.InputStreamChange += InputStreamChangeEvent;
|
||||
|
||||
_rmc.OnlineStatusChange += _rmc_OnlineStatusChange;
|
||||
|
||||
@@ -83,6 +103,20 @@ namespace PepperDash.Essentials.DM
|
||||
AudioVideoSourceNumericFeedback = new IntFeedback(() => (ushort)(_rmc.SelectedSourceFeedback));
|
||||
}
|
||||
|
||||
void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
||||
{
|
||||
switch (args.EventId)
|
||||
{
|
||||
case EndpointInputStreamEventIds.HdcpCapabilityFeedbackEventId:
|
||||
if (inputStream == _rmc.HdmiIn) HdmiInHdcpStateFeedback.FireUpdate();
|
||||
if (inputStream == _rmc.DmInput) DmInHdcpStateFeedback.FireUpdate();
|
||||
break;
|
||||
case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
|
||||
if (inputStream == _rmc.HdmiIn) HdmiVideoSyncFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void _rmc_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args)
|
||||
{
|
||||
AudioVideoSourceNumericFeedback.FireUpdate();
|
||||
@@ -181,5 +215,31 @@ namespace PepperDash.Essentials.DM
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
public eHdcpCapabilityType DmInHdcpCapability
|
||||
{
|
||||
get { return eHdcpCapabilityType.Hdcp2_2Support; }
|
||||
}
|
||||
|
||||
public void SetDmInHdcpState(eHdcpCapabilityType hdcpState)
|
||||
{
|
||||
|
||||
if (_rmc == null) return;
|
||||
_rmc.DmInput.HdcpCapability = hdcpState;
|
||||
}
|
||||
|
||||
|
||||
public eHdcpCapabilityType HdmiInHdcpCapability
|
||||
{
|
||||
get { return eHdcpCapabilityType.Hdcp2_2Support; }
|
||||
}
|
||||
|
||||
public void SetHdmiInHdcpState(eHdcpCapabilityType hdcpState)
|
||||
{
|
||||
if (_rmc == null) return;
|
||||
_rmc.HdmiIn.HdcpCapability = hdcpState;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using Crestron.SimplSharpPro.DM;
|
||||
using Crestron.SimplSharpPro.DM.Cards;
|
||||
@@ -11,6 +12,7 @@ using PepperDash.Essentials.Core.Bridges;
|
||||
using PepperDash.Essentials.Core.DeviceInfo;
|
||||
using PepperDash.Essentials.DM.Config;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
using PepperDash_Essentials_DM;
|
||||
|
||||
namespace PepperDash.Essentials.DM
|
||||
{
|
||||
@@ -73,19 +75,80 @@ namespace PepperDash.Essentials.DM
|
||||
rmc.EdidPreferredTimingFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidPrefferedTiming.JoinNumber]);
|
||||
if (rmc.EdidSerialNumberFeedback != null)
|
||||
rmc.EdidSerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidSerialNumber.JoinNumber]);
|
||||
|
||||
|
||||
//If the device is an DM-RMC-4K-Z-SCALER-C
|
||||
var routing = rmc as IRmcRouting;
|
||||
var routing = rmc as IRoutingInputsOutputs;
|
||||
|
||||
trilist.UShortInput[joinMap.HdcpInputPortCount.JoinNumber].UShortValue = (ushort)(routing == null
|
||||
? 1
|
||||
: routing.InputPorts.Count);
|
||||
|
||||
if (routing == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var hdcpCapability = eHdcpCapabilityType.HdcpSupportOff;
|
||||
if (routing.InputPorts[DmPortName.HdmiIn] != null)
|
||||
{
|
||||
var hdmiInHdcp = routing as IHasHdmiInHdcp;
|
||||
if (hdmiInHdcp != null)
|
||||
{
|
||||
if (rmc.Feedbacks["HdmiInHdcpCapability"] != null)
|
||||
{
|
||||
var intFeedback = rmc.Feedbacks["HdmiInHdcpCapability"] as IntFeedback;
|
||||
if (intFeedback != null)
|
||||
intFeedback.LinkInputSig(trilist.UShortInput[joinMap.Port1HdcpState.JoinNumber]);
|
||||
}
|
||||
if (rmc.Feedbacks["HdmiInVideoSync"] != null)
|
||||
{
|
||||
var boolFeedback = rmc.Feedbacks["HdmiInVideoSync"] as BoolFeedback;
|
||||
if (boolFeedback != null)
|
||||
boolFeedback.LinkInputSig(trilist.BooleanInput[joinMap.HdmiInputSync.JoinNumber]);
|
||||
}
|
||||
hdcpCapability = hdmiInHdcp.HdmiInHdcpCapability > hdcpCapability
|
||||
? hdmiInHdcp.HdmiInHdcpCapability
|
||||
: hdcpCapability;
|
||||
|
||||
if (routing.AudioVideoSourceNumericFeedback != null)
|
||||
routing.AudioVideoSourceNumericFeedback.LinkInputSig(trilist.UShortInput[joinMap.AudioVideoSource.JoinNumber]);
|
||||
trilist.SetUShortSigAction(joinMap.Port1HdcpState.JoinNumber, a => hdmiInHdcp.SetHdmiInHdcpState((eHdcpCapabilityType)a));
|
||||
}
|
||||
}
|
||||
if (routing.InputPorts[DmPortName.DmIn] != null)
|
||||
{
|
||||
var dmInHdcp = rmc as IHasDmInHdcp;
|
||||
|
||||
trilist.SetUShortSigAction(joinMap.AudioVideoSource.JoinNumber, a => routing.ExecuteNumericSwitch(a, 1, eRoutingSignalType.AudioVideo));
|
||||
if (dmInHdcp != null)
|
||||
{
|
||||
if (rmc.Feedbacks["DmInHdcpCapability"] != null)
|
||||
{
|
||||
var intFeedback = rmc.Feedbacks["DmInHdcpCapability"] as IntFeedback;
|
||||
if (intFeedback != null)
|
||||
intFeedback.LinkInputSig(trilist.UShortInput[joinMap.Port2HdcpState.JoinNumber]);
|
||||
}
|
||||
|
||||
hdcpCapability = dmInHdcp.DmInHdcpCapability > hdcpCapability
|
||||
? dmInHdcp.DmInHdcpCapability
|
||||
: hdcpCapability;
|
||||
|
||||
|
||||
trilist.SetUShortSigAction(joinMap.Port2HdcpState.JoinNumber, a => dmInHdcp.SetDmInHdcpState((eHdcpCapabilityType)a));
|
||||
}
|
||||
}
|
||||
|
||||
trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber].UShortValue = (ushort) hdcpCapability;
|
||||
|
||||
trilist.UShortInput[joinMap.HdcpInputPortCount.JoinNumber].UShortValue = (ushort) routing.InputPorts.Count;
|
||||
|
||||
var routingWithFeedback = routing as IRmcRouting;
|
||||
if (routingWithFeedback == null) return;
|
||||
|
||||
if (routingWithFeedback.AudioVideoSourceNumericFeedback != null)
|
||||
routingWithFeedback.AudioVideoSourceNumericFeedback.LinkInputSig(
|
||||
trilist.UShortInput[joinMap.AudioVideoSource.JoinNumber]);
|
||||
|
||||
|
||||
trilist.SetUShortSigAction(joinMap.AudioVideoSource.JoinNumber,
|
||||
a => routingWithFeedback.ExecuteNumericSwitch(a, 1, eRoutingSignalType.AudioVideo));
|
||||
}
|
||||
|
||||
#region Implementation of IDeviceInfoProvider
|
||||
|
||||
@@ -137,15 +137,10 @@ namespace PepperDash.Essentials.DM
|
||||
HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability",
|
||||
() => (int) tx.HdmiInputs[2].HdcpCapabilityFeedback);
|
||||
|
||||
HdcpStateFeedback =
|
||||
new IntFeedback(
|
||||
() =>
|
||||
tx.HdmiInputs[1].HdcpCapabilityFeedback > tx.HdmiInputs[2].HdcpCapabilityFeedback
|
||||
? (int) tx.HdmiInputs[1].HdcpCapabilityFeedback
|
||||
: (int) tx.HdmiInputs[2].HdcpCapabilityFeedback);
|
||||
|
||||
HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support;
|
||||
|
||||
HdcpStateFeedback = new IntFeedback(() => (int) HdcpSupportCapability);
|
||||
|
||||
Hdmi1VideoSyncFeedback = new BoolFeedback(() => (bool) tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue);
|
||||
|
||||
Hdmi2VideoSyncFeedback = new BoolFeedback(() => (bool) tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue);
|
||||
|
||||
@@ -145,15 +145,10 @@ namespace PepperDash.Essentials.DM
|
||||
|
||||
HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability", () => (int)tx.HdmiInputs[2].HdcpCapabilityFeedback);
|
||||
|
||||
HdcpStateFeedback =
|
||||
new IntFeedback(
|
||||
() =>
|
||||
tx.HdmiInputs[1].HdcpCapabilityFeedback > tx.HdmiInputs[2].HdcpCapabilityFeedback
|
||||
? (int)tx.HdmiInputs[1].HdcpCapabilityFeedback
|
||||
: (int)tx.HdmiInputs[2].HdcpCapabilityFeedback);
|
||||
|
||||
HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support;
|
||||
|
||||
HdcpStateFeedback = new IntFeedback(() => (int)HdcpSupportCapability);
|
||||
|
||||
Hdmi1VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue);
|
||||
|
||||
Hdmi2VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue);
|
||||
|
||||
@@ -124,15 +124,10 @@ namespace PepperDash.Essentials.DM
|
||||
|
||||
HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability", () => (int)tx.HdmiInputs[2].HdcpCapabilityFeedback);
|
||||
|
||||
HdcpStateFeedback =
|
||||
new IntFeedback(
|
||||
() =>
|
||||
tx.HdmiInputs[1].HdcpCapabilityFeedback > tx.HdmiInputs[2].HdcpCapabilityFeedback
|
||||
? (int)tx.HdmiInputs[1].HdcpCapabilityFeedback
|
||||
: (int)tx.HdmiInputs[2].HdcpCapabilityFeedback);
|
||||
|
||||
HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support;
|
||||
|
||||
HdcpStateFeedback = new IntFeedback(() => (int)HdcpSupportCapability);
|
||||
|
||||
Hdmi1VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue);
|
||||
|
||||
Hdmi2VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue);
|
||||
|
||||
@@ -146,13 +146,18 @@ namespace PepperDash.Essentials.DM
|
||||
*/
|
||||
|
||||
//yeah this is gross - but it's the quickest way to do this...
|
||||
/*
|
||||
HdcpStateFeedback = new IntFeedback(() => {
|
||||
var states = new[] {(int) tx.DisplayPortInput.HdcpCapabilityFeedback, (int) tx.HdmiInputs[1].HdcpCapabilityFeedback, (int) tx.HdmiInputs[2].HdcpCapabilityFeedback};
|
||||
|
||||
return states.Max();
|
||||
});
|
||||
*/
|
||||
|
||||
HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support;
|
||||
// I feel like we have had this as a misnomer for so long, that it really needed to be fixed
|
||||
// All we were doing was reporting the best of the current statuses - not the actual capability of the device.
|
||||
HdcpStateFeedback = new IntFeedback(() => (int)HdcpSupportCapability);
|
||||
|
||||
Hdmi1VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue);
|
||||
|
||||
|
||||
@@ -411,9 +411,22 @@ namespace PepperDash.Essentials.DM
|
||||
|
||||
SetHdcpCapabilityAction(hdcpTypeSimple, port, joinMap.Port3HdcpState.JoinNumber, trilist);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
var hdcpInputPortCount =
|
||||
(ushort)
|
||||
txR.InputPorts.Where(
|
||||
x => (x.Type == eRoutingSignalType.Video) || (x.Type == eRoutingSignalType.AudioVideo))
|
||||
.Where(
|
||||
x =>
|
||||
(x.ConnectionType == eRoutingPortConnectionType.DmCat) ||
|
||||
(x.ConnectionType == eRoutingPortConnectionType.Hdmi) ||
|
||||
(x.ConnectionType == eRoutingPortConnectionType.DisplayPort))
|
||||
.ToList().Count();
|
||||
|
||||
trilist.SetUshort(joinMap.HdcpInputPortCount.JoinNumber, hdcpInputPortCount);
|
||||
|
||||
}
|
||||
|
||||
var txFreeRun = tx as IHasFreeRun;
|
||||
|
||||
@@ -107,6 +107,7 @@
|
||||
<Compile Include="Config\InputPropertiesConfig.cs" />
|
||||
<Compile Include="Endpoints\DGEs\DgeJoinMap.cs" />
|
||||
<Compile Include="Endpoints\DGEs\DmDge200CController.cs" />
|
||||
<Compile Include="Endpoints\EndpointInterfaces.cs" />
|
||||
<Compile Include="Endpoints\Receivers\DmRmc4kZ100CController.cs" />
|
||||
<Compile Include="Endpoints\Receivers\DmRmc4kZScalerCController.cs" />
|
||||
<Compile Include="Endpoints\Transmitters\DmTx4kz202CController.cs" />
|
||||
|
||||
Reference in New Issue
Block a user