mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 03:57:27 +00:00
fix: Add method to register for the correct event for resolution feedback
The resolution feedback change events don't appear to bubble up to the main DMInput change event. It appears to require subscribing to an event on the VideoAttributes class that the input contains.
This commit is contained in:
parent
fa6cabe246
commit
cad45c04cb
1 changed files with 26 additions and 0 deletions
|
|
@ -8,6 +8,7 @@ using Crestron.SimplSharpPro.DeviceSupport;
|
|||
using Crestron.SimplSharpPro.DM;
|
||||
using Crestron.SimplSharpPro.DM.Cards;
|
||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
||||
using Crestron.SimplSharpProInternal;
|
||||
using Newtonsoft.Json;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
|
|
@ -482,6 +483,29 @@ namespace PepperDash.Essentials.DM
|
|||
|
||||
}
|
||||
|
||||
private void RegisterForInputResolutionFeedback(IVideoAttributesBasic input, uint number, RoutingInputPortWithVideoStatuses inputPort)
|
||||
{
|
||||
if (input == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
input.VideoAttributes.AttributeChange += (sender, args) =>
|
||||
{
|
||||
var inputAttributes = sender as IVideoAttributesBasic;
|
||||
|
||||
if (inputAttributes == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Debug.Console(1, this, "Input {0} resolution updated", number);
|
||||
|
||||
Debug.Console(1, this, "Updating resolution feedback for input {0}", number);
|
||||
inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
|
@ -883,6 +907,8 @@ namespace PepperDash.Essentials.DM
|
|||
{
|
||||
FeedbackMatchObject = Chassis.Inputs[cardNum]
|
||||
};
|
||||
|
||||
RegisterForInputResolutionFeedback(videoAttributesBasic, cardNum, inputPort as RoutingInputPortWithVideoStatuses);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue