Commit Graph

1457 Commits

Author SHA1 Message Date
aler9
5a1fdd13a9 h264: fix DTS extractions with some cameras v2.0.4 2023-01-08 18:13:38 +01:00
aler9
8912d5e643 restore compatibility with go 1.17 v2.0.3 v2.0.2 2023-01-08 12:45:46 +01:00
aler9
c9d7b05308 jpeg: add fuzz tests 2023-01-08 12:01:04 +01:00
aler9
8a1dd54d61 h264: fix crash in Annex-B decoding, add fuzz tests 2023-01-08 11:53:56 +01:00
aler9
73c9840bbe formatdecenc: fix crash in VP9 decoder 2023-01-07 17:41:12 +01:00
aler9
0499d99e83 formatdecenc: fix crash in MJPEG decoder; add fuzz tests 2023-01-07 16:43:45 +01:00
aler9
441a90a519 improve examples 2023-01-07 11:46:00 +01:00
aler9
bf12e12afd client: decrease security issues with AnyPortEnable
When AnyPortEnable is true, store the port of the first incoming packet
and check that following packets use the same port
v2.0.1
2023-01-07 11:06:10 +01:00
aler9
7137d8534a isolate UDP listeners from client / server 2023-01-07 10:59:15 +01:00
Alessandro Ros
2e88705875 improve coverage (#168) v2.0.0 2023-01-06 23:34:10 +01:00
aler9
a759ba9d01 h264: improve DTS extractor
This improves the DTS extractor in order to work with streams with no
timing infos or incorrect timing infos
2023-01-06 15:00:16 +01:00
aler9
f7e8c5b4bb h265: fix crash in DTSExtractor
Check that SPS.VUI and SPS.VUI.TimingInfo are not nil
2023-01-05 23:26:17 +01:00
aler9
07ad99402a h264: fix crash in DTSExtractor
Check that SPS.VUI or SPS.VUI.TimingInfo are not nil
2023-01-05 14:41:53 +01:00
aler9
7f11619db8 update readme 2023-01-03 19:19:58 +01:00
aler9
0ce4354144 h264: remove useless variable 2023-01-03 16:30:02 +01:00
aler9
62296a3eca examples: fix client-read-format-h264-save-to-disk example 2023-01-03 16:30:02 +01:00
aler9
ab0c73c8d8 h264, h265: rename 'nalus' into 'au' 2023-01-03 16:30:02 +01:00
aler9
19a12923a3 h264: simplify DTS extractor 2023-01-03 16:30:02 +01:00
aler9
7546b34f6e add issue-lock workflow 2022-12-31 16:50:17 +01:00
aler9
ce25207cb8 h265: rename SPS variables in order to follow ISO specification more closely 2022-12-29 13:37:05 +01:00
aler9
33fe24eb6d remove redundant variables 2022-12-28 23:32:20 +01:00
aler9
da21f946e5 add h265 DTS extractor 2022-12-28 20:21:16 +01:00
aler9
5d8e0d9564 add Media.FindFormat() 2022-12-27 17:42:35 +01:00
aler9
5f2ac979c5 move pkg/mpeg4audio into pkg/codecs/mpeg4audio 2022-12-27 17:30:53 +01:00
aler9
824fd75d18 rename MJPEG label into M-JPEG 2022-12-27 17:27:59 +01:00
aler9
aca56089c1 move codec-specific utilities into pkg/codecs 2022-12-27 17:19:56 +01:00
aler9
68d617ef51 update golangci-lint 2022-12-27 16:58:15 +01:00
Alessandro Ros
91f18ab6d9 Add RTP/MJPEG decoder and encoder (#165)
* rename format.JPEG into format.MJPEG

* add examples/client-publish-format-mjpeg

* add rtp/mjpeg decoder and encoder
2022-12-27 13:43:23 +01:00
aler9
cd8cc2cdb1 improve H265 SPS parser 2022-12-27 12:00:00 +00:00
aler9
06041a264e rename parameter in H264 SPS 2022-12-27 12:00:00 +00:00
aler9
a18f80f09f h265: add SPS.FPS() 2022-12-27 12:00:00 +00:00
aler9
3da2abc0f8 h264, h264: fix removal of emulation prevention byte
sequence [0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x00]
was not handled correctly
2022-12-27 12:00:00 +00:00
aler9
9acff114b7 improve performance of H264/H265 SPS parsers 2022-12-24 12:25:08 +01:00
aler9
db251994aa add H265 SPS parser 2022-12-24 11:42:51 +01:00
aler9
8320b1aceb improve coverage 2022-12-23 14:27:44 +01:00
aler9
d71991d929 improve coverage 2022-12-23 13:54:59 +01:00
Chen Mingliang
57707b8629 Improved support for he_aac (#164)
* Improved support for he_aac_v2 and fixed he_aac warning "Audio object type SBR+0 is not implemented" via ffmpeg.

* fix linting

* rename ExtType into ExtensionType

* parse FrameLengthFlag, DependsOnCoreCoder, CoreCoderDelay even with SBR / PS object types

* when extension type is SBR or PS, check that object type is AAC-LC

Co-authored-by: aler9 <46489434+aler9@users.noreply.github.com>
2022-12-23 13:24:39 +01:00
aler9
389252b621 server: use UUIDs as session secrets 2022-12-22 20:40:42 +01:00
aler9
5a2ea9cf9c partially revert cabfcd6 2022-12-22 20:36:41 +01:00
Alessandro Ros
ae9dac0ad3 use random UUIDs as media IDs (#163)
* remove Medias.Clone(), Media.Clone(), Format.Clone()

* server: use random UUIDs as media IDs

* client: use random UUIDs as media IDs
2022-12-22 20:32:28 +01:00
aler9
cabfcd627b client: do not override media controls inside Announce()
this fixes the client-read-republish example and allows users to set
their own media controls.

Function medias.SetControls() is provided in order to automatically set
media controls and must be called manually.
2022-12-22 18:54:09 +01:00
aler9
ffe8c87c38 fix overriding of previously-received RTP packets that leaded to crashes
RTP packets were previously take from a buffer pool. This was messing
up the Client, since that buffer pool was used by multiple routines at
once, and was probably messing up the Server too, since packets can be
pushed to different queues and there's no guarantee that these queues
have an overall size less than ReadBufferCount.

This buffer pool is removed; this decreases performance but avoids bugs.
2022-12-19 13:51:49 +01:00
aler9
b3de3cf80e move media-related logics into serverStreamMedia 2022-12-19 13:06:08 +01:00
aler9
e1c07a1c8d add VP8.CreateEncoder(), VP9.CreateEncoder() 2022-12-14 22:06:11 +01:00
aler9
d43cb0455e rtph265: add Decoder.DecodeUntilMarker() 2022-12-14 17:57:33 +01:00
aler9
6141afcfc4 add H264 NALU types 2022-12-14 14:57:02 +01:00
aler9
ba8a0b7bbd move all H264 NALU types into h264 package 2022-12-14 14:56:53 +01:00
aler9
93792de859 improve coverage 2022-12-14 09:51:37 +01:00
aler9
04d1de7177 rtph264: add ErrNonStartingPacketAndNoPrevious 2022-12-13 21:19:04 +01:00
aler9
60596c32d1 fix parsing of H264 tracks with empty sprop-parameter-sets 2022-12-13 19:02:01 +01:00