mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-13 11:44:54 +00:00
Merge pull request #684 from PepperDash/release/v1.8.3
add flags on both ends to prevent input switching loop
This commit is contained in:
@@ -19,7 +19,8 @@ namespace PepperDash.Essentials
|
|||||||
{
|
{
|
||||||
public class EssentialsHuddleVtc1Room : EssentialsRoomBase, IHasCurrentSourceInfoChange,
|
public class EssentialsHuddleVtc1Room : EssentialsRoomBase, IHasCurrentSourceInfoChange,
|
||||||
IPrivacy, IHasCurrentVolumeControls, IRunRouteAction, IRunDefaultCallRoute, IHasVideoCodec, IHasAudioCodec, IHasDefaultDisplay, IHasInCallFeedback
|
IPrivacy, IHasCurrentVolumeControls, IRunRouteAction, IRunDefaultCallRoute, IHasVideoCodec, IHasAudioCodec, IHasDefaultDisplay, IHasInCallFeedback
|
||||||
{
|
{
|
||||||
|
private bool _codecExternalSourceChange;
|
||||||
public event EventHandler<VolumeDeviceChangeEventArgs> CurrentVolumeDeviceChange;
|
public event EventHandler<VolumeDeviceChangeEventArgs> CurrentVolumeDeviceChange;
|
||||||
public event SourceInfoChangeHandler CurrentSourceChange;
|
public event SourceInfoChangeHandler CurrentSourceChange;
|
||||||
|
|
||||||
@@ -178,10 +179,12 @@ namespace PepperDash.Essentials
|
|||||||
handler(_CurrentSourceInfo, ChangeType.DidChange);
|
handler(_CurrentSourceInfo, ChangeType.DidChange);
|
||||||
|
|
||||||
var vc = VideoCodec as IHasExternalSourceSwitching;
|
var vc = VideoCodec as IHasExternalSourceSwitching;
|
||||||
if (vc != null)
|
if (vc != null && !_codecExternalSourceChange)
|
||||||
{
|
{
|
||||||
vc.SetSelectedSource(CurrentSourceInfoKey);
|
vc.SetSelectedSource(CurrentSourceInfoKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_codecExternalSourceChange = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SourceListItem _CurrentSourceInfo;
|
SourceListItem _CurrentSourceInfo;
|
||||||
@@ -421,6 +424,12 @@ namespace PepperDash.Essentials
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void RunRouteActionCodec(string routeKey, string sourceListKey)
|
||||||
|
{
|
||||||
|
_codecExternalSourceChange = true;
|
||||||
|
RunRouteAction(routeKey, sourceListKey);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -750,7 +759,7 @@ namespace PepperDash.Essentials
|
|||||||
x => x.DestinationKey == VideoCodec.Key && x.DestinationPort == videoCodecWithExternalSwitching.ExternalSourceInputPort).DestinationPort;
|
x => x.DestinationKey == VideoCodec.Key && x.DestinationPort == videoCodecWithExternalSwitching.ExternalSourceInputPort).DestinationPort;
|
||||||
|
|
||||||
videoCodecWithExternalSwitching.ClearExternalSources();
|
videoCodecWithExternalSwitching.ClearExternalSources();
|
||||||
videoCodecWithExternalSwitching.RunRouteAction = RunRouteAction;
|
videoCodecWithExternalSwitching.RunRouteAction = RunRouteActionCodec;
|
||||||
var srcList = ConfigReader.ConfigObject.SourceLists.SingleOrDefault(x => x.Key == SourceListKey).Value.OrderBy(kv => kv.Value.Order); ;
|
var srcList = ConfigReader.ConfigObject.SourceLists.SingleOrDefault(x => x.Key == SourceListKey).Value.OrderBy(kv => kv.Value.Order); ;
|
||||||
|
|
||||||
foreach (var kvp in srcList)
|
foreach (var kvp in srcList)
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
IHasScheduleAwareness, IOccupancyStatusProvider, IHasCodecLayouts, IHasCodecSelfView,
|
IHasScheduleAwareness, IOccupancyStatusProvider, IHasCodecLayouts, IHasCodecSelfView,
|
||||||
ICommunicationMonitor, IRouting, IHasCodecCameras, IHasCameraAutoMode, IHasCodecRoomPresets, IHasExternalSourceSwitching, IHasBranding, IHasCameraOff, IHasCameraMute
|
ICommunicationMonitor, IRouting, IHasCodecCameras, IHasCameraAutoMode, IHasCodecRoomPresets, IHasExternalSourceSwitching, IHasBranding, IHasCameraOff, IHasCameraMute
|
||||||
{
|
{
|
||||||
|
private bool _externalSourceChangeRequested;
|
||||||
|
|
||||||
public event EventHandler<DirectoryEventArgs> DirectoryResultReturned;
|
public event EventHandler<DirectoryEventArgs> DirectoryResultReturned;
|
||||||
|
|
||||||
private CTimer _brandingTimer;
|
private CTimer _brandingTimer;
|
||||||
@@ -961,10 +963,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
JsonConvert.PopulateObject(response, eventReceived);
|
JsonConvert.PopulateObject(response, eventReceived);
|
||||||
Debug.Console(2, this, "*** Got an External Source Selection {0} {1}", eventReceived, eventReceived.Event.UserInterface, eventReceived.Event.UserInterface.Presentation.ExternalSource.Selected.SourceIdentifier.Value);
|
Debug.Console(2, this, "*** Got an External Source Selection {0} {1}", eventReceived, eventReceived.Event.UserInterface, eventReceived.Event.UserInterface.Presentation.ExternalSource.Selected.SourceIdentifier.Value);
|
||||||
|
|
||||||
if (RunRouteAction != null)
|
if (RunRouteAction != null && !_externalSourceChangeRequested)
|
||||||
{
|
{
|
||||||
RunRouteAction(eventReceived.Event.UserInterface.Presentation.ExternalSource.Selected.SourceIdentifier.Value, null);
|
RunRouteAction(eventReceived.Event.UserInterface.Presentation.ExternalSource.Selected.SourceIdentifier.Value, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_externalSourceChangeRequested = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (response.IndexOf("\"CommandResponse\":{") > -1 || response.IndexOf("\"CommandResponse\": {") > -1)
|
else if (response.IndexOf("\"CommandResponse\":{") > -1 || response.IndexOf("\"CommandResponse\": {") > -1)
|
||||||
@@ -1994,6 +1998,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
public void SetSelectedSource(string key)
|
public void SetSelectedSource(string key)
|
||||||
{
|
{
|
||||||
SendText(string.Format("xCommand UserInterface Presentation ExternalSource Select SourceIdentifier: {0}", key));
|
SendText(string.Format("xCommand UserInterface Presentation ExternalSource Select SourceIdentifier: {0}", key));
|
||||||
|
_externalSourceChangeRequested = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user