Saxon
1a233d8576
container/mts: wrote function TrimToMtsRange and added related testing
...
This function will return a sub slice of MPEG-TS corresponding to an interval of metadata.
Also wrote testing for this function.
2019-06-16 04:08:41 +09:30
Saxon
513e9d06ff
container/mts: moved contents of metaEncode_test.go to encoder_test.go and deleted metaEncode_test.go
...
The contents within metaEncode_test.go were strongly related to the contents
in encoder.go, so the code was moved and the file was deleted.
2019-06-15 02:13:49 +09:30
Saxon
2bd7a009ce
container/mts: BytesForMetaInterval renamed to TrimToMetaRange and now returns Clip for similar reasons to previous commit
2019-06-15 02:12:17 +09:30
Saxon
ceee163b74
container/mts: BytesForPTSInterval renamed to TrimToPTSRange, and now returns a Clip
...
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.
2019-06-15 02:04:29 +09:30
Saxon
eff69e87ce
container/mts: added some commenting
2019-06-14 19:33:40 +09:30
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 Milton
466552cbf9
Merged in mpegts-testing (pull request #195 )
...
container/mts: testing for mpegts.go and encoder.go
Approved-by: Alan Noble <anoble@gmail.com>
2019-05-13 07:09:08 +00:00
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
7955018ab0
container/flv: removed some unecessary comments
2019-05-08 17:06:23 +09:30
Saxon
4f2d2f7c26
container/flv/flv_test.go: commented test functions
2019-05-08 15:41:19 +09:30
Saxon
553ba8dc54
container/flv/audio_test.go: added test TestAudioTagBytes
...
Wrote test TestAudioTagBytes to check that we can correctly get a []byte representation of an
AudioTag.
2019-05-08 15:39:12 +09:30
Saxon
48645d1cf3
container/flv/flv_test.go: wrote test TestVideoTagBytes
...
Wrote test TestVideoTagBytes which checks that we can get a valid []byte representation of a
VideoTag. The test is passing.
2019-05-08 15:14:35 +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