If an instance of AudioRtpReceiver was initialized with a valid media
channel pointer (i.e. SetMediaChannel() was not being called), then
OnChanged() notification would not be handled correctly.
This fixes the issue by making sure the safety flag is marked as
'alive' when [re]starting the media channel.
Bug: webrtc:13854
Fixes: webrtc:13854
Change-Id: Iaa5cfeb4036bfc9dc2efbfa9e1319d508ab151a9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256361
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36290}
This CL addresses an issue where the desktop appears to freeze after
resizing the desktop in a curtained CRD session when using the DXGI
capturer. This problem does not reproduce when using the GDI capturer
nor does it reproduce when the Windows session is attached to the local
console.
After digging in, it appears that the DXGI DuplicateOutput API stops
providing updated frame data. No errors are returned but yet no data is
produced. The problem is that when in this condition, there isn't a
good way to discern between this problem and a case where the desktop
is actually static.
The DxgiDuplicatorController already contains logic to attempt to
capture a frame prior to returning success after reinitialization. This
logic works fine in the console case and occasionally works in the
detached session case. What I noticed in my reproductions was that DXGI
would produce a few frames before hanging (usually 1-2 but sometimes 3
or 4). My solution is to check the session state and adjust the number
of frames we attempt to capture (I also simplified the wait logic as
there was a bug in the time calc and it seemed more complicated than it
needed to be).
One option considered would be to introduced a new differ class higher
up in the stack which would run the GDI and DXGI capturers in parallel
(instead of in the fallback configuration as they are today) however
that seemed like overkill for this specific issue.
Bug: chromium:1307357
Change-Id: Idba4bb9b2aa7692040344d480be3f0d09b9ce9e9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256214
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Jamie Walch <jamiewalch@google.com>
Commit-Queue: Joe Downing <joedow@google.com>
Cr-Commit-Position: refs/heads/main@{#36286}
Change adds callbacks to the class so that the remote desktop portal can
still make use of this class for selecting sources but can provide its
own implementation on what to do after the sources are selected.
Furthermore, few getters are exposed in the class interface so as to
allow the remote desktop portal class to leverage them when sending the
captured pipewire frames onto the capture stream's consumer. Setters are
added for session, pipewire stream node id and few interfaces are made
public since remote desktop portal relies on them (e.g.
`SelectSources`).
The reason behind the change is that remote desktop portal depends on
screen cast portal for selecting sources. Also the setup to select
devices to control remotely as well as source selection should be
handled as part of the same session (and session should be
instantiated only once).
Currently, starting the screencast portal calls into a callback chain
that not only selects the sources but also starts the session but with
this change a consumer, such as remote desktop portal, can hook into
this callback chain by overriding the callbacks and provide a custom
callback chain from there onwards, if need be.
Bug: chromium:1291247
Change-Id: I983aff062ec2ddf52fdef5545fc58fede416e6ed
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249862
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Salman Malik <salmanmalik@google.com>
Cr-Commit-Position: refs/heads/main@{#36285}
Update `early_execute_margin` after process packets, and the test case.
Original change's description:
>Pacer: Reduce TQ wake up and improve packet size estimation
>
>The TQ Pacer schedules delayed task according to target time of
>PacingController. It drains all valid ProcessPackets() in single loop,
>denies retired scheduled tasks, and round up the timeout to 1ms.
>
>This CL also improves packet size estimation in TQ Pacer by removing
>zero initialization, and introduces `include_overhead_` configuration.
>
>Tests:
>1. webrtc_perf_tests: MaybeProcessPackets() calls
> 2075147 -> 2007995
>
>2. module_unittests: MaybeProcessPackets() calls
> 203393 -> 183563
>
>3. peerconnection_unittests: MaybeProcessPackets() calls
> 66713-> 64333
>
>Bug: webrtc:13417, webrtc:13437
>Change-Id: I18eb0a36dbe063c606b1f27014df74a65ebfc486
>Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/242962
>Reviewed-by: Erik Språng <sprang@webrtc.org>
>Reviewed-by: Henrik Boström <hbos@webrtc.org>
>Commit-Queue: Erik Språng <sprang@webrtc.org>
>Cr-Commit-Position: refs/heads/main@{#36179}
Bug: webrtc:13417, webrtc:13437
Change-Id: I79f2554cf02364b67ce7073698611a3ae337a73b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256145
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Owners-Override: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36283}
This reverts commit 865d94e45258c9c8876ea4cbdd5dade510cb7d93.
First patch is the same as original cl. Second patch includes a fix to ensure the clamped bitrate does not increase to 85% of the last network estimate.
Bug: none
Change-Id: Idf1b2af3fb60c0d392c48c1b6c0d8526f900f9d6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256016
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36270}
The diff capturer wrapper doesn't work if the frame doesn't have any
rectangle and a static image is observed while chromoting. This change
adds a rectangle to the frame object, as done by other capturers, and
this in turn ensures that the wrapper that calulcates diffs from one
frame to the next can do its job.
Bug: chromium:1291247
Change-Id: I5bf1981f34b3a88ad4d82a081fed1ce210f71ed0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251205
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Salman Malik <salmanmalik@google.com>
Cr-Commit-Position: refs/heads/main@{#36263}
Also update API proxy Create() factory functions to accept the inner
reference counted object via scoped_refptr instead of a raw pointer.
This is to avoid accidentally creating and deleting an object when
passing an inner object to a proxy class.
Consider something like:
auto proxy = MyProxy::Create(
signaling_thread(), make_ref_counted<Foo>());
Bug: webrtc:13464, webrtc:12701
Change-Id: I55ccfff43bbc164a5e909b2c9020e306ebb09075
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256010
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36261}
Extract helper methods from screencast portal that can be
reused for remote desktop portal client.
Bug: chromium:1291247
Change-Id: I66d09c75f0c34d81c7ceff8998720fbbd1902ac8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249860
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Salman Malik <salmanmalik@google.com>
Cr-Commit-Position: refs/heads/main@{#36256}
This seems to be unused and also differs from other proxy
implementations in that proxies are generally for reference counted
interfaces whereas the 'owned proxy' macros are not.
Bug: webrtc:13464, webrtc:12701
Change-Id: I2fc2c2f186bccab8388928d41610112c3b5f88ac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256018
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36255}
Also add a script to do the bridge between a python 2 and a python 3 interpreter.
This should be removed when the merge scripts will be using python 3 (https://crbug.com/webrtc/13835).
Note that webrtc_dashboard_upload.py will be removed when the new script is stabilized.
Bug: webrtc:13806
Change-Id: I806fa11f417ef37674bdaeb5126c71570e3697d7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/255560
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Christoffer Jansson <jansson@google.com>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Christoffer Jansson <jansson@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#36252}
This reverts commit e66e6a845b50f212ebb60234446cfc9db897879c.
Reason for revert:
May cause BWE to increase on delay increase if link capacity estimate is too high.
Original change's description:
> Apply lower bound of delay based estimate in AimdRateControl::ClampBitrate
>
> This move the functionality of applying the lower bound of a network estimate to AimdRateControl::ClampBitrate instead of ChangeBitrate.
> The purpose is to be able to also clamp probe estimates set by AimdRateControl::SetEstimate as well.
>
> Bug: none
> Change-Id: I6a4d64d2e98bb99da06010e2edaf20dc42880e37
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/255823
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Commit-Queue: Per Kjellander <perkj@webrtc.org>
> Reviewed-by: Diep Bui <diepbp@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36219}
Bug: none
Change-Id: I8c65b1461160dbf3d35e50ef2cc6f9bc305c2b15
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256011
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36248}
Add a flag to override the key pressed state when simulating APM.
The current behavior changes as follows:
- Wav files simulation: instead of simulating continuous key press
events only if the transient suppressor (TS) sub-module is active,
allow to simulate the events regardless of whether TS is used;
the default key pressed state is used if the command line flag is
unspecified, otherwise it is overridden (either always false or
always true)
- AEC dump simulation: instead of simulating continuous key press
events when `--ts 2` is specified, allow to simulate the events
regardless of whether TS is used; the state recorded in the AEC
dump is used if the command line flag is unspecified, otherwise
it is overridden (either always false or always true)
- The `--ts 2` option (continuous key events) is now equivalent to
`--ts 1`.
Bug: webrtc:13663
Change-Id: I5ebe96283db73ee235ec2b2795d91d4e241a3527
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256003
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36247}