mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 12:06:58 +00:00
fix: requested changes for PR #967
This commit is contained in:
parent
cbab051c11
commit
04e8508c0c
5 changed files with 8 additions and 10 deletions
|
|
@ -1073,7 +1073,7 @@ ConnectorID: {2}"
|
|||
CodecStatus.Status.RoomPreset = existingRoomPresets;
|
||||
|
||||
// Generecise the list
|
||||
NearEndPresets = RoomPresets.GetGenericPresets(existingRoomPresets).Select(a =>(CodecRoomPreset)a).ToList();
|
||||
NearEndPresets = existingRoomPresets.GetGenericPresets<CodecRoomPreset>();
|
||||
|
||||
var handler = CodecRoomPresetsListHasChanged;
|
||||
if (handler != null)
|
||||
|
|
|
|||
|
|
@ -32,14 +32,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||
/// </summary>
|
||||
/// <param name="presets"></param>
|
||||
/// <returns></returns>
|
||||
public static List<PresetBase> GetGenericPresets(List<IConvertiblePreset> presets)
|
||||
public static List<T> GetGenericPresets<T>(this List<IConvertiblePreset> presets)
|
||||
{
|
||||
Debug.Console(2, "Presets List:");
|
||||
|
||||
|
||||
return
|
||||
presets.Select(preset => preset.ReturnConvertedCodecPreset())
|
||||
presets.Select(preset => preset.ConvertCodecPreset())
|
||||
.Where(newPreset => newPreset != null)
|
||||
.Cast<T>()
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2200,7 +2200,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||
Type = new Type5();
|
||||
}
|
||||
|
||||
public PresetBase ReturnConvertedCodecPreset()
|
||||
public PresetBase ConvertCodecPreset()
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||
{
|
||||
public interface IConvertiblePreset
|
||||
{
|
||||
PresetBase ReturnConvertedCodecPreset();
|
||||
PresetBase ConvertCodecPreset();
|
||||
}
|
||||
}
|
||||
|
|
@ -2000,8 +2000,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||
/// </summary>
|
||||
public class CodecCommandWithLabel
|
||||
{
|
||||
public string Command { get; set; }
|
||||
public string Label { get; set; }
|
||||
public string Command { get; private set; }
|
||||
public string Label { get; private set; }
|
||||
|
||||
public CodecCommandWithLabel(string command, string label)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue