module Data.ByteString.IsoBaseFileFormat.Boxes.DataReference
(DataReference()
,dataReference
,localMediaDataReference
)
where
import Data.ByteString.IsoBaseFileFormat.Box
import Data.ByteString.IsoBaseFileFormat.Util.FullBox
import Data.ByteString.IsoBaseFileFormat.Boxes.DataEntryUrl
import Data.ByteString.IsoBaseFileFormat.Util.BoxFields
import Data.Singletons.Prelude.List (Length)
import Data.ByteString.IsoBaseFileFormat.ReExports
newtype DataReference =
DataReference (U32 "entry_count")
deriving (Default,IsBoxContent)
dataReference
:: KnownNat (Length ts)
=> Boxes ts -> Box (ContainerBox (FullBox DataReference 0) ts)
dataReference bs =
containerBox (FullBox 0 $ DataReference (typeListLength bs))
bs
localMediaDataReference
:: Box (ContainerBox (FullBox DataReference 0) '[Box (FullBox DataEntryUrl 0)])
localMediaDataReference = dataReference (singletonBox localMediaDataEntryUrl)
instance IsBox DataReference
type instance BoxTypeSymbol DataReference = "dref"