Commit Graph

2572 Commits

Author SHA1 Message Date
Trek H 9fe09255be audio and revid: changes for pr
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
2019-06-13 23:35:52 +09:30
Trek H d23f40c85d mts: updated reference to old pid vars 2019-06-06 02:54:00 +09:30
Trek H 34fc64383e audio: naming 2019-06-06 02:41:17 +09:30
Trek H 96c1b51173 revid and audio: seperated audio into own package
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
2019-06-06 02:09:55 +09:30
Trek H 3e2ff49420 revid: mts encoder uses exported pids 2019-06-06 00:28:26 +09:30
Trek H 7b4daed4a6 revid: added metadata to audio mts streams 2019-06-05 15:08:47 +09:30
Trek H bea747085f revid: updated lex funcs in tests, changed audioDevice logger
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.
2019-06-04 12:28:40 +09:30
Trek H 409dcabe0a revid: added codec conversion after recording 2019-06-04 02:31:35 +09:30
Trek H 90c34c4108 revid: fixed issues after merge 2019-06-03 18:35:28 +09:30
Trek H 3d7539c6df Merge branch 'master' into revid-audio 2019-06-03 17:50:48 +09:30
Trek Hopton 0da410166f Merged in adpcm-nonblock (pull request #191)
Changed adpcm to not use blocks

Approved-by: kortschak <dan@kortschak.io>
2019-05-30 11:44:00 +00:00
Trek H 762653b59a adpcm: naming and syntactical changes 2019-05-29 02:57:17 +09:30
Trek H e851ea228c revid: added switch for codec conversion after recording 2019-05-29 02:20:19 +09:30
Trek H c2b5ee0574 revid: simplified audio device read write concurrency 2019-05-29 02:06:58 +09:30
Saxon Milton 4b74ea3291 Merged in revid-rtsp-camera (pull request #200)
revid: RTSP Camera Input

Approved-by: Alan Noble <anoble@gmail.com>
2019-05-27 05:16:59 +00:00
Saxon 03c45b1bcf protocol/rtcp/parse.go: removed ParseSSRC and checkPacket functions as not required anymore 2019-05-27 14:31:14 +09:30
Saxon ad241abdfd protocol/rtcp/client.go: fixed missing double quote in comment for Client.SetName() 2019-05-24 10:14:37 +09:30
Saxon 809d904878 revid/revid.go: commented startRTSPCamera 2019-05-23 14:10:09 +09:30
Saxon d7d205a7a9 protocol/rtcp/parse.go: updated comment for ParseTimestamp(...) 2019-05-23 14:07:19 +09:30
Saxon ecc0ab8664 container/mts/encoder.go: updated comment for Encode constants 2019-05-23 14:05:17 +09:30
Trek H 5225896924 revid: gave AudioDevice a logger 2019-05-23 01:23:51 +09:30
Trek H dd66c58f40 revid: concurrency and testing
fixed a situation where a deadlock can occur and also found and fixed some issues while testing different initialisations on AudioDevice.
2019-05-23 00:19:44 +09:30
Trek H a1fe6c6deb adpcm: encoder and decoder structs are now exported 2019-05-22 15:10:02 +09:30
Trek H 537d5bab73 adpcm: updated decode and encode pcm commands 2019-05-22 15:04:21 +09:30
Trek H 17d59014c6 revid: added concurrency support to start and stop 2019-05-22 14:56:58 +09:30
Saxon Milton c3d8572eed Merged in use-codecutil-in-lexers (pull request #201)
codec: H264 and MJPEG lexers now using codecutil package for byte scanner functionality
2019-05-22 01:39:22 +00:00
Saxon 980cf8da21 codec: H264 and MJPEG lexers now using codecutil package for byte scanner functionality 2019-05-22 11:07:39 +09:30
Saxon 85984555a3 container/mts/encoder.go: fixed comment for pmtTable initialisation 2019-05-21 17:09:47 +09:30
Saxon fbcd163864 protocol/rtcp: fixed bug regarding checking of close err channel from client in routines. 2019-05-21 17:07:28 +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 eeaf806c6e protocol/rtcp/client.go & revid/revid.go: removed rtcp.Client.Done() and now blocking on rtcp.Client.Err() in revid.
It seems unnecessary to have the rtcp.Client.Done() func, considering that we could use
the rtcp.Client.err channel itself to determine if the RTCP client has been stopped.
We simple wait on a chan receive in revid in the error handling routine, and we check the
'ok' return - if it is false, then the err chan has been closed and we can get out of the
error handling loop. This should also reduce CPU usage significantly.
2019-05-21 13:23:04 +09:30
Trek H c58c573cd7 revid: changed writeRates and recPeriods to floats 2019-05-21 12:39:10 +09:30
Saxon 88ffdf08b5 revid: changed the input enum for RTSP input from RTSPCamera to RTSP 2019-05-21 12:18:52 +09:30
Saxon 39a573e10b protocol/rtsp: removed cmd/record as revid can do what this did 2019-05-21 01:51:14 +09:30
Saxon 91d2697a55 revid: general clean up 2019-05-21 01:48:29 +09:30
Trek H 7ba9d023a3 revid: made start and stop change audio device state 2019-05-21 00:45:54 +09:30
Saxon 970a445ca4 codec/h265/lexer.go & protocol/rtp/client.go: fixed lexer and rtp client.
The lexer had a bug which is now fixed, and the RTP client is no longer looking for SSRC
in rtp.NewClient (which means we miss a packet).
2019-05-20 20:49:50 +09:30
Saxon 3ff726e439 revid & cmd/revid-cli: removed need for command line flags to specify addresses for RTP and RTCP.
Removed the command line flags that were used to specifiy local and remote addresses for RTP and RTCP. These are now
derived from the initial RTSP connection and also from the RTSP SETUP method reply.
2019-05-20 19:45:59 +09:30
Saxon bc6a0ae55e revid: using RTCP client to maintain RTP stream from RTSP server
Now adopting an RTCP client so that the RTP stream from the RTSP server can be maintained past 1 minute.
This change involved some refactor.
The rtcp.NewClient signature has been simplified. There is now a default send interval and name for use
in the source description in the receiver reports. These can be customised if required with the new
SetSendInterval and SetName funcs. The rtcp.NewClient signature now takes an rtp.Client, so that it
can get information from the RTP stream, like most recent sequence number. As a result of this requirement
the rtp package parse file has been extended with some functions for parsing out the sequence number and
ssrc from RTP packets and the RTP client provides getters for these things.
2019-05-20 18:14:27 +09:30
Saxon f52acc7efb codec/h264: fixed comment for Lex 2019-05-19 21:38:05 +09:30
Saxon Milton eaba622909 Merged in separate-codecs (pull request #188)
codec: created h264 and mjpeg packages to house lexers

Approved-by: Alan Noble <anoble@gmail.com>
2019-05-19 11:46:33 +00:00
Saxon 0567a81757 codec/h265: removed unnecessary allocation in handle fragmentation 2019-05-19 21:14:41 +09:30
Saxon abd41d9f01 codec/h265/lex_test.go: fixed TestLex to account for previous changes 2019-05-19 20:45:26 +09:30
Saxon a2d1b09e92 codec/h265: fixed lexer to get nal header into start of fragment
Now getting the nal header and type from fu header for the first fragment. We can now
lex and create HEVC MTS to RTP - working fine. Need to use RTCP now to continue stream.
2019-05-19 17:21:41 +09:30
Trek H 5e4a2fb866 adpcm: naming 2019-05-17 00:58:40 +09:30
Trek H a6d6a22b82 adpcm: changed enc and dec to use io.Writer as dst
also reordered encoder and decoder functions and remove old block consts
2019-05-17 00:52:36 +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 bd56e936a4 cmd/revid-cli: checking Input flag string and assigning cfg.Input to revid.RTSPCamera if 'RTSPCamera' is entered. 2019-05-16 13:05:09 +09:30
Saxon 5a2f15054d cmd/revid-cli: added flags related to RTSP input
Added 'RTSPCamera' option to description for 'Input' revid-cli flag. Also added other flags required
to set config params for RTSP input, like RTSPURL, RTPRecvAddr and RTCPAddr.
2019-05-16 12:55:35 +09:30