mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-11 02:35:00 +00:00
Resolved ecs-582,602,608
This commit is contained in:
@@ -207,10 +207,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
|
||||
public bool CommDebuggingIsOn;
|
||||
|
||||
|
||||
string Delimiter = "\r\n";
|
||||
|
||||
int PresentationSource;
|
||||
/// <summary>
|
||||
/// Used to track the current connector used for the presentation source
|
||||
/// </summary>
|
||||
int PresentationSourceConnector;
|
||||
|
||||
string PresentationSourceKey;
|
||||
|
||||
@@ -227,9 +229,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
// **___________________________________________________________________**
|
||||
|
||||
public RoutingInputPort CodecOsdIn { get; private set; }
|
||||
public RoutingInputPort HdmiIn1 { get; private set; }
|
||||
public RoutingInputPort HdmiIn2 { get; private set; }
|
||||
public RoutingOutputPort HdmiOut { get; private set; }
|
||||
public RoutingInputPort HdmiIn3 { get; private set; }
|
||||
public RoutingOutputPort HdmiOut1 { get; private set; }
|
||||
public RoutingOutputPort HdmiOut2 { get; private set; }
|
||||
|
||||
|
||||
// Constructor for IBasicCommunication
|
||||
public CiscoSparkCodec(string key, string name, IBasicCommunication comm, CiscoSparkCodecPropertiesConfig props )
|
||||
@@ -304,18 +308,20 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
|
||||
CodecOsdIn = new RoutingInputPort(RoutingPortNames.CodecOsd, eRoutingSignalType.AudioVideo,
|
||||
eRoutingPortConnectionType.Hdmi, new Action(StopSharing), this);
|
||||
HdmiIn1 = new RoutingInputPort(RoutingPortNames.HdmiIn1, eRoutingSignalType.AudioVideo,
|
||||
eRoutingPortConnectionType.Hdmi, new Action(SelectPresentationSource1), this);
|
||||
HdmiIn2 = new RoutingInputPort(RoutingPortNames.HdmiIn2, eRoutingSignalType.AudioVideo,
|
||||
eRoutingPortConnectionType.Hdmi, new Action(SelectPresentationSource2), this);
|
||||
eRoutingPortConnectionType.Hdmi, new Action(SelectPresentationSourceConnector2), this);
|
||||
HdmiIn3 = new RoutingInputPort(RoutingPortNames.HdmiIn3, eRoutingSignalType.AudioVideo,
|
||||
eRoutingPortConnectionType.Hdmi, new Action(SelectPresentationSourceConnector3), this);
|
||||
|
||||
HdmiOut = new RoutingOutputPort(RoutingPortNames.HdmiOut, eRoutingSignalType.AudioVideo,
|
||||
HdmiOut1 = new RoutingOutputPort(RoutingPortNames.HdmiOut1, eRoutingSignalType.AudioVideo,
|
||||
eRoutingPortConnectionType.Hdmi, null, this);
|
||||
HdmiOut2 = new RoutingOutputPort(RoutingPortNames.HdmiOut2, eRoutingSignalType.AudioVideo,
|
||||
eRoutingPortConnectionType.Hdmi, null, this);
|
||||
|
||||
InputPorts.Add(CodecOsdIn);
|
||||
InputPorts.Add(HdmiIn1);
|
||||
InputPorts.Add(HdmiIn2);
|
||||
OutputPorts.Add(HdmiOut);
|
||||
InputPorts.Add(HdmiIn3);
|
||||
OutputPorts.Add(HdmiOut1);
|
||||
|
||||
CreateOsdSource();
|
||||
}
|
||||
@@ -540,6 +546,19 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
|
||||
JsonConvert.PopulateObject(response, tempCodecStatus);
|
||||
|
||||
// Check to see if the message contains /Status/Conference/Presentation/LocalInstance and extract source value
|
||||
var conference = tempCodecStatus.Status.Conference;
|
||||
|
||||
if (conference.Presentation.LocalInstance.Count > 0)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(conference.Presentation.LocalInstance[0].ghost))
|
||||
PresentationSourceConnector = 0;
|
||||
else if (conference.Presentation.LocalInstance[0].Source != null)
|
||||
{
|
||||
PresentationSourceConnector = conference.Presentation.LocalInstance[0].Source.IntValue;
|
||||
}
|
||||
}
|
||||
|
||||
// Check to see if this is a call status message received after the initial status message
|
||||
if (tempCodecStatus.Status.Call.Count > 0)
|
||||
{
|
||||
@@ -783,6 +802,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
|
||||
{
|
||||
ExecuteSwitch(inputSelector);
|
||||
PresentationSourceKey = inputSelector.ToString();
|
||||
}
|
||||
|
||||
|
||||
@@ -972,9 +992,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
}
|
||||
}
|
||||
|
||||
public void SelectPresentationSource(int source)
|
||||
public void SelectPresentationByConnector(int connector)
|
||||
{
|
||||
PresentationSource = source;
|
||||
PresentationSourceConnector = connector;
|
||||
|
||||
StartSharing();
|
||||
}
|
||||
@@ -982,17 +1002,17 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
/// <summary>
|
||||
/// Select source 1 as the presetnation source
|
||||
/// </summary>
|
||||
public void SelectPresentationSource1()
|
||||
public void SelectPresentationSourceConnector2()
|
||||
{
|
||||
SelectPresentationSource(1);
|
||||
SelectPresentationByConnector(2);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Select source 2 as the presetnation source
|
||||
/// </summary>
|
||||
public void SelectPresentationSource2()
|
||||
public void SelectPresentationSourceConnector3()
|
||||
{
|
||||
SelectPresentationSource(2);
|
||||
SelectPresentationByConnector(3);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1007,7 +1027,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
else
|
||||
sendingMode = "LocalOnly";
|
||||
|
||||
SendText(string.Format("xCommand Presentation Start PresentationSource: {0} SendingMode: {1}", PresentationSource, sendingMode));
|
||||
SendText(string.Format("xCommand Presentation Start PresentationSource: {0} SendingMode: {1}", PresentationSourceConnector, sendingMode));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1015,6 +1035,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
/// </summary>
|
||||
public override void StopSharing()
|
||||
{
|
||||
PresentationSourceConnector = 0;
|
||||
|
||||
SendText("xCommand Presentation Stop");
|
||||
}
|
||||
|
||||
|
||||
@@ -397,9 +397,39 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
public RequestFloorAvailability RequestFloorAvailability { get; set; }
|
||||
}
|
||||
|
||||
public class Source2
|
||||
public class Source2 : ValueProperty
|
||||
{
|
||||
public string Value { get; set; }
|
||||
string _Value;
|
||||
|
||||
/// <summary>
|
||||
/// Sets Value and triggers the action when set
|
||||
/// </summary>
|
||||
public string Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return _Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
_Value = value;
|
||||
OnValueChanged();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converted value of _Value for use as feedback
|
||||
/// </summary>
|
||||
public int IntValue
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!string.IsNullOrEmpty(_Value))
|
||||
return Convert.ToInt32(_Value);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class SendingMode
|
||||
@@ -410,16 +440,22 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
public class LocalInstance
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string ghost { get; set; }
|
||||
public SendingMode SendingMode {get; set;}
|
||||
public Source2 Source { get; set; }
|
||||
|
||||
public LocalInstance()
|
||||
{
|
||||
Source = new Source2();
|
||||
}
|
||||
}
|
||||
|
||||
public class Presentation
|
||||
{
|
||||
public CallId2 CallId { get; set; }
|
||||
public Mode2 Mode { get; set; }
|
||||
public Whiteboard Whiteboard { get; set; }
|
||||
public List<LocalInstance> LocalInstance { get; set; }
|
||||
public CallId2 CallId { get; set; }
|
||||
public Mode2 Mode { get; set; }
|
||||
public Whiteboard Whiteboard { get; set; }
|
||||
public List<LocalInstance> LocalInstance { get; set; }
|
||||
|
||||
public Presentation()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user