Commit graph

97 commits

Author SHA1 Message Date
Danil Chapovalov
884118dad1 Delete unused functions in ModuleRtpRtcpImpl
Bug: None
Change-Id: Ia475afed123abaf32df6f1f1a546f5704e2d464f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/201421
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32985}
2021-01-14 19:24:37 +00:00
Niels Möller
be810cba19 Delete SetRtcpXrRrtrStatus, make it a construction-time setting
Bug: None
Change-Id: If2c42af6038c2ce1dc4289b949a0a3a279bae1b9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/195337
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32754}
2020-12-03 10:01:01 +00:00
Niels Möller
cd982137df Add missing RTC_GUARDED_BY for ModuleRtpRtcpImpl::rtt_ms_
Bug: None
Change-Id: I7aef516e4310a7ff14a8bbc77c6edd488167d18d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/195338
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32711}
2020-11-27 12:34:04 +00:00
Niels Möller
af6ea0c3ab Delete internal getter methods from RtpRtcpInterface
Methods deleted: StorePackets, RtcpXrRrtrStatus. They are now private
methods on the two implementations.

Bug: None
Change-Id: If68e8f1e8ba233302e24e0cdb6bf7c1b0c9f330f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/194322
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32670}
2020-11-23 11:37:41 +00:00
Danil Chapovalov
fbb31dff0c Delete RtpRtcp::BitrateSent as no longer used
Bug: None
Change-Id: I3e54efcb493126803f2b7139a06d6101462d678a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185186
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32215}
2020-09-28 17:36:00 +00:00
Markus Handell
f7303e6486 Migrate leftovers in media/ and modules/ to webrtc::Mutex.
Bug: webrtc:11567
Change-Id: Id40a53fcec6cba1cd5af70422291ba46b0a6da8c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178905
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31694}
2020-07-10 08:27:45 +00:00
Erik Språng
1d50cb61d8 Reland "Reland "Allows FEC generation after pacer step.""
This is a reland of 19df870d92
Patchset 1 is the original.
Subsequent patchset changes threadchecker that crashed with downstream
code.

Original change's description:
> Reland "Allows FEC generation after pacer step."
>
> This is a reland of 75fd127640
>
> Patchset 2 contains a fix. Old code can in factor call
> RtpRtcpImpl::FetchFec(). It should only be a noop since deferred fec
> is not supported there - we shouldn't crash.
>
> Original change's description:
> > Allows FEC generation after pacer step.
> >
> > Split out from https://webrtc-review.googlesource.com/c/src/+/173708
> > This CL enables FEC packets to be generated as media packets are sent,
> > rather than generated, i.e. media packets are inserted into the fec
> > generator after the pacing stage rather than at packetization time.
> >
> > This may have some small impact of performance. FEC packets are
> > typically only generated when a new packet with a marker bit is added,
> > which means FEC packets protecting a frame will now be sent after all
> > of the media packets, rather than (potentially) interleaved with them.
> > Therefore this feature is currently behind a flag so we can examine the
> > impact. Once we are comfortable with the behavior we'll make it default
> > and remove the old code.
> >
> > Note that this change does not include the "protect all header
> > extensions" part of the original CL - that will be a follow-up.
> >
> > Bug: webrtc:11340
> > Change-Id: I3fe139c5d53968579b75b91e2612075451ff0f5d
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177760
> > Commit-Queue: Erik Språng <sprang@webrtc.org>
> > Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#31558}
>
> Bug: webrtc:11340
> Change-Id: I2ea49ee87ee9ff409044e34a777a7dd0ae0a077f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177984
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31613}

Bug: webrtc:11340
Change-Id: Ib741c8c284f523c959f8aca454088d9eee7b17f8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178600
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31619}
2020-07-03 07:20:06 +00:00
Erik Språng
a1888ae791 Revert "Reland "Allows FEC generation after pacer step.""
This reverts commit 19df870d92.

Reason for revert: Downstream project failure

Original change's description:
> Reland "Allows FEC generation after pacer step."
> 
> This is a reland of 75fd127640
> 
> Patchset 2 contains a fix. Old code can in factor call
> RtpRtcpImpl::FetchFec(). It should only be a noop since deferred fec
> is not supported there - we shouldn't crash.
> 
> Original change's description:
> > Allows FEC generation after pacer step.
> >
> > Split out from https://webrtc-review.googlesource.com/c/src/+/173708
> > This CL enables FEC packets to be generated as media packets are sent,
> > rather than generated, i.e. media packets are inserted into the fec
> > generator after the pacing stage rather than at packetization time.
> >
> > This may have some small impact of performance. FEC packets are
> > typically only generated when a new packet with a marker bit is added,
> > which means FEC packets protecting a frame will now be sent after all
> > of the media packets, rather than (potentially) interleaved with them.
> > Therefore this feature is currently behind a flag so we can examine the
> > impact. Once we are comfortable with the behavior we'll make it default
> > and remove the old code.
> >
> > Note that this change does not include the "protect all header
> > extensions" part of the original CL - that will be a follow-up.
> >
> > Bug: webrtc:11340
> > Change-Id: I3fe139c5d53968579b75b91e2612075451ff0f5d
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177760
> > Commit-Queue: Erik Språng <sprang@webrtc.org>
> > Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#31558}
> 
> Bug: webrtc:11340
> Change-Id: I2ea49ee87ee9ff409044e34a777a7dd0ae0a077f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177984
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31613}

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

Change-Id: I3b2b25898ce88b64c2322f68ef83f9f86ac2edb0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11340
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178563
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31614}
2020-07-02 12:03:07 +00:00
Erik Språng
19df870d92 Reland "Allows FEC generation after pacer step."
This is a reland of 75fd127640

Patchset 2 contains a fix. Old code can in factor call
RtpRtcpImpl::FetchFec(). It should only be a noop since deferred fec
is not supported there - we shouldn't crash.

Original change's description:
> Allows FEC generation after pacer step.
>
> Split out from https://webrtc-review.googlesource.com/c/src/+/173708
> This CL enables FEC packets to be generated as media packets are sent,
> rather than generated, i.e. media packets are inserted into the fec
> generator after the pacing stage rather than at packetization time.
>
> This may have some small impact of performance. FEC packets are
> typically only generated when a new packet with a marker bit is added,
> which means FEC packets protecting a frame will now be sent after all
> of the media packets, rather than (potentially) interleaved with them.
> Therefore this feature is currently behind a flag so we can examine the
> impact. Once we are comfortable with the behavior we'll make it default
> and remove the old code.
>
> Note that this change does not include the "protect all header
> extensions" part of the original CL - that will be a follow-up.
>
> Bug: webrtc:11340
> Change-Id: I3fe139c5d53968579b75b91e2612075451ff0f5d
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177760
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31558}

Bug: webrtc:11340
Change-Id: I2ea49ee87ee9ff409044e34a777a7dd0ae0a077f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177984
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31613}
2020-07-02 11:40:55 +00:00
Erik Språng
1b48532208 Revert "Allows FEC generation after pacer step."
This reverts commit 75fd127640.

Reason for revert: Breaks downstream test

Original change's description:
> Allows FEC generation after pacer step.
> 
> Split out from https://webrtc-review.googlesource.com/c/src/+/173708
> This CL enables FEC packets to be generated as media packets are sent,
> rather than generated, i.e. media packets are inserted into the fec
> generator after the pacing stage rather than at packetization time.
> 
> This may have some small impact of performance. FEC packets are
> typically only generated when a new packet with a marker bit is added,
> which means FEC packets protecting a frame will now be sent after all
> of the media packets, rather than (potentially) interleaved with them.
> Therefore this feature is currently behind a flag so we can examine the
> impact. Once we are comfortable with the behavior we'll make it default
> and remove the old code.
> 
> Note that this change does not include the "protect all header
> extensions" part of the original CL - that will be a follow-up.
> 
> Bug: webrtc:11340
> Change-Id: I3fe139c5d53968579b75b91e2612075451ff0f5d
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177760
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31558}

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

