Commit graph

179 commits

Author SHA1 Message Date
Sebastian Jansson
e1795f4158 Adds remote estimate RTCP packet.
This adds the RemoteEstimate rtcp packet and wires it up to GoogCC where
it's used to improve congestion controller behavior.

The functionality is negotiated using SDP.

It's added with a field trial that allow disabling the functionality in
case there's any issues.

Bug: webrtc:10742
Change-Id: I1ea8e4216a27cd2b00505c99b42d1e38726256c8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146602
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28654}
2019-07-24 10:17:26 +00:00
Mirko Bonadei
3b67672af7 Reland "Pass RtpRtcp::Configuration to RtcpReceiver ctor and initialize ssrcs"
This reverts commit 4d68314ec8.

Reason for revert: The culprit was https://webrtc-review.googlesource.com/c/src/+/133169.

Original change's description:
> Revert "Pass RtpRtcp::Configuration to RtcpReceiver ctor and initialize ssrcs"
> 
> This reverts commit 741b96b175.
> 
> Reason for revert: Speculative revert (some perf test are failing)
> 
> Original change's description:
> > Pass RtpRtcp::Configuration to RtcpReceiver ctor and initialize ssrcs
> > 
> > Bug: webrtc:10774
> > Change-Id: Iaae717ed1b7373d5cb2246e3ba92fc6ace422b41
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145206
> > Commit-Queue: Erik Språng <sprang@webrtc.org>
> > Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#28536}
> 
> TBR=asapersson@webrtc.org,sprang@webrtc.org
> 
> Change-Id: I877c1e4c025717c3392bce96ef31591dc1ef5f0b
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:10774
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145325
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28551}

TBR=mbonadei@webrtc.org,asapersson@webrtc.org,sprang@webrtc.org

Change-Id: Ib59a7f716a58ca8082fe69020c56054e21646cdf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10774
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145402
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28564}
2019-07-12 17:35:13 +00:00
Mirko Bonadei
999a72a401 Reland "Optimize PacketRouter/RTPSender interactions."
This reverts commit 66147e892d.

Reason for revert: The culprit was https://webrtc-review.googlesource.com/c/src/+/133169.

Original change's description:
> Revert "Optimize PacketRouter/RTPSender interactions."
> 
> This reverts commit 6f129b3b76.
> 
> Reason for revert: Speculative revert (some perf test are failing)
> 
> Original change's description:
> > Optimize PacketRouter/RTPSender interactions.
> > 
> > The legacy code-path uses a hashmap as cache in order to speed up
> > finding the right rtp module to send on. The new path should use that
> > as well.
> > In addition, there are checks that verify if an RTP module can send
> > padding, in some cases payload based. These result in a number of
> > calls to methods in RTPSender requiring its lock to be taken. This CL
> > introduces a combined SupportsPadding() check method which performs
> > all those checks in one go.
> > 
> > Bug: None
> > Change-Id: I2d18d0d6e7d8cfe92c81d08cef248a4daa7dcd4b
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144780
> > Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> > Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> > Commit-Queue: Erik Språng <sprang@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#28535}
> 
> TBR=asapersson@webrtc.org,sprang@webrtc.org,srte@webrtc.org
> 
> Change-Id: I8499dc0fd6e6d0b9fa7a0886c8754655e5589780
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: None
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145326
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28552}

TBR=mbonadei@webrtc.org,asapersson@webrtc.org,sprang@webrtc.org,srte@webrtc.org

Change-Id: I3bff3ecb2b776e30f77c1884f6faa72b21788017
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145401
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28563}
2019-07-12 17:33:52 +00:00
Mirko Bonadei
9b1f24d552 Reland "Add ability to set RTCP sender ssrc at construction time"
This reverts commit 8b3e4e2d11.

Reason for revert: The culprit was https://webrtc-review.googlesource.com/c/src/+/133169.

Original change's description:
> Revert "Reland "Add ability to set RTCP sender ssrc at construction time""
> 
> This reverts commit 6f420e4248.
> 
> Reason for revert: Speculative revert (some perf test are failing)
> 
> Original change's description:
> > Reland "Add ability to set RTCP sender ssrc at construction time"
> >
> > This is a reland of 94c58fd815
> >
> > Patch set 1 is the original CL.
> > Patch set 2 introduced a trivial fix. In RtcpSender::SetSSRC(), check
> > if either current SSRC is 0 or if the SSRC is identical to the current
> > one. If so, don't schedule an early report.
> > This prevents a regression in which audio jitter became too low(?)
> >
> > Original change's description:
> > > Add ability to set RTCP sender ssrc at construction time
> > >
> > > Bug: webrtc:10774
> > > Change-Id: Iaf5857e24359e9795434bcd0cdbe1658a2f9f5d3
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144632
> > > Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> > > Commit-Queue: Erik Språng <sprang@webrtc.org>
> > > Cr-Commit-Position: refs/heads/master@{#28506}
> >
> > Bug: webrtc:10774
> > Change-Id: I103dfa48719aa41d6ab633cdac8b3a5c46b54843
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144565
> > Commit-Queue: Erik Språng <sprang@webrtc.org>
> > Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#28520}
> 
> TBR=asapersson@webrtc.org,sprang@webrtc.org,ilnik@webrtc.org
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Bug: webrtc:10774
> Change-Id: I39238d942b2bbe0a9c8ca752387a35ed9dd70650
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145327
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28555}

TBR=mbonadei@webrtc.org,ilnik@webrtc.org,asapersson@webrtc.org,sprang@webrtc.org

Change-Id: I2e5c17e8edfd938424f901222158643baa04866e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10774
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145400
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28562}
2019-07-12 17:32:43 +00:00
Mirko Bonadei
8b3e4e2d11 Revert "Reland "Add ability to set RTCP sender ssrc at construction time""
This reverts commit 6f420e4248.

Reason for revert: Speculative revert (some perf test are failing)

