Ejemplo n.º 1
0
            private void MakeStreamCompressed()
            {
                Avi.AVICOMPRESSOPTIONS compressOptions = GetCompressOptions();

                int result = Avi.AVIMakeCompressedStream(out _aviCompressedStreamRef, _aviStreamRef, ref compressOptions, 0);

                if (result != 0)
                {
                    throw new Exception("Failed to create compressed stream.");
                }

                GC.KeepAlive(compressOptions);

                SetFormat(_aviCompressedStreamRef);
            }
Ejemplo n.º 2
0
            private Avi.AVICOMPRESSOPTIONS GetCompressOptions()
            {
                Avi.AVICOMPRESSOPTIONS compressOptions = new Avi.AVICOMPRESSOPTIONS();

                compressOptions.fccType           = Avi.streamtypeVIDEO;
                compressOptions.fccHandler        = this.Codec.FourCCHandler;
                compressOptions.dwKeyFrameEvery   = 0;
                compressOptions.dwQuality         = ComputeQuality();
                compressOptions.dwFlags           = 0;
                compressOptions.dwBytesPerSecond  = 0;
                compressOptions.lpFormat          = IntPtr.Zero;
                compressOptions.cbFormat          = 0;
                compressOptions.lpParms           = IntPtr.Zero;
                compressOptions.cbParms           = 0;
                compressOptions.dwInterleaveEvery = 0;

                return(compressOptions);
            }
Ejemplo n.º 3
0
			private Avi.AVICOMPRESSOPTIONS GetCompressOptions()
			{
				Avi.AVICOMPRESSOPTIONS compressOptions = new Avi.AVICOMPRESSOPTIONS();

				compressOptions.fccType = Avi.streamtypeVIDEO;
				compressOptions.fccHandler = this.Codec.FourCCHandler;
				compressOptions.dwKeyFrameEvery = 0;
				compressOptions.dwQuality = ComputeQuality();
				compressOptions.dwFlags = 0;
				compressOptions.dwBytesPerSecond = 0;
				compressOptions.lpFormat = IntPtr.Zero;
				compressOptions.cbFormat = 0;
				compressOptions.lpParms = IntPtr.Zero;
				compressOptions.cbParms = 0;
				compressOptions.dwInterleaveEvery = 0;

				return compressOptions;
			}