mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-07 16:55:04 +00:00
Update to support Cisco Codec External Sources using Essentials Room logic.
Adds new interface for Codecs IHasExternalSourceSwitching Adds ability to set and clear External Sources in Cisco Spark device class Adds ability to send sources from the source list to the Cisco Spark in the "EssentialsHuddleVtc1Room" room [ ] still needs parsing when source is selected on the Cisco touch 10
This commit is contained in:
@@ -51,7 +51,19 @@ namespace PepperDash.Essentials.Core
|
||||
/// <summary>
|
||||
/// The config name of the source list
|
||||
/// </summary>
|
||||
public string SourceListKey { get; set; }
|
||||
///
|
||||
protected string _SourceListKey;
|
||||
public virtual string SourceListKey {
|
||||
get
|
||||
{
|
||||
return _SourceListKey;
|
||||
}
|
||||
set
|
||||
{
|
||||
_SourceListKey = value;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Timer used for informing the UIs of a shutdown
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using PepperDash.Essentials.Core;
|
||||
namespace PepperDash.Essentials.Devices.Common.Codec
|
||||
{
|
||||
public interface IHasExternalSourceSwitching
|
||||
{
|
||||
bool ExternalSourceListEnabled { get; }
|
||||
void AddExternalSource(string connectorId, string name);
|
||||
void ClearExternalSources();
|
||||
Action<string, string> RunRouteAction { set;}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -112,6 +112,7 @@
|
||||
<Compile Include="Codec\eCodecCallStatus.cs" />
|
||||
<Compile Include="Codec\eMeetingPrivacy.cs" />
|
||||
<Compile Include="Codec\iCodecAudio.cs" />
|
||||
<Compile Include="Codec\IHasExternalSourceSwitching.cs" />
|
||||
<Compile Include="ImageProcessors\TVOneCorio.cs" />
|
||||
<Compile Include="ImageProcessors\TVOneCorioPropertiesConfig.cs" />
|
||||
<Compile Include="Power Controllers\Digitallogger.cs" />
|
||||
|
||||
@@ -15,16 +15,16 @@ using PepperDash.Essentials.Core.Config;
|
||||
using PepperDash.Essentials.Core.Routing;
|
||||
using PepperDash.Essentials.Devices.Common.Cameras;
|
||||
using PepperDash.Essentials.Devices.Common.Codec;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Devices.Common.VideoCodec;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
{
|
||||
enum eCommandType { SessionStart, SessionEnd, Command, GetStatus, GetConfiguration };
|
||||
public enum eExternalSourceType {camera, desktop, document_camera, mediaplayer, PC, whiteboard, other}
|
||||
|
||||
public class CiscoSparkCodec : VideoCodecBase, IHasCallHistory, IHasCallFavorites, IHasDirectory,
|
||||
IHasScheduleAwareness, IOccupancyStatusProvider, IHasCodecLayouts, IHasCodecSelfView,
|
||||
ICommunicationMonitor, IRouting, IHasCodecCameras, IHasCameraAutoMode, IHasCodecRoomPresets
|
||||
ICommunicationMonitor, IRouting, IHasCodecCameras, IHasCameraAutoMode, IHasCodecRoomPresets, IHasExternalSourceSwitching
|
||||
{
|
||||
public event EventHandler<DirectoryEventArgs> DirectoryResultReturned;
|
||||
|
||||
@@ -348,6 +348,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
|
||||
CallHistory = new CodecCallHistory();
|
||||
|
||||
|
||||
if (props.Favorites != null)
|
||||
{
|
||||
CallFavorites = new CodecCallFavorites();
|
||||
@@ -398,6 +399,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
SetUpCameras();
|
||||
|
||||
CreateOsdSource();
|
||||
|
||||
if (props.ExternalSourceListEnabled != null)
|
||||
{
|
||||
ExternalSourceListEnabled = props.ExternalSourceListEnabled;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -472,7 +478,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
prefix + "/Bookings" + Delimiter +
|
||||
prefix + "/Event/CallDisconnect" + Delimiter +
|
||||
prefix + "/Event/Bookings" + Delimiter +
|
||||
prefix + "/Event/CameraPresetListUpdated" + Delimiter;
|
||||
prefix + "/Event/CameraPresetListUpdated" + Delimiter +
|
||||
prefix + "/Event/UserInterface/Presentation/ExternalSource/Selected/SourceIdentifier" + Delimiter;
|
||||
|
||||
return base.CustomActivate();
|
||||
}
|
||||
@@ -629,6 +636,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
}
|
||||
}
|
||||
}
|
||||
//TODO JTA FInish Parsing for External Sources
|
||||
if (args.Text == "ExternalSource")
|
||||
{
|
||||
RunRouteAction("", "");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1802,9 +1814,57 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
SendText(string.Format("xCommand Call FarEndControl RoomPreset Activate CallId: {0} PresetId: {1}", GetCallId(), preset));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
#region IHasExternalSourceSwitching Members
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool ExternalSourceListEnabled
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
public void AddExternalSource(string connectorId, string name)
|
||||
{
|
||||
int id = 2;
|
||||
if (connectorId.ToLower() == "hdmiin3")
|
||||
{
|
||||
id = 3;
|
||||
}
|
||||
SendText(string.Format("xCommand UserInterface Presentation ExternalSource Add ConnectorId: {0} SourceIdentifier: \"{1}\" Name: \"{2}\" Type: desktop", id, name, name));
|
||||
Debug.Console(2, this, "Adding ExternalSource {0} {1}", connectorId, name);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public void ClearExternalSources()
|
||||
{
|
||||
SendText("xCommand UserInterface Presentation ExternalSource RemoveAll");
|
||||
|
||||
}
|
||||
|
||||
|
||||
public Action<string, string> RunRouteAction { private get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
#region ExternalDevices
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Represents a codec command that might need to have a friendly label applied for UI feedback purposes
|
||||
/// </summary>
|
||||
public class CodecCommandWithLabel
|
||||
|
||||
@@ -1,47 +1,50 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.Codec
|
||||
{
|
||||
public class CiscoSparkCodecPropertiesConfig
|
||||
{
|
||||
[JsonProperty("communicationMonitorProperties")]
|
||||
public CommunicationMonitorConfig CommunicationMonitorProperties { get; set; }
|
||||
|
||||
[JsonProperty("favorites")]
|
||||
public List<CodecActiveCallItem> Favorites { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Valid values: "Local" or "Corporate"
|
||||
/// </summary>
|
||||
[JsonProperty("phonebookMode")]
|
||||
public string PhonebookMode { get; set; }
|
||||
|
||||
[JsonProperty("showSelfViewByDefault")]
|
||||
public bool ShowSelfViewByDefault { get; set; }
|
||||
|
||||
[JsonProperty("sharing")]
|
||||
public SharingProperties Sharing { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Optionsal property to set the limit of any phonebook queries for directory or searching
|
||||
/// </summary>
|
||||
[JsonProperty("phonebookResultsLimit")]
|
||||
public uint PhonebookResultsLimit { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class SharingProperties
|
||||
{
|
||||
[JsonProperty("autoShareContentWhileInCall")]
|
||||
public bool AutoShareContentWhileInCall { get; set; }
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.Codec
|
||||
{
|
||||
public class CiscoSparkCodecPropertiesConfig
|
||||
{
|
||||
[JsonProperty("communicationMonitorProperties")]
|
||||
public CommunicationMonitorConfig CommunicationMonitorProperties { get; set; }
|
||||
|
||||
[JsonProperty("favorites")]
|
||||
public List<CodecActiveCallItem> Favorites { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Valid values: "Local" or "Corporate"
|
||||
/// </summary>
|
||||
[JsonProperty("phonebookMode")]
|
||||
public string PhonebookMode { get; set; }
|
||||
|
||||
[JsonProperty("showSelfViewByDefault")]
|
||||
public bool ShowSelfViewByDefault { get; set; }
|
||||
|
||||
[JsonProperty("sharing")]
|
||||
public SharingProperties Sharing { get; set; }
|
||||
|
||||
[JsonProperty("externalSourceListEnabled")]
|
||||
public bool ExternalSourceListEnabled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Optionsal property to set the limit of any phonebook queries for directory or searching
|
||||
/// </summary>
|
||||
[JsonProperty("phonebookResultsLimit")]
|
||||
public uint PhonebookResultsLimit { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class SharingProperties
|
||||
{
|
||||
[JsonProperty("autoShareContentWhileInCall")]
|
||||
public bool AutoShareContentWhileInCall { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user