Change-Id: Ie714e5f68580cbd57560e086c9dc7292a052de5f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11340
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177983
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31559}
2020-06-24 18:41:10 +00:00
Erik Språng
75fd127640 Allows FEC generation after pacer step.
Split out from https://webrtc-review.googlesource.com/c/src/+/173708
This CL enables FEC packets to be generated as media packets are sent,
rather than generated, i.e. media packets are inserted into the fec
generator after the pacing stage rather than at packetization time.

This may have some small impact of performance. FEC packets are
typically only generated when a new packet with a marker bit is added,
which means FEC packets protecting a frame will now be sent after all
of the media packets, rather than (potentially) interleaved with them.
Therefore this feature is currently behind a flag so we can examine the
impact. Once we are comfortable with the behavior we'll make it default
and remove the old code.

Note that this change does not include the "protect all header
extensions" part of the original CL - that will be a follow-up.

Bug: webrtc:11340
Change-Id: I3fe139c5d53968579b75b91e2612075451ff0f5d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177760
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31558}
2020-06-24 16:59:50 +00:00
Tomas Gunnarsson
79ca92d952 Add workaround method for deprecated code.
This is to allow downstream cases to be able to set the
media_has_been_sent flag in the sender as it's being
removed from RtpState.

Bug: webrtc:11581
Change-Id: I28f5fca96ba1d3f562c4d069d1b6d9af4002aaab
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177524
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31545}
2020-06-18 17:08:44 +00:00
Tomas Gunnarsson
593e6a4238 Fork RtpSenderEgress.
The forked and deprecated implementation is used by the
deprecated ModuleRtpRtcpImpl implementation.

Change-Id: If67ca1181f40969791cf9c8903c0e49679c86834
Bug: webrtc:11581, webrtc:11611
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176566
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31459}
2020-06-08 08:02:50 +00:00
Tomas Gunnarsson
f25761d798 Remove dependency from RtpRtcp on the Module interface.
The 'Module' part of the implementation must not be
called via the RtpRtcp interface, but is rather a part of
the contract with ProcessThread. That in turn is an
implementation detail for how timers are currently implemented
in the default implementation.

Along the way I'm deprecating away the factory function which
was inside the interface and tied it to one specific implementation.
Instead, I'm moving that to the implementation itself and down the
line, we don't have to go through it if we just want to create an
instance of the class.

The key change is in rtp_rtcp.h and the new rtp_rtcp_interface.h
header file (things moved from rtp_rtcp.h), the rest falls from that.

Change-Id: I294f13e947b9e3e4e649400ee94a11a81e8071ce
Bug: webrtc:11581
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176419
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31440}
2020-06-04 08:11:21 +00:00
Tommi
3a5742c880 Add thread/sequence checks to ModuleRtpRtcpImpl.
This ended up with needing to fork the current implementation
in order to not break downstream projects that were inheriting
from it. While those get updated, we'll move on with the forked
class.

Bug: webrtc:11581,b/8278269
Change-Id: I05b596cbda71aa5b72894c31a7119d17d4761883
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175500
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31334}
2020-05-20 15:45:21 +00:00
Erik Språng
bf46cfef22 Refactors send rate statistics in RtpSenderEgress
When FEC generation is moved to egress, we'll need to poll bitrates from
there instead of the RtpVideoSender. In preparation, refactoring some
getter methods.

For context, see https://webrtc-review.googlesource.com/c/src/+/173708

Bug: webrtc:11340
Change-Id: Ibc27362361ee9640d9fce676fc8e1093a579344f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174202
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31214}
2020-05-11 17:14:33 +00:00
Erik Språng
04e1bab1b3 Replaces OverheadObserver with simple getter.
This interface has a couple of issues. Primarily for me, it makes it
difficult work with the paced sender as we need to either temporarily
release a lock or force a thread-handover in order to avoid a cyclic
lock order.

For video in particular, its behavior is also falky since header sizes
can vary not only form frame to frame, but from packet to packet within
a frame (e.g. TimingInfo extension is only on the last packet, if set).
On bitrate allocation, the last reported value is picked, leading to
timing issues affecting the bitrate set.

This CL removes the callback interface and instead we simply poll the
RTP module for a packet overhead. This consists of an expected overhead
based on which non-volatile header extensions are registered (so for
instance AbsoluteCaptureTime is disregarded since it's only populated
once per second). The overhead estimation is a little less accurate but
instead simpler and deterministic.

