Previously the encoder would not care if a write was given that exceeded the max PES packet size
because we were never using PES packets bigger than a frame of video. Now I have changed it so that
the encoder will check the write length and create a new PES packet if needed.
I have also restructured my test so that it can extract the data from PES packets that span accross multiple
MTS packets.
Previously the encoder would not care if a write was given that exceeded the max PES packet size
because we were never using PES packets bigger than a frame of video. Now I have changed it so that
the encoder will check the write length and create a new PES packet if needed.
I have also restructured my test so that it can extract the data from PES packets that span accross multiple
MTS packets.
The mtsSender now has a ringBuffer and tests have been updated accordingly. The mtsSender now uses an output routine to get data from it's ringBuffer to send.
Revid now uses ioext.multiWriteClosers for encoders to write to so that senders can be closed and therefore any output routines.
Wrote test TestPayload which will check that we can correctly get the payload from an RTP
packet using Payload for a variety of different RTP packet configurations.
Wrote test TestHasExt which checks the behaviour of hasExt for when it's call with an
RTP packet with an extension indicator and also for an RTP packet with no extension
indicator.
Added parse.go. This file contains functionality to obtain the Payload from an RTP packet.
Unexported functions to help with this extraction have been added; extHeaderLen, hasExt,
csrcCount and version.
We are now using an io.multiWriter rather than the multiSender. Code has been updated inside revid.go to account for this change, and tests have also been updated accordingly. Tests for
the multiSender have been removed. A dummyMultiWriter has been written to inject our own multiWriter during testing.
Now that we're removing the concept of a loadSender, there is no need to have a minimalHttpSender (did not implement loadSender) and a httpSender (implemented loadSender). So we can now have
a single httpSender that implements io.Writer just like every other sender.
mtsSender has been simplified such that load and send are no longer called in Write. Load and Send have removed and logic is now in Write. The logic has been simplified such that it does not
try to send again. On next PR when ringbuffers are added to senders, we will add logic to deal with this.
Added a Write method to senders such that they implement io.Writer. The multiSender now takes a slice of io.writers.
Also modified revid code and tests to account for this chance.