Added new Messenger for video codec

This commit is contained in:
Heath Volmer
2018-08-03 16:42:36 -06:00
parent 1b942918d7
commit d70d8b58dd
2 changed files with 23 additions and 11 deletions

View File

@@ -83,6 +83,11 @@ namespace PepperDash.Essentials.AppServer.Messengers
appServerController.AddAction(MessagePath + "/standbyOff", new Action(() => Codec.StandbyDeactivate())); appServerController.AddAction(MessagePath + "/standbyOff", new Action(() => Codec.StandbyDeactivate()));
} }
public void GetFullStatusMessage()
{
}
/// <summary> /// <summary>
/// Helper to grab a call with string ID /// Helper to grab a call with string ID
/// </summary> /// </summary>

View File

@@ -7,6 +7,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
using PepperDash.Core; using PepperDash.Core;
using PepperDash.Essentials.AppServer.Messengers;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
using PepperDash.Essentials.Room.Cotija; using PepperDash.Essentials.Room.Cotija;
using PepperDash.Essentials.Devices.Common.Codec; using PepperDash.Essentials.Devices.Common.Codec;
@@ -19,6 +20,8 @@ namespace PepperDash.Essentials
public EssentialsRoomBase Room { get; private set; } public EssentialsRoomBase Room { get; private set; }
public VideoCodecBaseMessenger VCMessenger { get; private set; }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
@@ -91,20 +94,24 @@ namespace PepperDash.Essentials
if (vcRoom != null) if (vcRoom != null)
{ {
var codec = vcRoom.VideoCodec; 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<CodecCallStatusItemChangeEventArgs>(codec_CallStatusChange); codec.CallStatusChange += new EventHandler<CodecCallStatusItemChangeEventArgs>(codec_CallStatusChange);
vcRoom.IsSharingFeedback.OutputChange += new EventHandler<FeedbackEventArgs>(IsSharingFeedback_OutputChange); vcRoom.IsSharingFeedback.OutputChange += new EventHandler<FeedbackEventArgs>(IsSharingFeedback_OutputChange);
Parent.AddAction("/device/videoCodec/dial", new Action<string>(s => codec.Dial(s))); //Parent.AddAction("/device/videoCodec/dial", new Action<string>(s => codec.Dial(s)));
Parent.AddAction("/device/videoCodec/endCall", new Action<string>(s => //Parent.AddAction("/device/videoCodec/endCall", new Action<string>(s =>
{ //{
var call = codec.ActiveCalls.FirstOrDefault(c => c.Id == s); // var call = codec.ActiveCalls.FirstOrDefault(c => c.Id == s);
if (call != null) // if (call != null)
{ // {
codec.EndCall(call); // codec.EndCall(call);
} // }
})); //}));
Parent.AddAction("/device/videoCodec/endAllCalls", new Action(() => codec.EndAllCalls())); //Parent.AddAction("/device/videoCodec/endAllCalls", new Action(() => codec.EndAllCalls()));
} }
Parent.AddAction(string.Format(@"/room/{0}/shutdownStart", Room.Key), new Action(() => Room.StartShutdown(eShutdownType.Manual))); Parent.AddAction(string.Format(@"/room/{0}/shutdownStart", Room.Key), new Action(() => Room.StartShutdown(eShutdownType.Manual)));
@@ -163,7 +170,7 @@ namespace PepperDash.Essentials
PostStatusMessage(new PostStatusMessage(new
{ {
calls = GetCallsMessageObject(), calls = GetCallsMessageObject(),
vtc = GetVtcCallsMessageObject() //vtc = GetVtcCallsMessageObject()
}); });
} }