Commit graph

913 commits

Author SHA1 Message Date
Johannes Kron
8cc711a7e1 Update URI of TransportSequenceNumberV2
The previous URI was a placeholder and is not valid. The URI
https://webrtc.org/experiments/rtp-hdrext/transport-wide-cc-02/
must be used instead.

Bug: webrtc:10264
Change-Id: Ibabde599b5bbd116c1c5e86ba0c9c64019bf7026
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126360
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27051}
2019-03-11 10:15:52 +00:00
Yves Gerey
3368721537 Revert "Change clip_name -> clip_path in VideoQualityTestFixture::Params::Video."
This reverts commit 184f6d5d75.

Reason for revert: Breaks downstream android projects.

Original change's description:
> Change clip_name -> clip_path in VideoQualityTestFixture::Params::Video.
> 
> This allows external users of this test fixture to specify a custom
> path, rather than just a custom file name.
> 
> Bug: webrtc:10349
> Change-Id: I84e886c8bc28583017ce9ed7b9e7ee6a8e95730f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126227
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27033}

TBR=brandtr@webrtc.org,kwiberg@webrtc.org,asapersson@webrtc.org

Change-Id: I56af4c74e0c38b5a14a6151b230ada4349e931da
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10349
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126620
Reviewed-by: Yves Gerey <yvesg@google.com>
Commit-Queue: Yves Gerey <yvesg@google.com>
Cr-Commit-Position: refs/heads/master@{#27046}
2019-03-09 09:50:30 +00:00
Yves Gerey
42d8c93ec3 Revert "Delete rtc::TaskQueue::Current in favor of webrtc::TaskQueueBase::Current"
This reverts commit 304e9d2df3.

Reason for revert: Breaks downstream projects.
Seems to make VideoSendStreamTest.SupportsFlexfecSimulcastVp8 flaky.

Original change's description:
> Delete rtc::TaskQueue::Current in favor of webrtc::TaskQueueBase::Current
> 
> Bug: webrtc:10191
> Change-Id: I506cc50a90c73a6a4f6a3de36de0999cca72f5ba
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126230
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27035}

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

Change-Id: If98324f88e4b3d18bf2fe33597dfb9711867c243
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10191
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126484
Reviewed-by: Yves Gerey <yvesg@webrtc.org>
Commit-Queue: Yves Gerey <yvesg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27041}
2019-03-08 16:14:54 +00:00
Danil Chapovalov
304e9d2df3 Delete rtc::TaskQueue::Current in favor of webrtc::TaskQueueBase::Current
Bug: webrtc:10191
Change-Id: I506cc50a90c73a6a4f6a3de36de0999cca72f5ba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126230
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27035}
2019-03-08 13:17:46 +00:00
Rasmus Brandt
184f6d5d75 Change clip_name -> clip_path in VideoQualityTestFixture::Params::Video.
This allows external users of this test fixture to specify a custom
path, rather than just a custom file name.

Bug: webrtc:10349
Change-Id: I84e886c8bc28583017ce9ed7b9e7ee6a8e95730f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126227
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27033}
2019-03-08 12:43:30 +00:00
Benjamin Wright
7f1c58938d Adding new top-level directory crypto/
Adding the crypto root directory to WebRTC. The goal with this change is to
centralize the management of crypto code into a single location.

Currently we have cryptography code scattered across pc/ and rtc_base/
which makes it difficult audit and maintain.

By having a crypto/ directory we gain:
1. A clear first point of contact for auditing the cryptography in WebRTC.
2. Fine grain ownership to cryptography maintainers, we can include BoringSSL
   maintainers in this directory.
3. It improves maintanability of crypto code as we have improved modularization.
   It will not be deeply nested in all different parts of WebRTC.
4. Improved testability. We can cleanly build crypto libraries which plug into
   pc/ which we can more easily mock.
5. Enforce stricter rules. For example we may want to enforce ZeroOnFreeBuffer
   for all sensitive material. This is easier to enforce in a single directory.

Bug: webrtc:9600
Change-Id: I8e76332c7dcdac0a45a470ba2e930196e1ccf395
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125142
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27028}
2019-03-08 00:35:05 +00:00
Jeroen de Borst
2c7b9825bc Revert "Delete CodecSpecificInfo argument from VideoDecoder::Decode"
This reverts commit 39d3a7de02.

