TIEMediaFoundationSourceReader.Duration
Declaration
property Duration: int64;
Description
Returns the duration of a source media file, in 100 nanosecond units (There are 1 billion nanoseconds to a second).
Example 1
// Get the source duration as a 'HH:MM:SS:DD' string
duration := IEMediaFoundationTimeToStr(ImageEnView1.IO.MediaFoundationSourceReader.Duration);
Example 2
// Display length in seconds
if IEMediaFoundationTimeToSec(ImageEnView1.IO.MediaFoundationSourceReader.Duration) < 1 then
lblLength.Caption := '< 1 Sec.'
else
lblLength.Caption := format('%d Sec.', [Round(IEMediaFoundationTimeToSec(ImageEnView1.IO.MediaFoundationSourceReader.Duration))]);
See Also
◼IEMediaFoundationTimeToStr◼IEMediaFoundationTimeToSec