Example #1
0
        /// <summary>
        /// Construct a recording encoder
        /// </summary>
        /// <param name="stream">The original stream to wrap</param>
        /// <param name="recordStream">The stream to be embedded with the playback metadata</param>
        public TWSPlaybackEncoding(Stream stream, Stream recordStream)
            : base(stream)
        {
            if (!recordStream.CanSeek)
                throw new ArgumentException("must be seekable", "recordStream");

            _recordStream = recordStream;

            _stream =
                new EchoStream(_stream, _recordStream, EchoStream.StreamOwnership.OwnPrimaryStream);

            _recordWriter = new BinaryWriter(_recordStream);
        }
Example #2
0
        /// <summary>
        /// Construct a recording encoder
        /// </summary>
        /// <param name="stream">The original stream to wrap</param>
        /// <param name="recordStream">The stream to be embedded with the playback metadata</param>
        public TWSPlaybackEncoding(Stream stream, Stream recordStream)
            : base(stream)
        {
            if (!recordStream.CanSeek)
            {
                throw new ArgumentException("must be seekable", "recordStream");
            }

            _recordStream = recordStream;

            _stream =
                new EchoStream(_stream, _recordStream, EchoStream.StreamOwnership.OwnPrimaryStream);

            _recordWriter = new BinaryWriter(_recordStream);
        }