Reason for revert: This change broke an internal project

Original change's description:
> Delete CodecSpecificInfo argument from VideoDecoder::Decode
> 
> Bug: webrtc:10379
> Change-Id: I079b419604bf4e9c1994fe203d7db131a0ccddb6
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125920
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27022}

TBR=brandtr@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org,kthelgason@webrtc.org,sprang@webrtc.org

Change-Id: I2c730cc1834a3b23203fae3d7881f0890802c37b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10379
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126320
Reviewed-by: Jeroen de Borst <jeroendb@webrtc.org>
Commit-Queue: Jeroen de Borst <jeroendb@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27026}
2019-03-07 19:40:17 +00:00
Niels Möller
39d3a7de02 Delete CodecSpecificInfo argument from VideoDecoder::Decode
Bug: webrtc:10379
Change-Id: I079b419604bf4e9c1994fe203d7db131a0ccddb6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125920
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27022}
2019-03-07 16:18:49 +00:00
Rasmus Brandt
6f0aafa531 Add PrintResults to VideoCodecTest.
These are used by the test runner to pick up perf values
to be shown in the perf dashboard.

Bug: webrtc:10349
Change-Id: Ib3b2479f7a20b66192751bee8237d757f5870bd2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126220
Reviewed-by: Mirta Dvornicic <mirtad@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27020}
2019-03-07 15:12:40 +00:00
Niels Möller
d5af40225b Add overhead observers to MediaTransportInterface
Bug: webrtc:9719
Change-Id: I18a494ac2edd52c1f61673f850e6e8abebbc5d0a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/123192
Reviewed-by: Anton Sukhanov <sukhanov@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27019}
2019-03-07 14:54:52 +00:00
Niels Möller
b859b326ba Update more VideoEncoder implementations to drop CodecSpecificInfo input
Followup to https://webrtc-review.googlesource.com/c/src/+/125900.

Bug: webrtc:10379
Change-Id: If81c50c862bbcfd65a3cf7000c8327ebafe519c3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126002
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@{#27016}
2019-03-07 12:26:57 +00:00
Niels Möller
87e2d785a0 Prepare for splitting FrameType into AudioFrameType and VideoFrameType
This cl deprecates the FrameType enum, and adds aliases AudioFrameType
and VideoFrameType.

After downstream usage is updated, the enums will be separated
and be moved out of common_types.h.

Bug: webrtc:6883
Change-Id: I2aaf660169da45f22574b4cbb16aea8522cc07a6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/123184
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27011}
2019-03-07 10:12:57 +00:00
Elad Alon
de3360ec1d Create Vp8FrameBufferController
Vp8FrameBufferController is currently just a renamed Vp8TemporalLayers,
but subsequent CLs will modify Vp8FrameBufferController in ways that are
not relevant for Vp8TemporalLayers. Namely:
 1. Loss notifications will be added.
 2. Packet-loss rate will be tracked.
 3. RTT will be tracked.
 4. Vp8FrameBufferController will be made injectable.

Vp8TemporalLayers is retained in order to:
 1. Avoid needlessly changing api/.
 2. Place for code shared between DefaultTemporalLayers and ScreenshareLayers.
We can remove it in the future (with a proper public announcement).

Bug: webrtc:10382
Change-Id: I49ad1b9bc1954d51bb0b5e60361985f1eb12ae9f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126045
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27009}
2019-03-07 09:28:25 +00:00
Erik Språng
610c76323e Add target bitrate headroom signal to VideoStreamEncoder.
This CL plumbs an additional signal from VideoSendStream down to
VideoStreamEncoder, namely the amount of headroom that's left between
the encoder max bitrate and the current bitrate allocation for the
media track.

This will be used in follow-up CLs to tune encoder rate adjustment
and some codec specific paramaters a bit differently, based on the
knowledge if we are network constrained or not.

