mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-25 18:34:44 +00:00
Compare commits
30 Commits
1.9.5-hotf
...
1.9.8-alph
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
59bfa354e4 | ||
|
|
536e82ef22 | ||
|
|
63cd322fd0 | ||
|
|
489ba2da04 | ||
|
|
8087aa7a75 | ||
|
|
a8d0dfb327 | ||
|
|
cef9e0a9a6 | ||
|
|
16369e31cf | ||
|
|
38959414ff | ||
|
|
bc3247297e | ||
|
|
f7bf728263 | ||
|
|
025bf7adfb | ||
|
|
a6430a7bfe | ||
|
|
b71c83bac0 | ||
|
|
5940ec17c2 | ||
|
|
10445508b2 | ||
|
|
66ecf43508 | ||
|
|
77c4272219 | ||
|
|
d78a378859 | ||
|
|
eec4484f78 | ||
|
|
49e82f107b | ||
|
|
c5162fb94d | ||
|
|
63b9ffdd26 | ||
|
|
2e76b6ba0a | ||
|
|
cad45c04cb | ||
|
|
fa6cabe246 | ||
|
|
db3d96d448 | ||
|
|
a28a078c4f | ||
|
|
d00a31e3a6 | ||
|
|
77134f0a30 |
@@ -214,17 +214,25 @@ namespace PepperDash.Essentials
|
||||
|
||||
VideoCodec = DeviceManager.GetDeviceForKey(PropertiesConfig.VideoCodecKey) as
|
||||
PepperDash.Essentials.Devices.Common.VideoCodec.VideoCodecBase;
|
||||
|
||||
|
||||
|
||||
if (VideoCodec == null)
|
||||
throw new ArgumentNullException("codec cannot be null");
|
||||
|
||||
{
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Error, "No Video Codec set. Please check 'videoCodecKey' property in room config");
|
||||
throw new ArgumentNullException("VideoCodec cannot be null");
|
||||
}
|
||||
|
||||
AudioCodec = DeviceManager.GetDeviceForKey(PropertiesConfig.AudioCodecKey) as
|
||||
PepperDash.Essentials.Devices.Common.AudioCodec.AudioCodecBase;
|
||||
if (AudioCodec == null)
|
||||
Debug.Console(0, this, "No Audio Codec Found");
|
||||
|
||||
DefaultAudioDevice = DeviceManager.GetDeviceForKey(PropertiesConfig.DefaultAudioKey) as IBasicVolumeControls;
|
||||
if (DefaultAudioDevice == null)
|
||||
{
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Error, "No Default Audio Device set. Please check 'defaultAudioKey' property in room config");
|
||||
throw new ArgumentNullException("DefaultAudioDevice cannot be null");
|
||||
}
|
||||
|
||||
InitializeRoom();
|
||||
}
|
||||
|
||||
@@ -19,13 +19,34 @@ namespace PepperDash.Essentials.Core
|
||||
protected EssentialsDevice(string key)
|
||||
: base(key)
|
||||
{
|
||||
|
||||
SubscribeToActivateComplete();
|
||||
}
|
||||
|
||||
protected EssentialsDevice(string key, string name)
|
||||
: base(key, name)
|
||||
{
|
||||
SubscribeToActivateComplete();
|
||||
}
|
||||
|
||||
private void SubscribeToActivateComplete()
|
||||
{
|
||||
DeviceManager.AllDevicesActivated += DeviceManagerOnAllDevicesActivated;
|
||||
}
|
||||
|
||||
private void DeviceManagerOnAllDevicesActivated(object sender, EventArgs eventArgs)
|
||||
{
|
||||
CrestronInvoke.BeginInvoke((o) =>
|
||||
{
|
||||
try
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.Console(0, this, Debug.ErrorLogLevel.Error, "Exception initializing device: {0}", ex.Message);
|
||||
Debug.Console(1, this, Debug.ErrorLogLevel.Error, "Stack Trace: {0}", ex.StackTrace);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -88,11 +88,6 @@ namespace PepperDash.Essentials.Core.Privacy
|
||||
else
|
||||
Debug.Console(0, this, "Unable to add Red LED device");
|
||||
|
||||
DeviceManager.AllDevicesActivated += (o, a) =>
|
||||
{
|
||||
CheckPrivacyMode();
|
||||
};
|
||||
|
||||
AddPostActivationAction(() => {
|
||||
PrivacyDevice.PrivacyModeIsOnFeedback.OutputChange -= PrivacyModeIsOnFeedback_OutputChange;
|
||||
PrivacyDevice.PrivacyModeIsOnFeedback.OutputChange += PrivacyModeIsOnFeedback_OutputChange;
|
||||
@@ -103,6 +98,15 @@ namespace PepperDash.Essentials.Core.Privacy
|
||||
return base.CustomActivate();
|
||||
}
|
||||
|
||||
#region Overrides of Device
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
CheckPrivacyMode();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public void SetPrivacyDevice(IPrivacy privacyDevice)
|
||||
{
|
||||
PrivacyDevice = privacyDevice;
|
||||
|
||||
@@ -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,24 @@ namespace PepperDash.Essentials.DM
|
||||
|
||||
}
|
||||
|
||||
private void RegisterForInputResolutionFeedback(IVideoAttributesBasic input, uint number, RoutingInputPortWithVideoStatuses inputPort)
|
||||
{
|
||||
if (input == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Debug.Console(1, this, "Registering for resolution feedback for input {0} using Routing Port {1}", number, inputPort.Key);
|
||||
|
||||
input.VideoAttributes.AttributeChange += (sender, args) =>
|
||||
{
|
||||
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>
|
||||
@@ -497,166 +516,189 @@ namespace PepperDash.Essentials.DM
|
||||
{
|
||||
case "dmchd":
|
||||
{
|
||||
var inputCard = new DmcHd(number, this.Chassis);
|
||||
var cecPort = inputCard.HdmiInput as ICec;
|
||||
AddHdmiInCardPorts(number, cecPort);
|
||||
var inputCard = new DmcHd(number, Chassis);
|
||||
AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput);
|
||||
}
|
||||
break;
|
||||
case "dmchddsp":
|
||||
{
|
||||
var inputCard = new DmcHdDsp(number, this.Chassis);
|
||||
var cecPort = inputCard.HdmiInput as ICec;
|
||||
AddHdmiInCardPorts(number, cecPort);
|
||||
var inputCard = new DmcHdDsp(number, Chassis);
|
||||
AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput);
|
||||
}
|
||||
break;
|
||||
case "dmc4khd":
|
||||
{
|
||||
var inputCard = new Dmc4kHd(number, this.Chassis);
|
||||
var cecPort = inputCard.HdmiInput as ICec;
|
||||
AddHdmiInCardPorts(number, cecPort);
|
||||
var inputCard = new Dmc4kHd(number, Chassis);
|
||||
AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput);
|
||||
}
|
||||
break;
|
||||
case "dmc4khddsp":
|
||||
{
|
||||
var inputCard = new Dmc4kHdDsp(number, this.Chassis);
|
||||
var cecPort = inputCard.HdmiInput as ICec;
|
||||
AddHdmiInCardPorts(number, cecPort);
|
||||
var inputCard = new Dmc4kHdDsp(number, Chassis);
|
||||
AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput);
|
||||
}
|
||||
break;
|
||||
case "dmc4kzhd":
|
||||
{
|
||||
var inputCard = new Dmc4kzHd(number, this.Chassis);
|
||||
var cecPort = inputCard.HdmiInput as ICec;
|
||||
AddHdmiInCardPorts(number, cecPort);
|
||||
}
|
||||
var inputCard = new Dmc4kzHd(number, Chassis);
|
||||
AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput);
|
||||
break;
|
||||
}
|
||||
case "dmc4kzhddsp":
|
||||
{
|
||||
var inputCard = new Dmc4kzHdDsp(number, this.Chassis);
|
||||
var cecPort = inputCard.HdmiInput as ICec;
|
||||
AddHdmiInCardPorts(number, cecPort);
|
||||
}
|
||||
var inputCard = new Dmc4kzHdDsp(number, Chassis);
|
||||
AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput);
|
||||
break;
|
||||
}
|
||||
case "dmcc":
|
||||
{
|
||||
var inputCard = new DmcC(number, this.Chassis);
|
||||
var cecPort = inputCard.DmInput as ICec;
|
||||
AddDmInCardPorts(number, cecPort);
|
||||
var inputCard = new DmcC(number, Chassis);
|
||||
//DmInput doesn't implement ICec...cast was resulting in null anyway
|
||||
AddDmInCardPorts(number, null, inputCard.DmInput);
|
||||
}
|
||||
break;
|
||||
case "dmccdsp":
|
||||
{
|
||||
var inputCard = new DmcCDsp(number, this.Chassis);
|
||||
var cecPort = inputCard.DmInput as ICec;
|
||||
AddDmInCardPorts(number, cecPort);
|
||||
}
|
||||
var inputCard = new DmcCDsp(number, Chassis);
|
||||
//DmInput doesn't implement ICec...cast was resulting in null anyway
|
||||
AddDmInCardPorts(number, null, inputCard.DmInput);
|
||||
break;
|
||||
}
|
||||
|
||||
case "dmc4kc":
|
||||
{
|
||||
var inputCard = new Dmc4kC(number, this.Chassis);
|
||||
var cecPort = inputCard.DmInput as ICec;
|
||||
AddDmInCardPorts(number, cecPort);
|
||||
}
|
||||
var inputCard = new Dmc4kC(number, Chassis);
|
||||
AddDmInCardPorts(number, inputCard.DmInput,inputCard.DmInput);
|
||||
break;
|
||||
}
|
||||
|
||||
case "dmc4kcdsp":
|
||||
{
|
||||
var inputCard = new Dmc4kCDsp(number, this.Chassis);
|
||||
var cecPort = inputCard.DmInput as ICec;
|
||||
AddDmInCardPorts(number, cecPort);
|
||||
}
|
||||
var inputCard = new Dmc4kCDsp(number, Chassis);
|
||||
AddDmInCardPorts(number, inputCard.DmInput,inputCard.DmInput);
|
||||
break;
|
||||
}
|
||||
|
||||
case "dmc4kzc":
|
||||
{
|
||||
var inputCard = new Dmc4kzC(number, this.Chassis);
|
||||
var cecPort = inputCard.DmInput as ICec;
|
||||
AddDmInCardPorts(number, cecPort);
|
||||
}
|
||||
var inputCard = new Dmc4kzC(number, Chassis);
|
||||
AddDmInCardPorts(number, inputCard.DmInput,inputCard.DmInput);
|
||||
break;
|
||||
}
|
||||
|
||||
case "dmc4kzcdsp":
|
||||
{
|
||||
var inputCard = new Dmc4kzCDsp(number, this.Chassis);
|
||||
var cecPort = inputCard.DmInput as ICec;
|
||||
AddDmInCardPorts(number, cecPort);
|
||||
var inputCard = new Dmc4kzCDsp(number, Chassis);
|
||||
AddDmInCardPorts(number, inputCard.DmInput, inputCard.DmInput);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case "dmccat":
|
||||
new DmcCat(number, this.Chassis);
|
||||
AddDmInCardPorts(number);
|
||||
{
|
||||
var inputCard = new DmcCat(number, Chassis);
|
||||
AddDmInCardPorts(number, null, inputCard.DmInput);
|
||||
break;
|
||||
}
|
||||
case "dmccatdsp":
|
||||
new DmcCatDsp(number, this.Chassis);
|
||||
AddDmInCardPorts(number);
|
||||
{
|
||||
var inputCard = new DmcCatDsp(number, Chassis);
|
||||
AddDmInCardPorts(number, null, inputCard.DmInput);
|
||||
break;
|
||||
}
|
||||
case "dmcs":
|
||||
new DmcS(number, Chassis);
|
||||
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber);
|
||||
{
|
||||
var inputCard = new DmcS(number, Chassis);
|
||||
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber, null, inputCard.DmInput);
|
||||
AddInCardHdmiAndAudioLoopPorts(number);
|
||||
break;
|
||||
}
|
||||
case "dmcsdsp":
|
||||
new DmcSDsp(number, Chassis);
|
||||
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber);
|
||||
{
|
||||
var inputCard = new DmcSDsp(number, Chassis);
|
||||
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber, null, inputCard.DmInput);
|
||||
AddInCardHdmiAndAudioLoopPorts(number);
|
||||
break;
|
||||
}
|
||||
case "dmcs2":
|
||||
new DmcS2(number, Chassis);
|
||||
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber);
|
||||
{
|
||||
var inputCard = new DmcS2(number, Chassis);
|
||||
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber, null, inputCard.DmInput);
|
||||
AddInCardHdmiAndAudioLoopPorts(number);
|
||||
break;
|
||||
}
|
||||
case "dmcs2dsp":
|
||||
new DmcS2Dsp(number, Chassis);
|
||||
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber);
|
||||
{
|
||||
var inputCard = new DmcS2Dsp(number, Chassis);
|
||||
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber, null, inputCard.DmInput);
|
||||
AddInCardHdmiAndAudioLoopPorts(number);
|
||||
break;
|
||||
}
|
||||
case "dmcsdi":
|
||||
new DmcSdi(number, Chassis);
|
||||
AddInputPortWithDebug(number, "sdiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Sdi);
|
||||
{
|
||||
var inputCard = new DmcSdi(number, Chassis);
|
||||
AddInputPortWithDebug(number, "sdiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Sdi, null, inputCard.SdiInput);
|
||||
AddOutputPortWithDebug(string.Format("inputCard{0}", number), "sdiOut", eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||
eRoutingPortConnectionType.Sdi, null);
|
||||
AddInCardHdmiAndAudioLoopPorts(number);
|
||||
break;
|
||||
}
|
||||
case "dmcdvi":
|
||||
new DmcDvi(number, Chassis);
|
||||
AddInputPortWithDebug(number, "dviIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Dvi);
|
||||
{
|
||||
var inputCard = new DmcDvi(number, Chassis);
|
||||
AddInputPortWithDebug(number, "dviIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Dvi, null, inputCard.DviInput);
|
||||
AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
|
||||
AddInCardHdmiLoopPort(number);
|
||||
break;
|
||||
}
|
||||
case "dmcvga":
|
||||
new DmcVga(number, Chassis);
|
||||
AddInputPortWithDebug(number, "vgaIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Vga);
|
||||
{
|
||||
var inputCard = new DmcVga(number, Chassis);
|
||||
AddInputPortWithDebug(number, "vgaIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Vga, null, inputCard.VgaInput);
|
||||
AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
|
||||
AddInCardHdmiLoopPort(number);
|
||||
break;
|
||||
}
|
||||
case "dmcvidbnc":
|
||||
new DmcVidBnc(number, Chassis);
|
||||
AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component);
|
||||
{
|
||||
var inputCard = new DmcVidBnc(number, Chassis);
|
||||
AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component, null, inputCard.VideoInput);
|
||||
AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
|
||||
AddInCardHdmiLoopPort(number);
|
||||
break;
|
||||
}
|
||||
case "dmcvidrcaa":
|
||||
new DmcVidRcaA(number, Chassis);
|
||||
AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component);
|
||||
{
|
||||
var inputCard = new DmcVidRcaA(number, Chassis);
|
||||
AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component, null, inputCard.VideoInput);
|
||||
AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
|
||||
AddInCardHdmiLoopPort(number);
|
||||
break;
|
||||
}
|
||||
case "dmcvidrcad":
|
||||
new DmcVidRcaD(number, Chassis);
|
||||
AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component);
|
||||
{
|
||||
var inputCard = new DmcVidRcaD(number, Chassis);
|
||||
AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component, null, inputCard.VideoInput);
|
||||
AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.DigitalAudio);
|
||||
AddInCardHdmiLoopPort(number);
|
||||
break;
|
||||
}
|
||||
case "dmcvid4":
|
||||
new DmcVid4(number, Chassis);
|
||||
{
|
||||
var inputCard = new DmcVid4(number, Chassis);
|
||||
AddInputPortWithDebug(number, "compositeIn1", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
|
||||
AddInputPortWithDebug(number, "compositeIn2", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
|
||||
AddInputPortWithDebug(number, "compositeIn3", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
|
||||
AddInputPortWithDebug(number, "compositeIn4", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
|
||||
AddInCardHdmiLoopPort(number);
|
||||
break;
|
||||
}
|
||||
case "dmcstr":
|
||||
new DmcStr(number, Chassis);
|
||||
AddInputPortWithDebug(number, "streamIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Streaming);
|
||||
{
|
||||
var inputCard = new DmcStr(number, Chassis);
|
||||
AddInputPortWithDebug(number, "streamIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Streaming, null, inputCard.Source);
|
||||
AddInCardHdmiAndAudioLoopPorts(number);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -672,12 +714,24 @@ namespace PepperDash.Essentials.DM
|
||||
AddInCardHdmiAndAudioLoopPorts(number);
|
||||
}
|
||||
|
||||
void AddDmInCardPorts(uint number, ICec cecPort, IVideoAttributesBasic videoAttributes)
|
||||
{
|
||||
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, cecPort, videoAttributes);
|
||||
AddInCardHdmiAndAudioLoopPorts(number);
|
||||
}
|
||||
|
||||
void AddHdmiInCardPorts(uint number, ICec cecPort)
|
||||
{
|
||||
AddInputPortWithDebug(number, "hdmiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, cecPort);
|
||||
AddInCardHdmiAndAudioLoopPorts(number);
|
||||
}
|
||||
|
||||
void AddHdmiInCardPorts(uint number, ICec cecPort, IVideoAttributesBasic videoAttributes)
|
||||
{
|
||||
AddInputPortWithDebug(number, "hdmiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, cecPort, videoAttributes);
|
||||
AddInCardHdmiAndAudioLoopPorts(number);
|
||||
}
|
||||
|
||||
void AddInCardHdmiAndAudioLoopPorts(uint number)
|
||||
{
|
||||
AddOutputPortWithDebug(string.Format("inputCard{0}", number), "hdmiLoopOut", eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||
@@ -816,20 +870,55 @@ namespace PepperDash.Essentials.DM
|
||||
/// </summary>
|
||||
void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType)
|
||||
{
|
||||
AddInputPortWithDebug(cardNum, portName, sigType, portType, null);
|
||||
//Cast is necessary here to determine the correct overload
|
||||
AddInputPortWithDebug(cardNum, portName, sigType, portType, null, null);
|
||||
}
|
||||
|
||||
private void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType,
|
||||
eRoutingPortConnectionType portType, ICec cecPort)
|
||||
{
|
||||
//Cast is necessary here to determine the correct overload
|
||||
AddInputPortWithDebug(cardNum, portName, sigType, portType, cecPort, null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds InputPort and sets Port as ICec object
|
||||
/// Adds InputPort and sets Port as ICec object. If videoAttributesBasic is defined, RoutingPort will be RoutingInputPortWithVideoStatuses
|
||||
/// </summary>
|
||||
void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, ICec cecPort)
|
||||
void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, ICec cecPort, IVideoAttributesBasic videoAttributesBasic)
|
||||
{
|
||||
var portKey = string.Format("inputCard{0}--{1}", cardNum, portName);
|
||||
Debug.Console(2, this, "Adding input port '{0}'", portKey);
|
||||
var inputPort = new RoutingInputPort(portKey, sigType, portType, Chassis.Inputs[cardNum], this)
|
||||
|
||||
RoutingInputPort inputPort;
|
||||
|
||||
if (videoAttributesBasic != null)
|
||||
{
|
||||
FeedbackMatchObject = Chassis.Inputs[cardNum]
|
||||
}; ;
|
||||
Debug.Console(1, this, "card {0} supports IVideoAttributesBasic", cardNum);
|
||||
var statusFuncs = new VideoStatusFuncsWrapper
|
||||
{
|
||||
VideoResolutionFeedbackFunc = () =>
|
||||
{
|
||||
var resolution = videoAttributesBasic.VideoAttributes.GetVideoResolutionString();
|
||||
Debug.Console(1, this, "Updating resolution for input {0}. New resolution: {1}", cardNum, resolution);
|
||||
return resolution;
|
||||
}
|
||||
};
|
||||
inputPort = new RoutingInputPortWithVideoStatuses(portKey, sigType, portType,
|
||||
Chassis.Inputs[cardNum], this, statusFuncs)
|
||||
{
|
||||
FeedbackMatchObject = Chassis.Inputs[cardNum]
|
||||
};
|
||||
|
||||
RegisterForInputResolutionFeedback(videoAttributesBasic, cardNum, inputPort as RoutingInputPortWithVideoStatuses);
|
||||
}
|
||||
else
|
||||
{
|
||||
inputPort = new RoutingInputPort(portKey, sigType, portType,
|
||||
Chassis.Inputs[cardNum], this)
|
||||
{
|
||||
FeedbackMatchObject = Chassis.Inputs[cardNum]
|
||||
};
|
||||
}
|
||||
|
||||
if (cecPort != null)
|
||||
inputPort.Port = cecPort;
|
||||
@@ -989,6 +1078,23 @@ namespace PepperDash.Essentials.DM
|
||||
Debug.Console(2, this, "No index of {0} found in InputStreamCardStateFeedbacks");
|
||||
break;
|
||||
}
|
||||
case DMInputEventIds.HorizontalResolutionFeedbackEventId:
|
||||
case DMInputEventIds.VerticalResolutionFeedbackEventId:
|
||||
case DMInputEventIds.FramesPerSecondFeedbackEventId:
|
||||
case DMInputEventIds.ResolutionEventId:
|
||||
{
|
||||
Debug.Console(1, this, "Input {0} resolution updated", args.Number);
|
||||
var inputPort =
|
||||
InputPorts.Cast<RoutingInputPortWithVideoStatuses>()
|
||||
.FirstOrDefault((ip) => ip.Key.Contains(String.Format("inputCard{0}", args.Number)));
|
||||
|
||||
if (inputPort != null)
|
||||
{
|
||||
Debug.Console(1, this, "Updating resolution feedback for input {0}", args.Number);
|
||||
inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
Debug.Console(2, this, "DMInputChange fired for Input {0} with Unhandled EventId: {1}", args.Number, args.EventId);
|
||||
@@ -1050,7 +1156,7 @@ namespace PepperDash.Essentials.DM
|
||||
var inputNumber = Chassis.Outputs[output].VideoOutFeedback == null ? 0 : Chassis.
|
||||
Outputs[output].VideoOutFeedback.Number;
|
||||
|
||||
Debug.Console(2, this, "DMSwitchVideo:{0} Routed Input:{1} Output:{2}'", this.Name, inputNumber, output);
|
||||
Debug.Console(2, this, "DMSwitchVideo:{0} Routed Input:{1} Output:{2}'", Name, inputNumber, output);
|
||||
|
||||
if (VideoOutputFeedbacks.ContainsKey(output))
|
||||
{
|
||||
@@ -1077,7 +1183,7 @@ namespace PepperDash.Essentials.DM
|
||||
var inputNumber = Chassis.Outputs[output].AudioOutFeedback == null ? 0 : Chassis.
|
||||
Outputs[output].AudioOutFeedback.Number;
|
||||
|
||||
Debug.Console(2, this, "DMSwitchAudio:{0} Routed Input:{1} Output:{2}'", this.Name, inputNumber, output);
|
||||
Debug.Console(2, this, "DMSwitchAudio:{0} Routed Input:{1} Output:{2}'", Name, inputNumber, output);
|
||||
|
||||
if (AudioOutputFeedbacks.ContainsKey(output))
|
||||
{
|
||||
@@ -1179,7 +1285,10 @@ namespace PepperDash.Essentials.DM
|
||||
|
||||
var output = outputSelector as DMOutput;
|
||||
|
||||
if (output == null)
|
||||
var isUsbInput = (sigType & eRoutingSignalType.UsbInput) == eRoutingSignalType.UsbInput;
|
||||
var isUsbOutput = (sigType & eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput;
|
||||
|
||||
if (output == null && !(isUsbOutput || isUsbInput))
|
||||
{
|
||||
Debug.Console(0, this, Debug.ErrorLogLevel.Warning,
|
||||
"Unable to execute switch for inputSelector {0} to outputSelector {1}", inputSelector,
|
||||
@@ -1210,7 +1319,10 @@ namespace PepperDash.Essentials.DM
|
||||
if ((sigType & eRoutingSignalType.Video) == eRoutingSignalType.Video)
|
||||
{
|
||||
Chassis.VideoEnter.BoolValue = true;
|
||||
output.VideoOut = input; //Chassis.Outputs[output].VideoOut = inCard;
|
||||
if (output != null)
|
||||
{
|
||||
output.VideoOut = input; //Chassis.Outputs[output].VideoOut = inCard;
|
||||
}
|
||||
}
|
||||
|
||||
if ((sigType & eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
|
||||
@@ -1220,17 +1332,66 @@ namespace PepperDash.Essentials.DM
|
||||
{
|
||||
dmMdMnxn.AudioEnter.BoolValue = true;
|
||||
}
|
||||
output.AudioOut = input;
|
||||
//Chassis.Outputs[output].AudioOut = inCard;
|
||||
if (output != null)
|
||||
{
|
||||
output.AudioOut = input;
|
||||
}
|
||||
}
|
||||
|
||||
if ((sigType & eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput || (sigType & eRoutingSignalType.UsbInput) == eRoutingSignalType.UsbInput)
|
||||
if ((sigType & eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput)
|
||||
|
||||
{
|
||||
Chassis.USBEnter.BoolValue = true;
|
||||
output.USBRoutedTo = input;
|
||||
Chassis.USBEnter.BoolValue = true;
|
||||
if (inputSelector == null && output != null)
|
||||
{
|
||||
//clearing the route is intended
|
||||
output.USBRoutedTo = null;
|
||||
return;
|
||||
}
|
||||
|
||||
if (inputSelector != null && input == null)
|
||||
{
|
||||
//input selector is DMOutput...we're doing a out to out route
|
||||
var tempInput = inputSelector as DMOutput;
|
||||
|
||||
if (tempInput == null || output == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
output.USBRoutedTo = tempInput;
|
||||
return;
|
||||
}
|
||||
|
||||
if (input != null & output != null)
|
||||
{
|
||||
output.USBRoutedTo = input;
|
||||
}
|
||||
}
|
||||
|
||||
if((sigType & eRoutingSignalType.UsbInput) != eRoutingSignalType.UsbInput)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Chassis.USBEnter.BoolValue = true;
|
||||
if (output != null)
|
||||
{
|
||||
output.USBRoutedTo = input;
|
||||
return;
|
||||
}
|
||||
var tempOutput = outputSelector as DMInput;
|
||||
|
||||
if (tempOutput == null)
|
||||
{
|
||||
Debug.Console(0, this, Debug.ErrorLogLevel.Warning,
|
||||
"Unable to execute switch for inputSelector {0} to outputSelector {1}", inputSelector,
|
||||
outputSelector);
|
||||
return;
|
||||
}
|
||||
|
||||
tempOutput.USBRoutedTo = input;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IRoutingNumeric Members
|
||||
@@ -1243,8 +1404,10 @@ namespace PepperDash.Essentials.DM
|
||||
|
||||
DMInputOutputBase dmCard;
|
||||
|
||||
//Routing Input to Input or Output to Input
|
||||
if ((sigType & eRoutingSignalType.UsbInput) == eRoutingSignalType.UsbInput)
|
||||
{
|
||||
Debug.Console(2, this, "Executing USB Input switch.\r\n in:{0} output: {1}", inputSelector, outputSelector);
|
||||
if (outputSelector > chassisSize)
|
||||
{
|
||||
uint outputIndex;
|
||||
@@ -1264,13 +1427,14 @@ namespace PepperDash.Essentials.DM
|
||||
dmCard = Chassis.Inputs[inputSelector];
|
||||
}
|
||||
|
||||
ExecuteSwitch(dmCard, Chassis.Outputs[outputSelector], sigType);
|
||||
ExecuteSwitch(dmCard, Chassis.Inputs[outputSelector], sigType);
|
||||
return;
|
||||
}
|
||||
if ((sigType & eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput)
|
||||
{
|
||||
Debug.Console(2, this, "Executing USB Output switch.\r\n in:{0} output: {1}", inputSelector, outputSelector);
|
||||
|
||||
//routing Output to Output or Input to Output
|
||||
if (inputSelector > chassisSize)
|
||||
{
|
||||
//wanting to route an output to an output. Subtract chassis size and get output, unless it's 8x8
|
||||
@@ -1388,6 +1552,16 @@ namespace PepperDash.Essentials.DM
|
||||
{
|
||||
trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = 1;
|
||||
}
|
||||
|
||||
var videoStatus = inputPort as RoutingInputPortWithVideoStatuses;
|
||||
|
||||
if (videoStatus == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Debug.Console(1, this, "Linking {0} to join {1} for resolution feedback.", videoStatus.Key, joinMap.InputCurrentResolution.JoinNumber + ioSlotJoin);
|
||||
videoStatus.VideoStatus.VideoResolutionFeedback.LinkInputSig(trilist.StringInput[joinMap.InputCurrentResolution.JoinNumber + ioSlotJoin]);
|
||||
}
|
||||
|
||||
private void LinkStreamInputToApi(BasicTriList trilist, uint ioSlot, DmChassisControllerJoinMap joinMap, uint ioSlotJoin)
|
||||
@@ -1428,6 +1602,13 @@ namespace PepperDash.Essentials.DM
|
||||
InputStreamCardStateFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[join]);
|
||||
|
||||
trilist.UShortInput[join].UShortValue = InputStreamCardStateFeedbacks[ioSlot].UShortValue;
|
||||
|
||||
var videoStatus = inputPort as RoutingInputPortWithVideoStatuses;
|
||||
|
||||
if (videoStatus != null)
|
||||
{
|
||||
videoStatus.VideoStatus.VideoResolutionFeedback.LinkInputSig(trilist.StringInput[joinMap.InputCurrentResolution.JoinNumber + ioSlotJoin]);
|
||||
}
|
||||
}
|
||||
|
||||
private void LinkStreamOutputToApi(BasicTriList trilist, uint ioSlot, DmChassisControllerJoinMap joinMap, uint ioSlotJoin)
|
||||
@@ -1564,10 +1745,19 @@ namespace PepperDash.Essentials.DM
|
||||
{
|
||||
trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = 1;
|
||||
}
|
||||
|
||||
var videoStatus = inputPort as RoutingInputPortWithVideoStatuses;
|
||||
|
||||
if (videoStatus == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Debug.Console(1, this, "Linking {0} to join {1} for resolution feedback.", videoStatus.Key, joinMap.InputCurrentResolution.JoinNumber + ioSlotJoin);
|
||||
videoStatus.VideoStatus.VideoResolutionFeedback.LinkInputSig(trilist.StringInput[joinMap.InputCurrentResolution.JoinNumber + ioSlotJoin]);
|
||||
}
|
||||
|
||||
private void LinkAdvancedTxToApi(BasicTriList trilist, DmChassisControllerJoinMap joinMap,
|
||||
uint ioSlot, uint ioSlotJoin, BasicDmTxControllerBase basicTransmitter)
|
||||
uint ioSlot, uint ioSlotJoin, BasicDmTxControllerBase basicTransmitter)
|
||||
{
|
||||
var transmitter = basicTransmitter as DmTxControllerBase;
|
||||
if (transmitter == null) return;
|
||||
@@ -1581,7 +1771,9 @@ namespace PepperDash.Essentials.DM
|
||||
|
||||
if (txRoutingInputs == null) return;
|
||||
|
||||
var inputPorts = txRoutingInputs.InputPorts.Where((p) => p.Port is EndpointHdmiInput || p.Port is EndpointDisplayPortInput).ToList();
|
||||
var inputPorts =
|
||||
txRoutingInputs.InputPorts.Where(
|
||||
(p) => p.Port is EndpointHdmiInput || p.Port is EndpointDisplayPortInput).ToList();
|
||||
|
||||
if (inputPorts.Count == 0)
|
||||
{
|
||||
@@ -1614,6 +1806,19 @@ namespace PepperDash.Essentials.DM
|
||||
|
||||
trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue =
|
||||
(ushort) transmitter.HdcpSupportCapability;
|
||||
|
||||
|
||||
var videoStatus =
|
||||
InputPorts[string.Format("inputCard{0}--dmIn", ioSlot)] as RoutingInputPortWithVideoStatuses;
|
||||
|
||||
if (videoStatus == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Debug.Console(1, this, "Linking {0} to join {1} for resolution feedback.", videoStatus.Key,
|
||||
joinMap.InputCurrentResolution.JoinNumber + ioSlotJoin);
|
||||
videoStatus.VideoStatus.VideoResolutionFeedback.LinkInputSig(
|
||||
trilist.StringInput[joinMap.InputCurrentResolution.JoinNumber + ioSlotJoin]);
|
||||
}
|
||||
|
||||
private void LinkTxOnlineFeedbackToApi(BasicTriList trilist, uint ioSlot, DmChassisControllerJoinMap joinMap,
|
||||
@@ -1896,15 +2101,15 @@ namespace PepperDash.Essentials.DM
|
||||
{
|
||||
|
||||
var props = JsonConvert.DeserializeObject
|
||||
<PepperDash.Essentials.DM.Config.DMChassisPropertiesConfig>(dc.Properties.ToString());
|
||||
return PepperDash.Essentials.DM.DmChassisController.
|
||||
<DMChassisPropertiesConfig>(dc.Properties.ToString());
|
||||
return DmChassisController.
|
||||
GetDmChassisController(dc.Key, dc.Name, type, props);
|
||||
}
|
||||
else if (type.StartsWith("dmmd128x") || type.StartsWith("dmmd64x"))
|
||||
{
|
||||
var props = JsonConvert.DeserializeObject
|
||||
<PepperDash.Essentials.DM.Config.DMChassisPropertiesConfig>(dc.Properties.ToString());
|
||||
return PepperDash.Essentials.DM.DmBladeChassisController.
|
||||
<DMChassisPropertiesConfig>(dc.Properties.ToString());
|
||||
return DmBladeChassisController.
|
||||
GetDmChassisController(dc.Key, dc.Name, type, props);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,8 +37,8 @@ namespace PepperDash.Essentials.DM.Chassis
|
||||
public FeedbackCollection<StringFeedback> OutputNameFeedbacks { get; private set; }
|
||||
public FeedbackCollection<StringFeedback> OutputRouteNameFeedbacks { get; private set; }
|
||||
public FeedbackCollection<BoolFeedback> InputHdcpEnableFeedback { get; private set; }
|
||||
public FeedbackCollection<StringFeedback> DeviceNameFeedback { get; private set; }
|
||||
public FeedbackCollection<BoolFeedback> AutoRouteFeedback { get; private set; }
|
||||
public StringFeedback DeviceNameFeedback { get; private set; }
|
||||
public BoolFeedback AutoRouteFeedback { get; private set; }
|
||||
|
||||
#region Constructor
|
||||
|
||||
@@ -47,6 +47,7 @@ namespace PepperDash.Essentials.DM.Chassis
|
||||
: base(key, name, chassis)
|
||||
{
|
||||
_Chassis = chassis;
|
||||
Name = name;
|
||||
|
||||
if (props == null)
|
||||
{
|
||||
@@ -59,7 +60,7 @@ namespace PepperDash.Essentials.DM.Chassis
|
||||
{
|
||||
foreach (var kvp in props.Inputs)
|
||||
{
|
||||
Debug.Console(0, this, "props.Inputs: {0}-{1}", kvp.Key, kvp.Value);
|
||||
Debug.Console(1, this, "props.Inputs: {0}-{1}", kvp.Key, kvp.Value);
|
||||
}
|
||||
InputNames = props.Inputs;
|
||||
}
|
||||
@@ -67,45 +68,44 @@ namespace PepperDash.Essentials.DM.Chassis
|
||||
{
|
||||
foreach (var kvp in props.Outputs)
|
||||
{
|
||||
Debug.Console(0, this, "props.Outputs: {0}-{1}", kvp.Key, kvp.Value);
|
||||
Debug.Console(1, this, "props.Outputs: {0}-{1}", kvp.Key, kvp.Value);
|
||||
}
|
||||
OutputNames = props.Outputs;
|
||||
}
|
||||
|
||||
DeviceNameFeedback = new StringFeedback(()=>Name);
|
||||
|
||||
VideoInputSyncFeedbacks = new FeedbackCollection<BoolFeedback>();
|
||||
VideoOutputRouteFeedbacks = new FeedbackCollection<IntFeedback>();
|
||||
InputNameFeedbacks = new FeedbackCollection<StringFeedback>();
|
||||
OutputNameFeedbacks = new FeedbackCollection<StringFeedback>();
|
||||
OutputRouteNameFeedbacks = new FeedbackCollection<StringFeedback>();
|
||||
InputHdcpEnableFeedback = new FeedbackCollection<BoolFeedback>();
|
||||
DeviceNameFeedback = new FeedbackCollection<StringFeedback>();
|
||||
AutoRouteFeedback = new FeedbackCollection<BoolFeedback>();
|
||||
|
||||
|
||||
InputPorts = new RoutingPortCollection<RoutingInputPort>();
|
||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort>();
|
||||
|
||||
var deviceName = string.IsNullOrEmpty(this.Name) ? name : this.Name;
|
||||
DeviceNameFeedback.Add(new StringFeedback(deviceName, () => deviceName));
|
||||
|
||||
if (_Chassis.NumberOfInputs == 1)
|
||||
{
|
||||
_Chassis4x1 = _Chassis as HdMd4x14kE;
|
||||
AutoRouteFeedback.Add(new BoolFeedback(deviceName + "-" + InputNames[1], () => _Chassis4x1.AutoModeOnFeedback.BoolValue));
|
||||
AutoRouteFeedback = new BoolFeedback(() => _Chassis4x1.AutoModeOnFeedback.BoolValue);
|
||||
}
|
||||
|
||||
for (uint i = 1; i <= _Chassis.NumberOfInputs; i++)
|
||||
{
|
||||
var index = i;
|
||||
var inputName = InputNames[index];
|
||||
_Chassis.Inputs[index].Name.StringValue = inputName;
|
||||
//_Chassis.Inputs[index].Name.StringValue = inputName;
|
||||
_Chassis.HdmiInputs[index].Name.StringValue = inputName;
|
||||
|
||||
InputPorts.Add(new RoutingInputPort(inputName, eRoutingSignalType.AudioVideo,
|
||||
eRoutingPortConnectionType.Hdmi, index, this)
|
||||
eRoutingPortConnectionType.Hdmi, _Chassis.HdmiInputs[index], this)
|
||||
{
|
||||
FeedbackMatchObject = _Chassis.HdmiInputs[index]
|
||||
});
|
||||
VideoInputSyncFeedbacks.Add(new BoolFeedback(inputName, () => _Chassis.Inputs[index].VideoDetectedFeedback.BoolValue));
|
||||
InputNameFeedbacks.Add(new StringFeedback(inputName, () => _Chassis.Inputs[index].Name.StringValue));
|
||||
//InputNameFeedbacks.Add(new StringFeedback(inputName, () => _Chassis.Inputs[index].NameFeedback.StringValue));
|
||||
InputNameFeedbacks.Add(new StringFeedback(inputName, () => InputNames[index]));
|
||||
InputHdcpEnableFeedback.Add(new BoolFeedback(inputName, () => _Chassis.HdmiInputs[index].HdmiInputPort.HdcpSupportOnFeedback.BoolValue));
|
||||
}
|
||||
|
||||
@@ -113,14 +113,15 @@ namespace PepperDash.Essentials.DM.Chassis
|
||||
{
|
||||
var index = i;
|
||||
var outputName = OutputNames[index];
|
||||
//_Chassis.Outputs[i].Name.StringValue = outputName;
|
||||
//_Chassis.Outputs[index].Name.StringValue = outputName;
|
||||
//_Chassis.HdmiOutputs[index].Name.StringValue = outputName;
|
||||
|
||||
OutputPorts.Add(new RoutingOutputPort(outputName, eRoutingSignalType.AudioVideo,
|
||||
eRoutingPortConnectionType.Hdmi, index, this)
|
||||
eRoutingPortConnectionType.Hdmi, _Chassis.HdmiOutputs[index], this)
|
||||
{
|
||||
FeedbackMatchObject = _Chassis.HdmiOutputs[index]
|
||||
});
|
||||
VideoOutputRouteFeedbacks.Add(new IntFeedback(outputName, () => (int)_Chassis.Outputs[index].VideoOutFeedback.Number));
|
||||
VideoOutputRouteFeedbacks.Add(new IntFeedback(outputName, () => _Chassis.Outputs[index].VideoOutFeedback == null ? 0 : (int)_Chassis.Outputs[index].VideoOutFeedback.Number));
|
||||
OutputNameFeedbacks.Add(new StringFeedback(outputName, () => OutputNames[index]));
|
||||
OutputRouteNameFeedbacks.Add(new StringFeedback(outputName, () => _Chassis.Outputs[index].VideoOutFeedback.NameFeedback.StringValue));
|
||||
}
|
||||
@@ -185,9 +186,10 @@ namespace PepperDash.Essentials.DM.Chassis
|
||||
|
||||
public void AddFeedbackCollections()
|
||||
{
|
||||
AddFeedbackToList(DeviceNameFeedback);
|
||||
AddCollectionsToList(VideoInputSyncFeedbacks, InputHdcpEnableFeedback);
|
||||
AddCollectionsToList(VideoOutputRouteFeedbacks);
|
||||
AddCollectionsToList(InputNameFeedbacks, OutputNameFeedbacks, OutputRouteNameFeedbacks, DeviceNameFeedback);
|
||||
AddCollectionsToList(InputNameFeedbacks, OutputNameFeedbacks, OutputRouteNameFeedbacks);
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -274,11 +276,21 @@ namespace PepperDash.Essentials.DM.Chassis
|
||||
#region IRouting Members
|
||||
|
||||
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
|
||||
{
|
||||
{
|
||||
var input = inputSelector as HdMdNxMHdmiInput; //changed from HdMdNxM4kzEHdmiInput;
|
||||
var output = outputSelector as HdMdNxMHdmiOutput;
|
||||
Debug.Console(2, this, "ExecuteSwitch: input={0} output={1}", input, output);
|
||||
|
||||
if (output == null)
|
||||
{
|
||||
Debug.Console(0, this, "Unable to make switch. output selector is not HdMdNxMHdmiOutput");
|
||||
return;
|
||||
}
|
||||
|
||||
// Try to make switch only when necessary. The unit appears to toggle when already selected.
|
||||
var current = _Chassis.HdmiOutputs[(uint)outputSelector].VideoOut;
|
||||
if (current != _Chassis.HdmiInputs[(uint)inputSelector])
|
||||
_Chassis.HdmiOutputs[(uint)outputSelector].VideoOut = _Chassis.HdmiInputs[(uint)inputSelector];
|
||||
var current = output.VideoOut;
|
||||
if (current != input)
|
||||
output.VideoOut = input;
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -287,7 +299,12 @@ namespace PepperDash.Essentials.DM.Chassis
|
||||
|
||||
public void ExecuteNumericSwitch(ushort inputSelector, ushort outputSelector, eRoutingSignalType signalType)
|
||||
{
|
||||
ExecuteSwitch(inputSelector, outputSelector, signalType);
|
||||
var input = inputSelector == 0 ? null : _Chassis.HdmiInputs[inputSelector];
|
||||
var output = _Chassis.HdmiOutputs[outputSelector];
|
||||
|
||||
Debug.Console(2, this, "ExecuteNumericSwitch: input={0} output={1}", input, output);
|
||||
|
||||
ExecuteSwitch(input, output, signalType);
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -315,52 +332,51 @@ namespace PepperDash.Essentials.DM.Chassis
|
||||
}
|
||||
|
||||
IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
||||
DeviceNameFeedback[this.Name].LinkInputSig(trilist.StringInput[joinMap.Name.JoinNumber]);
|
||||
DeviceNameFeedback.LinkInputSig(trilist.StringInput[joinMap.Name.JoinNumber]);
|
||||
|
||||
if (_Chassis4x1 != null)
|
||||
{
|
||||
trilist.SetSigTrueAction(joinMap.EnableAutoRoute.JoinNumber, () => _Chassis4x1.AutoModeOn());
|
||||
trilist.SetSigFalseAction(joinMap.EnableAutoRoute.JoinNumber, () => _Chassis4x1.AutoModeOff());
|
||||
AutoRouteFeedback[this.Name + "-" + InputNames[1]].LinkInputSig(trilist.BooleanInput[joinMap.EnableAutoRoute.JoinNumber]);
|
||||
AutoRouteFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableAutoRoute.JoinNumber]);
|
||||
}
|
||||
|
||||
for (uint i = 1; i <= _Chassis.NumberOfInputs; i++)
|
||||
{
|
||||
var joinIndex = i - 1;
|
||||
var input = i;
|
||||
//Digital
|
||||
VideoInputSyncFeedbacks[InputNames[i]].LinkInputSig(trilist.BooleanInput[joinMap.InputSync.JoinNumber + joinIndex]);
|
||||
InputHdcpEnableFeedback[InputNames[i]].LinkInputSig(trilist.BooleanInput[joinMap.EnableInputHdcp.JoinNumber + joinIndex]);
|
||||
InputHdcpEnableFeedback[InputNames[i]].LinkComplementInputSig(trilist.BooleanInput[joinMap.DisableInputHdcp.JoinNumber + joinIndex]);
|
||||
trilist.SetSigTrueAction(joinMap.EnableInputHdcp.JoinNumber + joinIndex, () => EnableHdcp(i));
|
||||
trilist.SetSigTrueAction(joinMap.DisableInputHdcp.JoinNumber + joinIndex, () => DisableHdcp(i));
|
||||
VideoInputSyncFeedbacks[InputNames[input]].LinkInputSig(trilist.BooleanInput[joinMap.InputSync.JoinNumber + joinIndex]);
|
||||
InputHdcpEnableFeedback[InputNames[input]].LinkInputSig(trilist.BooleanInput[joinMap.EnableInputHdcp.JoinNumber + joinIndex]);
|
||||
InputHdcpEnableFeedback[InputNames[input]].LinkComplementInputSig(trilist.BooleanInput[joinMap.DisableInputHdcp.JoinNumber + joinIndex]);
|
||||
trilist.SetSigTrueAction(joinMap.EnableInputHdcp.JoinNumber + joinIndex, () => EnableHdcp(input));
|
||||
trilist.SetSigTrueAction(joinMap.DisableInputHdcp.JoinNumber + joinIndex, () => DisableHdcp(input));
|
||||
|
||||
//Serial
|
||||
InputNameFeedbacks[InputNames[i]].LinkInputSig(trilist.StringInput[joinMap.InputName.JoinNumber + joinIndex]);
|
||||
//Serial
|
||||
InputNameFeedbacks[InputNames[input]].LinkInputSig(trilist.StringInput[joinMap.InputName.JoinNumber + joinIndex]);
|
||||
}
|
||||
|
||||
for (uint i = 1; i <= _Chassis.NumberOfOutputs; i++)
|
||||
{
|
||||
var joinIndex = i - 1;
|
||||
var output = i;
|
||||
//Analog
|
||||
VideoOutputRouteFeedbacks[OutputNames[i]].LinkInputSig(trilist.UShortInput[joinMap.OutputRoute.JoinNumber + joinIndex]);
|
||||
trilist.SetUShortSigAction(joinMap.OutputRoute.JoinNumber + joinIndex, (a) => ExecuteSwitch(a, i, eRoutingSignalType.AudioVideo));
|
||||
VideoOutputRouteFeedbacks[OutputNames[output]].LinkInputSig(trilist.UShortInput[joinMap.OutputRoute.JoinNumber + joinIndex]);
|
||||
trilist.SetUShortSigAction(joinMap.OutputRoute.JoinNumber + joinIndex, (a) => ExecuteNumericSwitch(a, (ushort) output, eRoutingSignalType.AudioVideo));
|
||||
|
||||
//Serial
|
||||
OutputNameFeedbacks[OutputNames[i]].LinkInputSig(trilist.StringInput[joinMap.OutputName.JoinNumber + joinIndex]);
|
||||
OutputRouteNameFeedbacks[OutputNames[i]].LinkInputSig(trilist.StringInput[joinMap.OutputRoutedName.JoinNumber + joinIndex]);
|
||||
OutputNameFeedbacks[OutputNames[output]].LinkInputSig(trilist.StringInput[joinMap.OutputName.JoinNumber + joinIndex]);
|
||||
OutputRouteNameFeedbacks[OutputNames[output]].LinkInputSig(trilist.StringInput[joinMap.OutputRoutedName.JoinNumber + joinIndex]);
|
||||
}
|
||||
|
||||
_Chassis.OnlineStatusChange += Chassis_OnlineStatusChange;
|
||||
|
||||
trilist.OnlineStatusChange += (d, args) =>
|
||||
{
|
||||
if (args.DeviceOnLine)
|
||||
{
|
||||
foreach (var feedback in Feedbacks)
|
||||
{
|
||||
feedback.FireUpdate();
|
||||
}
|
||||
}
|
||||
if (!args.DeviceOnLine) return;
|
||||
|
||||
// feedback updates was moved to the Chassis_OnlineStatusChange
|
||||
// due to the amount of time it takes for the device to come online
|
||||
};
|
||||
}
|
||||
|
||||
@@ -371,46 +387,77 @@ namespace PepperDash.Essentials.DM.Chassis
|
||||
|
||||
void Chassis_OnlineStatusChange(Crestron.SimplSharpPro.GenericBase currentDevice, Crestron.SimplSharpPro.OnlineOfflineEventArgs args)
|
||||
{
|
||||
if (!args.DeviceOnLine) return;
|
||||
for (uint i = 1; i <= _Chassis.NumberOfInputs; i++)
|
||||
{
|
||||
_Chassis.Inputs[i].Name.StringValue = InputNames[i];
|
||||
}
|
||||
for (uint i = 1; i <= _Chassis.NumberOfOutputs; i++)
|
||||
{
|
||||
_Chassis.Outputs[i].Name.StringValue = OutputNames[i];
|
||||
}
|
||||
IsOnline.FireUpdate();
|
||||
|
||||
foreach (var feedback in Feedbacks)
|
||||
{
|
||||
feedback.FireUpdate();
|
||||
}
|
||||
if (!args.DeviceOnLine) return;
|
||||
|
||||
foreach (var feedback in Feedbacks)
|
||||
{
|
||||
feedback.FireUpdate();
|
||||
}
|
||||
|
||||
if (_Chassis4x1 != null)
|
||||
AutoRouteFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
void Chassis_DMOutputChange(Switch device, DMOutputEventArgs args)
|
||||
{
|
||||
if (args.EventId != DMOutputEventIds.VideoOutEventId) return;
|
||||
|
||||
for (var i = 0; i < VideoOutputRouteFeedbacks.Count; i++)
|
||||
{
|
||||
var index = i;
|
||||
var localInputPort = InputPorts.FirstOrDefault(p => (DMInput)p.FeedbackMatchObject == _Chassis.HdmiOutputs[(uint)index + 1].VideoOutFeedback);
|
||||
var localOutputPort =
|
||||
OutputPorts.FirstOrDefault(p => (DMOutput)p.FeedbackMatchObject == _Chassis.HdmiOutputs[(uint)index + 1]);
|
||||
var output = args.Number;
|
||||
|
||||
var inputNumber = _Chassis.HdmiOutputs[output].VideoOutFeedback == null
|
||||
? 0
|
||||
: _Chassis.HdmiOutputs[output].VideoOutFeedback.Number;
|
||||
|
||||
VideoOutputRouteFeedbacks[i].FireUpdate();
|
||||
OnSwitchChange(new RoutingNumericEventArgs((ushort)i, VideoOutputRouteFeedbacks[i].UShortValue, localOutputPort, localInputPort, eRoutingSignalType.AudioVideo));
|
||||
}
|
||||
var outputName = OutputNames[output];
|
||||
|
||||
var feedback = VideoOutputRouteFeedbacks[outputName];
|
||||
|
||||
if (feedback == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var inPort =
|
||||
InputPorts.FirstOrDefault(p => p.FeedbackMatchObject == _Chassis.HdmiOutputs[output].VideoOutFeedback);
|
||||
var outPort = OutputPorts.FirstOrDefault(p => p.FeedbackMatchObject == _Chassis.HdmiOutputs[output]);
|
||||
|
||||
feedback.FireUpdate();
|
||||
OnSwitchChange(new RoutingNumericEventArgs(output, inputNumber, outPort, inPort, eRoutingSignalType.AudioVideo));
|
||||
}
|
||||
|
||||
void Chassis_DMInputChange(Switch device, DMInputEventArgs args)
|
||||
{
|
||||
if (args.EventId != DMInputEventIds.VideoDetectedEventId) return;
|
||||
foreach (var item in VideoInputSyncFeedbacks)
|
||||
{
|
||||
item.FireUpdate();
|
||||
}
|
||||
{
|
||||
switch (args.EventId)
|
||||
{
|
||||
case DMInputEventIds.VideoDetectedEventId:
|
||||
{
|
||||
Debug.Console(1, this, "Event ID {0}: Updating VideoInputSyncFeedbacks", args.EventId);
|
||||
foreach (var item in VideoInputSyncFeedbacks)
|
||||
{
|
||||
item.FireUpdate();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case DMInputEventIds.InputNameFeedbackEventId:
|
||||
case DMInputEventIds.InputNameEventId:
|
||||
case DMInputEventIds.NameFeedbackEventId:
|
||||
{
|
||||
Debug.Console(1, this, "Event ID {0}: Updating name feedbacks.", args.EventId);
|
||||
Debug.Console(1, this, "Input {0} Name {1}", args.Number,
|
||||
_Chassis.HdmiInputs[args.Number].NameFeedback.StringValue);
|
||||
foreach (var item in InputNameFeedbacks)
|
||||
{
|
||||
item.FireUpdate();
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
Debug.Console(1, this, "Unhandled DM Input Event ID {0}", args.EventId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -121,6 +121,7 @@
|
||||
<Compile Include="Cameras\CameraControl.cs" />
|
||||
<Compile Include="Display\PanasonicThDisplay.cs" />
|
||||
<Compile Include="VideoCodec\Interfaces\IHasMeetingInfo.cs" />
|
||||
<Compile Include="VideoCodec\Interfaces\IHasMeetingLock.cs" />
|
||||
<Compile Include="VideoCodec\Interfaces\IHasParticipants.cs" />
|
||||
<Compile Include="VideoCodec\Interfaces\IHasPresentationOnlyMeeting.cs" />
|
||||
<Compile Include="VideoCodec\Interfaces\IHasSelfviewPosition.cs" />
|
||||
|
||||
@@ -551,6 +551,13 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
CrestronConsole.AddNewConsoleCommand(GetPhonebook, "GetCodecPhonebook", "Triggers a refresh of the codec phonebook", ConsoleAccessLevelEnum.AccessOperator);
|
||||
CrestronConsole.AddNewConsoleCommand(GetBookings, "GetCodecBookings", "Triggers a refresh of the booking data for today", ConsoleAccessLevelEnum.AccessOperator);
|
||||
|
||||
return base.CustomActivate();
|
||||
}
|
||||
|
||||
#region Overrides of Device
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
var socket = Communication as ISocketStatus;
|
||||
if (socket != null)
|
||||
{
|
||||
@@ -559,9 +566,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
|
||||
Communication.Connect();
|
||||
|
||||
CommunicationMonitor.Start();
|
||||
CommunicationMonitor.Start();
|
||||
|
||||
string prefix = "xFeedback register ";
|
||||
const string prefix = "xFeedback register ";
|
||||
|
||||
CliFeedbackRegistrationExpression =
|
||||
prefix + "/Configuration" + Delimiter +
|
||||
@@ -576,14 +583,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
prefix + "/Status/Video/Layout" + Delimiter +
|
||||
prefix + "/Status/Video/Input/MainVideoMute" + Delimiter +
|
||||
prefix + "/Bookings" + Delimiter +
|
||||
prefix + "/Event/CallDisconnect" + Delimiter +
|
||||
prefix + "/Event/CallDisconnect" + Delimiter +
|
||||
prefix + "/Event/Bookings" + Delimiter +
|
||||
prefix + "/Event/CameraPresetListUpdated" + Delimiter +
|
||||
prefix + "/Event/UserInterface/Presentation/ExternalSource/Selected/SourceIdentifier" + Delimiter;
|
||||
|
||||
return base.CustomActivate();
|
||||
prefix + "/Event/UserInterface/Presentation/ExternalSource/Selected/SourceIdentifier" + Delimiter;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Fires when initial codec sync is completed. Used to then send commands to get call history, phonebook, bookings, etc.
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using PepperDash.Essentials.Core;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
|
||||
{
|
||||
public interface IHasMeetingLock
|
||||
{
|
||||
BoolFeedback MeetingIsLockedFeedback { get; }
|
||||
|
||||
void LockMeeting();
|
||||
void UnLockMeeting();
|
||||
void ToggleMeetingLock();
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,18 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
|
||||
public interface IHasParticipants
|
||||
{
|
||||
CodecParticipants Participants { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Removes the participant from the meeting
|
||||
/// </summary>
|
||||
/// <param name="participant"></param>
|
||||
void RemoveParticipant(int userId);
|
||||
|
||||
/// <summary>
|
||||
/// Sets the participant as the new host
|
||||
/// </summary>
|
||||
/// <param name="participant"></param>
|
||||
void SetParticipantAsHost(int userId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -29,6 +41,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
|
||||
/// </summary>
|
||||
public interface IHasParticipantAudioMute : IHasParticipantVideoMute
|
||||
{
|
||||
/// <summary>
|
||||
/// Mute audio of all participants
|
||||
/// </summary>
|
||||
void MuteAudioForAllParticipants();
|
||||
|
||||
void MuteAudioForParticipant(int userId);
|
||||
void UnmuteAudioForParticipant(int userId);
|
||||
void ToggleAudioForParticipant(int userId);
|
||||
|
||||
@@ -298,6 +298,13 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
}
|
||||
|
||||
LinkVideoCodecToApi(codec, trilist, joinMap);
|
||||
|
||||
trilist.OnlineStatusChange += (device, args) =>
|
||||
{
|
||||
if (!args.DeviceOnLine) return;
|
||||
|
||||
trilist.SetString(joinMap.Schedule.JoinNumber, "\xFC");
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -785,6 +792,16 @@ ScreenIndexIsPinnedTo: {8} (a{17})
|
||||
|
||||
_currentMeetings = codec.CodecSchedule.Meetings.Where(m => m.StartTime >= currentTime || m.EndTime >= currentTime).ToList();
|
||||
|
||||
if (_currentMeetings.Count == 0)
|
||||
{
|
||||
var emptyXSigByteArray = XSigHelpers.ClearOutputs();
|
||||
var emptyXSigString = Encoding.GetEncoding(XSigEncoding)
|
||||
.GetString(emptyXSigByteArray, 0, emptyXSigByteArray.Length);
|
||||
|
||||
trilist.SetString(joinMap.Schedule.JoinNumber, emptyXSigString);
|
||||
return;
|
||||
}
|
||||
|
||||
var meetingsData = UpdateMeetingsListXSig(_currentMeetings);
|
||||
trilist.SetString(joinMap.Schedule.JoinNumber, meetingsData);
|
||||
trilist.SetUshort(joinMap.MeetingCount.JoinNumber, (ushort)_currentMeetings.Count);
|
||||
|
||||
@@ -1123,9 +1123,25 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
}
|
||||
}
|
||||
|
||||
public class Lock
|
||||
public class Lock : NotifiableObject
|
||||
{
|
||||
public bool Enable { get; set; }
|
||||
private bool _enable;
|
||||
|
||||
public bool Enable
|
||||
{
|
||||
get
|
||||
{
|
||||
return _enable;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value != _enable)
|
||||
{
|
||||
_enable = value;
|
||||
NotifyPropertyChanged("Enable");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class ClosedCaption
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
IRouting,
|
||||
IHasScheduleAwareness, IHasCodecCameras, IHasParticipants, IHasCameraOff, IHasCameraMute, IHasCameraAutoMode,
|
||||
IHasFarEndContentStatus, IHasSelfviewPosition, IHasPhoneDialing, IHasZoomRoomLayouts, IHasParticipantPinUnpin,
|
||||
IHasParticipantAudioMute, IHasSelfviewSize, IPasswordPrompt, IHasStartMeeting, IHasMeetingInfo, IHasPresentationOnlyMeeting
|
||||
IHasParticipantAudioMute, IHasSelfviewSize, IPasswordPrompt, IHasStartMeeting, IHasMeetingInfo, IHasPresentationOnlyMeeting, IHasMeetingLock
|
||||
{
|
||||
private const long MeetingRefreshTimer = 60000;
|
||||
public uint DefaultMeetingDurationMin { get; private set; }
|
||||
@@ -147,6 +147,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
ContentSwappedWithThumbnailFeedback = new BoolFeedback(ContentSwappedWithThumbnailFeedbackFunc);
|
||||
|
||||
NumberOfScreensFeedback = new IntFeedback(NumberOfScreensFeedbackFunc);
|
||||
|
||||
MeetingIsLockedFeedback = new BoolFeedback(() => Configuration.Call.Lock.Enable );
|
||||
}
|
||||
|
||||
public CommunicationGather PortGather { get; private set; }
|
||||
@@ -597,6 +599,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
}
|
||||
};
|
||||
|
||||
Configuration.Call.Lock.PropertyChanged += (o, a) =>
|
||||
{
|
||||
if (a.PropertyName == "Enable")
|
||||
{
|
||||
MeetingIsLockedFeedback.FireUpdate();
|
||||
}
|
||||
};
|
||||
|
||||
// This is to deal with incorrect object structure coming back from the Zoom Room on v 5.6.3
|
||||
Configuration.Client.Call.Layout.PropertyChanged += (o, a) =>
|
||||
{
|
||||
@@ -791,7 +801,16 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
CrestronConsole.AddNewConsoleCommand(s => GetBookings(), "GetZoomRoomBookings",
|
||||
"Triggers a refresh of the booking data for today", ConsoleAccessLevelEnum.AccessOperator);
|
||||
|
||||
var socket = Communication as ISocketStatus;
|
||||
|
||||
|
||||
return base.CustomActivate();
|
||||
}
|
||||
|
||||
#region Overrides of Device
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
var socket = Communication as ISocketStatus;
|
||||
if (socket != null)
|
||||
{
|
||||
socket.ConnectionChange += socket_ConnectionChange;
|
||||
@@ -802,11 +821,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
Communication.Connect();
|
||||
|
||||
CommunicationMonitor.Start();
|
||||
}
|
||||
|
||||
return base.CustomActivate();
|
||||
}
|
||||
#endregion
|
||||
|
||||
public void SetCommDebug(string s)
|
||||
public void SetCommDebug(string s)
|
||||
{
|
||||
if (s == "1")
|
||||
{
|
||||
@@ -1297,11 +1316,16 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
var codecBookings = JsonConvert.DeserializeObject<List<zCommand.BookingsListResult>>(
|
||||
responseObj.ToString());
|
||||
|
||||
if (codecBookings != null && codecBookings.Count > 0)
|
||||
{
|
||||
CodecSchedule.Meetings = zCommand.GetGenericMeetingsFromBookingResult(
|
||||
codecBookings, CodecSchedule.MeetingWarningMinutes);
|
||||
}
|
||||
if (codecBookings != null && codecBookings.Count > 0)
|
||||
{
|
||||
CodecSchedule.Meetings = zCommand.GetGenericMeetingsFromBookingResult(
|
||||
codecBookings, CodecSchedule.MeetingWarningMinutes);
|
||||
}
|
||||
else
|
||||
{
|
||||
//need to clear the list if it's empty
|
||||
CodecSchedule.Meetings = new List<Meeting>();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -2320,6 +2344,56 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invites contacts to a new meeting for a specified duration
|
||||
/// </summary>
|
||||
/// <param name="contacts"></param>
|
||||
/// <param name="duration"></param>
|
||||
public void InviteContactsToNewMeeting(InvitableDirectoryContact[] contacts, uint duration)
|
||||
{
|
||||
if(duration == 0)
|
||||
{
|
||||
duration = DefaultMeetingDurationMin;
|
||||
}
|
||||
|
||||
StringBuilder message = new StringBuilder();
|
||||
|
||||
// Add the prefix
|
||||
message.Append(string.Format("zCommand Invite Duration: {0}", duration));
|
||||
|
||||
// Add each invitee
|
||||
foreach (var contact in contacts)
|
||||
{
|
||||
var invitee = string.Format(" user: {0}", contact.ContactId);
|
||||
|
||||
message.Append(invitee);
|
||||
}
|
||||
|
||||
SendText(message.ToString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invites contacts to an existing meeting
|
||||
/// </summary>
|
||||
/// <param name="contacts"></param>
|
||||
public void InviteContactsToExistingMeeting(InvitableDirectoryContact[] contacts)
|
||||
{
|
||||
StringBuilder message = new StringBuilder();
|
||||
|
||||
// Add the prefix
|
||||
message.Append(string.Format("zCommand Call Invite"));
|
||||
|
||||
// Add each invitee
|
||||
foreach (var contact in contacts)
|
||||
{
|
||||
var invitee = string.Format(" user: {0}", contact.ContactId);
|
||||
|
||||
message.Append(invitee);
|
||||
}
|
||||
|
||||
SendText(message.ToString());
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Starts a PMI Meeting for the specified duration (or default meeting duration if 0 is specified)
|
||||
@@ -2455,10 +2529,25 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
|
||||
public CodecParticipants Participants { get; private set; }
|
||||
|
||||
public void RemoveParticipant(int userId)
|
||||
{
|
||||
SendText(string.Format("zCommand Call Expel Id: {0}", userId));
|
||||
}
|
||||
|
||||
public void SetParticipantAsHost(int userId)
|
||||
{
|
||||
SendText(string.Format("zCommand Call HostChange Id: {0}", userId));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IHasParticipantAudioMute Members
|
||||
|
||||
public void MuteAudioForAllParticipants()
|
||||
{
|
||||
SendText(string.Format("zCommand Call MuteAll Mute: on"));
|
||||
}
|
||||
|
||||
public void MuteAudioForParticipant(int userId)
|
||||
{
|
||||
SendText(string.Format("zCommand Call MuteParticipant Mute: on Id: {0}", userId));
|
||||
@@ -3020,7 +3109,35 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
#region IHasMeetingLock Members
|
||||
|
||||
public BoolFeedback MeetingIsLockedFeedback { get; private set; }
|
||||
|
||||
public void LockMeeting()
|
||||
{
|
||||
SendText(string.Format("zConfiguration Call Lock Enable: on"));
|
||||
}
|
||||
|
||||
public void UnLockMeeting()
|
||||
{
|
||||
SendText(string.Format("zConfiguration Call Lock Enable: off"));
|
||||
}
|
||||
|
||||
public void ToggleMeetingLock()
|
||||
{
|
||||
if (MeetingIsLockedFeedback.BoolValue)
|
||||
{
|
||||
UnLockMeeting();
|
||||
}
|
||||
else
|
||||
{
|
||||
LockMeeting();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Zoom Room specific info object
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<packages>
|
||||
<package id="PepperDashCore" version="1.0.47" targetFramework="net35" allowedVersions="[1.0,1.1)"/>
|
||||
<package id="PepperDashCore" version="1.1.0" targetFramework="net35" allowedVersions="[1.0,2.0)"/>
|
||||
</packages>
|
||||
Reference in New Issue
Block a user