mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 21:24:54 +00:00
feat:(Essentials_DM) Update AddInputPortWithDebug
Adding an `IVideoAttributesBasic` as a parameter for this method relatively easily allows us to get the reported input resolution when it changes.
This commit is contained in:
@@ -816,20 +816,47 @@ namespace PepperDash.Essentials.DM
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType)
|
void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType)
|
||||||
{
|
{
|
||||||
AddInputPortWithDebug(cardNum, portName, sigType, portType, null);
|
//Cast is necessary here to determine the correct overload
|
||||||
|
AddInputPortWithDebug(cardNum, portName, sigType, portType, null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType,
|
||||||
|
eRoutingPortConnectionType portType, ICec cecPort)
|
||||||
|
{
|
||||||
|
//Cast is necessary here to determine the correct overload
|
||||||
|
AddInputPortWithDebug(cardNum, portName, sigType, portType, cecPort, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds InputPort and sets Port as ICec object
|
/// Adds InputPort and sets Port as ICec object. If videoAttributesBasic is defined, RoutingPort will be RoutingInputPortWithVideoStatuses
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, ICec cecPort)
|
void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, ICec cecPort, IVideoAttributesBasic videoAttributesBasic)
|
||||||
{
|
{
|
||||||
var portKey = string.Format("inputCard{0}--{1}", cardNum, portName);
|
var portKey = string.Format("inputCard{0}--{1}", cardNum, portName);
|
||||||
Debug.Console(2, this, "Adding input port '{0}'", portKey);
|
Debug.Console(2, this, "Adding input port '{0}'", portKey);
|
||||||
var inputPort = new RoutingInputPort(portKey, sigType, portType, Chassis.Inputs[cardNum], this)
|
|
||||||
|
RoutingInputPort inputPort;
|
||||||
|
|
||||||
|
if (videoAttributesBasic != null)
|
||||||
|
{
|
||||||
|
var statusFuncs = new VideoStatusFuncsWrapper
|
||||||
|
{
|
||||||
|
VideoResolutionFeedbackFunc = () => videoAttributesBasic.VideoAttributes.GetVideoResolutionString()
|
||||||
|
};
|
||||||
|
inputPort = new RoutingInputPortWithVideoStatuses(portKey, sigType, portType,
|
||||||
|
Chassis.Inputs[cardNum], this, statusFuncs)
|
||||||
{
|
{
|
||||||
FeedbackMatchObject = Chassis.Inputs[cardNum]
|
FeedbackMatchObject = Chassis.Inputs[cardNum]
|
||||||
}; ;
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
inputPort = new RoutingInputPort(portKey, sigType, portType,
|
||||||
|
Chassis.Inputs[cardNum], this)
|
||||||
|
{
|
||||||
|
FeedbackMatchObject = Chassis.Inputs[cardNum]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
if (cecPort != null)
|
if (cecPort != null)
|
||||||
inputPort.Port = cecPort;
|
inputPort.Port = cecPort;
|
||||||
|
|||||||
Reference in New Issue
Block a user