Exemplo n.º 1
0
        public void Finish(FractionUInt32 averageFrameRate)
        {
            WriteIndexChunk();

            _bw.BaseStream.Seek(4, SeekOrigin.Begin);
            _bw.Write((uint)(224 + _moviDataSize + _indexChunkSize - 8));

            _bw.BaseStream.Seek(24 + 8, SeekOrigin.Begin);
            _bw.Write((uint)0);
            _bw.BaseStream.Seek(12, SeekOrigin.Current);
            _bw.Write((uint)_frameCount);
            _bw.BaseStream.Seek(12, SeekOrigin.Current);
            _bw.Write((uint)_width);
            _bw.Write((uint)_height);

            _bw.BaseStream.Seek(100 + 28, SeekOrigin.Begin);
            _bw.Write((uint)averageFrameRate.D);
            _bw.Write((uint)averageFrameRate.N);
            _bw.BaseStream.Seek(4, SeekOrigin.Current);
            _bw.Write((uint)_frameCount);
            _bw.BaseStream.Seek(16, SeekOrigin.Current);
            _bw.Write((ushort)_width);
            _bw.Write((ushort)_height);

            _bw.BaseStream.Seek(164 + 12, SeekOrigin.Begin);
            _bw.Write((uint)_width);
            _bw.Write((uint)_height);
            _bw.BaseStream.Seek(8, SeekOrigin.Current);
            _bw.Write((uint)(_width * _height * 6));

            _bw.BaseStream.Seek(212 + 4, SeekOrigin.Begin);
            _bw.Write((uint)(_moviDataSize + 4));

            _bw.Close();

            if (_alphaWriter != null)
            {
                _alphaWriter.Finish(averageFrameRate);
            }
        }
 public void Finish(FractionUInt32 averageFrameRate)
 {
     _fs.Close();
 }