feat: add scaler mode for videowall set rmc 4kz scaler c

This commit is contained in:
mhengeli
2024-06-21 15:37:28 -04:00
parent a2b7a39082
commit eb388d28db
4 changed files with 34 additions and 3 deletions

View File

@@ -68,7 +68,9 @@ namespace PepperDash.Essentials.Core.Bridges
public JoinDataComplete HdcpInputPortCount = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 }, 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 }); new JoinMetadata { Description = "Number of Input Ports that support HDCP", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
[JoinName("ScalerOutWallMode")]
public JoinDataComplete ScalerOutWallMode = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 },
new JoinMetadata { Description = "Number of Input Ports that support HDCP", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
/// <summary> /// <summary>
/// Constructor to use when instantiating this Join Map without inheriting from it /// Constructor to use when instantiating this Join Map without inheriting from it

View File

@@ -87,5 +87,11 @@ namespace PepperDash_Essentials_DM
public interface IHasDisplayPortInHdcp : IHasDisplayPortInHdcpGet, IHasDisplayPortInHdcpSet public interface IHasDisplayPortInHdcp : IHasDisplayPortInHdcpGet, IHasDisplayPortInHdcpSet
{ {
eHdcpCapabilityType DisplayPortInHdcpCapability { get; } eHdcpCapabilityType DisplayPortInHdcpCapability { get; }
}
public interface IhasWallMode
{
void SeteWallMode(ushort walLMode);
} }
} }

View File

@@ -10,12 +10,13 @@ using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Bridges; using PepperDash.Essentials.Core.Bridges;
using PepperDash.Core; using PepperDash.Core;
using PepperDash_Essentials_DM; using PepperDash_Essentials_DM;
using System.Collections.Generic;
namespace PepperDash.Essentials.DM namespace PepperDash.Essentials.DM
{ {
[Description("Wrapper Class for DM-RMC-4K-Z-SCALER-C")] [Description("Wrapper Class for DM-RMC-4K-Z-SCALER-C")]
public class DmRmc4kZScalerCController : DmRmcControllerBase, IRmcRoutingWithFeedback, public class DmRmc4kZScalerCController : DmRmcControllerBase, IRmcRoutingWithFeedback,
IIROutputPorts, IComPorts, ICec, IRelayPorts, IHasDmInHdcp, IHasHdmiInHdcp IIROutputPorts, IComPorts, ICec, IRelayPorts, IHasDmInHdcp, IHasHdmiInHdcp, IhasWallMode
{ {
private readonly DmRmc4kzScalerC _rmc; private readonly DmRmc4kzScalerC _rmc;
@@ -28,7 +29,7 @@ namespace PepperDash.Essentials.DM
public BoolFeedback HdmiVideoSyncFeedback { get; private set; } public BoolFeedback HdmiVideoSyncFeedback { get; private set; }
private Dictionary<ushort, EndpointScalerOutput.eWall> WallModes;
/// <summary> /// <summary>
/// The value of the current video source for the HDMI output on the receiver /// The value of the current video source for the HDMI output on the receiver
@@ -101,6 +102,15 @@ namespace PepperDash.Essentials.DM
HdmiOut.Port = _rmc.HdmiOutput; HdmiOut.Port = _rmc.HdmiOutput;
AudioVideoSourceNumericFeedback = new IntFeedback(() => (ushort)(_rmc.SelectedSourceFeedback)); AudioVideoSourceNumericFeedback = new IntFeedback(() => (ushort)(_rmc.SelectedSourceFeedback));
WallModes = new Dictionary<ushort, EndpointScalerOutput.eWall>()
{
{0, EndpointScalerOutput.eWall.Disabled},
{2211, EndpointScalerOutput.eWall.Mode11},
{2212, EndpointScalerOutput.eWall.Mode12},
{2221, EndpointScalerOutput.eWall.Mode13},
{2222, EndpointScalerOutput.eWall.Mode14}
};
} }
void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args) void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
@@ -241,5 +251,17 @@ namespace PepperDash.Essentials.DM
_rmc.HdmiIn.HdcpCapability = hdcpState; _rmc.HdmiIn.HdcpCapability = hdcpState;
} }
#region IhasWallMode Members
public void SeteWallMode(ushort walLMode)
{
EndpointScalerOutput.eWall wallvalue;
if (WallModes.TryGetValue(walLMode, out wallvalue))
_rmc.Scaler.WallMode = wallvalue;
}
#endregion
} }
} }

View File

@@ -51,6 +51,7 @@ namespace PepperDash.Essentials.DM
InputPorts = new RoutingPortCollection<RoutingInputPort> {DmIn}; InputPorts = new RoutingPortCollection<RoutingInputPort> {DmIn};
OutputPorts = new RoutingPortCollection<RoutingOutputPort> {HdmiOut}; OutputPorts = new RoutingPortCollection<RoutingOutputPort> {HdmiOut};
// Set Ports for CEC // Set Ports for CEC
HdmiOut.Port = _rmc.HdmiOutput; HdmiOut.Port = _rmc.HdmiOutput;
} }