Exemple #1
0
 public ReplayMetaTimelineHeader(byte timelineInheritance, int fromFrame, ReplayPointer replayPointer)
 {
     TimelineInheritance = timelineInheritance;
     StartFromFrame      = fromFrame;
     this.ReplayPointer  = replayPointer;
     _currentFrame       = -1;
 }
Exemple #2
0
 public ReplayMetaTimelineHeader()
 {
     ReplayPointer       = new ReplayPointer();
     TimelineInheritance = 0;
     StartFromFrame      = 0;
     _currentFrame       = -1;
 }
Exemple #3
0
 public void ReadSnapshotPointers(IReplayReader reader, int off)
 {
     for (var i = 0; i < _sizeOfPositions; i++)
     {
         var pos = reader.ReadInt32() + off;
         ReplayPointer.Add(pos, off);
     }
     Debug.Log("Read Timelineheader\n" + this);
 }
Exemple #4
0
        public int WriteFrame(IReplayWriter writer)
        {
            writer.Write(TimelineInheritance);
            writer.Write(StartFromFrame);
            writer.Write(ReplayPointer.Count);

            foreach (var memoryPosition in ReplayPointer.GetEntries())
            {
                writer.Write(memoryPosition.Index);
            }

            Debug.Log("Write Timelineheader\n" + this);
            return(SizeInBytes);
        }
Exemple #5
0
        public bool SetPointerPosition(IReplayReader reader, int frame)
        {
            if (frame == _currentFrame)
            {
                return(false);
            }


            _currentFrame = frame;
            var position = ReplayPointer.GetStartingPositionAt(frame);

            CurrentOffset = position.Offset;

            //Debug.Log($"Position: {_currentFrame} with Bytes: {position.Index}");
            // Add Offset from Headers and Startingposition of Snapshot to this Snapshot
            reader.GetStream().Position = position.Index;
            return(true);
        }
Exemple #6
0
 public ReplayRecorder()
 {
     _replayStartPositionsInStream = new ReplayPointer();
 }