private Avi.AVISTREAMINFO GetStreamInfo() { Avi.AVISTREAMINFO streamInfo = new Avi.AVISTREAMINFO(); streamInfo.fccType = Avi.streamtypeVIDEO; streamInfo.fccHandler = this.Codec.FourCCHandler; streamInfo.dwFlags = 0; streamInfo.dwCaps = 0; streamInfo.wPriority = 0; streamInfo.wLanguage = 0; streamInfo.dwScale = (int)1; streamInfo.dwRate = (int)_frameRate; streamInfo.dwStart = 0; streamInfo.dwLength = 0; streamInfo.dwInitialFrames = 0; streamInfo.dwSuggestedBufferSize = FrameSize; streamInfo.dwQuality = ComputeQuality(); streamInfo.dwSampleSize = 0; streamInfo.rcFrame.top = 0; streamInfo.rcFrame.left = 0; streamInfo.rcFrame.bottom = Height; streamInfo.rcFrame.right = Width; streamInfo.dwEditCount = 0; streamInfo.dwFormatChangeCount = 0; streamInfo.szName = new UInt16[64]; return(streamInfo); }
private void CreateStream() { Avi.AVISTREAMINFO streamInfo = GetStreamInfo(); int result = Avi.AVIFileCreateStream(_aviFileRef, out _aviStreamRef, ref streamInfo); if (result != 0) { throw new VideoStreamWriterException("Avi stream could not be created."); } GC.KeepAlive(streamInfo); if (!Codec.SupportsQuality) { SetFormat(_aviStreamRef); } else { MakeStreamCompressed(); } }
private Avi.AVISTREAMINFO GetStreamInfo() { Avi.AVISTREAMINFO streamInfo = new Avi.AVISTREAMINFO(); streamInfo.fccType = Avi.streamtypeVIDEO; streamInfo.fccHandler = this.Codec.FourCCHandler; streamInfo.dwFlags = 0; streamInfo.dwCaps = 0; streamInfo.wPriority = 0; streamInfo.wLanguage = 0; streamInfo.dwScale = (int)1; streamInfo.dwRate = (int)_frameRate; streamInfo.dwStart = 0; streamInfo.dwLength = 0; streamInfo.dwInitialFrames = 0; streamInfo.dwSuggestedBufferSize = FrameSize; streamInfo.dwQuality = ComputeQuality(); streamInfo.dwSampleSize = 0; streamInfo.rcFrame.top = 0; streamInfo.rcFrame.left = 0; streamInfo.rcFrame.bottom = Height; streamInfo.rcFrame.right = Width; streamInfo.dwEditCount = 0; streamInfo.dwFormatChangeCount = 0; streamInfo.szName = new UInt16[64]; return streamInfo; }