isobmff-builder-0.10.5.0: A (bytestring-) builder for the ISO-14496-12 base media file format

Safe HaskellNone
LanguageHaskell2010

Data.ByteString.IsoBaseFileFormat.Boxes.Time

Description

Time and timing utilities.

Synopsis

Documentation

referenceTime :: UTCTime Source #

According to the standard, fields with absolute dates and times are in seconds since 19040101 at midnight (UTC). This is this reference time.

utcToMp4 :: Num t => UTCTime -> t Source #

Convert a UTCTime to a number of seconds since referenceTime.

mp4CurrentTime :: Num t => IO t Source #

Get the current time as number of seconds since referenceTime

durationFromSeconds :: Num t => TimeScale -> Integer -> t Source #

Utility function to convert seconds (Integers) to any Num using a TimeScale, Since Scalar has a Num instance this can be used to generate duration fields.

type TimeScale = Template (U32 "timescale") 90000 Source #

Default time-scale value Based on history and tradition this value is 90000. MPEG-2 TS defines a single clock for each program, running at 27MHz. The timescale of MPEG-2 TS Hint Tracks should be divisable by 90000.

type Timing version = Versioned TimingV0 TimingV1 version Source #

Time and timing information about a movie.

The creation/modification times are in seconds since midnight, Jan. 1, 1904, in UTC time. Time scale declares the time coordinate system, it specifies the number of time units that pass one second. The time coordinate system is used by e.g. the duration field, which by the way contains the duration of the longest track, if known, or simply the equivalent of 1s.