MCPcopy Create free account
hub / github.com/FFMS/ffms2 / WriteTimecodes

Method WriteTimecodes

src/core/track.cpp:145–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143}
144
145void FFMS_Track::WriteTimecodes(const char *TimecodeFile) const {
146 frame_vec &Frames = Data->Frames;
147 FileHandle file(TimecodeFile, "w", FFMS_ERROR_TRACK, FFMS_ERROR_FILE_WRITE);
148
149 file.Printf("# timecode format v2\n");
150 for (size_t i = 0; i < size(); ++i) {
151 if (!Frames[i].Skipped())
152 file.Printf("%.02f\n", (Frames[i].PTS * TB.Num) / (double)TB.Den);
153 }
154}
155
156static bool PTSComparison(FrameInfo FI1, FrameInfo FI2) {
157 return FI1.PTS < FI2.PTS;

Callers 1

FFMS_WriteTimecodesFunction · 0.80

Calls 2

PrintfMethod · 0.80
SkippedMethod · 0.80

Tested by

no test coverage detected