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

Method FramesDecoderBase

dali/operators/video/frames_decoder_base.cc:215–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213}
214
215FramesDecoderBase::FramesDecoderBase(const std::string &filename, DALIImageType image_type) {
216 av_log_set_level(AV_LOG_ERROR);
217 filename_ = filename;
218 DALI_ENFORCE(image_type == DALI_YCbCr || image_type == DALI_RGB,
219 make_string("Invalid image type: ", image_type));
220 image_type_ = image_type;
221 int ret = OpenFile(filename);
222 if (ret < 0) {
223 DALI_WARN(make_string("Failed to open video file \"", Filename(), "\", due to ",
224 av_error_string(ret)));
225 return;
226 }
227
228 packet_.reset(av_packet_alloc());
229 DALI_ENFORCE(packet_, "Could not allocate av packet");
230
231 is_valid_ = true;
232 can_seek_ = true;
233 next_frame_idx_ = 0;
234}
235
236FramesDecoderBase::FramesDecoderBase(const char *memory_file, size_t memory_file_size, std::string_view source_info, DALIImageType image_type) {
237 av_log_set_level(AV_LOG_ERROR);

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected