public ReplayMetaTimelineHeader(byte timelineInheritance, int fromFrame, ReplayPointer replayPointer) { TimelineInheritance = timelineInheritance; StartFromFrame = fromFrame; this.ReplayPointer = replayPointer; _currentFrame = -1; }
public ReplayMetaTimelineHeader() { ReplayPointer = new ReplayPointer(); TimelineInheritance = 0; StartFromFrame = 0; _currentFrame = -1; }
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); }
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); }
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); }
public ReplayRecorder() { _replayStartPositionsInStream = new ReplayPointer(); }