| 369 | } |
| 370 | |
| 371 | QStringPairList AVFormatContextWrapper::getInfoText() |
| 372 | { |
| 373 | if (this->ctx == nullptr) |
| 374 | return {QStringPair("Format context not initialized", "")}; |
| 375 | |
| 376 | this->update(); |
| 377 | |
| 378 | QStringPairList info; |
| 379 | if (this->ctx_flags != 0) |
| 380 | { |
| 381 | QString flags; |
| 382 | if (this->ctx_flags & 1) |
| 383 | flags += QString("No-Header"); |
| 384 | if (this->ctx_flags & 2) |
| 385 | flags += QString("Un-seekable"); |
| 386 | info.append(QStringPair("Flags", flags)); |
| 387 | } |
| 388 | |
| 389 | AVRational time_base; |
| 390 | time_base.num = 1; |
| 391 | time_base.den = AV_TIME_BASE; |
| 392 | |
| 393 | info.append(QStringPair("Number streams", QString::number(this->nb_streams))); |
| 394 | info.append(QStringPair("File name", this->filename)); |
| 395 | info.append(QStringPair("Start time", |
| 396 | QString("%1 (%2)") |
| 397 | .arg(this->start_time) |
| 398 | .arg(timestampToString(this->start_time, time_base)))); |
| 399 | info.append(QStringPair( |
| 400 | "Duration", |
| 401 | QString("%1 (%2)").arg(this->duration).arg(timestampToString(duration, time_base)))); |
| 402 | if (bit_rate > 0) |
| 403 | info.append(QStringPair("Bitrate", QString::number(this->bit_rate))); |
| 404 | info.append(QStringPair("Packet size", QString::number(this->packet_size))); |
| 405 | info.append(QStringPair("Max delay", QString::number(this->max_delay))); |
| 406 | info.append(QStringPair("Number programs", QString::number(this->nb_programs))); |
| 407 | info.append(QStringPair("Number chapters", QString::number(this->nb_chapters))); |
| 408 | |
| 409 | return info; |
| 410 | } |
| 411 | |
| 412 | } // namespace FFmpeg |
nothing calls this directly
no test coverage detected