module Data.ByteString.IsoBaseFileFormat.Boxes.SampleToChunk where
import Data.ByteString.IsoBaseFileFormat.Box
import Data.ByteString.IsoBaseFileFormat.Util.FullBox
import Data.ByteString.IsoBaseFileFormat.Util.BoxFields
import Data.ByteString.IsoBaseFileFormat.ReExports
type SampleToChunk = FullBox SampleToChunkTable 0
type StscEntry =
U32 "first_chunk" :+ U32 "samples_per_chunk" :+ U32 "sample_description_index"
newtype SampleToChunkTable =
SampleToChunkTable (ListContent (U32 "entry_count") StscEntry)
deriving (Default, IsBoxContent)
sampleToChunk :: [StscEntry] -> Box SampleToChunk
sampleToChunk = fullBox 0 . SampleToChunkTable . ListContent
instance IsBox SampleToChunkTable
type instance BoxTypeSymbol SampleToChunkTable = "stsc"