public static bool IsStreamSelected(this IAMStreamSelect pStreamSelect, int index) { var result = false; int count; var hr = pStreamSelect.Count(out count); if (DsHlp.SUCCEEDED(hr) && count > index) { var stream = pStreamSelect.GetSelectableStream(index); if (stream != null) { result = stream.Enabled; } } return(result); }
public static IEnumerable <SelectableStream> GetSelectableStreams(this IAMStreamSelect pStreamSelect) { var result = new List <SelectableStream>(); int count; var hr = pStreamSelect.Count(out count); if (DsHlp.SUCCEEDED(hr) && count > 0) { for (var i = 0; i < count; i++) { var stream = pStreamSelect.GetSelectableStream(i); if (stream != null) { result.Add(stream); } } } return(result); }