Example #1
0
        /// <summary>
        /// CRiffParser constructor
        /// </summary>
        /// <param name="pStream">Stream to read from RIFF file</param>
        /// <param name="id">FOURCC of the RIFF container. Should be 'RIFF' or 'LIST'.</param>
        /// <param name="cbStartOfContainer">Start of the container, as an offset into the stream.</param>
        public CRiffParser(IMFByteStream pStream, FourCC id, long cbStartOfContainer)
        {
            m_chunk = new CRiffChunk();
            m_fccID = id;
            m_llContainerOffset = cbStartOfContainer;

            if (pStream == null)
            {
                throw new COMException("invalid IMFByteStream", E_Pointer);
            }
            else
            {
                m_pStream = pStream;

                ReadRiffHeader();
            }
        }
Example #2
0
        int m_dwBytesRemaining;      // How many bytes are left in this chunk?

        #endregion

        /// <summary>
        /// CRiffParser constructor
        /// </summary>
        /// <param name="pStream">Stream to read from RIFF file</param>
        /// <param name="id">FOURCC of the RIFF container. Should be 'RIFF' or 'LIST'.</param>
        /// <param name="cbStartOfContainer">Start of the container, as an offset into the stream.</param>
        public CRiffParser(IMFByteStream pStream, FourCC id, long cbStartOfContainer)
        {
            m_chunk             = new CRiffChunk();
            m_fccID             = id;
            m_llContainerOffset = cbStartOfContainer;

            if (pStream == null)
            {
                throw new COMException("invalid IMFByteStream", (int)HResult.E_POINTER);
            }
            else
            {
                m_pStream = pStream;

                ReadRiffHeader();
            }
        }