module Data.ByteString.IsoBaseFileFormat.Boxes.TimeToSample where
import Data.ByteString.IsoBaseFileFormat.Box
import Data.ByteString.IsoBaseFileFormat.Util.FullBox
import Data.ByteString.IsoBaseFileFormat.Util.BoxFields
import Data.ByteString.IsoBaseFileFormat.ReExports
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"