databrary-1: Databrary

Safe HaskellNone
LanguageHaskell2010

Model.Format

Synopsis

Documentation

mimeTypeTop :: ByteString -> ByteString Source #

Parse a full mimetype value into just its category or type

mimeTypeSub :: ByteString -> ByteString Source #

Parse a full mimetype value into just its subtype

mimeTypeTopCompare :: ByteString -> ByteString -> Ordering Source #

Establish a relative order between to specific mimetype values ...

allFormats :: [Format] Source #

Harcoded list of all formats recognized by Databrary for uploading TODO: db coherence

videoFormat :: Format Source #

Blessed video format, used as output from transcoding, as well as understood by front end for playback

audioFormat :: Format Source #

Blessed audio format, used as output from transcoding, as well as understood by front end for playback

formatIsImage :: Format -> Bool Source #

Is this an image format

formatTranscodable :: Format -> Maybe Format Source #

If the format can (or should be) transcoded into the blessed internal format, then provide the format it will be transcoded into

formatSample :: Format -> Maybe Format Source #

For formats where we can produce samples, determine the type for sample output

formatJSON :: ToObject o => Format -> Record (Id Format) o Source #

Convert a Format value into the shape of JSON to be produced. Arbitrarily only show the first extension if multiple extensions are present

formatIsAV :: Format -> Bool Source #

Is this an Audio or Video format