Bug: webrtc:10155
Change-Id: Ic6ccc79be5c6845468bab65b4ca9918b56923fa4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125981
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27008}
2019-03-07 08:42:41 +00:00
Danil Chapovalov
4423c36448 Migrate RepeatingTask to take raw pointer to TaskQueueBase instead of TaskQueue
In particular replace call rtc::TaskQueue::Current with TaskQueueBase::Current

Bug: webrtc:10191
Change-Id: I19d42a716d27f0aba087dc70ac65b4ee6249408f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125085
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27005}
2019-03-06 18:44:35 +00:00
Sebastian Jansson
11e55ee90a Renaming min_pacing_rate to min_total_allocated_bitrate.
This prepares for upcoming CL using the value for more than
controlling pacing rates.

Bug: webrtc:9887
Change-Id: Id3891c3727865149b87f946b3e7c3095a6ac9f26
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126001
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27004}
2019-03-06 18:09:16 +00:00
Jakob Ivarsson
232b3fda92 Expose relative packet arrival delay metric in stats API.
The metric is non-standard and documented in: https://github.com/henbos/webrtc-provisional-stats/pull/14

Bug: webrtc:10333
Change-Id: Ie5b4bbad5b1e2c9104742931529bab8f48f51f8c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125861
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26999}
2019-03-06 16:35:16 +00:00
Niels Möller
c8d2e73ed0 Delete CodecSpecificInfo argument from VideoEncoder::Encode
Bug: webrtc:10379
Change-Id: If9f92eb1e5891df284881082c53f0b1db1c26a38
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125900
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26992}
2019-03-06 14:01:31 +00:00
philipel
9df335374a Generic Frame Descriptor (GFD) VP8 templates.
In this CL:
 - Updated Vp8TemporalLayers::OnEncodeDone to take a CodecSpecificInfo
   instead of a CodecSpecificInfoVP8, so that both the VP8 specific and
   generic information can be populated.
 - Added structs to represent the GFD template structure.
 - Added code to generate templates for video/screensharing.

Bug: webrtc:10342
Change-Id: I978f9d708597a6f86bbdc494e62acf7a7b400db3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/123422
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26987}
2019-03-06 11:03:09 +00:00
Johannes Kron
0da25a1c8e Update TransportSequenceNumberV2 extension to support fixed size
The initial implementation forced the sender to use different sizes
of the RTP header extension depending on if a feedback request is
included or not. This can be a problem if the RTP header is pre-
allocated.
This CL changes this so that a static size of 4 bytes can be used
for the TransportSequenceNumberV2 RTP header extension. The change
in the protocol to get this to work is that
FeedbackRequest::sequence_count == 0 means that no feedback is
requested, and FeedbackRequest::sequence_count == 1 means that
feedback is requested for the current packet only.

Bug: webrtc:10262
Change-Id: Ia5134b3daf49f8a5b89f6c717894f6e055f39c8e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125420
Commit-Queue: Johannes Kron <kron@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26985}
2019-03-06 09:08:11 +00:00
Amit Hilbuch
e2a284d299 Adding metrics to measure usage of simulcast API.
Metrics are added to measure:
1. The number of send encodings in calls to AddTransceiver.
2. The number of times that simulcast is disabled because there is no
support from remote peer.
3. The number of times simulcast is indicated in ApplyLocal and
ApplyRemote and with which API surface (no simulcast, legacy munging,
spec-compliant).

Bug: webrtc:10372
Change-Id: I84717a1911efdf8aaf43cd6c04c7f09fcf2c58f0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125482
Commit-Queue: Amit Hilbuch <amithi@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26979}
2019-03-05 22:01:34 +00:00
Danil Chapovalov
07a4f2b267 Merge rtc_task_queue(_api|_impl)? build targets into one
Ignore rtc_link_task_queue_impl flag,
instead use build_with_chromium for custom chromium implementation injection

This changes TaskQueue implementation used in webrtc fuzzers in chromium:
from own webrtc implementation to chromium's.

Bug: webrtc:10191
Change-Id: I63be28b680ae8ea8ee1dbf0c699263c392ce29d3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125196
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26977}
2019-03-05 20:13:38 +00:00
Sebastian Jansson
bd7ed4bd5e Include sign for infinity in ToString for data units.
Bug: webrtc:9709
Change-Id: I8a4ee0797dca25dc7c3c414f24ada34c8bcbd7f8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125660
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26966}
2019-03-05 09:42:08 +00:00
Harald Alvestrand
15845af3cd Reland "Another mock for GetSctpTransport" (and add test)
This reverts commit 727504cf49.

