Changes included adding support for variable InputCodec that may be set via netreceiver/vidgrind to set to H264/MJPEG. Also setting revid's lexTo
function to mjpeg.Lex in the case of an MJPEG InputCodec. Added options parameter to mts.NewEncoder function so that we can change options of the
encoder, namely whether it bases PSI interval on NAL type, or number of frames - in the case of MJPEG we based PSI interval on number of frames.
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.
Wrote the FindPSI test which revealed a bug regarding creation of a PMT using comcast gots. This was fixed by writing Payload function and
extracting payload of PMT packet before giving to psi.NewPMT.
We have only ever used this function to find PSI so it makes sense to make it exclusive for this. It now also returns the streams found in the PMT. So that
we can actually retrieve the PIDs of the media and their types.
This func will further segment an MTS segment to each series of packets that
correspond to a given key and val of meta. Testing for this func has also been
written.
Added function to extract meta from first PMT found in a mpegts clip. This simply
wraps the logic we've used in vidrecord, i.e. Finding the PMT, converting to a
comcast gots psi.PSIBytesm, using HasDescriptor to get the meta descriptor, and
then mapping metadata. Also added testing.
This func will return the first and last PTS from an MPEGTS clip by finding the first access unit, and then by moving backward from the end of the clip to find the start of the final PES packet.