Commit graph

247 commits

Author SHA1 Message Date
Steve Anton
2d2bbb16e5 Filter out duplicate receive codecs in the media engine
A malformed session description can assign the same codec to
different payload types which would hit a DCHECK in the
WebRtcVideoEngine. This changes the video engine to just ignore
the duplicate payload type instead of failing.

Bug: chromium:987598
Change-Id: I2034dd11d315ef05448630c860c7ca3f69ef700b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147943
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Amit Hilbuch <amithi@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28796}
2019-08-07 17:29:12 +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
Bjorn A Mellem
da4f09315f Reland "Only include payload in bytes sent/received."
This is a reland of 74a1b4b132

Original change's description:
> Only include payload in bytes sent/received.
>
> According to https://www.w3.org/TR/webrtc-stats/#sentrtpstats-dict* and
> https://tools.ietf.org/html/rfc3550#section-6.4.1, the bytes sent
> statistic should not include headers or padding.
>
> Similarly, according to
> https://www.w3.org/TR/webrtc-stats/#inboundrtpstats-dict*, bytes
> received are calculated the same way as bytes sent (eg. not including
> padding or headers).
>
> This change stops adding padding and headers to these statistics.
>
> Bug: webrtc:8516,webrtc:10525
> Change-Id: I891ad5a11a493cc3212afe93e13f62795bf4031f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146180
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Steve Anton <steveanton@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
> Commit-Queue: Bjorn Mellem <mellem@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28647}

Bug: webrtc:8516, webrtc:10525
Change-Id: Iaa1613e5becdfaa0af0f6b9f00e5b871937a719c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147520
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Bjorn Mellem <mellem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28731}
2019-08-01 01:08:24 +00:00
Bjorn Mellem
bcd068d045 Revert "Only include payload in bytes sent/received."
This reverts commit 74a1b4b132.

Reason for revert: requested by chromium

Original change's description:
> Only include payload in bytes sent/received.
> 
> According to https://www.w3.org/TR/webrtc-stats/#sentrtpstats-dict* and
> https://tools.ietf.org/html/rfc3550#section-6.4.1, the bytes sent
> statistic should not include headers or padding.
> 
> Similarly, according to
> https://www.w3.org/TR/webrtc-stats/#inboundrtpstats-dict*, bytes
> received are calculated the same way as bytes sent (eg. not including
> padding or headers).
> 
> This change stops adding padding and headers to these statistics.
> 
> Bug: webrtc:8516,webrtc:10525
> Change-Id: I891ad5a11a493cc3212afe93e13f62795bf4031f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146180
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Steve Anton <steveanton@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
> Commit-Queue: Bjorn Mellem <mellem@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28647}

TBR=steveanton@webrtc.org,ilnik@webrtc.org,hbos@webrtc.org,ossu@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,mellem@webrtc.org

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

Bug: webrtc:8516, webrtc:10525
Change-Id: Ibd31a8264c19f0c6f57d8deb3974593d198046ab
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147400
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Commit-Queue: Bjorn Mellem <mellem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28701}
2019-07-29 23:39:49 +00:00
Bjorn A Mellem
74a1b4b132 Only include payload in bytes sent/received.
According to https://www.w3.org/TR/webrtc-stats/#sentrtpstats-dict* and
https://tools.ietf.org/html/rfc3550#section-6.4.1, the bytes sent
statistic should not include headers or padding.

Similarly, according to
https://www.w3.org/TR/webrtc-stats/#inboundrtpstats-dict*, bytes
received are calculated the same way as bytes sent (eg. not including
padding or headers).

This change stops adding padding and headers to these statistics.

Bug: webrtc:8516,webrtc:10525
Change-Id: I891ad5a11a493cc3212afe93e13f62795bf4031f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146180
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Bjorn Mellem <mellem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28647}
2019-07-23 13:52:55 +00:00
Florent Castelli
66b3860fc9 Remove WebRTC-SimulcastScreenshare and enable it by default
As per the spec, you should be able to use simulcast with screenshare.
We remove the field trial for it and keep the old behavior only for
screenshare sources with conference flag on.

Bug: webrtc:8785
Change-Id: I1d6d4e18256fb5cfe0195620706de068f25b8d9b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144785
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28543}
2019-07-11 16:47:10 +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
Florent Castelli
668ce0c7fa Remove trial WebRTC-SimulcastMaxLayers and make its behavior default
Also cleans up the unused parameters from GetSimulcastConfig.

