Exemple #1
0
        public CtfStreamReadAhead(ICtfEventStream eventStream, CancellationToken cancellationToken)
        {
            Debug.Assert(eventStream != null);
            Debug.Assert(cancellationToken != null);

            this.cancellationToken = cancellationToken;
            this.EventStream       = eventStream;
        }
Exemple #2
0
        public CtfStreamPlayback(
            ICtfEventStream eventStream,
            CtfPlaybackOptions playbackOptions,
            CancellationToken cancellationToken)
        {
            Debug.Assert(eventStream != null);
            Debug.Assert(cancellationToken != null);

            this.cancellationToken = cancellationToken;
            this.EventStream       = eventStream;
            this.useReadAhead      = playbackOptions.ReadAhead;
        }
        public PacketReader(ICtfEventStream eventStream, byte[] buffer, uint bufferByteCount)
        {
            Debug.Assert(eventStream != null);
            Debug.Assert(buffer != null);

            this.eventStream       = eventStream;
            this.buffer            = buffer;
            this.bufferByteCount   = bufferByteCount;
            this.specifiedReadSize = bufferByteCount;

            // force a read from the stream on the next read
            this.bufferByteIndex = this.bufferByteCount;
        }
        public PacketReader(PacketReader other)
        {
            Debug.Assert(other != null);

            this.eventStream               = other.eventStream;
            this.buffer                    = other.buffer;
            this.bufferByteCount           = other.bufferByteCount;
            this.bufferByteIndex           = other.bufferByteIndex;
            this.bitsConsumedInCurrentByte = other.bitsConsumedInCurrentByte;
            this.specifiedReadSize         = other.specifiedReadSize;
            this.totalBytesRead            = other.totalBytesRead;

            this.BitsInPacket = 0;
        }
 public PacketReader(ICtfEventStream eventStream, uint bufferByteCount)
     : this(eventStream, new byte[bufferByteCount], bufferByteCount)
 {
 }
 public PacketReader(ICtfEventStream eventStream)
     : this(eventStream, DefaultReadSize)
 {
 }