using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace FileFlows.VideoNodes; /// /// Interface for track selection /// public interface ITrackSelectionNode { [TextVariable(12)] public string Title { get; set; } [TextVariable(13)] public string Codec { get; set; } [Boolean(16)] public bool NotMatching { get; set; } } public interface ITrackSelectionLanguage : ITrackSelectionNode { [TextVariable(14)] public string Language { get; set; } } /// /// Interface for track selection with stream option /// public interface ITrackStreamSelectionNode { [Select(nameof(StreamTypeOptions), 11)] public string StreamType { get; set; } private static List _StreamTypeOptions; public static List StreamTypeOptions { get { if (_StreamTypeOptions == null) { _StreamTypeOptions = new List { new ListOption { Label = "Audio", Value = "Audio" }, new ListOption { Label = "Video", Value = "Video" }, new ListOption { Label = "Subtitle", Value = "Subtitle" } }; } return _StreamTypeOptions; } } [ConditionEquals(nameof(StreamType), "Video", inverse: true)] [TextVariable(14)] public string Language { get; set; } [ConditionEquals(nameof(StreamType), "Audio")] [NumberFloat(17)] public float Channels { get; set; } } /// /// Interface for audio track selection /// public interface ITrackAudioSelectionNode : ITrackSelectionLanguage { [NumberFloat(17)] public float Channels { get; set; } }