private void CreateStream() { AVISTREAMINFOW aviStreamInfo = new AVISTREAMINFOW(); aviStreamInfo.fccType = _fccType; aviStreamInfo.fccHandler = _fccHandler; aviStreamInfo.dwScale = 1; aviStreamInfo.dwRate = _frameRate; aviStreamInfo.dwSuggestedBufferSize = _height * _stride; aviStreamInfo.dwQuality = 0xffffffff; aviStreamInfo.rect_bottom = _height; aviStreamInfo.rect_right = _width; _result = AviFile.AVIFileCreateStream(_aviFile, out _aviStream, ref aviStreamInfo); if (_result != 0) { throw new AviException("Failed to create AVI stream.", _result); } }
public static extern int AVIFileCreateStream(int pfile, out IntPtr ppavi, ref AVISTREAMINFOW psi);