Commit graph

97 commits

Author SHA1 Message Date
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
Danil Chapovalov
443f26695f Cleanup RtcpReceiver tests
update MOCK_METHODs to use new syntax recommended in go/totw/164
Replace fixture with struct of mocks.
Use main method under test (IncomingPacket) directly rather than through fixture helpers

minor cleanup of the RtcReceiver itself:
make IncomingPacket function more friendly to containers,
mark class as final to verify ability to inherit from it is not used and
thus destructor doesn't need to be virtual.

Bug: None
Change-Id: I346e7dc513b1fbe663ebe5858dec7df0520416a7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170226
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30765}
2020-03-11 15:15:14 +00:00
Erik Språng
f87536c9de Reland "Reland "Refactors UlpFec and FlexFec to use a common interface.""
This is a reland of 49734dc0fa

Patchset 2 contains a fix for the fuzzer set up. Since we now parse
an RtpPacket out of the fuzzer data, the header needs to be correct,
otherwise we fail before even reaching the FEC code that we actually
want to test.

Bug: webrtc:11340, chromium:1052323, chromium:1055974
TBR=stefan@webrtc.org

Original change's description:
> Reland "Refactors UlpFec and FlexFec to use a common interface."
>
> This is a reland of 11af1d7444
>
> 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}
>
> Bug: webrtc:11340, chromium:1052323
> Change-Id: Id646047365f1c46cca9e6f3e8eefa5151207b4a0
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168608
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30593}

Bug: webrtc:11340, chromium:1052323
Change-Id: Ib8925f44e2edfcfeadc95c845c3bfc23822604ed
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169222
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30724}
2020-03-09 13:41:35 +00:00
Erik Språng
c310889ec7 Revert "Reland "Refactors UlpFec and FlexFec to use a common interface.""
This reverts commit 49734dc0fa.

Reason for revert: Still something wrong with ulpfec fuzzer setup.

Original change's description:
> Reland "Refactors UlpFec and FlexFec to use a common interface."
> 
> This is a reland of 11af1d7444
> 
> 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}
> 
> Bug: webrtc:11340, chromium:1052323
> Change-Id: Id646047365f1c46cca9e6f3e8eefa5151207b4a0
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168608
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30593}

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

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

Bug: webrtc:11340, chromium:1052323
Change-Id: I920ce0a48a08768d7a98a563e2b66bd6eb8602b7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169121
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30616}
2020-02-26 09:37:31 +00:00
Erik Språng
49734dc0fa Reland "Refactors UlpFec and FlexFec to use a common interface."
This is a reland of 11af1d7444

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}

Bug: webrtc:11340, chromium:1052323
Change-Id: Id646047365f1c46cca9e6f3e8eefa5151207b4a0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168608
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30593}
2020-02-24 14:20:27 +00:00
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
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
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
Erik Språng
c15f92aceb Cleanup, remove media_send_ssrc field
Bug: webrtc:10774
Change-Id: I007c969a5d275f83676a4c733d605b7351ea30f9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149819
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28962}
2019-08-26 16:49:05 +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
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
a72d583271 Fix for potential out of bounds reading in rtcp::RemoteEstimate parser.
packet_size() includes the size of padding, this means that the size
check might incorrectly not trigger even if the payload is empty. In
turn this means that the ReadBigEndian call might read out of bounds
memory.

Refactored the code to reuse the App parsing code more, eliminating
the risk of this particular kind of error.

Bug: chromium:987507
Change-Id: Id8f3e292c3d30460d3cdb551f0a45070fdf8f022
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146716
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28680}
2019-07-25 10:54:05 +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
3b67672af7 Reland "Pass RtpRtcp::Configuration to RtcpReceiver ctor and initialize ssrcs"
This reverts commit 4d68314ec8.

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

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

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

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

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

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

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

Change-Id: I877c1e4c025717c3392bce96ef31591dc1ef5f0b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10774
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145325
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28551}
2019-07-12 08:36:48 +00:00
Erik Språng
741b96b175 Pass RtpRtcp::Configuration to RtcpReceiver ctor and initialize ssrcs
Bug: webrtc:10774
Change-Id: Iaae717ed1b7373d5cb2246e3ba92fc6ace422b41
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145206
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28536}
2019-07-11 12:39:17 +00:00
Henrik Boström
f204787478 ReportBlockData and observer added, for stats collection in future CLs.
The ReportBlockData contains information about a ReportBlock and
additional data such as RTT. This will be used for the calculation of
RTCRemoteInboundRtpStreamStats, see full picture here:
https://webrtc-review.googlesource.com/c/src/+/134107

ReportBlockData is a class version of the previously internal struct
RTCPReceiver::ReportBlockWithRtt.
- The new name makes sense even if we add more info to it, which will
  be needed for future metrics.
- The new location is modules/rtp_rtcp/include/report_block_data.h.

The RTCPReceiver allows obtaining the ReportBlockData in two ways:
1. Using a ReportBlockDataObserver that is notified on receiving a
   report block.
2. Using the GetLatestReportBlockData().

Both codepaths will be needed; video stats uses observers and audio
stats uses polling.

Further plumbing will be done in follow-up CLs.

Bug: webrtc:10455, webrtc:10456
Change-Id: Ic9e5b4f451b5f4b203efcd6fa3bbf9736487e1f4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/136584
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27961}
2019-05-16 12:12:07 +00:00
Elad Alon
0a8562e276 Forward LossNotification from RTCPReceiver to EncoderRtcpFeedback
TBR=sprang@webrtc.org

Bug: webrtc:10501
Change-Id: I09a571a65ba8515b027ee32d1f46e5cc7f699704
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131325
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27513}
2019-04-09 11:13:39 +00:00
Niels Möller
9d8eaac4ee Delete unneeded direct includes of common_types.h
And delete corresponding dependencies on :webrtc_common. After this
change, common_types.h is included directly only from code in the
following directories:

api/
api/video/
api/video_codecs/
common_video/libyuv/include/
media/base/
modules/remote_bitrate_estimator/
modules/rtp_rtcp/source/
modules/video_coding/codecs/vp9/

There remains plenty of indirect dependencies on the types declared in
common_types.h, but the fewer direct dependencies should make it
easier to find the proper place for each type.

Bug: webrtc:5876
Change-Id: I93e8f214025ecb613c19fdec2015bd3f96c59aae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130501
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27376}
2019-04-01 07:18:13 +00:00
Elad Alon
74f0a51f97 Move kFeedbackMessageType from Remb to Psfb
The FMT 15 is not specific only to REMB or loss notification messages.
Rather, it is the Application Layer FB (AFB) of Psfb (Payload Specific
Feedback Messages).
See https://tools.ietf.org/html/rfc4585#section-6.3

TBR=terelius@webrtc.org

Bug: webrtc:10336
Change-Id: I8cd27ef9ee044bf7b7e7c1bd1a53c1dae2d95006
Reviewed-on: https://webrtc-review.googlesource.com/c/123886
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26827}
2019-02-24 00:11:33 +00:00
Mirko Bonadei
739baf097b [clang-tidy] Apply performance-for-range-copy fixes.
This CL applies clang-tidy's performance-for-range-copy [1] on the
WebRTC codebase.

All changes in this CL are automatically generated by both clang-tidy
and 'git cl format'.

[1] - https://clang.llvm.org/extra/clang-tidy/checks/performance-for-range-copy.html

Bug: webrtc:10215
Change-Id: I7c83290b8866d76129bbec4e24e6701f5014102e
Reviewed-on: https://webrtc-review.googlesource.com/c/120043
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26420}
2019-01-28 09:53:50 +00:00
Elad Alon
f8e7ccb967 Create new RTCP feedback message - LossIndication
Create a new RTCP feedback message for reporting the loss and/or non-decodability of video frames, to be used by the upcoming injectable VideoFrameBufferController. The new feedback message should report:
1. The sequence number of the last decoded non-discardable video frame. (TBD: If a multi-packet frame, should it be the sequence number of the first, last, or any of the packets?)
2. The sequence number of the last received RTP packet in the stream.
3. A decodability flag, whose specific meaning depends on the last-received
   RTP sequence number. The decodability flag is true if and only if all of
   the frame's dependencies are known to be decodable, and the frame itself
   is not yet known to be unassemblable.
   * Clarification #1: In a multi-packet frame, the first packet's
     dependencies are known, but it is not yet known whether all parts
     of the current frame will be received.
   * Clarification #2: In a multi-packet frame, the dependencies would be
     unknown if the first packet was not received. Then, the packet will
     be known-unassemblable.

Bug: webrtc:10226
Change-Id: I1563c944477e3ed40235e82ab99a439414632aff
Reviewed-on: https://webrtc-review.googlesource.com/c/118931
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26387}
2019-01-24 12:21:00 +00:00
Jiawei Ou
8b5d9d8650 Remove the audio/video split for the RTCP report intervals.
This is a follow up of a comment in
https://webrtc-review.googlesource.com/c/src/+/110105

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

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

Bug: webrtc:8789
Change-Id: I2293de14ba5f363351f379a02022ed5dc7b8d458
Reviewed-on: https://webrtc-review.googlesource.com/c/110824
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Jiawei Ou <ouj@fb.com>
Cr-Commit-Position: refs/heads/master@{#25741}
2018-11-22 01:39:41 +00:00
Niels Möller
fd1a2fb8e4 Set RtpRtcp config receive_only in voe::ChannelReceive
Followup to https://webrtc-review.googlesource.com/c/103803

Bug: webrtc:9801
Change-Id: I8467aea241f0470aa116639ddcf5f7ef9a3cc711
Reviewed-on: https://webrtc-review.googlesource.com/c/106860
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25501}
2018-11-05 15:11:00 +00:00
Ilya Nikolaevskiy
88c2c50dbd Use monotonic clock to derive NTP timestamps in RTCP module
Use helper TimeMicrosToNtp() on clock TimeInMicroseconds()
instead of CurrentNtpTime() and CurrentNtpTimeMillis()

Also update TimeMicrosToNtp() to not introduce fractional in
milliseconds offset. Expose that offset in time_utils.h

Add test showing indended behavior.

Bug: webrtc:9919
Change-Id: I8b019e11ae5b79d0b8ba113a84066b0369cd2575
Reviewed-on: https://webrtc-review.googlesource.com/c/107889
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25391}
2018-10-26 14:30:28 +00:00
Jiawei Ou
4206a0a849 Exposing video bitrate allocator into API
In order to have public video bitrate allocator factory, the video bitrate allocator has be part of
the api.

Bug: webrtc:9513
Change-Id: Ia2e5ab9eb988c710c1ac492afccc470a92544aa2
Reviewed-on: https://webrtc-review.googlesource.com/88083
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Jiawei Ou <ouj@fb.com>
Cr-Commit-Position: refs/heads/master@{#24073}
2018-07-23 21:23:21 +00:00
Yves Gerey
665174fdbb Reformat the WebRTC code base
Running clang-format with chromium's style guide.

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

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

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

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

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

git cl format

Bug: webrtc:9078
Change-Id: Ife720849709959046329c1c9faa3f31aa13274dc
Reviewed-on: https://webrtc-review.googlesource.com/83584
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23624}
2018-06-15 09:53:35 +00:00
Jonas Olsson
9633cff81a Remove "webrtc_rtp" traces.
They have been disabled by default for years, and should have been made redundant by the event logs.

Bug: webrtc:8982
Change-Id: I491923cbc93378d28f5166d24756b335619d9c12
Reviewed-on: https://webrtc-review.googlesource.com/82800
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23598}
2018-06-13 14:46:24 +00:00
Erik Språng
eeaa8f929c Directly include VideoBitrateAllocation in modules/rtp_rtcp/ targets
Bug: webrtc:9271
Change-Id: Ic7415830588bef9d87bab92943460207890dada6
Reviewed-on: https://webrtc-review.googlesource.com/76960
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23277}
2018-05-17 11:22:56 +00:00
Erik Språng
566124a6df Move BitrateAllocation to api/ and rename it VideoBitrateAllocation
Since the webrtc_common build target does not have visibility set, we
cannot easily use BitrateAllocation in other parts of Chromium.
This is currently blocking parts of chromium:794608, and I know of other
usage outside webrtc already, so moving it to api/ should be warranted.

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

Bug: chromium:794608
Change-Id: I4c0fae40f9365e860c605a76a4f67ecc9b9cf9fe
Reviewed-on: https://webrtc-review.googlesource.com/70783
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22986}
2018-04-23 15:31:27 +00:00
Mirta Dvornicic
b1f063db32 Handle Receiver Reference Time Report from multiple receivers.
Bug: webrtc:9122
Change-Id: I996f02da26b11a4829fda740fdd452470daf4d24
Reviewed-on: https://webrtc-review.googlesource.com/66781
Commit-Queue: Mirta Dvornicic <mirtad@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22871}
2018-04-16 09:54:07 +00:00
Jiawei Ou
3587b8302a Make RTCP report interval configurable
Bug: webrtc:8789
Change-Id: I79c9132123c946b030ed79c647b4329e81d6e6ae
Reviewed-on: https://webrtc-review.googlesource.com/43201
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21837}
2018-02-01 10:12:11 +00:00
Danil Chapovalov
04164cc5ac When processing report blocks do not store rtt when it is not calculated
Otherwise bandwidth observer might miss rtt calculated from previous report block

Bug: webrtc:8805
Change-Id: If3c4f4ee2e923d440ff352e8b770442f1a11fa34
Reviewed-on: https://webrtc-review.googlesource.com/44480
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21800}
2018-01-30 09:42:49 +00:00
Harald Alvestrand
70206d6608 Reland "Make RTCP cumulative_lost be a signed value"
Instead of modifying the API, we'll add a new function to return
the true value, and have a shim that returns what other code expects.

> This reverts commit 4c34f435db.
>
> Reason for revert: Broke internal projects. Type mismatch.
>
> Original change's description:
> > Make RTCP cumulative_lost be a signed value
> >
> > This is formally defined as a signed 24-bit value in RFC 3550 section 6.4.1.
> > See RFC 3550 Appendix A.3 for the reason why it may turn negative.
> >
> > Noticed on discuss-webrtc mailing list.
> >
> > BUG=webrtc:8626
> >
> > Change-Id: I7317f73e9490a876e8445bd3d6b66095ce53ca0a
> > Reviewed-on: https://webrtc-review.googlesource.com/30901
> > Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> > Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#21142}
>
> TBR=stefan@webrtc.org,hta@webrtc.org
>
> Change-Id: I544f7979d584cfb72a2d0d526f4fef84aebeecb3
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:8626
> Reviewed-on: https://webrtc-review.googlesource.com/31040
> Reviewed-by: Zhi Huang <zhihuang@webrtc.org>
> Commit-Queue: Zhi Huang <zhihuang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21144}

Change-Id: I95c8c248f4f85c4d1aa2a47424d8c4d954d4ae7a
Bug: webrtc:8626
Reviewed-on: https://webrtc-review.googlesource.com/31220
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21154}
2017-12-08 08:47:09 +00:00
Mirko Bonadei
675513b96a Stop using LOG macros in favor of RTC_ prefixed macros.
This CL has been generated with the following script:

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

Bug: webrtc:8452
Change-Id: I1a53ef3e0a5ef6e244e62b2e012b864914784600
Reviewed-on: https://webrtc-review.googlesource.com/21325
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20617}
2017-11-09 11:56:32 +00:00
Danil Chapovalov
760c4b4da9 Trigger rtt and stats update on report block rather than receiver report.
ReportBlock is the the real receiver report.
Triggering rtt update on ReportBlock support clients that send receiver
report blocks attached to SenderReport rather than ReceiverReport.

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

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

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

NOPRESUBMIT=true

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

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


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

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

Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}
2017-09-15 04:25:06 +00:00
niklase@google.com
5adc73aad3 git-svn-id: http://webrtc.googlecode.com/svn/trunk@166 4adac7df-926f-26a2-2b94-8c16560cd09d 2011-07-07 08:46:41 +00:00
niklase@google.com
77ae29bc81 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4 4adac7df-926f-26a2-2b94-8c16560cd09d 2011-05-30 11:22:19 +00:00