StreamReadParams

C++
struct StreamReadParams {
  DWORD_PTR dwUserData;
  EStreamTaskPriority ePriority;
  uint8 nPerceptualImportance;
  unsigned nLoadTime;
  unsigned nMaxLoadTime;
  void* pBuffer;
  unsigned nOffset;
  unsigned nSize;
  EStreamSourceMediaType eMediaType;
  unsigned nFlags;
};
File

IStreamEngine.h

Description

This is used as parameter to the asynchronous read function all the unnecessary parameters go here, because there are many of them.

StreamReadParams::dwUserData Data Member

The user data that'll be used to call the callback.

C++
DWORD_PTR dwUserData;
StreamReadParams::eMediaType Data Member
C++
EStreamSourceMediaType eMediaType;
Description

Media type to use when starting file request - if wrong, the request may take longer to complete

StreamReadParams::ePriority Data Member
C++
EStreamTaskPriority ePriority;
Description

The priority of this read

StreamReadParams::nFlags Data Member
C++
unsigned nFlags;
Description

The combination of one or several flags from the stream engine general purpose flags.

See Also
StreamReadParams::nLoadTime Data Member
C++
unsigned nLoadTime;
Description

The desirable loading time, in milliseconds, from the time of call 0 means as fast as possible (desirably in this frame).

StreamReadParams::nMaxLoadTime Data Member
C++
unsigned nMaxLoadTime;
Description

The maximum load time, in milliseconds. 0 means forever. If the read lasts longer, it can be discarded. WARNING: avoid too small max times, like 1-10 ms, because many loads will be discarded in this case.

StreamReadParams::nOffset Data Member
C++
unsigned nOffset;
Description

Offset in the file to read; if this is not 0, then the file read occurs beginning with the specified offset in bytes. The callback interface receives the size of already read data as nSize and generally behaves as if the piece of file would be a file of its own.

StreamReadParams::nPerceptualImportance Data Member
C++
uint8 nPerceptualImportance;
Description

Value from 0-255 of the perceptual importance of the task (used for debugging task sheduling)

StreamReadParams::nSize Data Member
C++
unsigned nSize;
Description

Number of bytes to read; if this is 0, then the whole file is read, if nSize == 0 && nOffset != 0, then the file from the offset to the end is read. If nSize != 0, then the file piece from nOffset is read, at most nSize bytes (if less, an error is reported). So, from nOffset byte to nOffset + nSize - 1 byte in the file.

StreamReadParams::pBuffer Data Member
C++
void* pBuffer;
Description

The buffer into which to read the file or the file piece if this is NULL, the streaming engine will supply the buffer. Notes: DO NOT USE THIS BUFFER during read operation! DO NOT READ from it, it can lead to memory corruption!

StreamReadParams::StreamReadParams Constructor ()
C++
StreamReadParams();
StreamReadParams::StreamReadParams Constructor (DWORD_PTR, EStreamTaskPriority, unsigned, unsigned, unsigned, unsigned, void*, unsigned)
C++
StreamReadParams(DWORD_PTR _dwUserData, EStreamTaskPriority _ePriority = estpNormal, unsigned _nLoadTime = 0, unsigned _nMaxLoadTime = 0, unsigned _nOffset = 0, unsigned _nSize = 0, void* _pBuffer = NULL, unsigned _nFlags = 0);