Reason for revert: Added required INCLUDE to fix compile errors.

Original change's description:
> Revert "Another mock for GetSctpTransport"
>
> This reverts commit b2c4700d39.
>
> Reason for revert: Breaks Chrome build
>
> Original change's description:
> > Another mock for GetSctpTransport
> >
> > Bug: chromium:818643
> > Change-Id: I4ae7826efa7afa8e7b2ecd8a5928071a1b913ded
> > Reviewed-on: https://webrtc-review.googlesource.com/c/125340
> > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> > Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#26941}
>
> TBR=kwiberg@webrtc.org,hta@webrtc.org
>
> Change-Id: I98ddc61ca1e76d69b84138419d91ad9e40b04b1d
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:818643
> Reviewed-on: https://webrtc-review.googlesource.com/c/125380
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26943}

TBR=kwiberg@webrtc.org,hta@webrtc.org

Change-Id: I3eb410427f6660cd00319b43e7096bd634290e8a
Bug: chromium:818643
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125381
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26964}
2019-03-05 09:21:37 +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
e64a688167 Replacing Clock in ScreenshareLayers.
there's no easy way to inject the Clock in ScreenshareLayers under
normal use. To allow faking the clock, rtc::TimeMillis is used instead.

Bug: webrtc:10365
Change-Id: I46c7f76514672190a0f0f5816a2c858bc6c76fa4
Reviewed-on: https://webrtc-review.googlesource.com/c/125189
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26946}
2019-03-04 10:49:01 +00:00
Harald Alvestrand
727504cf49 Revert "Another mock for GetSctpTransport"
This reverts commit b2c4700d39.

Reason for revert: Breaks Chrome build

Original change's description:
> Another mock for GetSctpTransport
> 
> Bug: chromium:818643
> Change-Id: I4ae7826efa7afa8e7b2ecd8a5928071a1b913ded
> Reviewed-on: https://webrtc-review.googlesource.com/c/125340
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26941}

TBR=kwiberg@webrtc.org,hta@webrtc.org

Change-Id: I98ddc61ca1e76d69b84138419d91ad9e40b04b1d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:818643
Reviewed-on: https://webrtc-review.googlesource.com/c/125380
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26943}
2019-03-04 10:08:31 +00:00
Danil Chapovalov
3b548ddb1c Move rtc::NewClosure into own build target as ToQueuedTask
to make it usable without need to depend on rtc_task_queue

Bug: webrtc:10191
Change-Id: I2ae1445cf5d498aa6928d66b6823f2f940987767
Reviewed-on: https://webrtc-review.googlesource.com/c/125084
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26942}
2019-03-04 09:00:38 +00:00
Harald Alvestrand
b2c4700d39 Another mock for GetSctpTransport
Bug: chromium:818643
Change-Id: I4ae7826efa7afa8e7b2ecd8a5928071a1b913ded
Reviewed-on: https://webrtc-review.googlesource.com/c/125340
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26941}
2019-03-04 08:27:28 +00:00
Piotr (Peter) Slatala
b1ae10b172 Add x-mt line to the offer.
We already support decoding of the x-mt line. This change adds the
a=x-mt line to the SDP offer. This is not a backward compatible change
for media transport (because of the changes in pre-shared key handling)

1) if media transport is enabled, and SDES is enabled, generate the
media transport offer.
2) if media transport generated the offer, add that offer to the x-mt
line.
3) in order to create media transport, require an x-mt line (backward incompatible).

The way it works is that
1) PeerConnection, on the offerer, asks jsep transport for the
configuration of the media transport.
2) Tentative media transport is created in JsepTransportController when
that happens.
3) SessionDescription will include configuration from this tentative
media transport.
4) When the LocalDescription is set on the offerer, the tentative media
transport is promoted to the real media transport.