Original change's description:
> Reland "Add ability to set RTCP sender ssrc at construction time"
>
> This is a reland of 94c58fd815
>
> Patch set 1 is the original CL.
> Patch set 2 introduced a trivial fix. In RtcpSender::SetSSRC(), check
> if either current SSRC is 0 or if the SSRC is identical to the current
> one. If so, don't schedule an early report.
> This prevents a regression in which audio jitter became too low(?)
>
> Original change's description:
> > Add ability to set RTCP sender ssrc at construction time
> >
> > Bug: webrtc:10774
> > Change-Id: Iaf5857e24359e9795434bcd0cdbe1658a2f9f5d3
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144632
> > Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> > Commit-Queue: Erik Språng <sprang@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#28506}
>
> Bug: webrtc:10774
> Change-Id: I103dfa48719aa41d6ab633cdac8b3a5c46b54843
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144565
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28520}

TBR=asapersson@webrtc.org,sprang@webrtc.org,ilnik@webrtc.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:10774
Change-Id: I39238d942b2bbe0a9c8ca752387a35ed9dd70650
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145327
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28555}
2019-07-12 10:09:07 +00:00
Mirko Bonadei
66147e892d Revert "Optimize PacketRouter/RTPSender interactions."
This reverts commit 6f129b3b76.

Reason for revert: Speculative revert (some perf test are failing)

Original change's description:
> Optimize PacketRouter/RTPSender interactions.
> 
> The legacy code-path uses a hashmap as cache in order to speed up
> finding the right rtp module to send on. The new path should use that
> as well.
> In addition, there are checks that verify if an RTP module can send
> padding, in some cases payload based. These result in a number of
> calls to methods in RTPSender requiring its lock to be taken. This CL
> introduces a combined SupportsPadding() check method which performs
> all those checks in one go.
> 
> Bug: None
> Change-Id: I2d18d0d6e7d8cfe92c81d08cef248a4daa7dcd4b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144780
> Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28535}

TBR=asapersson@webrtc.org,sprang@webrtc.org,srte@webrtc.org

Change-Id: I8499dc0fd6e6d0b9fa7a0886c8754655e5589780
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145326
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28552}
2019-07-12 08:37:49 +00:00
Mirko Bonadei
4d68314ec8 Revert "Pass RtpRtcp::Configuration to RtcpReceiver ctor and initialize ssrcs"
This reverts commit 741b96b175.

Reason for revert: Speculative revert (some perf test are failing)

Original change's description:
> Pass RtpRtcp::Configuration to RtcpReceiver ctor and initialize ssrcs
> 
> Bug: webrtc:10774
> Change-Id: Iaae717ed1b7373d5cb2246e3ba92fc6ace422b41
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145206
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28536}

TBR=asapersson@webrtc.org,sprang@webrtc.org

Change-Id: I877c1e4c025717c3392bce96ef31591dc1ef5f0b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10774
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145325
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28551}
2019-07-12 08:36:48 +00:00
Erik Språng
741b96b175 Pass RtpRtcp::Configuration to RtcpReceiver ctor and initialize ssrcs
Bug: webrtc:10774
Change-Id: Iaae717ed1b7373d5cb2246e3ba92fc6ace422b41
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145206
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28536}
2019-07-11 12:39:17 +00:00
Erik Språng
6f129b3b76 Optimize PacketRouter/RTPSender interactions.
The legacy code-path uses a hashmap as cache in order to speed up
finding the right rtp module to send on. The new path should use that
as well.
In addition, there are checks that verify if an RTP module can send
padding, in some cases payload based. These result in a number of
calls to methods in RTPSender requiring its lock to be taken. This CL
introduces a combined SupportsPadding() check method which performs
all those checks in one go.

Bug: None
Change-Id: I2d18d0d6e7d8cfe92c81d08cef248a4daa7dcd4b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144780
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28535}
2019-07-11 11:52:29 +00:00
Erik Språng
6f420e4248 Reland "Add ability to set RTCP sender ssrc at construction time"
This is a reland of 94c58fd815

Patch set 1 is the original CL.
Patch set 2 introduced a trivial fix. In RtcpSender::SetSSRC(), check
if either current SSRC is 0 or if the SSRC is identical to the current
one. If so, don't schedule an early report.
This prevents a regression in which audio jitter became too low(?)

Original change's description:
> Add ability to set RTCP sender ssrc at construction time
>
> Bug: webrtc:10774
> Change-Id: Iaf5857e24359e9795434bcd0cdbe1658a2f9f5d3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144632
> Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28506}

Bug: webrtc:10774
Change-Id: I103dfa48719aa41d6ab633cdac8b3a5c46b54843
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144565
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28520}
2019-07-09 20:20:41 +00:00
Ilya Nikolaevskiy
34462f5dc3 Revert "Add ability to set RTCP sender ssrc at construction time"
This reverts commit 94c58fd815.

Reason for revert: Speculative revert, as it looks like this one broke IOS debug perf bots: https://ci.chromium.org/p/webrtc-internal/builders/ci/iOS64%20Debug/18901

Original change's description:
> Add ability to set RTCP sender ssrc at construction time
> 
> Bug: webrtc:10774
> Change-Id: Iaf5857e24359e9795434bcd0cdbe1658a2f9f5d3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144632
> Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28506}

TBR=asapersson@webrtc.org,sprang@webrtc.org

Change-Id: I3f377ca1c84a7448675e5d022cb2f86f9630dbaf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10774
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144564
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28508}
2019-07-08 16:21:50 +00:00
Erik Språng
94c58fd815 Add ability to set RTCP sender ssrc at construction time
Bug: webrtc:10774
Change-Id: Iaf5857e24359e9795434bcd0cdbe1658a2f9f5d3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144632
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28506}
2019-07-08 14:56:47 +00:00
Jonas Olsson
a4d873786f Format almost everything.
This CL was generated by running

