From d70d8b58dd359d005d2204e9f0cf60a619b69e54 Mon Sep 17 00:00:00 2001 From: Heath Volmer Date: Fri, 3 Aug 2018 16:42:36 -0600 Subject: [PATCH] Added new Messenger for video codec --- .../Messengers/VideoCodecBaseMessenger.cs | 5 ++++ .../CotijaEssentialsHuddleSpaceRoomBridge.cs | 29 ++++++++++++------- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/PepperDashEssentials/AppServer/Messengers/VideoCodecBaseMessenger.cs b/PepperDashEssentials/AppServer/Messengers/VideoCodecBaseMessenger.cs index e35e4839..17c319e1 100644 --- a/PepperDashEssentials/AppServer/Messengers/VideoCodecBaseMessenger.cs +++ b/PepperDashEssentials/AppServer/Messengers/VideoCodecBaseMessenger.cs @@ -83,6 +83,11 @@ namespace PepperDash.Essentials.AppServer.Messengers appServerController.AddAction(MessagePath + "/standbyOff", new Action(() => Codec.StandbyDeactivate())); } + public void GetFullStatusMessage() + { + + } + /// /// Helper to grab a call with string ID /// diff --git a/PepperDashEssentials/AppServer/RoomBridges/CotijaEssentialsHuddleSpaceRoomBridge.cs b/PepperDashEssentials/AppServer/RoomBridges/CotijaEssentialsHuddleSpaceRoomBridge.cs index 8b4c1214..20e16891 100644 --- a/PepperDashEssentials/AppServer/RoomBridges/CotijaEssentialsHuddleSpaceRoomBridge.cs +++ b/PepperDashEssentials/AppServer/RoomBridges/CotijaEssentialsHuddleSpaceRoomBridge.cs @@ -7,6 +7,7 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; using PepperDash.Core; +using PepperDash.Essentials.AppServer.Messengers; using PepperDash.Essentials.Core; using PepperDash.Essentials.Room.Cotija; using PepperDash.Essentials.Devices.Common.Codec; @@ -19,6 +20,8 @@ namespace PepperDash.Essentials public EssentialsRoomBase Room { get; private set; } + public VideoCodecBaseMessenger VCMessenger { get; private set; } + /// /// /// @@ -91,20 +94,24 @@ namespace PepperDash.Essentials if (vcRoom != null) { var codec = vcRoom.VideoCodec; + VCMessenger = new VideoCodecBaseMessenger(vcRoom.VideoCodec, "/device/videoCodec"); + VCMessenger.RegisterWithAppServer(Parent); + + // May need to move this or remove this codec.CallStatusChange += new EventHandler(codec_CallStatusChange); vcRoom.IsSharingFeedback.OutputChange += new EventHandler(IsSharingFeedback_OutputChange); - Parent.AddAction("/device/videoCodec/dial", new Action(s => codec.Dial(s))); - Parent.AddAction("/device/videoCodec/endCall", new Action(s => - { - var call = codec.ActiveCalls.FirstOrDefault(c => c.Id == s); - if (call != null) - { - codec.EndCall(call); - } - })); - Parent.AddAction("/device/videoCodec/endAllCalls", new Action(() => codec.EndAllCalls())); + //Parent.AddAction("/device/videoCodec/dial", new Action(s => codec.Dial(s))); + //Parent.AddAction("/device/videoCodec/endCall", new Action(s => + //{ + // var call = codec.ActiveCalls.FirstOrDefault(c => c.Id == s); + // if (call != null) + // { + // codec.EndCall(call); + // } + //})); + //Parent.AddAction("/device/videoCodec/endAllCalls", new Action(() => codec.EndAllCalls())); } Parent.AddAction(string.Format(@"/room/{0}/shutdownStart", Room.Key), new Action(() => Room.StartShutdown(eShutdownType.Manual))); @@ -163,7 +170,7 @@ namespace PepperDash.Essentials PostStatusMessage(new { calls = GetCallsMessageObject(), - vtc = GetVtcCallsMessageObject() + //vtc = GetVtcCallsMessageObject() }); }