Contents

mavisbroadcast/amf

This is an incomplete/WIP Swift implementation of Action Message Format Encoding and Decoding. Originally built for use in a Swift RTMP implementation in the video broadcast space.

TODO:

Both

  • [ ] Refactor away side effecty lazy vars to bubble up throws a bit better
  • [ ] Remove some boilerplate with types not easily represented in AMF, but are in Swift

AMF0

  • [ ] Better tested reference decoding
  • [ ] Reference encoding implementation
  • [ ] XML Document Type
  • [ ] More unit tests in general

AMF3

  • [ ] Reference decoding
  • [ ] Reference encoding
  • [ ] Typed, Dynamic, Externalizable Objects (currently only Anonymous is supported)
  • [ ] XML Type
  • [ ] ByteArray Type
  • [ ] Vector Types
  • [ ] Dictionary Type
  • [ ] Sparse ECMA (to be parsed into a dictionary) of the Array Type
  • [ ] Keying by types other than strings
  • [ ] RTMP based tests
  • [ ] More tests

THANKS!

Massive thanks to @mattt for his Flight School Guide to Swift Codable, specifically his MessagePack implementation and DIY Codable Encoder / Decoder Kit both of which were invaluable in understanding how to write a custom Codable Encoder/Decoder and to the existing (but rather dated) CocoaAMF for getting my head around AMF (especially AMF3 - which is totally nutty - with it's proprietary Unsigned29Int that itself is bit shifted all over the place).

Package Metadata

Repository: mavisbroadcast/amf

Default branch: master

README: README.md