git ls-files | grep -P "(\.h|\.cc)$" | grep -v 'sdk/' | grep -v 'rtc_base/ssl_' | \
grep -v 'fake_rtc_certificate_generator.h' | grep -v 'modules/audio_device/win/' | \
grep -v 'system_wrappers/source/clock.cc' | grep -v 'rtc_base/trace_event.h' | \
grep -v 'modules/audio_coding/codecs/ilbc/' | grep -v 'screen_capturer_mac.h' | \
grep -v 'spl_inl_mips.h' | grep -v 'data_size_unittest.cc' | grep -v 'timestamp_unittest.cc' \
| xargs clang-format -i ; git cl format

Most of these changes are clang-format grouping and reordering includes
differently.

Bug: webrtc:9340
Change-Id: Ic83ddbc169bfacd21883e381b5181c3dd4fe8a63
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144051
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28505}
2019-07-08 13:45:15 +00:00
Erik Språng
f6468d2569 Wire up new PacedSender code path.
This CL makes the new code path for paced sending functionally complete.
By default, the field trial WebRTC-Pacer-ReferencePackets is Enabled,
meaning that there is no behavior change unless the field trial is
forced to Disabled. This is done in tests, and can be done on the
command line for manual testing.

Bug: webrtc:10633
Change-Id: I0d66c94ef83b5847dee437a785018f09ba3f828d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144050
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28497}
2019-07-05 15:38:59 +00:00
Erik Språng
4580ca2e99 Reland: Add ability to set ssrcs of RtpSender at construction time
Patch set 1 is identical to original CL. Next one adds fix for
backwards compatibilit.

Original cl: https://webrtc-review.googlesource.com/c/src/+/144037

Bug: webrtc:10774
Change-Id: Ib72e3723c7a07e9ee83f97560a85367becd868a1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144601
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28485}
2019-07-04 11:50:19 +00:00
Amit Hilbuch
02d7d353a9 Revert "Add ability to set ssrcs of RtpSender at construction time"
This reverts commit e9d6e658c3.

Reason for revert: breaks downstream project

Original change's description:
> Add ability to set ssrcs of RtpSender at construction time
> 
> Bug: webrtc:10774
> Change-Id: I7147a75ccbcd1093dcd2e08047da8900843fdd8d
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144037
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28447}

TBR=asapersson@webrtc.org,sprang@webrtc.org

Change-Id: I8b0cba0836e7d86ae1718055196c2c89860b97ff
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10774
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144368
Reviewed-by: Amit Hilbuch <amithi@webrtc.org>
Commit-Queue: Amit Hilbuch <amithi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28453}
2019-07-02 21:05:07 +00:00
Erik Språng
e9d6e658c3 Add ability to set ssrcs of RtpSender at construction time
Bug: webrtc:10774
Change-Id: I7147a75ccbcd1093dcd2e08047da8900843fdd8d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144037
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28447}
2019-07-02 13:03:25 +00:00
Erik Språng
478cb46435 Add GeneratePadding method to replace TimeToSendPadding
Unlike TimeToSendPadding(), the new GeneratePadding() method will
generate RTP packets and put them in the pacer queue, which will be
responsible for actually sending them.

A slight difference from previous logic is that we do not use a lower
bound of 50bytes for getting payload packets, instead we always try and
then abort if the next padding packet is larger than the current
available budget.

Since we're not sending the packets immediately, we don't need to worry
about twcc sequence numbering or updating the stats, that will be
handled by the general SendPacket() codepath. We can also omit the
PacingInfo struct and the return value of bytes sent, as that will
be handled when taking the packets out of the queue.

Bug: webrtc:10633
Change-Id: I066c292805a0bf76c59f68e66c21ea23fdb56c03
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143794
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28403}
2019-06-27 13:39:05 +00:00
Erik Språng
9c771c2089 Add TrySendPacket() method to RTP modules.
This method will be called when PacedSender is using the new code path
that directly owns the packets to be sent.

It can be seen as combining a few features of the old code path:
* It checks if this is the correct RTP module and then sends, without
  the need for PacketRouter to poll multiple methods for SSRC etc first.
* It partly corresponds to TimeToSendPacket(), but RTX encapsulation
  now happens pre-pacer and FEC does not need to have a packet history,
  so most of that method is not used.
* It implements most of PrepareAndSendPacket(), such as updating header
  extensions, reporting stats and of course forwards to Transport. It
  now also handles the history a bit differently, since media packets
  will only be stored for potential retransmission post-pacer.

Bug: webrtc:10633
Change-Id: Ie97952eeef6e56e462e115d67f7c7929f36c1817
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/142165
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28298}
2019-06-17 15:16:00 +00:00
Niels Möller
ab6fc1154f Delete RtpRtcp methods SetKeyFrameRequestMethod and RequestKeyFrame
These are replaced with the methods SendPictureLossIndication and
SendFullIntraRequest, added in cl
https://webrtc-review.googlesource.com/c/src/+/140043.

Also delete the corresponding state variable
RtpRtcpImpl::key_frame_req_method_, the enum KeyFrameRequestMethod,
and the nearby unused enum RtpRtcpPacketType.

Bug: None
Change-Id: I1ac2e4ce6dbe20d1d1cbb3d5b2256ea55b341a57
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/141403
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28221}
2019-06-11 10:42:04 +00:00
Niels Möller
dd0094a227 Deprecate RtpRtcp::SetKeyFrameRequestMethod
Replaced by separate methods
SendPictureLossIndication and SendFullIntraRequest.

The split SetKeyFrameRequestMethod/RequestKeyFrame implicitly
requires that the two methods are called on the same thread, to avoid a
data race. After downstream code is updated, both deprecated
methods and the member |ModuleRtpRtcpImpl::key_frame_req_method_| can
be deleted.

