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

Method Reset

dali/operators/video/frames_decoder_base.cc:472–495  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

470}
471
472void FramesDecoderBase::Reset() {
473 LOG_LINE << "Reset: Reopening stream." << std::endl;
474 int stream_id = stream_id_;
475
476 int ret = -1;
477 if (memory_video_file_) {
478 memory_video_file_->Seek(0, SEEK_SET);
479 ret = OpenMemoryFile(*memory_video_file_);
480 DALI_ENFORCE(ret >= 0,
481 make_string("Could not open video file from memory buffer due to: ",
482 av_error_string(ret)));
483 } else {
484 ret = OpenFile(Filename());
485 DALI_ENFORCE(ret >= 0,
486 make_string("Could not open video file \"", Filename(),
487 "\" due to: ", av_error_string(ret)));
488 }
489
490 is_valid_ = true;
491 can_seek_ = true;
492 next_frame_idx_ = 0;
493
494 SelectVideoStream(stream_id);
495}
496
497void FramesDecoderBase::SeekFrame(int frame_id) {
498 LOG_LINE << "SeekFrame: Seeking to frame " << frame_id

Callers

nothing calls this directly

Calls 5

av_error_stringFunction · 0.85
OpenFileFunction · 0.85
FilenameFunction · 0.85
make_stringFunction · 0.50
SeekMethod · 0.45

Tested by

no test coverage detected