MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / GetBytes

Method GetBytes

src/Frame.cpp:380–394  ·  view source on GitHub ↗

Get the size in bytes of this frame (rough estimate)

Source from the content-addressed store, hash-verified

378
379// Get the size in bytes of this frame (rough estimate)
380int64_t Frame::GetBytes()
381{
382 int64_t total_bytes = 0;
383 if (image) {
384 total_bytes += static_cast<int64_t>(
385 width * height * sizeof(char) * 4);
386 }
387 if (audio) {
388 // approximate audio size (sample rate / 24 fps)
389 total_bytes += (sample_rate / 24.0) * sizeof(float);
390 }
391
392 // return size of this frame
393 return total_bytes;
394}
395
396// Get pixel data (as packets)
397const unsigned char* Frame::GetPixels()

Callers 2

CacheDisk.cppFile · 0.45
Frame.cppFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected