Set maximum bytes to a different amount based on a ReaderInfo struct
| 26 | |
| 27 | // Set maximum bytes to a different amount based on a ReaderInfo struct |
| 28 | void CacheBase::SetMaxBytesFromInfo(int64_t number_of_frames, int width, int height, int sample_rate, int channels) |
| 29 | { |
| 30 | // n frames X height X width X 4 colors of chars X audio channels X 4 byte floats |
| 31 | int64_t bytes = number_of_frames * (height * width * 4 + (sample_rate * channels * 4)); |
| 32 | SetMaxBytes(bytes); |
| 33 | } |
| 34 | |
| 35 | // Calculate ranges of frames |
| 36 | void CacheBase::CalculateRanges() { |
no outgoing calls
no test coverage detected