Bug: None
Change-Id: I454f6d16b667f2306cba0dec467ddc183ad449c8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140043
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28163}
2019-06-05 09:49:29 +00:00
Niels Möller
961407f5e8 Delete unused method RtpRtcp::GetRtpPacketLossStats
It was introduced, together with the PacketLossStats class, in cl
https://codereview.webrtc.org/1198853004 (#9568). It is unused in webrtc,
but there's downstream usage of the PacketLossStats class, which
should perhaps be moved or deleted in a later cl.

Bug: None
Change-Id: I17a3d5c8748f2cc9809c438630cbe8ab680466c4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140042
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28153}
2019-06-04 10:56:35 +00:00
Elad Alon
e86af2c75f Allowing buffering a LNTF (loss notification) feedback message in RTCPSender
Loss notifications may either be sent immediately, or wait until another
RTCP feedback message is sent.

Bug: webrtc:10336
Change-Id: I40601d9fa1dec6c17b2ce905cb0c8cd2dcff7893
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/139242
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28142}
2019-06-03 16:28:34 +00:00
Erik Språng
845c6aa140 Add support for early loss detection using transport feedback.
Bug: webrtc:10676
Change-Id: Ifdef133e123a0c54204397fb323f4c671c40a464
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135881
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28106}
2019-05-29 13:21:10 +00:00
Henrik Boström
6e436d1cc0 [audio] Plumbing of ReportBlockData from RTCPReceiver to MediaSenderInfo
This is part of implementing RTCRemoteInboundRtpStreamStats. The CL was
split up into smaller pieces for reviewability. Spec:
https://w3c.github.io/webrtc-stats/#dom-rtcremoteinboundrtpstreamstats

In [1], ReportBlockData was implemented and tested.
This CL adds the plumbing to make it available in MediaSenderInfo for
audio streams, but the code is not wired up to make use of these stats.

In follow-up CL [2], ReportBlockData will be used to implement
RTCRemoteInboundRtpStreamStats. The follow-up CL will add integration
tests exercising the full code path.

[1] https://webrtc-review.googlesource.com/c/src/+/136584
[2] https://webrtc-review.googlesource.com/c/src/+/138067

Bug: webrtc:10455
Change-Id: Id8940090cc9c121e8f06ccdb068a22ce24c07092
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138066
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28072}
2019-05-27 12:40:22 +00:00
Henrik Boström
87e3f9d116 [video] Plumbing of ReportBlockData from RTCPReceiver to MediaSenderInfo
This is part of implementing RTCRemoteInboundRtpStreamStats. The CL was
split up into smaller pieces for reviewability. Spec:
https://w3c.github.io/webrtc-stats/#dom-rtcremoteinboundrtpstreamstats

In [1], ReportBlockData was implemented and tested.
This CL adds the plumbing to make it available in MediaSenderInfo for
video streams, but the code is not wired up to make use of these stats.

In follow-up CL [2], ReportBlockData will be used to implement
RTCRemoteInboundRtpStreamStats. The follow-up CL will add integration
tests exercising the full code path.

[1] https://webrtc-review.googlesource.com/c/src/+/136584
[2] https://webrtc-review.googlesource.com/c/src/+/138067

Bug: webrtc:10456
Change-Id: Icd20452cb4b4908203b28ae9d9f52c25693cf91d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138065
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28071}
2019-05-27 12:21:17 +00:00
Niels Möller
39ece6d315 Delete unused method ModuleRtpRtcpImpl::SendCompoundRTCP
The corresponding method on RTCPSender is unchanged.

Bug: None
Change-Id: I5a36e5e9f1afe97084928bb2257b81014da04e18
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138071
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28033}
2019-05-23 10:14:25 +00:00
Erik Språng
d28796209b Distinguish between missing packet and send failure.
This CL introduces three-value enum, in order to be able to distinguish
between send success, send failure, and invalid states such as missing
packet or invalid ssrc.

The behavior is unchanged in this CL, a follow-up will change the pacer
to not consume media budget on invalid states.

Bug: webrtc:8052,webrtc:8975
Change-Id: I1c9e2226f995356daa538d3d3cf44945f35e0133
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135165
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27923}
2019-05-13 10:24:09 +00:00
Erik Språng
490d76c9b3 Remove packets from RtpPacketHistory if acked via TransportFeedback
If the receiver has indicated that a packet has been received, via a
TransportFeedback RTCP message, it is safe to remove it from the
RtpPacketHistory as we can be sure it won't be needed anymore.
This will reduce memory usage, reduce the risk of overflow in the
history at very high bitrates, and hopefully make payload based padding
a little more useful.

This is code stems partly from
https://webrtc-review.googlesource.com/c/src/+/134208
but without the RtpPacketHistory changes which were landed in
https://webrtc-review.googlesource.com/c/src/+/134307

Bug: webrtc:8975
Change-Id: Iea9d3d32bee5512473744e9ef3a18018567fc272
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135160
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27868}
2019-05-07 18:18:02 +00:00
Erik Språng
f8c1ed5646 Revert "Remove packets from RtpPacketHistory if acked via TransportFeedback"
This reverts commit 3890e99b70.

Reason for revert: Seems to be causing unexpected perf regressions.

Original change's description:
> Remove packets from RtpPacketHistory if acked via TransportFeedback
> 
> If the receiver has indicated that a packet has been received, via a
> TransportFeedback RTCP message, it is safe to remove it from the
> RtpPacketHistory as we can be sure it won't be needed anymore.
> This will reduce memory usage, reduce the risk of overflow in the
> history at very high bitrates, and hopefully make payload based padding
> a little more useful.
> 
> Bug: webrtc:8975
> Change-Id: I703a353252943f63d7d6edda68f03bc482633fd6
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133028
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27745}

TBR=danilchap@webrtc.org,sprang@webrtc.org,srte@webrtc.org

