Saxon
723166ec50
codec/mjpeg/jpeg.go: simplified copy
2020-01-07 14:45:25 +10:30
Saxon
fcb8f18e1f
codec/mjpeg/jpeg.go: removed white space
2020-01-07 14:43:26 +10:30
Saxon
7fca2257a4
codec/mjpeg/jpeg.go: simplified writing of huffman tables by calculating n values in global vars
2020-01-07 14:36:15 +10:30
Saxon
7fb5ed00a2
codec/mjpeg/jpeg.go: simplified copies
2020-01-07 13:53:26 +10:30
Saxon
52f18cdc58
codec/mjpeg/jpeg.go: simplified some more indexing
2020-01-07 13:14:18 +10:30
Saxon
0b848cb01b
codec/mjpeg/jpeg.go: no longer need to convert dri to uint16.
2020-01-07 13:12:22 +10:30
Saxon
4325b86a99
codec/mjpeg/jpeg.go: don't need to convert jfifLabel string to []byte for copy
2020-01-07 13:11:25 +10:30
Saxon
38c4972a76
codec/mjpeg/jpeg.go: simplified some indexing
2020-01-07 13:09:27 +10:30
Saxon
d0e356314d
codec/mjpeg/jpeg.go: moved get24 to bottom of file and gave comment.
2020-01-07 13:06:56 +10:30
Saxon
86e215f913
codec/mjpeg/jpeg.go: decrementing q by 128 before qLen > 0 check to simplify indexing where q-128 is done
2020-01-07 13:01:34 +10:30
Saxon
f187af747b
codec/mjpeg/jpeg.go: removing panics inside ParsePayload in favour of errors
2020-01-07 12:52:31 +10:30
Saxon
803cdf0747
codec/mjpeg/jpeg.go: dir is now uint16 to avoid conversion
2020-01-07 11:14:43 +10:30
Saxon
83a304037c
codec/mjpeg/jpeg.go: simplified writing of bytes for SOF and SOS headers
2020-01-07 11:08:36 +10:30
Saxon
4834aa8ca2
codec/mjpeg/jpeg.go: don't need to set c.blen to 0
2020-01-04 13:53:04 +10:30
Saxon
ef4e9a3f69
codec/mjpeg: removed putBuffer and its usage
2020-01-04 13:10:40 +10:30
Saxon
ab2f2e4c0b
codec/mjpeg/testdata/expect.mjpeg: updated expected MJPEG file
2020-01-04 01:55:56 +10:30
Saxon
692325523c
codec/mjpeg/jpeg.go: removed usage of putBuffer in parsePayload
2020-01-04 01:50:56 +10:30
Saxon
7ee8fa566c
codec/mjpeg: removed byteStream type and its usage
2020-01-04 01:32:45 +10:30
Saxon
47d145a222
codec/mjpeg: added jpeg_test.go, tests.go and expected output, expect.mjpeg to test ParsePayload function in jpeg.go
2020-01-03 17:10:18 +10:30
Saxon
36bcd361ed
codec/mjpeg/jpeg.go: removed 'mark' function
2020-01-02 15:42:15 +10:30
Saxon
5a09a5f12d
codec/mjpeg/jpeg.go: simplified if statement
2020-01-02 15:04:16 +10:30
Saxon
31902f2448
codec/mjpeg/jpeg.go: componenting consts for SOF0 and SOS headers
2020-01-02 11:30:51 +10:30
Saxon
323cc185dc
codec/mjpeg/jpeg.go: defining consts for SOS header fields
2020-01-02 11:20:21 +10:30
Saxon
49138ce021
codec/mjpeg/jpeg.go: defining consts for SOF0 header fields
2020-01-01 19:15:32 +10:30
Saxon
3f4561da5b
codec/mjpeg/jpeg.go: defining consts for JFIF header
2020-01-01 18:34:51 +10:30
Saxon
d146b65c57
codec/mjpeg/utils.go: added TODO in file header DESCRIPTION field to make stuff in this file exported in codecutil
2019-12-29 22:59:29 +10:30
Saxon
5b8f71b7d8
codec/mjpeg: renamed putBuffer.putBuf to putBytes
2019-12-29 22:57:35 +10:30
Saxon
13e2571230
codec/mjpeg/jpeg.go: renamed fields of putBuffer struct
2019-12-29 22:55:27 +10:30
Saxon
bf865e48c5
codec/mjpeg/jpeg.go: made JFIF header label local const
2019-12-29 22:50:20 +10:30
Saxon
e0397e1769
codec/mjpeg/jpeg.go: improve Context struct field names
2019-12-29 22:47:38 +10:30
Saxon
c691d4c1ff
codec/mjpeg: renamed Ctx type to Context and name value of this type ctx instead of c
2019-12-29 22:40:54 +10:30
Saxon
b5f87481ba
codec/mjpeg/jpeg.go: comment global slices used for huffman table creation
2019-12-29 22:16:09 +10:30
Saxon
9a02d295fe
codec/mjpeg/utils.go: using BigEndian.Uint16 in get16
2019-12-23 14:24:08 +10:30
Saxon
2d7a400b3e
codec/mjpeg/jpeg.go: renamed ParseScan to ParsePayload, updated call and comment
2019-12-23 14:24:08 +10:30
Saxon
545e7b858f
codec/mjpeg/jpeg.go: Fixed comment for Ctx struct
2019-12-23 14:24:08 +10:30
Saxon
23d58e1b12
codec/mjpeg/extract.go: simplified error message when can't get RTP payload
2019-12-23 14:24:08 +10:30
Saxon
5cd4a0a23c
codec/mjpeg/jpeg.go: fixed indentation on file header
2019-12-23 14:24:08 +10:30
Saxon
495e5c615a
codec/mjpeg/jpeg.go: fixed indentation in file header
2019-12-23 14:24:08 +10:30
Saxon
fa4d7b8141
codec/mjpeg/extract.go: corrected comment for Extractor.dst field
2019-12-23 14:24:08 +10:30
Saxon
90ab359599
codec/mjpeg: tidying up
...
Separated my code from code that was ported from ffmpeg (differen copyright). Also added utils.go file to house the putBuffer and bytestream types. Reduced copying and use of bytes.Buffer.
Instead expanded putBuffer functionality so that I can use this throughout process (reduce copying from buffer to buffer).
2019-12-23 14:24:08 +10:30
Saxon
e3b6d2101a
Fixed bugs, now working
2019-12-23 14:24:08 +10:30
Saxon
ba25cdfd12
codec/mjpeg/extract.go: wrote Extractor type
...
Wrote extractor type that provides an Extract function to extract JPEG frames from an RTP/MJPEG stream and writes them to a destination.
2019-12-23 14:24:07 +10:30
Saxon
c2ce700cbd
codec/mjpeg/jpeg.go: added writeHeader function to write JPEG header
...
This also included the addition of some lunimance and chrominance tables, a multiError type (implements error) and a putter type, that will put uint16s, bytes and "buffers" into a byte
slice.
2019-12-23 14:24:07 +10:30
Saxon
63f694a0a5
codec/mjpeg/jpeg.go: added writeHuffman function to write JPEG huffman tables to an io.Writer.
2019-12-23 14:24:07 +10:30
Saxon
4781a02ec5
codec/mjpeg/jpeg.go: added putMarker function to write JPEG marker codes to an io.Writer
2019-12-23 14:24:07 +10:30
Saxon
6c78ff49cd
codec/mjpeg: added jpeg.go file to hold JPEG specific stuff and added some JPEG marker codes.
2019-12-23 14:24:07 +10:30
Saxon
39c66bdfd6
codec/mjpeg/utils.go: using BigEndian.Uint16 in get16
2019-12-23 13:59:27 +10:30
Saxon
7ee35f650f
codec/mjpeg/jpeg.go: renamed ParseScan to ParsePayload, updated call and comment
2019-12-23 12:59:25 +10:30
Saxon
4df5f11364
codec/mjpeg/jpeg.go: Fixed comment for Ctx struct
2019-12-23 12:54:31 +10:30
Saxon
6c379458d7
codec/mjpeg/extract.go: simplified error message when can't get RTP payload
2019-12-23 12:51:21 +10:30
Saxon
6407f24d90
codec/mjpeg/jpeg.go: fixed indentation on file header
2019-12-23 12:48:08 +10:30
Scott
e116e197ae
Changed all %v's to %w's where appropriate
2019-12-04 14:12:20 +10:30
Saxon
870c0bc3fa
codec/mjpeg/jpeg.go: fixed indentation in file header
2019-11-23 15:34:59 +10:30
Saxon
5b3988a5e0
codec/mjpeg/extract.go: corrected comment for Extractor.dst field
2019-11-23 15:33:41 +10:30
Saxon
82d9e5e8bd
codec/mjpeg: tidying up
...
Separated my code from code that was ported from ffmpeg (differen copyright). Also added utils.go file to house the putBuffer and bytestream types. Reduced copying and use of bytes.Buffer.
Instead expanded putBuffer functionality so that I can use this throughout process (reduce copying from buffer to buffer).
2019-11-23 15:25:18 +10:30
Saxon
e467c7792d
Fixed bugs, now working
2019-11-22 13:05:11 +10:30
Saxon
bee8cd270c
codec/mjpeg/extract.go: wrote Extractor type
...
Wrote extractor type that provides an Extract function to extract JPEG frames from an RTP/MJPEG stream and writes them to a destination.
2019-11-20 13:40:07 +10:30
Saxon
eaac50f339
codec/mjpeg/jpeg.go: added writeHeader function to write JPEG header
...
This also included the addition of some lunimance and chrominance tables, a multiError type (implements error) and a putter type, that will put uint16s, bytes and "buffers" into a byte
slice.
2019-11-16 23:12:08 +10:30
Saxon
a63cf5a1b7
codec/mjpeg/jpeg.go: added writeHuffman function to write JPEG huffman tables to an io.Writer.
2019-11-15 16:25:35 +10:30
Saxon
7577cfa0c4
codec/mjpeg/jpeg.go: added putMarker function to write JPEG marker codes to an io.Writer
2019-11-15 15:41:02 +10:30
Saxon
f5b6af559f
codec/mjpeg: added jpeg.go file to hold JPEG specific stuff and added some JPEG marker codes.
2019-11-15 15:11:53 +10:30
Trek H
cd63d0d95a
alsa: unexported ringbuffer chunksize
...
Chunksize can be calculated without needing an ALSA device instance.
Added a DataSize function to pcm package for calculating size of pcm data given relevant attributes.
Removed ChunkSize from config revid config struct.
Changed NewByteLexer to accept an in rather than a pointer.
2019-11-13 19:56:13 +10:30
Trek H
796a3b9a97
pcm: changed term clip to buffer
2019-11-13 16:54:41 +10:30
Trek H
3a7c2c5c5e
pcm: removed unused sample formats
2019-11-13 14:00:52 +10:30
Trek H
678245c634
pcm: fix string format
2019-11-13 12:30:48 +10:30
Trek H
5e472ba4c9
pcm: refactored to be general not alsa only
...
Addition of new structs and helper functions for passing around pcm clips/buffers and their formats so that we don't have to import and rely on yobert/alsa code.
Updated any commands and alsa package to use refactored code.
2019-11-12 21:24:08 +10:30
Saxon
47f6dcfe51
codec/h264/extract.go: extracter->extractor everywhere
2019-10-28 08:41:49 +10:30
Saxon Milton
392ed399d9
Merged in use-gvctrl-in-revid (pull request #266 )
...
Use gvctrl in revid
Approved-by: Alan Noble <anoble@gmail.com>
2019-10-25 01:27:05 +00:00
Saxon
529ca0d547
codec/h264/extract.go: simplified switch
2019-10-23 14:38:18 +10:30
Saxon
38cfad7b67
revid: fixing some more bugs
...
Fixed H264 RTP extractor. Fine tuned some timing regarding geovision setup. Added some more
logging to geovision setup.
2019-10-23 12:48:22 +10:30
Saxon
f336a03d7a
revid: general bug fixing
...
Use http instead of https in gvctrl getLogin request. Gave RTP client a close method so that the conn can
be closed after we're done with the client. Put timeout on reading from the RTP client PacketConn so that
we don't hang on the ReadFrom call if the conn is closed. Closing the RTSP and RTP clients when
startRTSPCamera is returned.
2019-10-22 23:04:33 +10:30
Saxon Milton
38eed6bb2d
Merged in fix-mjpeg-lex (pull request #261 )
...
codec/mjpeg/lex.go: returning nil error from Lex if we get io.EOF on reading bytes
Approved-by: Alan Noble <anoble@gmail.com>
2019-10-20 02:24:45 +00:00
Saxon
b418749be5
codec/h264/h264dec/fuzz/helpers.c: actually committed this file now:
2019-10-20 09:36:55 +10:30
Saxon
d0f99b581d
codec/h264/h264dec/fuzz/helpers.c: checking if malloc bit reader mem returns NULL
2019-10-20 09:29:22 +10:30
Saxon
08264f7bf5
codec/h264/h264dec/fuzz/fuzzParseLevelPrefix/fuzz.go: swapped got and want to correct orientation
2019-10-20 09:17:03 +10:30
Saxon
7181532ccb
codec/mjpeg/lex.go changed error checks for io.EOF to positive checks
2019-10-20 09:08:19 +10:30
Saxon
9087f727db
codec/h264/extract_test.go: fixed testing for extractor
2019-10-07 16:12:30 +10:30
Saxon
fc4e88bce6
fixed bugs causing problems with GeoVision H264 RTMP to youtube streaming.
...
Two fixes were involved, firstly, access unit delimeters were used to denote access units and the Write timeout on rtmpSender's ringBuffer was
increased to stop the 'unable to dump old write' errors. Also made some small changes elsewhere that should fix future issues, particular with
MTS output.
2019-10-07 14:18:20 +10:30
Saxon
1c9146eec0
codec/mjpeg/lex.go: returning nil error from Lex if we get io.EOF on reading bytes
2019-10-03 00:32:34 +09:30
Saxon
2d5d8f3bdd
codec/codecutil/helpers.go: added ADPCM support to SIDToMIMEType
2019-10-01 21:01:45 +09:30
Saxon
2acc729676
codec/codecutil/helpers.go: added helpers.go file with SIDToMIMEType function to provide MIME type given a stream ID
2019-10-01 21:01:45 +09:30
Saxon
faf5e2df0f
codec/h264/h264dec/fuzz: added fuzzer test for parseLevelPrefix function
...
The fuzz package has been created, which will house C based helper code and sub-packages dedicated to each fuzz test. A sub packaged called
fuzzParseLevelPrefix has been created to house the fuzz test for parseLevelPrefix. Emeric's C code has been isolated into some C files, and a file
called fuzz.go has been created, which houses the actual fuzz test function. An initial corpus has been added with 3 inputs.
2019-09-23 12:18:14 +09:30
Saxon Milton
f8f78947f9
Merged in picture-order-count (pull request #249 )
...
codec/h264/h264dec/decode.go: decoding process for picture order count
Approved-by: Alan Noble <anoble@gmail.com>
2019-09-20 02:37:33 +00:00
Saxon Milton
1fba7556dd
Merged in total-coeff-and-trailing-ones (pull request #243 )
...
codec/h264/h264dec: parsing process for TotalCoeff and TrailingOnes
Approved-by: Alan Noble <anoble@gmail.com>
2019-09-20 00:38:58 +00:00
Saxon
4c7f36ee36
codec/h264/h264dec/decode.go: slightly simplified if-else statements regarding BottomField and FieldPic
2019-09-18 19:41:32 +09:30
Saxon
117a75ae55
codec/h264/h264dec: simplified logic where there are things applicable to non-IDRs, which we don't handle yet.
2019-09-16 22:07:57 +09:30
Saxon
89452d55d3
codec/h264/h264dec/cavlc.go: simplified logic in loop to count leading zeros in formCoeffTokenMap
2019-09-13 11:21:00 +09:30
Trek H
2c7e28206d
Merge branch 'master' into adpcm-mts
2019-09-12 21:11:50 +09:30
Trek H
96035f6d8b
adpcm and mts: comments and pid change
2019-09-12 19:16:11 +09:30
Saxon
ecdaab175b
codec/h264/parse.go: skip over access unit delimiters when getting nalType
2019-09-11 09:47:37 +09:30
Saxon
5939db6f1b
codec/h264/h264dec/decode.go: using if else structures for topFieldOrderCnt/bottomFieldOrderCnt value derivations in decodePicOrderCntType2
2019-09-10 12:12:08 +09:30
Saxon
40fa50d4f0
codec/h264/h264dec/decode.go: using if else structure for derivation of topFieldOrderCnt and bottomFieldOrderCnt in decodePicOrderCntType1 function
2019-09-10 12:06:35 +09:30
Saxon
0df182018a
codec/h264/h264dec/decode.go: using else if structure instead of switch to derive value of vid.picOrderCntMsb
2019-09-10 11:32:46 +09:30
Saxon
88857ec5b9
codec/h264/h264dec/cavlc.go: fixed error message that's returned on failure to read coeffTokenTable string
2019-09-10 11:22:25 +09:30
Saxon
445649311b
codec/h264/h264dec/cavlc.go: added process to comgine level and run information
2019-09-09 17:05:22 +09:30
Saxon
05e16ec260
codec/h264/h2646dec/cavlc.go: fixed build error caused by rebase
2019-09-09 16:48:10 +09:30
Saxon
d78ca2d2d2
codec/h264/h264dec/cavlctab.go: commented const string representation of table 9-5.
2019-09-09 16:41:26 +09:30
Saxon
42a1918c0d
codec/h264/h264dec: using const string instead of CSV file to hold table 9-5. Also made some other minor improvements
2019-09-09 16:41:26 +09:30
Saxon
92eb3e85a5
codec/h264/h264dec: created tokenMap type to make things more readable
2019-09-09 16:41:26 +09:30
Saxon
8316a621b9
codec/h264/h264dec/cavlc.go: fix comment inside parseTotalCoeffAndTrailingOnes
2019-09-09 16:41:26 +09:30