Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data StaticExpandableContent :: BitRecord -> Extends BitRecord
- type StaticExpandableContentMaxBits = 32
- type family ExpandableSize (s :: Nat) :: BitRecord where ...
- type ExpandableSizeLastChunk (s :: Nat) = (Field 1 := 0) .+. (Field 7 := s)
- type family ExpandableSizeNext (s :: Nat) :: BitRecord where ...
- type ExpandableSizeNextChunk (s :: Nat) = (Field 1 := 1) .+. (Field 7 := s)
- newtype Expandable t where
- Expandable :: t -> Expandable t
- expandableSizeSize :: BoxSize -> BoxSize
- expandableSizeBuilder :: BoxSize -> Builder
Static Expandable
data StaticExpandableContent :: BitRecord -> Extends BitRecord Source #
Instances
type From (StaticExpandableContent record :: BitRecord -> Type) Source # | |
Defined in Data.ByteString.Mp4.Boxes.Expandable type From (StaticExpandableContent record :: BitRecord -> Type) = ExpandableSize (ShiftR StaticExpandableContentMaxBits (SizeInBits record) 3) :+: record |
type StaticExpandableContentMaxBits = 32 Source #
type family ExpandableSize (s :: Nat) :: BitRecord where ... Source #
ExpandableSize 0 = EmptyBitRecord | |
ExpandableSize s = If (s <=? 127) (ExpandableSizeLastChunk s) (ExpandableSizeNext (ShiftR StaticExpandableContentMaxBits s 7) :+: ExpandableSizeLastChunk s) |
type family ExpandableSizeNext (s :: Nat) :: BitRecord where ... Source #
ExpandableSizeNext 0 = EmptyBitRecord | |
ExpandableSizeNext s = If (s <=? 127) (ExpandableSizeNextChunk s) (ExpandableSizeNext (ShiftR StaticExpandableContentMaxBits s 7) :+: ExpandableSizeNextChunk s) |
Runtime-value Expandable
newtype Expandable t where Source #
Expandable :: t -> Expandable t |
Instances
IsBoxContent t => IsBoxContent (Expandable t) Source # | |
Defined in Data.ByteString.Mp4.Boxes.Expandable boxSize :: Expandable t -> BoxSize Source # boxBuilder :: Expandable t -> Builder Source # |
expandableSizeSize :: BoxSize -> BoxSize Source #