Commit Graph

60 Commits

Author SHA1 Message Date
Saxon f0d1b994bf container/mts: wrote test for BytesForMetaInterval and corrected bugs 2019-06-14 19:27:19 +09:30
Saxon 5f78ef8666 container/mts: wrote function BytesForMetaInterval to return media between two points of meta. 2019-06-14 17:41:34 +09:30
Saxon 22079fcb48 container/mts: wrote test for BytesForPTSInterval and corrected bugs 2019-06-14 14:21:45 +09:30
Saxon 70eb8193cb container/mts: wrote BytesForPTSInterval
This function will return the media between two provided PTS. Binary search has been used to
find the corresponding Frames to 'from' and 'to'.
2019-06-14 01:10:00 +09:30
Saxon 12c205d75f container/mts: wrote test for Clip.Bytes and generalised logic for generating frames into genFrames func 2019-06-13 18:12:17 +09:30
Saxon 1323cbcae3 container/mts: filled Clip.Bytes
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.
2019-06-13 16:30:39 +09:30
Saxon 8f434e9703 container/mts: added payload_test.go and fixed bugs in Extract 2019-06-13 15:52:25 +09:30
Saxon b473451288 container/mts: added payload.go file with Extract function and types
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.
2019-06-12 01:17:14 +09:30
Saxon e4bce3bcb3 container/mts: added ExtractMeta function and testing
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.
2019-06-12 01:01:51 +09:30
Saxon 482f5609e5 container/mts/meta: wrote test for GetAllAsMap 2019-06-11 22:15:27 +09:30
Saxon 9af964cfc9 container/mts/meta: added GetAllAsMap function
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.
2019-06-11 22:07:51 +09:30
Saxon ecc0ab8664 container/mts/encoder.go: updated comment for Encode constants 2019-05-23 14:05:17 +09:30
Saxon 85984555a3 container/mts/encoder.go: fixed comment for pmtTable initialisation 2019-05-21 17:09:47 +09:30
Saxon d29141cf05 container/mts: changed consts H264, H265 and Audio to EncodeH264, EncodeH265 and EncodeAudio 2019-05-21 16:57:17 +09:30
Saxon 92d4c5f79a container/mts/encoder.go: generalising stream id logic 2019-05-16 16:41:52 +09:30
Saxon 548b7caa81 revid: fixed rtpPort and rtcpPort parsing and added H264 and H265 IDs
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.
2019-05-16 13:57:10 +09:30
Saxon 8081fd48a0 container/mts/mpegts.go: fixed conflict with master 2019-05-13 17:07:53 +09:30
Saxon 51f4d123bf container/mts: using MPEG-TS in comments rather than MPEGTS or mpegts 2019-05-11 21:14:28 +09:30
Saxon 1ab6ab116a container/mts/encoder.go: fixed comment for PTSFrequency const. 2019-05-11 16:33:09 +09:30
Saxon aa5a089c55 container/mts/encoder.go: fixed comment for time-related constants 2019-05-11 16:32:00 +09:30
Saxon 20a5ed5362 container/mts/mpegts.go: renamed pidType to pid in GetPTSRange 2019-05-11 16:30:29 +09:30
Saxon 5652b05c21 container/mts/mpegts.go: added package level doc comment 2019-05-11 16:29:15 +09:30
Saxon 0d3463ac87 container/mts: update comments for PCRFrequency and PTSFrequency 2019-05-11 13:57:02 +09:30
Saxon 8f8ae7c558 container/mts: using uint16 for PID always 2019-05-11 13:50:40 +09:30
Saxon 04c7825063 container/mts: PCRFreq->PCRFrequency and PTSFreq->PTSFrequency 2019-05-11 13:48:32 +09:30
Saxon ebb69ea6aa container/mts/mpegts.go: GetPTSRange now generalised for any PID 2019-05-11 13:04:30 +09:30
Saxon e2d9853264 container/mts: fixed build error 2019-05-11 12:49:31 +09:30
Saxon 594dca1b21 container/mts/encoder.go: export PTS frequency. 2019-05-11 12:46:31 +09:30
Saxon 62844809f2 container/mts/mpegts_test.go: writePSI and writeFrame take bytes.Buffer pointer now 2019-05-10 17:47:48 +09:30
Saxon b12a78dad2 container/mts/mpegts.go: corrected comment 2019-05-10 17:45:04 +09:30
Saxon 5179cdaceb container/mts/mpegts_test.go: wrote some helper functions for writing psi and frames and cleaned up commenting 2019-05-10 17:38:22 +09:30
Saxon a86a3fa88a container/mts/mpegts_test.go: added testing file for mpegts.go
Added testing file for mpegts_test.go and added test for GetPTSRange().
2019-05-10 17:22:14 +09:30
Saxon 542f017879 container/mts/pes/pes.go: simplified insertion of pts into pes []byte using comcast/gots InsertPTS func 2019-05-10 14:51:53 +09:30
Saxon 868d01527c container/mts/mpegts.go: wrote GetPTSRange func
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.
2019-05-10 14:20:14 +09:30
Saxon 5e705f793e container/mts/mpegts_test.go: using consts where I should be 2019-05-08 00:09:42 +09:30
Saxon bccd7c2762 container/mts/mpegts.go: error test for invalid packet size in FindPid corrected 2019-05-08 00:07:23 +09:30
Saxon 9dcf866162 container/mts/mpegts.go: removed unused const 2019-05-08 00:06:05 +09:30
Saxon 1e7d3508e3 container/mts/encoder_test.go: simplified some code and improved commenting 2019-05-08 00:03:44 +09:30
Saxon a0e2360f2b container/mts/encoder_test.go: corrected typo in comment for expectedHeaders 2019-05-07 23:57:48 +09:30
Saxon 977dab9673 container/mts/encoder_test.go: finished writing test TestEncodeVideo
Test is also now checking payload data as well as MPEGTS headers.
2019-05-07 23:49:31 +09:30
Saxon 3292ce0506 container/mts: simplified Packet.Bytes(), and tested 2019-05-07 23:10:03 +09:30
Saxon 0e362e6056 container/mts: wrote test TestEncodeVideo
Wrote a test to check mts encoding of video to validate packet creation etc. Test is failing because how I did mts
encoding is interesting, thinking about changing.
2019-05-07 21:22:57 +09:30
Saxon a805dc13a6 container/mts: removed audio_test.go 2019-05-07 13:34:14 +09:30
Saxon dbec11f3b4 container/mts: renamed audio_test.go to encoder_test.go
This file will now contain any tests pertinent to the mts encoder.
2019-05-07 13:20:06 +09:30
Saxon c8531b2899 container/mts: added comments to tests 2019-05-07 13:17:33 +09:30
Saxon a8aec484df container/mts: wrote test TestFindPid and corrected bug
Completed test TestFindPid to validate function of FindPid func in mpegts.go. Through this
process, it was found that there was a bug in this func, whereby the returned packet was
not complete due to indexing issues. The bug is fixed and the test passes.
2019-05-07 02:20:07 +09:30
Saxon 52c8a43cb0 container/mts: added mpegts_test.go and first test TestBytes. 2019-05-06 23:07:26 +09:30
Saxon 77ff88392f revid: setupInput function for revid now returns closure that is used to do any clean up 2019-05-06 15:12:05 +09:30
Saxon 1b06dae078 container/mts: not taking address of nopCloser 2019-04-24 12:57:04 +09:30
Saxon e5f95d1ea0 revid: addressing PR feedback 2019-04-23 13:18:41 +09:30