0
Commit Graph

1 Commits

Author SHA1 Message Date
Florent Castelli
8764dd4512 Introduce a safe-mode for the VideoCapture Service
On macOS, this disables loading 3rd-party DAL plugins, which may
crash upon use.
This relies on the hardened runtime from signed binaries.
When the CHILD_PLUGIN option is passed, the runtime is disabled and
3rd-party DAL plugins are allowed.
For developers convenience who cannot sign their binaries,
an environment variable was identified within the the macOS libraries
to achieve a similar effect and skip loading all DAL plugins.

This is enabled by the RetryGetVideoCaptureDeviceInfos feature which
is also updated accordingly.

The feature can now handle a service crash properly and is compiled
on all platforms, though only macOS will have at most one retry.
On the second attempt, the VideoCaptureService safe-mode will be
enabled.

Traces of the old RetryCount are removed since the value is unused.

Bug: 990381
Change-Id: If042b19006ef4166260941af5485897f65e5e0de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4209899
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Florent Castelli <orphis@chromium.org>
Reviewed-by: Alexander Alekseev <alemate@chromium.org>
Reviewed-by: Tony Herre <toprice@chromium.org>
Reviewed-by: Henrik Boström <hbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1103243}
2023-02-09 13:43:30 +00:00