Change-Id: I68ea6cf5c8988d4b625f14a1a9bc556c06a39368
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8975
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134161
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27752}
2019-04-25 07:49:31 +00:00
Erik Språng
3890e99b70 Remove packets from RtpPacketHistory if acked via TransportFeedback
If the receiver has indicated that a packet has been received, via a
TransportFeedback RTCP message, it is safe to remove it from the
RtpPacketHistory as we can be sure it won't be needed anymore.
This will reduce memory usage, reduce the risk of overflow in the
history at very high bitrates, and hopefully make payload based padding
a little more useful.

Bug: webrtc:8975
Change-Id: I703a353252943f63d7d6edda68f03bc482633fd6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133028
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27745}
2019-04-24 18:10:18 +00:00
Henrik Boström
cf96e0f87d Implement RTCOutboundRtpStreamStats.retransmitted[Bytes/Packets]Sent.
Spec: https://w3c.github.io/webrtc-stats/#dom-rtcoutboundrtpstreamstats-retransmittedpacketssent

These are already existed in StreamDataCounters. This CL takes care of
the plumbing of these values to the standard stats collector.

TBR=solenberg@webrtc.org

Bug: webrtc:10447
Change-Id: I27d6c3ee3ab627d306303e6ee67e586ddf31cc81
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132012
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27663}
2019-04-17 13:04:50 +00:00
Elad Alon
0a8562e276 Forward LossNotification from RTCPReceiver to EncoderRtcpFeedback
TBR=sprang@webrtc.org

Bug: webrtc:10501
Change-Id: I09a571a65ba8515b027ee32d1f46e5cc7f699704
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131325
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27513}
2019-04-09 11:13:39 +00:00
Sebastian Jansson
d155d686f8 Removes rtp level keep alive support.
This is not used in practice as there's functionality on
other levels that serves the same purpose.

Bug: None
Change-Id: I0488dc42459b07607363eba0f2b06f4c50f7cda4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125520
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27061}
2019-03-11 14:47:15 +00:00
Niels Möller
ee5ccbc57f Move ownership of RTPSenderAudio to ChannelSend.
This change takes out responsibility for packetization from the
RtpRtcp class, and deletes the method RtpRtcp::SendOutgoingData.

Video packetization was similarly moved in cl
https://webrtc-review.googlesource.com/c/src/+/123187

Bug: webrtc:7135
Change-Id: I0953125a5ca22a2ce51761b83693e0bb8ea74cd8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125721
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27000}
2019-03-06 17:15:00 +00:00
Danil Chapovalov
c44f6cc5fe Modernize RtpRtcp factory function: use unique_ptr as return type
to clearly signal passed ownership.
Drop support for accepting nullptr clock to avoid copying the Configuration structure.
Update all calls in webrtc to the new factory function

Bug: None
Change-Id: Ic5a78da8e59ba3988a757a9d9634fa31499ce0db
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125901
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26994}
2019-03-06 14:38:39 +00:00
Niels Möller
5fe9510efb Move ownership of RTPSenderVideo one more level up, to RtpVideoSender
The idea is to let the RtpRtcp and RTPSender classes be responsible for
media-agnostic RTP transport, and move out the media-specific processing,
such as packetization and media-specific headers.

Bug: webrtc:7135
Change-Id: Ib0ce45bf06713b3eb6c06acd91c5168856874e4e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/123187
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26954}
2019-03-04 16:57:49 +00:00
Elad Alon
7d6a4c045c Connect LossNotificationController to RtpRtcp
* LossNotificationController is the class that decides when to issue
  LossNotification RTCP messages.
* RtpRtcp handles the technicalities of producing RTCP messages.

Bug: webrtc:10336
Change-Id: I292536257a984ca85d21d9cfa38e7ff2569cbb39
Reviewed-on: https://webrtc-review.googlesource.com/c/124123
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26840}
2019-02-25 16:08:35 +00:00
Per Kjellander
e11b7d2e80 Replace field trials with WebRtcKeyValueConfig in RtpRtcpModule
Replaces use of field trials in RtpSender and RtpVideoSender with injectable WebRtcKeyValueConfig.
Implementation still defaults to field trials.

BUG: webrtc:10335
Change-Id: I5fc6d327ee5d011ccc41385734b38344df172627
Reviewed-on: https://webrtc-review.googlesource.com/c/123447
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26795}
2019-02-21 14:25:34 +00:00
Niels Möller
59ab1cf081 Move ownership of RTPSenderVideo and RTPSenderAudio one level up
From RTPSender to RtpRtcpImpl. Makes RTPSender operate on packets
only, not frames.

Bug: webrtc:7135
Change-Id: Ia9a11456404c3b322d873d4f8fb828742296b26d
Reviewed-on: https://webrtc-review.googlesource.com/c/120044
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26586}
2019-02-07 13:31:48 +00:00
Niels Möller
949f0fdc10 Move FrameCountObserver from RTPSender to RtpVideoSender
Tbr: sprang@webrtc.org # Trivial change to rtp_video_stream_receiver.cc
Bug: webrtc:7135
Change-Id: Ic292fb02046ea800d7f0876900997d96ed0099d6
Reviewed-on: https://webrtc-review.googlesource.com/c/120161
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26441}
2019-01-29 09:31:11 +00:00
Niels Möller
bebca61e5e Delete unused method SetSelectiveRetransmissions
Bug: None
Change-Id: I5a59b5776fe537ec380629f9e5e9ac98c9e1214b
Reviewed-on: https://webrtc-review.googlesource.com/c/119920
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26407}
2019-01-25 14:40:04 +00:00
Erik Språng
482b3ef2ac Account for packetization overhead when setting target bitrate.
That is, the payload packetization overhead (eg. vp8 payload header),
not the RTP headers, extensions, etc.
The encoder and pacer both look at payload rate, but are currently not
aware of the bytes that are added in between them.

Bug: webrtc:10155
Change-Id: I4cdb04849d762360374d47a496983c8c6df191d2
Reviewed-on: https://webrtc-review.googlesource.com/c/115410
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26163}
2019-01-08 16:12:58 +00:00
Amit Hilbuch
77938e6409 Simulcast work to enable RID mux.
Rids can now be sent using rtp_sender.
Hooking up the rid values in the voice and video engine is still WIP.

