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

Method Seek

dali/operators/video/frames_decoder_base.cc:44–59  ·  view source on GitHub ↗

* @brief Method for seeking the memory video. It sets position according to provided arguments. * * @param new_position Requested new_position. * @param mode Chosen method of seeking. This argument changes how new_position is interpreted and * how seeking is performed. * @return int64_t actual new position in the file. */

Source from the content-addressed store, hash-verified

42 * @return int64_t actual new position in the file.
43 */
44int64_t MemoryVideoFile::Seek(int64_t new_position, int mode) {
45 switch (mode) {
46 case SEEK_SET:
47 position_ = new_position;
48 break;
49 case AVSEEK_SIZE:
50 return size_;
51
52 default:
53 DALI_FAIL(make_string(
54 "Unsupported seeking method in FramesDecoderBase from memory file. Seeking method: ",
55 mode));
56 }
57
58 return position_;
59}
60
61namespace detail {
62

Callers 2

seek_memory_video_fileFunction · 0.45
ResetMethod · 0.45

Calls 1

make_stringFunction · 0.50

Tested by

no test coverage detected