packages feed

gpmf 0.1.1.0 → 0.1.1.1

raw patch · 2 files changed

+8/−4 lines, 2 files

Files

gpmf.cabal view
@@ -1,13 +1,13 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.6.+-- This file has been generated from package.yaml by hpack version 0.34.7. -- -- see: https://github.com/sol/hpack ----- hash: 3eb43a91591e1cad779c5b5bde8ee5614825a5b5379a0d7951dadc0795f02024+-- hash: 02deec16ad0ae901f9aab83fe594d492d38e1492ded6e44501c7037008324a53  name:           gpmf-version:        0.1.1.0+version:        0.1.1.1 description:    Please see the README on GitHub at <https://github.com/dustin/gpmf#readme> homepage:       https://github.com/dustin/gpmf#readme bug-reports:    https://github.com/dustin/gpmf/issues
src/GoPro/GPMF.hs view
@@ -18,7 +18,7 @@ import           Data.Attoparsec.Binary           (anyWord16be, anyWord32be, anyWord64be) import qualified Data.Attoparsec.ByteString       as A import qualified Data.Attoparsec.ByteString.Char8 as AC-import           Data.Binary.Get                  (runGet)+import           Data.Binary.Get                  (getInt32be, runGet) import           Data.Binary.IEEE754              (getFloat32be) import qualified Data.ByteString                  as BS import qualified Data.ByteString.Lazy             as BL@@ -112,6 +112,9 @@ parseFloat :: A.Parser Float parseFloat = runGet getFloat32be . BL.fromStrict <$> A.take 4 +parseInt32 :: A.Parser Int32+parseInt32 = runGet getInt32be . BL.fromStrict <$> A.take 4+ replicatedParser :: Int -> Int -> Int -> A.Parser a -> ([a] -> Value) -> Parser [Value] replicatedParser 0 l rpt _ _ = lift $ replicateM (l*rpt) A.anyWord8 >> pure [] replicatedParser one l rpt p cons =@@ -124,6 +127,7 @@ singleParser 'F' = (4, GFourCC <$> parseFourCC) singleParser 'f' = (4, GFloat . (:[]) <$> parseFloat) singleParser 'L' = (4, GUint32 . (:[]) <$> anyWord32be)+singleParser 'l' = (4, GInt32 . (:[]) <$> parseInt32) singleParser 'B' = (1, GUint8 . (:[]) <$> A.anyWord8) singleParser 'b' = (1, GInt8 . (:[]) <$> anyInt8) singleParser 'S' = (1, GUint16 . (:[]) <$> anyWord16be)