/// <summary> /// Flushes one or more streams. /// </summary> /// <param name="sourceReader">A valid IMFSourceReader instance.</param></param> /// <param name="streamIndex">The streamIndex(s) to flush.</param> /// <returns>If this function succeeds, it returns the S_OK member. Otherwise, it returns another HResult's member that describe the error.</returns> public static HResult Flush(this IMFSourceReader sourceReader, SourceReaderStreams stream) { if (sourceReader == null) { throw new ArgumentNullException("sourceReader"); } return(sourceReader.Flush((int)stream)); }