Commit graph

116 commits

Author SHA1 Message Date
Jakob Ivarsson
9a12ee5d37 Use frame rate in video overhead calculation.
Assume bitrate is evenly distributed between frames. This is wrong for
uneven frame sizes and will underestimate the overhead for simulcast.
However, it will be more correct than the current calculation,
especially for low bitrates when each frame is smaller than one packet.
This is also when overhead matters more since it is a larger fraction
of the total bitrate.

It is also unclear what will happen when using FEC.

Bug: b/166341943
Change-Id: I247b9d0fc7a8ad5daa9b577f55ec16c56efa34c3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/195221
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32725}
2020-12-01 09:42:40 +00:00
Erik Språng
7703f23b60 Adds ability to delay pacer start until media is added.
This avoids the pacer thread waking up at 5ms interval if a
PeerConnection is created without actually using media.

The TaskQueuePacedSender solves the problem too, this CL is mostly a
safeguard in case we still find issues when turning it on...

Can be turned off by setting field trial "WebRTC-LazyPacerStart" to
"Disabled".

Bug: webrtc:10809
Change-Id: I8501106e608eccb14487576f24bdceaf3f324d80
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183982
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32101}
2020-09-14 21:42:55 +00:00
Danil Chapovalov
383f2cfca4 Stop mentioning RTPFragmentationHeader in call/
Bug: webrtc:6471
Change-Id: I07ab95524369fa996b8dde68f421281989d04e0c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181461
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31921}
2020-08-12 13:59:38 +00:00
Danil Chapovalov
24263f4ffb Embed FrameDependencyTemplate builder helpers directly into the struct
Bug: None
Change-Id: I4c13bdabd08dd6a6011cb534c765c1dd09f218d1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176843
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31500}
2020-06-11 13:43:51 +00:00
Danil Chapovalov
636865e05d Delete field trial WebRTC-GenericDescriptor
this trial is by default on for three months since
https://webrtc-review.googlesource.com/c/src/+/168661

Bug: webrtc:11503
Change-Id: I8f2e0996fd1c77113715628198a409f12a525d51
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176242
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31424}
2020-06-03 13:00:30 +00:00
Danil Chapovalov
9a5efe925d In call/ replace mock macros with unified MOCK_METHOD macro
Bug: webrtc:11564
Change-Id: I81d06041b80ce470e4859c4d0ebad7ff0f831af9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175134
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31276}
2020-05-15 13:36:00 +00:00
Tommi
822a874463 Switch CallStats to TQ interface + callbacks on the worker thread.
Bug: webrtc:11489
Change-Id: I08c4cd42dfa28d88ed9f0aa8c8b2cfb606bf00df
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174240
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31203}
2020-05-10 23:24:35 +00:00
Marina Ciocea
1148fd5cef Define MockFrameTransformer in test/.
Add MockFrameTransformer to test/, and remove definitions from unit test
files.

Bug: webrtc:11380
Change-Id: Ia709883e8d000852e3f71e7bfb87877072e22aeb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174001
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Marina Ciocea <marinaciocea@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31151}
2020-05-04 13:45:22 +00:00
Tommi
3c9bcc1f7a Reland of the test portion of:
https://webrtc-review.googlesource.com/c/src/+/172847

------------ original description --------------

Preparation for ReceiveStatisticsProxy lock reduction.

Update tests to call VideoReceiveStream::GetStats() in the same or at
least similar way it gets called in production (construction thread,
same TQ/thread).

Mapped out threads and context for ReceiveStatisticsProxy,
VideoQualityObserver and VideoReceiveStream. Added
follow-up TODOs for webrtc:11489.

One functional change in ReceiveStatisticsProxy is that when sender
side RtcpPacketTypesCounterUpdated calls are made, the counter is
updated asynchronously since the sender calls the method on a different
thread than the receiver.

Make CallClient::SendTask public to allow tests to run tasks in the
right context. CallClient already does this internally for GetStats.

Remove 10 sec sleep in StopSendingKeyframeRequestsForInactiveStream.

Bug: webrtc:11489
Change-Id: I491e13344b9fa714de0741dd927d907de7e39e83
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173583
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31077}
2020-04-15 16:09:44 +00:00
Marina Ciocea
dc69fd2b80 [InsertableStreams] Fix video sender simulcast.
The transformer was previously moved into the config of the first stream
which resulted in incorrect behavior for simulcast. Use the transformer
in all the streams.