Bug: webrtc:10809
Change-Id: I2c3d3fcca6ad35704c4c1b6b9e0a39227aada1ea
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173704
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Ali Tofigh <alito@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31185}
2020-05-07 17:33:45 +00:00
Danil Chapovalov
bd74d5ca6b Pass callbacks for RtcpReceiver at construction
Bug: webrtc:10680
Change-Id: Ic242008e63a5a86ac30ab5f4041a30dbdb7fc72b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170236
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30773}
2020-03-12 10:26:17 +00:00
Erik Språng
3663f94143 Moves RtpSequenceNumberMap from RtpSenderVideo to RtpSenderEgress.
Bug: webrtc:11340
Change-Id: Icd9032e3589324cb9ee7b699b38a35e733081e55
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168192
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30481}
2020-02-07 11:07:06 +00:00
Erik Språng
56e611bbda Reland "Remove PlayoutDelayOracle and make RtpSenderVideo guarantee delivery"
This is a reland of 4f68f5398d

Original change's description:
> Remove PlayoutDelayOracle and make RtpSenderVideo guarantee delivery
>
> The PlayoutDelayOracle was responsible for making sure the PlayoutDelay
> header extension was successfully propagated to the receiving side. Once
> it was determined that the receiver had received a frame with the new
> delay tag, it's no longer necessary to propagate.
>
> The issue with this implementation is that it is based on max
> extended sequence number reported via RTCP, which makes it often slow
> to react, could theoretically fail to produce desired outcome (max
> received > X does not guarantee X was fully received and decoded), and
> added a lot of code complexity.
>
> The guarantee of delivery can in fact be accomplished more reliably and
> with less code by making sure to tag each frame until an undiscardable
> frame is sent.
>
> This allows containing the logic fully within RTPSenderVideo.
>
> Bug: webrtc:11340
> Change-Id: I2d1d2b6b67f4f07b8b33336f8fcfcde724243eef
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168221
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30473}

TBR=stefan@webrtc.org

Bug: webrtc:11340
Change-Id: I2fdd0004121b13b96497b21e052359e31d0c477a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168305
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30479}
2020-02-07 08:23:58 +00:00
Erik Språng
632a03c0cd Revert "Remove PlayoutDelayOracle and make RtpSenderVideo guarantee delivery"
This reverts commit 4f68f5398d.

Reason for revert: Breaks downstream project

Original change's description:
> Remove PlayoutDelayOracle and make RtpSenderVideo guarantee delivery
> 
> The PlayoutDelayOracle was responsible for making sure the PlayoutDelay
> header extension was successfully propagated to the receiving side. Once
> it was determined that the receiver had received a frame with the new
> delay tag, it's no longer necessary to propagate.
> 
> The issue with this implementation is that it is based on max
> extended sequence number reported via RTCP, which makes it often slow
> to react, could theoretically fail to produce desired outcome (max
> received > X does not guarantee X was fully received and decoded), and
> added a lot of code complexity.
> 
> The guarantee of delivery can in fact be accomplished more reliably and
> with less code by making sure to tag each frame until an undiscardable
> frame is sent.
> 
> This allows containing the logic fully within RTPSenderVideo.
> 
> Bug: webrtc:11340
> Change-Id: I2d1d2b6b67f4f07b8b33336f8fcfcde724243eef
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168221
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30473}

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

Change-Id: Ide922e680ae36bb69b95e58002482cf5ed57e254
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11340
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168304
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30475}
2020-02-06 16:05:02 +00:00
Erik Språng
4f68f5398d Remove PlayoutDelayOracle and make RtpSenderVideo guarantee delivery
The PlayoutDelayOracle was responsible for making sure the PlayoutDelay
header extension was successfully propagated to the receiving side. Once
it was determined that the receiver had received a frame with the new
delay tag, it's no longer necessary to propagate.

The issue with this implementation is that it is based on max
extended sequence number reported via RTCP, which makes it often slow
to react, could theoretically fail to produce desired outcome (max
received > X does not guarantee X was fully received and decoded), and
added a lot of code complexity.

