Commits


scte35: early return Clearer than keeping most of the code indented


m3u8: de-indent variant parsing common path Return early with guard statements


scte35: correctly pack AudioChannel Couple of problems. First we were unnecessarily masking bits. Secondly we were toggling the wrong bits in the final byte of an encoded audio channel in an AudioDescriptor. Resolves: https://github.com/untangledco/streaming/issues/39


m3u8: de-indent happy key, playlist parse path Everything else are essentially guard statements


m3u8: unexport, use consistent timestamp layout The layout is meant to be used internally; the external interface is regular time.Time values.


m3u8: define segment parsing once It's a bit of a hack that we read one item too many from the lexer. This change modifies segment parsing by sending the already consumed lexer items and subsequent lexer items back through another channel. Maintaining the original order through a channel means we can parse a segment in a single loop. Much shorter than dealing with the first item and all other items separately. This puts off looking into any redesigns of the lexer. For now...?


m3u8: document at a high level what DateRange structure is


m3u8: include source of playlist So we all know where it comes from if we want to get more.


m3u8: parse EXT-X-PROGRAM-DATE-TIME tag


m3u8: support parsing EXT-X-MAP tag


m3u8: support parsing segment keys


m3u8: add validation to segment parsing tests Tests fail, but at least we have exposed the bugs


m3u8: ignore trailing commas, support quoted string attributes Playlist from https://test-streams.mux.dev/dai-discontinuity-deltatre/manifest.m3u8 containing discontinuities exposed the bugs.


m3u8: enable toggling lexer debug output


m3u8: add higher-level variant test We weren't really testing whether variants we parse from a playlist were what we expect. References: https://github.com/untangledco/streaming/issues/34


m3u8: test more bad resolutions We don't necessarily need to make it easier to specify Variant test cases, we can pick the already easy-to-test bits of Variant to make better. References: https://github.com/untangledco/streaming/issues/34


avhelp: delete The idea was to have a little playground using the packages we developed. But it didn't really turn out to be useful.


m3u8: parse media sequence in one hit Since we're just parsing an integer we can just try to parse the next token from the lexer, like how we parse the playlist version.


m3u8: add support for parsing media sequence from playlist


readme: green is good


internal/sip: extract containsSpace function We'll need it later and we're a few nested for loops and if stmts down so a little cleaner once we do this a few more times.


sip: handle To, From fields in the header with their own type Now we handle the tag header parameter, and all the different forms the values of To and From can have.


sip: validate Via header field on writing requests


sip: write body of request only when it's non-nil duh


internal/sip: correctly format and write requests