Caveats:
- now we really only support MaxBundle. In the previous implementations,
two media transports were briefly created in some tests, and the second
one was destroyed shortly after instantiation.
- we, for now, enforce SDES. In the future, whether SDES is used will be
refactored out of the peer connection.

In the future (on the callee) we should ignore 'is_media_transport' setting. If
Offer contains x-mt, media transport should be used (if the factory is
present). However, we need to decide how to negotiate media transport
for data channels vs data transport for media (x-mt line at this point
doesn't differentiate the two, so we still need to use app setting).

This change also removes the negotation of pre-shared key from the
a=crypto line. Instead, media transport will have its own, 256bit key.
Such key should be transported in the x-mt line. This makes the code
much simpler, and simplifies the dependency / a=crypto lines parsing.

Also, adds a proper test for the connection re-offer (on both sides: callee and caller).
Before, it was possible that media transport could get recreated, based on the offer.
The tests we had didn't test this scenario, and the loopback media factory didn't allow for such test.
This change adds counts to that loopback media factory, and asserts that only 1 media transport is created, even
when there is a re-offer.

Bug: webrtc:9719
Change-Id: Ibd8739af90e914da40ab412454bba8e1529f5a01
Reviewed-on: https://webrtc-review.googlesource.com/c/125040
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Peter Slatala <psla@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26933}
2019-03-01 20:32:16 +00:00
Sebastian Jansson
74682c1191 Inject TaskQueueFactory to video streams.
Bug: webrtc:10365
Change-Id: Ib655d8eac4467926bcb86cf2cb3728eabf5342d8
Reviewed-on: https://webrtc-review.googlesource.com/c/125089
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26921}
2019-03-01 11:35:39 +00:00
Mirko Bonadei
fc52b912a3 Implicitly suppress //build/config/clang:find_bad_constructs.
Since there is no way to enable/disable these diagnostics at runtime,
this CL moves the suppression into the rtc_* templates in order to
remove the need to explicitly add the snippet of code needed to
suppress it (currently copy/pasted in 144 locations).

The diagnostic that causes the most problems is the one about "complex
class/struct explicit ctor/dtor" [1] because WebRTC doesn't find
it useful enough.

Other diagnostics are good (for example the one that warns about
using "virtual" instead of "override", but that will be covered by
this clang-tidy check [2]) while others are Chromium related so
they have never triggered.

[1] - https://cs.chromium.org/chromium/src/tools/clang/plugins/FindBadConstructsConsumer.cpp?l=147-167&rcl=b4bebe1aa15dba7ca5fcc6456a81a55665327c3a
[2] - https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-override.html

Bug: webrtc:163
Change-Id: Icbf27efa5b369100a31e6a32df1a0913729b3b34
Reviewed-on: https://webrtc-review.googlesource.com/c/125088
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26918}
2019-03-01 10:18:17 +00:00
Danil Chapovalov
328027b6c4 Replace fatal error with error log
While passing negative delta is an error it is not fatal and recovered next line.

Bug: None
Change-Id: I3b9ce234a7763ba92bd158c9eda8ba4bd7a06f4b
Reviewed-on: https://webrtc-review.googlesource.com/c/124702
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26916}
2019-03-01 07:02:42 +00:00
Harald Alvestrand
cdea67dc5b Add GetSctpTransport to proxy map
Should have been in previous CL.

Bug: chromium:818643
Change-Id: I7306c37820ddc5552f6002d77d46768636a1b45b
Reviewed-on: https://webrtc-review.googlesource.com/c/125083
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26915}
2019-03-01 06:38:48 +00:00
Steve Anton
df5923da0c scale_resolution_down_by and rid are implemented
Bug: None
Change-Id: Ifccfb2f451fbcbbe9da3cd157dad66999475acce
Reviewed-on: https://webrtc-review.googlesource.com/c/125140
Reviewed-by: Amit Hilbuch <amithi@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26911}
2019-03-01 01:42:02 +00:00
Bjorn Mellem
9ded485caa Implement OpenChannel() on test media transports and make it pure virtual.
Bug: webrtc:9719
Change-Id: I9ec89fca7d4555f31b5192980f193b58d99e3b71
Reviewed-on: https://webrtc-review.googlesource.com/c/125100
Reviewed-by: Peter Slatala <psla@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26910}
2019-03-01 00:24:07 +00:00
Danil Chapovalov
f3280e99b0 Create conversions between webrtc::TaskQueueBase and rtc::TaskQueue
Bug: webrtc:10191
Change-Id: Ia6642081ac758e31c14780bdd83dbc88279cce6d
Reviewed-on: https://webrtc-review.googlesource.com/c/124826
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26890}
2019-02-28 10:36:07 +00:00
Harald Alvestrand
c85328f2ca Add SCTP transport to the public API.
This involves inserting an extra layer between jsep_transport_controller
and the cricket::SctpTransportInternal layer. The objects at this layer
are reference counted.

