udStreamer

Functions

enum udError udStreamer_Init(uint64_t memoryThresholdBytes)

Initialises the UDS streamer

!NOTE If the streamer hasn’t been initialised before loading a UDS or creating a udRenderContext it will be initialised during those using default values

!WARNING If memoryThresholdBytes is non-zero (which will use the default amount of memory) the return code will be udE_CalledMoreThanOnce if the streamer has already been started

ParameterDescription
memoryThresholdBytesSets the threshold for how much memory the streaming system should attempt to stay below in bytes. Set as 0 to use the default amount of memory for the current platform.

enum udError udStreamer_Deinit()

Deinitialises the UDS streamer (reference counted). This must be called once for every call to udStreamer_Init regardless of return code of that function to decrease the reference count.

enum udError udStreamer_Update(struct udStreamerStatus *pStatus)

Updates the UDS streamer manually (used in conjuction with udRCF_ManualStreamerUpdate)

!NOTE The application should call this immediately after the last render for the frame

ParameterDescription
pStatusA structure to write streaming information to; Use NULL if the information isn’t required

Structs

struct udStreamerStatus

Stores returned information from a streamer update

FieldTypeDescription
activeuint32_tNot 0 if streamer has blocked to load, or models are awaiting destruction.
highestBlockPriorityintHighest priority of any block waiting to be loaded (reduces to zero as streaming completes).
modelErrorsenum [udError](udError.md)Any errors from streaming.
avgBytesPerSecondintData Throughput.
blocksInQueueintHow many blocks (sections of a pointcloud) are waiting to be loaded.
blocksInFlightintHow many blocks are actively being loaded.
freeableBlocksLockedintHow many blocks are loaded that aren’t being used right now.
blockMemoryInUseint64_tTotal (approximate) memory in use by the streamer (in bytes).
positionMemoryInUseint64_tAmount of memory used by positional data for all blocks loaded.
freeableMemoryint64_tAmount of memory used by blocks on the freeable list.
blocksReadSinceLastUpdateintNumber of blocks whose read was started.
blocksLoadedSinceLastUpdateintNumber of blocks that actually finished and unpacked.
blocksActiveintNumber of blocks potentially loadable before next update.
modelsActiveintNumber of models actively requesting blocks.
totalBlocksLoadedintHow many blocks are loaded.
starvedTimeMsSinceLastUpdateintNumber of milliseconds spent with waiting for more work that came on the very on the next update.