Bug: webrtc:8785, webrtc:8486
Change-Id: I1aea8f6c9e6590211ec5ee5cafc0ec2a2100d68f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144627
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28496}
2019-07-05 14:55:46 +00:00
Danil Chapovalov
53d45baa50 Make TaskQueueFactory required construction parameter for Call
Bug: webrtc:10284
Change-Id: I573ee0087c035e26918260c21b8b0213ddfe7ebc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143791
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28467}
2019-07-03 14:02:45 +00:00
philipel
e8ed83003d WebRtcVideoChannel encoder fallback.
In this CL:
 - Added WEBRTC_VIDEO_CODEC_ENCODER_FAILURE return code that can
   be returned by the encoder wrapper in case of a broken encoder.
 - Added EncoderFailureCallback interface that can be called
   to request encoder fallback to be performed. Implemented by
   WebRtcVideoChannel and called from the VideoStreamEncoder.
 - Updated SelectSendVideoCodec to select all compatible codecs instead
   of just one.

Bug: webrtc:10795
Change-Id: I87a83fd02e48c40493c930471c06c3d0941031ab
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140888
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28462}
2019-07-03 12:31:42 +00:00
Johannes Kron
bfd343b9be Add totalDecodeTime to RTCInboundRTPStreamStats
Pull request to WebRTC stats specification:
https://github.com/w3c/webrtc-stats/pull/450

Bug: webrtc:10775
Change-Id: Id032cb324724329fee284ebc84595b9c39208ab8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144035
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28440}
2019-07-02 08:28:06 +00:00
Rasmus Brandt
2efae7786e Add RTCStats for keyFramesEncoded, keyFramesDecoded.
This implements the correspondingly named JavaScript fields defined in
https://w3c.github.io/webrtc-stats/#inboundrtpstats-dict* and
https://w3c.github.io/webrtc-stats/#outboundrtpstats-dict*.

Bug: webrtc:7066
Change-Id: I431045bca80bf5faf27132c54f59c1f723c92952
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143683
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28404}
2019-06-27 14:59:47 +00:00
Chen Xing
90f3b89550 Replace the implementation of GetContributingSources() on the video side.
This change replaces the `ContributingSources`-implementation of `GetContributingSources()` and `GetSynchronizationSources()` on the video side with the spec-compliant `SourceTracker`-implementation.

The most noticeable impact is that the per-frame dictionaries are now updated when frames are delivered to the RTCRtpReceiver's MediaStreamTrack rather than when RTP packets are received on the network.

Bug: webrtc:10545
Change-Id: I895b5790280ac94c1501801d226c643633c67349
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143177
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Chen Xing <chxg@google.com>
Cr-Commit-Position: refs/heads/master@{#28386}
2019-06-26 11:57:33 +00:00
Niels Möller
3472b9ae22 Delete RTCInboundRTPStreamStats::fraction_lost
And delete corresponding plumbing via the internal stats attribute
MediaReceiverInfo::fraction_lost. The latter attribute is not deleted
yet, since downstream projects have to be updated first.

Bug: webrtc:10744
Change-Id: Id5401aeee7e5637a406ddf2fa33fbfe336abec9f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143178
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28385}
2019-06-26 11:43:23 +00:00
Mirta Dvornicic
479a3c0f92 Add support for enabling and negotiating raw RTP packetization.
Raw RTP packetization is done using the existing RtpPacketizerGeneric
without adding the generic payload header. It is intended to be used
together with generic frame descriptor RTP header extension.

Bug: webrtc:10625
Change-Id: I2e3d0a766e4933ddc4ad4abc1449b9b91ba6cd35
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138061
Commit-Queue: Mirta Dvornicic <mirtad@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28154}
2019-06-04 14:35:54 +00:00
Steve Anton
2dbc627aa0 Check H264 packetization mode when using IsSameCodec
H264 requires that the packetization modes are the same in order to
consider the code the same. This logic was added to VideoCodec::Matches
but was not reflected in IsSameCodec. This could manifest itself when a
remote description with an unsupported packetization mode is set.

Bug: webrtc:10693
Change-Id: Icda07f7d56a464895d2267a41cc0f2fd9d5f42ff
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138983
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Amit Hilbuch <amithi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28126}
2019-05-31 21:18:21 +00:00
Guido Urdaneta
6737841533 Add jitterBufferDelay and jitterBufferEmittedCount stats for video
Bug: webrtc:10450
Change-Id: I6f586a3c6781450b9bfdcc31dc3f49f6289d70e0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138265
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28096}
2019-05-29 06:23:57 +00:00
Elad Alon
fadb1811a8 Negotiate use of RTCP loss notification feedback (LNTF)
When the LossNotifications field trial is in effect, LNTF should
be offered/accepted in the SDP message, not assumed to be configured
on both sides equally.

