From 0cd3c1bdc509d5ec58ccfc42561b789d6077b728 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Thu, 29 Jul 2021 13:01:02 -0600 Subject: [PATCH] fix(ZoomRoom): #767 #768 Adds Output2 on ZoomRoom and updates to UI for VTC Updates EssentialsVideoCodecUiDriver and codec classes to better deal with dynamic use of IHasCallHistory and --- .../UI/JoinConstants/UIBoolJoin.cs | 7 ++++- .../VC/EssentialsVideoCodecUiDriver.cs | 26 ++++++++++++++----- .../VideoCodec/CiscoCodec/CiscoSparkCodec.cs | 3 ++- .../VideoCodec/CiscoCodec/xStatus.cs | 20 ++++++++++++-- .../VideoCodec/VideoCodecBase.cs | 4 +-- .../VideoCodec/ZoomRoom/ZoomRoom.cs | 6 +++++ 6 files changed, 53 insertions(+), 13 deletions(-) diff --git a/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs b/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs index 293fddd5..f8685671 100644 --- a/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs +++ b/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs @@ -103,7 +103,7 @@ namespace PepperDash.Essentials /// /// 1202 /// - public const uint VCStagingInactivePopoverVisible = 1202; + public const uint VCStagingInactivePopoverWithRecentsVisible = 1202; /// /// /// @@ -121,6 +121,11 @@ namespace PepperDash.Essentials /// public const uint VCRecentsVisible = 1206; + /// + /// 1202 + /// + public const uint VCStagingInactivePopoverWithoutRecentsVisible = 1207; + /// /// 1208 /// diff --git a/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs b/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs index 5642d757..6d5521a8 100644 --- a/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs +++ b/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs @@ -142,7 +142,10 @@ namespace PepperDash.Essentials.UIDrivers.VC VCControlsInterlock.SetButDontShow(UIBoolJoin.VCKeypadVisible); StagingBarsInterlock = new JoinedSigInterlock(triList); - StagingBarsInterlock.SetButDontShow(UIBoolJoin.VCStagingInactivePopoverVisible); + if(Codec is IHasCallHistory) + StagingBarsInterlock.SetButDontShow(UIBoolJoin.VCStagingInactivePopoverWithRecentsVisible); + else + StagingBarsInterlock.SetButDontShow(UIBoolJoin.VCStagingInactivePopoverWithoutRecentsVisible); StagingButtonsFeedbackInterlock = new JoinedSigInterlock(triList); StagingButtonsFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingKeypadPress); @@ -351,10 +354,15 @@ namespace PepperDash.Essentials.UIDrivers.VC TriList.UShortInput[UIUshortJoin.VCStagingConnectButtonMode].UShortValue = (ushort)(Codec.IsInCall ? 1 : 0); uint stageJoin; - if (Codec.IsInCall) - stageJoin = UIBoolJoin.VCStagingActivePopoverVisible; - else - stageJoin = UIBoolJoin.VCStagingInactivePopoverVisible; + if (Codec.IsInCall) + stageJoin = UIBoolJoin.VCStagingActivePopoverVisible; + else + { + if (Codec is IHasCallHistory) + stageJoin = UIBoolJoin.VCStagingInactivePopoverWithRecentsVisible; + else + stageJoin = UIBoolJoin.VCStagingInactivePopoverWithoutRecentsVisible; + } if (IsVisible) StagingBarsInterlock.ShowInterlocked(stageJoin); else @@ -513,9 +521,13 @@ namespace PepperDash.Essentials.UIDrivers.VC var codecOffCameras = Codec as IHasCameraOff; + var supportsCameraOffMode = Codec.SupportsCameraOff; + var codecAutoCameras = Codec as IHasCameraAutoMode; - if (codecAutoCameras != null) + var supportsAutoCameraMode = Codec.SupportsCameraAutoMode; + + if (codecAutoCameras != null && supportsAutoCameraMode) { CameraModeList.SetItemButtonAction(1,(b) => codecAutoCameras.CameraAutoModeOn()); TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanInput["Item 1 Visible"].BoolValue = true; @@ -554,7 +566,7 @@ namespace PepperDash.Essentials.UIDrivers.VC //TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanOutput["Item 2 Pressed"].SetSigFalseAction( // () => ShowCameraManualMode()); - if (codecOffCameras != null) + if (codecOffCameras != null && supportsCameraOffMode) { TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanInput["Item 3 Visible"].BoolValue = true; codecOffCameras.CameraIsOffFeedback.LinkInputSig(CameraModeList.SmartObject.BooleanInput["Item 3 Selected"]); diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs index a7be2443..d31fbda1 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs @@ -314,7 +314,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco FarEndIsSharingContentFeedback = new BoolFeedback(FarEndIsSharingContentFeedbackFunc); CameraIsOffFeedback = new BoolFeedback(() => CodecStatus.Status.Video.Input.MainVideoMute.BoolValue); CameraIsMutedFeedback = CameraIsOffFeedback; - + SupportsCameraOff = true; PresentationViewMaximizedFeedback = new BoolFeedback(() => CurrentPresentationView == "Maximized"); @@ -417,6 +417,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco CodecStatus.Status.RoomAnalytics.PeoplePresence.ValueChangedAction = RoomIsOccupiedFeedback.FireUpdate; CodecStatus.Status.RoomAnalytics.PeopleCount.Current.ValueChangedAction = PeopleCountFeedback.FireUpdate; CodecStatus.Status.Cameras.SpeakerTrack.Status.ValueChangedAction = CameraAutoModeIsOnFeedback.FireUpdate; + CodecStatus.Status.Cameras.SpeakerTrack.Availability.ValueChangedAction = () => { SupportsCameraAutoMode = CodecStatus.Status.Cameras.SpeakerTrack.Availability.BoolValue; }; CodecStatus.Status.Video.Selfview.Mode.ValueChangedAction = SelfviewIsOnFeedback.FireUpdate; CodecStatus.Status.Video.Selfview.PIPPosition.ValueChangedAction = ComputeSelfviewPipStatus; CodecStatus.Status.Video.Layout.LayoutFamily.Local.ValueChangedAction = ComputeLocalLayout; diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/xStatus.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/xStatus.cs index 676737c4..8184289e 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/xStatus.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/xStatus.cs @@ -277,9 +277,25 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public SoftwareID SoftwareID { get; set; } } - public class Availability + public class Availability : ValueProperty { - public string Value { get; set; } + string _Value; + public bool BoolValue { get; private set; } + + public string Value + { + get + { + return _Value; + } + set + { + // If the incoming value is "Available" it sets the BoolValue true, otherwise sets it false + _Value = value; + BoolValue = value == "Available"; + OnValueChanged(); + } + } } public class Status2 : ValueProperty diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs index fc38a647..c5cff74e 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs @@ -65,8 +65,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec public bool ShowSelfViewByDefault { get; protected set; } - protected bool SupportsCameraOff; - protected bool SupportsCameraAutoMode; + public bool SupportsCameraOff { get; protected set; } + public bool SupportsCameraAutoMode { get; protected set; } public bool IsReady { get; protected set; } diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs index f8d4bf47..9ac80c33 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs @@ -95,6 +95,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, null, this); + Output2 = new RoutingOutputPort(RoutingPortNames.AnyVideoOut, + eRoutingSignalType.Video, + eRoutingPortConnectionType.DisplayPort, null, this); + SelfviewIsOnFeedback = new BoolFeedback(SelfViewIsOnFeedbackFunc); CameraIsOffFeedback = new BoolFeedback(CameraIsOffFeedbackFunc); @@ -252,6 +256,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom public RoutingInputPort CodecOsdIn { get; private set; } public RoutingOutputPort Output1 { get; private set; } + public RoutingOutputPort Output2 { get; private set; } #region ICommunicationMonitor Members @@ -685,6 +690,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom // Set up output ports OutputPorts.Add(Output1); + OutputPorts.Add(Output2); } ///