saxon
ce92dd37d8
stream/mts/meta: added Keys() func and appropriate testing
...
A meta.Keys(d []byte) []string, error func has been added that will extract the keys of a metadata string. A test has also been added
to test that this function performs as expected.
2019-02-10 08:58:38 +10:30
Saxon Milton
07d0b7cd5b
Merged in add-extract-all (pull request #138 )
...
stream/mts/meta: added ExtractAll func
Approved-by: Alan Noble <anoble@gmail.com>
Approved-by: kortschak <dan@kortschak.io>
2019-02-09 12:30:38 +00:00
saxon
1f3d34b6bb
stream/mts/meta/meta_test.go: corrected func comment for TestGetFrom
2019-02-09 22:27:25 +10:30
saxon
cc0becf58c
stream/mts/meta: simplified meta checking for Get and GetAll
2019-02-09 22:25:36 +10:30
saxon
50575270b9
stream/mts/meta: checking if given slice is nil or empty and returning error if either. Also updated some func comments
2019-02-09 21:35:35 +10:30
saxon
716a92a72c
stream/rtp/encoder.go: sendLen to sendSize and capturing error from e.Encode()
2019-02-09 19:31:15 +10:30
saxon
01513fbb3f
stream/rtp/encoder.go: correct encoder.Write to work if an abitrary number of bytes are written
2019-02-09 13:22:18 +10:30
saxon
e796a5a3b7
stream/mts/meta: updating function comments and test function names according to Extract->Get and ExtractAll->GetAll change
2019-02-09 12:16:57 +10:30
saxon
f9d8accdae
stream/mts/meta/meta.go: Extract and ExtractAll to Get and GetAll
2019-02-09 12:14:32 +10:30
saxon
fadc1fed1b
stream/mts/meta: added ExtractAll func and added testing utilities
2019-02-08 21:31:00 +10:30
saxon
d5a26a98ff
stream/rtp/encoder.go: more sensible use of encoder buffer
2019-02-08 20:20:19 +10:30
saxon
db3b34c10f
stream/mts/meta: meta.Delete no longer returns error - updated code accordingly
2019-02-08 10:56:19 +10:30
saxon
a94bdbfe47
stream/mts/meta: meta.Get now returns ok bool rather than error - updated usage accordingly
2019-02-08 10:25:57 +10:30
saxon
8bdfed9960
stream/mts: fixing conflicts
2019-02-08 10:13:51 +10:30
saxon
330fdc6aa8
stream/mts/psi/psi.go: cleaned up and comment consts
2019-02-07 15:48:35 +10:30
saxon
b4393e5136
stream/mts/psi/psi.go: checking that we have enough space in psi before creating descriptor
2019-02-07 15:23:41 +10:30
saxon
21265303d7
stream/mts/mpegts.go: reorganised exported constants and commented
2019-02-07 15:06:54 +10:30
saxon
b8fc6d7e99
stream/mts/meta/meta.go: ReadFrom to Extract
2019-02-07 14:50:31 +10:30
saxon
46b5acb48c
stream/mts/mpgets.go: removing unused consts
2019-02-07 13:59:43 +10:30
saxon
7a7be5580d
stream/mts/metaEncode_test.go: wrote function comments for tests
2019-02-07 10:55:58 +10:30
saxon
bb032778c6
stream/mts/metaEncode_test.go: fixed metaEncode_test.go by initialising Meta global in tests
2019-02-07 10:48:25 +10:30
saxon
66a2325dcb
stream/mts/meta/meta_test.go: using table of tests for TestReadFrom
2019-02-07 10:42:01 +10:30
saxon
f96f761b2f
stream/mts/meta/meta_test.go: fixed up error logging in meta_test.go i.e. not doing err.Error() for %v format specifiers, and not using t.Errorf when we have no arguments
2019-02-07 09:01:40 +10:30
saxon
ad671b520c
stream/mts/encoder.go: put todo under comment for Meta meta.Data global
2019-02-07 08:31:02 +10:30
saxon
7cb58c81eb
stream/mts/encoder.go: added comment to Meta meta.Data global as it unexported.
2019-02-07 08:29:51 +10:30
saxon
fb2217a1f9
stream/mts/encoder.go: wrote todo to make Meta meta.Data struct not be global
2019-02-07 08:27:37 +10:30
saxon
57d1dba2fb
stream/mts/meta/meta.go: updated meta.NewWith so that it just uses meta.New, and now ti can add an abitrary number of things to the map. It also overwrites keys that have been repeated
2019-02-06 12:16:44 +10:30
saxon
2b7ab27763
cmd/revid-cli & stream/mts/meta: added meta.NewWith function that creates a new meta.Data and adds an initial entry. Using meta.NewWith in revid-cli to initialise mts' global meta.Data with some preamble data.
2019-02-06 10:19:12 +10:30
saxon
d523677627
stream/mts/meta/meta.go: renamed Metadata struct to Data
2019-02-06 09:59:55 +10:30
saxon
9b5eb558ef
stream/mts/meta/meta_test.go: Updated func comment for TestReadFrom
2019-02-06 00:01:17 +10:30
saxon
35c06c97aa
stream/mts/meta/meta_test.go: not using global vars for errors
2019-02-05 23:57:53 +10:30
saxon
89b05b3cb6
stream/mts/meta/meta.go: using copy instead of append to remove key from order slice in Meta.Delete()
2019-02-05 23:29:07 +10:30
saxon
cf73c853b0
stream/mts/meta/meta.go: using defer for m.mu.Unlock() Meta.Add()
2019-02-05 23:25:46 +10:30
saxon
6b32064a2b
stream/mts/encoder.go: changed updateMeta signature to return bytes slice rather than passing in pointer to byte slice.
2019-02-05 23:24:00 +10:30
saxon
dc46d9f0b2
stream/mts/encoder.go: not doing scoped conditional in writePSI when calling updateMeta
2019-02-05 23:18:05 +10:30
saxon
6425403fcb
stream/mts/encoder.go: adding copyright meta first thing
2019-02-05 13:14:42 +10:30
saxon
3364b4ea6f
stream/mts/meta.go: avoiding adding same key to order slice
2019-02-05 13:11:11 +10:30
saxon
834625a9f7
stream/mts/meta: using order slice so that encoded order reamins consistent with order that we added metadata. And also now using binary.BigEndian.PutUint16() to encode len into metdata rather than doing ugly byte manipulation
2019-02-05 12:55:32 +10:30
saxon
ad25785b77
stream/mts/meta/meta_test.go: improved ReadFrom by checking for valid header
2019-02-04 22:48:51 +10:30
saxon
953d363b3a
stream/mts/meta.go: improved const and function commenting
2019-02-04 22:38:11 +10:30
saxon
0a96d18a10
stream/mts/encoder.go: finished comment for updateMeta function
2019-02-04 22:17:39 +10:30
saxon
1570974ab7
stream/mts/encoder.go: removed init func where Meta was being initialised - just doing initialisation on same line
2019-02-04 22:14:17 +10:30
saxon
eb54871402
stream/mts/encoder.go: simplified updateMeta
2019-02-01 11:39:47 +10:30
saxon
4d4a8e04ec
stream/mts/meta/meta_test.go: created global err vars
2019-02-01 11:17:53 +10:30
saxon
38d5d6f0fd
stream/mts/meta/meta_test.go: adding test for ReadFrom
2019-02-01 09:27:43 +10:30
saxon
1f1546a284
revid: updated code in senders.go to work with meta changes
2019-01-31 21:30:08 +10:30
saxon
10343375a3
stream/mts: moved meta.go and meta_test.go into meta package
2019-01-31 21:23:06 +10:30
saxon
9011c090d9
stream/mts/meta.go: wrote ReadFrom func - still need to write tests for it
2019-01-31 13:26:16 +10:30
saxon
1d9cb57505
stream/mts/metaEncode_test.go: added another test to check behaviour when more meta data is added.
2019-01-30 16:22:57 +10:30
saxon
d373f85b85
stream/mts: wrote test in metaEncode_test.go and found bug which was fixed
2019-01-30 15:37:15 +10:30
saxon
7dd1ce99e1
stream/mts: started writing metaEncode_test.go file
2019-01-30 13:23:07 +10:30
saxon
83ac98fe84
stream/mts: added metaEncode_test.go a file that will contain tests that will use the Meta struct to actually encode metadata into psi
2019-01-30 12:26:51 +10:30
saxon
60c2eafd8c
stream/mts/psi/descriptor_test.go: added some function comments above new test funcs
2019-01-30 12:13:29 +10:30
saxon
c2112e58ac
stream/mts/psi: added some more tests for AddDescriptor, and in the process fixed some bugs with AddDescriptor
2019-01-30 12:08:55 +10:30
saxon
55bee1532e
stream/mts/psi/psi.go: added function comments and improved commenting and layout inside functions
2019-01-30 11:01:04 +10:30
saxon
d49a8b8c6b
stream/mts/psi.go: removed trimPadding function as we don't need this anymore
2019-01-29 22:09:17 +10:30
saxon
7f8465f1ad
stream/mts/psi/descriptor_test.go: added comments to test funcs - as well as some todos for further testing.
2019-01-29 22:07:06 +10:30
saxon
568840f691
stream/mts/psi: cleaned up descriptor_test.go
2019-01-29 18:22:57 +10:30
saxon
a5e1763c97
stream/mts/psi: finished writing AddDescriptor test -everything working fine now
2019-01-29 16:42:02 +10:30
saxon
5cba861063
stream/mts/psi: removed test that we don't need to do
2019-01-29 16:16:37 +10:30
saxon
c7d418ce81
stream/mts/psi: deleted some todos as they have been addressed now
2019-01-29 16:15:18 +10:30
saxon
1786ed2661
stream/mts/psi: finished writing AddDescriptor
2019-01-29 16:14:00 +10:30
saxon
252e6680ed
stream/mts/psi: modified way in which we add padding to psi - now we leave it up to the mts package to do this on creation of an ts packet. Also in the middle of writing AddDescriptor func, and finding issues, hence the mentioned change.
2019-01-29 15:42:51 +10:30
saxon
2145db71d4
stream/mts/psi: wrote SetSectionLen func
2019-01-29 15:16:08 +10:30
saxon
a5f7c5ad87
stream/mts/psi: removed TestDeleteDescriptor test as we don't need anymore
2019-01-29 14:39:39 +10:30
saxon
287238ddd1
stream/mts/psi: removed deleteDescriptor func as we don't need it yet
2019-01-29 14:39:01 +10:30
saxon
4a3464252b
stream/mts/psi: changed HasDescriptor to also return index of descriptor in psi. Wrote func called SetProgInfoLen to set the program info length in a pmt. Started writing deleteDescriptor func to get rid of a descriptor.
2019-01-29 14:38:23 +10:30
saxon
a61bdac2de
stream/mts/psi: added testing file with tests
2019-01-29 14:21:25 +10:30
saxon
af239838d0
stream/mts/psi: modified how update crc works so that we're only giving it data that's included in crc calc as well as the crc field itself. Added some consts to allow working with SyntaxSectionLen. Added trimPadding func so that we can easily get rid of any padding. Fixed createDescriptor func which was found to be broken from TestCreateDescriptor
2019-01-29 14:16:33 +10:30
saxon
3a14b64480
stream/mts/psi/psi.go: simplified HasDescriptor func
2019-01-29 11:30:37 +10:30
saxon
dce113d1e4
stream/mts/psi/descriptor_test.go: wrote HasDescriptor test and fixed HasDescriptor function after bug was found
2019-01-29 11:28:40 +10:30
saxon
5aff27ac4d
stream/mts/psi/descriptor_test.go: wrote test to check ProgramInfoLen func and descriptors func
2019-01-29 10:40:22 +10:30
saxon
3aa0efc16a
stream/mts/meta_test.go: added TestEncode to test Meta.Encoding function
2019-01-28 18:07:34 +10:30
saxon
960c110acb
stream/mts/meta.go: fixed Meta.Encode() func so that it calculates data length correctly
2019-01-28 17:45:38 +10:30
saxon
7d34fa1969
stream/mts/meta.go: completed Meta.Encode() function
2019-01-28 17:29:15 +10:30
saxon
00816ecf84
stream/mts/meta_test.go: added test to meta_test.go to remind me to add a test function once the Meta.Encode() function is complete
2019-01-27 18:34:35 +10:30
saxon
601351b021
stream/mts/meta_test.go: adding comments to meta_test.go testing functions
2019-01-27 18:33:15 +10:30
saxon
e1ac1ac5d4
stream/mts/meta_test.go: using consts for commonly occuring test strings
2019-01-27 18:29:45 +10:30
saxon
7fc2b76e6b
stream/mts/meta_test.go: added TestDeleteKeyAbsent to check that we get correct err when we try to delete data of key that doesn't exist
2019-01-27 18:24:26 +10:30
saxon
c16f144372
stream/mts/meta_test.go: added TestDelete to check that deleting a particular metadata entry by key works
2019-01-27 18:21:49 +10:30
saxon
bd54dd128b
stream/mts/meta_test.go: added TestGetAbsent key to check that we get an error when we try and get data with key that doesn't exist in metadata map
2019-01-27 18:15:22 +10:30
saxon
17d06f49f4
stream/mts/meta_test.go: added TestAll func to make sure Meta.All is working correctly
2019-01-27 18:02:51 +10:30
saxon
3bb1ca9379
stream/mts: wrote NewMeta func to initialize map in the Meta struct. Also wrote two tests, one TestAddAndGet to see if we can add and get metadata, and also second TestUpdate to see if we can correctly update metadata with the same key using Meta.Add
2019-01-27 17:57:42 +10:30
saxon
c547c8bd19
stream/mts: added meta_test.go file and wrote todos for testing
2019-01-27 17:16:44 +10:30
saxon
46b2bc4520
stream/mts: added some consts to describe indexes and masks, and fixed some syntax errors, so now it all builds
2019-01-27 17:04:46 +10:30
saxon
1be7e08b9e
stream/mts: renamed Format function for metadata to Encode
2019-01-27 16:56:14 +10:30
saxon
9171b56d31
stream/mts: created new type to represent Descriptor (typedef of []bytes) so that we can create receiver functions. Wrote AddDescriptor func to add or update a descriptor in a pmt. Wrote ProgramInfoLen func to return the program info length i.e. len of descriptors. Wrote HasDescriptor to check if descriptor exists, if so return the descriptor so that we can update. Wrote descriptors which returns []byte of all descriptors. Wrote create descriptor, which adds a descriptor to the existing if any i.e. shifts data downwards to accomodate new data. Wrote update func to update a descriptor.
2019-01-27 16:55:00 +10:30
saxon
6f421ab706
stream/mts/psi.go: added more to AddDescriptor and added signature for edistDesc
2019-01-26 23:35:31 +10:30
saxon
ecf7263bc1
stream/mts/meta.go: started using mutex where I was supposed to
2019-01-26 22:42:31 +10:30
saxon
df07f3ff48
stream/mts/meta.go: added Format func, but need to complete later once specs are clarified
2019-01-26 22:36:34 +10:30
saxon
8f5a2352b2
stream/mts: added meta.go file to contain struct and methods relating to Metadata and operations
2019-01-26 21:57:14 +10:30
saxon
87ded6bf2e
stream/mts/encoder.go: implemented metadata receiver functions: Add, Get, All and Delete
2019-01-26 21:53:19 +10:30
saxon
d107231224
stream/mts: starting to work out meta logistics in encoder.go and added incomplete AddDescriptor function in psi package
2019-01-26 18:04:21 +10:30
saxon
aea41fb710
stream/mts: adding some constants
2019-01-25 16:25:01 +10:30
saxon
31b9ec07e9
stream/mts/encoder.go: no need to have a now field to capture current time - this can be local to encode function
2019-01-24 14:39:14 +10:30
saxon
42c9fb1d09
stream/mts/encoder.go: writing psi based on time interval rather than number of packets interval
2019-01-24 14:33:22 +10:30
Saxon Milton
286ae4334b
Merged in psi-at-start (pull request #127 )
...
stream/mts/encoder.go: writing psi at start of stream
Approved-by: Alan Noble <anoble@gmail.com>
2019-01-24 02:53:53 +00:00
saxon
df146cfb17
stream/mts/encoder.go: writing psi at start of stream
2019-01-23 15:50:25 +10:30
saxon
6b4e0946dd
stream/mts/mpegts.go: updated FindPMT comment
2019-01-22 11:27:24 +10:30
saxon
ba209a1d7c
mts/mpegts.go: FindPMT now also returns index
2019-01-22 11:21:12 +10:30