{-# LANGUAGE UndecidableInstances #-}
module Data.ByteString.IsoBaseFileFormat.Boxes.SampleEntry where
import Data.ByteString.IsoBaseFileFormat.Box
import Data.ByteString.IsoBaseFileFormat.Boxes.Handler
import Data.ByteString.IsoBaseFileFormat.Util.BoxFields
import Data.ByteString.IsoBaseFileFormat.ReExports
sampleEntry
:: U16 "data_reference_index"
-> handlerSpecific
-> Box (SampleEntry handlerSpecific)
sampleEntry i se = Box (SampleEntry (Constant :+ i :+ se))
newtype SampleEntry handlerSpecific where
SampleEntry
:: Constant (U8Arr "reserved" 6) '[0,0,0,0,0,0]
:+ U16 "data_reference_index"
:+ handlerSpecific
-> SampleEntry handlerSpecific
deriving instance IsBoxContent handlerSpecific =>
IsBoxContent (SampleEntry handlerSpecific)
deriving instance Default handlerSpecific =>
Default (SampleEntry handlerSpecific)
data MatchSampleEntry :: HandlerType -> Type
type instance
IsRuleConform (Box (SampleEntry handlerSpecificEntry))
(MatchSampleEntry handlerType) =
HandlerTypeCode (GetHandlerType handlerSpecificEntry) == HandlerTypeCode handlerType
type instance
BoxTypeSymbol (SampleEntry handlerSpecific) = BoxTypeSymbol handlerSpecific
instance (IsBoxContent handlertype
,KnownSymbol (BoxTypeSymbol handlertype))
=> IsBox (SampleEntry handlertype)