Pass the sender's ssrc on registring the transformed frame callback, to
associate separate transformer sinks for each sender.

Bug: chromium:1065838
Change-Id: I5c52dacb241c68268681b85f875257b24987849e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173332
Commit-Queue: Marina Ciocea <marinaciocea@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31050}
2020-04-11 10:30:32 +00:00
Artem Titov
16cc9efd54 Revert "Preparation for ReceiveStatisticsProxy lock reduction."
This reverts commit 24eed2735b.

Reason for revert: Speculative revert: breaks downstream project

Original change's description:
> Preparation for ReceiveStatisticsProxy lock reduction.
> 
> Update tests to call VideoReceiveStream::GetStats() in the same or at
> least similar way it gets called in production (construction thread,
> same TQ/thread).
> 
> Mapped out threads and context for ReceiveStatisticsProxy,
> VideoQualityObserver and VideoReceiveStream. Added
> follow-up TODOs for webrtc:11489.
> 
> One functional change in ReceiveStatisticsProxy is that when sender
> side RtcpPacketTypesCounterUpdated calls are made, the counter is
> updated asynchronously since the sender calls the method on a different
> thread than the receiver.
> 
> Make CallClient::SendTask public to allow tests to run tasks in the
> right context. CallClient already does this internally for GetStats.
> 
> Remove 10 sec sleep in StopSendingKeyframeRequestsForInactiveStream.
> 
> Bug: webrtc:11489
> Change-Id: Ib45bfc59d8472e9c5ea556e6ecf38298b8f14921
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/172847
> Commit-Queue: Tommi <tommi@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31008}

TBR=mbonadei@webrtc.org,henrika@webrtc.org,kwiberg@webrtc.org,tommi@webrtc.org,juberti@webrtc.org,mflodman@webrtc.org

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

Bug: webrtc:11489
Change-Id: I48b8359cdb791bf22b1a2c2c43d46263b01e0d65
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173082
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31023}
2020-04-07 19:50:20 +00:00
Tommi
24eed2735b Preparation for ReceiveStatisticsProxy lock reduction.
Update tests to call VideoReceiveStream::GetStats() in the same or at
least similar way it gets called in production (construction thread,
same TQ/thread).

Mapped out threads and context for ReceiveStatisticsProxy,
VideoQualityObserver and VideoReceiveStream. Added
follow-up TODOs for webrtc:11489.

One functional change in ReceiveStatisticsProxy is that when sender
side RtcpPacketTypesCounterUpdated calls are made, the counter is
updated asynchronously since the sender calls the method on a different
thread than the receiver.

Make CallClient::SendTask public to allow tests to run tasks in the
right context. CallClient already does this internally for GetStats.

Remove 10 sec sleep in StopSendingKeyframeRequestsForInactiveStream.

Bug: webrtc:11489
Change-Id: Ib45bfc59d8472e9c5ea556e6ecf38298b8f14921
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/172847
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31008}
2020-04-06 14:34:38 +00:00
Marina Ciocea
e77912ba8c Insert frame transformer between Encoded and Packetizer.
Add a new API in RTPSenderInterface, to be called from the browser side
to insert a frame transformer between the Encoded and the Packetizer.

The frame transformer is passed from RTPSenderInterface through the
library to be eventually set in RTPSenderVideo, where the frame
transformation will occur in the follow-up CL
https://webrtc-review.googlesource.com/c/src/+/169128.

Insertable Streams Web API explainer:
https://github.com/alvestrand/webrtc-media-streams/blob/master/explainer.md

Design doc for WebRTC library changes:
http://doc/1eiLkjNUkRy2FssCPLUp6eH08BZuXXoHfbbBP1ZN7EVk