The guarantee of delivery can in fact be accomplished more reliably and
with less code by making sure to tag each frame until an undiscardable
frame is sent.

This allows containing the logic fully within RTPSenderVideo.

Bug: webrtc:11340
Change-Id: I2d1d2b6b67f4f07b8b33336f8fcfcde724243eef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168221
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30473}
2020-02-06 15:40:49 +00:00
Erik Språng
1e51a388bc Makes padding prefer video SSRCs instead of audio.
Some clients will not count audio packets into the bandwidth estimate
despite negotiating e.g. abs-send-time for that SSRC.
If padding is sent on such an RTP module, we might get stuck in a low
resolution.

This CL works around that by preferring to send padding on video SSRCs.

Bug: webrtc:11196
Change-Id: I1ff503a31a85bc32315006a4f15f8b08e5d4e883
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161941
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30066}
2019-12-11 16:32:14 +00:00
Erik Språng
9cdc9cc1c4 Cleanup of deprecated RTPSender code
Also reformats RtpRtcpImpl::RtpSender by removing _ suffixes from
struct members.

Bug: webrtc:11036
Change-Id: I52cdcdff0727b62673323f64a6dc37d56ba4efbc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158532
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29642}
2019-10-29 10:08:12 +00:00
Erik Språng
77b7529515 Reland "Use RtpSenderEgress directly instead of via RTPSender"
This is a reland of b533010bc6

Patchset 1 is identical to previously landed CL.
Patchset 2 contains a workaround to migrate downstream tests.

Original change's description:
> Use RtpSenderEgress directly instead of via RTPSender
>
> Bug: webrtc:11036
> Change-Id: Ida4e8bc705ae43ceb1b131114707b30d10ba8642
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158521
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29626}

Bug: webrtc:11036
Change-Id: I8054169036a7f9f262308cac59f12ac8f9c73c17
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158531
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29635}
2019-10-28 17:13:30 +00:00
Erik Språng
cff20c2615 Adds protected bitrate helper methods to RtpRtcpImpl
Bug: webrtc:11036
Change-Id: Iac7f79b60b9f4150868e4e2c59c04c6f866011de
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158527
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29631}
2019-10-28 12:52:37 +00:00
Erik Språng
a81e2b4510 Revert "Use RtpSenderEgress directly instead of via RTPSender"
This reverts commit b533010bc6.

Reason for revert: Breaks downstream tests.

Original change's description:
> Use RtpSenderEgress directly instead of via RTPSender
> 
> Bug: webrtc:11036
> Change-Id: Ida4e8bc705ae43ceb1b131114707b30d10ba8642
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158521
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29626}

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

Change-Id: Ib3354f6907d21462a8ad0c37eb8f6e94c48af217
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11036
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158526
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29627}
2019-10-28 11:17:18 +00:00
Erik Språng
b533010bc6 Use RtpSenderEgress directly instead of via RTPSender
Bug: webrtc:11036
Change-Id: Ida4e8bc705ae43ceb1b131114707b30d10ba8642
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158521
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29626}
2019-10-28 10:38:14 +00:00
Erik Språng
a9229043e3 Calls OnPacketsAcknowledged on RtpRtcp instead of RTPSender directly.
This prepares for splitting RtpSenderEgress out of RTPSender.
For context, see:
https://webrtc-review.googlesource.com/c/src/+/158020

Bug: webrtc:11036
Change-Id: I6d385ba255ce23f4c6685a3737eeb243ce2ec6ff
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158201
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29601}
2019-10-24 12:13:56 +00:00
Erik Språng
c06aef2ad1 Reland "Use just a lookup map of RTP modules in PacketRouter"
This is a reland of 96f3de0945
Downstream test is fixed, this is a pure reland.

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

Original change's description:
> Use just a lookup map of RTP modules in PacketRouter
>
> Since SSRCs of RTP modules are now set at construction time, we can
> use just a simple unordered map from SSRC to module in packet router.
>
> Bug: webrtc:11036
> Change-Id: I0b3527f17c9ee2df9253c778e5b9e3651a70b355
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155965
> 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@{#29510}

Bug: webrtc:11036
Change-Id: I0731339dfd0781cc7f2f7ca78ac903539f25ff9c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157304
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29514}
2019-10-17 12:59:39 +00:00
Erik Språng
fbe84ef80f Revert "Use just a lookup map of RTP modules in PacketRouter"
This reverts commit 96f3de0945.

