mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-03 14:55:05 +00:00
Merge pull request #1179 from PepperDash/feature-2.0.0/soft-codec-routing
Update interfaces for Generic Soft Codec device
This commit is contained in:
@@ -22,7 +22,7 @@ namespace PepperDash.Essentials.Core
|
||||
/// </summary>
|
||||
public interface IHasDefaultDisplay
|
||||
{
|
||||
IRoutingSinkWithSwitching DefaultDisplay { get; }
|
||||
IRoutingSink DefaultDisplay { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -30,7 +30,7 @@ namespace PepperDash.Essentials.Core
|
||||
/// </summary>
|
||||
public interface IHasMultipleDisplays
|
||||
{
|
||||
Dictionary<eSourceListItemDestinationTypes, IRoutingSinkWithSwitching> Displays { get; }
|
||||
Dictionary<eSourceListItemDestinationTypes, IRoutingSink> Displays { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -11,7 +11,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.SoftCodec
|
||||
{
|
||||
public class GenericSoftCodec : EssentialsDevice, IRoutingInputsOutputs
|
||||
public class GenericSoftCodec : EssentialsDevice, IRoutingSource, IRoutingSink
|
||||
{
|
||||
public GenericSoftCodec(string key, string name, GenericSoftCodecProperties props) : base(key, name)
|
||||
{
|
||||
@@ -48,6 +48,32 @@ namespace PepperDash.Essentials.Devices.Common.SoftCodec
|
||||
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
||||
|
||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||
public string CurrentSourceInfoKey { get ; set; }
|
||||
public SourceListItem CurrentSourceInfo
|
||||
{
|
||||
get
|
||||
{
|
||||
return _CurrentSourceInfo;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value == _CurrentSourceInfo) return;
|
||||
|
||||
var handler = CurrentSourceChange;
|
||||
|
||||
if (handler != null)
|
||||
handler(_CurrentSourceInfo, ChangeType.WillChange);
|
||||
|
||||
_CurrentSourceInfo = value;
|
||||
|
||||
if (handler != null)
|
||||
handler(_CurrentSourceInfo, ChangeType.DidChange);
|
||||
}
|
||||
}
|
||||
|
||||
SourceListItem _CurrentSourceInfo;
|
||||
|
||||
public event SourceInfoChangeHandler CurrentSourceChange;
|
||||
}
|
||||
|
||||
public class GenericSoftCodecProperties
|
||||
|
||||
Reference in New Issue
Block a user