MCPcopy Create free account
hub / github.com/NVIDIA/DALI / Read

Method Read

dali/operators/video/frames_decoder_base.cc:24–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22namespace dali {
23
24int MemoryVideoFile::Read(unsigned char *buffer, int buffer_size) {
25 int left_in_file = size_ - position_;
26 if (left_in_file <= 0) {
27 return AVERROR_EOF;
28 }
29
30 int to_read = std::min(left_in_file, buffer_size);
31 std::copy(data_ + position_, data_ + position_ + to_read, buffer);
32 position_ += to_read;
33 return to_read;
34}
35
36/**
37 * @brief Method for seeking the memory video. It sets position according to provided arguments.

Callers 2

RunImplMethod · 0.45
read_memory_video_fileFunction · 0.45

Calls 2

copyFunction · 0.85
minFunction · 0.50

Tested by

no test coverage detected