Exemplo n.º 1
0
        /// <summary>
        /// 创建流文件
        /// </summary>
        private void CreateStream()
        {
            AVISTREAMINFOW strhdr = new AVISTREAMINFOW();

            strhdr.fccType               = _fccType;
            strhdr.fccHandler            = _fccHandler;
            strhdr.dwFlags               = 0;
            strhdr.dwCaps                = 0;
            strhdr.wPriority             = 0;
            strhdr.wLanguage             = 0;
            strhdr.dwScale               = 1;
            strhdr.dwRate                = _frameRate;
            strhdr.dwStart               = 0;
            strhdr.dwLength              = 0;
            strhdr.dwInitialFrames       = 0;
            strhdr.dwSuggestedBufferSize = _height * _stride;
            strhdr.dwQuality             = 0xffffffff;
            strhdr.dwSampleSize          = 0;
            strhdr.rect_top              = 0;
            strhdr.rect_left             = 0;
            strhdr.rect_bottom           = _height;
            strhdr.rect_right            = _width;
            strhdr.dwEditCount           = 0;
            strhdr.dwFormatChangeCount   = 0;
            strhdr.szName0               = 0;
            strhdr.szName1               = 0;

            int hr = AVIFileCreateStream(_pfile, out _ps, ref strhdr);

            if (hr != 0)
            {
                throw new AviException("AVIFileCreateStream");
            }
        }
Exemplo n.º 2
0
 private static extern int AVIFileCreateStream(int ptr_pfile, out IntPtr ptr_ptr_avi, ref AVISTREAMINFOW ptr_streaminfo);