Bug: webrtc:10074
Change-Id: I245c7ecb23b67fc0ba65caaa5dbb4fcfd60c81bb
Reviewed-on: https://webrtc-review.googlesource.com/c/114505
Commit-Queue: Amit Hilbuch <amithi@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26092}
2018-12-21 20:59:23 +00:00
Fredrik Solenberg
f693bfae5f Remove CodecInst pt.2
The following APIs on AudioCodingModule are deprecated with this CL:
  static int NumberOfCodecs();
  static int Codec(int, CodecInst*);
  static int Codec(const char*, CodecInst*, int, size_t);
  static int Codec(const char*, int, size_t);
  absl::optional<CodecInst> SendCodec() const;
  bool RegisterReceiveCodec(int, const SdpAudioFormat&);
  int RegisterExternalReceiveCodec(int, AudioDecoder*, int, int, const std::string&);
  int UnregisterReceiveCodec(uint8_t);
  int32_t ReceiveCodec(CodecInst*);
  absl::optional<SdpAudioFormat> ReceiveFormat();

As well as this method on RtpRtcp module:
  int32_t RegisterSendPayload(const CodecInst&);

Bug: webrtc:7626
Change-Id: I1230732136f1fe9048cf74afdeab767ca57ac9ce
Reviewed-on: https://webrtc-review.googlesource.com/c/113816
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26025}
2018-12-17 10:33:55 +00:00
Fredrik Solenberg
18f0c3c038 Add RegisterAudioSendPayload() method
In preparation of removing CodecInst.

Bug: webrtc:7626
Change-Id: I8955d17dbb3ec15177e505ae420376b542d48410
Reviewed-on: https://webrtc-review.googlesource.com/c/113306
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25919}
2018-12-06 12:44:53 +00:00
Jiawei Ou
8b5d9d8650 Remove the audio/video split for the RTCP report intervals.
This is a follow up of a comment in
https://webrtc-review.googlesource.com/c/src/+/110105

It was not very useful to split the audio and video report interval since the RTCP module can only either be audio or video.

The recent it was written that way in https://webrtc-review.googlesource.com/c/src/+/43201/ was because that was a straightforward transition from two global constants to two variable.

Bug: webrtc:8789
Change-Id: I2293de14ba5f363351f379a02022ed5dc7b8d458
Reviewed-on: https://webrtc-review.googlesource.com/c/110824
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Jiawei Ou <ouj@fb.com>
Cr-Commit-Position: refs/heads/master@{#25741}
2018-11-22 01:39:41 +00:00
Johannes Kron
9190b82660 Propagate SDP negotiation of extmap-allow-mixed to RtpHeaderExtensionMap
Bug: webrtc:7990
Change-Id: I662595f90b9d0be39f7e14752e13b2bb7a1746ee
Reviewed-on: https://webrtc-review.googlesource.com/c/106020
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25421}
2018-10-30 08:06:49 +00:00
Ilya Nikolaevskiy
5e58bcbf29 Forward audio rtp frequency to Rtcp sender and use it for SR packets
Process video rtp frequency in the same way.

Bug: webrtc:6458
Change-Id: Ia22768e1242d686c2b3e2b911f3e5e492cf8b895
Reviewed-on: https://webrtc-review.googlesource.com/c/107651
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25334}
2018-10-24 12:27:09 +00:00
Yves Gerey
988cc0870b [Cleanup] Add missing #include. Remove useless ones.
This CL is the result of running include-what-you-use tool on part
of the code base (audio target and dependencies) plus manual fixes.

bug: webrtc:8311
Change-Id: I277d281ce943c3ecc1bd45fd8d83055931743604
Reviewed-on: https://webrtc-review.googlesource.com/c/106280
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25311}
2018-10-23 11:32:56 +00:00
Benjamin Wright
192eeec14d Enable End-to-End Encrypted Video Frames.
This change integrates the FrameDecryptorInterface and the FrameEncryptorInterface into
the video send and receive path. If a FrameEncryptorInterface is set on an outgoing video RTPSender
then each outgoing video frame will first pass through the provided FrameEncryptor which
will have a chance to modify the payload contents for the purposes of encryption. In addition to
this the new GenericFrameDescriptor will be added as additional data.

If a FrameDecryptorInterface is set on an incoming video RtpReceiver then each incoming
video payload will first pass through the provided FrameDecryptor which have a chance to
modify the payload contents for the purpose of decryption.

Bug: webrtc:9795
Change-Id: I9f743ce0cb63df0cf070f6144be7ada078b4e5d2
Reviewed-on: https://webrtc-review.googlesource.com/c/103920
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25258}
2018-10-18 16:05:13 +00:00
Sebastian Jansson
1bca65bdc9 Makes RtpSender indicate allocation and feedback status on packets.
Streams that are part of transport feedback are assumed to be part of
allocation. A SetAsPartOfAllocation method is introduced to be used by
media streams that are part of bitrate allocation but not included in
feedback.

This is part of a series of CLs that allows GoogCC to track sent bitrate
that is included in bitrate allocation but without transport feedback.

Bug: webrtc:9796
Change-Id: If7ac1ad3e6f3c28b2ada2aef1607a42689d899b2
Reviewed-on: https://webrtc-review.googlesource.com/c/104881
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25079}
2018-10-10 08:28:34 +00:00
Niels Möller
44b384d013 Delete support for VoIP metrics (RFC 3611 4.7)
Bug: None
Change-Id: I2f3cd622d3863fa88a9e1971894eced8eeb777e6
Reviewed-on: https://webrtc-review.googlesource.com/c/103805
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25007}
2018-10-05 10:07:57 +00:00
Danil Chapovalov
9eb6ce1cd0 Remove redundant member variable in RtpRtcp
Bug: None
Change-Id: Ia999bb4020c8f270c916074e5c58bab15f6c77d0
Reviewed-on: https://webrtc-review.googlesource.com/33300
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24848}
2018-09-26 11:34:35 +00:00
Danil Chapovalov
585d1aac17 Register video rtp header extensions in rtp_rtcp by uri
Remove function for converting uri into ExtensionType
This removes one of the lists of all supported extensions

