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

            _bw.BaseStream.Seek(4, SeekOrigin.Begin);
            _bw.Write(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(averageFrameRate.D);
            _bw.Write(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(_moviDataSize + 4);

            _bw.Dispose();
        }
Exemplo n.º 2
0
 public void Finish(FractionUInt32 averageFrameRate)
 {
     _fs.Dispose();
 }
Exemplo n.º 3
0
        public void Finish(FractionUInt32 averageFrameRate)
        {
            WriteIndexChunk();

            _bw.BaseStream.Seek(4, SeekOrigin.Begin);
            _bw.Write(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(averageFrameRate.D);
            _bw.Write(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(_moviDataSize + 4);

            _bw.Dispose();
        }
Exemplo n.º 4
0
 public void Finish(FractionUInt32 averageFrameRate)
 {
     _fs.Dispose();
 }
Exemplo n.º 5
0
        private void CloseOutput(FractionUInt32? averageFrameRate)
        {
            if (_videoWriter != null)
            {
                _videoWriter.Finish(averageFrameRate ?? new FractionUInt32(25, 1));
                _videoWriter = null;
            }

            if (_audioWriter != null)
            {
                _audioWriter.Dispose();
                _audioWriter = null;
            }
        }