Get the size in bytes of a frame (rough estimate)
| 105 | |
| 106 | // Get the size in bytes of a frame (rough estimate) |
| 107 | int64_t VideoCacheThread::getBytes(int width, |
| 108 | int height, |
| 109 | int sample_rate, |
| 110 | int channels, |
| 111 | float fps) |
| 112 | { |
| 113 | // RGBA video frame |
| 114 | int64_t bytes = static_cast<int64_t>(width) * height * sizeof(char) * 4; |
| 115 | // Approximate audio: (sample_rate * channels)/fps samples per frame |
| 116 | bytes += ((sample_rate * channels) / fps) * sizeof(float); |
| 117 | return bytes; |
| 118 | } |
| 119 | |
| 120 | /// Start the cache thread at high priority, and return true if it’s actually running. |
| 121 | bool VideoCacheThread::StartThread() |
nothing calls this directly
no outgoing calls
no test coverage detected