Bug: webrtc:7472
Change-Id: I0c27239d91ef14ca4a3aa0c00588fa2b9cf10e0c
Reviewed-on: https://webrtc-review.googlesource.com/100523
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24752}
2018-09-17 10:02:30 +00:00
Johnny Lee
e0c8b230e7 Frame marking RTP header extension (PART 1: implement extension)
Bug: webrtc:7765
Change-Id: I23896d121afd6be4bce5ff4deaf736149efebcdb
Reviewed-on: https://webrtc-review.googlesource.com/85200
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24695}
2018-09-11 22:35:30 +00:00
Yves Gerey
665174fdbb Reformat the WebRTC code base
Running clang-format with chromium's style guide.

The goal is n-fold:
 * providing consistency and readability (that's what code guidelines are for)
 * preventing noise with presubmit checks and git cl format
 * building on the previous point: making it easier to automatically fix format issues
 * you name it

Please consider using git-hyper-blame to ignore this commit.

Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
2018-06-19 14:00:39 +00:00
Danil Chapovalov
d264df587f Replace rtc::Optional with absl::optional in modules/rtp_rtcp
This is a no-op change because rtc::Optional is an alias to absl::optional

This CL generated using script:
#!/bin/bash
dir=modules/rtp_rtcp
find $dir -type f \( -name \*.h -o -name \*.cc \) \
-exec sed -i 's|rtc::Optional|absl::optional|' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+

find $dir -type f -name BUILD.gn \
-exec sed -r -i 's|"(../)*api:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;

git cl format

Bug: webrtc:9078
Change-Id: Ife720849709959046329c1c9faa3f31aa13274dc
Reviewed-on: https://webrtc-review.googlesource.com/83584
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23624}
2018-06-15 09:53:35 +00:00
Erik Språng
566124a6df Move BitrateAllocation to api/ and rename it VideoBitrateAllocation
Since the webrtc_common build target does not have visibility set, we
cannot easily use BitrateAllocation in other parts of Chromium.
This is currently blocking parts of chromium:794608, and I know of other
usage outside webrtc already, so moving it to api/ should be warranted.

Also, since there's some naming confusion and this class is video
specific rename it VideoBitrateAllocation. This also fits with the
standard interface for producing these: VideoBitrateAllocator.

Bug: chromium:794608
Change-Id: I4c0fae40f9365e860c605a76a4f67ecc9b9cf9fe
Reviewed-on: https://webrtc-review.googlesource.com/70783
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22986}
2018-04-23 15:31:27 +00:00
Mirta Dvornicic
b1f063db32 Handle Receiver Reference Time Report from multiple receivers.
Bug: webrtc:9122
Change-Id: I996f02da26b11a4829fda740fdd452470daf4d24
Reviewed-on: https://webrtc-review.googlesource.com/66781
Commit-Queue: Mirta Dvornicic <mirtad@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22871}
2018-04-16 09:54:07 +00:00
Steve Anton
bb50ce5bb6 Wire up MID send value to the PeerConnection API
Bug: webrtc:4050
Change-Id: I522cf8621e2cb639f54be2402174befd23e4af59
Reviewed-on: https://webrtc-review.googlesource.com/60962
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22610}
2018-03-26 18:14:30 +00:00
Steve Anton
296a0ce4c7 Add MID sending to RTPSender
This CL adds the ability to configure RTPSender to include the
MID header extension when sending packets. The MID will be
included on every packet at the start of the stream until an RTCP
acknoledgment is received for that SSRC at which point it will
stop being included. The MID will be included on regular RTP
streams as well as RTX streams.

Bug: webrtc:4050
Change-Id: Ie27ebee1cd00a67f2b931f5363788f523e3e684f
Reviewed-on: https://webrtc-review.googlesource.com/60582
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22574}
2018-03-23 01:50:45 +00:00
Niels Möller
2e1d784956 Delete the VideoCodec::plName string.
It holds the same information as codecType, but in different format.

Bug: webrtc:8830
Change-Id: Ia83e2dff4fd9a5ddb489501b7a1fe80759fa4218
Reviewed-on: https://webrtc-review.googlesource.com/56100
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22307}
2018-03-06 11:17:41 +00:00
Erik Språng
7b52f102ef Don't write pacer exit timestamp without pacer
And allow populating network2 timestamp if we want to preserve pacer
timestamp.

Bug: webrtc:8853
Change-Id: I895d5ce8a9cca8ceeec3bf08e2eff02bf3b2f5fd
Reviewed-on: https://webrtc-review.googlesource.com/48640
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21937}
2018-02-07 14:45:43 +00:00
Danil Chapovalov
2a5ce2bcf8 Fix clang style errors in rtp_rtcp and dependant targets
Mark functions with override instead of virtual.
Add explicit non-trivial constructors/assign operators/destructors.
Define them in .cc files instead of inlining
use auto* instead of auto when deduced type is raw pointer

Bug: webrtc:163
Change-Id: I4d8a05d6a64fcc2ca16d02c5fcf9488fda832a6d
Reviewed-on: https://webrtc-review.googlesource.com/48781
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21927}
2018-02-07 09:48:28 +00:00
Jiawei Ou
3587b8302a Make RTCP report interval configurable
Bug: webrtc:8789
Change-Id: I79c9132123c946b030ed79c647b4329e81d6e6ae
Reviewed-on: https://webrtc-review.googlesource.com/43201
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21837}
2018-02-01 10:12:11 +00:00
Erik Språng
8b10192307 Don't overwrite packets in rtp packet history too early
Bug: webrtc:8766
Change-Id: I24029138d366ba54dc5d95be5c06d08d6b1c9575
Reviewed-on: https://webrtc-review.googlesource.com/40506
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21687}
2018-01-18 22:41:18 +00:00
Danil Chapovalov
1de4b62955 Change RtpRtcp::SetRemb signature to match RtcpTransceiver::SetRemb
in particular change bitrate type to int64_t to follow style guide.

