Added decode folder which will contain the h264 decoder and utilities. Added first file parse.go, which contains parsing
processes for syntax elements.
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.
It was concluded that it would be more useful if a function that provided a data segment from
the original clip just provided a new Clip, i.e. useful things like PTS and meta is still
available in the segment. So, BytesForPTSInterval was renamed to TrimToPTSRange and now
provides a Clip. The test for this function was updated accordingly.
added license to lex.go
changed pcm functions to return alsa.Buffers
style, syntax and clarification added to audio.go
new method of finding buffersize in audio.go uses a new function called nearestPowerOfTwo
writing Clip.Bytes required a change to the Clip type. The Clip type now possess a slice that
references the memory in which the Frames should reference for the media. Appropriate changes have
been made to Extract and TestExtract to accomidate this change.
payload.go has been added which will contain functionality for dealing with MTS
payloads. A function has been added called Extract, which will return a Clip. Clip
is a type representing a sequence of media frames ([]Frame). Type Frame has been
added which represents a media frame. It provides fields to hold the media as
byte slice, PTS to hold the PES timestamp, an ID for identification of codec type
and finally the relevant Meta from the most recent PMT.
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 function is very similar to GetAll, except that is returns a map[string]string rather
than a [][2]string. It's become apparent that a map[string]string might be more useful in
some circumstances.
Renamed the RTPLexer to Extracter, renamed NewRTPLexer to NewExtracter and renamed Lex to Extract. Put Extracter and accompanying methods in file extract.go.
Put tests relating to Extracter in extract_test.go.
audio device input is now handle in its own package which resides in the new input directory
a list of codecs was added to codecutil package to help with multiple packages using the same codecs
Since adding the extra bufSize arg to Lex functions, the test functions using them needed to be updated.
NewAudioDevice was changed to accept a logger to log to instead of creating a new one.