Plus all the annotations that were necessary to make things compile
again. I also had to send copies of some values owned by the signal
thread to the network thread, instead of letting the latter read them
itself.
Bug: webrtc:9987
Change-Id: Ic4b38696245584bab44956e60ac63753146e3ff4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131020
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27437}
This reverts commit caedb5db82b2bc8273910f4a0d1afb1d0e2994f3.
Reason for revert: Fixed issue (allow SetNeedsIceRestart from off-thread).
Original change's description:
> Revert "Add thread guards to JsepTransport"
>
> This reverts commit 7e1db52c93c57a180073906eda6a58919a9fd537.
>
> Reason for revert: Breaks downstream.
>
> Original change's description:
> > Add thread guards to JsepTransport
> >
> > This ensures that JsepTransport's methods are either only accessed on the thread
> > that creates it, or using methods that are marked for off-thread use
> > (using a lock to prevent simultaneous access).
> >
> > The intent is to document the existing contract, and to make it easy to find the
> > actions needed to convert the class to a pure single-threaded class.
> >
> > Bug: webrtc:10300
> > Change-Id: Ib5cdc027632c36baec55179937d6eb664bbaf6f5
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/121946
> > Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> > Reviewed-by: Henrik Boström <hbos@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#27427}
>
> TBR=steveanton@webrtc.org,solenberg@webrtc.org,kwiberg@webrtc.org,hbos@webrtc.org,hta@webrtc.org
>
> Change-Id: I30c65d2161de9376ccd1172e2b261f2280fb1d75
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:10300
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130519
> Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
> Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27429}
Change-Id: Ic32bfc04d96e657fc67c3d3999f77969e55ed994
Bug: webrtc:10300
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130962
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27434}
Wine implements ::QueueUserAPC incorrectly and returns
ERROR_ACCESS_DENIED when the thread is terminating instead of
ERROR_GEN_FAILURE. This is (hopefully) safe to do, assuming
the correct Windows implementation would never use ERROR_ACCESS_DENIED
in an actual failure case. I can't find documentation that says one
way or the other.
Bug: None
Change-Id: If74a40bb7e1cd49cc2266c31684bd88f1c667422
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131042
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27432}
After reviewer feedback, this CL was reduced to just adding scary
comments on two variables.
Bug: webrtc:9987
Change-Id: Id1e251ffd02e4ca8050235bd9f3971b5363f0e3f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130960
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27431}
This reverts commit 7e1db52c93c57a180073906eda6a58919a9fd537.
Reason for revert: Breaks downstream.
Original change's description:
> Add thread guards to JsepTransport
>
> This ensures that JsepTransport's methods are either only accessed on the thread
> that creates it, or using methods that are marked for off-thread use
> (using a lock to prevent simultaneous access).
>
> The intent is to document the existing contract, and to make it easy to find the
> actions needed to convert the class to a pure single-threaded class.
>
> Bug: webrtc:10300
> Change-Id: Ib5cdc027632c36baec55179937d6eb664bbaf6f5
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/121946
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27427}
TBR=steveanton@webrtc.org,solenberg@webrtc.org,kwiberg@webrtc.org,hbos@webrtc.org,hta@webrtc.org
Change-Id: I30c65d2161de9376ccd1172e2b261f2280fb1d75
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10300
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130519
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27429}
This ensures that JsepTransport's methods are either only accessed on the thread
that creates it, or using methods that are marked for off-thread use
(using a lock to prevent simultaneous access).
The intent is to document the existing contract, and to make it easy to find the
actions needed to convert the class to a pure single-threaded class.
Bug: webrtc:10300
Change-Id: Ib5cdc027632c36baec55179937d6eb664bbaf6f5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/121946
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27427}
When setting display scale to 200%, the mouse was shared only
for the top left quarter.
Regressed since https://chromium-review.googlesource.com/641075.
Indeed frame->rect() takes into account scale_factor while the
frame is constructed with a size that does not take this scale
factor into account.
Also make sure to do a float disivison in DesktopFrame::scale_factor()
so that it returns 1.5 instead of 1 when dpi is 144 (i.e. 150%).
Bug: chromium:948362
Change-Id: Ic10f44946c9f1b53181244a44a5b45109c259f9f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130371
Reviewed-by: Brave Yao <braveyao@webrtc.org>
Commit-Queue: Julien Isorce <julien.isorce@chromium.org>
Cr-Commit-Position: refs/heads/master@{#27424}
This prepares for running WebRTC in simulated time where event::Wait
based timing doesn't work.
Bug: webrtc:10365
Change-Id: Ia0f9b1cc8e3c8c27a38e45b40487050a4699d8cf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129962
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27422}
Fixed todo by replacing SequenceNumberUnwrapper with updated class
SeqNumUnwrapper that correctly handles reordering of early packets.
Bug: webrtc:10263
Change-Id: Iffd93db924fee132d35752996b8d29acbb315d24
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130498
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27417}
Refactoring of quality measurement code, basing frame matching on
frame thumb likeness. This way the code is robust against variations
in timing and frame drops.
Bug: webrtc:9510
Change-Id: Ief7266e01f39ca621a529c0da736e5ed1df8560a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/124401
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27415}
This change removes the (unused) ability of EchoRemover overriding
the delay of the RenderDelayController. The change is tested for
bit-exactness.
Bug: webrtc:8671
Change-Id: I188ef740f1437de64ffe236d07a7dcd4128192c2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130518
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27414}
The existing windows dshow capture code was ignoring the requested
capture format when enumerating preferred formats. This CL changes
the behavior to move the requested format to the start of the
preferred list. This should fix an issue causing MJPEG to be not
selected on certain devices because other formats were preferred,
resulting in reduced framerates for HD capture (USB 2.0 throughput
isn't high enough to support capturing 30fps 720p I420 data, and many
cameras, even internal, are on the USB 2.0 bus).
Note that Chromium has yet a different implementation, which is if
MJPEG is selected, it claims to *only* support MJPEG and no other
formats. This solution seems more correct; if, for some reason,
MJPEG was listed as supported but isn't asked of the pin, this
code will still produce some output, just possibly at a lower framerate
or resolution.
Bug: None
Change-Id: Id86f345936f6f32e08beec02925e41056c87a544
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130843
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27412}
This CL uses RTC_EXPORT (defined in rtc_base/system/rtc_export.h)
to mark WebRTC symbols as visible from a shared library, this doesn't
mean these symbols are part of the public API (please continue to refer
to [1] for info about what is considered public WebRTC API).
[1] - https://webrtc.googlesource.com/src/+/HEAD/native-api.md
Bug: webrtc:9419
Change-Id: Ib2c29054b2ae008f5291bd3b762a504b18534326
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130513
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27410}
This reverts commit 7276b974b78ea4f409d8738b1b6f1515f7a8968e.
Reason for revert: Changing to a later Chrome release.
Original change's description:
> Disable DTLS 1.0, TLS 1.0 and TLS 1.1 downgrade in WebRTC.
>
> This change disables DTLS 1.0, TLS 1.0 and TLS 1.1 in WebRTC by default. This
> is part of a larger effort at Google to remove old TLS protocols:
> https://security.googleblog.com/2018/10/modernizing-transport-security.html
>
> For the M74 timeline I have added a disabled by default field trial
> WebRTC-LegacyTlsProtocols which can be enabled to support these cipher suites
> as consumers move away from these legacy cipher protocols but it will be off
> in Chrome.
>
> This is compliant with the webrtc-security-arch specification which states:
>
> All Implementations MUST implement DTLS 1.2 with the
> TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 cipher suite and the P-256
> curve [FIPS186]. Earlier drafts of this specification required DTLS
> 1.0 with the cipher suite TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, and
> at the time of this writing some implementations do not support DTLS
> 1.2; endpoints which support only DTLS 1.2 might encounter
> interoperability issues. The DTLS-SRTP protection profile
> SRTP_AES128_CM_HMAC_SHA1_80 MUST be supported for SRTP.
> Implementations MUST favor cipher suites which support (Perfect
> Forward Secrecy) PFS over non-PFS cipher suites and SHOULD favor AEAD
> over non-AEAD cipher suites.
>
> Bug: webrtc:10261
> Change-Id: I847c567592911cc437f095376ad67585b4355fc0
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125141
> Commit-Queue: Benjamin Wright <benwright@webrtc.org>
> Reviewed-by: David Benjamin <davidben@webrtc.org>
> Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27006}
TBR=steveanton@webrtc.org,davidben@webrtc.org,qingsi@webrtc.org,benwright@webrtc.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: webrtc:10261
Change-Id: I34727e65c069e1fb2ad71838828ad0a22b5fe811
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130367
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27403}
This is a reland of 177670afd6d4aa414e4aa75983da538b7f350ee8
Fixing failing tests.
TBR=magjed@webrtc.org
Original change's description:
> Add bindings for simulcast and RIDs in Android SDK.
>
> This adds the bindings for rid in RtpParameters.Encoding and bindings
> for send_encodings in RtpTransceiverInit to allow creating a transceiver
> with multiple send encodings.
>
> Bug: webrtc:10464
> Change-Id: I4c205dc0f466768c63b7efcb3c68e93277236da0
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128960
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Reviewed-by: Seth Hampson <shampson@webrtc.org>
> Commit-Queue: Amit Hilbuch <amithi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27323}
Bug: webrtc:10464
Change-Id: I95fac3967217c20a9fdddb490aea30eca2061ef0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130362
Commit-Queue: Amit Hilbuch <amithi@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27402}
All application with empty title were not listed, for example Photos.
Fallback to owner name in that case while making sure to keep ignoring
the ghost window.
Most of the ghost windows can be filtered with IsWindowOnScreen
or IsWindowFullScreen except a few. For the remaining ghost we check
if there is no other window with the same pid.
Bug: chromium:516230
Test: Hangouts or Rumpus
Change-Id: Ibb9f98887e5aedf822fc0611836b1938b5056d43
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130360
Commit-Queue: Julien Isorce <julien.isorce@chromium.org>
Reviewed-by: Brave Yao <braveyao@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27401}
This updates behavior to be aligned with the WebRTC spec.
Bug: chromium:948055
Change-Id: Id3bbf05b3df084c9b7f7d12598c09187679d60fc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130493
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27394}
The has some benefits:
* We no longer need locks to protect the emulated network node state.
* We only process when there are packets in flight.
* It makes Scenario more similar to network emulation manager.
Bug: webrtc:10365
Change-Id: I8bd1ad1edfb54b047e8109dabd9846ae451cef17
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127548
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27393}
The network rate is based on a strict leaky buck with no underrun.
The media rate has almost the same algorithm, but allows the bufer level
to become negative down to -5 frames worth of data. This allows tracking
the average bitrate over a window and can be used as an alternative
upper bound when the encoder target is not link constrained.
Bug: webrtc:10155
Change-Id: I0d72157f7c0f0799e15572bf4797fa1b5636b22e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129723
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27392}
This is useful in tests as it allows overriding the default after
construction. It's not intended for use in production (as it can
be confusing to readers).
Bug: webrtc:10365
Change-Id: I8ac2541f2626e7fddbb61bdae72e9571ce9d7b97
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130468
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27389}