Commit Briefs
m3u8: parse segment title from EXTINF (main, tags/v0.0.4)
Resolves: https://github.com/untangledco/streaming/issues/41
wav: declare header var once
The rest are initialised to zero values so we don't have to do it ourselves.
pcap: let caller decide to buffer writes
There was probably a bug here. Anyway it's less code!
mpegts: shorter return
No need to annotate the error; caller knows we're unmarshalling.
m3u8: keep Rendition writing validation separate from Encode
Consistent with the rest of playlist fields. While here delete duplicate Map writing function
sdp: use encoding.TextMarshaler for Session encoding
fmt.Stringer is not really meant for larger multi-line text. It sucks a bit that we may return an error, but this lets us put some validation logic in; we don't have any validation yet.
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 (tags/v0.0.3)
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: include source of playlist
So we all know where it comes from if we want to get more.
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: 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 (tags/v0.0.2)
The idea was to have a little playground using the packages we developed. But it didn't really turn out to be useful.