Exemple #1
0
 /// <summary>
 /// wrap up the avi writing
 /// </summary>
 public void CloseFile()
 {
     CloseStreams();
     if (pAviRawAudioStream != IntPtr.Zero)
     {
         Win32.AVIStreamRelease(pAviRawAudioStream);
         pAviRawAudioStream = IntPtr.Zero;
     }
     if (pAviRawVideoStream != IntPtr.Zero)
     {
         Win32.AVIStreamRelease(pAviRawVideoStream);
         pAviRawVideoStream = IntPtr.Zero;
     }
     if (pAviFile != IntPtr.Zero)
     {
         Win32.AVIFileRelease(pAviFile);
         pAviFile = IntPtr.Zero;
     }
     if (pGlobalBuf != IntPtr.Zero)
     {
         Marshal.FreeHGlobal(pGlobalBuf);
         pGlobalBuf      = IntPtr.Zero;
         pGlobalBuf_size = 0;
     }
 }