コード例 #1
0
ファイル: MpaFrame.cs プロジェクト: NeWbY100/AudioVideoLib
        ////------------------------------------------------------------------------------------------------------------------------------
        /// <summary>
        /// Reads a <see cref="MpaFrame"/> from a <see cref="Stream"/>.
        /// </summary>
        /// <param name="stream">The stream.</param>
        /// <returns>
        /// true if found; otherwise, null.
        /// </returns>
        /// <exception cref="System.ArgumentNullException">Thrown if stream is null.</exception>
        public static MpaFrame ReadFrame(Stream stream)
        {
            if (stream == null)
                throw new ArgumentNullException("stream");

            MpaFrame frame = new MpaFrame();
            return frame.ReadFrame(stream as StreamBuffer ?? new StreamBuffer(stream)) ? frame : null;
        }