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

Function dv_extract_timecode

libavformat/dv.c:336–350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

334}
335
336static int dv_extract_timecode(DVDemuxContext* c, const uint8_t* frame, char *tc)
337{
338 const uint8_t *tc_pack;
339
340 // For PAL systems, drop frame bit is replaced by an arbitrary
341 // bit so its value should not be considered. Drop frame timecode
342 // is only relevant for NTSC systems.
343 int prevent_df = c->sys->ltc_divisor == 25 || c->sys->ltc_divisor == 50;
344
345 tc_pack = dv_extract_pack(frame, DV_TIMECODE);
346 if (!tc_pack)
347 return 0;
348 av_timecode_make_smpte_tc_string2(tc, av_inv_q(c->sys->time_base), AV_RB32(tc_pack + 1), prevent_df, 1);
349 return 1;
350}
351
352/* The following 3 functions constitute our interface to the world */
353

Callers 1

dv_read_timecodeFunction · 0.85

Calls 2

dv_extract_packFunction · 0.85

Tested by

no test coverage detected