With an extra interface it will allow to add both RtpRtcp module
and RtcpTransceiver as feedback sender to PacketRouter

Bug: webrtc:8239
Change-Id: I9ea265686d7cd2d709f0b42e8a983ebe1790a6ba
Reviewed-on: https://webrtc-review.googlesource.com/32302
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21250}
2017-12-13 14:40:01 +00:00
Oskar Sundbom
3419cf909e Optional: Use nullopt and implicit construction in /modules/rtp_rtcp
Changes places where we explicitly construct an Optional to instead use
nullopt or the requisite value type only.

This CL was uploaded by git cl split.

R=danilchap@webrtc.org

Bug: None
Change-Id: Ib4694d183f04d675f2ea66d39661fdffb2a984f1
Reviewed-on: https://webrtc-review.googlesource.com/23604
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20846}
2017-11-23 11:36:08 +00:00
Mirko Bonadei
675513b96a Stop using LOG macros in favor of RTC_ prefixed macros.
This CL has been generated with the following script:

for m in PLOG \
  LOG_TAG \
  LOG_GLEM \
  LOG_GLE_EX \
  LOG_GLE \
  LAST_SYSTEM_ERROR \
  LOG_ERRNO_EX \
  LOG_ERRNO \
  LOG_ERR_EX \
  LOG_ERR \
  LOG_V \
  LOG_F \
  LOG_T_F \
  LOG_E \
  LOG_T \
  LOG_CHECK_LEVEL_V \
  LOG_CHECK_LEVEL \
  LOG
do
  git grep -l $m | xargs sed -i "s,\b$m\b,RTC_$m,g"
done
git checkout rtc_base/logging.h
git cl format

Bug: webrtc:8452
Change-Id: I1a53ef3e0a5ef6e244e62b2e012b864914784600
Reviewed-on: https://webrtc-review.googlesource.com/21325
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20617}
2017-11-09 11:56:32 +00:00
Danil Chapovalov
f74d641fc1 Simplify setting/unsetting REMB in RtcpSender
follow up of https://webrtc-review.googlesource.com/c/src/+/7983

Bug: None
Change-Id: I408c21408478d801a769e2e9d5f2eb9408430a4b
Reviewed-on: https://webrtc-review.googlesource.com/12520
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20359}
2017-10-19 14:07:31 +00:00
Danil Chapovalov
51e21aaa7a Simplify RtpRtcp interface for REMB
Remove REMB accessor as used for debug checks only.
Merge SetRembData and SetRembStatus(true) eliminating 
state 'remb can be send, but no data available yet'

Bug: None
Change-Id: I4c1c19435657e5cde02a17de90ec6de9f00b7daf
Reviewed-on: https://webrtc-review.googlesource.com/7983
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20240}
2017-10-11 11:09:39 +00:00
Danil Chapovalov
760c4b4da9 Trigger rtt and stats update on report block rather than receiver report.
ReportBlock is the the real receiver report.
Triggering rtt update on ReportBlock support clients that send receiver
report blocks attached to SenderReport rather than ReceiverReport.

Bug: webrtc:7996
Change-Id: Ie826fa09fd1bf0e5256e995649f66811b5192761
Reviewed-on: https://webrtc-review.googlesource.com/4040
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20014}
2017-09-28 10:29:59 +00:00
Mirko Bonadei
7120742701 Adding NOLINT for typedefs.h and common_types.h
Now that we have moved WebRTC from src/webrtc to src/, common_types.h
and typedefs.h are triggering a cpplint error.

The cpplint complaint is:
Include the directory when naming .h files  [build/include] [4]

This CL disables the error but we have to remove these two headers
from the root directory.

NOPRESUBMIT=true

Bug: webrtc:5876
Change-Id: I08e1b69aadcc4b28ab83bf25e3819d135d41d333
Reviewed-on: https://webrtc-review.googlesource.com/1577
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@google.com>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19859}
2017-09-15 13:03:51 +00:00
Mirko Bonadei
92ea95e34a Fixing WebRTC after moving from src/webrtc to src/
In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC
from src/webrtc to src/ (in order to preserve an healthy git history).
This CL takes care of fixing header guards, #include paths, etc...

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org


Bug: chromium:611808
Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578
Reviewed-on: https://webrtc-review.googlesource.com/1561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19846}
2017-09-15 05:02:56 +00:00
Mirko Bonadei
bb547203bf Moving src/webrtc into src/.
In order to eliminate the WebRTC Subtree mirror in Chromium, 
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org

Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}
2017-09-15 04:25:06 +00:00
niklase@google.com
5adc73aad3 git-svn-id: http://webrtc.googlecode.com/svn/trunk@166 4adac7df-926f-26a2-2b94-8c16560cd09d 2011-07-07 08:46:41 +00:00
hlundin@google.com
6b04739e04 Route CodecSpecificInfo from encoder to packetizer
Making a long chain of interface changes to route a CodecSpecificInfo
struct from the video encoder function to the RTPSenderVideo. This
will be used to convey information needed by the RTP packetizer when
building the RTP headers.
Review URL: http://webrtc-codereview.appspot.com/56001

git-svn-id: http://webrtc.googlecode.com/svn/trunk@140 4adac7df-926f-26a2-2b94-8c16560cd09d
2011-07-01 08:32:57 +00:00
niklase@google.com
77ae29bc81 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4 4adac7df-926f-26a2-2b94-8c16560cd09d 2011-05-30 11:22:19 +00:00