MCPcopy Create free account
hub / github.com/MediaArea/MediaInfoLib / ToMilliseconds

Method ToMilliseconds

Source/MediaInfo/TimeCode.cpp:846–857  ·  view source on GitHub ↗

---------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

844
845//---------------------------------------------------------------------------
846int64_t TimeCode::ToMilliseconds() const
847{
848 if (!IsSet())
849 return 0;
850
851 int64_t Den = (uint64_t)GetFramesMax() + 1;
852 int64_t MS = (ToFrames() * 1000 * (GetFramesMax() && (IsDropFrame() || Is1001fps()) ? 1.001 : 1.000) + Den / 2) / Den;
853 if (IsNegative())
854 MS = -MS;
855
856 return MS;
857}
858
859//---------------------------------------------------------------------------
860double TimeCode::ToSeconds(bool TimeIsDropFrame) const

Callers 14

Streams_FillMethod · 0.80
Streams_FinishMethod · 0.80
PGCMethod · 0.80
Streams_FinishMethod · 0.80
FileHeader_ParseMethod · 0.80
File_N19.cppFile · 0.80
Streams_FinishMethod · 0.80
Read_Buffer_ContinueMethod · 0.80
FileHeader_ParseMethod · 0.80
Data_ParseMethod · 0.80
FileHeader_ParseMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected