mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 05:05:00 +00:00
@@ -186,7 +186,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
DmTxControllerJoinMap joinMap = GetDmTxJoinMap(joinStart, joinMapKey);
|
var joinMap = GetDmTxJoinMap(joinStart, joinMapKey);
|
||||||
|
|
||||||
if (Hdmi1VideoSyncFeedback != null)
|
if (Hdmi1VideoSyncFeedback != null)
|
||||||
{
|
{
|
||||||
@@ -204,8 +204,9 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input);
|
Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input);
|
||||||
|
|
||||||
if (type == eRoutingSignalType.Video)
|
switch (type)
|
||||||
{
|
{
|
||||||
|
case eRoutingSignalType.Video:
|
||||||
switch (input)
|
switch (input)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
@@ -229,9 +230,8 @@ namespace PepperDash.Essentials.DM
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
break;
|
||||||
else if (type == eRoutingSignalType.Audio)
|
case eRoutingSignalType.Audio:
|
||||||
{
|
|
||||||
switch (input)
|
switch (input)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
@@ -255,6 +255,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -106,43 +106,23 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
Tx.HdmiInputs[1].InputStreamChange += InputStreamChangeEvent;
|
Tx.HdmiInputs[1].InputStreamChange += InputStreamChangeEvent;
|
||||||
Tx.HdmiInputs[2].InputStreamChange += InputStreamChangeEvent;
|
Tx.HdmiInputs[2].InputStreamChange += InputStreamChangeEvent;
|
||||||
|
Tx.VgaInput.InputStreamChange += VgaInputOnInputStreamChange;
|
||||||
Tx.BaseEvent += Tx_BaseEvent;
|
Tx.BaseEvent += Tx_BaseEvent;
|
||||||
|
|
||||||
VideoSourceNumericFeedback = new IntFeedback(() =>
|
VideoSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback);
|
||||||
{
|
AudioSourceNumericFeedback = new IntFeedback(() => (int)Tx.AudioSourceFeedback);
|
||||||
return (int)Tx.VideoSourceFeedback;
|
|
||||||
});
|
|
||||||
AudioSourceNumericFeedback = new IntFeedback(() =>
|
|
||||||
{
|
|
||||||
return (int)Tx.AudioSourceFeedback;
|
|
||||||
});
|
|
||||||
|
|
||||||
HdmiIn1HdcpCapabilityFeedback = new IntFeedback("HdmiIn1HdcpCapability", () =>
|
HdmiIn1HdcpCapabilityFeedback = new IntFeedback("HdmiIn1HdcpCapability", () => (int)tx.HdmiInputs[1].HdcpCapabilityFeedback);
|
||||||
{
|
|
||||||
return (int)tx.HdmiInputs[1].HdcpCapabilityFeedback;
|
|
||||||
});
|
|
||||||
|
|
||||||
HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability", () =>
|
HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability", () => (int)tx.HdmiInputs[2].HdcpCapabilityFeedback);
|
||||||
{
|
|
||||||
return (int)tx.HdmiInputs[2].HdcpCapabilityFeedback;
|
|
||||||
});
|
|
||||||
|
|
||||||
HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support;
|
HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support;
|
||||||
|
|
||||||
Hdmi1VideoSyncFeedback = new BoolFeedback(() =>
|
Hdmi1VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue);
|
||||||
{
|
|
||||||
return (bool)tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue;
|
|
||||||
});
|
|
||||||
|
|
||||||
Hdmi2VideoSyncFeedback = new BoolFeedback(() =>
|
Hdmi2VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue);
|
||||||
{
|
|
||||||
return (bool)tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue;
|
|
||||||
});
|
|
||||||
|
|
||||||
VgaVideoSyncFeedback = new BoolFeedback(() =>
|
VgaVideoSyncFeedback = new BoolFeedback(() => (bool)tx.VgaInput.SyncDetectedFeedback.BoolValue);
|
||||||
{
|
|
||||||
return (bool)tx.VgaInput.SyncDetectedFeedback.BoolValue;
|
|
||||||
});
|
|
||||||
|
|
||||||
FreeRunEnabledFeedback = new BoolFeedback(() => tx.VgaInput.FreeRunFeedback == eDmFreeRunSetting.Enabled);
|
FreeRunEnabledFeedback = new BoolFeedback(() => tx.VgaInput.FreeRunFeedback == eDmFreeRunSetting.Enabled);
|
||||||
|
|
||||||
@@ -164,9 +144,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
if (ActualActiveVideoInput == eVst.Hdmi1)
|
if (ActualActiveVideoInput == eVst.Hdmi1)
|
||||||
return tx.HdmiInputs[1].VideoAttributes.HdcpStateFeedback.ToString();
|
return tx.HdmiInputs[1].VideoAttributes.HdcpStateFeedback.ToString();
|
||||||
if (ActualActiveVideoInput == eVst.Hdmi2)
|
return ActualActiveVideoInput == eVst.Hdmi2 ? tx.HdmiInputs[2].VideoAttributes.HdcpStateFeedback.ToString() : "";
|
||||||
return tx.HdmiInputs[2].VideoAttributes.HdcpStateFeedback.ToString();
|
|
||||||
return "";
|
|
||||||
},
|
},
|
||||||
|
|
||||||
VideoResolutionFeedbackFunc = () =>
|
VideoResolutionFeedbackFunc = () =>
|
||||||
@@ -175,9 +153,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
return tx.HdmiInputs[1].VideoAttributes.GetVideoResolutionString();
|
return tx.HdmiInputs[1].VideoAttributes.GetVideoResolutionString();
|
||||||
if (ActualActiveVideoInput == eVst.Hdmi2)
|
if (ActualActiveVideoInput == eVst.Hdmi2)
|
||||||
return tx.HdmiInputs[2].VideoAttributes.GetVideoResolutionString();
|
return tx.HdmiInputs[2].VideoAttributes.GetVideoResolutionString();
|
||||||
if (ActualActiveVideoInput == eVst.Vga)
|
return ActualActiveVideoInput == eVst.Vga ? tx.VgaInput.VideoAttributes.GetVideoResolutionString() : "";
|
||||||
return tx.VgaInput.VideoAttributes.GetVideoResolutionString();
|
|
||||||
return "";
|
|
||||||
},
|
},
|
||||||
VideoSyncFeedbackFunc = () =>
|
VideoSyncFeedbackFunc = () =>
|
||||||
(ActualActiveVideoInput == eVst.Hdmi1
|
(ActualActiveVideoInput == eVst.Hdmi1
|
||||||
@@ -211,18 +187,32 @@ namespace PepperDash.Essentials.DM
|
|||||||
DmOut.Port = Tx.DmOutput;
|
DmOut.Port = Tx.DmOutput;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void VgaInputOnInputStreamChange(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
||||||
|
{
|
||||||
|
switch (args.EventId)
|
||||||
|
{
|
||||||
|
case EndpointInputStreamEventIds.FreeRunFeedbackEventId:
|
||||||
|
FreeRunEnabledFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
|
case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
|
||||||
|
VgaVideoSyncFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void VideoControls_ControlChange(object sender, Crestron.SimplSharpPro.DeviceSupport.GenericEventArgs args)
|
void VideoControls_ControlChange(object sender, Crestron.SimplSharpPro.DeviceSupport.GenericEventArgs args)
|
||||||
{
|
{
|
||||||
var id = args.EventId;
|
var id = args.EventId;
|
||||||
Debug.Console(2, this, "EventId {0}", args.EventId);
|
Debug.Console(2, this, "EventId {0}", args.EventId);
|
||||||
|
|
||||||
if (id == VideoControlsEventIds.BrightnessFeedbackEventId)
|
switch (id)
|
||||||
{
|
{
|
||||||
|
case VideoControlsEventIds.BrightnessFeedbackEventId:
|
||||||
VgaBrightnessFeedback.FireUpdate();
|
VgaBrightnessFeedback.FireUpdate();
|
||||||
}
|
break;
|
||||||
else if (id == VideoControlsEventIds.ContrastFeedbackEventId)
|
case VideoControlsEventIds.ContrastFeedbackEventId:
|
||||||
{
|
|
||||||
VgaContrastFeedback.FireUpdate();
|
VgaContrastFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -246,7 +236,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
DmTxControllerJoinMap joinMap = GetDmTxJoinMap(joinStart, joinMapKey);
|
var joinMap = GetDmTxJoinMap(joinStart, joinMapKey);
|
||||||
|
|
||||||
if (Hdmi1VideoSyncFeedback != null)
|
if (Hdmi1VideoSyncFeedback != null)
|
||||||
{
|
{
|
||||||
@@ -270,14 +260,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
/// <param name="enable"></param>
|
/// <param name="enable"></param>
|
||||||
public void SetFreeRunEnabled(bool enable)
|
public void SetFreeRunEnabled(bool enable)
|
||||||
{
|
{
|
||||||
if (enable)
|
Tx.VgaInput.FreeRun = enable ? eDmFreeRunSetting.Enabled : eDmFreeRunSetting.Disabled;
|
||||||
{
|
|
||||||
Tx.VgaInput.FreeRun = eDmFreeRunSetting.Enabled;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Tx.VgaInput.FreeRun = eDmFreeRunSetting.Disabled;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -304,8 +287,9 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input);
|
Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input);
|
||||||
|
|
||||||
if (type == eRoutingSignalType.Video)
|
switch (type)
|
||||||
{
|
{
|
||||||
|
case eRoutingSignalType.Video:
|
||||||
switch (input)
|
switch (input)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
@@ -334,9 +318,8 @@ namespace PepperDash.Essentials.DM
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
break;
|
||||||
else if (type == eRoutingSignalType.Audio)
|
case eRoutingSignalType.Audio:
|
||||||
{
|
|
||||||
switch (input)
|
switch (input)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
@@ -365,6 +348,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -380,37 +364,37 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
Debug.Console(2, "{0} event {1} stream {2}", this.Tx.ToString(), inputStream.ToString(), args.EventId.ToString());
|
Debug.Console(2, "{0} event {1} stream {2}", this.Tx.ToString(), inputStream.ToString(), args.EventId.ToString());
|
||||||
|
|
||||||
if (args.EventId == EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId)
|
switch (args.EventId)
|
||||||
{
|
{
|
||||||
|
case EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId:
|
||||||
if (inputStream == Tx.HdmiInputs[1])
|
if (inputStream == Tx.HdmiInputs[1])
|
||||||
HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
||||||
else if (inputStream == Tx.HdmiInputs[2])
|
else if (inputStream == Tx.HdmiInputs[2])
|
||||||
HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
||||||
}
|
break;
|
||||||
else if (args.EventId == EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId)
|
case EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId:
|
||||||
{
|
|
||||||
if (inputStream == Tx.HdmiInputs[1])
|
if (inputStream == Tx.HdmiInputs[1])
|
||||||
HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
||||||
else if (inputStream == Tx.HdmiInputs[2])
|
else if (inputStream == Tx.HdmiInputs[2])
|
||||||
HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Tx_BaseEvent(GenericBase device, BaseEventArgs args)
|
void Tx_BaseEvent(GenericBase device, BaseEventArgs args)
|
||||||
{
|
{
|
||||||
var id = args.EventId;
|
var id = args.EventId;
|
||||||
if (id == EndpointTransmitterBase.VideoSourceFeedbackEventId)
|
switch (id)
|
||||||
{
|
{
|
||||||
|
case EndpointTransmitterBase.VideoSourceFeedbackEventId:
|
||||||
Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback);
|
Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback);
|
||||||
VideoSourceNumericFeedback.FireUpdate();
|
VideoSourceNumericFeedback.FireUpdate();
|
||||||
ActiveVideoInputFeedback.FireUpdate();
|
ActiveVideoInputFeedback.FireUpdate();
|
||||||
}
|
break;
|
||||||
|
case EndpointTransmitterBase.AudioSourceFeedbackEventId:
|
||||||
// ------------------------------ incomplete -----------------------------------------
|
|
||||||
else if (id == EndpointTransmitterBase.AudioSourceFeedbackEventId)
|
|
||||||
{
|
|
||||||
Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback);
|
Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback);
|
||||||
AudioSourceNumericFeedback.FireUpdate();
|
AudioSourceNumericFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -419,12 +403,10 @@ namespace PepperDash.Essentials.DM
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
||||||
{
|
{
|
||||||
if (eventId == EndpointInputStreamEventIds.SyncDetectedFeedbackEventId)
|
if (eventId != EndpointInputStreamEventIds.SyncDetectedFeedbackEventId) return;
|
||||||
{
|
|
||||||
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||||
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Relays the VideoAttributes change to a RoutingInputPort
|
/// Relays the VideoAttributes change to a RoutingInputPort
|
||||||
|
|||||||
Reference in New Issue
Block a user