示例#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);
            }
        }
示例#2
0
 public void Finish(FractionUInt32 averageFrameRate)
 {
     _fs.Close();
 }
示例#3
0
 private void CloseOutput(FractionUInt32? averageFrameRate, bool disposing)
 {
     if (_videoWriter != null) {
         _videoWriter.Finish(averageFrameRate ?? new FractionUInt32(25, 1));
         if (disposing && (_videoWriter.Path != null)) {
             try { File.Delete(_videoWriter.Path); }
             catch { }
         }
         _videoWriter = null;
     }
     if (_audioWriter != null) {
         _audioWriter.Finish();
         if (disposing && (_audioWriter.Path != null)) {
             try { File.Delete(_audioWriter.Path); }
             catch { }
         }
         _audioWriter = null;
     }
     if (_timeCodeWriter != null) {
         _timeCodeWriter.Finish();
         if (disposing && (_timeCodeWriter.Path != null)) {
             try { File.Delete(_timeCodeWriter.Path); }
             catch { }
         }
         _timeCodeWriter = null;
     }
 }
示例#4
0
 public void Finish(FractionUInt32 averageFrameRate)
 {
 }