Commit graph

178 commits

Author SHA1 Message Date
Erik Språng
cb4d380ba5 Revert "Refactors UlpFec and FlexFec to use a common interface."
This reverts commit 11af1d7444.

Reason for revert: Possible crash

Original change's description:
> Refactors UlpFec and FlexFec to use a common interface.
> 
> The new VideoFecGenerator is now injected into RtpSenderVideo,
> and generalizes the usage.
> This also prepares for being able to genera FEC in the RTP egress
> module.
> 
> Bug: webrtc:11340
> Change-Id: I8aa873129b2fb4131eb3399ee88f6ea2747155a3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168347
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30515}

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

Change-Id: Iddf112d801621c8a4370b853cee3fa42bf2c7fba
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11340
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168603
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30524}
2020-02-14 13:19:07 +00:00
Erik Språng
11af1d7444 Refactors UlpFec and FlexFec to use a common interface.
The new VideoFecGenerator is now injected into RtpSenderVideo,
and generalizes the usage.
This also prepares for being able to genera FEC in the RTP egress
module.

Bug: webrtc:11340
Change-Id: I8aa873129b2fb4131eb3399ee88f6ea2747155a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168347
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30515}
2020-02-13 13:21:19 +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
Björn Terelius
31d0f7cfca Move packet type enum from RtpPacketToSend to rtp_rtcp_defines.h
This is in preparation of an upcoming CL that will propagate this
information through the TransportFeedbackAdapter.

Bug: webrtc:10932
Change-Id: Ic2a026b5ef72d6bf01e698e7634864fedc659b4e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168220
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30476}
2020-02-06 17:58:39 +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
Danil Chapovalov
629de6f7ed Merge RtpPacket HasExtension and IsExtensionReserved functions
RtpPacket doesn't keep difference between reserved and set extension.

Bug: None
Change-Id: I1c79f4ebd7ba20ae5da0194c3faa418050db7d8e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/166340
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30316}
2020-01-20 11:37:25 +00:00
Ilya Nikolaevskiy
3c78ea4794 Enable FEC protection of packets with VideoTimingExtension
Bug: webrtc:10750
Change-Id: I532283ea51eb40cdeca5ff11be2f71da97058e41
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158899
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29727}
2019-11-07 13:46:19 +00:00
Sebastian Jansson
26452ff7db Cleanup of TransportFeedbackAdapter.
* Removes legacy defines from rtp_rtcp_defines.
* Simplifies the feedback adaptation logic, this is achieved
  by using the ability to preserve lost packets information
  from the RTCP message.
* Extracts in flight data tracking to a separate helper class.
* Removes legacy fields and constructors from the PacketFeedback
  structure.
* Removes the legacy GetTransportFeedbackVector method.

Apart from reducing total LOC, this prepares for moving the adaptation
to run on a TaskQueue.

Bug: webrtc:9883
Change-Id: I5ef4eace0948f119f283cd71dc2b8d0954a1449b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158781
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29674}
2019-11-01 11:55:16 +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
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
fc78aaceea Batches video frame packets when posting to pacer
All plumbing was landed a while ago, but this call site was not updated.
This change aims to reduce contention/overhead when posting large
number of packets to the paced sender.

Bug: webrtc:10809
Change-Id: I5486131b980e55331a38151bceee1cb96e35a942
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158203
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29599}
2019-10-24 12:03:36 +00:00
Erik Språng
671b403304 Split RTPSender into pre- and post-pacer parts.
Post-pacer code now contained in RtpSenderEgress class.
For now, this is a member of RTPSender. More refactoring is needed to
make clean split.

Bug: webrtc:11036
Change-Id: I95264d013de120601784f130ba81c7b234446980
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157172
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29519}
2019-10-17 15:40:15 +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
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
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
Danil Chapovalov
51bf200294 Reduce number of RTPVideoSender::SendVideo parameters
use frame_type from the RTPVideoHeader instead of as an extra parameter
merge payload data and payload size into single argument
pass RTPVideoHeader by value (relying on copy elision)

Bug: None
Change-Id: Ie7970af3b198b83b723d84c7a8b047219c4b38c0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156400
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29445}
2019-10-11 10:59:21 +00:00
Erik Språng
dc34a25ca4 Adds RTPSenderVideo::Config struct with red/ulpfec config
This CL moves the various parameters in the the RTPSenderVideo ctor into
a struct, and adds the red/ulpfec payload types to it.
Once the downstream usage of SetUlpfecConfig() is gone, we can make
those members const and avoid locking in SendVideo().

Bug: webrtc:10809
Change-Id: I9a96ab5b2a4eb2997ebf4a3a3e3cd2eb5715fd79
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155365
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29384}
2019-10-04 14:19:49 +00:00
Erik Språng
ea55b0872f Adds support for passing a vector of packets to the paced sender.
Bug: webrtc:10809
Change-Id: Ib2f7ce9d14ee2ce808ab745ff20baf2761811cfb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155367
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29378}
2019-10-04 08:56:11 +00:00
Erik Språng
6cf554ecb4 Reduces locking in RtpSenderVideo.
This CL removes some unnecessary locking, since we are already
serialized by the lock in VideoStreamEncoder. A simple RaceChecker is
used to verify this.

We also remove the usage of RegisterPayloadType() and replace it with
a parameter in SendVideo instead. This way we are prepared for removing
the payload type map and lock entirely. Some usage still exists
downstream and needs to be removed before cleaning this up.

