Commit Graph

153 Commits

Author SHA1 Message Date
Saxon 9b3a1d0ae7 revid: multiSender is no longer a struct, but rather a type derived from a []loadSender 2019-03-14 11:20:02 +10:30
Saxon f9c5e1cfa7 revid: removed some more mentions of retry 2019-03-14 10:43:17 +10:30
Saxon 9db59287a9 revid: removed retrySend method from file sender 2019-03-14 10:41:42 +10:30
Saxon 99a4010c79 revid: removed concept of send retry for now
Send retry has been removed from the multiSender. This also means there is not need for the active func, because we simply wait until the send is complete or failed to exit the output clips
routine. Tests pertinent to retrying or the active function have been removed.
2019-03-14 10:35:09 +10:30
Saxon 4881e179cc revid: multiSender active=>isActive 2019-03-14 09:09:57 +10:30
Saxon 2e49de5fa0 revid: newMultiSender panics if active function is not provided 2019-03-14 08:34:35 +10:30
Saxon 465a7fe973 revid: updated comment for mtsSender struct 2019-03-14 08:23:08 +10:30
Saxon 032ffcb8b6 revid: rtmpSender.load no longer copies data 2019-03-14 08:18:57 +10:30
Saxon e593a04faf revid: added TestResetEncoderSenderSetup
Added a test to check that revid's reset method is correctly setting up encoders
and the senders they write to correctly.
2019-03-13 18:14:00 +10:30
Saxon 500edc05aa revid: retry is now an attribute of senders and can be set at initialisation 2019-03-12 20:53:27 +10:30
Saxon 53382c5774 revid: newMultiSender returns error if the passed active function is nil 2019-03-12 15:39:51 +10:30
Saxon e2a6d9f4bd revid: added function type called active to multiSender
We wish to have a way to check that the 'owner' of the multi sender is still active while it may be doing continual send retries - therefore a function with bool return called active has been added
as a field to multiSender so that we can call this and check whether the owner of the multiSender is 'active' or not.
2019-03-12 15:32:01 +10:30
Saxon 0ca75538d2 revid: created multiSender retry field and setting based on outputs
Added a retry field for the multiSender which will be used to decide whether to retry sending or not. This is being set true if we have a http sender and no other senders.
2019-03-12 15:18:02 +10:30
Saxon 30ea5d74f6 revid: simplified multiSender Write method 2019-03-12 15:13:24 +10:30
Saxon 9d010ed76c revid & stream/flv: removed writing of 'flv header' in the flv encoder
We are now only employing flv encoding for use with rtmp, and rtmp does not like the inclusion of the 'flv header' at the start of a
stream, so this functionality has been removed along with error handling of the invalidFlvTag error from rtmp in the rtmp sender.
2019-03-12 12:47:08 +10:30
Saxon 6c29b362c9 revid: sendRetry check is now in if rather than loop 2019-03-12 09:45:00 +10:30
Saxon 2588a125a9 revid: don't write to rtmp connection unless it's not nil 2019-03-10 17:48:18 +10:30
Saxon 48c7a1f21d revid: fixed multiSender sending and handling of send fails 2019-03-10 16:49:41 +10:30
Saxon 85401c8df4 revid: making handSendFail functions for senders work as they should as appropriate - e.g. rtmp handleSendFail will attempt to restart connection 2019-03-10 16:37:28 +10:30
Saxon def220daf3 revid: sending encode errors to errorHandler and made multiSender smarter
Errors captured from encoding are now sent to the error handler.
We also made multiSender smart so that during a write if sendRetry is on, we first check
that revid is actually running before attempting to send again. If revid is not running we return.
We also now log any send errors inside multiSender.
2019-03-10 12:34:45 +10:30
Saxon fc72eeaa0f revid: improved commenting 2019-03-10 12:21:53 +10:30
Saxon e0039da2e4 cmd/revid-cli & revid: moved ringBuffer to earlier in pipeline
Removed packetization flag for revid-cli as no longer required.
Packetization will be decided based on outputs.
Removed buffer type definition and Write receiver func in
mtsSender_test.go as this is now defined in revid.go.
Made ringbuffer size and element size consisten no matter the
output methods, as we're now going to only be putting h264 in there.
Modified H264 lex function to take an io.Writer rather than an
Encoder.
Removed destination []loadSender slice from revids fields and
added an encoder []stream.Encoder slice to hold encoders used
during a particular configuration. Each encoder will write to
the desired outputs.
Modified logic regarding encoder and sender setup. We now check
what outputs we have and add encoders to revid's encoder slice
depending on what each output requires.
Modified outputClips routine such that it ranges through revid's
encoders and encodes to them. They then write to the senders and
they handle logic regarding the amount of data they send out
and when. They also handle actions to perform on send failures.
Wrote multiSender struct which will be written to from encoders.
It will then use it's senders to distribute the data accordingly
to senders that work with the encoding from said encoders.
Modified senders so that their load methods no longer take ring
chunks, but rather slices.
Modified senders such that their release methods no longer
perform chunk closing.
2019-03-09 15:28:07 +10:30
Saxon 0962b1047d revid: removed udp sender and anything pertainent to it 2019-03-07 20:14:50 +10:30
Saxon 6fa9f37972 revid: remove ffmpegSender and any code pertaining to it. 2019-03-07 19:15:39 +10:30
Saxon d9ca76159e Merge branch 'master' into mts-chunking 2019-03-04 15:01:41 +10:30
Saxon 8606320731 revid: ignoring rtmp.ErrInvalidFlvTag error and checking that rtmp conn is not closed before we try to close it 2019-03-03 18:24:54 +10:30
Alan Noble b1dcb9d6a7 gofmt 2019-03-03 07:11:35 +00:00
Alan Noble 32280cb9d6 Declare error. 2019-03-03 07:09:50 +00:00
Alan Noble c15c57f15f Don't fail if Close() returns an error, since it just means there is no connection, and don't call Close when Dial fails. 2019-03-03 07:04:33 +00:00
Saxon 2570cb6ecb revid: simplified some mtsSender logic 2019-03-01 15:14:01 +10:30
Saxon ff4778945e revid: not doing redundant conversions 2019-03-01 14:48:26 +10:30
Saxon b1b5ff2f49 revid: fixed import stanzas in senders.go 2019-03-01 13:30:06 +10:30
Saxon 5eb832e6c3 revid: cleaned up documentation in senders.go and mtsSender_test.go 2019-03-01 13:28:34 +10:30
Saxon 74110dee31 revid: sender interface renamed to Sender and tstSender in mtsSender_test.go renamed to sender 2019-03-01 10:16:54 +10:30
Saxon ae4debd388 revid & stream/mts: fixed file headers regarding licensing location 2019-03-01 10:00:33 +10:30
Saxon ee915b58ac stream/mts: fixed conflict 2019-02-28 16:47:24 +10:30
Alan Noble 01d85af133 Removed incorrect Close upon Dial error. 2019-02-22 20:45:13 +00:00
saxon 819c9a784c revid: mtsSender_test.go passing segmenting and discontinuity tests 2019-02-17 05:32:44 +10:30
saxon 3f3d587eeb revid: mtsSender test for segmenting actually working now 2019-02-17 03:35:59 +10:30
saxon a5cb1c5abb stream/mts: made modifications such that the segment test is passing 2019-02-16 23:52:40 +10:30
saxon bb091f5961 revid: wrote test for mtsSender_test.go to see if the mtsSender is segmenting properly 2019-02-16 16:33:39 +10:30
saxon 361f5edbc9 stream/mts: wrote sender interface and a minimalHttpSender type 2019-02-16 14:26:51 +10:30
saxon 281aa47fd5 stream/mts: fixing discontinuities that could be caused by ringbuffer 2019-02-16 01:40:35 +10:30
saxon bea0000340 stream/mts: creating ring.Chunk so that we can use another loadSender 2019-02-15 23:55:51 +10:30
saxon b6bf41b17d stream/mts: made mtsSender more general
The mtsSender can now use any loadSender to send fixed and segmented mts data to.
2019-02-15 23:35:45 +10:30
saxon 31d36577b1 stream/mts: ausOceanSender => mtsSender 2019-02-15 23:17:13 +10:30
saxon 3aa94887eb revid/senders.go: commenting of ausOceanSender 2019-02-15 14:33:18 +10:30
saxon 7d03830a4e revid & stream/mts: senders now handle clip duration and cc fixing for mts.
Removed rtpSender as we now put in loadSender slice. Removed packer write method as no longer required to do clip duration logic. For initialisation of encoders, they are now no longer writing
to packer, but now straight to the ring buffer. Wrote ausOceanSender which will deal with clip logic and cc fixing for mts. Added some functionality to mts/mpegts.go that allows adding
of adaptation fields to mts packets.
2019-02-15 12:01:07 +10:30
saxon 1f1546a284 revid: updated code in senders.go to work with meta changes 2019-01-31 21:30:08 +10:30
scruzin fd903b4add rtmp.Session now rtmp.Conn and rtmp.NewSession() and Open() replaced with Dial(). 2019-01-19 13:10:38 +10:30
Saxon Milton ddb8fc1e1c Merged in rtp-ringbuff-bypass (pull request #88)
Rtp ringbuff bypass

Approved-by: Alan Noble <anoble@gmail.com>
Approved-by: kortschak <dan@kortschak.io>
2019-01-16 23:22:18 +00:00
saxon 9ca7288622 psi: removed conflict with master 2019-01-11 13:17:14 +10:30
saxon 0d6aac0247 revid: fixed build errors by updating calls to mts.MetaData.SetLocation() and mts.MetaData.SetTimeStamp() 2019-01-11 11:53:41 +10:30
saxon ebd6d5816d psi: full stop at end of comment, made lastTime belong to packer and moved some vars to a more appropriate location 2019-01-08 19:39:22 +10:30
scruzin cbe6149c8f Added proper logging. 2019-01-07 23:59:41 +10:30
saxon 703f0a0523 revid: cleaned up send logic in httpSender send func 2019-01-07 10:45:22 +10:30
saxon 26a43d54bb rtp: updated error message to suit new rtpSender.send() function 2019-01-03 13:01:35 +10:30
saxon 5f20086440 rtp: removed code in rtpSender relating to chunks - something we're not using anymore in this case 2019-01-03 12:57:50 +10:30
saxon 4da0bddf2f revid: improved error message in rtpSender.send when there is no data provided but also when there is no data in the senders chunk 2019-01-03 12:08:41 +10:30
saxon a934e02e9a revid: using switch in rtpSender.send logic rather than if-else 2019-01-03 12:06:51 +10:30
saxon 12c8c604e0 Updating branch with master
Merge branch 'master' into rtp-ringbuff-bypass
2019-01-03 11:57:48 +10:30
saxon a4c73cf6c5 av: updated logging to suit changes made on iot and utils 2019-01-02 15:39:47 +10:30
saxon d0d9e20c87 revid: if no data is provided to rtpSender.send() then we check if the rtpSenders chunk is not nil, if it is, then return error 2019-01-01 16:11:32 +10:30
saxon ccd4c32ff6 revid: revid now has it's own rtpSender seperate from the loadSender slice used for multiple outputs, therefore, we can now bypass the ringbuffer in this case with a check if the rtpSender exists in the packer write method 2019-01-01 16:03:04 +10:30
Dan Kortschak 1e3b4b1ab8 cmd/revid-cli,revid: reduce stringly typing in config/flags 2018-12-28 13:43:21 +10:30
saxon c7f55c3c43 revid: using NewJSONDecoder rather than newJsonDecoder to be consistent with changes in iot 2018-12-14 16:58:02 +10:30
saxon fbdce669e7 revid: cleaned and added commenting 2018-12-14 16:46:36 +10:30
saxon 21dd2f4b70 revid: using location instead of gps in names 2018-12-14 16:02:47 +10:30
saxon e79f6d191d revid: made extractMeta a function of httpSender 2018-12-14 16:01:10 +10:30
saxon f1ee09ad7b revid: improved naming of encoder globals for location and timestamp 2018-12-14 15:59:44 +10:30
saxon 798add533b revid + mts +psi: wrote func to find pmt in byte slice, wrote func to get gps, changed the way in which psi are insterted, based no of mpgets packets to send on time, i.e. per second 2018-12-14 13:35:56 +10:30
saxon b78904ac72 revid + psi: getting metadata from replies now 2018-12-13 15:51:51 +10:30
saxon ce036abf8b revid: changed request time to recv 2018-12-13 12:59:40 +10:30
saxon 9a7d7a9ab3 revid: modified http sender to look at reply of send and get time and gps data to mts package 2018-12-13 12:59:40 +10:30
saxon 05bcfdc1b1 revid: changed request type to recv in order to be copmatible with new netsender and netreceiver function 2018-12-07 16:26:36 +10:30
saxon 402f2fb165 revid: revert so that netsender pull request can be done first 2018-12-04 10:14:45 +10:30
saxon 0f273e42b6 revid: using RequestRecv for http sender 2018-12-04 10:13:18 +10:30
saxon 1c105405e8 revid: changed request type back to poll so that build compiles on master 2018-11-30 22:25:38 +10:30
saxon 14f4bb0e63 revid: changed back to requestVideo 2018-11-29 14:06:16 +10:30
saxon d32a715549 revid: testing request poll instead of requestvideo 2018-11-29 13:50:17 +10:30
saxon 1824273f8c revid: undoing logging changes, removed chunk closing in http sender send method 2018-11-28 15:26:17 +10:30
saxon 98eb2c64e8 revid: revid output check and destination setting cleaner. Also changed destination release to single chunk.Close() so that chunks aren't closed more than once 2018-11-25 23:45:38 +10:30
saxon 5920d1c8d7 revid: made destination for revid a []loadSender and change code such that iterate through this when performing actions relating to destinations like write, send and close. Also created new sender call rtp sender that has a inherent rtp encoder 2018-11-25 23:10:38 +10:30
saxon 4ce4525a1c revid: removed blank line under newUdpSender 2018-11-24 15:20:26 +10:30
saxon 5eb7225da9 revid & rtp: fixed up some logging, line breaks, and simplified some decrements/increments 2018-11-24 12:14:44 +10:30
saxon 16614df9f5 rtp: started using mpegts encoder inside rtp encoder so that fragmentation i.e. smaller rtp packets is easier. Streams fine. 2018-11-21 17:30:46 +10:30
saxon 42097ddef7 rtp: added print messages for debugging purposes
rtp: added print messages for debugging purposes

rtp: removed binaries
2018-11-21 17:30:46 +10:30
saxon fce0937810 rtp: wrote some code so that config validated udp and rtp stuff as well 2018-11-21 17:30:46 +10:30
saxon c0e6ba2a5b rtp: checking for udp output and rtp packetisation in revid such that the right sender and encoder is selected 2018-11-21 17:30:46 +10:30
saxon d291744f63 revid: wrote loadsender implementation for udp sending for the rtp - need to test 2018-11-18 12:32:11 +10:30
saxon 0efb2abd6c revid: added pkg to logging messages in senders.go 2018-09-20 11:15:27 +09:30
saxon 35cb30ccf9 revid: updated logging in senders.go 2018-09-11 17:15:45 +09:30
saxon 1b4db5b0dc Removed session interface and mad session struct exported 2018-08-20 10:22:36 +09:30
Alan Noble 99ef1d0727 PR feedback and some other clean-up. 2018-06-27 07:50:05 +09:30
Alan Noble 1645b759f1 Added ns to Revid struct, so it could be exposed as a httpSender, and refactored revid-cli accordingly. 2018-06-26 15:53:55 +09:30
Dan Kortschak 89e5178fde revid: release ring resource quickly for httpSender 2018-06-20 12:42:36 +09:30
Dan Kortschak 1800d2f6da revid: use direct access to ring.Chunk bytes 2018-06-18 19:30:00 +09:30
Dan Kortschak 5bdd66e22b rtmp: rename StartSession to Open 2018-06-17 20:45:58 +09:30
Alan Noble 05c6c376b4 Payload data has now moved onto Pin struct. 2018-06-16 19:04:32 +09:30
Alan Noble 53f923afb1 netsender.MakePins() now takes a 2nd arg. 2018-06-15 19:34:50 +09:30