mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-17 05:35:03 +00:00
fix: requested changes for PR #967
This commit is contained in:
@@ -1073,7 +1073,7 @@ ConnectorID: {2}"
|
|||||||
CodecStatus.Status.RoomPreset = existingRoomPresets;
|
CodecStatus.Status.RoomPreset = existingRoomPresets;
|
||||||
|
|
||||||
// Generecise the list
|
// Generecise the list
|
||||||
NearEndPresets = RoomPresets.GetGenericPresets(existingRoomPresets).Select(a =>(CodecRoomPreset)a).ToList();
|
NearEndPresets = existingRoomPresets.GetGenericPresets<CodecRoomPreset>();
|
||||||
|
|
||||||
var handler = CodecRoomPresetsListHasChanged;
|
var handler = CodecRoomPresetsListHasChanged;
|
||||||
if (handler != null)
|
if (handler != null)
|
||||||
|
|||||||
@@ -32,14 +32,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="presets"></param>
|
/// <param name="presets"></param>
|
||||||
/// <returns></returns>
|
/// <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
|
return
|
||||||
presets.Select(preset => preset.ReturnConvertedCodecPreset())
|
presets.Select(preset => preset.ConvertCodecPreset())
|
||||||
.Where(newPreset => newPreset != null)
|
.Where(newPreset => newPreset != null)
|
||||||
|
.Cast<T>()
|
||||||
.ToList();
|
.ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2200,7 +2200,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
Type = new Type5();
|
Type = new Type5();
|
||||||
}
|
}
|
||||||
|
|
||||||
public PresetBase ReturnConvertedCodecPreset()
|
public PresetBase ConvertCodecPreset()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,6 +4,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
{
|
{
|
||||||
public interface IConvertiblePreset
|
public interface IConvertiblePreset
|
||||||
{
|
{
|
||||||
PresetBase ReturnConvertedCodecPreset();
|
PresetBase ConvertCodecPreset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2000,8 +2000,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class CodecCommandWithLabel
|
public class CodecCommandWithLabel
|
||||||
{
|
{
|
||||||
public string Command { get; set; }
|
public string Command { get; private set; }
|
||||||
public string Label { get; set; }
|
public string Label { get; private set; }
|
||||||
|
|
||||||
public CodecCommandWithLabel(string command, string label)
|
public CodecCommandWithLabel(string command, string label)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user