Bug: webrtc:10662
Change-Id: Ibd827779bd301821cbb4196857f6baebfc9e7dc2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138079
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28056}
2019-05-24 12:44:14 +00:00
Elad Alon
040dc4388b Fix shadowing of override_field_trials_ in WebRtcVideoEngineTest
Bug: webrtc:10663
Change-Id: I6612997a0a03dc1e4d779acb059479cf10af3b17
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138062
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28024}
2019-05-22 14:11:39 +00:00
Anton Sukhanov
4f08faae82 Introduce MediaTransportConfig
Currently we pass media_transport from PeerConnection to media layers. The goal of this change is to replace media_transport with struct MediaTransportCondif, which will enable adding different transports (i.e. we plan to add DatagramTransport) as well as other media-transport related settings without changing 100s of files.

TODO: In the future we should consider also adding rtp_transport in the same config, but it will require a bit more work, so I did not include it in the same change.


Bug: webrtc:9719
Change-Id: Ie31e1faa3ed9e6beefe30a3da208130509ce00cd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137181
Commit-Queue: Anton Sukhanov <sukhanov@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28016}
2019-05-21 18:58:33 +00:00
Sergey Silkin
19da5ced24 Formatting of WebRTC-Vp9InterLayerPred field trial.
Use conventional style ../{Default|Disabled|Enabled} with parameter
inter_layer_pred_mode:{off|on|onkeypic} which maps directly to
InterLayerPredMode enum.

Bug: chromium:949536
Change-Id: If34e789b031d0db3eb2748b0b824492237ad5187
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137800
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28008}
2019-05-21 13:09:09 +00:00
Sebastian Jansson
40889f35fc Removes TimeMicros interface from ThreadProcessingFakeClock.
Bug: webrtc:9883
Change-Id: Ib48872f81f734b09e3ffa4d9d26da79177b02303
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133341
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27668}
2019-04-17 15:37:48 +00:00
Jonas Oreland
a3aa9bd75b Make VideoBitrateAllocatorFactory injectable.
This patch makes VideoBitrateAllocatorFactory injectable
by adding to PeerConnectionDependencies instead of allowing it to be
overridden using MediaEngine (on PeerConnectionFactory).

With this patch VideoBitrateAllocatorFactory is owned
by the PeerConnection.

WANT_LGTM (examples) : sakal@
WANT_LGTM (api/pc) : steveanton@

Bug: webrtc:10547
Change-Id: I768d400a621f2b7a98795eb7f410adb48651bfd6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132706
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27654}
2019-04-17 06:17:34 +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
Sergey Silkin
cf267052b3 Field trial to control inter-layer prediction.
This adds WebRTC-Vp9InterLayerPred field trial that allows to control
inter-layer prediction mode in VP9 encoder.

Bug: chromium:949536
Change-Id: Iea03db07fd21f28ab58382c5fdaac68acacc701c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131322
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27521}
2019-04-09 13:40:55 +00:00
Johannes Kron
5a0665bea4 Make UDP receive buffer size configurable via field trial
Bug: chromium:939340
Change-Id: I2ab18554d12a1e9c62f5d3d8f8237cc4d0a1a78c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131395
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27476}
2019-04-08 09:31:39 +00:00
Ilya Nikolaevskiy
33d2a91737 Fix target bitrate RTCP messages behavior for SVC streams
This is a better solution than https://webrtc-review.googlesource.com/c/src/+/129929 (which got reverted).
This CL instead filters out unused SSRCs from RtpConfig for RtpVideoSender.

Bug: webrtc:10485
Change-Id: Iaa8d07681419a2387c8253eb38e08a0828e9e688
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130505
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27433}
2019-04-03 09:36:38 +00:00
Piotr (Peter) Slatala
946b968111 Add support for target rate constraints
WebRTC video engine now configures bitrate on media transport
correctly.

Bug: webrtc:9719
Change-Id: I85884cd76644b7eca3763cec8ce9e31b5b64db27
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127941
Commit-Queue: Peter Slatala <psla@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27167}
2019-03-18 18:54:58 +00:00
Amit Hilbuch
e7a5f7bfae Modifying MediaChannel to accept CopyOnWriteBuffer by value.
MediaChannel accepted the RtpPacket buffers through non-const pointer.
This is both unclear and introduces questions regarding if the buffer is
actually copied or not.
This change modifies the method to accept by value to reduce ambiguity.
Usage of the non-const data() method which could potentially copy the
buffer contents is also reduced in favor of cdata() which never copies.

