Ejemplo n.º 1
0
        public static void Close()
        {
            // Free unmanaged memory
            if (m_FlippedFrameBuffer != IntPtr.Zero)
            {
                Marshal.FreeHGlobal(m_FlippedFrameBuffer);
                m_FlippedFrameBuffer = IntPtr.Zero;
            }

            // Release the compressed stream
            if (m_StreamCompressed != IntPtr.Zero)
            {
                NM.AVIStreamRelease(m_StreamCompressed);
                m_StreamCompressed = IntPtr.Zero;
            }

            // Release the stream
            if (m_Stream != IntPtr.Zero)
            {
                NM.AVIStreamRelease(m_Stream);
                m_Stream = IntPtr.Zero;
            }

            // Release the file
            if (m_File != IntPtr.Zero)
            {
                NM.AVIFileRelease(m_File);
                m_File = IntPtr.Zero;
            }
        }