module Data.ByteString.IsoBaseFileFormat.Boxes.TimeToSample where
import Data.ByteString.IsoBaseFileFormat.Boxes.Box
import Data.ByteString.IsoBaseFileFormat.Boxes.FullBox
import Data.ByteString.IsoBaseFileFormat.Boxes.BoxFields
type TimeToSample = FullBox TimeToSampleTable 0
type SttsEntry = U32 "sample_count" :+ U32 "sample_delta"
newtype TimeToSampleTable =
TimeToSampleTable (ListContent (U32 "entry_count") SttsEntry)
deriving (Default, IsBoxContent)
timeToSample :: [SttsEntry] -> Box TimeToSample
timeToSample = fullBox 0 . TimeToSampleTable . ListContent
instance IsBox TimeToSampleTable
type instance BoxTypeSymbol TimeToSampleTable = "stts"