Bug: webrtc:11380
Change-Id: I46cd0d8a798c2736c837e90cbf90d8901c7d27fb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169127
Commit-Queue: Marina Ciocea <marinaciocea@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30642}
2020-02-28 07:43:13 +00:00
Danil Chapovalov
2272f20a0a Allow sending DependencyDescriptor rtp header extension in call
Bug: webrtc:10342
Change-Id: I8ccbc7381fc8ac436066f5b817fa32180fc8603e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168542
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30546}
2020-02-18 16:50:28 +00:00
Danil Chapovalov
cad3e0e2fa Replace DataSize and DataRate factories with newer versions
This is search and replace change:
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataSize::Bytes<\(.*\)>()/DataSize::Bytes(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataSize::bytes/DataSize::Bytes/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataRate::BitsPerSec<\(.*\)>()/DataRate::BitsPerSec(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataRate::BytesPerSec<\(.*\)>()/DataRate::BytesPerSec(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataRate::KilobitsPerSec<\(.*\)>()/DataRate::KilobitsPerSec(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataRate::bps/DataRate::BitsPerSec/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataRate::kbps/DataRate::KilobitsPerSec/g"
git cl format

Bug: webrtc:9709
Change-Id: I65aaca69474ba038c1fe2dd8dc30d3f8e7b94c29
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168647
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30545}
2020-02-18 16:09:50 +00:00
Danil Chapovalov
a68eb8c1cb in call RtpVideoSenderTests rely on simulated time
instead of waiting on an rtc::Event
to make tests faster and potentially less flaky

Bug: None
Change-Id: I04e8fa79761e782f60838b924d40e6d6a104b14b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168644
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30540}
2020-02-18 11:03:58 +00:00
Danil Chapovalov
0c626afcf3 Use newer version of TimeDelta and TimeStamp factories in webrtc
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Micros<\(.*\)>()/TimeDelta::Micros(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Millis<\(.*\)>()/TimeDelta::Millis(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Seconds<\(.*\)>()/TimeDelta::Seconds(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::us/TimeDelta::Micros/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::ms/TimeDelta::Millis/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::seconds/TimeDelta::Seconds/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Micros<\(.*\)>()/Timestamp::Micros(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Millis<\(.*\)>()/Timestamp::Millis(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Seconds<\(.*\)>()/Timestamp::Seconds(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::us/Timestamp::Micros/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::ms/Timestamp::Millis/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::seconds/Timestamp::Seconds/g"
git cl format

Bug: None
Change-Id: I87469d2e4a38369654da839ab7c838215a7911e7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168402
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30491}
2020-02-10 12:21:17 +00:00
Sebastian Jansson
3d4d94a832 Adds scenario test for transport wide feedback based retransmission.
This ensures more end to end test coverage of the feature and captures
a wider class of regression then the existing unit test.

Bug: webrtc:9883
Change-Id: I6e74e571500c5c5d74caf8f661cac08bee8934f6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/164461
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30252}
2020-01-14 16:00:14 +00:00
Mirko Bonadei
f18f9206e5 Revert "Moves TransportFeedbackAdapter to TaskQueue."
This reverts commit 62d01cde6f.

Reason for revert: Causes SIGSEGV in webrtc::RTPSender::BuildRtxPacket.

Original change's description:
> Moves TransportFeedbackAdapter to TaskQueue.
>
> Bug: webrtc:9883
> Change-Id: Id87e281751d98043f4470df5a71d458f4cd654c1
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158793
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30037}

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

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

No-Try: True
Bug: webrtc:9883
Change-Id: If54bdb8694144fae3fafbabd72d1ac1198e51aa6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161726
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30052}
2019-12-10 13:51:29 +00:00
Sebastian Jansson
62d01cde6f Moves TransportFeedbackAdapter to TaskQueue.
Bug: webrtc:9883
Change-Id: Id87e281751d98043f4470df5a71d458f4cd654c1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158793
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30037}
2019-12-09 10:38:54 +00:00
Markus Handell
486cc55a02 TimeController: Rename Sleep to AdvanceTime.
This change renames TimeController's Sleep method to AdvanceTime, unifying
the same name with the same semantic as for downstream projects.

Bug: webrtc:11154
Change-Id: Id79bcf0eafcd0b47a76407ba220479d84df5a736
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161092
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29989}
2019-12-03 16:08:54 +00:00
Erik Språng
00cc836fcf Makes all of RtpVideoSenderTest use simulated time
RtpVideoSenderTest used a SimulatedClock but the task queue factor still
looked at the real-time clock when posting delayed tasks.
This CL changes that so everything is using simulated time, which makes
test faster and should avoid flakiness.
In particular, fixing this timing issue exposed flaws in
DoesNotRetrasmitAckedPackets, which was likely the root case of bug
10873, so let's re-enable on ios again.

Bug: webrtc:10873,webrtc:10809
Change-Id: If8a0c244b1a34f7427543deaa2431ab1e9f124a6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160404
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29897}
2019-11-25 12:13:38 +00:00
Erik Språng
662678dbf7 Adds injectable trials from peerconnection down to transport controller.
This will be immediately useful to guarantee consistent state across
components referencing the pacer, but will be a net benefit overall
imo.

Bug: webrtc:10809
Change-Id: I49630696f757a832ccf2e4c8597193bf087ce53b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159885
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29859}
2019-11-21 12:41:45 +00:00
Sebastian Jansson
f298855981 Cleanup of feedback observer interface
Removes all unused features, reducing the exposed interface surface.
This makes refactoring and maintenance simpler as we can change
TransportFeedbackAdapter without making corresponding changes
to RtpVideoSender.

Bug: webrtc:9883
Change-Id: If372a868e0765e94df52b4de52d3bb619ce11471
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156943
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29649}
2019-10-30 07:50:29 +00:00
Sebastian Jansson
82ed2e852f Cleanup: Propagating BitrateAllocationUpdate to RtpVideoSender
Bug: webrtc:9883
Change-Id: I12d342ecd5eb0cc859123fe31fc759f6f60f7c8b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156940
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29492}
2019-10-15 14:40:48 +00:00
Niels Möller
b9bfe655d4 Delete VCMEncodedFrame::VerifyAndAllocate
And mark EncodedImage::Allocate as deprecated.

Bug: webrtc:9378
Change-Id: I03ce907fa6b87803ddb72f548f60a9bf1b7c317d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155163
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29383}
2019-10-04 14:16:49 +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
Sami Kalliomäki
c14b2335d9 Disable the most flaky tests on iOS.
Disables:
 - RtpVideoSenderTest.DoesNotRetrasmitAckedPackets
 - VideoReceiveStreamTestWithFakeDecoder.RenderedFrameUpdatesGetSources

Bug: webrtc:10870, webrtc:10872, webrtc:10873
Change-Id: I410f781c30e45387c35055bf97424a68658174d3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148984
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28858}
2019-08-14 15:42:11 +00:00
Danil Chapovalov
83bbe91398 Delete deprecated rtc_event_log header
Bug: webrtc:10206
Change-Id: I9ed3148843c647372993729b87c0e74741ab540b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147870
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28791}
2019-08-07 10:58:17 +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
Niels Möller
4d504c76cb New interface EncodedImageBufferInterface, replacing use of CopyOnWriteBuffer
Bug: webrtc:9378
Change-Id: I62b7adbd9dd539c545b5b1b1520721482a4623c4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138820
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28317}
2019-06-19 07:02:34 +00:00
Sebastian Jansson
cf41eb1ce1 Reland "Cleanup of video packet overhead calculation."
This is a reland of 890bc3069c

Zero bitrate caused division by zero in DCHECK for max bitrate.
Added unit tests to ensure that setting zero bitrate does not crash.

> Original change's description:
> > Cleanup of video packet overhead calculation.
> >
> > This CL updates the video packet overhead calculation to make it more
> > clear. This prepares for future work on improving the accuracy of the
> > calculation.
> >
> > Bug: webrtc:9883
> > Change-Id: I1d623a3e0de45be7b6e4a1f9e3cbe54fd2b8a45a
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138077
> > Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#28040}

Bug: webrtc:10674
Change-Id: I156d1ee5546ede7e43ae1d9a298dcaba6071230f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140890
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28212}
2019-06-10 15:47:48 +00:00
Erik Språng
845c6aa140 Add support for early loss detection using transport feedback.
Bug: webrtc:10676
Change-Id: Ifdef133e123a0c54204397fb323f4c671c40a464
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135881
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28106}
2019-05-29 13:21:10 +00:00
Henrik Boström
87e3f9d116 [video] Plumbing of ReportBlockData from RTCPReceiver to MediaSenderInfo
This is part of implementing RTCRemoteInboundRtpStreamStats. The CL was
split up into smaller pieces for reviewability. Spec:
https://w3c.github.io/webrtc-stats/#dom-rtcremoteinboundrtpstreamstats

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

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

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

