浏览代码

fix frame streams >2GB

/main
Lasse Jon Fuglsang Pedersen 4 年前
当前提交
b9b42876
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 6
      Runtime/Utility/NativeFrameStream.cs

6
Runtime/Utility/NativeFrameStream.cs


public unsafe struct NativeFrameStream : IDisposable
{
public string filename;
public int frameOffset;
public long frameOffset;
public int frameCount;
public int frameSize;

public NativeArray<ReadHandle> ringDataHnd;
public NativeArray<int> ringDataTag;
public NativeFrameStream(string filename, int frameOffset, int frameCount, int frameSize, int seekRadius, int ringCapacity = -1)
public NativeFrameStream(string filename, long frameOffset, int frameCount, int frameSize, int seekRadius, int ringCapacity = -1)
{
this.filename = filename;
this.frameOffset = frameOffset;

// schedule the read
ReadCommand cmd;
cmd.Buffer = frameSize * ringIndex + ringDataPtr;
cmd.Offset = frameSize * readIndex + frameOffset;
cmd.Offset = frameSize * (long)readIndex + frameOffset;
cmd.Size = frameSize;
ringDataHnd[ringIndex] = AsyncReadManager.Read(filename, &cmd, 1);

正在加载...
取消
保存