Bug: None
Change-Id: I3b2daef0d31cb6aacceb46c86da3a40ce836242b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127340
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Commit-Queue: Amit Hilbuch <amithi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27090}
2019-03-12 23:49:57 +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
Amit Hilbuch
b000b716d4 Wiring up RIDs from the video engine to the RTP Sender.
RIDs will now appear in the sent packets when they are supplied.
This is relevant for the Simulcast scenario which uses RIDs to
identify the different layers.

Bug: webrtc:10074
Change-Id: I2f281abc144f467e151a30ec13b8c375be4ac3e6
Reviewed-on: https://webrtc-review.googlesource.com/c/124140
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Commit-Queue: Amit Hilbuch <amithi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26843}
2019-02-25 19:13:39 +00:00
Elad Alon
ccb9b759c5 Create version 01 of Generic Frame Descriptor - with discardability flag
The discardability flag denotes whether the frame may be dropped by
the decoder with no effect on the decodability of subsequent frames.

Bug: webrtc:10214
Change-Id: I3654951d8863b50effe9670b8d1d7eb051240039
Reviewed-on: https://webrtc-review.googlesource.com/c/122241
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26763}
2019-02-20 10:31:58 +00:00
Elad Alon
157540ac05 Stop hard-coding default IDs for RTP extensions
Hard-coding default values forces IDs over 14 to be used even
when we offer less than 15 different extensions.

Note that the code relies on MergeRtpHdrExts for making sure
that extension IDs are kept consistent and non-colliding between
different streams (audio/video).

Bug: webrtc:10288
Change-Id: I3e59f7ddc8ca43cea91084a6b7f36df70fb6be4a
Reviewed-on: https://webrtc-review.googlesource.com/c/121646
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26622}
2019-02-09 01:04:35 +00:00
Rasmus Brandt
9387b52297 Apply simulcast resolution normalization before scaling.
With this CL, we normalize the resolution coming from the
capturer, before applying the requested scaling factors.
That has the benefit that the actual scale factor between
two layers will be the fraction of the requested scale
factors of the two layers.

Prior to this CL, when the normalization was done per layer,
the actual scale factor between two layers might not
have been the fraction of the requested scale factors
of the two layers.

Bug: webrtc:10069
Change-Id: I9ca4d394f259d5d37faee96a41204ff8df898907
Reviewed-on: https://webrtc-review.googlesource.com/c/121425
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Mirta Dvornicic <mirtad@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26550}
2019-02-05 14:33:15 +00:00
Florent Castelli
c1a0bcbe89 Implement the encoding RtpParameter scaleResolutionDownBy
Support varies by codec, especially in the simulcast case, but using
the EncoderSimulcastProxy codec should fix this.

Bug: webrtc:10069
Change-Id: Idb6a5f400ffda1cdb139004f540961a9cf85d224
Reviewed-on: https://webrtc-review.googlesource.com/c/119400
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26449}
2019-01-29 14:32:17 +00:00
Steve Anton
2c9ebefb44 Use Abseil container algorithms in media/
Bug: None
Change-Id: I292e3401bbf19a66271dd5ef2b3ca4f8dcfd155d
Reviewed-on: https://webrtc-review.googlesource.com/c/120003
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26434}
2019-01-29 02:35:50 +00:00
Steve Anton
f380284035 (7) Rename files to snake_case: remove forwarding headers
Bug: webrtc:10159
Change-Id: I2ba899e0283b953538c7941c8790213e36d7c70e
Reviewed-on: https://webrtc-review.googlesource.com/c/118561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26417}
2019-01-26 00:33:46 +00:00
Niels Möller
805a27e134 Reland "Refactor WebRtcVideoEngine tests to not use cricket::VideoCapturer, part 2."
This is a reland of aa8b94c170

Original change's description:
> Refactor WebRtcVideoEngine tests to not use cricket::VideoCapturer, part 2.
> 
> Update remaining tests of WebRtcVideoEngine.
> 
> Bug: webrtc:6353
> Change-Id: I63f86a6c3cd45e1c95345746ac4ecc018d2f29c6
> Reviewed-on: https://webrtc-review.googlesource.com/c/117560
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26331}

Bug: webrtc:6353
Change-Id: I052bea3be776140c0f301cc4383337c0aa62f4f5
Reviewed-on: https://webrtc-review.googlesource.com/c/118700
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26338}
2019-01-21 12:48:35 +00:00
Niels Moller
a882fb3ee4 Revert "Refactor WebRtcVideoEngine tests to not use cricket::VideoCapturer, part 2."
This reverts commit aa8b94c170.

Reason for revert: Timestamp-related breakage in downstream tests. 
Will try to reland together with fix in cl https://webrtc-review.googlesource.com/c/src/+/118680

Original change's description:
> Refactor WebRtcVideoEngine tests to not use cricket::VideoCapturer, part 2.
> 
> Update remaining tests of WebRtcVideoEngine.
> 
> Bug: webrtc:6353
> Change-Id: I63f86a6c3cd45e1c95345746ac4ecc018d2f29c6
> Reviewed-on: https://webrtc-review.googlesource.com/c/117560
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26331}

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

Change-Id: I901fe7416390aa36716b4124c8bbc6b751c26cee
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:6353
Reviewed-on: https://webrtc-review.googlesource.com/c/118681
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26332}
2019-01-21 08:44:47 +00:00
Niels Möller
aa8b94c170 Refactor WebRtcVideoEngine tests to not use cricket::VideoCapturer, part 2.
Update remaining tests of WebRtcVideoEngine.

Bug: webrtc:6353
Change-Id: I63f86a6c3cd45e1c95345746ac4ecc018d2f29c6
Reviewed-on: https://webrtc-review.googlesource.com/c/117560
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26331}
2019-01-21 07:34:41 +00:00
Niels Möller
3de32e6e8c Add test WebRtcVideoChannelTest.DoesNotAdaptWhenScreeensharing
Bug: None
Change-Id: Ib0c8a2eeb816631aac65236114b0487104a5c698
Reviewed-on: https://webrtc-review.googlesource.com/c/118121
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26321}
2019-01-18 13:28:47 +00:00
Niels Möller
fb7a6a7f8d Delete test WebRtcVideoChannelTest.AdaptsOnOveruseAndChangeResolution
It only tests the videoadaptation in the test class FakeVideoCapturer.

Bug: webrtc:6353
Change-Id: I4766eebc5cfa7412fde9fd6e5173f1b2381a5d87
Reviewed-on: https://webrtc-review.googlesource.com/c/118042
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26297}
2019-01-17 14:23:52 +00:00
Niels Möller
dcc70297cd Simplify WebRtcVideoChannelTest.PreviousAdaptationDoesNotApplyToScreenshare
Test wiring to DegradationPreference passed to
VideoSendStream::SetSource, but not the adaptation implemented in the
test class FakeVideoCapturer.

Bug: webrtc:6353
Change-Id: Iec2ae89283fb856822ea2829db17eaa02337b467
Reviewed-on: https://webrtc-review.googlesource.com/c/117641
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26278}
2019-01-16 13:02:49 +00:00
Niels Möller
45ccd8488e Don't set the screenshare flag on FakeVideoCapturerWithTaskQueue
A capturer with this flag was set in
WebRtcVideoChannelTest.PreviousAdaptationDoesNotApplyToScreenshare.
But the flag is used only by the VideoCapturerTrackSource class, which
isn't used in this test.

Bug: webrtc:6353
Change-Id: I58058c882c5a65b5cfa9921e302c422c8ccb20a9
Reviewed-on: https://webrtc-review.googlesource.com/c/117561
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26256}
2019-01-15 10:22:13 +00:00
Niels Möller
d0f0f68953 Refactor WebRtcVideoEngine tests to not use cricket::VideoCapturer, part 1.
Replaced with a combination of cricket::FakeFrameSource and
webrtc::test::FrameForwarder. This cl converts the first three
affected tests, the rest will follow.

Bug: webrtc:6353
Change-Id: I556f6b58f4ca81234ffae3dc6e1319f9c60a76ae
Reviewed-on: https://webrtc-review.googlesource.com/c/117260
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26239}
2019-01-14 12:34:51 +00:00
Steve Anton
10542f21c8 (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries
Mechanically generated by running this command:

tools_webrtc/do-renames.sh update all-renames.txt && git cl format

Then manually updating:

tools_webrtc/sanitizers/tsan_suppressions_webrtc.cc

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I54824cd91dada8fc3ee3d098f971bc319d477833
Reviewed-on: https://webrtc-review.googlesource.com/c/115653
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26226}
2019-01-11 17:11:39 +00:00
Steve Anton
1c05765831 (3) Rename files to snake_case: move the files
Mechanically generated with this command:

tools_webrtc/do-rename.sh move all-renames.txt

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I8b05b6eab9b9d18b29c2199bbea239e9add1e690
Reviewed-on: https://webrtc-review.googlesource.com/c/115481
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26225}
2019-01-11 17:05:20 +00:00
Renamed from media/engine/webrtcvideoengine_unittest.cc (Browse further)