/// <summary> /// Opens a media stream. /// </summary> /// <param name="stream">A stream of the multimedia file.</param> /// <param name="options">The decoder settings.</param> /// <returns>The opened <see cref="MediaFile"/>.</returns> public static MediaFile Open(Stream stream, MediaOptions options) { try { var container = InputContainer.LoadStream(stream, options); return(new MediaFile(container, options)); } catch (Exception ex) { throw new Exception("Failed to open the media stream", ex); } }