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

Function UpdateProgress

src/index/ffmsindex.cpp:185–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183}
184
185int FFMS_CC UpdateProgress(int64_t Current, int64_t Total, void *Private) {
186 if (!PrintProgress)
187 return 0;
188
189 int Percentage = int((double(Current) / double(Total)) * 100);
190
191 if (Private) {
192 Progress *LastProgress = (Progress *)Private;
193 int64_t CurTime = getTimeInMicroSeconds();
194 if (Percentage <= LastProgress->Percent || (LastProgress->Time != 0 && (CurTime - LastProgress->Time) <= ProgressInterval))
195 return 0;
196 LastProgress->Percent = Percentage;
197 LastProgress->Time = CurTime;
198 }
199
200 std::cout << "Indexing, please wait... " << Percentage << "% \r" << std::flush;
201
202 return 0;
203}
204
205std::string DumpFilename(FFMS_Track *Track, int TrackNum, const char *Suffix) {
206 if (FFMS_GetTrackType(Track) != FFMS_TYPE_VIDEO || !FFMS_GetNumFrames(Track))

Callers 1

DoIndexingFunction · 0.85

Calls 1

getTimeInMicroSecondsFunction · 0.85

Tested by

no test coverage detected