Bug: webrtc:10456
Change-Id: Icd20452cb4b4908203b28ae9d9f52c25693cf91d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138065
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28071}
2019-05-27 12:21:17 +00:00
Erik Språng
bd7046c524 Remove redundant feedback_packet_seq_num_set_ in RtpVideoSender
The state this set tracks (whether this is new feedback for a packet
belonging to a media ssrc) can already be inferred from data provided
by the SendTimeHistory: if packet send time is not populated in the
feedback it's either because:
1. The feedback has already been processed
2. The receiver is sending feedback for bogus non-existent packets

If the first case, this maps to |feedback_packet_seq_num_set_|
containing the packet, if the ssrc (present in the feedback) is part
of the media ssrcs.

In the second case, this data should be ignored anyway.

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

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

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

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

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

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

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

Bug: webrtc:8975
Change-Id: I703a353252943f63d7d6edda68f03bc482633fd6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133028
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27745}
2019-04-24 18:10:18 +00:00
Danil Chapovalov
d3ba236686 Stop using GlobalTaskQueueFactory in video unittests
instead use DefaultTaskQueueFactory directly

Bug: webrtc:10284
Change-Id: I58ae120cf185553d0145d7feb365deca90a93bc5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132401
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27610}
2019-04-15 09:24:18 +00:00
Ying Wang
0810a7c25a Add base class NetworkPredictor and NetworkPredictorFactory and wire up.
Add base class NetworkPredictor and NetworkPredictorFactory in /api, make it possible to inject customized NetworkPredictor in PeerConnectionFactory level. The NetworkPredictor object will be pass down to GoogCCNetworkControl and DelayBasedBwe.

Bug: webrtc:10492
Change-Id: Iceeadbe1c9388b11ce4ac01ee56554cb0bf64d04
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130201
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27543}
2019-04-10 12:38:58 +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
Oleh Prypin
e8964903a9 Revert "Fix target bitrate RTCP messages behavior for SVC streams"
This reverts commit ab65d8aab5.

Reason for revert: Fails video_engine_tests ExtendedReportsEndToEndTest.TestExtendedReportsCanSignalZeroTargetBitrate
https://ci.chromium.org/p/webrtc/builders/ci/Linux%20MSan/18366

Original change's description:
> Fix target bitrate RTCP messages behavior for SVC streams
>
> Before this CL for SVC streams (e.g VP9) still 3 separate RTP_RTCP senders
> were created. The RTCP target bitrate messages were treated as simulcast
> and were split and send for each separate spatial layer in a separate SSRC.
>
> To fix that an svc flag is now wired to VideoSendStream config
> and filled based on the encoder config in WebrtcVideoEngine. This flag is
> used to differentiate between simulcast and SVC mode in RtpVideoSender.
>
> Bug: webrtc:10485
> Change-Id: Ifa01d12a7d4f01fcbe448ad11e0cc39ab2d1df55
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129929
> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27345}

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

Change-Id: I184f87289d9dccc67de165038d76a5690158a3b5
No-Tree-Checks: True
No-Try: True
Bug: webrtc:10485
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130467
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27355}
2019-03-29 15:52:11 +00:00
Ilya Nikolaevskiy
ab65d8aab5 Fix target bitrate RTCP messages behavior for SVC streams
Before this CL for SVC streams (e.g VP9) still 3 separate RTP_RTCP senders
were created. The RTCP target bitrate messages were treated as simulcast
and were split and send for each separate spatial layer in a separate SSRC.

To fix that an svc flag is now wired to VideoSendStream config
and filled based on the encoder config in WebrtcVideoEngine. This flag is
used to differentiate between simulcast and SVC mode in RtpVideoSender.

Bug: webrtc:10485
Change-Id: Ifa01d12a7d4f01fcbe448ad11e0cc39ab2d1df55
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129929
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27345}
2019-03-28 15:09:12 +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
Benjamin Wright
41f9f2cc57 ClangTidy fixes for call/
These are manual edits please verify there are no typos.
Feel free to auto-submit if there are no issues.

Bug: webrtc:10410
Change-Id: I08ff36bd689fa7c3716c8e7017bd571cc9f09f35
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127642
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27125}
2019-03-14 09:38:01 +00:00
Sebastian Jansson
572c60f44d Injecting Clock into video senders.
Bug: webrtc:10365
Change-Id: I1dc42345a95929970d4f390e04eff56ca0c6d60b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125190
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26959}
2019-03-04 21:55:02 +00:00
Sebastian Jansson
ed50e6c759 Inject TaskQueueFactory in RtpTransportControllerSend.
Bug: webrtc:10365
Change-Id: I1656dcf774fb347afd8b28aa998acff8942cdd9f
Reviewed-on: https://webrtc-review.googlesource.com/c/125180
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26928}
2019-03-01 17:44:01 +00:00
philipel
d1d0359895 Remove memsets of CodecSpecificInfo.
CodecSpecificInfo has a default constructor, so initializing by memset is not necessary and is in the way of adding non-trivial members.

Related chromium CL: https://chromium-review.googlesource.com/c/chromium/src/+/1495533

Bug: webrtc:10342
Change-Id: I36046f919f5fc34ea51de7288ff5c9cc0f2950b8
Reviewed-on: https://webrtc-review.googlesource.com/c/125093
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26924}
2019-03-01 13:30:56 +00:00
Niels Möller
663844d800 Update test code to use EncodedImage::Allocate
Bug: webrtc:9378
Change-Id: I2ea63b097b0263b264fbbcca295365781fcae621
Reviewed-on: https://webrtc-review.googlesource.com/c/122780
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26690}
2019-02-14 15:50:45 +00:00
Sebastian Jansson
6347029875 Removes usages of TaskQueueCongestionControl field trial.
It doesn't do anything any more, so it should be removed.

Bug: webrtc:9586
Change-Id: I0b320b6ce4f480ff8cb59451db29bcc77b882b5f
Reviewed-on: https://webrtc-review.googlesource.com/c/120813
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26507}
2019-02-01 09:46:59 +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
77536a2b81 Rename EncodedImage::_length --> size_, and make private.
Use size() accessor function. Also replace most nearby uses of _buffer
with data().

Bug: webrtc:9378
Change-Id: I1ac3459612f7c6151bd057d05448da1c4e1c6e3d
Reviewed-on: https://webrtc-review.googlesource.com/c/116783
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26273}
2019-01-16 07:40:47 +00:00
Steve Anton
40d55331d7 Include absl/memory/memory.h if absl::make_unique is used
Tbr: kwiberg@webrtc.org
Bug: None
Change-Id: Iaf4533d2ce0e80b351a8a664ef8cf7ba0e5ec583
Reviewed-on: https://webrtc-review.googlesource.com/c/115746
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Yves Gerey <yvesg@google.com>
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26168}
2019-01-08 20:08:32 +00:00
Amit Hilbuch
0fc2843c10 Removing redundant argument for SSRCs from ctor of RtpVideoSender.
SSRCs are specified twice in calls to the RtpVideoSender constructor.
Once in the first argument of ssrcs, and then again in the RtpConfig
ssrcs variable. Resolving to reference the variable in the RtpConfig.

Bug: None
TBR: stefan@webrtc.org
Change-Id: I53528140166a53f3558f950d5662b7d3d6b8c822
Reviewed-on: https://webrtc-review.googlesource.com/c/114910
Commit-Queue: Amit Hilbuch <amithi@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26094}
2018-12-21 23:33:39 +00:00
Sebastian Jansson
1618095100 Cleanup of RtpTransportControllerSend.
This CL simplifies a lot of code that can be cleaned up after the merge
of RtpTransportControllerSend and SendSideCongestionController.

In particular, the role of CongestionControlHandler is reduced to only
handle the pacer pushback and stream pausing mechanism.

Bug: webrtc:9586
Change-Id: Idbc1e968efd35e6df6129bc307f6bc1db18d20f2
Reviewed-on: https://webrtc-review.googlesource.com/c/113947
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25994}
2018-12-12 16:36:45 +00:00
Jiawei Ou
55718120e6 Adding rtcp report interval into RTCConfiguration.
This is a follow up of https://webrtc-review.googlesource.com/c/src/+/43201.

Issue 43201 didn't do the job properly.
1. The audio rtcp report interval is not properly hooked up.
2. We don't need to propagate audio rtcp interval into video send stream or vice versa.
3. We don't need to propagate rtcp report interval to any receiving streams.