Bug: webrtc:10809
Change-Id: Ie90163f15d11c8843f3beaf9a0df0dd2a1fd5ce6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/154700
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29372}
2019-10-03 14:23:30 +00:00
Mirko Bonadei
317a1f09ed Use std::make_unique instead of absl::make_unique.
WebRTC is now using C++14 so there is no need to use the Abseil version
of std::make_unique.

This CL has been created with the following steps:

git grep -l absl::make_unique | sort | uniq > /tmp/make_unique.txt
git grep -l absl::WrapUnique | sort | uniq > /tmp/wrap_unique.txt
git grep -l "#include <memory>" | sort | uniq > /tmp/memory.txt

diff --new-line-format="" --unchanged-line-format="" \
  /tmp/make_unique.txt /tmp/wrap_unique.txt | sort | \
  uniq > /tmp/only_make_unique.txt
diff --new-line-format="" --unchanged-line-format="" \
  /tmp/only_make_unique.txt /tmp/memory.txt | \
  xargs grep -l "absl/memory" > /tmp/add-memory.txt

git grep -l "\babsl::make_unique\b" | \
  xargs sed -i "s/\babsl::make_unique\b/std::make_unique/g"

git checkout PRESUBMIT.py abseil-in-webrtc.md

cat /tmp/add-memory.txt | \
  xargs sed -i \
  's/#include "absl\/memory\/memory.h"/#include <memory>/g'
git cl format
# Manual fix order of the new inserted #include <memory>

cat /tmp/only_make_unique | xargs grep -l "#include <memory>" | \
  xargs sed -i '/#include "absl\/memory\/memory.h"/d'

git ls-files | grep BUILD.gn | \
  xargs sed -i '/\/\/third_party\/abseil-cpp\/absl\/memory/d'

python tools_webrtc/gn_check_autofix.py \
  -m tryserver.webrtc -b linux_rel

# Repead the gn_check_autofix step for other platforms

git ls-files | grep BUILD.gn | \
  xargs sed -i 's/absl\/memory:memory/absl\/memory/g'
git cl format

Bug: webrtc:10945
Change-Id: I3fe28ea80f4dd3ba3cf28effd151d5e1f19aff89
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153221
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29209}
2019-09-17 15:47:29 +00:00
Danil Chapovalov
a74e47759e Deprecate legacy RtpHeaderExtensionMap::Register function
Bug: None
Change-Id: Ia27ecf4d316563c5f7693162aedff535855c403b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/152667
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29170}
2019-09-12 17:04:01 +00:00
Danil Chapovalov
16cb1f61c0 Stop using rtc_event.h forward header
Bug: webrtc:10206
Change-Id: I16905ec745673178195d6715fda6175c31500163
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151601
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29149}
2019-09-11 08:20:29 +00:00
Andrei Dumitru
0987273e1d Add option to enable retransmission for all temporal layers in the constructor for rtp_sender_video.
R=nisse@webrtc.org

Change-Id: I09d03af461d7fbe200098fe91845f7b76fab6c4f

Bug: webrtc:10954
Change-Id: I09d03af461d7fbe200098fe91845f7b76fab6c4f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150863
Commit-Queue: Andrei Dumitru <andreidumitru@google.com>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29114}
2019-09-09 15:39:23 +00:00
Danil Chapovalov
59e1464fcd Fix 28 ClangTidy - Readability findings in modules/rtp_rtcp/
These fixes are automatically created by various analysis tools, but have been manually triggered to be applied.
 * the 'empty' method should be used to check for emptiness instead of 'size' (3 times)
 * using decl 'Return' is unused (4 times)
 * using decl '_' is unused (3 times)
 * using decl 'DoAll' is unused (2 times)
 * using decl 'SetArgPointee' is unused
 * using decl 'Dlrr' is unused
 * using decl 'IsEmpty' is unused
 * redundant get() call on smart pointer
 * using decl 'Invoke' is unused (2 times)
 * using decl 'SizeIs' is unused (3 times)
 * using decl 'make_tuple' is unused
 * using decl 'NiceMock' is unused
 * using decl 'SaveArg' is unused (2 times)
 * using decl 'AtLeast' is unused
 * using decl 'ElementsAre' is unused
 * using decl 'Gt' is unused

Bug: None
Change-Id: I97658fb0e94620b8319d7c3da29b15e27ec23188
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151133
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29056}
2019-09-04 07:38:20 +00:00
Tommi
25eb47ccf1 Make the RtpHeaderParserImpl available to tests and tools only.
There are a few reasons for making this test only:
* The code is only used by tests and utilities.
* The pure interface has only a single implementation so an interface isn't really needed.
  (a followup change could remove it altogether)
* The implementation always incorporates locking regardless of how the class gets used.
  See e.g. previous use in the Packet class.
* The implementation is a layer on top of RtpUtility::RtpHeaderParser which is
  sufficient for most production cases.

Change-Id: Ide6d50567cf8ae5127a2eb04cceeb10cf317ec36
Bug: none
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150658
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29010}
2019-08-29 15:56:40 +00:00
Erik Språng
70768f4a8e Remove usage of StorageType enum
Previously the kDontRetransmit value was used to indicate packets that
should not be retransmitted but were put in the RtpPacketHistory anyway
as a temporary storage while waiting for a callback from PacedSender.
Since PacedSender now always owns the delayed packets directly, we can
remove all usage of StorageTye in RtpPacketHistory, and only put
packets there after pacing if RtpPacketToSend::allow_retransmission()
returns true.

Bug: webrtc:10633
Change-Id: I003b76ba43bd87658cc2a39e908fd28ebcd403f7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150521
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28974}
2019-08-27 16:48:33 +00:00
Erik Språng
1fbfecd81f Use a pass-through pacer instead of special-cased pacerless mode
This CL removes the old non-paced code path and instead uses a helper
class to just immediately pass the packet through the same code path as
when an actual pacer is used.

Bug: webrtc:10633
Change-Id: Id9a3ee4719829ad07710f5468e5452aa4bc8570b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150530
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28963}
2019-08-26 20:05:12 +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
Erik Språng
f5815fa6bb Remove WebRTC-Pacer-LegacyPacketReferencing flag and most usage
This flag has been default-off since Jul 24th (m77 branch) and apart
from a bug fixed on Aug 5th, there have been no reports of issues, so
let's remove it and start cleaning away the old code path.

Most of the usage within RtpSender/PacingController and their
respective unit tests are removed with this CL, but there will be
several more to follow.

Bug: webrtc:10633
Change-Id: I1986ccf093434ac8fbd8d6db82a0bb44f50b514e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149838
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28930}
2019-08-21 16:40:55 +00:00
Erik Språng
54d5d2c75b Rename RtpRtcp::Configuration::media_send_ssrc to local_media_ssrc
The name media_send_ssrc makes less sense when used mostly for the
RtcpReceiver functionality.

The old member is still there and used as a fallback. That will be
cleaned away after downstream code is fixed.

Bug: webrtc:10774
Change-Id: I4ec18db76910f31dfe76bc9b137ffe89220d3fa8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149836
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28923}
2019-08-21 09:45:21 +00:00
Erik Språng
60ffc31ae1 Fix potential crash if nack is being processed when media gets disabled
This is a race that can happen if a nack arrives before media is
disabled, but the packet is not processed until after the disabling
is complete.

Bug: webrtc:10633, b/138636698
Change-Id: Ic90462b815163ab58c324e5cdb95c8d199c0b772
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147277
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28718}
2019-07-31 12:28:04 +00:00
Erik Språng
630443aba2 Remove usage of RTPSender::SetSsrc() in unit tests
That method will be retired, but some new tests managed to sneak in
usage again.

Bug: webrtc:10774
Change-Id: I354b4f5193625c8ddc75d54a252360810c3f60c8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146983
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28697}
2019-07-29 11:35:21 +00:00
Steve Anton
2bac7da134 Optimize sending the MID and (R)RID header extensions
These RTP header extensions are used for Unified Plan SDP / BUNDLE and
replace SSRC signaling.

Previously, the RTPSender would attach these header extensions to every
packet when configured. Now, the header extensions will be attached to
every packet until the an RTCP RR is received on that SSRC which
indicates the receiver knows what MID/RID the SSRC is associated with.

This should reduce overhead by 2-4 bytes per packet when the MID header
extension is used and by 4-8 bytes when both header extensions are used.

Bug: webrtc:10078
Change-Id: I5fa3ce28a75224adf11d2792bf4ff8dc76e46d99
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146480
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28685}
2019-07-25 19:23:14 +00:00
Erik Språng
aa59eca891 Move RtpPacketSender and merge it with RtpPacketPacer.
This interface is intended to only handle packet-sending parts of the
paced sender.

See https://webrtc-review.googlesource.com/c/src/+/145212 for context

Bug: webrtc:10809
Change-Id: I93f0b40e1865665c2d436db67021350a0ed0687b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145216
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28662}
2019-07-24 13:28:21 +00:00
Erik Språng
6cacef2402 Reset packet history on ssrc/seqno reset
If the SSRC of an RTP module is changed at runtime, we may get conflicts
with packets already there. Eg:
* Put seq# 123 in the history for SSRC 1.
* Change the SSRC to 2.
* Send a NACK for seq# 123 from SSRC 2.

Currently, we will respond with the packet belonging to SSRC 1 (and not
if the NACK specifies SSRC 1, to boot).

We can gen similar issues if the sequence number is changed, where
half frame are left in the buffer.

In these cases, the stream is likely being reset so we should just
clear the packet history too.

Bug: webrtc:10794
Change-Id: I28147c2532cf1c78840d4808c4366d4a647541f7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145729
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28658}
2019-07-24 12:52:23 +00:00
Erik Språng
a57711c941 Fix issue with TransmissionOffset using new pacer code path
This CL fixes two issues related to the TransmissionOffset header
extension and the new (not yet active) pacer mode.

Previously capture time (if unset) would be populated when put into the
packet history before entering the pacer. Since the pacer now owns the
packets, this does not occur until packet is actually sent, if at all.
Capture has really nothing to do with the packet history, this should
be set by the RtpSender pre-pacing instead.

Furthermore, for retransmissions the old path would take the capture
time from the original packet, build the RTX-wrapped retransmission and
set the toffset extension of the RTX packet using that captured capture
time. Since RTX packets are now fully built before the pacer, this does
not work, and we need to transfer the capture time from the original to
the RTX packet instead.

Bug: webrtc:10633
Change-Id: I031e8b6cc4ab20fb094dbd46720829b78951e7f9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146218
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28657}
2019-07-24 11:24:57 +00:00
Erik Språng
21f2fc9c73 Remove the non-useful rtx payload padding option
This CL removes the field trial left in place as a kill-switch in case
there were any regressions related to selecting payload padding based
on the likelihood of being useful instead of matching size.

It also removes the functionality that was only enabled with the
kill-switch active.

The feature has been default-on since June 23rd 2019:
https://webrtc.googlesource.com/src.git/+/214f54365ec210db76218a35ead66c9ce23e068e

Since we have not observed any issues, let's clean this code up.

Bug: webrtc:8975
Change-Id: I7f49fe354227b3f6566a250332e56b6d70fe2f09
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145821
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28616}
2019-07-19 11:19:18 +00:00
Erik Språng
0f6191d227 RtpSender::GeneratePadding() fixes for new PacedSender code path
This CL fixes two things related to the (not yet active) new
PacedSender code path:

1. Make sure BWE header extensions are properly populated for all
   padding packets.
2. When generating padding, don't hold the RtpSender critsect when
   accessing the RtpPacketHistory as this may lead to a lock order
   inversion.

Bug: webrtc:10633
Change-Id: I8650fbf5dafddbeae61837d2137338163e1c48ce
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145723
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28613}
2019-07-19 10:58:34 +00:00
Mirko Bonadei
a7e3bcebae Reland "Make new pacer padding more like old one"
This reverts commit 11820502b8.

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

Original change's description:
> Revert "Make new pacer padding more like old one"
> 
> This reverts commit bb7727211c.
> 
> Reason for revert: Speculative revert (some perf test are failing)
> 
> Original change's description:
> > Make new pacer padding more like old one
> > 
> > The (currently unused) new pacer code path was implemented with what
> > was intended as a more careful padding strategy.
> > Unfortunately this doesn't work as well as expected due to the fact
> > that the padding budget cannot build up underuse.
> > 
> > I made another CL that could fix that, but I think it adds complexity
> > for dubious gains. It also will make it more difficult to find any
> > potential regression when switching to the new path, should one occur.
> > See https://webrtc-review.googlesource.com/c/src/+/144563
> > 
> > Therefore, this CL makes the new code path choose RTX payload in the
> > same way as is currently done.
> > 
> > Bug: webrtc:10633
> > Change-Id: If2115d4fa7463add959faa77c63101286c27e0f5
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145202
> > Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> > Commit-Queue: Erik Språng <sprang@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#28537}
> 
> TBR=sprang@webrtc.org,stefan@webrtc.org
> 
> Change-Id: I99b72858414e0a245da596d94694449da88fd626
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:10633
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145324
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28550}

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

Change-Id: I1fff79d75dc888921c6fbfc7f3980395a67e1c1a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10633
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145403
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28565}
2019-07-12 17:36:17 +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
Mirko Bonadei
11820502b8 Revert "Make new pacer padding more like old one"
This reverts commit bb7727211c.

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

Original change's description:
> Make new pacer padding more like old one
> 
> The (currently unused) new pacer code path was implemented with what
> was intended as a more careful padding strategy.
> Unfortunately this doesn't work as well as expected due to the fact
> that the padding budget cannot build up underuse.
> 
> I made another CL that could fix that, but I think it adds complexity
> for dubious gains. It also will make it more difficult to find any
> potential regression when switching to the new path, should one occur.
> See https://webrtc-review.googlesource.com/c/src/+/144563
> 
> Therefore, this CL makes the new code path choose RTX payload in the
> same way as is currently done.
> 
> Bug: webrtc:10633
> Change-Id: If2115d4fa7463add959faa77c63101286c27e0f5
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145202
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28537}

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

Change-Id: I99b72858414e0a245da596d94694449da88fd626
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10633
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145324
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28550}
2019-07-12 08:33:35 +00:00
Erik Språng
bb7727211c Make new pacer padding more like old one
The (currently unused) new pacer code path was implemented with what
was intended as a more careful padding strategy.
Unfortunately this doesn't work as well as expected due to the fact
that the padding budget cannot build up underuse.

I made another CL that could fix that, but I think it adds complexity
for dubious gains. It also will make it more difficult to find any
potential regression when switching to the new path, should one occur.
See https://webrtc-review.googlesource.com/c/src/+/144563

Therefore, this CL makes the new code path choose RTX payload in the
same way as is currently done.

Bug: webrtc:10633
Change-Id: If2115d4fa7463add959faa77c63101286c27e0f5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145202
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28537}
2019-07-11 14:44:09 +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
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
Ilya Nikolaevskiy
2d821c3cbc Allow VideoTimingExtension to be used with FEC
This CL allows for FEC protection of packets with VideoTimingExtension by
zero-ing out data, which is changed after FEC protection is generated (i.e
in the pacer or by the SFU).

Actual FEC protection of these packets would be enabled later, when all
modern receivers have this change.

Bug: webrtc:10750
Change-Id: If4785392204d68cb8527629727b5c062f9fb6600
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143760
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28396}
2019-06-27 07:38:49 +00:00
Erik Språng
59b8654045 Switch from RtpPacketSender to RtpPacketPacer interface usage.
RtpPacketSender interface will be removed when downstream projects have
been updated.

Bug: webrtc:10633
Change-Id: Ie127b9814f39bd213d00ded0f7b98380f2f01084
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143175
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28350}
2019-06-24 10:46:06 +00:00
Erik Språng
214f54365e Make useful padding the default.
This CL also improves test coverage and fixes an issue where the
(until now) unused code path for useful padding did not respect the
lower bound packet sizes.

Bug: webrtc:8975
Change-Id: I065745ca7ac9f7098d796c6a015cd96f052ee94f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/142801
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28343}
2019-06-23 11:05:50 +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
Elad Alon
a0e9943ca6 Negotiation of LNTF controls instantiation of RTPSenderVideo::rtp_sequence_number_map_
Bug: webrtc:10662
Change-Id: I9e6b8636d915646c2a822599f5b1735494429ab9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138217
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28059}
2019-05-24 13:02:06 +00:00
Mirta Dvornicic
fe68daab97 Add option to configure raw RTP packetization per payload type.
Bug: webrtc:10625
Change-Id: I699f61af29656827eccb3c4ed507b4229dee972a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137803
Commit-Queue: Mirta Dvornicic <mirtad@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28036}
2019-05-23 12:38:16 +00:00
Henrik Boström
9fe1834d5d Implement RTCOutboundRtpStreamStats.totalPacketSendDelay for video.
This is a standardized metric. Spec:
https://w3c.github.io/webrtc-stats/#dom-rtcoutboundrtpstreamstats-totalpacketsenddelay

It is meant to replace the legacy googBucketDelay. The average
packet delay over any interval can be calculated as the delta
totalPacketSendDelay divided by the delta packetsSent between two
calls to getStats().

Bug: webrtc:10506
Change-Id: I3d6c6d66e5a06937d0ea8d182a82cd255084ad19
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137044
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27979}
2019-05-17 18:53:20 +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
0f4f055ca6 Don't remove or retransmit packets in the pacer queue.
The main purpose right now of this CL is to avoid the situation
where multiple retransmissions are queued for sending (normally after
network glitch with increased pacer queue length), and some of those
fail sending because the can't be retrieved from the packet history
due to too short time since last sent.

Bug: webrtc:8975, webrtc:10607
Change-Id: I9f6369d83f0b8208e5f57b2dc2fd3f2db7c6fea1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135164
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27884}
2019-05-08 18:28:24 +00:00
Erik Språng
30a276b5d7 Add RTP sequence number to TransportFeedbackObserver::AddPacket()
With this change, both the normal RTP and the transport-wide sequence
numbers are propagated with with AddPacket() call via a new
RtpPacketSendInfo struct, replacing the previous set of parameters.

The intent with this is that SendTimeHistory can hold a mapping from
transport-wide to rtp sequence numbers, and then via callbacks let the
RTP modules know when packets have been received by the remote end.

Bug: webrtc:8975
Change-Id: I6a24fc6282cbb041393752d39593c2867b242192
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133021
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27708}
2019-04-23 11:02:56 +00:00
Mirko Bonadei
6a489f22c7 Fully qualify googletest symbols.
Semi-automatically created with:

git grep -l " testing::" | xargs sed -i "s/ testing::/ ::testing::/g"
git grep -l "(testing::" | xargs sed -i "s/(testing::/(::testing::/g"
git cl format

After this, two .cc files failed to compile and I have fixed them
manually.

Bug: webrtc:10523
Change-Id: I4741d3bcedc831b6c5fdc04485678617eb4ce031
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132018
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27526}
2019-04-09 17:18:20 +00:00
Niels Möller
8f7ce222e7 Make VideoFrameType an enum class, and move to separate file and target
Bug: webrtc:5876, webrtc:6883
Change-Id: I1435cfa9e8e54c4ba2978261048ff3fbb993ce0e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126225
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27239}
2019-03-22 12:44:51 +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
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
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
Elad Alon
ccb9b759c5 Create version 01 of Generic Frame Descriptor - with discardability flag
The discardability flag denotes whether the frame may be dropped by
the decoder with no effect on the decodability of subsequent frames.

Bug: webrtc:10214
Change-Id: I3654951d8863b50effe9670b8d1d7eb051240039
Reviewed-on: https://webrtc-review.googlesource.com/c/122241
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26763}
2019-02-20 10:31:58 +00:00
Elad Alon
d8d3248d95 Reland "Delete test/constants.h"
This reverts commit 4f36b7a478.

Reason for revert: Failing tests fixed.

Original change's description:
> Revert "Delete test/constants.h"
>
> This reverts commit 389b1672a3.
>
> Reason for revert: Causes failure (and empty result list) in CallPerfTest.PadsToMinTransmitBitrate
>
> Original change's description:
> > Delete test/constants.h
> >
> > It's not possible to use constants.h for all RTP extensions
> > after the number of extensions exceeds 14, which is the maximum
> > number of one-byte RTP extensions. This is because some extensions
> > would have to be assigned a number greater than 14, even if the
> > test only involves 14 extensions or less.
> >
> > For uniformity's sake, this CL also edits some files to use an
> > enum as the files involved in this CL, rather than free-floating
> > const-ints.
> >
> > Bug: webrtc:10288
> > Change-Id: Ib5e58ad72c4d3756f4c4f6521f140ec59617f3f5
> > Reviewed-on: https://webrtc-review.googlesource.com/c/123048
> > Commit-Queue: Elad Alon <eladalon@webrtc.org>
> > Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#26728}
>
> TBR=danilchap@webrtc.org,kwiberg@webrtc.org,eladalon@webrtc.org,sprang@webrtc.org
>
> Bug: webrtc:10288, chromium:933127
> Change-Id: If1de0bd8992137c52bf0b877b3cb0a2bafc809d4
> Reviewed-on: https://webrtc-review.googlesource.com/c/123381
> Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
> Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26744}

TBR=danilchap@webrtc.org,oprypin@webrtc.org,kwiberg@webrtc.org,eladalon@webrtc.org,sprang@webrtc.org

Change-Id: I65e391325d3a6df6db3c0739185e2002e70fb954
Bug: webrtc:10288, chromium:933127
Reviewed-on: https://webrtc-review.googlesource.com/c/123384
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26750}
2019-02-19 08:51:20 +00:00
Oleh Prypin
4f36b7a478 Revert "Delete test/constants.h"
This reverts commit 389b1672a3.

Reason for revert: Causes failure (and empty result list) in CallPerfTest.PadsToMinTransmitBitrate

Original change's description:
> Delete test/constants.h
>
> It's not possible to use constants.h for all RTP extensions
> after the number of extensions exceeds 14, which is the maximum
> number of one-byte RTP extensions. This is because some extensions
> would have to be assigned a number greater than 14, even if the
> test only involves 14 extensions or less.
>
> For uniformity's sake, this CL also edits some files to use an
> enum as the files involved in this CL, rather than free-floating
> const-ints.
>
> Bug: webrtc:10288
> Change-Id: Ib5e58ad72c4d3756f4c4f6521f140ec59617f3f5
> Reviewed-on: https://webrtc-review.googlesource.com/c/123048
> Commit-Queue: Elad Alon <eladalon@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26728}

TBR=danilchap@webrtc.org,kwiberg@webrtc.org,eladalon@webrtc.org,sprang@webrtc.org

No-Presubmit: True
Bug: webrtc:10288, chromium:933127
Change-Id: If1de0bd8992137c52bf0b877b3cb0a2bafc809d4
Reviewed-on: https://webrtc-review.googlesource.com/c/123381
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26744}
2019-02-18 18:09:22 +00:00
Elad Alon
389b1672a3 Delete test/constants.h
It's not possible to use constants.h for all RTP extensions
after the number of extensions exceeds 14, which is the maximum
number of one-byte RTP extensions. This is because some extensions
would have to be assigned a number greater than 14, even if the
test only involves 14 extensions or less.

For uniformity's sake, this CL also edits some files to use an
enum as the files involved in this CL, rather than free-floating
const-ints.

Bug: webrtc:10288
Change-Id: Ib5e58ad72c4d3756f4c4f6521f140ec59617f3f5
Reviewed-on: https://webrtc-review.googlesource.com/c/123048
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26728}
2019-02-17 21:47:41 +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
e7b9e6b17d Move RtpSenderVideo tests to separate file.
Also refactor most of the RtpSender tests to not use the frame-level
method RTPSender::SendOutgoingData.

Bug: webrtc:7135
Change-Id: I9b0af6aa45e9b908d8197e48b143fede7e2804c7
Reviewed-on: https://webrtc-review.googlesource.com/c/121461
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26577}
2019-02-06 18:00:39 +00:00
Niels Möller
bb87f8a4a4 Delete unused/unsupported RetransmissionMode constants
Configurability via SetSelectiveRetransmissions was deleted in
https://webrtc-review.googlesource.com/c/119920.

Delete constants kRetransmitFECPackets and kRetransmitAllPackets,
which are never enabled in production code. Also move the declaration
of RetransmissionMode from rtp_rtcp_defines.h to rtp_sender_video.h,
to reduce visibility to applications.

Bug: None
Change-Id: I70dcf7532aa3415a2449d8d807c500c1f149bf6d
Reviewed-on: https://webrtc-review.googlesource.com/c/120053
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26570}
2019-02-06 14:19:09 +00:00
Niels Möller
a34d7766c5 Move RtpSenderAudioTest to its own file
Update RtpSenderAudioTest to call methods on RTPSenderAudio rather
than RTPSender, when possible. In particular, avoid
RTPSender::SendOutgoingData. Drop parameterization on the
WebRTC-SendSideBwe-WithOverhead field trial, since that appears
unrelated to these tests.

Also delete some unused parts of the RtpSender test.

Bug: webrtc:7135
Change-Id: I535bf48bb1720e2727f4a62fa3e49b2bb84394a0
Reviewed-on: https://webrtc-review.googlesource.com/c/120920
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26516}
2019-02-01 15:15:56 +00:00
Mirko Bonadei
c84f661b10 Stop using Googletest legacy APIs.
Googletest recently started replacing the term Test Case by Test Suite.
From now on, the preferred API is TestSuite*; the older TestCase* API
will be slowly deprecated.

This CL moves WebRTC to the new set of APIs.

More info in [1].

This CL has been generated with this script:

declare -A items
items[TYPED_TEST_CASE]=TYPED_TEST_SUITE
items[TYPED_TEST_CASE_P]=TYPED_TEST_SUITE_P
items[REGISTER_TYPED_TEST_CASE_P]=REGISTER_TYPED_TEST_SUITE_P
items[INSTANTIATE_TYPED_TEST_CASE_P]=INSTANTIATE_TYPED_TEST_SUITE_P
items[INSTANTIATE_TEST_CASE_P]=INSTANTIATE_TEST_SUITE_P
for i in "${!items[@]}"
do
  git ls-files | xargs sed -i "s/\b$i\b/${items[$i]}/g"
done
git cl format

[1] - https://github.com/google/googletest/blob/master/googletest/docs/primer.md#beware-of-the-nomenclature

Bug: None
Change-Id: I5ae191e3046caf347aeee01554d5743548ab0e3f
Reviewed-on: https://webrtc-review.googlesource.com/c/118701
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26494}
2019-01-31 13:23:33 +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
8a40edd802 Delete constant RTP_PAYLOAD_NAME_SIZE
Followup to cl https://webrtc-review.googlesource.com/c/src/+/119661

Bug: webrtc:6883
Change-Id: Ie3a06f7381a73b16fc5e7cd22366997cc95608ac
Reviewed-on: https://webrtc-review.googlesource.com/c/119760
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26398}
2019-01-25 07:59:52 +00:00
Niels Möller
3ea55d56eb Reland "Delete RtpUtility::Payload, and refactor RTPSender to not use it"
This is a reland of 171df93262

Original change's description:
> Delete RtpUtility::Payload, and refactor RTPSender to not use it
>
> Replaced by a payload type --> video codec map in RTPSenderVideo,
> where it is used to select the right packetizer.
>
> Bug: webrtc:6883
> Change-Id: I43a635d5135c5d519df860a2f4287a4478870b0f
> Reviewed-on: https://webrtc-review.googlesource.com/c/119263
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26380}

Tbr: danilchap@webrtc.org
Bug: webrtc:6883
Change-Id: I30771b86bbe50de609353e23e80dc532dc884ad4
Reviewed-on: https://webrtc-review.googlesource.com/c/119661
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26394}
2019-01-24 16:35:00 +00:00
Artem Titov
81d4bf7af6 Revert "Delete RtpUtility::Payload, and refactor RTPSender to not use it"
This reverts commit 171df93262.

Reason for revert: Breaks downstream project

Original change's description:
> Delete RtpUtility::Payload, and refactor RTPSender to not use it
> 
> Replaced by a payload type --> video codec map in RTPSenderVideo,
> where it is used to select the right packetizer.
> 
> Bug: webrtc:6883
> Change-Id: I43a635d5135c5d519df860a2f4287a4478870b0f
> Reviewed-on: https://webrtc-review.googlesource.com/c/119263
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26380}

TBR=danilchap@webrtc.org,brandtr@webrtc.org,nisse@webrtc.org

Change-Id: I76489c29541827aaba72515a76db54bdb7495e28
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:6883
Reviewed-on: https://webrtc-review.googlesource.com/c/119640
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26385}
2019-01-24 12:02:12 +00:00
Niels Möller
171df93262 Delete RtpUtility::Payload, and refactor RTPSender to not use it
Replaced by a payload type --> video codec map in RTPSenderVideo,
where it is used to select the right packetizer.

Bug: webrtc:6883
Change-Id: I43a635d5135c5d519df860a2f4287a4478870b0f
Reviewed-on: https://webrtc-review.googlesource.com/c/119263
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26380}
2019-01-24 10:47:21 +00:00
Erik Språng
f93eda1705 Move some video codec constants to separate file.
kMaxSimulcastStreams, kMaxSpatialLayers and kMaxTemporalStreams don't
really beling on VideoBitrateAllocation.
common_types.h is going away and it feels dubious to requrie include
of the full VideoEncoder api to use them. Therefore moving them into a
seprate file/target.

Also includes some remaining cleanup of includes.

Bug: webrtc:9271
Change-Id: I7ded3d97a9a835ac756159700774445a2b93a697
Reviewed-on: https://webrtc-review.googlesource.com/c/117305
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26299}
2019-01-17 15:29:53 +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
Danil Chapovalov
af52b68116 Populate VideoSendTime extension network2 field when configured
before this CL it was only configured when pacer is used.
This CL sets it also when pacer is not used.

Move block for setting TransmissionOffset/AbsoluteTime extensions after pacer_ check
to stress in pacer case there are set(overwritten) in another function.

Bug: None
Change-Id: I06a6dd6ec689a25439a75b3baa71340535cd1ff8
Reviewed-on: https://webrtc-review.googlesource.com/c/112126
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25794}
2018-11-27 10:54:40 +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
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
Johannes Kron
4a8a5e7db1 Reland "Second reland of "Optimize execution time of RTPSender::UpdateDelayStatistics""
This reverts commit 8b7bc5d701.

Reason for revert: Slow RTC_DCHECK has been removed.

Original change's description:
> Revert "Second reland of "Optimize execution time of RTPSender::UpdateDelayStatistics""
>
> This reverts commit 9def3b45ef.
>
> Reason for revert: webrtc_perf_tests fails on Mac-10.12.
>
> Original change's description:
> > Second reland of "Optimize execution time of RTPSender::UpdateDelayStatistics"
> >
> > The reland has a lot of additional DCHECKS for easier debugging,
> > so in debug builds it will actually be a ~2x slowdown compared to the old code.
> > The excessive DCHECKS should be removed in a followup CL.
> >
> > Bug: webrtc:9439
> > Change-Id: I8389cd84f1ca12c29cc6993f0d2cf7e6d7dd8379
> > Reviewed-on: https://webrtc-review.googlesource.com/101761
> > Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> > Reviewed-by: Björn Terelius <terelius@webrtc.org>
> > Commit-Queue: Johannes Kron <kron@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#24821}
>
> TBR=terelius@webrtc.org,asapersson@webrtc.org,kron@webrtc.org
>
> Change-Id: I98c4c96d552858d0299d49993e9b9be6a6204dfe
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:9439
> Reviewed-on: https://webrtc-review.googlesource.com/101860
> Reviewed-by: Johannes Kron <kron@webrtc.org>
> Commit-Queue: Johannes Kron <kron@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24825}

TBR=terelius@webrtc.org,asapersson@webrtc.org,kron@webrtc.org

Change-Id: I260c56932710d26f9d7201c07279fef8d2150bd9
Bug: webrtc:9439
Reviewed-on: https://webrtc-review.googlesource.com/102000
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Johannes Kron <kron@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24843}
2018-09-26 09:45:25 +00:00
Danil Chapovalov
84ffb35e74 Use minimalistic vp8 descriptor when generic descriptor is in use
which saves up to 5 bytes per packet.

Bug: webrtc:9361
Change-Id: Ia4335459fb2bd6390950ddd1d487a0f9f96f743d
Reviewed-on: https://webrtc-review.googlesource.com/101840
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24838}
2018-09-25 18:05:52 +00:00
Johannes Kron
8b7bc5d701 Revert "Second reland of "Optimize execution time of RTPSender::UpdateDelayStatistics""
This reverts commit 9def3b45ef.

Reason for revert: webrtc_perf_tests fails on Mac-10.12.

Original change's description:
> Second reland of "Optimize execution time of RTPSender::UpdateDelayStatistics"
> 
> The reland has a lot of additional DCHECKS for easier debugging,
> so in debug builds it will actually be a ~2x slowdown compared to the old code.
> The excessive DCHECKS should be removed in a followup CL.
> 
> Bug: webrtc:9439
> Change-Id: I8389cd84f1ca12c29cc6993f0d2cf7e6d7dd8379
> Reviewed-on: https://webrtc-review.googlesource.com/101761
> Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Commit-Queue: Johannes Kron <kron@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24821}

TBR=terelius@webrtc.org,asapersson@webrtc.org,kron@webrtc.org

Change-Id: I98c4c96d552858d0299d49993e9b9be6a6204dfe
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9439
Reviewed-on: https://webrtc-review.googlesource.com/101860
Reviewed-by: Johannes Kron <kron@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24825}
2018-09-25 12:05:39 +00:00
Johannes Kron
9def3b45ef Second reland of "Optimize execution time of RTPSender::UpdateDelayStatistics"
The reland has a lot of additional DCHECKS for easier debugging,
so in debug builds it will actually be a ~2x slowdown compared to the old code.
The excessive DCHECKS should be removed in a followup CL.

Bug: webrtc:9439
Change-Id: I8389cd84f1ca12c29cc6993f0d2cf7e6d7dd8379
Reviewed-on: https://webrtc-review.googlesource.com/101761
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24821}
2018-09-25 10:20:21 +00:00
philipel
b3e42a4948 Write and parse the generic video descriptor.
Bug: webrtc:9361
Change-Id: Id129a6ab7a86641c6e80827458ef0c40c5640855
Reviewed-on: https://webrtc-review.googlesource.com/99542
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24718}
2018-09-13 09:00:50 +00:00
Philip Eliasson
d52a1a6971 Reland "Remove RTPVideoHeader::vp8() accessors."
This reverts commit 1811c04f22.

Reason for revert: Downstream projects fixed.

Original change's description:
> Revert "Remove RTPVideoHeader::vp8() accessors."
> 
> This reverts commit af7afc6642.
> 
> Reason for revert: Break downstream projects.
> 
> Original change's description:
> > Remove RTPVideoHeader::vp8() accessors.
> > 
> > Bug: none
> > Change-Id: Ia7d65148fb36a8f26647bee8a876ce7217ff8a68
> > Reviewed-on: https://webrtc-review.googlesource.com/93321
> > Reviewed-by: Niels Moller <nisse@webrtc.org>
> > Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> > Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> > Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#24626}
> 
> TBR=danilchap@webrtc.org,nisse@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,philipel@webrtc.org,holmer@google.com
> 
> Change-Id: I3f7f19c0ea810c0fd988c59e6556bbea9b756b33
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: none
> Reviewed-on: https://webrtc-review.googlesource.com/98864
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24628}

TBR=danilchap@webrtc.org,nisse@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,philipel@webrtc.org,holmer@google.com

Change-Id: I9246f36e638108ae4fc46c1ae4559c8205d50fc1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: none
Reviewed-on: https://webrtc-review.googlesource.com/98841
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24629}
2018-09-07 13:04:07 +00:00
Philip Eliasson
1811c04f22 Revert "Remove RTPVideoHeader::vp8() accessors."
This reverts commit af7afc6642.

Reason for revert: Break downstream projects.

Original change's description:
> Remove RTPVideoHeader::vp8() accessors.
> 
> Bug: none
> Change-Id: Ia7d65148fb36a8f26647bee8a876ce7217ff8a68
> Reviewed-on: https://webrtc-review.googlesource.com/93321
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24626}

TBR=danilchap@webrtc.org,nisse@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,philipel@webrtc.org,holmer@google.com

Change-Id: I3f7f19c0ea810c0fd988c59e6556bbea9b756b33
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: none
Reviewed-on: https://webrtc-review.googlesource.com/98864
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24628}
2018-09-07 12:36:17 +00:00
philipel
af7afc6642 Remove RTPVideoHeader::vp8() accessors.
Bug: none
Change-Id: Ia7d65148fb36a8f26647bee8a876ce7217ff8a68
Reviewed-on: https://webrtc-review.googlesource.com/93321
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24626}
2018-09-07 12:01:19 +00:00
Rasmus Brandt
260b4151c8 Revert "Reland "Optimize execution time of RTPSender::UpdateDelayStatistics""
This reverts commit 7bcd2a98be.

Reason for revert: peerconnection_unittests fails on downstream test runner.

Original change's description:
> Reland "Optimize execution time of RTPSender::UpdateDelayStatistics"
> 
> The reland has a lot of additional DCHECKS for easier debugging,
> so in debug builds it will actually be a ~2x slowdown compared to the old code.
> The excessive DCHECKS should be removed in a followup CL.
> 
> Bug: webrtc:9439
> Change-Id: I493de337bf20c998aa32c2532212cac85c5517fb
> Reviewed-on: https://webrtc-review.googlesource.com/96641
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24501}

TBR=terelius@webrtc.org,asapersson@webrtc.org,philipel@webrtc.org

Change-Id: Ia48444d2a7647cf826ef93b4720f6d7ff9a712c3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9439
Reviewed-on: https://webrtc-review.googlesource.com/96960
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24502}
2018-08-30 15:24:47 +00:00
Bjorn Terelius
7bcd2a98be Reland "Optimize execution time of RTPSender::UpdateDelayStatistics"
The reland has a lot of additional DCHECKS for easier debugging,
so in debug builds it will actually be a ~2x slowdown compared to the old code.
The excessive DCHECKS should be removed in a followup CL.

Bug: webrtc:9439
Change-Id: I493de337bf20c998aa32c2532212cac85c5517fb
Reviewed-on: https://webrtc-review.googlesource.com/96641
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24501}
2018-08-30 14:42:02 +00:00