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

Function av_timecode_get_smpte_from_framenum

libavutil/timecode.c:54–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54uint32_t av_timecode_get_smpte_from_framenum(const AVTimecode *tc, int framenum)
55{
56 unsigned fps = tc->fps;
57 int drop = !!(tc->flags & AV_TIMECODE_FLAG_DROPFRAME);
58 int hh, mm, ss, ff;
59
60 framenum += tc->start;
61 if (drop)
62 framenum = av_timecode_adjust_ntsc_framenum2(framenum, tc->fps);
63 ff = framenum % fps;
64 ss = framenum / fps % 60;
65 mm = framenum / (fps*60LL) % 60;
66 hh = framenum / (fps*3600LL) % 24;
67 return av_timecode_get_smpte(tc->rate, drop, hh, mm, ss, ff);
68}
69
70uint32_t av_timecode_get_smpte(AVRational rate, int drop, int hh, int mm, int ss, int ff)
71{

Callers 3

mxf_write_system_itemFunction · 0.85
dv_write_packFunction · 0.85

Calls 2

av_timecode_get_smpteFunction · 0.85

Tested by

no test coverage detected