This change included a rename of IntraRefreshPeriod to MinPeriod, and the addition of the ClipDuration param. PSI are now written before IDR. Clips are no longer outputed
based on PSI but rather a time ClipDuration, where ClipDuration >= MinPeriod, however, PSI must still be at the beginning of each clip. Also created functionality to update
meta time even if we don't have a response to update.
Added H264ID and H265ID consts and added logic to select this const for use in encoder based on mediaType param in NewEncoder. Also now
declaring PMT in NewEncoder so that we can set streamID correctly based on mediaType.
Now that we want buffered senders (as required), the ringBuffer that was after the
lexer has been removed. Instead, we now have an ioext.multiWriterCloser to which the
lexer writes to. This then writes to the encoders, and then encoders write to each of
their own multiWriteClosers, which write to the appropriate senders. We now call
close on the first multiWriteCloser to close down the entired pipeline, as this close
call propogates through each level.
We have removed the outputClips routine as it's not required anymore to get data
from the revid ringBuffer, and have removed other things that were used by this, like
the IsRunning function.
We have also updated tests to work with these changes - they are passing.
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.