MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / avtext_print_time

Function avtext_print_time

fftools/textformat/avtextformat.c:488–502  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

486}
487
488void avtext_print_time(AVTextFormatContext *tctx, const char *key,
489 int64_t ts, const AVRational *time_base, int is_duration)
490{
491 if ((!is_duration && ts == AV_NOPTS_VALUE) || (is_duration && ts == 0)) {
492 avtext_print_string(tctx, key, "N/A", AV_TEXTFORMAT_PRINT_STRING_OPTIONAL);
493 } else {
494 char buf[128];
495 double d = av_q2d(*time_base) * ts;
496 struct unit_value uv;
497 uv.val.d = d;
498 uv.unit = unit_second_str;
499 value_string(tctx, buf, sizeof(buf), uv);
500 avtext_print_string(tctx, key, buf, 0);
501 }
502}
503
504void avtext_print_ts(AVTextFormatContext *tctx, const char *key, int64_t ts, int is_duration)
505{

Callers

nothing calls this directly

Calls 3

avtext_print_stringFunction · 0.85
av_q2dFunction · 0.85
value_stringFunction · 0.85

Tested by

no test coverage detected