Reason for revert: Downstream test is borked.

Original change's description:
> Use just a lookup map of RTP modules in PacketRouter
> 
> Since SSRCs of RTP modules are now set at construction time, we can
> use just a simple unordered map from SSRC to module in packet router.
> 
> Bug: webrtc:11036
> Change-Id: I0b3527f17c9ee2df9253c778e5b9e3651a70b355
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155965
> 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@{#29510}

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

Change-Id: I31330fd68ab809ff3951573791e9a79b81599958
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11036
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157281
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29511}
2019-10-17 11:17:41 +00:00
Erik Språng
96f3de0945 Use just a lookup map of RTP modules in PacketRouter
Since SSRCs of RTP modules are now set at construction time, we can
use just a simple unordered map from SSRC to module in packet router.

Bug: webrtc:11036
Change-Id: I0b3527f17c9ee2df9253c778e5b9e3651a70b355
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155965
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@{#29510}
2019-10-17 11:06:34 +00:00
Erik Språng
7ea9b8082e Set StreamDataCountersCallback on construction of RTP modules
This CL sets the RTP stats callback on construction, by adding a field
next to the other observers in RtpRtcp::Configuration.
We can then remove the RegisterCallback() methods and the unused
GetCallback() method.

Bug: webrtc:11036
Change-Id: I4eb86ea63b4b2ebeff60b311ddf3bed06b279ce4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157169
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29504}
2019-10-17 07:14:18 +00:00
Per Kjellander
b11c4111f3 Removed unused RTCP methods SendFeedbackPacket and SendNetworkStateEstimate
Bug: webrtc:10742
Change-Id: I179089a7b5ffcfcd93a56c836338872f600599af
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157161
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29498}
2019-10-16 09:26:50 +00:00
Erik Språng
6841d25d45 Reland "RtpRtcp modules and below: Make media, RTX and FEC SSRCs const"
This is a reland of 17608dc459

Downstream test now fixed.
As a precaution, also avoid DCHECKS for non-zero SSRC.
First patch set is reland, second makes checks more lenient.

Original change's description:
> RtpRtcp modules and below: Make media, RTX and FEC SSRCs const
>
> Downstream usage of SetSsrc() / SetRtxSsrc() should now be gone. Let's
> remove them, make the members const, and remove now unnecessary locking.
>
> Bug: webrtc:10774
> Change-Id: Ie4c1b3935508cf329c5553030f740c565d32e04b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155660
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29475}

Bug: webrtc:10774
Change-Id: I540b49a31a31e98d87f02ae04083d5206e71c1b2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157100
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29491}
2019-10-15 14:03:19 +00:00
Sebastian Jansson
f39c815a1d Cleanup: Replacing set extension status bool with CHECK.
This was just checked in all places were it was used, moving the check
into RtpRtcp reduces the boiler plate required at the call sites.

Also changing to always register and unregister extensions by URI to
synchronize the code in AudioSendStream with the code in RtpVideoSender.

This prepares for reducing the scope of ChannelSend.

Bug: webrtc:9883
Change-Id: Ia64d79f20eb98f46cbbbe8318770e4fcf9caa1ec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155620
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29490}
2019-10-15 12:55:46 +00:00
Erik Språng
e8a6bc3f25 Revert "Reland "RtpRtcp modules and below: Make media, RTX and FEC SSRCs const""
This reverts commit c9348218cf.

Reason for revert: Downstream tests are relying on incorrect behavior which this CL explicitly checks...

