isobmff-builder-0.10.0.0: A (bytestring-) builder for the ISO-14496-12 base media file format

Safe HaskellNone
LanguageHaskell2010

Data.ByteString.IsoBaseFileFormat.Boxes.Versioned

Description

A binary version 0/1 field with seperate content for each version.

Synopsis

Documentation

data Versioned v0 v1 version where Source #

Two alternative representations based on a version index. Use this for box content that can be either 32 or 64 bit.

Constructors

V0 :: IsBoxContent v0 => v0 -> Versioned v0 v1 0 
V1 :: IsBoxContent v1 => v1 -> Versioned v0 v1 1 

Instances

((~) Nat version 0, IsBoxContent v0, Default v0) => Default (Versioned v0 v1 version) Source # 

Methods

def :: Versioned v0 v1 version #

IsBoxContent (Versioned v0 v1 version) Source # 

Methods

boxSize :: Versioned v0 v1 version -> BoxSize Source #

boxBuilder :: Versioned v0 v1 version -> Builder Source #

data ApplyVersioned v' where Source #

Two alternative representations based on a version index. Use this for box content that can be either 32 or 64 bit.

Constructors

OnV0 :: forall v. IsBoxContent (v @@ 0) => (v @@ 0) -> ApplyVersioned v 
OnV1 :: forall v. IsBoxContent (v @@ 1) => (v @@ 1) -> ApplyVersioned v 

data SelectByVersion :: (a -> Type) -> a -> a -> Nat ~> Type Source #

A type level arrow that applys the type constructor to one of the two versions depending on the version parameter.

Instances

type Apply Nat Type (SelectByVersion a f v0 v1) 1 Source # 
type Apply Nat Type (SelectByVersion a f v0 v1) 1 = f v1
type Apply Nat Type (SelectByVersion a f v0 v1) 0 Source # 
type Apply Nat Type (SelectByVersion a f v0 v1) 0 = f v0