/// <summary> /// Gets all video qualities available in a <see cref="MediaStreamInfoSet"/>. /// </summary> public static IEnumerable <VideoQuality> GetAllVideoQualities(this MediaStreamInfoSet streamInfoSet) { streamInfoSet.EnsureNotNull(nameof(streamInfoSet)); var qualities = new HashSet <VideoQuality>(); foreach (var streamInfo in streamInfoSet.Muxed) { qualities.Add(streamInfo.VideoQuality); } foreach (var streamInfo in streamInfoSet.Video) { qualities.Add(streamInfo.VideoQuality); } return(qualities); }
/// <summary> /// Gets all available media stream infos in a <see cref="MediaStreamInfoSet"/>. /// </summary> public static IEnumerable <MediaStreamInfo> GetAll(this MediaStreamInfoSet streamInfoSet) { streamInfoSet.EnsureNotNull(nameof(streamInfoSet)); foreach (var streamInfo in streamInfoSet.Muxed) { yield return(streamInfo); } foreach (var streamInfo in streamInfoSet.Audio) { yield return(streamInfo); } foreach (var streamInfo in streamInfoSet.Video) { yield return(streamInfo); } }