MCPcopy Create free account
hub / github.com/IENT/YUView / update

Method update

YUViewLib/src/ffmpeg/AVFormatContextWrapper.cpp:247–369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245}
246
247void AVFormatContextWrapper::update()
248{
249 if (this->ctx == nullptr)
250 return;
251
252 this->streams.clear();
253
254 // Copy values from the source pointer
255 if (this->libVer.avformat.major == 56)
256 {
257 auto p = reinterpret_cast<AVFormatContext_56 *>(this->ctx);
258 this->ctx_flags = p->ctx_flags;
259 this->nb_streams = p->nb_streams;
260 for (unsigned i = 0; i < this->nb_streams; i++)
261 this->streams.append(AVStreamWrapper(p->streams[i], this->libVer));
262 this->filename = QString(p->filename);
263 this->start_time = p->start_time;
264 this->duration = p->duration;
265 this->bit_rate = p->bit_rate;
266 this->packet_size = p->packet_size;
267 this->max_delay = p->max_delay;
268 this->flags = p->flags;
269 this->probesize = p->probesize;
270 this->max_analyze_duration = p->max_analyze_duration;
271 this->key = QString::fromLatin1((const char *)p->key, p->keylen);
272 this->nb_programs = p->nb_programs;
273 this->video_codec_id = p->video_codec_id;
274 this->audio_codec_id = p->audio_codec_id;
275 this->subtitle_codec_id = p->subtitle_codec_id;
276 this->max_index_size = p->max_index_size;
277 this->max_picture_buffer = p->max_picture_buffer;
278 this->nb_chapters = p->nb_chapters;
279 this->metadata = AVDictionaryWrapper(p->metadata);
280
281 this->iformat = AVInputFormatWrapper(p->iformat, libVer);
282 }
283 else if (this->libVer.avformat.major == 57)
284 {
285 auto p = reinterpret_cast<AVFormatContext_57 *>(this->ctx);
286 this->ctx_flags = p->ctx_flags;
287 this->nb_streams = p->nb_streams;
288 for (unsigned i = 0; i < nb_streams; i++)
289 this->streams.append(AVStreamWrapper(p->streams[i], this->libVer));
290 this->filename = QString(p->filename);
291 this->start_time = p->start_time;
292 this->duration = p->duration;
293 this->bit_rate = p->bit_rate;
294 this->packet_size = p->packet_size;
295 this->max_delay = p->max_delay;
296 this->flags = p->flags;
297 this->probesize = p->probesize;
298 this->max_analyze_duration = p->max_analyze_duration;
299 this->key = QString::fromLatin1((const char *)p->key, p->keylen);
300 this->nb_programs = p->nb_programs;
301 this->video_codec_id = p->video_codec_id;
302 this->audio_codec_id = p->audio_codec_id;
303 this->subtitle_codec_id = p->subtitle_codec_id;
304 this->max_index_size = p->max_index_size;

Callers 9

updateFromMethod · 0.95
getNbStreamsMethod · 0.95
getStreamMethod · 0.95
getInputFormatMethod · 0.95
getStartTimeMethod · 0.95
getDurationMethod · 0.95
getMetadataMethod · 0.95
getInfoTextMethod · 0.95

Calls 5

AVStreamWrapperClass · 0.85
AVDictionaryWrapperClass · 0.85
appendMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected