Converts RtcpDemuxerTest to use a test fixture which creates the
RtcpDemuxer under test and wraps sink adding functions to
automatically remove added sinks at the end of the test case.
Also adds domain-specific expectation macros to improve readability
of test cases.
Bug: None
Change-Id: I2416ce67c4fc8edc9ecc2cc98d191562c3bf81e4
Reviewed-on: https://chromium-review.googlesource.com/601049
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19417}
Extends the RtpDemuxer to do demuxing according to the BUNDLE spec,
using MID and payload types in addition to RSID and SSRC. Also extends
SsrcBindingObserver to receive notification for all types of SSRC
binding that can occur with the new algorithm.
Bug: webrtc:4050
Change-Id: Ie2f347f90d5074ab537fa1162fa7314dd292b68b
Reviewed-on: https://chromium-review.googlesource.com/578628
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19415}
In preparation of running DirectTransport on a TaskQueue in unit-tests, change the thread-checkers to sequence-checkers. This is necessary for Mac and iOS, where the TaskQueue is guaranteed to run sequentially, but not guaranteed to do so on only one thread.
TODO: Add the relevant BUGs.
BUG=None
Review-Url: https://codereview.webrtc.org/2999973002
Cr-Commit-Position: refs/heads/master@{#19404}
Converts RtpDemuxerTest to use a test fixture which creates the
RtpDemuxer under test and wraps sink adding/observer adding
functions to automatically remove them at the end of the test case.
Bug: None
Change-Id: I7e40223f6837caa5443d9850477198c1f7a8d14a
Reviewed-on: https://chromium-review.googlesource.com/608906
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19400}
This rename prepares SsrcBindingObserver to be used for observing all
the ways a sink can be bound to SSRCs (e.g., MID, payload types).
Bug: webrtc:4050
Change-Id: I16b68481d01f921c326a33f5f2baf79d8b3f12e2
Reviewed-on: https://chromium-review.googlesource.com/590762
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19396}
Reason for revert:
Reland
Original issue's description:
> Revert of Add functionality which limits the number of bytes on the network. (patchset #26 id:500001 of https://codereview.webrtc.org/2918323002/ )
>
> Reason for revert:
> Speculative revert to see if this caused regressions in android perf tests.
>
> Original issue's description:
> > Add functionality which limits the number of bytes on the network.
> >
> > The limit is based on the bandwidth delay product, but also adds some additional slack to compensate for the sawtooth-like BWE pattern and the slowness of the encoder rate control. The delay is estimated based on the time from sending a packet until an ack is received. Since acks are received in bursts (feedback is only sent periodically), a min filter is used to estimate the rtt.
> >
> > Whenever the in flight bytes reaches the congestion window, the pacer is paused, which in turn will result in send-side queues growing. Eventually the encoders will be paused as the pacer queue grows large (currently 2 seconds).
> >
> > BUG=webrtc:7926
> >
> > Review-Url: https://codereview.webrtc.org/2918323002
> > Cr-Commit-Position: refs/heads/master@{#19289}
> > Committed: 8497fdde43
>
> TBR=terelius@webrtc.org,philipel@webrtc.org,tschumim@webrtc.org,gnish@webrtc.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=webrtc:7926
>
> Review-Url: https://codereview.webrtc.org/3001653002
> Cr-Commit-Position: refs/heads/master@{#19339}
> Committed: 64136af364TBR=terelius@webrtc.org,philipel@webrtc.org,tschumim@webrtc.org,gnish@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:7926
Review-Url: https://codereview.webrtc.org/2994343002
Cr-Commit-Position: refs/heads/master@{#19373}
Reason for revert:
Speculative revert to see if this caused regressions in android perf tests.
Original issue's description:
> Add functionality which limits the number of bytes on the network.
>
> The limit is based on the bandwidth delay product, but also adds some additional slack to compensate for the sawtooth-like BWE pattern and the slowness of the encoder rate control. The delay is estimated based on the time from sending a packet until an ack is received. Since acks are received in bursts (feedback is only sent periodically), a min filter is used to estimate the rtt.
>
> Whenever the in flight bytes reaches the congestion window, the pacer is paused, which in turn will result in send-side queues growing. Eventually the encoders will be paused as the pacer queue grows large (currently 2 seconds).
>
> BUG=webrtc:7926
>
> Review-Url: https://codereview.webrtc.org/2918323002
> Cr-Commit-Position: refs/heads/master@{#19289}
> Committed: 8497fdde43TBR=terelius@webrtc.org,philipel@webrtc.org,tschumim@webrtc.org,gnish@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:7926
Review-Url: https://codereview.webrtc.org/3001653002
Cr-Commit-Position: refs/heads/master@{#19339}
fake_decoder (of type test::FakeDecoder) was not used.
BUG=None
Review-Url: https://codereview.webrtc.org/3001543002
Cr-Commit-Position: refs/heads/master@{#19322}
The limit is based on the bandwidth delay product, but also adds some additional slack to compensate for the sawtooth-like BWE pattern and the slowness of the encoder rate control. The delay is estimated based on the time from sending a packet until an ack is received. Since acks are received in bursts (feedback is only sent periodically), a min filter is used to estimate the rtt.
Whenever the in flight bytes reaches the congestion window, the pacer is paused, which in turn will result in send-side queues growing. Eventually the encoders will be paused as the pacer queue grows large (currently 2 seconds).
BUG=webrtc:7926
Review-Url: https://codereview.webrtc.org/2918323002
Cr-Commit-Position: refs/heads/master@{#19289}
[This CL is work in progress.]
Wire up the rtp keep-alive in webrtc::Call::Config using new
SetRtpTransportParameters() method on RtpTransportInterface.
BUG=webrtc:7907
Review-Url: https://codereview.webrtc.org/2981513002
Cr-Commit-Position: refs/heads/master@{#19287}
Reason for revert:
Relanding
Original issue's description:
> Revert of SSRC and RSID may only refer to one sink each in RtpDemuxer (patchset #15 id:280001 of https://codereview.webrtc.org/2968693002/ )
>
> Reason for revert:
> Some internal tests keep failing after this change. Try to fix it by reverting it. Will reland it if this isn't the root cause.
>
> Original issue's description:
> > SSRC and RSID may only refer to one sink each in RtpDemuxer
> >
> > RTP demuxing should only match RTP packets with one sink.
> >
> > BUG=webrtc:7135
> >
> > Review-Url: https://codereview.webrtc.org/2968693002
> > Cr-Commit-Position: refs/heads/master@{#19233}
> > Committed: 7b7e06fd23
>
> TBR=nisse@webrtc.org,danilchap@webrtc.org,perkj@webrtc.org,stefan@webrtc.org,holmer@google.com,deadbeef@webrtc.org,pthatcher@webrtc.org,steveanton@webrtc.org,eladalon@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:7135
>
> Review-Url: https://codereview.webrtc.org/2993633002
> Cr-Commit-Position: refs/heads/master@{#19239}
> Committed: 59b603fbedTBR=nisse@webrtc.org,danilchap@webrtc.org,perkj@webrtc.org,stefan@webrtc.org,holmer@google.com,deadbeef@webrtc.org,pthatcher@webrtc.org,steveanton@webrtc.org,zhihuang@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:7135
Review-Url: https://codereview.webrtc.org/2993053002
Cr-Commit-Position: refs/heads/master@{#19248}
Reason for revert:
Some internal tests keep failing after this change. Try to fix it by reverting it. Will reland it if this isn't the root cause.
Original issue's description:
> SSRC and RSID may only refer to one sink each in RtpDemuxer
>
> RTP demuxing should only match RTP packets with one sink.
>
> BUG=webrtc:7135
>
> Review-Url: https://codereview.webrtc.org/2968693002
> Cr-Commit-Position: refs/heads/master@{#19233}
> Committed: 7b7e06fd23TBR=nisse@webrtc.org,danilchap@webrtc.org,perkj@webrtc.org,stefan@webrtc.org,holmer@google.com,deadbeef@webrtc.org,pthatcher@webrtc.org,steveanton@webrtc.org,eladalon@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:7135
Review-Url: https://codereview.webrtc.org/2993633002
Cr-Commit-Position: refs/heads/master@{#19239}
This CL:
- Renames the ViEEncoder class to VideoStreamEncoder, according to discussions.
- Renames variables 'vie_encode' to 'video_stream_encoder'.
- Formatting to match style guide.
- No other changes.
BUG=webrtc:8064
Review-Url: https://codereview.webrtc.org/2995433002
Cr-Commit-Position: refs/heads/master@{#19237}
include/mock/mock_process_thread.h was not tracked by GN.
This cl creates a target for it. The target is testonly because it
depends on "webrtc/test:rtp_test_utils".
This means that dependencies to this header cannot fly under the
GN radar anymore. :)
BUG=webrtc:7652
NOTRY=True
Review-Url: https://codereview.webrtc.org/2881343003
Cr-Commit-Position: refs/heads/master@{#19234}
RTP demuxing should only match RTP packets with one sink.
BUG=webrtc:7135
Review-Url: https://codereview.webrtc.org/2968693002
Cr-Commit-Position: refs/heads/master@{#19233}
In preparation of making RTP packet demuxing many-to-one (one SSRC goes to one sink, but one sink may have multiple SSRCs), we need to remove FlexFEC's dependence on being able to register itself with the demuxer. Instead, we register FlexFEC streams with the streams they protect; when those streams get packets, they'll forward them to their associated FlexFEC streams, too.
BUG=webrtc:7135
Review-Url: https://codereview.webrtc.org/2974453002
Cr-Commit-Position: refs/heads/master@{#19219}
FlexfecReceiveStreamImpl::crit_ was only protecting one boolean, so it's probably better to just make sure that boolean is atomic.
BUG=None
Review-Url: https://codereview.webrtc.org/2991533002
Cr-Commit-Position: refs/heads/master@{#19217}
MockRtpPacketSink has three identical implementations now, so time to move it to its own file.
BUG=None
Review-Url: https://codereview.webrtc.org/2988853002
Cr-Commit-Position: refs/heads/master@{#19183}
I don't think this line could never conceivably fail - if the ctor has reached that point, the object fit in memory, and its members have all been allocated legal memory addresses, none of which may be 0x00.
BUG=None
Review-Url: https://codereview.webrtc.org/2989813002
Cr-Commit-Position: refs/heads/master@{#19176}
All downstream code have been updated to the new location.
In PRESUBMIT.py:
* Remove webrtc/rtc_base from CPP_BLACKLIST
* Add webrtc/rtc_base to LEGACY_API_DIRS
Fix some duplicated paths in
webrtc/modules/audio_processing/test/conversational_speech/BUILD.gn
BUG=webrtc:7634
TBR=kwiberg@webrtc.org
Review-Url: https://codereview.webrtc.org/2976293002
Cr-Commit-Position: refs/heads/master@{#19094}
through streams related to a call object.
The Call object does not know directly when packets pass through it, only which
AudioSendStreams are used. Each AudioSendStream has a pointer to the Transport
object through which its packets are send.
This CL:
By registering an internal wrapper class, TimedTransport, the AudioSendStream
can stay up-to-date on when packets have passed through its Transport. This
lifetime (as an interval) is then queried by the Call when the AudioSendStream
is destroyed. When Call is destroyed, all streams are guaranteed to have been
destroyed and hence Call is up-to-date on packet activity.
The class TimeInterval keeps the code in Call and AudioSendStream smaller, with
fewer get methods in their APIs and less code for updating values.
Also modifies the unit test for AudioSendStream: it previously enforced that
the stream registers (with its channel proxy) the same transport that it was
constructed with.
BUG=webrtc:7882
Review-Url: https://codereview.webrtc.org/2979833002
Cr-Commit-Position: refs/heads/master@{#19087}
Don't force requirement of media type for those packets.
BUG=webrtc:7964
Review-Url: https://codereview.webrtc.org/2973323002
Cr-Commit-Position: refs/heads/master@{#18966}
This makes more sense since logically it's a transport level feature,
not a media stream feature. Even if the implementation details forces it
to be an rtp stream detail, for the moment.
BUG=webrtc:7907
Review-Url: https://codereview.webrtc.org/2978503002
Cr-Commit-Position: refs/heads/master@{#18963}
All downstream code have been updated to the new location.
In PRESUBMIT.py:
* Remove webrtc/rtc_base from CPP_BLACKLIST
* Add webrtc/rtc_base to LEGACY_API_DIRS
Fix some duplicated paths in
webrtc/modules/audio_processing/test/conversational_speech/BUILD.gn
BUG=webrtc:7634
TBR=kwiberg@webrtc.org
Review-Url: https://codereview.webrtc.org/2973183002
Cr-Commit-Position: refs/heads/master@{#18948}
Original issue:
https://codereview.webrtc.org/2957073002/
Reason for reland:
Failed Android unit tests and failed Windows compile.
The tests seemed related at the time, but not after more consideration.
Tracks time between first and last audio and packets to successfully pass through Call object's DeliverRtp method, timed with packet timestamps.
BUG=webrtc:7882
TBR=stefan@webrtc.org
Review-Url: https://codereview.webrtc.org/2970793003
Cr-Commit-Position: refs/heads/master@{#18886}
Reason for revert:
The following, seemingly related, unit tests crash on Android32 (M Nexus5X).
org.webrtc.PeerConnectionTest#testCompleteSession
org.webrtc.PeerConnectionTest#testDataChannelOnlySession
A Windows build fails with a mysterious compile error.
Original issue's description:
> Add received audio/video call duration metrics based on packets.
>
> Tracks time between first and last audio and packets to successfully pass through Call object's DeliverRtp method, timed with packet timestamps.
>
> BUG=webrtc:7882
>
> Review-Url: https://codereview.webrtc.org/2957073002
> Cr-Commit-Position: refs/heads/master@{#18881}
> Committed: 746749237aTBR=stefan@webrtc.org,aleloi@webrtc.org,asapersson@webrtc.org,holmer@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:7882
Review-Url: https://codereview.webrtc.org/2972613002
Cr-Commit-Position: refs/heads/master@{#18882}
Tracks time between first and last audio and packets to successfully pass through Call object's DeliverRtp method, timed with packet timestamps.
BUG=webrtc:7882
Review-Url: https://codereview.webrtc.org/2957073002
Cr-Commit-Position: refs/heads/master@{#18881}
I used a command like this to update the paths:
perl -pi -e "s/webrtc\/base/webrtc\/rtc_base/g" `find webrtc/rtc_base -name "*.cc" -o -name "*.h"`
BUG=webrtc:7634
NOPRESUBMIT=True # cpplint errors that aren't caused by this CL.
Review-Url: https://codereview.webrtc.org/2969623003
Cr-Commit-Position: refs/heads/master@{#18870}
We have a tweak preventing multiple deep-examinations of packets; packets with a given SSRC are only inspected deeply (RSID) once (only the first received packet). Once we move to many-to-one stream-to-sink associations, this becomes less useful, and is better removed.
BUG=webrtc:7135
Review-Url: https://codereview.webrtc.org/2955373002
Cr-Commit-Position: refs/heads/master@{#18859}
[This CL is a rebase of an original CL by solenberg@:
https://codereview.webrtc.org/2948763002/ which in turn was a
rebase of an original CL by peah@:
https://chromium-review.googlesource.com/c/527032/]
Allow an external audio processing module to be used in WebRTC
This CL adds support for optionally using an externally created audio
processing module in a peerconnection. The ownership is shared
between the peerconnection and the external creator of the module.
As part of this the internal ownership of the audio processing module
is moved from VoiceEngine to WebRtcVoiceEngine.
BUG=webrtc:7775
Review-Url: https://codereview.webrtc.org/2961723004
Cr-Commit-Position: refs/heads/master@{#18837}
Rationale:
1. sinks_ is not properly differentiated from rsid_sinks_.
2. Consistency with RtcpDemuxer.
BUG=webrtc:7135
Review-Url: https://codereview.webrtc.org/2958283002
Cr-Commit-Position: refs/heads/master@{#18813}
Patch set 1 is a reland + trivial rebase.
Patch set >= 2 contains bug fixes.
> Original issue's description:
> > Fix bug in vie_encoder.cc which caused channel parameters not to be updated at regular intervals, as it was intended.
> >
> > That however exposes a bunch of failed test, so this CL also fixed a few other things:
> > * FakeEncoder should trust the configured FPS value rather than guesstimating itself based on the realtime clock, so as not to completely undershoot targets in offline mode. Also, compensate for key-frame overshoots when outputting delta frames.
> > * FrameDropper should not assuming incoming frame rate is 0 if no frames have been seen.
> > * Fix a bunch of test cases that started failing because they were relying on the fake encoder undershooting.
> > * Fix test
> >
> > BUG=7664
> >
> > Review-Url: https://codereview.webrtc.org/2883963002
> > Cr-Commit-Position: refs/heads/master@{#18473}
> > Committed: 6431e21da6
BUG=webrtc:7664
Review-Url: https://codereview.webrtc.org/2953053002
Cr-Commit-Position: refs/heads/master@{#18782}
Reason for revert:
About to fix problem and reland.
Original issue's description:
> Revert of Create RtcpDemuxer (patchset #13 id:240001 of https://codereview.webrtc.org/2943693003/ )
>
> Reason for revert:
> Breaks Chromium FYI bots.
>
> The problem is in the BUILD.gn file.
>
> Sample failure:
> https://build.chromium.org/p/chromium.webrtc.fyi/builders/Linux%20Builder/builds/17829
>
> Sample logs:
> use_goma = true
> """ to /b/c/b/Linux_Builder/src/out/Release/args.gn.
>
> /b/c/b/Linux_Builder/src/buildtools/linux64/gn gen //out/Release --check
> -> returned 1
> ERROR at //third_party/webrtc/call/BUILD.gn:46:5: Can't load input file.
> "//webrtc/base:rtc_base_approved",
> ^--------------------------------
>
> Original issue's description:
> > Create RtcpDemuxer. Capabilities:
> > 1. Demux RTCP messages according to the sender-SSRC.
> > 2. Demux RTCP messages according to the RSID (resolved to an SSRC, then compared to the sender-RTCP).
> > 3. Allow listening in on all RTCP messages passing through the demuxer ("broadcast sinks").
> >
> > BUG=webrtc:7135
> >
> > Review-Url: https://codereview.webrtc.org/2943693003
> > Cr-Commit-Position: refs/heads/master@{#18763}
> > Committed: cb83bdf01f
>
> BUG=webrtc:7135
>
> Review-Url: https://codereview.webrtc.org/2957763002
> Cr-Commit-Position: refs/heads/master@{#18764}
> Committed: 0e7e7869e7
BUG=webrtc:7135
Review-Url: https://codereview.webrtc.org/2960623002
Cr-Commit-Position: refs/heads/master@{#18768}
Reason for revert:
Breaks Chromium FYI bots.
The problem is in the BUILD.gn file.
Sample failure:
https://build.chromium.org/p/chromium.webrtc.fyi/builders/Linux%20Builder/builds/17829
Sample logs:
use_goma = true
""" to /b/c/b/Linux_Builder/src/out/Release/args.gn.
/b/c/b/Linux_Builder/src/buildtools/linux64/gn gen //out/Release --check
-> returned 1
ERROR at //third_party/webrtc/call/BUILD.gn:46:5: Can't load input file.
"//webrtc/base:rtc_base_approved",
^--------------------------------
Original issue's description:
> Create RtcpDemuxer. Capabilities:
> 1. Demux RTCP messages according to the sender-SSRC.
> 2. Demux RTCP messages according to the RSID (resolved to an SSRC, then compared to the sender-RTCP).
> 3. Allow listening in on all RTCP messages passing through the demuxer ("broadcast sinks").
>
> BUG=webrtc:7135
>
> Review-Url: https://codereview.webrtc.org/2943693003
> Cr-Commit-Position: refs/heads/master@{#18763}
> Committed: cb83bdf01fTBR=stefan@webrtc.org,danilchap@webrtc.org,nisse@webrtc.org,kjellander@webrtc.org,holmer@google.com,eladalon@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:7135
Review-Url: https://codereview.webrtc.org/2957763002
Cr-Commit-Position: refs/heads/master@{#18764}
1. Demux RTCP messages according to the sender-SSRC.
2. Demux RTCP messages according to the RSID (resolved to an SSRC, then compared to the sender-RTCP).
3. Allow listening in on all RTCP messages passing through the demuxer ("broadcast sinks").
BUG=webrtc:7135
Review-Url: https://codereview.webrtc.org/2943693003
Cr-Commit-Position: refs/heads/master@{#18763}
And implementation class RtpStreamReceiverController.
It's responsible for demuxing, and acts as factory for
RtpStreamReceiverInterface.
BUG=webrtc:7135
Review-Url: https://codereview.webrtc.org/2886993005
Cr-Commit-Position: refs/heads/master@{#18696}
This CL makes the WebRTC more modular and allows the users to build
WebRTC without audio and video(DataChannel only).
The BUILD files in call/, logging/, media/ and pc/ are modified to
support modular WebRTC.
The dependencies on Call and RtcEventLog are removed from the
PeerConnection. Instead of being created internally, they would be
passed in by the PeerConnectionFactory.
Add the CreateModularPeerConnectionFactory function which allow the
users to create a PeerConnectionFactory with the modules they need.
If the users want to build WebRTC without audio and video, they can
pass in null pointers for modules they don't need. (MediaEngine,
VideoEncoderFactory etc.)
BUG=webrtc:7613
Review-Url: https://codereview.webrtc.org/2854123003
Cr-Commit-Position: refs/heads/master@{#18617}