public CWavByteStreamHandler()
 {
     m_Log = new xLog("CWavByteStreamHandler");
 }
示例#2
0
        public void Dispose()
        {
            if (m_pRiff != null)
            {
                m_pRiff.Dispose();
                m_pRiff = null;
            }

            if (m_pStream != null)
            {
                m_pStream.Dispose();
                m_pStream = null;
            }

            if (m_pEventQueue != null)
            {
                Marshal.ReleaseComObject(m_pEventQueue);
                m_pEventQueue = null;
            }

            if (m_pPresentationDescriptor != null)
            {
                Marshal.ReleaseComObject(m_pPresentationDescriptor);
                m_pPresentationDescriptor = null;
            }

            if (m_Log != null)
            {
                m_Log.Dispose();
                m_Log = null;
            }
            GC.SuppressFinalize(this);
        }
示例#3
0
        public void Dispose()
        {
            if (m_Riff != null)
            {
                m_Riff.Dispose();
                m_Riff = null;
            }

            if (m_pEventQueue != null)
            {
                Marshal.ReleaseComObject(m_pEventQueue);
                m_pEventQueue = null;
            }

            if (m_pSource != null)
            {
                //m_pSource.Dispose(); Children don't dispose their parents...
                m_pSource = null;
            }

            if (m_pStreamDescriptor != null)
            {
                Marshal.ReleaseComObject(m_pStreamDescriptor);
                m_pStreamDescriptor = null;
            }
            if (m_Log != null)
            {
                m_Log.Dispose();
                m_Log = null;
            }
            GC.SuppressFinalize(this);
        }
示例#4
0
        State m_state; // Current state (running, stopped, paused)

        #endregion Fields

        #region Constructors

        public WavSource()
        {
            int hr;
            m_Log = new xLog("WavSource");
            m_state = State.Stopped;

            // Create the media event queue.
            hr = MFExtern.MFCreateEventQueue(out m_pEventQueue);
            MFError.ThrowExceptionForHR(hr);
        }
示例#5
0
        long m_rtCurrentPosition; // Current position in the stream, in 100-ns units

        #endregion Fields

        #region Constructors

        public WavStream(WavSource pSource, CWavRiffParser pRiff, IMFStreamDescriptor pSD)
        {
            int hr;
            m_pEventQueue = null;
            m_Log = new xLog("WavStream");
            #if false
            m_nRefCount(0),
            m_IsShutdown(false),
            m_rtCurrentPosition(0),
            m_discontinuity(false),
            m_EOS(false)
            #endif

            m_pSource = pSource;

            m_pStreamDescriptor = pSD;

            m_Riff = pRiff;

            // Create the media event queue.
            hr = MFExternAlt.MFCreateEventQueue(out m_pEventQueue);
            MFError.ThrowExceptionForHR(hr);
        }