Bug: webrtc:8789
Change-Id: I1f637d6e5173608564ef0702d7eda6fc93b3200f
Reviewed-on: https://webrtc-review.googlesource.com/c/110105
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Jiawei Ou <ouj@fb.com>
Cr-Commit-Position: refs/heads/master@{#25610}
2018-11-12 20:00:00 +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
Stefan Holmer
64be7fa7d8 Move FecController to RtpVideoSender.
This also moves the packet feedback tracking to RtpVideoSender.

Bug: webrtc:9517
Change-Id: Ifb1ff85051730108a0b0d1dd30f6f8595ad2af6e
Reviewed-on: https://webrtc-review.googlesource.com/c/95920
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25019}
2018-10-05 14:39:01 +00:00
Sebastian Jansson
dc8c981dcb Makes new congestion controller work with rtp sender tests.
Bug: webrtc:9586
Change-Id: Ifa12ef5d85b19395c62fc1001a107c4151927098
Reviewed-on: https://webrtc-review.googlesource.com/102160
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24871}
2018-09-27 15:58:32 +00:00
Niels Möller
d3b8c63b58 Reland "Add spatial index to EncodedImage."
This is a reland of da0898dfae

Original change's description:
> Add spatial index to EncodedImage.
>
> Replaces the VP8 simulcast index and VP9 spatial index formely part of
> CodecSpecificInfo.
>
> Bug: webrtc:9378
> Change-Id: I80eafd63fbdee0a25864338196a690628b4bd3d2
> Reviewed-on: https://webrtc-review.googlesource.com/83161
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24485}

Tbr: magjed@webrtc.org
Bug: webrtc:9378
Change-Id: Iff20b656581ef63317e073833d1a326f7118fdfd
Reviewed-on: https://webrtc-review.googlesource.com/96780
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24507}
2018-08-31 07:35:52 +00:00
Niels Moller
5a998d7246 Revert "Add spatial index to EncodedImage."
This reverts commit da0898dfae.

Reason for revert: Broke downstream tests.

Original change's description:
> Add spatial index to EncodedImage.
> 
> Replaces the VP8 simulcast index and VP9 spatial index formely part of
> CodecSpecificInfo.
> 
> Bug: webrtc:9378
> Change-Id: I80eafd63fbdee0a25864338196a690628b4bd3d2
> Reviewed-on: https://webrtc-review.googlesource.com/83161
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24485}

TBR=brandtr@webrtc.org,magjed@webrtc.org,nisse@webrtc.org,sprang@webrtc.org,philipel@webrtc.org,srte@webrtc.org

Change-Id: Idb4fb9d72e5574d7353c631cb404a1311f3fd148
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9378
Reviewed-on: https://webrtc-review.googlesource.com/96664
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24486}
2018-08-29 14:36:05 +00:00
Niels Möller
da0898dfae Add spatial index to EncodedImage.
Replaces the VP8 simulcast index and VP9 spatial index formely part of
CodecSpecificInfo.

Bug: webrtc:9378
Change-Id: I80eafd63fbdee0a25864338196a690628b4bd3d2
Reviewed-on: https://webrtc-review.googlesource.com/83161
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24485}
2018-08-29 13:50:17 +00:00
Niels Möller
2377588c82 Add accessor methods for RTP timestamp of EncodedImage.
Intention is to make the member private, but downstream callers
must be updated to use the accessor methods first.

Bug: webrtc:9378
Change-Id: I3495bd8d545b7234fbea10abfd14f082caa420b6
Reviewed-on: https://webrtc-review.googlesource.com/82160
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24352}
2018-08-21 09:15:51 +00:00
philipel
25d31ec440 Add shared frame id state to RtpVideoSender.
When using the generic descriptor we want all simulcast streams to share one
frame id space (so that the SFU can switch stream without having to rewrite the
frame id). The state also needs to be restored when the RtpVideoSender is
recreated.

Note that |shared_simulcast_frame_id_| is only added, but not used in this CL.
Actually using it will be part of the next CL.

Bug: webrtc:9361
Change-Id: I7192a06d6ae4cab118ca5996ed99a56888ad1d97
Reviewed-on: https://webrtc-review.googlesource.com/92803
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24233}
2018-08-08 15:28:20 +00:00
Stefan Holmer
9416ef8c4f Rename PayloadRouter to RtpVideoSender.
Bug: webrtc:9517
Change-Id: I18397a28067dbe5029fc80fe2eef360869abb339
Reviewed-on: https://webrtc-review.googlesource.com/89380
Commit-Queue: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24039}
2018-07-19 08:50:50 +00:00
Renamed from call/payload_router_unittest.cc (Browse further)