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

Method SetMaxBytesFromInfo

src/CacheBase.cpp:28–33  ·  view source on GitHub ↗

Set maximum bytes to a different amount based on a ReaderInfo struct

Source from the content-addressed store, hash-verified

26
27// Set maximum bytes to a different amount based on a ReaderInfo struct
28void 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
36void CacheBase::CalculateRanges() {

Callers 6

init_reader_settingsMethod · 0.80
FFmpegReaderMethod · 0.80
FFmpegReader.cppFile · 0.80
TimelineMethod · 0.80
FrameMapperMethod · 0.80
ChangeMappingMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected