Provides configuration recommendations for using the file streaming system. More...
#include <IStreamerTypes.h>
Public Member Functions | |
AZ::u64 | CalculateRecommendedMemorySize (u64 readSize, u64 readOffset=0) |
Public Attributes | |
AZ::u64 | m_memoryAlignment { AZCORE_GLOBAL_NEW_ALIGNMENT } |
AZ::u64 | m_sizeAlignment { 1 } |
AZ::u64 | m_granularity { 1_mib } |
AZ::u16 | m_maxConcurrentRequests { 1 } |
Provides configuration recommendations for using the file streaming system.
AZ::u64 AZ::IO::IStreamerTypes::Recommendations::CalculateRecommendedMemorySize | ( | u64 | readSize, |
u64 | readOffset = 0 |
||
) |
Calculates the recommended size to allocate for the read buffer in order to avoid the need for temporary buffers. The returned size will always be at least as big as readSize, but can be bigger.
readSize | The intended amount of bytes to be read. |
readOffset | The number of bytes to offset into the file to start reading from. |
AZ::u64 AZ::IO::IStreamerTypes::Recommendations::m_granularity { 1_mib } |
The recommended size for partial reads. It's recommended to read entire files at once, but for streaming systems such as video and audio this is not always practical. The granularity will give the most optimal size for partial file reads. Note for partial reads it's also recommended to store the data uncompressed and to align the offset of the rest to the granularity.
AZ::u16 AZ::IO::IStreamerTypes::Recommendations::m_maxConcurrentRequests { 1 } |
The number of requests that the scheduler will try to keep active in the stack. Additional requests are considered pending and are subject to scheduling. There are no restrictions on the number of requests that can be send and generally there is no need to throttle the number of requests. The exception is for streaming systems such as video and audio that could flood the scheduler with requests in a short amount of time if not capped. For those systems it's recommended that no more than the provided number of requests are issued.
AZ::u64 AZ::IO::IStreamerTypes::Recommendations::m_memoryAlignment { AZCORE_GLOBAL_NEW_ALIGNMENT } |
The minimal memory alignment that's required to avoid intermediate buffers. If the memory provided to the read request isn't aligned to this size it may require a temporary or cached buffer to first read to and copy the result from to the provided memory.
AZ::u64 AZ::IO::IStreamerTypes::Recommendations::m_sizeAlignment { 1 } |
The minimal size alignment that's required to avoid intermediate buffers. If the size and/or offset provided to the read request isn't aligned to this size it may require a temporary or cached buffer to first read to and copy the result from to the provided memory.