mirror of
https://git.freebsd.org/ports.git
synced 2025-05-20 19:13:27 -04:00
with these changes, chromium now automatically selects which audio backend to use in the following order: pulse (if running) -> sndio -> alsa -> fake an additional command line option has been also implemented so that the user can force which backend to use: --audio-backend={auto,sndio,pulse,alsa} Security: https://vuxml.freebsd.org/freebsd/8247af0d-183b-11ef-9f97-a8a1599412c6.html PR: 246449
99 lines
5 KiB
C++
99 lines
5 KiB
C++
--- content/utility/services.cc.orig 2024-05-21 18:07:39 UTC
|
|
+++ content/utility/services.cc
|
|
@@ -74,7 +74,7 @@
|
|
extern sandbox::TargetServices* g_utility_target_services;
|
|
#endif // BUILDFLAG(IS_WIN)
|
|
|
|
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
|
|
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
|
|
#include "media/mojo/services/mojo_video_encode_accelerator_provider_factory.h"
|
|
#include "sandbox/linux/services/libc_interceptor.h"
|
|
#include "sandbox/policy/mojom/sandbox.mojom.h"
|
|
@@ -97,7 +97,7 @@ extern sandbox::TargetServices* g_utility_target_servi
|
|
#endif // BUILDFLAG(IS_CHROMEOS_ASH) && (BUILDFLAG(USE_VAAPI) ||
|
|
// BUILDFLAG(USE_V4L2_CODEC))
|
|
|
|
-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \
|
|
+#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \
|
|
(BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC))
|
|
#include "content/common/features.h"
|
|
#include "media/mojo/services/stable_video_decoder_factory_process_service.h" // nogncheck
|
|
@@ -115,13 +115,13 @@ extern sandbox::TargetServices* g_utility_target_servi
|
|
#endif // BUILDFLAG(ENABLE_ACCESSIBILITY_SERVICE)
|
|
|
|
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || \
|
|
- BUILDFLAG(ENABLE_VIDEO_EFFECTS)
|
|
+ BUILDFLAG(ENABLE_VIDEO_EFFECTS) || BUILDFLAG(IS_BSD)
|
|
#include "services/viz/public/cpp/gpu/gpu.h"
|
|
#include "services/viz/public/mojom/gpu.mojom.h"
|
|
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ||
|
|
// BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(ENABLE_VIDEO_EFFECTS)
|
|
|
|
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH)
|
|
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
|
|
#include "media/capture/capture_switches.h"
|
|
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ||
|
|
// BUILDFLAG(IS_CHROMEOS_ASH)
|
|
@@ -239,7 +239,7 @@ auto RunAudio(mojo::PendingReceiver<audio::mojom::Audi
|
|
<< "task_policy_set TASK_QOS_POLICY";
|
|
#endif
|
|
|
|
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
|
|
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
|
|
auto* command_line = base::CommandLine::ForCurrentProcess();
|
|
if (sandbox::policy::SandboxTypeFromCommandLine(*command_line) ==
|
|
sandbox::mojom::Sandbox::kNoSandbox) {
|
|
@@ -328,7 +328,7 @@ auto RunVideoCapture(
|
|
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
|
auto service = std::make_unique<UtilityThreadVideoCaptureServiceImpl>(
|
|
std::move(receiver), base::SingleThreadTaskRunner::GetCurrentDefault());
|
|
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH)
|
|
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
|
|
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
|
{
|
|
#else
|
|
@@ -384,7 +384,7 @@ auto RunOOPArcVideoAcceleratorFactoryService(
|
|
#endif // BUILDFLAG(IS_CHROMEOS_ASH) && (BUILDFLAG(USE_VAAPI) ||
|
|
// BUILDFLAG(USE_V4L2_CODEC))
|
|
|
|
-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \
|
|
+#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \
|
|
(BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC))
|
|
auto RunStableVideoDecoderFactoryProcessService(
|
|
mojo::PendingReceiver<
|
|
@@ -395,7 +395,7 @@ auto RunStableVideoDecoderFactoryProcessService(
|
|
#endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) &&
|
|
// (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC))
|
|
|
|
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
|
|
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
|
|
auto RunVideoEncodeAcceleratorProviderFactory(
|
|
mojo::PendingReceiver<media::mojom::VideoEncodeAcceleratorProviderFactory>
|
|
receiver) {
|
|
@@ -418,7 +418,7 @@ void RegisterIOThreadServices(mojo::ServiceFactory& se
|
|
// loop of type IO that can get notified when pipes have data.
|
|
services.Add(RunNetworkService);
|
|
|
|
-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \
|
|
+#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \
|
|
(BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC))
|
|
if (base::FeatureList::IsEnabled(
|
|
features::kRunStableVideoDecoderFactoryProcessServiceOnIOThread)) {
|
|
@@ -470,7 +470,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory&
|
|
#endif // BUILDFLAG(IS_CHROMEOS_ASH) && (BUILDFLAG(USE_VAAPI) ||
|
|
// BUILDFLAG(USE_V4L2_CODEC))
|
|
|
|
-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \
|
|
+#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \
|
|
(BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC))
|
|
if (!base::FeatureList::IsEnabled(
|
|
features::kRunStableVideoDecoderFactoryProcessServiceOnIOThread)) {
|
|
@@ -479,7 +479,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory&
|
|
#endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) &&
|
|
// (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC))
|
|
|
|
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
|
|
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
|
|
services.Add(RunVideoEncodeAcceleratorProviderFactory);
|
|
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
|
|
|