Original change's description:
> Reland "RtpRtcp modules and below: Make media, RTX and FEC SSRCs const"
> 
> This is a reland of 17608dc459
> 
> Downstream fixed, relanding.
> 
> Original change's description:
> > RtpRtcp modules and below: Make media, RTX and FEC SSRCs const
> >
> > Downstream usage of SetSsrc() / SetRtxSsrc() should now be gone. Let's
> > remove them, make the members const, and remove now unnecessary locking.
> >
> > Bug: webrtc:10774
> > Change-Id: Ie4c1b3935508cf329c5553030f740c565d32e04b
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155660
> > Commit-Queue: Erik Språng <sprang@webrtc.org>
> > Reviewed-by: Niels Moller <nisse@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#29475}
> 
> TBR=nisse@webrtc.org
> 
> Bug: webrtc:10774
> Change-Id: I759bed3ff1909857696c6d1b13df595a5e552f03
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157049
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29486}

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

Change-Id: I168fb3738a04dfdbd1581ddd8c3276ede9f72322
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10774
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157080
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29488}
2019-10-15 11:54:33 +00:00
Erik Språng
c9348218cf Reland "RtpRtcp modules and below: Make media, RTX and FEC SSRCs const"
This is a reland of 17608dc459

Downstream fixed, relanding.

Original change's description:
> RtpRtcp modules and below: Make media, RTX and FEC SSRCs const
>
> Downstream usage of SetSsrc() / SetRtxSsrc() should now be gone. Let's
> remove them, make the members const, and remove now unnecessary locking.
>
> Bug: webrtc:10774
> Change-Id: Ie4c1b3935508cf329c5553030f740c565d32e04b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155660
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29475}

TBR=nisse@webrtc.org

Bug: webrtc:10774
Change-Id: I759bed3ff1909857696c6d1b13df595a5e552f03
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157049
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29486}
2019-10-15 11:42:05 +00:00
Erik Språng
4ed0b52c12 Revert "RtpRtcp modules and below: Make media, RTX and FEC SSRCs const"
This reverts commit 17608dc459.

Reason for revert: Breaks downstream build

Original change's description:
> RtpRtcp modules and below: Make media, RTX and FEC SSRCs const
> 
> Downstream usage of SetSsrc() / SetRtxSsrc() should now be gone. Let's
> remove them, make the members const, and remove now unnecessary locking.
> 
> Bug: webrtc:10774
> Change-Id: Ie4c1b3935508cf329c5553030f740c565d32e04b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155660
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29475}

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

Change-Id: Idc60f26f34dd0456a40c72375ae829e25b28621f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10774
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157046
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29483}
2019-10-15 09:43:21 +00:00
Erik Språng
17608dc459 RtpRtcp modules and below: Make media, RTX and FEC SSRCs const
Downstream usage of SetSsrc() / SetRtxSsrc() should now be gone. Let's
remove them, make the members const, and remove now unnecessary locking.

Bug: webrtc:10774
Change-Id: Ie4c1b3935508cf329c5553030f740c565d32e04b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155660
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29475}
2019-10-15 07:50:59 +00:00
Per Kjellander
16999814e6 Add void::RtcpFeedbackSenderInterface::SendCombinedRtcpPacket
This method sends arbitrary number rtp::RcpPackets into one or more IP packets.
It is implemented both in RtcpTranceiver and in RtpRtcp.

Change-Id: I00424ee2f1730ff98626f768846f4ac1ad864933

BUG: webrtc:10742
Change-Id: I00424ee2f1730ff98626f768846f4ac1ad864933
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156240
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29430}
2019-10-10 12:05:49 +00:00
Niels Möller
834a554962 Include module_common_types.h only where needed
Bug: None
Change-Id: I73d493f8f186b429c7be808f4dfac0398f150931
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153891
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29277}
2019-09-24 08:22:38 +00:00
Erik Språng
4208a13e65 Removes deprecated InsertPacket/TimeToSendPacket/TimeToSendPadding
The methods are no longer in use, this CL cleans away references and
updates any tests using them.

Bug: webrtc:10633
Change-Id: I2db301e0a021a2f85a8b9a74e409303baba407da
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150520
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28956}
2019-08-26 11:55:55 +00:00
Niels Möller
4d7c405599 Split out RtcpCnameCallback from RtcpStatisticsCallback
Cname callback is used only on receive side, and statistics (soon)
only on the send side.

Bug: webrtc:10679
Change-Id: I122e9cafaea93cd0ba75dc955a652d9d4bddc379
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147867
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@{#28767}
2019-08-06 08:29:57 +00:00
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
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
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
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
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