mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-20 23:24:57 +00:00
Compare commits
59 Commits
1.9.5-hotf
...
1.9.8-hotf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5fd8e4bc2b | ||
|
|
cee9bd6af8 | ||
|
|
72a5491309 | ||
|
|
03f01b2f78 | ||
|
|
446bae4dd3 | ||
|
|
63cd322fd0 | ||
|
|
489ba2da04 | ||
|
|
8087aa7a75 | ||
|
|
a8d0dfb327 | ||
|
|
cef9e0a9a6 | ||
|
|
16369e31cf | ||
|
|
38959414ff | ||
|
|
bc3247297e | ||
|
|
f7bf728263 | ||
|
|
025bf7adfb | ||
|
|
a6430a7bfe | ||
|
|
b71c83bac0 | ||
|
|
5940ec17c2 | ||
|
|
10445508b2 | ||
|
|
66ecf43508 | ||
|
|
77c4272219 | ||
|
|
d78a378859 | ||
|
|
eec4484f78 | ||
|
|
49e82f107b | ||
|
|
c5162fb94d | ||
|
|
63b9ffdd26 | ||
|
|
2e76b6ba0a | ||
|
|
cad45c04cb | ||
|
|
70d63a9f99 | ||
|
|
30f63eee03 | ||
|
|
9f1c512909 | ||
|
|
0d6cd8d55d | ||
|
|
8e64140651 | ||
|
|
0da35c8572 | ||
|
|
9f3a3f64a8 | ||
|
|
fe01842523 | ||
|
|
4ffea1c98f | ||
|
|
73e3b049d8 | ||
|
|
0ae38dddfc | ||
|
|
871894e248 | ||
|
|
fa6cabe246 | ||
|
|
db3d96d448 | ||
|
|
a28a078c4f | ||
|
|
d00a31e3a6 | ||
|
|
77134f0a30 | ||
|
|
93dfb8780b | ||
|
|
f791feb848 | ||
|
|
44509dc5ae | ||
|
|
2d0dcd7336 | ||
|
|
c255ae1525 | ||
|
|
d50027cc82 | ||
|
|
9b64b7b7f3 | ||
|
|
147e712a01 | ||
|
|
9a1b069e24 | ||
|
|
d8cd04b35f | ||
|
|
8539a6b79c | ||
|
|
adec25104c | ||
|
|
a54cd9e1df | ||
|
|
8af7b4b1db |
1
.github/scripts/ZipBuildOutput.ps1
vendored
1
.github/scripts/ZipBuildOutput.ps1
vendored
@@ -8,6 +8,7 @@ $destination = "$($Env:GITHUB_HOME)\output"
|
|||||||
New-Item -ItemType Directory -Force -Path ($destination)
|
New-Item -ItemType Directory -Force -Path ($destination)
|
||||||
Get-ChildItem ($destination)
|
Get-ChildItem ($destination)
|
||||||
$exclusions = @(git submodule foreach --quiet 'echo $name')
|
$exclusions = @(git submodule foreach --quiet 'echo $name')
|
||||||
|
$exclusions += "Newtonsoft.Compact.Json.dll"
|
||||||
# Trying to get any .json schema files (not currently working)
|
# Trying to get any .json schema files (not currently working)
|
||||||
# Gets any files with the listed extensions.
|
# Gets any files with the listed extensions.
|
||||||
Get-ChildItem -recurse -Path "$($Env:GITHUB_WORKSPACE)" -include "*.clz", "*.cpz", "*.cplz", "*.dll", "*.nuspec" | ForEach-Object {
|
Get-ChildItem -recurse -Path "$($Env:GITHUB_WORKSPACE)" -include "*.clz", "*.cpz", "*.cplz", "*.dll", "*.nuspec" | ForEach-Object {
|
||||||
|
|||||||
BIN
IR Drivers/Apple_AppleTV_4th_Gen_Essentials.ir
Normal file
BIN
IR Drivers/Apple_AppleTV_4th_Gen_Essentials.ir
Normal file
Binary file not shown.
@@ -214,17 +214,25 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
VideoCodec = DeviceManager.GetDeviceForKey(PropertiesConfig.VideoCodecKey) as
|
VideoCodec = DeviceManager.GetDeviceForKey(PropertiesConfig.VideoCodecKey) as
|
||||||
PepperDash.Essentials.Devices.Common.VideoCodec.VideoCodecBase;
|
PepperDash.Essentials.Devices.Common.VideoCodec.VideoCodecBase;
|
||||||
|
|
||||||
|
|
||||||
if (VideoCodec == null)
|
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
|
AudioCodec = DeviceManager.GetDeviceForKey(PropertiesConfig.AudioCodecKey) as
|
||||||
PepperDash.Essentials.Devices.Common.AudioCodec.AudioCodecBase;
|
PepperDash.Essentials.Devices.Common.AudioCodec.AudioCodecBase;
|
||||||
if (AudioCodec == null)
|
if (AudioCodec == null)
|
||||||
Debug.Console(0, this, "No Audio Codec Found");
|
Debug.Console(0, this, "No Audio Codec Found");
|
||||||
|
|
||||||
DefaultAudioDevice = DeviceManager.GetDeviceForKey(PropertiesConfig.DefaultAudioKey) as IBasicVolumeControls;
|
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();
|
InitializeRoom();
|
||||||
}
|
}
|
||||||
@@ -419,6 +427,14 @@ namespace PepperDash.Essentials
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public bool RunDefaultCallRoute()
|
public bool RunDefaultCallRoute()
|
||||||
{
|
{
|
||||||
|
Debug.Console(2, this, "RunDefaultCallRoute() Currently Sharing Content: {0}", VideoCodec.SharingContentIsOnFeedback.BoolValue);
|
||||||
|
|
||||||
|
if (VideoCodec.SharingContentIsOnFeedback.BoolValue)
|
||||||
|
{
|
||||||
|
Debug.Console(2, this, "Currently sharing content. Ignoring request to run default call route.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
RunRouteAction(DefaultCodecRouteString);
|
RunRouteAction(DefaultCodecRouteString);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Audio Conference
|
// Audio Conference
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 1101
|
/// 1101
|
||||||
@@ -766,10 +767,10 @@ namespace PepperDash.Essentials
|
|||||||
/// 15044 Close button for source modal overlay
|
/// 15044 Close button for source modal overlay
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint SourceBackgroundOverlayClosePress = 15044;
|
public const uint SourceBackgroundOverlayClosePress = 15044;
|
||||||
///// <summary>
|
/// <summary>
|
||||||
///// 15045 - Visibility for the bar containing call navigation button list
|
/// 15045
|
||||||
///// </summary>
|
/// </summary>
|
||||||
//public const uint CallStagingBarVisible = 15045;
|
public const uint ZoomRoomContentSharingVisible = 15045;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 15046
|
/// 15046
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -42,7 +42,17 @@ namespace PepperDash.Essentials
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 1008
|
/// 1008
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint MeetingNameText = 1008;
|
public const uint MeetingLeaveText = 1008;
|
||||||
|
/// <summary>
|
||||||
|
/// 1009
|
||||||
|
/// </summary>
|
||||||
|
public const uint MeetingNameText = 1009;
|
||||||
|
|
||||||
|
///<summary>
|
||||||
|
/// 1240 - Used to determine text for meeting start button
|
||||||
|
///</summary>
|
||||||
|
public const uint MeetingStartButtonText = 1240;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
{
|
{
|
||||||
// Video Codec
|
// Video Codec
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 1234: values 0 = Connect, 1 = End
|
/// 1234: values 0 = Connect, 1 = End, 2 = Start Meeting
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint VCStagingConnectButtonMode = 1234;
|
public const uint VCStagingConnectButtonMode = 1234;
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ using PepperDash.Core;
|
|||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.SmartObjects;
|
using PepperDash.Essentials.Core.SmartObjects;
|
||||||
using PepperDash.Essentials.Core.PageManagers;
|
using PepperDash.Essentials.Core.PageManagers;
|
||||||
|
using PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces;
|
||||||
using PepperDash.Essentials.Room.Config;
|
using PepperDash.Essentials.Room.Config;
|
||||||
using PepperDash.Essentials.Devices.Common.Codec;
|
using PepperDash.Essentials.Devices.Common.Codec;
|
||||||
using PepperDash.Essentials.Devices.Common.VideoCodec;
|
using PepperDash.Essentials.Devices.Common.VideoCodec;
|
||||||
@@ -191,32 +192,56 @@ namespace PepperDash.Essentials
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var meetingInfoCodec = codec as IHasMeetingInfo;
|
||||||
|
|
||||||
// Set mode of header button
|
// Set mode of header button
|
||||||
|
SetHeaderCallIcon(codec);
|
||||||
|
|
||||||
|
// Set the call status text
|
||||||
|
Debug.Console(1, "Active Call Count: {0}", codec.ActiveCalls.Count);
|
||||||
|
|
||||||
|
if (codec.ActiveCalls.Count > 0)
|
||||||
|
{
|
||||||
|
if (codec.ActiveCalls.Count == 1 && meetingInfoCodec == null)
|
||||||
|
TriList.SetString(UIStringJoin.HeaderCallStatusLabel, "1 Active Call");
|
||||||
|
else if (codec.ActiveCalls.Count == 1 && meetingInfoCodec != null)
|
||||||
|
{
|
||||||
|
var headerCallStatusLabel = meetingInfoCodec.MeetingInfo.IsSharingMeeting
|
||||||
|
? "Sharing-Only Meeting"
|
||||||
|
: "Active Meeting";
|
||||||
|
|
||||||
|
headerCallStatusLabel = meetingInfoCodec.MeetingInfo.WaitingForHost
|
||||||
|
? "Waiting For Host"
|
||||||
|
: headerCallStatusLabel;
|
||||||
|
|
||||||
|
TriList.SetString(UIStringJoin.HeaderCallStatusLabel, headerCallStatusLabel);
|
||||||
|
}
|
||||||
|
else if (codec.ActiveCalls.Count > 1)
|
||||||
|
TriList.SetString(UIStringJoin.HeaderCallStatusLabel, string.Format("{0} Active Calls", codec.ActiveCalls.Count));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
TriList.SetString(UIStringJoin.HeaderCallStatusLabel, "No Active Calls");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetHeaderCallIcon(VideoCodecBase codec)
|
||||||
|
{
|
||||||
if (!codec.IsInCall)
|
if (!codec.IsInCall)
|
||||||
{
|
{
|
||||||
HeaderCallButtonIconSig.StringValue = "DND";
|
HeaderCallButtonIconSig.StringValue = "DND";
|
||||||
//HeaderCallButton.SetIcon(HeaderListButton.OnHook);
|
//HeaderCallButton.SetIcon(HeaderListButton.OnHook);
|
||||||
}
|
}
|
||||||
else if (codec.ActiveCalls.Any(c => c.Type == eCodecCallType.Video))
|
else if (codec.ActiveCalls.Any(c => c.Type == eCodecCallType.Video))
|
||||||
|
{
|
||||||
HeaderCallButtonIconSig.StringValue = "Misc-06_Dark";
|
HeaderCallButtonIconSig.StringValue = "Misc-06_Dark";
|
||||||
//HeaderCallButton.SetIcon(HeaderListButton.Camera);
|
}
|
||||||
//TriList.SetUshort(UIUshortJoin.CallHeaderButtonMode, 2);
|
//HeaderCallButton.SetIcon(HeaderListButton.Camera);
|
||||||
|
//TriList.SetUshort(UIUshortJoin.CallHeaderButtonMode, 2);
|
||||||
else
|
else
|
||||||
|
{
|
||||||
HeaderCallButtonIconSig.StringValue = "Misc-09_Dark";
|
HeaderCallButtonIconSig.StringValue = "Misc-09_Dark";
|
||||||
|
}
|
||||||
//HeaderCallButton.SetIcon(HeaderListButton.Phone);
|
//HeaderCallButton.SetIcon(HeaderListButton.Phone);
|
||||||
//TriList.SetUshort(UIUshortJoin.CallHeaderButtonMode, 1);
|
//TriList.SetUshort(UIUshortJoin.CallHeaderButtonMode, 1);
|
||||||
|
|
||||||
// Set the call status text
|
|
||||||
Debug.Console(1, "Active Call Count: {0}", codec.ActiveCalls.Count);
|
|
||||||
if (codec.ActiveCalls.Count > 0)
|
|
||||||
{
|
|
||||||
if (codec.ActiveCalls.Count == 1)
|
|
||||||
TriList.SetString(UIStringJoin.HeaderCallStatusLabel, "1 Active Call");
|
|
||||||
else if (codec.ActiveCalls.Count > 1)
|
|
||||||
TriList.SetString(UIStringJoin.HeaderCallStatusLabel, string.Format("{0} Active Calls", codec.ActiveCalls.Count));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
TriList.SetString(UIStringJoin.HeaderCallStatusLabel, "No Active Calls");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ using Crestron.SimplSharpPro.UI;
|
|||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
|
using PepperDash.Essentials.Core.DeviceTypeInterfaces;
|
||||||
using PepperDash.Essentials.Core.SmartObjects;
|
using PepperDash.Essentials.Core.SmartObjects;
|
||||||
using PepperDash.Essentials.Core.PageManagers;
|
using PepperDash.Essentials.Core.PageManagers;
|
||||||
using PepperDash.Essentials.Room.Config;
|
using PepperDash.Essentials.Room.Config;
|
||||||
@@ -181,6 +182,16 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
private UiDisplayMode _currentMode;
|
private UiDisplayMode _currentMode;
|
||||||
|
|
||||||
|
private bool _isZoomRoomWithNoExternalSources
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return CurrentRoom.VideoCodec is Essentials.Devices.Common.VideoCodec.ZoomRoom.ZoomRoom && _sourceListCount <= 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private uint _sourceListCount;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The mode showing. Presentation or call.
|
/// The mode showing. Presentation or call.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -461,85 +472,92 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void ShowNextMeetingTimerCallback()
|
void ShowNextMeetingTimerCallback()
|
||||||
{
|
{
|
||||||
|
//Update calendar for Zoom. Zoom doesn't automatically update when meetings are in the past
|
||||||
|
if (_isZoomRoomWithNoExternalSources)
|
||||||
|
{
|
||||||
|
CurrentRoom.ScheduleSource.GetSchedule();
|
||||||
|
}
|
||||||
|
|
||||||
// Every 60 seconds, refresh the calendar
|
// Every 60 seconds, refresh the calendar
|
||||||
RefreshMeetingsList();
|
RefreshMeetingsList();
|
||||||
// check meetings list for the closest, joinable meeting
|
// check meetings list for the closest, joinable meeting
|
||||||
var ss = CurrentRoom.ScheduleSource;
|
var ss = CurrentRoom.ScheduleSource;
|
||||||
var meetings = ss.CodecSchedule.Meetings;
|
var meetings = ss.CodecSchedule.Meetings;
|
||||||
|
|
||||||
if (meetings.Count > 0)
|
if (meetings.Count <= 0)
|
||||||
{
|
{
|
||||||
// If the room is off pester the user
|
return;
|
||||||
// If the room is on, and the meeting is joinable
|
}
|
||||||
// and the LastMeetingDismissed != this meeting
|
// If the room is off pester the user
|
||||||
|
// If the room is on, and the meeting is joinable
|
||||||
|
// and the LastMeetingDismissed != this meeting
|
||||||
|
|
||||||
var lastMeetingDismissed = meetings.FirstOrDefault(m => m.Id == LastMeetingDismissedId);
|
var lastMeetingDismissed = meetings.FirstOrDefault(m => m.Id == LastMeetingDismissedId);
|
||||||
Debug.Console(0, "*#* Room on: {0}, lastMeetingDismissedId: {1} {2} *#*",
|
Debug.Console(0, "*#* Room on: {0}, lastMeetingDismissedId: {1} {2} *#*",
|
||||||
CurrentRoom.OnFeedback.BoolValue,
|
CurrentRoom.OnFeedback.BoolValue,
|
||||||
LastMeetingDismissedId,
|
LastMeetingDismissedId,
|
||||||
lastMeetingDismissed != null ? lastMeetingDismissed.StartTime.ToString("t", Global.Culture) : "");
|
lastMeetingDismissed != null ? lastMeetingDismissed.StartTime.ToString("t", Global.Culture) : "");
|
||||||
|
|
||||||
var meeting = meetings.LastOrDefault(m => m.Joinable);
|
var meeting = meetings.LastOrDefault(m => m.Joinable);
|
||||||
if (CurrentRoom.OnFeedback.BoolValue
|
if (CurrentRoom.OnFeedback.BoolValue
|
||||||
&& lastMeetingDismissed == meeting)
|
&& lastMeetingDismissed == meeting)
|
||||||
{
|
{
|
||||||
// meeting no longer joinable, hide popup
|
// meeting no longer joinable, hide popup
|
||||||
if(meeting == null)
|
if(meeting == null)
|
||||||
HideNextMeetingPopup();
|
HideNextMeetingPopup();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
LastMeetingDismissedId = null;
|
LastMeetingDismissedId = null;
|
||||||
// Clear the popup when we run out of meetings
|
// Clear the popup when we run out of meetings
|
||||||
if (meeting == null)
|
if (meeting == null)
|
||||||
{
|
{
|
||||||
HideNextMeetingPopup();
|
HideNextMeetingPopup();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
TriList.SetString(UIStringJoin.MeetingsOrContactMethodListTitleText, "Upcoming meeting");
|
TriList.SetString(UIStringJoin.MeetingsOrContactMethodListTitleText, "Upcoming meeting");
|
||||||
TriList.SetString(UIStringJoin.NextMeetingStartTimeText, meeting.StartTime.ToString("t", Global.Culture));
|
TriList.SetString(UIStringJoin.NextMeetingStartTimeText, meeting.StartTime.ToString("t", Global.Culture));
|
||||||
TriList.SetString(UIStringJoin.NextMeetingEndTimeText, meeting.EndTime.ToString("t", Global.Culture));
|
TriList.SetString(UIStringJoin.NextMeetingEndTimeText, meeting.EndTime.ToString("t", Global.Culture));
|
||||||
TriList.SetString(UIStringJoin.NextMeetingTitleText, meeting.Title);
|
TriList.SetString(UIStringJoin.NextMeetingTitleText, meeting.Title);
|
||||||
TriList.SetString(UIStringJoin.NextMeetingNameText, meeting.Organizer);
|
TriList.SetString(UIStringJoin.NextMeetingNameText, meeting.Organizer);
|
||||||
TriList.SetString(UIStringJoin.NextMeetingButtonLabel, "Join");
|
TriList.SetString(UIStringJoin.NextMeetingButtonLabel, "Join");
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.NextMeetingJoinPress, () =>
|
TriList.SetSigFalseAction(UIBoolJoin.NextMeetingJoinPress, () =>
|
||||||
{
|
{
|
||||||
HideNextMeetingPopup();
|
HideNextMeetingPopup();
|
||||||
PopupInterlock.Hide();
|
PopupInterlock.Hide();
|
||||||
RoomOnAndDialMeeting(meeting);
|
RoomOnAndDialMeeting(meeting);
|
||||||
});
|
});
|
||||||
TriList.SetString(UIStringJoin.NextMeetingSecondaryButtonLabel, "Show Schedule");
|
TriList.SetString(UIStringJoin.NextMeetingSecondaryButtonLabel, "Show Schedule");
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.CalendarHeaderButtonPress, () =>
|
TriList.SetSigFalseAction(UIBoolJoin.CalendarHeaderButtonPress, () =>
|
||||||
{
|
{
|
||||||
HideNextMeetingPopup();
|
HideNextMeetingPopup();
|
||||||
//CalendarPress();
|
//CalendarPress();
|
||||||
RefreshMeetingsList();
|
RefreshMeetingsList();
|
||||||
PopupInterlock.ShowInterlocked(UIBoolJoin.MeetingsOrContacMethodsListVisible);
|
PopupInterlock.ShowInterlocked(UIBoolJoin.MeetingsOrContacMethodsListVisible);
|
||||||
});
|
});
|
||||||
var indexOfNext = meetings.IndexOf(meeting) + 1;
|
var indexOfNext = meetings.IndexOf(meeting) + 1;
|
||||||
|
|
||||||
// indexOf = 3, 4 meetings :
|
// indexOf = 3, 4 meetings :
|
||||||
if (indexOfNext < meetings.Count)
|
if (indexOfNext < meetings.Count)
|
||||||
TriList.SetString(UIStringJoin.NextMeetingFollowingMeetingText,
|
TriList.SetString(UIStringJoin.NextMeetingFollowingMeetingText,
|
||||||
meetings[indexOfNext].StartTime.ToString("t", Global.Culture));
|
meetings[indexOfNext].StartTime.ToString("t", Global.Culture));
|
||||||
else
|
else
|
||||||
TriList.SetString(UIStringJoin.NextMeetingFollowingMeetingText, "No more meetings today");
|
TriList.SetString(UIStringJoin.NextMeetingFollowingMeetingText, "No more meetings today");
|
||||||
|
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.NextMeetingModalClosePress, () =>
|
TriList.SetSigFalseAction(UIBoolJoin.NextMeetingModalClosePress, () =>
|
||||||
{
|
{
|
||||||
// Mark the meeting to not re-harass the user
|
// Mark the meeting to not re-harass the user
|
||||||
if(CurrentRoom.OnFeedback.BoolValue)
|
if(CurrentRoom.OnFeedback.BoolValue)
|
||||||
LastMeetingDismissedId = meeting.Id;
|
LastMeetingDismissedId = meeting.Id;
|
||||||
HideNextMeetingPopup();
|
HideNextMeetingPopup();
|
||||||
});
|
});
|
||||||
|
|
||||||
TriList.SetBool(UIBoolJoin.NextMeetingModalVisible, true);
|
TriList.SetBool(UIBoolJoin.NextMeetingModalVisible, true);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -565,19 +583,26 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void RoomOnAndDialMeeting(Meeting meeting)
|
void RoomOnAndDialMeeting(Meeting meeting)
|
||||||
{
|
{
|
||||||
|
Debug.Console(1, "[RoomOnAndDialMeeting] Joining meeting [{0}]", meeting);
|
||||||
Action dialAction = () =>
|
Action dialAction = () =>
|
||||||
{
|
{
|
||||||
var d = CurrentRoom.ScheduleSource as VideoCodecBase;
|
var d = CurrentRoom.ScheduleSource as VideoCodecBase;
|
||||||
if (d != null)
|
if (d != null)
|
||||||
{
|
{
|
||||||
|
Debug.Console(1,
|
||||||
|
"[RoomOnAndDialMeeting] [dialAction] Sending command to codec to join meeting {0}", meeting);
|
||||||
d.Dial(meeting);
|
d.Dial(meeting);
|
||||||
LastMeetingDismissedId = meeting.Id; // To prevent prompts for already-joined call
|
LastMeetingDismissedId = meeting.Id; // To prevent prompts for already-joined call
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (CurrentRoom.OnFeedback.BoolValue)
|
if (CurrentRoom.OnFeedback.BoolValue)
|
||||||
dialAction();
|
{
|
||||||
|
Debug.Console(1, "[RoomOnAndDialMeeting] Room is on.");
|
||||||
|
dialAction();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Debug.Console(1, "RoomOnAndDialMeeting] Room is off or warming. Registering for Warming Feedback");
|
||||||
// Rig a one-time handler to catch when the room is warmed and then dial call
|
// Rig a one-time handler to catch when the room is warmed and then dial call
|
||||||
EventHandler<FeedbackEventArgs> oneTimeHandler = null;
|
EventHandler<FeedbackEventArgs> oneTimeHandler = null;
|
||||||
oneTimeHandler = (o, a) =>
|
oneTimeHandler = (o, a) =>
|
||||||
@@ -647,9 +672,24 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
TriList.SetBool(StartPageVisibleJoin, startMode ? true : false);
|
TriList.SetBool(StartPageVisibleJoin, startMode ? true : false);
|
||||||
|
|
||||||
TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, presentationMode ? true : false);
|
if (presentationMode &&_isZoomRoomWithNoExternalSources)
|
||||||
|
{
|
||||||
|
// For now, if this is a Zoom Room and there are no shareable sources just display the informational subpage
|
||||||
|
TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, false);
|
||||||
|
TriList.SetBool(UIBoolJoin.ZoomRoomContentSharingVisible, true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Otherwise, show the staging bar
|
||||||
|
TriList.SetBool(UIBoolJoin.ZoomRoomContentSharingVisible, false);
|
||||||
|
TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, presentationMode ? true : false);
|
||||||
|
|
||||||
|
}
|
||||||
if (!presentationMode)
|
if (!presentationMode)
|
||||||
|
{
|
||||||
|
TriList.SetBool(UIBoolJoin.ZoomRoomContentSharingVisible, false);
|
||||||
TriList.SetBool(UIBoolJoin.SelectASourceVisible, false);
|
TriList.SetBool(UIBoolJoin.SelectASourceVisible, false);
|
||||||
|
}
|
||||||
|
|
||||||
CallButtonSig.BoolValue = callMode
|
CallButtonSig.BoolValue = callMode
|
||||||
&& CurrentRoom.ShutdownType == eShutdownType.None;
|
&& CurrentRoom.ShutdownType == eShutdownType.None;
|
||||||
@@ -687,25 +727,63 @@ namespace PepperDash.Essentials
|
|||||||
if (VCDriver.IsVisible)
|
if (VCDriver.IsVisible)
|
||||||
VCDriver.Hide();
|
VCDriver.Hide();
|
||||||
HideNextMeetingPopup();
|
HideNextMeetingPopup();
|
||||||
// Run default source when room is off and share is pressed
|
|
||||||
if (!CurrentRoom.OnFeedback.BoolValue)
|
|
||||||
{
|
if (_isZoomRoomWithNoExternalSources)
|
||||||
// If there's no default, show UI elements
|
|
||||||
if (!(CurrentRoom as IRunDefaultPresentRoute).RunDefaultPresentRoute())
|
|
||||||
TriList.SetBool(UIBoolJoin.SelectASourceVisible, true);
|
|
||||||
}
|
|
||||||
else // room is on show what's active or select a source if nothing is yet active
|
|
||||||
{
|
{
|
||||||
if(CurrentRoom.CurrentSourceInfo == null || (CurrentRoom.VideoCodec != null && CurrentRoom.CurrentSourceInfo.SourceDevice.Key == CurrentRoom.VideoCodec.OsdSource.Key))
|
if (!CurrentRoom.OnFeedback.BoolValue)
|
||||||
TriList.SetBool(UIBoolJoin.SelectASourceVisible, true);
|
|
||||||
else if (CurrentSourcePageManager != null)
|
|
||||||
{
|
{
|
||||||
TriList.SetBool(UIBoolJoin.SelectASourceVisible, false);
|
CurrentRoom.RunDefaultPresentRoute();
|
||||||
CurrentSourcePageManager.Show();
|
|
||||||
}
|
}
|
||||||
|
// For now, if this is a Zoom Room and there are no shareable sources just display the informational subpage
|
||||||
|
TriList.SetBool(UIBoolJoin.ZoomRoomContentSharingVisible, true);
|
||||||
|
|
||||||
|
var presentationMeetingCodec = CurrentRoom.VideoCodec as IHasPresentationOnlyMeeting;
|
||||||
|
var farEndContentStatusCodec = CurrentRoom.VideoCodec as IHasFarEndContentStatus;
|
||||||
|
var receivingContent = false;
|
||||||
|
|
||||||
|
if (farEndContentStatusCodec != null)
|
||||||
|
{
|
||||||
|
receivingContent = farEndContentStatusCodec.ReceivingContent.BoolValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (presentationMeetingCodec != null && !CurrentRoom.VideoCodec.IsInCall)
|
||||||
|
{
|
||||||
|
presentationMeetingCodec.StartSharingOnlyMeeting(eSharingMeetingMode.Laptop);
|
||||||
|
}
|
||||||
|
else if (CurrentRoom.VideoCodec.IsInCall && !CurrentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue &&
|
||||||
|
!receivingContent)
|
||||||
|
{
|
||||||
|
CurrentRoom.VideoCodec.StartSharing();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CurrentSourcePageManager != null)
|
||||||
|
CurrentSourcePageManager.Hide();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Run default source when room is off and share is pressed
|
||||||
|
if (!CurrentRoom.OnFeedback.BoolValue)
|
||||||
|
{
|
||||||
|
// If there's no default, show UI elements
|
||||||
|
if (!(CurrentRoom as IRunDefaultPresentRoute).RunDefaultPresentRoute())
|
||||||
|
TriList.SetBool(UIBoolJoin.SelectASourceVisible, true);
|
||||||
|
}
|
||||||
|
else // room is on show what's active or select a source if nothing is yet active
|
||||||
|
{
|
||||||
|
if (CurrentRoom.CurrentSourceInfo == null ||
|
||||||
|
(CurrentRoom.VideoCodec != null &&
|
||||||
|
CurrentRoom.CurrentSourceInfo.SourceDevice.Key == CurrentRoom.VideoCodec.OsdSource.Key))
|
||||||
|
TriList.SetBool(UIBoolJoin.SelectASourceVisible, true);
|
||||||
|
else if (CurrentSourcePageManager != null)
|
||||||
|
{
|
||||||
|
TriList.SetBool(UIBoolJoin.SelectASourceVisible, false);
|
||||||
|
CurrentSourcePageManager.Show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SetupSourceList();
|
||||||
}
|
}
|
||||||
CurrentMode = UiDisplayMode.Presentation;
|
CurrentMode = UiDisplayMode.Presentation;
|
||||||
SetupSourceList();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -744,7 +822,7 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void ShowCurrentSource()
|
void ShowCurrentSource()
|
||||||
{
|
{
|
||||||
if (CurrentRoom.CurrentSourceInfo == null)
|
if (CurrentRoom.CurrentSourceInfo == null || _isZoomRoomWithNoExternalSources)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CurrentMode = UiDisplayMode.Presentation;
|
CurrentMode = UiDisplayMode.Presentation;
|
||||||
@@ -1040,15 +1118,22 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
void meetingInfoCodec_MeetingInfoChanged(object sender, MeetingInfoEventArgs e)
|
void meetingInfoCodec_MeetingInfoChanged(object sender, MeetingInfoEventArgs e)
|
||||||
{
|
{
|
||||||
|
if (e.Info == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
TriList.SetString(UIStringJoin.MeetingIdText, e.Info.Id);
|
TriList.SetString(UIStringJoin.MeetingIdText, e.Info.Id);
|
||||||
TriList.SetString(UIStringJoin.MeetingHostText, e.Info.Host);
|
TriList.SetString(UIStringJoin.MeetingHostText, e.Info.Host);
|
||||||
TriList.SetString(UIStringJoin.MeetingNameText, e.Info.Name);
|
TriList.SetString(UIStringJoin.MeetingNameText, e.Info.Name);
|
||||||
|
|
||||||
TriList.SetString(UIStringJoin.MeetingPasswordText, e.Info.Password);
|
TriList.SetString(UIStringJoin.MeetingPasswordText, e.Info.Password);
|
||||||
// Show the password fields if one is present
|
// Show the password fields if one is present
|
||||||
TriList.SetBool(UIBoolJoin.MeetingPasswordVisible, string.IsNullOrEmpty(e.Info.Password) ? false : true);
|
TriList.SetBool(UIBoolJoin.MeetingPasswordVisible, !string.IsNullOrEmpty(e.Info.Password));
|
||||||
|
|
||||||
TriList.SetString(UIStringJoin.CallSharedSourceNameText, e.Info.ShareStatus);
|
TriList.SetString(UIStringJoin.CallSharedSourceNameText, e.Info.ShareStatus);
|
||||||
|
|
||||||
|
TriList.SetString(UIStringJoin.MeetingLeaveText, e.Info.IsHost ? "End Meeting" : "Leave Meeting");
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetCurrentRoom(IEssentialsHuddleVtc1Room room)
|
void SetCurrentRoom(IEssentialsHuddleVtc1Room room)
|
||||||
@@ -1164,7 +1249,8 @@ namespace PepperDash.Essentials
|
|||||||
Debug.Console(1, "**** KEY {0}", kvp.Key);
|
Debug.Console(1, "**** KEY {0}", kvp.Key);
|
||||||
|
|
||||||
}
|
}
|
||||||
SourceStagingSrl.Count = (ushort)(i - 1);
|
_sourceListCount = (i - 1);
|
||||||
|
SourceStagingSrl.Count = (ushort)_sourceListCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1253,9 +1339,8 @@ namespace PepperDash.Essentials
|
|||||||
{
|
{
|
||||||
// See if this is helpful or if the callback response in the codec class maybe doesn't come it time?
|
// See if this is helpful or if the callback response in the codec class maybe doesn't come it time?
|
||||||
// Let's build list from event
|
// Let's build list from event
|
||||||
// CurrentRoom.ScheduleSource.GetSchedule();
|
|
||||||
|
|
||||||
TriList.SetString(UIStringJoin.MeetingsOrContactMethodListIcon, "Calendar");
|
TriList.SetString(UIStringJoin.MeetingsOrContactMethodListIcon, "Calendar");
|
||||||
TriList.SetString(UIStringJoin.MeetingsOrContactMethodListTitleText, "Today's Meetings");
|
TriList.SetString(UIStringJoin.MeetingsOrContactMethodListTitleText, "Today's Meetings");
|
||||||
|
|
||||||
ushort i = 0;
|
ushort i = 0;
|
||||||
|
|||||||
@@ -134,11 +134,12 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
VCControlsInterlock = new JoinedSigInterlock(triList);
|
VCControlsInterlock = new JoinedSigInterlock(triList);
|
||||||
VCCameraControlModeInterlock = new JoinedSigInterlock(triList);
|
VCCameraControlModeInterlock = new JoinedSigInterlock(triList);
|
||||||
|
|
||||||
|
VCControlsInterlock.HideAndClear();
|
||||||
|
|
||||||
if (CodecHasFavorites)
|
/* if (CodecHasFavorites || codec is IHasZoomRoomLayouts) //Checking for Zoom Room...picked a ZoomRoom specific interface to check for
|
||||||
VCControlsInterlock.SetButDontShow(UIBoolJoin.VCKeypadWithFavoritesVisible);
|
VCControlsInterlock.SetButDontShow(UIBoolJoin.VCKeypadWithFavoritesVisible);
|
||||||
else
|
else
|
||||||
VCControlsInterlock.SetButDontShow(UIBoolJoin.VCKeypadVisible);
|
VCControlsInterlock.SetButDontShow(UIBoolJoin.VCKeypadVisible); */
|
||||||
|
|
||||||
StagingBarsInterlock = new JoinedSigInterlock(triList);
|
StagingBarsInterlock = new JoinedSigInterlock(triList);
|
||||||
if(Codec is IHasCallHistory)
|
if(Codec is IHasCallHistory)
|
||||||
@@ -152,6 +153,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
// Return formatted when dialing, straight digits when in call
|
// Return formatted when dialing, straight digits when in call
|
||||||
DialStringFeedback = new StringFeedback(() =>
|
DialStringFeedback = new StringFeedback(() =>
|
||||||
{
|
{
|
||||||
|
// Format the number feedback if in dial mode and the codec is not IHasStartMeeting (ZoomRoom)
|
||||||
if (KeypadMode == eKeypadMode.Dial && !(Codec is IHasStartMeeting))
|
if (KeypadMode == eKeypadMode.Dial && !(Codec is IHasStartMeeting))
|
||||||
return GetFormattedDialString(DialStringBuilder.ToString());
|
return GetFormattedDialString(DialStringBuilder.ToString());
|
||||||
else
|
else
|
||||||
@@ -319,25 +321,20 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
void Codec_CallStatusChange(object sender, CodecCallStatusItemChangeEventArgs e)
|
void Codec_CallStatusChange(object sender, CodecCallStatusItemChangeEventArgs e)
|
||||||
{
|
{
|
||||||
var call = e.CallItem;
|
var call = e.CallItem;
|
||||||
|
var meetingInfoSender = sender as IHasMeetingInfo;
|
||||||
|
|
||||||
switch (e.CallItem.Status)
|
switch (e.CallItem.Status)
|
||||||
{
|
{
|
||||||
case eCodecCallStatus.Connected:
|
case eCodecCallStatus.Connected:
|
||||||
// fire at SRL item
|
// fire at SRL item
|
||||||
HidePasswordPrompt();
|
|
||||||
KeypadMode = eKeypadMode.DTMF;
|
|
||||||
DialStringBuilder.Remove(0, DialStringBuilder.Length);
|
|
||||||
DialStringFeedback.FireUpdate();
|
|
||||||
DialStringTextCheckEnables();
|
|
||||||
Parent.ShowNotificationRibbon("Connected", 2000);
|
Parent.ShowNotificationRibbon("Connected", 2000);
|
||||||
StagingButtonsFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingKeypadPress);
|
OnCallConnected();
|
||||||
ShowKeypad();
|
|
||||||
((Parent.CurrentRoom as IHasCurrentVolumeControls).CurrentVolumeControls as IBasicVolumeWithFeedback).MuteOff();
|
|
||||||
//VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCKeypadVisible);
|
//VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCKeypadVisible);
|
||||||
break;
|
break;
|
||||||
case eCodecCallStatus.Connecting:
|
case eCodecCallStatus.Connecting:
|
||||||
// fire at SRL item
|
// fire at SRL item
|
||||||
Parent.ShowNotificationRibbon("Connecting", 0);
|
Parent.ShowNotificationRibbon("Connecting", 0);
|
||||||
|
OnCallConnected();
|
||||||
break;
|
break;
|
||||||
case eCodecCallStatus.Dialing:
|
case eCodecCallStatus.Dialing:
|
||||||
Parent.ShowNotificationRibbon("Connecting", 0);
|
Parent.ShowNotificationRibbon("Connecting", 0);
|
||||||
@@ -353,7 +350,10 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
DialStringBuilder.Remove(0, DialStringBuilder.Length);
|
DialStringBuilder.Remove(0, DialStringBuilder.Length);
|
||||||
DialStringFeedback.FireUpdate();
|
DialStringFeedback.FireUpdate();
|
||||||
Parent.ShowNotificationRibbon("Disconnected", 2000);
|
Parent.ShowNotificationRibbon("Disconnected", 2000);
|
||||||
|
Debug.Console(0, "Setting Connect Button mode to 0");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case eCodecCallStatus.Disconnecting:
|
case eCodecCallStatus.Disconnecting:
|
||||||
break;
|
break;
|
||||||
@@ -374,12 +374,23 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
ShowIncomingModal(call);
|
ShowIncomingModal(call);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
TriList.UShortInput[UIUshortJoin.VCStagingConnectButtonMode].UShortValue = (ushort)(Codec.IsInCall ? 1 : 0);
|
|
||||||
|
if (meetingInfoSender != null && Codec.IsInCall)
|
||||||
uint stageJoin;
|
{
|
||||||
|
var meetingInfo = meetingInfoSender.MeetingInfo;
|
||||||
|
|
||||||
|
TriList.UShortInput[UIUshortJoin.VCStagingConnectButtonMode].UShortValue =
|
||||||
|
(ushort) (meetingInfo.IsSharingMeeting ? 2 : 1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
TriList.UShortInput[UIUshortJoin.VCStagingConnectButtonMode].UShortValue =
|
||||||
|
(ushort) (Codec.IsInCall ? 1 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint stageJoin;
|
||||||
if (Codec.IsInCall)
|
if (Codec.IsInCall)
|
||||||
stageJoin = UIBoolJoin.VCStagingActivePopoverVisible;
|
stageJoin = UIBoolJoin.VCStagingActivePopoverVisible;
|
||||||
else
|
else
|
||||||
@@ -400,6 +411,36 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
UpdateHeaderActiveCallList();
|
UpdateHeaderActiveCallList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnCallConnected()
|
||||||
|
{
|
||||||
|
HidePasswordPrompt();
|
||||||
|
KeypadMode = eKeypadMode.DTMF;
|
||||||
|
DialStringBuilder.Remove(0, DialStringBuilder.Length);
|
||||||
|
DialStringFeedback.FireUpdate();
|
||||||
|
DialStringTextCheckEnables();
|
||||||
|
|
||||||
|
StagingButtonsFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingKeypadPress);
|
||||||
|
ShowKeypad();
|
||||||
|
|
||||||
|
UnmuteRoomOnCallConnect();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UnmuteRoomOnCallConnect()
|
||||||
|
{
|
||||||
|
var volControl = Parent.CurrentRoom as IHasCurrentVolumeControls;
|
||||||
|
|
||||||
|
if (volControl == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var currentVolControls = volControl.CurrentVolumeControls as IBasicVolumeWithFeedback;
|
||||||
|
|
||||||
|
if (currentVolControls != null)
|
||||||
|
{
|
||||||
|
currentVolControls.MuteOff();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Redraws the calls list on the header
|
/// Redraws the calls list on the header
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -518,14 +559,35 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
TriList.SetSigFalseAction(UIBoolJoin.VCStagingMeetNowPress, MeetNowPress);
|
TriList.SetSigFalseAction(UIBoolJoin.VCStagingMeetNowPress, MeetNowPress);
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.CallStopSharingPress, CallStopSharingPress);
|
TriList.SetSigFalseAction(UIBoolJoin.CallStopSharingPress, CallStopSharingPress);
|
||||||
|
|
||||||
|
var meetingInfoCodec = Codec as IHasMeetingInfo;
|
||||||
|
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.CallEndPress, () =>
|
TriList.SetSigFalseAction(UIBoolJoin.CallEndPress, () =>
|
||||||
{
|
{
|
||||||
if (Codec.ActiveCalls.Count > 1)
|
if (Codec.ActiveCalls.Count > 1)
|
||||||
{
|
{
|
||||||
Parent.PopupInterlock.ShowInterlocked(Parent.CallListOrMeetingInfoPopoverVisibilityJoin);
|
Parent.PopupInterlock.ShowInterlocked(Parent.CallListOrMeetingInfoPopoverVisibilityJoin);
|
||||||
}
|
}
|
||||||
|
else if (meetingInfoCodec != null && Codec.ActiveCalls.Count == 1)
|
||||||
|
{
|
||||||
|
var meetingInfo = meetingInfoCodec.MeetingInfo;
|
||||||
|
|
||||||
|
if (meetingInfo != null && meetingInfo.IsSharingMeeting)
|
||||||
|
{
|
||||||
|
var presentationMeetingCodec = Codec as IHasPresentationOnlyMeeting;
|
||||||
|
if (presentationMeetingCodec != null)
|
||||||
|
{
|
||||||
|
presentationMeetingCodec.StartNormalMeetingFromSharingOnlyMeeting();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Codec.EndAllCalls();
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
Codec.EndAllCalls();
|
Codec.EndAllCalls();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.CallEndAllConfirmPress, () =>
|
TriList.SetSigFalseAction(UIBoolJoin.CallEndAllConfirmPress, () =>
|
||||||
@@ -533,6 +595,28 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
Parent.PopupInterlock.HideAndClear();
|
Parent.PopupInterlock.HideAndClear();
|
||||||
Codec.EndAllCalls();
|
Codec.EndAllCalls();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
if (meetingInfoCodec != null)
|
||||||
|
{
|
||||||
|
TriList.SetSigFalseAction(UIBoolJoin.MeetingLeavePress, () =>
|
||||||
|
{
|
||||||
|
Parent.PopupInterlock.HideAndClear();
|
||||||
|
|
||||||
|
if (meetingInfoCodec.MeetingInfo.IsHost)
|
||||||
|
{
|
||||||
|
Codec.EndAllCalls();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var startMeetingCodec = Codec as IHasStartMeeting;
|
||||||
|
if (startMeetingCodec != null)
|
||||||
|
{
|
||||||
|
startMeetingCodec.LeaveMeeting();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetupCameraControls()
|
void SetupCameraControls()
|
||||||
@@ -1778,7 +1862,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void PasswordKeypadClear()
|
void PasswordKeypadClear()
|
||||||
{
|
{
|
||||||
PasswordStringBuilder.Remove(0, SearchStringBuilder.Length);
|
PasswordStringBuilder.Remove(0, PasswordStringBuilder.Length);
|
||||||
PasswordStringFeedback.FireUpdate();
|
PasswordStringFeedback.FireUpdate();
|
||||||
PasswordStringCheckEnables();
|
PasswordStringCheckEnables();
|
||||||
|
|
||||||
@@ -1906,6 +1990,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
_passwordPromptDialogVisible = false;
|
_passwordPromptDialogVisible = false;
|
||||||
Parent.Keyboard.Hide();
|
Parent.Keyboard.Hide();
|
||||||
TriList.SetBool(UIBoolJoin.PasswordPromptDialogVisible, _passwordPromptDialogVisible);
|
TriList.SetBool(UIBoolJoin.PasswordPromptDialogVisible, _passwordPromptDialogVisible);
|
||||||
|
PasswordKeypadClear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,13 +19,34 @@ namespace PepperDash.Essentials.Core
|
|||||||
protected EssentialsDevice(string key)
|
protected EssentialsDevice(string key)
|
||||||
: base(key)
|
: base(key)
|
||||||
{
|
{
|
||||||
|
SubscribeToActivateComplete();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected EssentialsDevice(string key, string name)
|
protected EssentialsDevice(string key, string name)
|
||||||
: base(key, 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
|
else
|
||||||
Debug.Console(0, this, "Unable to add Red LED device");
|
Debug.Console(0, this, "Unable to add Red LED device");
|
||||||
|
|
||||||
DeviceManager.AllDevicesActivated += (o, a) =>
|
|
||||||
{
|
|
||||||
CheckPrivacyMode();
|
|
||||||
};
|
|
||||||
|
|
||||||
AddPostActivationAction(() => {
|
AddPostActivationAction(() => {
|
||||||
PrivacyDevice.PrivacyModeIsOnFeedback.OutputChange -= PrivacyModeIsOnFeedback_OutputChange;
|
PrivacyDevice.PrivacyModeIsOnFeedback.OutputChange -= PrivacyModeIsOnFeedback_OutputChange;
|
||||||
PrivacyDevice.PrivacyModeIsOnFeedback.OutputChange += PrivacyModeIsOnFeedback_OutputChange;
|
PrivacyDevice.PrivacyModeIsOnFeedback.OutputChange += PrivacyModeIsOnFeedback_OutputChange;
|
||||||
@@ -103,6 +98,15 @@ namespace PepperDash.Essentials.Core.Privacy
|
|||||||
return base.CustomActivate();
|
return base.CustomActivate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region Overrides of Device
|
||||||
|
|
||||||
|
public override void Initialize()
|
||||||
|
{
|
||||||
|
CheckPrivacyMode();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
public void SetPrivacyDevice(IPrivacy privacyDevice)
|
public void SetPrivacyDevice(IPrivacy privacyDevice)
|
||||||
{
|
{
|
||||||
PrivacyDevice = privacyDevice;
|
PrivacyDevice = privacyDevice;
|
||||||
|
|||||||
@@ -126,6 +126,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
public void SetEnableState(bool state)
|
public void SetEnableState(bool state)
|
||||||
{
|
{
|
||||||
|
Debug.Console(2, this, "Sensor is {0}, SetEnableState: {1}", _partitionSensor == null ? "null" : "not null", state);
|
||||||
if (_partitionSensor == null)
|
if (_partitionSensor == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -134,6 +135,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
public void IncreaseSensitivity()
|
public void IncreaseSensitivity()
|
||||||
{
|
{
|
||||||
|
Debug.Console(2, this, "Sensor is {0}, IncreaseSensitivity", _partitionSensor == null ? "null" : "not null");
|
||||||
if (_partitionSensor == null)
|
if (_partitionSensor == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -142,6 +144,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
public void DecreaseSensitivity()
|
public void DecreaseSensitivity()
|
||||||
{
|
{
|
||||||
|
Debug.Console(2, this, "Sensor is {0}, DecreaseSensitivity", _partitionSensor == null ? "null" : "not null");
|
||||||
if (_partitionSensor == null)
|
if (_partitionSensor == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -150,6 +153,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
public void SetSensitivity(ushort value)
|
public void SetSensitivity(ushort value)
|
||||||
{
|
{
|
||||||
|
Debug.Console(2, this, "Sensor is {0}, SetSensitivity: {1}", _partitionSensor == null ? "null" : "not null", value);
|
||||||
if (_partitionSensor == null)
|
if (_partitionSensor == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -177,8 +181,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
Debug.Console(0, this, "Linking to Bridge Type {0}", GetType().Name);
|
Debug.Console(0, this, "Linking to Bridge Type {0}", GetType().Name);
|
||||||
|
|
||||||
// link input from simpl
|
// link input from simpl
|
||||||
trilist.SetSigTrueAction(joinMap.Enable.JoinNumber, () => SetEnableState(true));
|
trilist.SetBoolSigAction(joinMap.Enable.JoinNumber, SetEnableState);
|
||||||
trilist.SetSigFalseAction(joinMap.Enable.JoinNumber, () => SetEnableState(false));
|
|
||||||
trilist.SetSigTrueAction(joinMap.IncreaseSensitivity.JoinNumber, IncreaseSensitivity);
|
trilist.SetSigTrueAction(joinMap.IncreaseSensitivity.JoinNumber, IncreaseSensitivity);
|
||||||
trilist.SetSigTrueAction(joinMap.DecreaseSensitivity.JoinNumber, DecreaseSensitivity);
|
trilist.SetSigTrueAction(joinMap.DecreaseSensitivity.JoinNumber, DecreaseSensitivity);
|
||||||
trilist.SetUShortSigAction(joinMap.Sensitivity.JoinNumber, SetSensitivity);
|
trilist.SetUShortSigAction(joinMap.Sensitivity.JoinNumber, SetSensitivity);
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<tags>crestron 3series 4series</tags>
|
<tags>crestron 3series 4series</tags>
|
||||||
<repository type="git" url="https://github.com/PepperDash/Essentials"/>
|
<repository type="git" url="https://github.com/PepperDash/Essentials"/>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency id="PepperDashCore" version="[1.0.45, 1.1.0)"/>
|
<dependency id="PepperDashCore" version="[1.0.45, 2.0.0)"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</metadata>
|
</metadata>
|
||||||
<files>
|
<files>
|
||||||
|
|||||||
@@ -304,7 +304,7 @@ namespace PepperDash.Essentials.DM {
|
|||||||
{
|
{
|
||||||
var newEvent = NumericSwitchChange;
|
var newEvent = NumericSwitchChange;
|
||||||
if (newEvent != null) newEvent(this, e);
|
if (newEvent != null) newEvent(this, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AddHdmiInBladePorts(uint number, ICec cecPort) {
|
void AddHdmiInBladePorts(uint number, ICec cecPort) {
|
||||||
@@ -425,7 +425,7 @@ namespace PepperDash.Essentials.DM {
|
|||||||
Debug.Console(2, this, "Adding output port '{0}'", portKey);
|
Debug.Console(2, this, "Adding output port '{0}'", portKey);
|
||||||
OutputPorts.Add(new RoutingOutputPort(portKey, sigType, portType, selector, this)
|
OutputPorts.Add(new RoutingOutputPort(portKey, sigType, portType, selector, this)
|
||||||
{
|
{
|
||||||
FeedbackMatchObject = Chassis.Outputs[(uint)selector]
|
FeedbackMatchObject = selector
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ using Crestron.SimplSharpPro.DeviceSupport;
|
|||||||
using Crestron.SimplSharpPro.DM;
|
using Crestron.SimplSharpPro.DM;
|
||||||
using Crestron.SimplSharpPro.DM.Cards;
|
using Crestron.SimplSharpPro.DM.Cards;
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
using Crestron.SimplSharpPro.DM.Endpoints;
|
||||||
|
using Crestron.SimplSharpProInternal;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.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>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -497,166 +516,189 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
case "dmchd":
|
case "dmchd":
|
||||||
{
|
{
|
||||||
var inputCard = new DmcHd(number, this.Chassis);
|
var inputCard = new DmcHd(number, Chassis);
|
||||||
var cecPort = inputCard.HdmiInput as ICec;
|
AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput);
|
||||||
AddHdmiInCardPorts(number, cecPort);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "dmchddsp":
|
case "dmchddsp":
|
||||||
{
|
{
|
||||||
var inputCard = new DmcHdDsp(number, this.Chassis);
|
var inputCard = new DmcHdDsp(number, Chassis);
|
||||||
var cecPort = inputCard.HdmiInput as ICec;
|
AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput);
|
||||||
AddHdmiInCardPorts(number, cecPort);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "dmc4khd":
|
case "dmc4khd":
|
||||||
{
|
{
|
||||||
var inputCard = new Dmc4kHd(number, this.Chassis);
|
var inputCard = new Dmc4kHd(number, Chassis);
|
||||||
var cecPort = inputCard.HdmiInput as ICec;
|
AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput);
|
||||||
AddHdmiInCardPorts(number, cecPort);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "dmc4khddsp":
|
case "dmc4khddsp":
|
||||||
{
|
{
|
||||||
var inputCard = new Dmc4kHdDsp(number, this.Chassis);
|
var inputCard = new Dmc4kHdDsp(number, Chassis);
|
||||||
var cecPort = inputCard.HdmiInput as ICec;
|
AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput);
|
||||||
AddHdmiInCardPorts(number, cecPort);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "dmc4kzhd":
|
case "dmc4kzhd":
|
||||||
{
|
{
|
||||||
var inputCard = new Dmc4kzHd(number, this.Chassis);
|
var inputCard = new Dmc4kzHd(number, Chassis);
|
||||||
var cecPort = inputCard.HdmiInput as ICec;
|
AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput);
|
||||||
AddHdmiInCardPorts(number, cecPort);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case "dmc4kzhddsp":
|
case "dmc4kzhddsp":
|
||||||
{
|
{
|
||||||
var inputCard = new Dmc4kzHdDsp(number, this.Chassis);
|
var inputCard = new Dmc4kzHdDsp(number, Chassis);
|
||||||
var cecPort = inputCard.HdmiInput as ICec;
|
AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput);
|
||||||
AddHdmiInCardPorts(number, cecPort);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case "dmcc":
|
case "dmcc":
|
||||||
{
|
{
|
||||||
var inputCard = new DmcC(number, this.Chassis);
|
var inputCard = new DmcC(number, Chassis);
|
||||||
var cecPort = inputCard.DmInput as ICec;
|
//DmInput doesn't implement ICec...cast was resulting in null anyway
|
||||||
AddDmInCardPorts(number, cecPort);
|
AddDmInCardPorts(number, null, inputCard.DmInput);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "dmccdsp":
|
case "dmccdsp":
|
||||||
{
|
{
|
||||||
var inputCard = new DmcCDsp(number, this.Chassis);
|
var inputCard = new DmcCDsp(number, Chassis);
|
||||||
var cecPort = inputCard.DmInput as ICec;
|
//DmInput doesn't implement ICec...cast was resulting in null anyway
|
||||||
AddDmInCardPorts(number, cecPort);
|
AddDmInCardPorts(number, null, inputCard.DmInput);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case "dmc4kc":
|
case "dmc4kc":
|
||||||
{
|
{
|
||||||
var inputCard = new Dmc4kC(number, this.Chassis);
|
var inputCard = new Dmc4kC(number, Chassis);
|
||||||
var cecPort = inputCard.DmInput as ICec;
|
AddDmInCardPorts(number, inputCard.DmInput,inputCard.DmInput);
|
||||||
AddDmInCardPorts(number, cecPort);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case "dmc4kcdsp":
|
case "dmc4kcdsp":
|
||||||
{
|
{
|
||||||
var inputCard = new Dmc4kCDsp(number, this.Chassis);
|
var inputCard = new Dmc4kCDsp(number, Chassis);
|
||||||
var cecPort = inputCard.DmInput as ICec;
|
AddDmInCardPorts(number, inputCard.DmInput,inputCard.DmInput);
|
||||||
AddDmInCardPorts(number, cecPort);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case "dmc4kzc":
|
case "dmc4kzc":
|
||||||
{
|
{
|
||||||
var inputCard = new Dmc4kzC(number, this.Chassis);
|
var inputCard = new Dmc4kzC(number, Chassis);
|
||||||
var cecPort = inputCard.DmInput as ICec;
|
AddDmInCardPorts(number, inputCard.DmInput,inputCard.DmInput);
|
||||||
AddDmInCardPorts(number, cecPort);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case "dmc4kzcdsp":
|
case "dmc4kzcdsp":
|
||||||
{
|
{
|
||||||
var inputCard = new Dmc4kzCDsp(number, this.Chassis);
|
var inputCard = new Dmc4kzCDsp(number, Chassis);
|
||||||
var cecPort = inputCard.DmInput as ICec;
|
AddDmInCardPorts(number, inputCard.DmInput, inputCard.DmInput);
|
||||||
AddDmInCardPorts(number, cecPort);
|
break;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
case "dmccat":
|
case "dmccat":
|
||||||
new DmcCat(number, this.Chassis);
|
{
|
||||||
AddDmInCardPorts(number);
|
var inputCard = new DmcCat(number, Chassis);
|
||||||
|
AddDmInCardPorts(number, null, inputCard.DmInput);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case "dmccatdsp":
|
case "dmccatdsp":
|
||||||
new DmcCatDsp(number, this.Chassis);
|
{
|
||||||
AddDmInCardPorts(number);
|
var inputCard = new DmcCatDsp(number, Chassis);
|
||||||
|
AddDmInCardPorts(number, null, inputCard.DmInput);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case "dmcs":
|
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);
|
AddInCardHdmiAndAudioLoopPorts(number);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case "dmcsdsp":
|
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);
|
AddInCardHdmiAndAudioLoopPorts(number);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case "dmcs2":
|
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);
|
AddInCardHdmiAndAudioLoopPorts(number);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case "dmcs2dsp":
|
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);
|
AddInCardHdmiAndAudioLoopPorts(number);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case "dmcsdi":
|
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,
|
AddOutputPortWithDebug(string.Format("inputCard{0}", number), "sdiOut", eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||||
eRoutingPortConnectionType.Sdi, null);
|
eRoutingPortConnectionType.Sdi, null);
|
||||||
AddInCardHdmiAndAudioLoopPorts(number);
|
AddInCardHdmiAndAudioLoopPorts(number);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case "dmcdvi":
|
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);
|
AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
|
||||||
AddInCardHdmiLoopPort(number);
|
AddInCardHdmiLoopPort(number);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case "dmcvga":
|
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);
|
AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
|
||||||
AddInCardHdmiLoopPort(number);
|
AddInCardHdmiLoopPort(number);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case "dmcvidbnc":
|
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);
|
AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
|
||||||
AddInCardHdmiLoopPort(number);
|
AddInCardHdmiLoopPort(number);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case "dmcvidrcaa":
|
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);
|
AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
|
||||||
AddInCardHdmiLoopPort(number);
|
AddInCardHdmiLoopPort(number);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case "dmcvidrcad":
|
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);
|
AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.DigitalAudio);
|
||||||
AddInCardHdmiLoopPort(number);
|
AddInCardHdmiLoopPort(number);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case "dmcvid4":
|
case "dmcvid4":
|
||||||
new DmcVid4(number, Chassis);
|
{
|
||||||
|
var inputCard = new DmcVid4(number, Chassis);
|
||||||
AddInputPortWithDebug(number, "compositeIn1", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
|
AddInputPortWithDebug(number, "compositeIn1", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
|
||||||
AddInputPortWithDebug(number, "compositeIn2", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
|
AddInputPortWithDebug(number, "compositeIn2", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
|
||||||
AddInputPortWithDebug(number, "compositeIn3", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
|
AddInputPortWithDebug(number, "compositeIn3", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
|
||||||
AddInputPortWithDebug(number, "compositeIn4", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
|
AddInputPortWithDebug(number, "compositeIn4", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
|
||||||
AddInCardHdmiLoopPort(number);
|
AddInCardHdmiLoopPort(number);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case "dmcstr":
|
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);
|
AddInCardHdmiAndAudioLoopPorts(number);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -672,12 +714,24 @@ namespace PepperDash.Essentials.DM
|
|||||||
AddInCardHdmiAndAudioLoopPorts(number);
|
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)
|
void AddHdmiInCardPorts(uint number, ICec cecPort)
|
||||||
{
|
{
|
||||||
AddInputPortWithDebug(number, "hdmiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, cecPort);
|
AddInputPortWithDebug(number, "hdmiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, cecPort);
|
||||||
AddInCardHdmiAndAudioLoopPorts(number);
|
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)
|
void AddInCardHdmiAndAudioLoopPorts(uint number)
|
||||||
{
|
{
|
||||||
AddOutputPortWithDebug(string.Format("inputCard{0}", number), "hdmiLoopOut", eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
AddOutputPortWithDebug(string.Format("inputCard{0}", number), "hdmiLoopOut", eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||||
@@ -816,20 +870,55 @@ namespace PepperDash.Essentials.DM
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType)
|
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>
|
/// <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>
|
/// </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);
|
var portKey = string.Format("inputCard{0}--{1}", cardNum, portName);
|
||||||
Debug.Console(2, this, "Adding input port '{0}'", portKey);
|
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)
|
if (cecPort != null)
|
||||||
inputPort.Port = cecPort;
|
inputPort.Port = cecPort;
|
||||||
@@ -989,6 +1078,23 @@ namespace PepperDash.Essentials.DM
|
|||||||
Debug.Console(2, this, "No index of {0} found in InputStreamCardStateFeedbacks");
|
Debug.Console(2, this, "No index of {0} found in InputStreamCardStateFeedbacks");
|
||||||
break;
|
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:
|
default:
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "DMInputChange fired for Input {0} with Unhandled EventId: {1}", args.Number, args.EventId);
|
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.
|
var inputNumber = Chassis.Outputs[output].VideoOutFeedback == null ? 0 : Chassis.
|
||||||
Outputs[output].VideoOutFeedback.Number;
|
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))
|
if (VideoOutputFeedbacks.ContainsKey(output))
|
||||||
{
|
{
|
||||||
@@ -1077,7 +1183,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
var inputNumber = Chassis.Outputs[output].AudioOutFeedback == null ? 0 : Chassis.
|
var inputNumber = Chassis.Outputs[output].AudioOutFeedback == null ? 0 : Chassis.
|
||||||
Outputs[output].AudioOutFeedback.Number;
|
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))
|
if (AudioOutputFeedbacks.ContainsKey(output))
|
||||||
{
|
{
|
||||||
@@ -1179,7 +1285,10 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
var output = outputSelector as DMOutput;
|
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,
|
Debug.Console(0, this, Debug.ErrorLogLevel.Warning,
|
||||||
"Unable to execute switch for inputSelector {0} to outputSelector {1}", inputSelector,
|
"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)
|
if ((sigType & eRoutingSignalType.Video) == eRoutingSignalType.Video)
|
||||||
{
|
{
|
||||||
Chassis.VideoEnter.BoolValue = true;
|
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)
|
if ((sigType & eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
|
||||||
@@ -1220,17 +1332,66 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
dmMdMnxn.AudioEnter.BoolValue = true;
|
dmMdMnxn.AudioEnter.BoolValue = true;
|
||||||
}
|
}
|
||||||
output.AudioOut = input;
|
if (output != null)
|
||||||
//Chassis.Outputs[output].AudioOut = inCard;
|
{
|
||||||
|
output.AudioOut = input;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((sigType & eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput || (sigType & eRoutingSignalType.UsbInput) == eRoutingSignalType.UsbInput)
|
if ((sigType & eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput)
|
||||||
|
|
||||||
{
|
{
|
||||||
Chassis.USBEnter.BoolValue = true;
|
Chassis.USBEnter.BoolValue = true;
|
||||||
output.USBRoutedTo = input;
|
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
|
#endregion
|
||||||
|
|
||||||
#region IRoutingNumeric Members
|
#region IRoutingNumeric Members
|
||||||
@@ -1243,8 +1404,10 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
DMInputOutputBase dmCard;
|
DMInputOutputBase dmCard;
|
||||||
|
|
||||||
|
//Routing Input to Input or Output to Input
|
||||||
if ((sigType & eRoutingSignalType.UsbInput) == eRoutingSignalType.UsbInput)
|
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)
|
if (outputSelector > chassisSize)
|
||||||
{
|
{
|
||||||
uint outputIndex;
|
uint outputIndex;
|
||||||
@@ -1264,13 +1427,14 @@ namespace PepperDash.Essentials.DM
|
|||||||
dmCard = Chassis.Inputs[inputSelector];
|
dmCard = Chassis.Inputs[inputSelector];
|
||||||
}
|
}
|
||||||
|
|
||||||
ExecuteSwitch(dmCard, Chassis.Outputs[outputSelector], sigType);
|
ExecuteSwitch(dmCard, Chassis.Inputs[outputSelector], sigType);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((sigType & eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput)
|
if ((sigType & eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput)
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "Executing USB Output switch.\r\n in:{0} output: {1}", inputSelector, outputSelector);
|
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)
|
if (inputSelector > chassisSize)
|
||||||
{
|
{
|
||||||
//wanting to route an output to an output. Subtract chassis size and get output, unless it's 8x8
|
//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;
|
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)
|
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]);
|
InputStreamCardStateFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[join]);
|
||||||
|
|
||||||
trilist.UShortInput[join].UShortValue = InputStreamCardStateFeedbacks[ioSlot].UShortValue;
|
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)
|
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;
|
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,
|
private void LinkAdvancedTxToApi(BasicTriList trilist, DmChassisControllerJoinMap joinMap,
|
||||||
uint ioSlot, uint ioSlotJoin, BasicDmTxControllerBase basicTransmitter)
|
uint ioSlot, uint ioSlotJoin, BasicDmTxControllerBase basicTransmitter)
|
||||||
{
|
{
|
||||||
var transmitter = basicTransmitter as DmTxControllerBase;
|
var transmitter = basicTransmitter as DmTxControllerBase;
|
||||||
if (transmitter == null) return;
|
if (transmitter == null) return;
|
||||||
@@ -1581,7 +1771,9 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
if (txRoutingInputs == null) return;
|
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)
|
if (inputPorts.Count == 0)
|
||||||
{
|
{
|
||||||
@@ -1614,6 +1806,19 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue =
|
trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue =
|
||||||
(ushort) transmitter.HdcpSupportCapability;
|
(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,
|
private void LinkTxOnlineFeedbackToApi(BasicTriList trilist, uint ioSlot, DmChassisControllerJoinMap joinMap,
|
||||||
@@ -1896,15 +2101,15 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
|
|
||||||
var props = JsonConvert.DeserializeObject
|
var props = JsonConvert.DeserializeObject
|
||||||
<PepperDash.Essentials.DM.Config.DMChassisPropertiesConfig>(dc.Properties.ToString());
|
<DMChassisPropertiesConfig>(dc.Properties.ToString());
|
||||||
return PepperDash.Essentials.DM.DmChassisController.
|
return DmChassisController.
|
||||||
GetDmChassisController(dc.Key, dc.Name, type, props);
|
GetDmChassisController(dc.Key, dc.Name, type, props);
|
||||||
}
|
}
|
||||||
else if (type.StartsWith("dmmd128x") || type.StartsWith("dmmd64x"))
|
else if (type.StartsWith("dmmd128x") || type.StartsWith("dmmd64x"))
|
||||||
{
|
{
|
||||||
var props = JsonConvert.DeserializeObject
|
var props = JsonConvert.DeserializeObject
|
||||||
<PepperDash.Essentials.DM.Config.DMChassisPropertiesConfig>(dc.Properties.ToString());
|
<DMChassisPropertiesConfig>(dc.Properties.ToString());
|
||||||
return PepperDash.Essentials.DM.DmBladeChassisController.
|
return DmBladeChassisController.
|
||||||
GetDmChassisController(dc.Key, dc.Name, type, props);
|
GetDmChassisController(dc.Key, dc.Name, type, props);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
@@ -15,421 +16,489 @@ using PepperDash.Essentials.Core.Config;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials.DM.Chassis
|
namespace PepperDash.Essentials.DM.Chassis
|
||||||
{
|
{
|
||||||
[Description("Wrapper class for all HdMdNxM4E switchers")]
|
[Description("Wrapper class for all HdMdNxM4E switchers")]
|
||||||
public class HdMdNxM4kEBridgeableController : CrestronGenericBridgeableBaseDevice, IRoutingNumericWithFeedback, IHasFeedback
|
public class HdMdNxM4kEBridgeableController : CrestronGenericBridgeableBaseDevice, IRoutingNumericWithFeedback, IHasFeedback
|
||||||
{
|
{
|
||||||
private HdMdNxM _Chassis;
|
private HdMdNxM _Chassis;
|
||||||
private HdMd4x14kE _Chassis4x1;
|
private HdMd4x14kE _Chassis4x1;
|
||||||
|
|
||||||
//IroutingNumericEvent
|
//IroutingNumericEvent
|
||||||
public event EventHandler<RoutingNumericEventArgs> NumericSwitchChange;
|
public event EventHandler<RoutingNumericEventArgs> NumericSwitchChange;
|
||||||
|
|
||||||
public Dictionary<uint, string> InputNames { get; set; }
|
public Dictionary<uint, string> InputNames { get; set; }
|
||||||
public Dictionary<uint, string> OutputNames { get; set; }
|
public Dictionary<uint, string> OutputNames { get; set; }
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
||||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||||
|
|
||||||
public FeedbackCollection<BoolFeedback> VideoInputSyncFeedbacks { get; private set; }
|
public FeedbackCollection<BoolFeedback> VideoInputSyncFeedbacks { get; private set; }
|
||||||
public FeedbackCollection<IntFeedback> VideoOutputRouteFeedbacks { get; private set; }
|
public FeedbackCollection<IntFeedback> VideoOutputRouteFeedbacks { get; private set; }
|
||||||
public FeedbackCollection<StringFeedback> InputNameFeedbacks { get; private set; }
|
public FeedbackCollection<StringFeedback> InputNameFeedbacks { get; private set; }
|
||||||
public FeedbackCollection<StringFeedback> OutputNameFeedbacks { get; private set; }
|
public FeedbackCollection<StringFeedback> OutputNameFeedbacks { get; private set; }
|
||||||
public FeedbackCollection<StringFeedback> OutputRouteNameFeedbacks { get; private set; }
|
public FeedbackCollection<StringFeedback> OutputRouteNameFeedbacks { get; private set; }
|
||||||
public FeedbackCollection<BoolFeedback> InputHdcpEnableFeedback { get; private set; }
|
public FeedbackCollection<BoolFeedback> InputHdcpEnableFeedback { get; private set; }
|
||||||
public FeedbackCollection<StringFeedback> DeviceNameFeedback { get; private set; }
|
public StringFeedback DeviceNameFeedback { get; private set; }
|
||||||
public FeedbackCollection<BoolFeedback> AutoRouteFeedback { get; private set; }
|
public BoolFeedback AutoRouteFeedback { get; private set; }
|
||||||
|
|
||||||
#region Constructor
|
#region Constructor
|
||||||
|
|
||||||
public HdMdNxM4kEBridgeableController(string key, string name, HdMdNxM chassis,
|
public HdMdNxM4kEBridgeableController(string key, string name, HdMdNxM chassis,
|
||||||
HdMdNxM4kEBridgeablePropertiesConfig props)
|
HdMdNxM4kEBridgeablePropertiesConfig props)
|
||||||
: base(key, name, chassis)
|
: base(key, name, chassis)
|
||||||
{
|
{
|
||||||
_Chassis = chassis;
|
_Chassis = chassis;
|
||||||
var _props = props;
|
Name = name;
|
||||||
|
|
||||||
InputNames = props.Inputs;
|
if (props == null)
|
||||||
OutputNames = props.Outputs;
|
{
|
||||||
|
Debug.Console(1, this, "HdMdNx4keBridgeableController properties are null, failed to build the device");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
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>();
|
if (props.Inputs != null)
|
||||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort>();
|
{
|
||||||
|
foreach (var kvp in props.Inputs)
|
||||||
|
{
|
||||||
|
Debug.Console(1, this, "props.Inputs: {0}-{1}", kvp.Key, kvp.Value);
|
||||||
|
}
|
||||||
|
InputNames = props.Inputs;
|
||||||
|
}
|
||||||
|
if (props.Outputs != null)
|
||||||
|
{
|
||||||
|
foreach (var kvp in props.Outputs)
|
||||||
|
{
|
||||||
|
Debug.Console(1, this, "props.Outputs: {0}-{1}", kvp.Key, kvp.Value);
|
||||||
|
}
|
||||||
|
OutputNames = props.Outputs;
|
||||||
|
}
|
||||||
|
|
||||||
DeviceNameFeedback.Add(new StringFeedback(this.Name, () => this.Name));
|
DeviceNameFeedback = new StringFeedback(()=>Name);
|
||||||
|
|
||||||
if (_Chassis.NumberOfInputs == 1)
|
VideoInputSyncFeedbacks = new FeedbackCollection<BoolFeedback>();
|
||||||
{
|
VideoOutputRouteFeedbacks = new FeedbackCollection<IntFeedback>();
|
||||||
_Chassis4x1 = _Chassis as HdMd4x14kE;
|
InputNameFeedbacks = new FeedbackCollection<StringFeedback>();
|
||||||
AutoRouteFeedback.Add(new BoolFeedback(this.Name + "-" + InputNames[1], () => _Chassis4x1.AutoModeOnFeedback.BoolValue));
|
OutputNameFeedbacks = new FeedbackCollection<StringFeedback>();
|
||||||
}
|
OutputRouteNameFeedbacks = new FeedbackCollection<StringFeedback>();
|
||||||
|
InputHdcpEnableFeedback = new FeedbackCollection<BoolFeedback>();
|
||||||
|
|
||||||
|
InputPorts = new RoutingPortCollection<RoutingInputPort>();
|
||||||
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort>();
|
||||||
|
|
||||||
for (uint i = 1; i <= _Chassis.NumberOfInputs; i++)
|
if (_Chassis.NumberOfInputs == 1)
|
||||||
{
|
{
|
||||||
var index = i;
|
_Chassis4x1 = _Chassis as HdMd4x14kE;
|
||||||
var inputName = InputNames[index];
|
AutoRouteFeedback = new BoolFeedback(() => _Chassis4x1.AutoModeOnFeedback.BoolValue);
|
||||||
_Chassis.Inputs[index].Name.StringValue = inputName;
|
}
|
||||||
|
|
||||||
InputPorts.Add(new RoutingInputPort(inputName, eRoutingSignalType.AudioVideo,
|
for (uint i = 1; i <= _Chassis.NumberOfInputs; i++)
|
||||||
eRoutingPortConnectionType.Hdmi, index, this)
|
{
|
||||||
{
|
var index = i;
|
||||||
FeedbackMatchObject = _Chassis.HdmiInputs[index]
|
var inputName = InputNames[index];
|
||||||
});
|
//_Chassis.Inputs[index].Name.StringValue = inputName;
|
||||||
VideoInputSyncFeedbacks.Add(new BoolFeedback(inputName, () => _Chassis.Inputs[index].VideoDetectedFeedback.BoolValue));
|
_Chassis.HdmiInputs[index].Name.StringValue = inputName;
|
||||||
InputNameFeedbacks.Add(new StringFeedback(inputName, () => _Chassis.Inputs[index].Name.StringValue));
|
|
||||||
InputHdcpEnableFeedback.Add(new BoolFeedback(inputName, () => _Chassis.HdmiInputs[index].HdmiInputPort.HdcpSupportOnFeedback.BoolValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
for (uint i = 1; i <= _Chassis.NumberOfOutputs; i++)
|
InputPorts.Add(new RoutingInputPort(inputName, eRoutingSignalType.AudioVideo,
|
||||||
{
|
eRoutingPortConnectionType.Hdmi, _Chassis.HdmiInputs[index], this)
|
||||||
var index = i;
|
{
|
||||||
var outputName = OutputNames[index];
|
FeedbackMatchObject = _Chassis.HdmiInputs[index]
|
||||||
_Chassis.Outputs[i].Name.StringValue = outputName;
|
});
|
||||||
|
VideoInputSyncFeedbacks.Add(new BoolFeedback(inputName, () => _Chassis.Inputs[index].VideoDetectedFeedback.BoolValue));
|
||||||
|
//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));
|
||||||
|
}
|
||||||
|
|
||||||
OutputPorts.Add(new RoutingOutputPort(outputName, eRoutingSignalType.AudioVideo,
|
for (uint i = 1; i <= _Chassis.NumberOfOutputs; i++)
|
||||||
eRoutingPortConnectionType.Hdmi, index, this)
|
{
|
||||||
{
|
var index = i;
|
||||||
FeedbackMatchObject = _Chassis.HdmiOutputs[index]
|
var outputName = OutputNames[index];
|
||||||
});
|
//_Chassis.Outputs[index].Name.StringValue = outputName;
|
||||||
VideoOutputRouteFeedbacks.Add(new IntFeedback(outputName, () => (int)_Chassis.Outputs[index].VideoOutFeedback.Number));
|
//_Chassis.HdmiOutputs[index].Name.StringValue = outputName;
|
||||||
OutputNameFeedbacks.Add(new StringFeedback(outputName, () => _Chassis.Outputs[index].Name.StringValue));
|
|
||||||
OutputRouteNameFeedbacks.Add(new StringFeedback(outputName, () => _Chassis.Outputs[index].VideoOutFeedback.NameFeedback.StringValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
_Chassis.DMInputChange += new DMInputEventHandler(Chassis_DMInputChange);
|
OutputPorts.Add(new RoutingOutputPort(outputName, eRoutingSignalType.AudioVideo,
|
||||||
_Chassis.DMOutputChange += new DMOutputEventHandler(Chassis_DMOutputChange);
|
eRoutingPortConnectionType.Hdmi, _Chassis.HdmiOutputs[index], this)
|
||||||
|
{
|
||||||
|
FeedbackMatchObject = _Chassis.HdmiOutputs[index]
|
||||||
|
});
|
||||||
|
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));
|
||||||
|
}
|
||||||
|
|
||||||
AddPostActivationAction(AddFeedbackCollections);
|
_Chassis.DMInputChange += Chassis_DMInputChange;
|
||||||
}
|
_Chassis.DMOutputChange += Chassis_DMOutputChange;
|
||||||
|
|
||||||
#endregion
|
AddPostActivationAction(AddFeedbackCollections);
|
||||||
|
}
|
||||||
|
|
||||||
#region Methods
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
#region Methods
|
||||||
/// Raise an event when the status of a switch object changes.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="e">Arguments defined as IKeyName sender, output, input, and eRoutingSignalType</param>
|
|
||||||
private void OnSwitchChange(RoutingNumericEventArgs e)
|
|
||||||
{
|
|
||||||
var newEvent = NumericSwitchChange;
|
|
||||||
if (newEvent != null) newEvent(this, e);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void EnableHdcp(uint port)
|
/// <summary>
|
||||||
{
|
/// Raise an event when the status of a switch object changes.
|
||||||
if (port > _Chassis.NumberOfInputs) return;
|
/// </summary>
|
||||||
if (port <= 0) return;
|
/// <param name="e">Arguments defined as IKeyName sender, output, input, and eRoutingSignalType</param>
|
||||||
|
private void OnSwitchChange(RoutingNumericEventArgs e)
|
||||||
|
{
|
||||||
|
var newEvent = NumericSwitchChange;
|
||||||
|
if (newEvent != null) newEvent(this, e);
|
||||||
|
}
|
||||||
|
|
||||||
_Chassis.HdmiInputs[port].HdmiInputPort.HdcpSupportOn();
|
public void EnableHdcp(uint port)
|
||||||
InputHdcpEnableFeedback[InputNames[port]].FireUpdate();
|
{
|
||||||
}
|
if (port > _Chassis.NumberOfInputs) return;
|
||||||
|
if (port <= 0) return;
|
||||||
|
|
||||||
public void DisableHdcp(uint port)
|
_Chassis.HdmiInputs[port].HdmiInputPort.HdcpSupportOn();
|
||||||
{
|
InputHdcpEnableFeedback[InputNames[port]].FireUpdate();
|
||||||
if (port > _Chassis.NumberOfInputs) return;
|
}
|
||||||
if (port <= 0) return;
|
|
||||||
|
|
||||||
_Chassis.HdmiInputs[port].HdmiInputPort.HdcpSupportOff();
|
public void DisableHdcp(uint port)
|
||||||
InputHdcpEnableFeedback[InputNames[port]].FireUpdate();
|
{
|
||||||
}
|
if (port > _Chassis.NumberOfInputs) return;
|
||||||
|
if (port <= 0) return;
|
||||||
|
|
||||||
public void EnableAutoRoute()
|
_Chassis.HdmiInputs[port].HdmiInputPort.HdcpSupportOff();
|
||||||
{
|
InputHdcpEnableFeedback[InputNames[port]].FireUpdate();
|
||||||
if (_Chassis.NumberOfInputs != 1) return;
|
}
|
||||||
|
|
||||||
if (_Chassis4x1 == null) return;
|
public void EnableAutoRoute()
|
||||||
|
{
|
||||||
|
if (_Chassis.NumberOfInputs != 1) return;
|
||||||
|
|
||||||
_Chassis4x1.AutoModeOn();
|
if (_Chassis4x1 == null) return;
|
||||||
}
|
|
||||||
|
|
||||||
public void DisableAutoRoute()
|
_Chassis4x1.AutoModeOn();
|
||||||
{
|
}
|
||||||
if (_Chassis.NumberOfInputs != 1) return;
|
|
||||||
|
|
||||||
if (_Chassis4x1 == null) return;
|
public void DisableAutoRoute()
|
||||||
|
{
|
||||||
|
if (_Chassis.NumberOfInputs != 1) return;
|
||||||
|
|
||||||
_Chassis4x1.AutoModeOff();
|
if (_Chassis4x1 == null) return;
|
||||||
}
|
|
||||||
|
|
||||||
#region PostActivate
|
_Chassis4x1.AutoModeOff();
|
||||||
|
}
|
||||||
|
|
||||||
public void AddFeedbackCollections()
|
#region PostActivate
|
||||||
{
|
|
||||||
AddCollectionsToList(VideoInputSyncFeedbacks, InputHdcpEnableFeedback);
|
|
||||||
AddCollectionsToList(VideoOutputRouteFeedbacks);
|
|
||||||
AddCollectionsToList(InputNameFeedbacks, OutputNameFeedbacks, OutputRouteNameFeedbacks, DeviceNameFeedback);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
public void AddFeedbackCollections()
|
||||||
|
{
|
||||||
|
AddFeedbackToList(DeviceNameFeedback);
|
||||||
|
AddCollectionsToList(VideoInputSyncFeedbacks, InputHdcpEnableFeedback);
|
||||||
|
AddCollectionsToList(VideoOutputRouteFeedbacks);
|
||||||
|
AddCollectionsToList(InputNameFeedbacks, OutputNameFeedbacks, OutputRouteNameFeedbacks);
|
||||||
|
}
|
||||||
|
|
||||||
#region FeedbackCollection Methods
|
#endregion
|
||||||
|
|
||||||
//Add arrays of collections
|
#region FeedbackCollection Methods
|
||||||
public void AddCollectionsToList(params FeedbackCollection<BoolFeedback>[] newFbs)
|
|
||||||
{
|
|
||||||
foreach (FeedbackCollection<BoolFeedback> fbCollection in newFbs)
|
|
||||||
{
|
|
||||||
foreach (var item in newFbs)
|
|
||||||
{
|
|
||||||
AddCollectionToList(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public void AddCollectionsToList(params FeedbackCollection<IntFeedback>[] newFbs)
|
|
||||||
{
|
|
||||||
foreach (FeedbackCollection<IntFeedback> fbCollection in newFbs)
|
|
||||||
{
|
|
||||||
foreach (var item in newFbs)
|
|
||||||
{
|
|
||||||
AddCollectionToList(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AddCollectionsToList(params FeedbackCollection<StringFeedback>[] newFbs)
|
//Add arrays of collections
|
||||||
{
|
public void AddCollectionsToList(params FeedbackCollection<BoolFeedback>[] newFbs)
|
||||||
foreach (FeedbackCollection<StringFeedback> fbCollection in newFbs)
|
{
|
||||||
{
|
foreach (FeedbackCollection<BoolFeedback> fbCollection in newFbs)
|
||||||
foreach (var item in newFbs)
|
{
|
||||||
{
|
foreach (var item in newFbs)
|
||||||
AddCollectionToList(item);
|
{
|
||||||
}
|
AddCollectionToList(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
public void AddCollectionsToList(params FeedbackCollection<IntFeedback>[] newFbs)
|
||||||
|
{
|
||||||
|
foreach (FeedbackCollection<IntFeedback> fbCollection in newFbs)
|
||||||
|
{
|
||||||
|
foreach (var item in newFbs)
|
||||||
|
{
|
||||||
|
AddCollectionToList(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Add Collections
|
public void AddCollectionsToList(params FeedbackCollection<StringFeedback>[] newFbs)
|
||||||
public void AddCollectionToList(FeedbackCollection<BoolFeedback> newFbs)
|
{
|
||||||
{
|
foreach (FeedbackCollection<StringFeedback> fbCollection in newFbs)
|
||||||
foreach (var f in newFbs)
|
{
|
||||||
{
|
foreach (var item in newFbs)
|
||||||
if (f == null) continue;
|
{
|
||||||
|
AddCollectionToList(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
AddFeedbackToList(f);
|
//Add Collections
|
||||||
}
|
public void AddCollectionToList(FeedbackCollection<BoolFeedback> newFbs)
|
||||||
}
|
{
|
||||||
|
foreach (var f in newFbs)
|
||||||
|
{
|
||||||
|
if (f == null) continue;
|
||||||
|
|
||||||
public void AddCollectionToList(FeedbackCollection<IntFeedback> newFbs)
|
AddFeedbackToList(f);
|
||||||
{
|
}
|
||||||
foreach (var f in newFbs)
|
}
|
||||||
{
|
|
||||||
if (f == null) continue;
|
|
||||||
|
|
||||||
AddFeedbackToList(f);
|
public void AddCollectionToList(FeedbackCollection<IntFeedback> newFbs)
|
||||||
}
|
{
|
||||||
}
|
foreach (var f in newFbs)
|
||||||
|
{
|
||||||
|
if (f == null) continue;
|
||||||
|
|
||||||
public void AddCollectionToList(FeedbackCollection<StringFeedback> newFbs)
|
AddFeedbackToList(f);
|
||||||
{
|
}
|
||||||
foreach (var f in newFbs)
|
}
|
||||||
{
|
|
||||||
if (f == null) continue;
|
|
||||||
|
|
||||||
AddFeedbackToList(f);
|
public void AddCollectionToList(FeedbackCollection<StringFeedback> newFbs)
|
||||||
}
|
{
|
||||||
}
|
foreach (var f in newFbs)
|
||||||
|
{
|
||||||
|
if (f == null) continue;
|
||||||
|
|
||||||
//Add Individual Feedbacks
|
AddFeedbackToList(f);
|
||||||
public void AddFeedbackToList(PepperDash.Essentials.Core.Feedback newFb)
|
}
|
||||||
{
|
}
|
||||||
if (newFb == null) return;
|
|
||||||
|
|
||||||
if (!Feedbacks.Contains(newFb))
|
//Add Individual Feedbacks
|
||||||
{
|
public void AddFeedbackToList(PepperDash.Essentials.Core.Feedback newFb)
|
||||||
Feedbacks.Add(newFb);
|
{
|
||||||
}
|
if (newFb == null) return;
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
if (!Feedbacks.Contains(newFb))
|
||||||
|
{
|
||||||
|
Feedbacks.Add(newFb);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#region IRouting Members
|
#endregion
|
||||||
|
|
||||||
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
|
#region IRouting Members
|
||||||
{
|
|
||||||
// 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];
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
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);
|
||||||
|
|
||||||
#region IRoutingNumeric Members
|
if (output == null)
|
||||||
|
{
|
||||||
|
Debug.Console(0, this, "Unable to make switch. output selector is not HdMdNxMHdmiOutput");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
public void ExecuteNumericSwitch(ushort inputSelector, ushort outputSelector, eRoutingSignalType signalType)
|
// Try to make switch only when necessary. The unit appears to toggle when already selected.
|
||||||
{
|
var current = output.VideoOut;
|
||||||
ExecuteSwitch(inputSelector, outputSelector, signalType);
|
if (current != input)
|
||||||
}
|
output.VideoOut = input;
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#endregion
|
#region IRoutingNumeric Members
|
||||||
|
|
||||||
#region Bridge Linking
|
public void ExecuteNumericSwitch(ushort inputSelector, ushort outputSelector, eRoutingSignalType signalType)
|
||||||
|
{
|
||||||
|
var input = inputSelector == 0 ? null : _Chassis.HdmiInputs[inputSelector];
|
||||||
|
var output = _Chassis.HdmiOutputs[outputSelector];
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
Debug.Console(2, this, "ExecuteNumericSwitch: input={0} output={1}", input, output);
|
||||||
{
|
|
||||||
var joinMap = new HdMdNxM4kEControllerJoinMap(joinStart);
|
|
||||||
|
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
ExecuteSwitch(input, output, signalType);
|
||||||
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
#endregion
|
||||||
joinMap = JsonConvert.DeserializeObject<HdMdNxM4kEControllerJoinMap>(joinMapSerialized);
|
|
||||||
|
|
||||||
if (bridge != null)
|
#endregion
|
||||||
{
|
|
||||||
bridge.AddJoinMap(Key, joinMap);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device.");
|
|
||||||
}
|
|
||||||
|
|
||||||
IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
#region Bridge Linking
|
||||||
DeviceNameFeedback[this.Name].LinkInputSig(trilist.StringInput[joinMap.Name.JoinNumber]);
|
|
||||||
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
|
{
|
||||||
|
var joinMap = new HdMdNxM4kEControllerJoinMap(joinStart);
|
||||||
|
|
||||||
|
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
|
joinMap = JsonConvert.DeserializeObject<HdMdNxM4kEControllerJoinMap>(joinMapSerialized);
|
||||||
|
|
||||||
|
if (bridge != null)
|
||||||
|
{
|
||||||
|
bridge.AddJoinMap(Key, joinMap);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device.");
|
||||||
|
}
|
||||||
|
|
||||||
|
IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.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.LinkInputSig(trilist.BooleanInput[joinMap.EnableAutoRoute.JoinNumber]);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (uint i = 1; i <= _Chassis.NumberOfInputs; i++)
|
||||||
|
{
|
||||||
|
var joinIndex = i - 1;
|
||||||
|
var input = i;
|
||||||
|
//Digital
|
||||||
|
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[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[output]].LinkInputSig(trilist.UShortInput[joinMap.OutputRoute.JoinNumber + joinIndex]);
|
||||||
|
trilist.SetUShortSigAction(joinMap.OutputRoute.JoinNumber + joinIndex, (a) => ExecuteNumericSwitch(a, (ushort) output, eRoutingSignalType.AudioVideo));
|
||||||
|
|
||||||
|
//Serial
|
||||||
|
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) return;
|
||||||
|
|
||||||
|
// feedback updates was moved to the Chassis_OnlineStatusChange
|
||||||
|
// due to the amount of time it takes for the device to come online
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Events
|
||||||
|
|
||||||
|
void Chassis_OnlineStatusChange(Crestron.SimplSharpPro.GenericBase currentDevice, Crestron.SimplSharpPro.OnlineOfflineEventArgs args)
|
||||||
|
{
|
||||||
|
IsOnline.FireUpdate();
|
||||||
|
|
||||||
|
if (!args.DeviceOnLine) return;
|
||||||
|
|
||||||
|
foreach (var feedback in Feedbacks)
|
||||||
|
{
|
||||||
|
feedback.FireUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
if (_Chassis4x1 != null)
|
if (_Chassis4x1 != null)
|
||||||
{
|
AutoRouteFeedback.FireUpdate();
|
||||||
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]);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (uint i = 1; i <= _Chassis.NumberOfInputs; i++)
|
void Chassis_DMOutputChange(Switch device, DMOutputEventArgs args)
|
||||||
{
|
{
|
||||||
var joinIndex = i - 1;
|
if (args.EventId != DMOutputEventIds.VideoOutEventId) return;
|
||||||
//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));
|
|
||||||
|
|
||||||
//Serial
|
var output = args.Number;
|
||||||
InputNameFeedbacks[InputNames[i]].LinkInputSig(trilist.StringInput[joinMap.InputName.JoinNumber + joinIndex]);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (uint i = 1; i <= _Chassis.NumberOfOutputs; i++)
|
var inputNumber = _Chassis.HdmiOutputs[output].VideoOutFeedback == null
|
||||||
{
|
? 0
|
||||||
var joinIndex = i - 1;
|
: _Chassis.HdmiOutputs[output].VideoOutFeedback.Number;
|
||||||
//Analog
|
|
||||||
VideoOutputRouteFeedbacks[OutputNames[i]].LinkInputSig(trilist.UShortInput[joinMap.OutputRoute.JoinNumber + joinIndex]);
|
|
||||||
trilist.SetUShortSigAction(joinMap.OutputRoute.JoinNumber + joinIndex, (a) => ExecuteSwitch(a, i, eRoutingSignalType.AudioVideo));
|
|
||||||
|
|
||||||
//Serial
|
var outputName = OutputNames[output];
|
||||||
OutputNameFeedbacks[OutputNames[i]].LinkInputSig(trilist.StringInput[joinMap.OutputName.JoinNumber + joinIndex]);
|
|
||||||
OutputRouteNameFeedbacks[OutputNames[i]].LinkInputSig(trilist.StringInput[joinMap.OutputRoutedName.JoinNumber + joinIndex]);
|
|
||||||
}
|
|
||||||
|
|
||||||
_Chassis.OnlineStatusChange += new Crestron.SimplSharpPro.OnlineStatusChangeEventHandler(Chassis_OnlineStatusChange);
|
var feedback = VideoOutputRouteFeedbacks[outputName];
|
||||||
|
|
||||||
trilist.OnlineStatusChange += new Crestron.SimplSharpPro.OnlineStatusChangeEventHandler((d, args) =>
|
if (feedback == null)
|
||||||
{
|
{
|
||||||
if (args.DeviceOnLine)
|
return;
|
||||||
{
|
}
|
||||||
foreach (var feedback in Feedbacks)
|
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)
|
||||||
|
{
|
||||||
|
switch (args.EventId)
|
||||||
|
{
|
||||||
|
case DMInputEventIds.VideoDetectedEventId:
|
||||||
|
{
|
||||||
|
Debug.Console(1, this, "Event ID {0}: Updating VideoInputSyncFeedbacks", args.EventId);
|
||||||
|
foreach (var item in VideoInputSyncFeedbacks)
|
||||||
{
|
{
|
||||||
feedback.FireUpdate();
|
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
|
||||||
|
|
||||||
|
#region Factory
|
||||||
|
|
||||||
|
public class HdMdNxM4kEControllerFactory : EssentialsDeviceFactory<HdMdNxM4kEBridgeableController>
|
||||||
|
{
|
||||||
|
public HdMdNxM4kEControllerFactory()
|
||||||
|
{
|
||||||
|
TypeNames = new List<string>() { "hdmd4x14ke-bridgeable", "hdmd4x24ke", "hdmd6x24ke" };
|
||||||
|
}
|
||||||
|
|
||||||
|
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||||
|
{
|
||||||
|
Debug.Console(1, "Factory Attempting to create new HD-MD-NxM-4K-E Device");
|
||||||
|
|
||||||
|
var props = JsonConvert.DeserializeObject<HdMdNxM4kEBridgeablePropertiesConfig>(dc.Properties.ToString());
|
||||||
|
|
||||||
|
var type = dc.Type.ToLower();
|
||||||
|
var control = props.Control;
|
||||||
|
var ipid = control.IpIdInt;
|
||||||
|
var address = control.TcpSshProperties.Address;
|
||||||
|
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
|
case ("hdmd4x14ke-bridgeable"):
|
||||||
|
return new HdMdNxM4kEBridgeableController(dc.Key, dc.Name, new HdMd4x14kE(ipid, address, Global.ControlSystem), props);
|
||||||
|
case ("hdmd4x24ke"):
|
||||||
|
return new HdMdNxM4kEBridgeableController(dc.Key, dc.Name, new HdMd4x24kE(ipid, address, Global.ControlSystem), props);
|
||||||
|
case ("hdmd6x24ke"):
|
||||||
|
return new HdMdNxM4kEBridgeableController(dc.Key, dc.Name, new HdMd6x24kE(ipid, address, Global.ControlSystem), props);
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Events
|
}
|
||||||
|
|
||||||
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];
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var feedback in Feedbacks)
|
|
||||||
{
|
|
||||||
feedback.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]);
|
|
||||||
|
|
||||||
|
|
||||||
VideoOutputRouteFeedbacks[i].FireUpdate();
|
|
||||||
OnSwitchChange(new RoutingNumericEventArgs((ushort)i, VideoOutputRouteFeedbacks[i].UShortValue, localOutputPort, localInputPort, eRoutingSignalType.AudioVideo));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Chassis_DMInputChange(Switch device, DMInputEventArgs args)
|
|
||||||
{
|
|
||||||
if (args.EventId != DMInputEventIds.VideoDetectedEventId) return;
|
|
||||||
foreach (var item in VideoInputSyncFeedbacks)
|
|
||||||
{
|
|
||||||
item.FireUpdate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Factory
|
|
||||||
|
|
||||||
public class HdMdNxM4kEControllerFactory : EssentialsDeviceFactory<HdMdNxM4kEBridgeableController>
|
|
||||||
{
|
|
||||||
public HdMdNxM4kEControllerFactory()
|
|
||||||
{
|
|
||||||
TypeNames = new List<string>() { "hdmd4x14ke-bridgeable", "hdmd4x24ke", "hdmd6x24ke" };
|
|
||||||
}
|
|
||||||
|
|
||||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
|
||||||
{
|
|
||||||
Debug.Console(1, "Factory Attempting to create new HD-MD-NxM-4K-E Device");
|
|
||||||
|
|
||||||
var props = JsonConvert.DeserializeObject<HdMdNxM4kEBridgeablePropertiesConfig>(dc.Properties.ToString());
|
|
||||||
|
|
||||||
var type = dc.Type.ToLower();
|
|
||||||
var control = props.Control;
|
|
||||||
var ipid = control.IpIdInt;
|
|
||||||
var address = control.TcpSshProperties.Address;
|
|
||||||
|
|
||||||
switch (type)
|
|
||||||
{
|
|
||||||
case ("hdmd4x14ke-bridgeable"):
|
|
||||||
return new HdMdNxM4kEBridgeableController(dc.Key, dc.Name, new HdMd4x14kE(ipid, address, Global.ControlSystem), props);
|
|
||||||
case ("hdmd4x24ke"):
|
|
||||||
return new HdMdNxM4kEBridgeableController(dc.Key, dc.Name, new HdMd4x24kE(ipid, address, Global.ControlSystem), props);
|
|
||||||
case ("hdmd6x24ke"):
|
|
||||||
return new HdMdNxM4kEBridgeableController(dc.Key, dc.Name, new HdMd6x24kE(ipid, address, Global.ControlSystem), props);
|
|
||||||
default:
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharpPro.DM;
|
using Crestron.SimplSharpPro.DM;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
@@ -13,6 +14,7 @@ using PepperDash.Essentials.DM.Config;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials.DM.Chassis
|
namespace PepperDash.Essentials.DM.Chassis
|
||||||
{
|
{
|
||||||
|
[Obsolete("Please use HdMdNxM4kEBridgeable Controller")]
|
||||||
public class HdMdNxM4kEController : CrestronGenericBaseDevice, IRoutingInputsOutputs, IRouting
|
public class HdMdNxM4kEController : CrestronGenericBaseDevice, IRoutingInputsOutputs, IRouting
|
||||||
{
|
{
|
||||||
public HdMdNxM Chassis { get; private set; }
|
public HdMdNxM Chassis { get; private set; }
|
||||||
@@ -31,6 +33,7 @@ namespace PepperDash.Essentials.DM.Chassis
|
|||||||
HdMdNxM4kEPropertiesConfig props)
|
HdMdNxM4kEPropertiesConfig props)
|
||||||
: base(key, name, chassis)
|
: base(key, name, chassis)
|
||||||
{
|
{
|
||||||
|
Debug.Console(0, this, "Type hdmd4x14ke is obsolete. Please use hdmd4x14ke-bridgeable");
|
||||||
Chassis = chassis;
|
Chassis = chassis;
|
||||||
|
|
||||||
// logical ports
|
// logical ports
|
||||||
@@ -43,14 +46,19 @@ namespace PepperDash.Essentials.DM.Chassis
|
|||||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort>();
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort>();
|
||||||
OutputPorts.Add(new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
OutputPorts.Add(new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||||
eRoutingPortConnectionType.Hdmi, null, this));
|
eRoutingPortConnectionType.Hdmi, null, this));
|
||||||
|
|
||||||
// physical settings
|
// physical settings
|
||||||
if (props != null && props.Inputs != null)
|
if (props != null && props.Inputs != null)
|
||||||
{
|
{
|
||||||
|
var inputRegex = new Regex(@"(?<InputNum>\d)", RegexOptions.IgnoreCase);
|
||||||
foreach (var kvp in props.Inputs)
|
foreach (var kvp in props.Inputs)
|
||||||
{
|
{
|
||||||
// strip "hdmiIn"
|
// get numnbers from key and convert to int
|
||||||
var inputNum = Convert.ToUInt32(kvp.Key.Substring(6));
|
//var inputNum = Convert.ToUInt32(kvp.Key.Substring(6));
|
||||||
|
var inputMatch = inputRegex.Match(kvp.Key);
|
||||||
|
if (inputMatch == null) continue;
|
||||||
|
|
||||||
|
var inputNum = Convert.ToUInt32(inputMatch.Groups["InputNum"].Value);
|
||||||
|
|
||||||
var port = chassis.HdmiInputs[inputNum].HdmiInputPort;
|
var port = chassis.HdmiInputs[inputNum].HdmiInputPort;
|
||||||
// set hdcp disables
|
// set hdcp disables
|
||||||
|
|||||||
@@ -235,6 +235,15 @@ namespace PepperDash.Essentials.Devices.Common.Codec
|
|||||||
{
|
{
|
||||||
Calls = new List<Call>();
|
Calls = new List<Call>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region Overrides of Object
|
||||||
|
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return String.Format("{0}:{1}: {2}-{3}", Title, Agenda, StartTime, EndTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Call
|
public class Call
|
||||||
|
|||||||
@@ -122,6 +122,7 @@
|
|||||||
<Compile Include="Display\PanasonicThDisplay.cs" />
|
<Compile Include="Display\PanasonicThDisplay.cs" />
|
||||||
<Compile Include="VideoCodec\Interfaces\IHasMeetingInfo.cs" />
|
<Compile Include="VideoCodec\Interfaces\IHasMeetingInfo.cs" />
|
||||||
<Compile Include="VideoCodec\Interfaces\IHasParticipants.cs" />
|
<Compile Include="VideoCodec\Interfaces\IHasParticipants.cs" />
|
||||||
|
<Compile Include="VideoCodec\Interfaces\IHasPresentationOnlyMeeting.cs" />
|
||||||
<Compile Include="VideoCodec\Interfaces\IHasSelfviewPosition.cs" />
|
<Compile Include="VideoCodec\Interfaces\IHasSelfviewPosition.cs" />
|
||||||
<Compile Include="VideoCodec\Interfaces\IHasSelfviewSize.cs" />
|
<Compile Include="VideoCodec\Interfaces\IHasSelfviewSize.cs" />
|
||||||
<Compile Include="VideoCodec\Interfaces\IHasStartMeeting.cs" />
|
<Compile Include="VideoCodec\Interfaces\IHasStartMeeting.cs" />
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace PepperDash.Essentials.Devices.Common
|
|||||||
public class AppleTV : EssentialsBridgeableDevice, IDPad, ITransport, IUiDisplayInfo, IRoutingOutputs
|
public class AppleTV : EssentialsBridgeableDevice, IDPad, ITransport, IUiDisplayInfo, IRoutingOutputs
|
||||||
{
|
{
|
||||||
public IrOutputPortController IrPort { get; private set; }
|
public IrOutputPortController IrPort { get; private set; }
|
||||||
public const string StandardDriverName = "Apple AppleTV-v2.ir";
|
public const string StandardDriverName = "Apple_AppleTV_4th_Gen_Essentials.ir";
|
||||||
public uint DisplayUiType { get { return DisplayUiConstants.TypeAppleTv; } }
|
public uint DisplayUiType { get { return DisplayUiConstants.TypeAppleTv; } }
|
||||||
|
|
||||||
public AppleTV(string key, string name, IrOutputPortController portCont)
|
public AppleTV(string key, string name, IrOutputPortController portCont)
|
||||||
|
|||||||
@@ -421,8 +421,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
CodecStatus.Status.Video.Selfview.Mode.ValueChangedAction = SelfviewIsOnFeedback.FireUpdate;
|
CodecStatus.Status.Video.Selfview.Mode.ValueChangedAction = SelfviewIsOnFeedback.FireUpdate;
|
||||||
CodecStatus.Status.Video.Selfview.PIPPosition.ValueChangedAction = ComputeSelfviewPipStatus;
|
CodecStatus.Status.Video.Selfview.PIPPosition.ValueChangedAction = ComputeSelfviewPipStatus;
|
||||||
CodecStatus.Status.Video.Layout.LayoutFamily.Local.ValueChangedAction = ComputeLocalLayout;
|
CodecStatus.Status.Video.Layout.LayoutFamily.Local.ValueChangedAction = ComputeLocalLayout;
|
||||||
CodecStatus.Status.Conference.Presentation.Mode.ValueChangedAction = SharingContentIsOnFeedback.FireUpdate;
|
CodecStatus.Status.Conference.Presentation.Mode.ValueChangedAction = () =>
|
||||||
CodecStatus.Status.Conference.Presentation.Mode.ValueChangedAction = FarEndIsSharingContentFeedback.FireUpdate;
|
{
|
||||||
|
SharingContentIsOnFeedback.FireUpdate();
|
||||||
|
FarEndIsSharingContentFeedback.FireUpdate();
|
||||||
|
};
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
CodecStatus.Status.Video.Input.MainVideoMute.ValueChangedAction = CameraIsOffFeedback.FireUpdate;
|
CodecStatus.Status.Video.Input.MainVideoMute.ValueChangedAction = CameraIsOffFeedback.FireUpdate;
|
||||||
@@ -551,6 +555,13 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
CrestronConsole.AddNewConsoleCommand(GetPhonebook, "GetCodecPhonebook", "Triggers a refresh of the codec phonebook", ConsoleAccessLevelEnum.AccessOperator);
|
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);
|
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;
|
var socket = Communication as ISocketStatus;
|
||||||
if (socket != null)
|
if (socket != null)
|
||||||
{
|
{
|
||||||
@@ -559,9 +570,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
|
|
||||||
Communication.Connect();
|
Communication.Connect();
|
||||||
|
|
||||||
CommunicationMonitor.Start();
|
CommunicationMonitor.Start();
|
||||||
|
|
||||||
string prefix = "xFeedback register ";
|
const string prefix = "xFeedback register ";
|
||||||
|
|
||||||
CliFeedbackRegistrationExpression =
|
CliFeedbackRegistrationExpression =
|
||||||
prefix + "/Configuration" + Delimiter +
|
prefix + "/Configuration" + Delimiter +
|
||||||
@@ -576,14 +587,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
prefix + "/Status/Video/Layout" + Delimiter +
|
prefix + "/Status/Video/Layout" + Delimiter +
|
||||||
prefix + "/Status/Video/Input/MainVideoMute" + Delimiter +
|
prefix + "/Status/Video/Input/MainVideoMute" + Delimiter +
|
||||||
prefix + "/Bookings" + Delimiter +
|
prefix + "/Bookings" + Delimiter +
|
||||||
prefix + "/Event/CallDisconnect" + Delimiter +
|
prefix + "/Event/CallDisconnect" + Delimiter +
|
||||||
prefix + "/Event/Bookings" + Delimiter +
|
prefix + "/Event/Bookings" + Delimiter +
|
||||||
prefix + "/Event/CameraPresetListUpdated" + Delimiter +
|
prefix + "/Event/CameraPresetListUpdated" + Delimiter +
|
||||||
prefix + "/Event/UserInterface/Presentation/ExternalSource/Selected/SourceIdentifier" + Delimiter;
|
prefix + "/Event/UserInterface/Presentation/ExternalSource/Selected/SourceIdentifier" + Delimiter;
|
||||||
|
|
||||||
return base.CustomActivate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Fires when initial codec sync is completed. Used to then send commands to get call history, phonebook, bookings, etc.
|
/// Fires when initial codec sync is completed. Used to then send commands to get call history, phonebook, bookings, etc.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -29,19 +29,28 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
|
|||||||
[JsonProperty("name")]
|
[JsonProperty("name")]
|
||||||
public string Name { get; private set; }
|
public string Name { get; private set; }
|
||||||
[JsonProperty("host")]
|
[JsonProperty("host")]
|
||||||
public string Host { get; set; }
|
public string Host { get; private set; }
|
||||||
[JsonProperty("password")]
|
[JsonProperty("password")]
|
||||||
public string Password { get; private set; }
|
public string Password { get; private set; }
|
||||||
[JsonProperty("shareStatus")]
|
[JsonProperty("shareStatus")]
|
||||||
public string ShareStatus { get; private set; }
|
public string ShareStatus { get; private set; }
|
||||||
|
[JsonProperty("isHost")]
|
||||||
|
public Boolean IsHost { get; private set; }
|
||||||
|
[JsonProperty("isSharingMeeting")]
|
||||||
|
public Boolean IsSharingMeeting { get; private set; }
|
||||||
|
[JsonProperty("waitingForHost")]
|
||||||
|
public Boolean WaitingForHost { get; private set; }
|
||||||
|
|
||||||
public MeetingInfo(string id, string name, string host, string password, string shareStatus)
|
public MeetingInfo(string id, string name, string host, string password, string shareStatus, bool isHost, bool isSharingMeeting, bool waitingForHost)
|
||||||
{
|
{
|
||||||
Id = id;
|
Id = id;
|
||||||
Name = name;
|
Name = name;
|
||||||
Host = host;
|
Host = host;
|
||||||
Password = password;
|
Password = password;
|
||||||
ShareStatus = shareStatus;
|
ShareStatus = shareStatus;
|
||||||
|
IsHost = isHost;
|
||||||
|
IsSharingMeeting = isSharingMeeting;
|
||||||
|
WaitingForHost = waitingForHost;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
|
|||||||
{
|
{
|
||||||
public int UserId { get; set; }
|
public int UserId { get; set; }
|
||||||
public bool IsHost { get; set; }
|
public bool IsHost { get; set; }
|
||||||
|
public bool IsMyself { get; set; }
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public bool CanMuteVideo { get; set; }
|
public bool CanMuteVideo { get; set; }
|
||||||
public bool CanUnmuteVideo { get; set; }
|
public bool CanUnmuteVideo { get; set; }
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
|
||||||
|
{
|
||||||
|
public interface IHasPresentationOnlyMeeting
|
||||||
|
{
|
||||||
|
void StartSharingOnlyMeeting();
|
||||||
|
void StartSharingOnlyMeeting(eSharingMeetingMode mode);
|
||||||
|
void StartSharingOnlyMeeting(eSharingMeetingMode mode, ushort duration);
|
||||||
|
void StartSharingOnlyMeeting(eSharingMeetingMode mode, ushort duration, string password);
|
||||||
|
void StartNormalMeetingFromSharingOnlyMeeting();
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum eSharingMeetingMode
|
||||||
|
{
|
||||||
|
None,
|
||||||
|
Laptop,
|
||||||
|
Ios,
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -298,6 +298,13 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
}
|
}
|
||||||
|
|
||||||
LinkVideoCodecToApi(codec, trilist, joinMap);
|
LinkVideoCodecToApi(codec, trilist, joinMap);
|
||||||
|
|
||||||
|
trilist.OnlineStatusChange += (device, args) =>
|
||||||
|
{
|
||||||
|
if (!args.DeviceOnLine) return;
|
||||||
|
|
||||||
|
trilist.SetString(joinMap.Schedule.JoinNumber, "\xFC");
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -785,6 +792,16 @@ ScreenIndexIsPinnedTo: {8} (a{17})
|
|||||||
|
|
||||||
_currentMeetings = codec.CodecSchedule.Meetings.Where(m => m.StartTime >= currentTime || m.EndTime >= currentTime).ToList();
|
_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);
|
var meetingsData = UpdateMeetingsListXSig(_currentMeetings);
|
||||||
trilist.SetString(joinMap.Schedule.JoinNumber, meetingsData);
|
trilist.SetString(joinMap.Schedule.JoinNumber, meetingsData);
|
||||||
trilist.SetUshort(joinMap.MeetingCount.JoinNumber, (ushort)_currentMeetings.Count);
|
trilist.SetUshort(joinMap.MeetingCount.JoinNumber, (ushort)_currentMeetings.Count);
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
public List<zStatus.AudioVideoInputOutputLineItem> AudioOuputs { get; set; }
|
public List<zStatus.AudioVideoInputOutputLineItem> AudioOuputs { get; set; }
|
||||||
public List<zStatus.AudioVideoInputOutputLineItem> Cameras { get; set; }
|
public List<zStatus.AudioVideoInputOutputLineItem> Cameras { get; set; }
|
||||||
public zEvent.PhoneCallStatus PhoneCall { get; set; }
|
public zEvent.PhoneCallStatus PhoneCall { get; set; }
|
||||||
|
public zEvent.NeedWaitForHost NeedWaitForHost { get; set; }
|
||||||
|
|
||||||
public ZoomRoomStatus()
|
public ZoomRoomStatus()
|
||||||
{
|
{
|
||||||
@@ -76,6 +77,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
AudioOuputs = new List<zStatus.AudioVideoInputOutputLineItem>();
|
AudioOuputs = new List<zStatus.AudioVideoInputOutputLineItem>();
|
||||||
Cameras = new List<zStatus.AudioVideoInputOutputLineItem>();
|
Cameras = new List<zStatus.AudioVideoInputOutputLineItem>();
|
||||||
PhoneCall = new zEvent.PhoneCallStatus();
|
PhoneCall = new zEvent.PhoneCallStatus();
|
||||||
|
NeedWaitForHost = new zEvent.NeedWaitForHost();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -756,6 +758,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class zEvent
|
public class zEvent
|
||||||
{
|
{
|
||||||
|
public class StartLocalPresentMeeting
|
||||||
|
{
|
||||||
|
public bool Success { get; set; }
|
||||||
|
}
|
||||||
public class NeedWaitForHost
|
public class NeedWaitForHost
|
||||||
{
|
{
|
||||||
public bool Wait { get; set; }
|
public bool Wait { get; set; }
|
||||||
@@ -1471,6 +1477,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
public static List<Participant> GetGenericParticipantListFromParticipantsResult(
|
public static List<Participant> GetGenericParticipantListFromParticipantsResult(
|
||||||
List<ListParticipant> participants)
|
List<ListParticipant> participants)
|
||||||
{
|
{
|
||||||
|
if (participants.Count == 0)
|
||||||
|
{
|
||||||
|
return new List<Participant>();
|
||||||
|
}
|
||||||
//return participants.Select(p => new Participant
|
//return participants.Select(p => new Participant
|
||||||
// {
|
// {
|
||||||
// UserId = p.UserId,
|
// UserId = p.UserId,
|
||||||
@@ -1489,6 +1499,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
UserId = p.UserId,
|
UserId = p.UserId,
|
||||||
Name = p.UserName,
|
Name = p.UserName,
|
||||||
IsHost = p.IsHost,
|
IsHost = p.IsHost,
|
||||||
|
IsMyself = p.IsMyself,
|
||||||
CanMuteVideo = p.IsVideoCanMuteByHost,
|
CanMuteVideo = p.IsVideoCanMuteByHost,
|
||||||
CanUnmuteVideo = p.IsVideoCanUnmuteByHost,
|
CanUnmuteVideo = p.IsVideoCanUnmuteByHost,
|
||||||
AudioMuteFb = p.AudioStatusState == "AUDIO_MUTED",
|
AudioMuteFb = p.AudioStatusState == "AUDIO_MUTED",
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
@@ -25,7 +26,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
IRouting,
|
IRouting,
|
||||||
IHasScheduleAwareness, IHasCodecCameras, IHasParticipants, IHasCameraOff, IHasCameraMute, IHasCameraAutoMode,
|
IHasScheduleAwareness, IHasCodecCameras, IHasParticipants, IHasCameraOff, IHasCameraMute, IHasCameraAutoMode,
|
||||||
IHasFarEndContentStatus, IHasSelfviewPosition, IHasPhoneDialing, IHasZoomRoomLayouts, IHasParticipantPinUnpin,
|
IHasFarEndContentStatus, IHasSelfviewPosition, IHasPhoneDialing, IHasZoomRoomLayouts, IHasParticipantPinUnpin,
|
||||||
IHasParticipantAudioMute, IHasSelfviewSize, IPasswordPrompt, IHasStartMeeting, IHasMeetingInfo
|
IHasParticipantAudioMute, IHasSelfviewSize, IPasswordPrompt, IHasStartMeeting, IHasMeetingInfo, IHasPresentationOnlyMeeting
|
||||||
{
|
{
|
||||||
private const long MeetingRefreshTimer = 60000;
|
private const long MeetingRefreshTimer = 60000;
|
||||||
public uint DefaultMeetingDurationMin { get; private set; }
|
public uint DefaultMeetingDurationMin { get; private set; }
|
||||||
@@ -111,6 +112,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
|
|
||||||
CodecSchedule = new CodecScheduleAwareness(MeetingRefreshTimer);
|
CodecSchedule = new CodecScheduleAwareness(MeetingRefreshTimer);
|
||||||
|
|
||||||
|
if (_props.MinutesBeforeMeetingStart > 0)
|
||||||
|
{
|
||||||
|
CodecSchedule.MeetingWarningMinutes = _props.MinutesBeforeMeetingStart;
|
||||||
|
}
|
||||||
|
|
||||||
ReceivingContent = new BoolFeedback(FarEndIsSharingContentFeedbackFunc);
|
ReceivingContent = new BoolFeedback(FarEndIsSharingContentFeedbackFunc);
|
||||||
|
|
||||||
SelfviewPipPositionFeedback = new StringFeedback(SelfviewPipPositionFeedbackFunc);
|
SelfviewPipPositionFeedback = new StringFeedback(SelfviewPipPositionFeedbackFunc);
|
||||||
@@ -464,18 +470,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
|
|
||||||
private void SetUpCallFeedbackActions()
|
private void SetUpCallFeedbackActions()
|
||||||
{
|
{
|
||||||
Status.Call.Sharing.PropertyChanged += (o, a) =>
|
Status.Call.Sharing.PropertyChanged += HandleSharingStateUpdate;
|
||||||
{
|
|
||||||
if (a.PropertyName == "State")
|
|
||||||
{
|
|
||||||
SharingContentIsOnFeedback.FireUpdate();
|
|
||||||
ReceivingContent.FireUpdate();
|
|
||||||
|
|
||||||
// Update the share status of the meeting info
|
|
||||||
var meetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, Participants.Host.Name, MeetingInfo.Password, GetSharingStatus());
|
|
||||||
MeetingInfo = meetingInfo;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
Status.Call.PropertyChanged += (o, a) =>
|
Status.Call.PropertyChanged += (o, a) =>
|
||||||
{
|
{
|
||||||
@@ -487,6 +482,39 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void HandleSharingStateUpdate(object sender, PropertyChangedEventArgs a)
|
||||||
|
{
|
||||||
|
if (a.PropertyName != "State")
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
SharingContentIsOnFeedback.FireUpdate();
|
||||||
|
ReceivingContent.FireUpdate();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
// Update the share status of the meeting info
|
||||||
|
if (MeetingInfo == null)
|
||||||
|
{
|
||||||
|
var sharingStatus = GetSharingStatus();
|
||||||
|
|
||||||
|
MeetingInfo = new MeetingInfo("", "", "", "", sharingStatus, GetIsHostMyself(), true, false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var meetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, Participants.Host != null ? Participants.Host.Name : "None",
|
||||||
|
MeetingInfo.Password, GetSharingStatus(), GetIsHostMyself(), MeetingInfo.IsSharingMeeting, MeetingInfo.WaitingForHost);
|
||||||
|
MeetingInfo = meetingInfo;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.Console(1, this, "Error processing state property update. {0}", e.Message);
|
||||||
|
Debug.Console(2, this, e.StackTrace);
|
||||||
|
MeetingInfo = new MeetingInfo("", "", "", "", "None", false, false, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Subscribes to the PropertyChanged events on the state objects and fires the corresponding feedbacks.
|
/// Subscribes to the PropertyChanged events on the state objects and fires the corresponding feedbacks.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -626,8 +654,16 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
case "isDirectPresentationConnected":
|
case "isDirectPresentationConnected":
|
||||||
case "isSharingBlackMagic":
|
case "isSharingBlackMagic":
|
||||||
{
|
{
|
||||||
|
Debug.Console(2, this, "Updating sharing status: {0}", a.PropertyName);
|
||||||
|
|
||||||
|
SharingContentIsOnFeedback.FireUpdate();
|
||||||
|
if (MeetingInfo == null)
|
||||||
|
{
|
||||||
|
//Ignoring for now, as the CallInfo return will create the appropriate value
|
||||||
|
return;
|
||||||
|
}
|
||||||
// Update the share status of the meeting info
|
// Update the share status of the meeting info
|
||||||
var meetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, MeetingInfo.Host, MeetingInfo.Password, GetSharingStatus());
|
var meetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, MeetingInfo.Host, MeetingInfo.Password, GetSharingStatus(), GetIsHostMyself(), MeetingInfo.IsSharingMeeting, MeetingInfo.WaitingForHost);
|
||||||
MeetingInfo = meetingInfo;
|
MeetingInfo = meetingInfo;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -755,7 +791,16 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
CrestronConsole.AddNewConsoleCommand(s => GetBookings(), "GetZoomRoomBookings",
|
CrestronConsole.AddNewConsoleCommand(s => GetBookings(), "GetZoomRoomBookings",
|
||||||
"Triggers a refresh of the booking data for today", ConsoleAccessLevelEnum.AccessOperator);
|
"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)
|
if (socket != null)
|
||||||
{
|
{
|
||||||
socket.ConnectionChange += socket_ConnectionChange;
|
socket.ConnectionChange += socket_ConnectionChange;
|
||||||
@@ -766,11 +811,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
Communication.Connect();
|
Communication.Connect();
|
||||||
|
|
||||||
CommunicationMonitor.Start();
|
CommunicationMonitor.Start();
|
||||||
|
}
|
||||||
|
|
||||||
return base.CustomActivate();
|
#endregion
|
||||||
}
|
|
||||||
|
|
||||||
public void SetCommDebug(string s)
|
public void SetCommDebug(string s)
|
||||||
{
|
{
|
||||||
if (s == "1")
|
if (s == "1")
|
||||||
{
|
{
|
||||||
@@ -1199,7 +1244,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
Participants.CurrentParticipants = participants;
|
Participants.CurrentParticipants = participants;
|
||||||
|
|
||||||
// Update the share status of the meeting info
|
// Update the share status of the meeting info
|
||||||
var meetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, Participants.Host.Name, MeetingInfo.Password, MeetingInfo.ShareStatus);
|
var meetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, Participants.Host.Name, MeetingInfo.Password, MeetingInfo.ShareStatus, GetIsHostMyself(), MeetingInfo.IsSharingMeeting, MeetingInfo.WaitingForHost);
|
||||||
MeetingInfo = meetingInfo;
|
MeetingInfo = meetingInfo;
|
||||||
|
|
||||||
PrintCurrentCallParticipants();
|
PrintCurrentCallParticipants();
|
||||||
@@ -1261,11 +1306,16 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
var codecBookings = JsonConvert.DeserializeObject<List<zCommand.BookingsListResult>>(
|
var codecBookings = JsonConvert.DeserializeObject<List<zCommand.BookingsListResult>>(
|
||||||
responseObj.ToString());
|
responseObj.ToString());
|
||||||
|
|
||||||
if (codecBookings != null && codecBookings.Count > 0)
|
if (codecBookings != null && codecBookings.Count > 0)
|
||||||
{
|
{
|
||||||
CodecSchedule.Meetings = zCommand.GetGenericMeetingsFromBookingResult(
|
CodecSchedule.Meetings = zCommand.GetGenericMeetingsFromBookingResult(
|
||||||
codecBookings, CodecSchedule.MeetingWarningMinutes);
|
codecBookings, CodecSchedule.MeetingWarningMinutes);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//need to clear the list if it's empty
|
||||||
|
CodecSchedule.Meetings = new List<Meeting>();
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1394,15 +1444,40 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
}
|
}
|
||||||
case "needwaitforhost":
|
case "needwaitforhost":
|
||||||
{
|
{
|
||||||
var needWait =
|
Status.NeedWaitForHost = JsonConvert.DeserializeObject<zEvent.NeedWaitForHost>(responseObj.ToString());
|
||||||
JsonConvert.DeserializeObject<zEvent.NeedWaitForHost>(responseObj.ToString());
|
|
||||||
|
|
||||||
if (needWait.Wait)
|
Debug.Console(1, this, "NeedWaitForHost: {0}", Status.NeedWaitForHost.Wait);
|
||||||
{
|
|
||||||
// TODO: notify user to wait for host
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
if (Status.NeedWaitForHost.Wait)
|
||||||
|
{
|
||||||
|
if (MeetingInfo == null)
|
||||||
|
{
|
||||||
|
MeetingInfo = new MeetingInfo("Waiting For Host", "Waiting For Host", "Waiting For Host", "",
|
||||||
|
GetSharingStatus(), false, false, true);
|
||||||
|
|
||||||
|
UpdateCallStatus();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
MeetingInfo = new MeetingInfo("Waiting For Host", "Waiting For Host", "Waiting For Host", "",
|
||||||
|
GetSharingStatus(), false, false, true);
|
||||||
|
|
||||||
|
UpdateCallStatus();
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (MeetingInfo == null)
|
||||||
|
{
|
||||||
|
MeetingInfo = new MeetingInfo("Waiting For Host", "Waiting For Host", "Waiting For Host", "",
|
||||||
|
GetSharingStatus(), false, false, false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
MeetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, MeetingInfo.Host, MeetingInfo.Password,
|
||||||
|
GetSharingStatus(), GetIsHostMyself(), false, false);
|
||||||
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case "openvideofailforhoststop":
|
case "openvideofailforhoststop":
|
||||||
{
|
{
|
||||||
@@ -1478,6 +1553,18 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case "startlocalpresentmeeting":
|
||||||
|
{
|
||||||
|
var result = JsonConvert.DeserializeObject<zEvent.StartLocalPresentMeeting>(responseObj.ToString());
|
||||||
|
|
||||||
|
if (result.Success)
|
||||||
|
{
|
||||||
|
MeetingInfo = new MeetingInfo("", "", "", "", "", true, true, MeetingInfo.WaitingForHost);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
@@ -1595,7 +1682,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "Error Deserializing feedback: {0}", ex);
|
Debug.Console(1, this, "Error Deserializing feedback: {0}", ex.Message);
|
||||||
|
Debug.Console(2, this, "{0}", ex);
|
||||||
|
|
||||||
|
if (ex.InnerException != null)
|
||||||
|
{
|
||||||
|
Debug.Console(1, this,"Error Deserializing feedback inner exception: {0}", ex.InnerException.Message);
|
||||||
|
Debug.Console(2, this, "{0}", ex.InnerException.StackTrace);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1655,8 +1749,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void UpdateCallStatus()
|
private void UpdateCallStatus()
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "[UpdateCallStatus] Current Call Status: {0}",
|
Debug.Console(1, this,
|
||||||
Status.Call != null ? Status.Call.Status.ToString() : "no call");
|
"[UpdateCallStatus] Current Call Status: {0} Active Call Count: {1} Need Wait For Host: {2}",
|
||||||
|
Status.Call != null ? Status.Call.Status.ToString() : "no call", ActiveCalls.Count, Status.NeedWaitForHost.Wait);
|
||||||
|
|
||||||
if (Status.Call != null)
|
if (Status.Call != null)
|
||||||
{
|
{
|
||||||
@@ -1701,17 +1796,32 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
Type = eCodecCallType.Video,
|
Type = eCodecCallType.Video,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (!String.IsNullOrEmpty(_lastDialedMeetingNumber))
|
||||||
|
{
|
||||||
|
_lastDialedMeetingNumber = String.Empty;
|
||||||
|
}
|
||||||
ActiveCalls.Add(newCall);
|
ActiveCalls.Add(newCall);
|
||||||
|
|
||||||
//Debug.Console(1, this, "[UpdateCallStatus] IF w/ meeting_id AcitveCalls.Count == {1} - Current Call Status: {0}",
|
|
||||||
//Status.Call != null ? Status.Call.Status.ToString() : "no call", ActiveCalls.Count);
|
|
||||||
|
|
||||||
OnCallStatusChange(newCall);
|
OnCallStatusChange(newCall);
|
||||||
}
|
} else if (String.IsNullOrEmpty(Status.Call.Info.meeting_id) && Status.NeedWaitForHost.Wait)
|
||||||
else
|
|
||||||
{
|
{
|
||||||
//Debug.Console(1, this, "[UpdateCallStatus] IF w/o meeting_id AcitveCalls.Count == {1} - Current Call Status: {0}",
|
var newCall = new CodecActiveCallItem
|
||||||
//Status.Call != null ? Status.Call.Status.ToString() : "no call", ActiveCalls.Count);
|
{
|
||||||
|
Name = "Waiting For Host",
|
||||||
|
Number = "Waiting For Host",
|
||||||
|
Id = "Waiting For Host",
|
||||||
|
Status = newStatus,
|
||||||
|
Type = eCodecCallType.Video,
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!String.IsNullOrEmpty(_lastDialedMeetingNumber))
|
||||||
|
{
|
||||||
|
_lastDialedMeetingNumber = String.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
ActiveCalls.Add(newCall);
|
||||||
|
|
||||||
|
OnCallStatusChange(newCall);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1722,15 +1832,24 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
switch (callStatus)
|
switch (callStatus)
|
||||||
{
|
{
|
||||||
case zStatus.eCallStatus.IN_MEETING:
|
case zStatus.eCallStatus.IN_MEETING:
|
||||||
|
if (Status.NeedWaitForHost.Wait)
|
||||||
|
{
|
||||||
|
Status.NeedWaitForHost.Wait = false;
|
||||||
|
}
|
||||||
existingCall.Status = eCodecCallStatus.Connected;
|
existingCall.Status = eCodecCallStatus.Connected;
|
||||||
break;
|
break;
|
||||||
case zStatus.eCallStatus.NOT_IN_MEETING:
|
case zStatus.eCallStatus.NOT_IN_MEETING:
|
||||||
|
if (Status.NeedWaitForHost.Wait)
|
||||||
|
{
|
||||||
|
Status.NeedWaitForHost.Wait = false;
|
||||||
|
}
|
||||||
existingCall.Status = eCodecCallStatus.Disconnected;
|
existingCall.Status = eCodecCallStatus.Disconnected;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug.Console(1, this, "[UpdateCallStatus] ELSE ActiveCalls.Count == {1} - Current Call Status: {0}",
|
Debug.Console(1, this, "[UpdateCallStatus] ELSE ActiveCalls.Count == {1} - Current Call Status: {0}",
|
||||||
Status.Call != null ? Status.Call.Status.ToString() : "no call", ActiveCalls.Count);
|
Status.Call != null ? Status.Call.Status.ToString() : "no call", ActiveCalls.Count);
|
||||||
|
|
||||||
|
|
||||||
OnCallStatusChange(existingCall);
|
OnCallStatusChange(existingCall);
|
||||||
}
|
}
|
||||||
@@ -1769,8 +1888,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
|
|
||||||
protected override void OnCallStatusChange(CodecActiveCallItem item)
|
protected override void OnCallStatusChange(CodecActiveCallItem item)
|
||||||
{
|
{
|
||||||
base.OnCallStatusChange(item);
|
|
||||||
|
|
||||||
if (item.Status == eCodecCallStatus.Connected)
|
if (item.Status == eCodecCallStatus.Connected)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -1784,10 +1901,15 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
Status.Call.Info.meeting_list_item.meetingName,
|
Status.Call.Info.meeting_list_item.meetingName,
|
||||||
host,
|
host,
|
||||||
Status.Call.Info.meeting_password,
|
Status.Call.Info.meeting_password,
|
||||||
GetSharingStatus()
|
GetSharingStatus(),
|
||||||
|
GetIsHostMyself(),
|
||||||
|
!String.Equals(Status.Call.Info.meeting_type,"NORMAL"),
|
||||||
|
false
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
base.OnCallStatusChange(item);
|
||||||
|
|
||||||
Debug.Console(1, this, "[OnCallStatusChange] Current Call Status: {0}",
|
Debug.Console(1, this, "[OnCallStatusChange] Current Call Status: {0}",
|
||||||
Status.Call != null ? Status.Call.Status.ToString() : "no call");
|
Status.Call != null ? Status.Call.Status.ToString() : "no call");
|
||||||
|
|
||||||
@@ -1801,24 +1923,65 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
{
|
{
|
||||||
string sharingState = "None";
|
string sharingState = "None";
|
||||||
|
|
||||||
if (Status.Call.Sharing.State == zEvent.eSharingState.Receiving)
|
try
|
||||||
{
|
{
|
||||||
sharingState = "Receiving Content";
|
if (Status.Call.Sharing.State == zEvent.eSharingState.Receiving)
|
||||||
}
|
{
|
||||||
if (Status.Sharing.isAirHostClientConnected)
|
sharingState = "Receiving Content";
|
||||||
{
|
}
|
||||||
sharingState = "Sharing AirPlay";
|
if (Status.Sharing.isAirHostClientConnected)
|
||||||
}
|
{
|
||||||
if (Status.Sharing.isDirectPresentationConnected)
|
sharingState = "Sharing AirPlay";
|
||||||
{
|
}
|
||||||
sharingState = "Sharing Laptop";
|
if (Status.Sharing.isDirectPresentationConnected)
|
||||||
}
|
{
|
||||||
if (Status.Sharing.isSharingBlackMagic)
|
sharingState = "Sharing Laptop";
|
||||||
{
|
}
|
||||||
sharingState = "Sharing HDMI Source";
|
if (Status.Sharing.isSharingBlackMagic)
|
||||||
}
|
{
|
||||||
|
sharingState = "Sharing HDMI Source";
|
||||||
|
}
|
||||||
|
|
||||||
return sharingState;
|
return sharingState;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.Console(1, this, "Exception getting sharing status: {0}", e.Message);
|
||||||
|
Debug.Console(2, this, "{0}", e.StackTrace);
|
||||||
|
return sharingState;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Will return true if the host is myself (this zoom room)
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
private bool GetIsHostMyself()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (Participants.CurrentParticipants.Count == 0)
|
||||||
|
{
|
||||||
|
Debug.Console(2, this, "No current participants");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var host = Participants.Host;
|
||||||
|
|
||||||
|
if(host == null)
|
||||||
|
{
|
||||||
|
Debug.Console(2, this, "Host is currently null");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Debug.Console(2, this, "Host is: '{0}' IsMyself?: {1}", host.Name, host.IsMyself);
|
||||||
|
return host.IsMyself;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.Console(1, "Exception getting isHost: {0}", e.Message);
|
||||||
|
Debug.Console(2, "{0}", e.StackTrace);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void StartSharing()
|
public override void StartSharing()
|
||||||
@@ -1831,7 +1994,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public override void StopSharing()
|
public override void StopSharing()
|
||||||
{
|
{
|
||||||
SendText("zCommand Call Sharing Disconnect");
|
if (Status.Sharing.isSharingBlackMagic)
|
||||||
|
{
|
||||||
|
SendText("zCommand Call Sharing HDMI Stop");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SendText("zCommand Call Sharing Disconnect");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void PrivacyModeOn()
|
public override void PrivacyModeOn()
|
||||||
@@ -2117,11 +2287,13 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
public override void Dial(Meeting meeting)
|
public override void Dial(Meeting meeting)
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "Dialing meeting.Id: {0} Title: {1}", meeting.Id, meeting.Title);
|
Debug.Console(1, this, "Dialing meeting.Id: {0} Title: {1}", meeting.Id, meeting.Title);
|
||||||
|
_lastDialedMeetingNumber = meeting.Id;
|
||||||
SendText(string.Format("zCommand Dial Start meetingNumber: {0}", meeting.Id));
|
SendText(string.Format("zCommand Dial Start meetingNumber: {0}", meeting.Id));
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Dial(string number)
|
public override void Dial(string number)
|
||||||
{
|
{
|
||||||
|
Debug.Console(2, this, "Dialing number: {0}", number);
|
||||||
_lastDialedMeetingNumber = number;
|
_lastDialedMeetingNumber = number;
|
||||||
SendText(string.Format("zCommand Dial Join meetingNumber: {0}", number));
|
SendText(string.Format("zCommand Dial Join meetingNumber: {0}", number));
|
||||||
}
|
}
|
||||||
@@ -2832,7 +3004,37 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
|
||||||
|
#region Implementation of IHasPresentationOnlyMeeting
|
||||||
|
|
||||||
|
public void StartSharingOnlyMeeting()
|
||||||
|
{
|
||||||
|
StartSharingOnlyMeeting(eSharingMeetingMode.None, 30, String.Empty);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void StartSharingOnlyMeeting(eSharingMeetingMode mode)
|
||||||
|
{
|
||||||
|
StartSharingOnlyMeeting(mode, 30, String.Empty);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void StartSharingOnlyMeeting(eSharingMeetingMode mode, ushort duration)
|
||||||
|
{
|
||||||
|
StartSharingOnlyMeeting(mode, duration, String.Empty);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void StartSharingOnlyMeeting(eSharingMeetingMode mode, ushort duration, string password)
|
||||||
|
{
|
||||||
|
SendText(String.Format("zCommand Dial Sharing Duration: {0} DisplayState: {1} Password: {2}", duration, mode, password));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void StartNormalMeetingFromSharingOnlyMeeting()
|
||||||
|
{
|
||||||
|
Debug.Console(2, this, "Converting Sharing Meeting to Normal Meeting");
|
||||||
|
SendText("zCommand call sharing ToNormal");
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Zoom Room specific info object
|
/// Zoom Room specific info object
|
||||||
|
|||||||
@@ -25,5 +25,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
|
|
||||||
//This layout will be selected when a call is connected and no content is being shared
|
//This layout will be selected when a call is connected and no content is being shared
|
||||||
public string DefaultCallLayout { get; set; }
|
public string DefaultCallLayout { get; set; }
|
||||||
|
|
||||||
|
public int MinutesBeforeMeetingStart { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
<packages>
|
<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>
|
</packages>
|
||||||
Reference in New Issue
Block a user