Bug: chromium:818643
Change-Id: Ibed57c4a538de981cee63e0f7f1f319f029cab39
Reviewed-on: https://webrtc-review.googlesource.com/c/123884
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26889}
2019-02-28 10:15:05 +00:00
Ivo Creusen
ba7886b076 Move command line flags out of NetEqTestFactory
This replaces the use of command-line flags with the use of a config
struct. This makes it easier for non command-line applications to use
the NetEqTestFactory to run simulations.

Bug: webrtc:10337
Change-Id: I24533bf206e70e12db9af8d9675769c1ff7c7d48
Reviewed-on: https://webrtc-review.googlesource.com/c/123600
Reviewed-by: Pablo Barrera González <barrerap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26887}
2019-02-28 10:01:25 +00:00
Piotr (Peter) Slatala
105ded358b Pass the x-mt line from SDP to the media transport
If x-mt line is present (one or more), and the first line is dedicated
for the media transport that we support, pass the config down to this
media transport.

In the future we will do 3 changes:
1) Add MediaTransportFactory::IsSupported(config) to let the
implementation decide whether the current factory can support a given
setting
2) Add support for multiple x-mt lines. Right now the support is
minimal: we only look at the first line (because we only allow single
media transport factory). In the future, when RtpMediaTransport is
introduced, this may and will change.
3) Allow multiple MediaTransportFactories and add fallback to RTP if
media transport is not supported.

Current solution provides backward compatibility for the 2 above
extensions.

Bug: webrtc:9719
Change-Id: I82a469fecda57effc95d7d8191f4a9e4a01d199c
Reviewed-on: https://webrtc-review.googlesource.com/c/124800
Commit-Queue: Peter Slatala <psla@webrtc.org>
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26882}
2019-02-27 22:45:30 +00:00
Ruslan Burakov
493a650b1e Propagate base minimum delay from video jitter buffer to webrtc/api.
On api level two methods were added to api/media_stream_interface.cc on VideoSourceInterface,
GetLatency and SetLatency. Latency is measured in seconds, delay in milliseconds but both describes
the same concept.


Bug: webrtc:10287
Change-Id: Ib8dc62a4d73f63fab7e10b82c716096ee6199957
Reviewed-on: https://webrtc-review.googlesource.com/c/123482
Commit-Queue: Ruslan Burakov <kuddai@google.com>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26877}
2019-02-27 15:08:34 +00:00
Elad Alon
48e7065ac6 Remove default IDs for RTP extensions from rtp_parameters.h
One-byte RTP extensions may only have IDs in the range 1-14.
For higher IDs, the two-byte format must be used.
If default IDs are set for all extensions, once 15 extensions are
defined by the code, some extensions will have IDs greater than 14.
This will happen even if only one extension actually ends up being
offered, so long as it's that unfortunate RTP extension.
It's better to dynamically assign the IDs to those extensions we
actually offer. The code that assigns the IDs is currently
distributed ( WebRtcVoiceEngine::GetCapabilities() and
WebRtcVideoEngine::GetCapabilities()), and without a bigger
refactoring effort would produce some ID collisions and mismatches.
Those are already handled by MergeRtpHdrExts(), so so that
should not be a problem.

