12 Commits

Author SHA1 Message Date
Danil Chapovalov
99a71f49c0 Move helpers to parse base rtp packet fields to rtp_rtcp module
rtp_rtcp_format is lighter build target than rtc_media_base and
a more natural place to keep rtp parsing functions.

Bug: None
Change-Id: Ibcb5661cc65edbdc89a63f3e411d7ad1218353cc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226330
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34504}
2021-07-19 14:27:27 +00:00
Philipp Hancke
100321969c srtp: compare key length to srtp policy key length
simplifying the code and comparing against the value libsrtp expects
and increase verbosity of error logging related to key length mismatches.

BUG=None

Change-Id: Icc0d0121d2983e23c95b0f972a5f6cac1d158fd7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/213146
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/master@{#33685}
2021-04-12 07:57:03 +00:00
Philipp Hancke
a113d231a6 srtp: use srtp_crypto_policy_set_from_profile_for_* from libsrtp
use the helper functions
  srtp_crypto_policy_set_from_profile_for_rtp
and
  srtp_crypto_policy_set_from_profile_for_rtcp
provided by libsrtp to initialize the rtp and rtcp policies.

BUG=None

Change-Id: Ib1560c0fc1c06d9e79c1f871b028555b3b4d66d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208480
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/master@{#33399}
2021-03-08 10:41:29 +00:00
Philipp Hancke
be66d95ab7 srtp: document rationale for srtp overhead calculation
documents why it is safe to not follow libsrtp's advice
to ensure additional SRTP_MAX_TRAILER_LEN bytes are available
when calling srtp_protect (and similar srtcp functions).

BUG=None

Change-Id: I504645d21553160f06133fd8bb3ee79e178247da
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/209064
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/master@{#33396}
2021-03-08 08:50:09 +00:00
Philipp Hancke
d42413a4b4 fix RTP_DUMP timestamps
which was missing a setfill call, leading to invalid timestamps.

BUG=webrtc:10675

Change-Id: Ib60f9f18b250aa89103e8de70b525df13c1042bd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/205780
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/master@{#33183}
2021-02-06 09:47:02 +00:00
Philipp Hancke
397c40e2a4 dump raw rtp packets in text2pcap format
guarded by a new field trial flag WebRTC-Debugging-RtpDump.
Packets have a RTP_DUMP postfix for easy grep-ing.

BUG=webrtc:10675

Change-Id: I73c0e0db47dca1079cd303c41a8b80fd7ae4a902
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196087
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Reviewed-by: Taylor <deadbeef@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32775}
2020-12-04 15:33:06 +00:00
Markus Handell
4c7bb27a10 Remove rtc::GlobalLock.
This change migrates a last stray consumer of GlobalLock
(SrtpSession) and removes all traces of GlobalLock/GlobalLockScope
from WebRTC.

Bug: webrtc:11567
Change-Id: I28059f2a10075815a4bdee8c357b9d3b6e50f18b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179361
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31736}
2020-07-15 20:45:13 +00:00
Sebastian Jansson
22619b3ed6 Allow external initialization of libsrtp.
Bug: webrtc:11205
Change-Id: I906651e3afc5c50977ff567f13a44e5087604028
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161952
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30074}
2019-12-12 17:23:29 +00:00
Danil Chapovalov
5740f3e2b8 Clarify expectation on GlobalLock
Merge GlobalLock and GlobalLockPod, make member private.
annotate creation of all GlobalLocks with ABSL_CONST_INIT

Bug: None
Change-Id: I29abcc86796ec0e45b15df7d26392309d1bf7324
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156303
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29447}
2019-10-11 13:11:11 +00:00
Sebastian Jansson
c01367db40 Deprecating ThreadChecker specific interface.
All changes outside thread_checker.h are by:
s/CalledOnValidThread/IsCurrent/
s/DetachFromThread/Detach/

Bug: webrtc:9883
Change-Id: Idbb1086bff0817db58e770116acf4c9d60fae8b3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131023
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27494}
2019-04-08 16:58:07 +00:00
Steve Anton
10542f21c8 (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries
Mechanically generated by running this command:

tools_webrtc/do-renames.sh update all-renames.txt && git cl format

Then manually updating:

tools_webrtc/sanitizers/tsan_suppressions_webrtc.cc

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I54824cd91dada8fc3ee3d098f971bc319d477833
Reviewed-on: https://webrtc-review.googlesource.com/c/115653
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26226}
2019-01-11 17:11:39 +00:00
Steve Anton
1c05765831 (3) Rename files to snake_case: move the files
Mechanically generated with this command:

tools_webrtc/do-rename.sh move all-renames.txt

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I8b05b6eab9b9d18b29c2199bbea239e9add1e690
Reviewed-on: https://webrtc-review.googlesource.com/c/115481
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26225}
2019-01-11 17:05:20 +00:00