Bug: webrtc:10288
Change-Id: I087f1ed5baa9fd61fd5556f1d82f540304ec6b93
Reviewed-on: https://webrtc-review.googlesource.com/c/122480
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26876}
2019-02-27 14:33:03 +00:00
Danil Chapovalov
d00405f89a Drop support for link-time injection of the rtc::TaskQueue::Impl
Bug: webrtc:10191
Change-Id: I1b975e8a2230dd45828a4e7f4d5a86f61164445a
Reviewed-on: https://webrtc-review.googlesource.com/c/124121
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26870}
2019-02-27 10:07:34 +00:00
Rasmus Brandt
7b3f4a2035 Remove unused |keyframe_interval| from codec tests.
Bug: webrtc:10349
Change-Id: Iada8c8a1824f6e5424f503bb67b00382069b1dbd
Reviewed-on: https://webrtc-review.googlesource.com/c/124486
Reviewed-by: Mirta Dvornicic <mirtad@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26866}
2019-02-27 07:26:30 +00:00
Piotr (Peter) Slatala
d6f61dd787 Add ::Connect method to the media transport interface
In order to enable ::Connect method, we also need to split the factory and create a method that creates media transport, but doesn't connect it.

So far media transport was connecting right away after creation. We would however want to expose some of the settings in SDP. SDP is created before connection is connected (and before ICE transport is created), and so we would like to be able to get the settings from the caller to the callee.

Bug: webrtc:9719
Change-Id: I1dc2f30c9a2dae8b3db04f14c8b334cd1b3ab5ab
Reviewed-on: https://webrtc-review.googlesource.com/c/124517
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Commit-Queue: Peter Slatala <psla@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26863}
2019-02-26 22:53:28 +00:00
Piotr (Peter) Slatala
1a16da1cf2 Remove deprecated CreateMediaTransport method
Bug: webrtc:9719
Change-Id: I4aef407c4770fc98abcbc114b87e73bbf13d8f56
Reviewed-on: https://webrtc-review.googlesource.com/c/124021
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Anton Sukhanov <sukhanov@webrtc.org>
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Commit-Queue: Peter Slatala <psla@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26860}
2019-02-26 18:32:22 +00:00
Danil Chapovalov
2684ab3db0 Test default TaskQueue implementation via TaskQueueBase interface
Bug: webrtc:10191
Change-Id: I97a73311790e8ceac00d5575dd124ad8ad76503f
Reviewed-on: https://webrtc-review.googlesource.com/c/124400
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26853}
2019-02-26 14:01:45 +00:00
Sebastian Jansson
2b08e3188e Adds CoDel implementation to network simulation.
Adds an implementation of the CoDel active queue management algorithm
to the network simulation. It is loosely based on CoDel pseudocode
from ACMQueue: https://queue.acm.org/appendices/codel.html

Bug: webrtc:9510
Change-Id: Ice485be35a01dafa6169d697b51b5c1b33a49ba6
Reviewed-on: https://webrtc-review.googlesource.com/c/123581
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26834}
2019-02-25 09:54:03 +00:00
Mirko Bonadei
c4dd730765 Fix -Wextra-semi warnings.
Starting from https://chromium-review.googlesource.com/c/1485012,
-Wextra-semi is enabled and WebRTC has some violations to fix.

This is a follow-up of https://webrtc-review.googlesource.com/c/123560.

Bug: webrtc:10355
Change-Id: I012b7497fc8991037fd77aa98f1579c22e08206f
Reviewed-on: https://webrtc-review.googlesource.com/c/124126
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26831}
2019-02-25 09:22:51 +00:00
Mirko Bonadei
a9cfa476fe Revert "Delete rtc_task_queue_impl build target"
This reverts commit 56973e627e.

Reason for revert: Breaks libfuzzer-asan Chromium trybots:
E.g.
https://ci.chromium.org/p/chromium/builders/luci.chromium.try/linux-libfuzzer-asan-rel/112220

Original change's description:
> Delete rtc_task_queue_impl build target
> 
> Bug: webrtc:10191
> Change-Id: I2ba660c403919708d28b5f5f2bdcffdb1e4ee486
> Reviewed-on: https://webrtc-review.googlesource.com/c/124040
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26826}

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

Change-Id: Ic04fc725e0a9cba84584ecf043b39b9d68f69bc7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10191
Reviewed-on: https://webrtc-review.googlesource.com/c/124124
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26828}
2019-02-24 09:17:31 +00:00