View | Details | Raw Unified | Return to bug 246449 | Differences between
and this patch

Collapse All | Expand All

(-)b/www/chromium/Makefile (-21 / +9 lines)
Lines 1-5 Link Here
1
PORTNAME=	chromium
1
PORTNAME=	chromium
2
PORTVERSION=	124.0.6367.118
2
PORTVERSION=	124.0.6367.118
3
PORTREVISION=	2
3
CATEGORIES=	www wayland
4
CATEGORIES=	www wayland
4
MASTER_SITES=	https://commondatastorage.googleapis.com/chromium-browser-official/ \
5
MASTER_SITES=	https://commondatastorage.googleapis.com/chromium-browser-official/ \
5
		https://nerd.hu/distfiles/:external
6
		https://nerd.hu/distfiles/:external
Lines 34-41 BUILD_DEPENDS= bash:shells/bash \ Link Here
34
LIB_DEPENDS=	libatk-bridge-2.0.so:accessibility/at-spi2-core \
35
LIB_DEPENDS=	libatk-bridge-2.0.so:accessibility/at-spi2-core \
35
		libatspi.so:accessibility/at-spi2-core \
36
		libatspi.so:accessibility/at-spi2-core \
36
		libspeechd.so:accessibility/speech-dispatcher \
37
		libspeechd.so:accessibility/speech-dispatcher \
38
		libasound.so:audio/alsa-lib \
37
		libFLAC.so:audio/flac \
39
		libFLAC.so:audio/flac \
38
		libopus.so:audio/opus \
40
		libopus.so:audio/opus \
41
		libsndio.so:audio/sndio \
39
		libspeex.so:audio/speex \
42
		libspeex.so:audio/speex \
40
		libdbus-1.so:devel/dbus \
43
		libdbus-1.so:devel/dbus \
41
		libdbus-glib-1.so:devel/dbus-glib \
44
		libdbus-glib-1.so:devel/dbus-glib \
Lines 126-131 GN_ARGS+= clang_use_chrome_plugins=false \ Link Here
126
		extra_ldflags="${LDFLAGS}" \
129
		extra_ldflags="${LDFLAGS}" \
127
		ffmpeg_branding="${FFMPEG_BRAND}"
130
		ffmpeg_branding="${FFMPEG_BRAND}"
128
131
132
# Audio backends
133
GN_ARGS+=	use_alsa=true \
134
		use_pulseaudio=true \
135
		use_sndio=true
136
129
# TODO: investigate building with these options:
137
# TODO: investigate building with these options:
130
# use_system_minigbm
138
# use_system_minigbm
131
GN_BOOTSTRAP_FLAGS=	--no-clean --no-rebuild --skip-generate-buildfiles
139
GN_BOOTSTRAP_FLAGS=	--no-clean --no-rebuild --skip-generate-buildfiles
Lines 140-149 SUB_FILES= chromium-browser.desktop chrome Link Here
140
SUB_LIST+=	COMMENT="${COMMENT}"
148
SUB_LIST+=	COMMENT="${COMMENT}"
141
149
142
OPTIONS_DEFINE=		CODECS CUPS DEBUG DRIVER KERBEROS LTO PIPEWIRE TEST WIDEVINE
150
OPTIONS_DEFINE=		CODECS CUPS DEBUG DRIVER KERBEROS LTO PIPEWIRE TEST WIDEVINE
143
OPTIONS_DEFAULT=	CODECS CUPS DRIVER KERBEROS PIPEWIRE SNDIO
151
OPTIONS_DEFAULT=	CODECS CUPS DRIVER KERBEROS PIPEWIRE
144
OPTIONS_EXCLUDE_aarch64=LTO
152
OPTIONS_EXCLUDE_aarch64=LTO
145
OPTIONS_GROUP=		AUDIO
146
OPTIONS_GROUP_AUDIO=	ALSA PULSEAUDIO SNDIO
147
OPTIONS_RADIO=		KERBEROS
153
OPTIONS_RADIO=		KERBEROS
148
OPTIONS_RADIO_KERBEROS=	HEIMDAL HEIMDAL_BASE MIT
154
OPTIONS_RADIO_KERBEROS=	HEIMDAL HEIMDAL_BASE MIT
149
OPTIONS_SUB=		yes
155
OPTIONS_SUB=		yes
Lines 153-164 HEIMDAL_BASE_DESC= Heimdal Kerberos (base) Link Here
153
HEIMDAL_DESC=		Heimdal Kerberos (security/heimdal)
159
HEIMDAL_DESC=		Heimdal Kerberos (security/heimdal)
154
MIT_DESC=		MIT Kerberos (security/krb5)
160
MIT_DESC=		MIT Kerberos (security/krb5)
155
161
156
ALSA_LIB_DEPENDS=	libasound.so:audio/alsa-lib
157
ALSA_RUN_DEPENDS=	${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins \
158
			alsa-lib>=1.1.1_1:audio/alsa-lib
159
ALSA_VARS=		GN_ARGS+=use_alsa=true
160
ALSA_VARS_OFF=		GN_ARGS+=use_alsa=false
161
162
CODECS_VARS=		GN_ARGS+=proprietary_codecs=true \
162
CODECS_VARS=		GN_ARGS+=proprietary_codecs=true \
163
			FFMPEG_BRAND="Chrome"
163
			FFMPEG_BRAND="Chrome"
164
CODECS_VARS_OFF=	GN_ARGS+=proprietary_codecs=false \
164
CODECS_VARS_OFF=	GN_ARGS+=proprietary_codecs=false \
Lines 202-219 PIPEWIRE_VARS= GN_ARGS+=rtc_use_pipewire=true \ Link Here
202
PIPEWIRE_VARS_OFF=	GN_ARGS+=rtc_use_pipewire=false \
202
PIPEWIRE_VARS_OFF=	GN_ARGS+=rtc_use_pipewire=false \
203
			GN_ARGS+=rtc_link_pipewire=false
203
			GN_ARGS+=rtc_link_pipewire=false
204
204
205
PULSEAUDIO_LIB_DEPENDS=	libpulse.so:audio/pulseaudio
206
PULSEAUDIO_VARS=	GN_ARGS+=use_pulseaudio=true
207
PULSEAUDIO_VARS_OFF=	GN_ARGS+=use_pulseaudio=false
208
209
# With SNDIO=on we exclude audio_manager_linux from the build (see
210
# media/audio/BUILD.gn) and use audio_manager_openbsd which does not
211
# support falling back to ALSA or PulseAudio.
212
SNDIO_PREVENTS=		ALSA PULSEAUDIO
213
SNDIO_LIB_DEPENDS=	libsndio.so:audio/sndio
214
SNDIO_VARS=		GN_ARGS+=use_sndio=true
215
SNDIO_VARS_OFF=		GN_ARGS+=use_sndio=false
216
217
WIDEVINE_DESC=		Depend on foreign-cdm to enable playback of DRM content
205
WIDEVINE_DESC=		Depend on foreign-cdm to enable playback of DRM content
218
WIDEVINE_RUN_DEPENDS=	foreign-cdm>0:www/foreign-cdm
206
WIDEVINE_RUN_DEPENDS=	foreign-cdm>0:www/foreign-cdm
219
207
(-)b/www/chromium/files/patch-content_browser_utility__process__host.cc (-3 / +13 lines)
Lines 1-4 Link Here
1
--- content/browser/utility_process_host.cc.orig	2024-04-19 13:02:56 UTC
1
--- content/browser/utility_process_host.cc.orig	2024-05-06 11:00:55 UTC
2
+++ content/browser/utility_process_host.cc
2
+++ content/browser/utility_process_host.cc
3
@@ -61,7 +61,7 @@
3
@@ -61,7 +61,7 @@
4
 #include "content/browser/v8_snapshot_files.h"
4
 #include "content/browser/v8_snapshot_files.h"
Lines 45-51 Link Here
45
   allowed_gpu_ = true;
45
   allowed_gpu_ = true;
46
 #endif
46
 #endif
47
 }
47
 }
48
@@ -434,7 +434,7 @@ bool UtilityProcessHost::StartProcess() {
48
@@ -374,6 +374,9 @@ bool UtilityProcessHost::StartProcess() {
49
       switches::kFailAudioStreamCreation,
50
       switches::kMuteAudio,
51
       switches::kUseFileForFakeAudioCapture,
52
+#if BUILDFLAG(IS_BSD)
53
+      switches::kAudioBackend,
54
+#endif
55
 #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FREEBSD) || \
56
     BUILDFLAG(IS_SOLARIS)
57
       switches::kAlsaInputDevice,
58
@@ -434,7 +437,7 @@ bool UtilityProcessHost::StartProcess() {
49
     file_data_->files_to_preload.merge(GetV8SnapshotFilesToPreload());
59
     file_data_->files_to_preload.merge(GetV8SnapshotFilesToPreload());
50
 #endif  // BUILDFLAG(IS_POSIX)
60
 #endif  // BUILDFLAG(IS_POSIX)
51
 
61
 
Lines 54-60 Link Here
54
     // The network service should have access to the parent directories
64
     // The network service should have access to the parent directories
55
     // necessary for its usage.
65
     // necessary for its usage.
56
     if (sandbox_type_ == sandbox::mojom::Sandbox::kNetwork) {
66
     if (sandbox_type_ == sandbox::mojom::Sandbox::kNetwork) {
57
@@ -445,13 +445,13 @@ bool UtilityProcessHost::StartProcess() {
67
@@ -445,13 +448,13 @@ bool UtilityProcessHost::StartProcess() {
58
     }
68
     }
59
 #endif  // BUILDFLAG(IS_LINUX)
69
 #endif  // BUILDFLAG(IS_LINUX)
60
 
70
 
(-)b/www/chromium/files/patch-media_audio_pulse_pulse__util.cc (+14 lines)
Added Link Here
1
--- media/audio/pulse/pulse_util.cc.orig	2024-05-06 11:00:55 UTC
2
+++ media/audio/pulse/pulse_util.cc
3
@@ -45,7 +45,11 @@ constexpr char kBrowserDisplayName[] = "chromium-brows
4
 
5
 #if defined(DLOPEN_PULSEAUDIO)
6
 static const base::FilePath::CharType kPulseLib[] =
7
+#if BUILDFLAG(IS_BSD)
8
+    FILE_PATH_LITERAL("libpulse.so");
9
+#else
10
     FILE_PATH_LITERAL("libpulse.so.0");
11
+#endif
12
 #endif
13
 
14
 void DestroyMainloop(pa_threaded_mainloop* mainloop) {
(-)b/www/chromium/files/patch-media_audio_sndio_audio__manager__sndio.cc (-14 / +73 lines)
Lines 1-6 Link Here
1
--- media/audio/sndio/audio_manager_sndio.cc.orig	2022-10-24 13:33:33 UTC
1
--- media/audio/sndio/audio_manager_sndio.cc.orig	2024-05-06 11:00:55 UTC
2
+++ media/audio/sndio/audio_manager_sndio.cc
2
+++ media/audio/sndio/audio_manager_sndio.cc
3
@@ -0,0 +1,181 @@
3
@@ -0,0 +1,240 @@
4
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
4
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
5
+// Use of this source code is governed by a BSD-style license that can be
5
+// Use of this source code is governed by a BSD-style license that can be
6
+// found in the LICENSE file.
6
+// found in the LICENSE file.
Lines 17-34 Link Here
17
+#include "media/audio/sndio/sndio_input.h"
17
+#include "media/audio/sndio/sndio_input.h"
18
+#include "media/audio/sndio/sndio_output.h"
18
+#include "media/audio/sndio/sndio_output.h"
19
+#endif
19
+#endif
20
+#if defined(USE_PULSEAUDIO)
21
+#include "media/audio/pulse/audio_manager_pulse.h"
22
+#include "media/audio/pulse/pulse_util.h"
23
+#endif
24
+#if defined(USE_ALSA)
25
+#include "media/audio/alsa/audio_manager_alsa.h"
26
+#endif
20
+#include "media/audio/fake_audio_manager.h"
27
+#include "media/audio/fake_audio_manager.h"
21
+#include "media/base/limits.h"
28
+#include "media/base/limits.h"
22
+#include "media/base/media_switches.h"
29
+#include "media/base/media_switches.h"
23
+
30
+
24
+namespace media {
31
+namespace media {
25
+
32
+
26
+enum SndioAudioIO {
27
+  kPulse,
28
+  kSndio,
29
+  kAudioIOMax = kSndio
30
+};
31
+
32
+#if defined(USE_SNDIO)
33
+#if defined(USE_SNDIO)
33
+// Maximum number of output streams that can be open simultaneously.
34
+// Maximum number of output streams that can be open simultaneously.
34
+static const int kMaxOutputStreams = 50;
35
+static const int kMaxOutputStreams = 50;
Lines 36-41 Link Here
36
+// Default sample rate for input and output streams.
37
+// Default sample rate for input and output streams.
37
+static const int kDefaultSampleRate = 48000;
38
+static const int kDefaultSampleRate = 48000;
38
+
39
+
40
+#if BUILDFLAG(IS_OPENBSD)
41
+static const std::string kDefaultAudioBackend = "sndio";
42
+#else
43
+static const std::string kDefaultAudioBackend = "auto";
44
+#endif
45
+
39
+void AddDefaultDevice(AudioDeviceNames* device_names) {
46
+void AddDefaultDevice(AudioDeviceNames* device_names) {
40
+  DCHECK(device_names->empty());
47
+  DCHECK(device_names->empty());
41
+  device_names->push_front(AudioDeviceName::CreateDefault());
48
+  device_names->push_front(AudioDeviceName::CreateDefault());
Lines 164-184 Link Here
164
+    std::unique_ptr<AudioThread> audio_thread,
171
+    std::unique_ptr<AudioThread> audio_thread,
165
+    AudioLogFactory* audio_log_factory) {
172
+    AudioLogFactory* audio_log_factory) {
166
+  DLOG(WARNING) << "CreateAudioManager";
173
+  DLOG(WARNING) << "CreateAudioManager";
174
+  std::string audio_backend = kDefaultAudioBackend;
175
+
176
+  std::vector<std::string> kSupportedAudioBackends = {"auto"};
177
+
178
+#if defined(USE_SNDIO)
179
+  kSupportedAudioBackends.push_back(std::string("sndio"));
180
+#endif
181
+#if defined(USE_PULSEAUDIO)
182
+  kSupportedAudioBackends.push_back(std::string("pulse"));
183
+#endif
184
+#if defined(USE_ALSA)
185
+  kSupportedAudioBackends.push_back(std::string("alsa"));
186
+#endif
187
+
188
+  if (base::CommandLine::ForCurrentProcess()->HasSwitch(
189
+          switches::kAudioBackend)) {
190
+    audio_backend = base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
191
+        switches::kAudioBackend);
192
+  }
193
+
167
+  // For testing allow audio output to be disabled.
194
+  // For testing allow audio output to be disabled.
168
+  if (base::CommandLine::ForCurrentProcess()->HasSwitch(
195
+  if (base::CommandLine::ForCurrentProcess()->HasSwitch(
169
+          switches::kDisableAudioOutput)) {
196
+          switches::kDisableAudioOutput)) {
170
+    return std::make_unique<FakeAudioManager>(std::move(audio_thread),
197
+    return std::make_unique<FakeAudioManager>(std::move(audio_thread),
171
+                                              audio_log_factory);
198
+                                              audio_log_factory);
172
+  }
199
+  }
200
+
201
+  if (std::find(std::begin(kSupportedAudioBackends), std::end(kSupportedAudioBackends),
202
+      audio_backend) == std::end(kSupportedAudioBackends)) {
203
+    LOG(ERROR) << "Unsupported audio backend specified. Falling back to " << kDefaultAudioBackend;
204
+    audio_backend = kDefaultAudioBackend;
205
+  }
206
+
207
+#if defined(USE_PULSEAUDIO)
208
+  pa_threaded_mainloop* pa_mainloop = nullptr;
209
+  pa_context* pa_context = nullptr;
210
+  if (audio_backend != "sndio" && pulse::InitPulse(&pa_mainloop, &pa_context)) {
211
+    return std::make_unique<AudioManagerPulse>(
212
+        std::move(audio_thread), audio_log_factory, pa_mainloop, pa_context);
213
+  } else if (audio_backend == "auto") {
214
+    LOG(WARNING) << "Falling back to SNDIO for audio output. PulseAudio is not "
215
+                    "available or could not be initialized.";
216
+  }
217
+#endif
218
+
173
+#if defined(USE_SNDIO)
219
+#if defined(USE_SNDIO)
174
+  UMA_HISTOGRAM_ENUMERATION("Media.SndioAudioIO", kSndio, kAudioIOMax + 1);
220
+  if (audio_backend != "pulse") {
175
+  return std::make_unique<AudioManagerSndio>(std::move(audio_thread),
221
+    return std::make_unique<AudioManagerSndio>(std::move(audio_thread),
176
+                                            audio_log_factory);
222
+                                              audio_log_factory);
177
+#else
223
+  } else if (audio_backend == "auto") {
178
+  return std::make_unique<FakeAudioManager>(std::move(audio_thread),
224
+    LOG(WARNING) << "Falling back to ALSA audio output. SNDIO is not "
179
+                                            audio_log_factory);
225
+                    "available or could not be initialized.";
226
+  }
227
+#endif
228
+
229
+#if defined(USE_ALSA)
230
+  if (audio_backend != "pulse" && audio_backend != "sndio") {
231
+    return std::make_unique<AudioManagerAlsa>(std::move(audio_thread),
232
+                                              audio_log_factory);
233
+  } else if (audio_backend == "auto") {
234
+    LOG(WARNING) << "Falling back to fake audio output. ALSA is not "
235
+                    "available or could not be initialized.";
236
+  }
180
+#endif
237
+#endif
181
+
238
+
239
+  return std::make_unique<FakeAudioManager>(std::move(audio_thread),
240
+                                            audio_log_factory);
182
+}
241
+}
183
+
242
+
184
+}  // namespace media
243
+}  // namespace media
(-)b/www/chromium/files/patch-media_base_media__switches.cc (-19 / +21 lines)
Lines 1-4 Link Here
1
--- media/base/media_switches.cc.orig	2024-04-19 13:02:56 UTC
1
--- media/base/media_switches.cc.orig	2024-05-06 11:00:55 UTC
2
+++ media/base/media_switches.cc
2
+++ media/base/media_switches.cc
3
@@ -21,7 +21,7 @@
3
@@ -21,7 +21,7 @@
4
 #include "ui/gl/gl_features.h"
4
 #include "ui/gl/gl_features.h"
Lines 9-15 Link Here
9
 #include "base/cpu.h"
9
 #include "base/cpu.h"
10
 #endif
10
 #endif
11
 
11
 
12
@@ -363,8 +363,8 @@ BASE_FEATURE(kMacLoopbackAudioForScreenShare,
12
@@ -60,6 +60,10 @@ const char kDisableBackgroundMediaSuspend[] =
13
 const char kReportVp9AsAnUnsupportedMimeType[] =
14
     "report-vp9-as-an-unsupported-mime-type";
15
 
16
+#if BUILDFLAG(IS_BSD)
17
+const char kAudioBackend[] = "audio-backend";
18
+#endif
19
+
20
 #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FREEBSD) || \
21
     BUILDFLAG(IS_SOLARIS)
22
 // The Alsa device to use when opening an audio input stream.
23
@@ -363,8 +367,8 @@ BASE_FEATURE(kMacLoopbackAudioForScreenShare,
13
              "MacLoopbackAudioForScreenShare",
24
              "MacLoopbackAudioForScreenShare",
14
              base::FEATURE_DISABLED_BY_DEFAULT);
25
              base::FEATURE_DISABLED_BY_DEFAULT);
15
 #endif  // BUILDFLAG(IS_MAC)
26
 #endif  // BUILDFLAG(IS_MAC)
Lines 20-35 Link Here
20
 // Enables system audio mirroring using pulseaudio.
31
 // Enables system audio mirroring using pulseaudio.
21
 BASE_FEATURE(kPulseaudioLoopbackForCast,
32
 BASE_FEATURE(kPulseaudioLoopbackForCast,
22
              "PulseaudioLoopbackForCast",
33
              "PulseaudioLoopbackForCast",
23
@@ -597,7 +597,7 @@ BASE_FEATURE(kUseWritePixelsYUV,
34
@@ -713,7 +717,7 @@ BASE_FEATURE(kFallbackAfterDecodeError,
24
 BASE_FEATURE(kUseMultiPlaneFormatForHardwareVideo,
25
              "UseMultiPlaneFormatForHardwareVideo",
26
 #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA) || \
27
-    BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
28
+    BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
29
              base::FEATURE_ENABLED_BY_DEFAULT
30
 #else
31
              base::FEATURE_DISABLED_BY_DEFAULT
32
@@ -713,7 +713,7 @@ BASE_FEATURE(kFallbackAfterDecodeError,
33
 // Show toolbar button that opens dialog for controlling media sessions.
35
 // Show toolbar button that opens dialog for controlling media sessions.
34
 BASE_FEATURE(kGlobalMediaControls,
36
 BASE_FEATURE(kGlobalMediaControls,
35
              "GlobalMediaControls",
37
              "GlobalMediaControls",
Lines 38-44 Link Here
38
              base::FEATURE_ENABLED_BY_DEFAULT
40
              base::FEATURE_ENABLED_BY_DEFAULT
39
 #else
41
 #else
40
              base::FEATURE_DISABLED_BY_DEFAULT
42
              base::FEATURE_DISABLED_BY_DEFAULT
41
@@ -741,7 +741,7 @@ BASE_FEATURE(kGlobalMediaControlsUpdatedUI,
43
@@ -741,7 +745,7 @@ BASE_FEATURE(kGlobalMediaControlsUpdatedUI,
42
 // If enabled, users can request Media Remoting without fullscreen-in-tab.
44
 // If enabled, users can request Media Remoting without fullscreen-in-tab.
43
 BASE_FEATURE(kMediaRemotingWithoutFullscreen,
45
 BASE_FEATURE(kMediaRemotingWithoutFullscreen,
44
              "MediaRemotingWithoutFullscreen",
46
              "MediaRemotingWithoutFullscreen",
Lines 47-53 Link Here
47
              base::FEATURE_ENABLED_BY_DEFAULT
49
              base::FEATURE_ENABLED_BY_DEFAULT
48
 #else
50
 #else
49
              base::FEATURE_DISABLED_BY_DEFAULT
51
              base::FEATURE_DISABLED_BY_DEFAULT
50
@@ -753,7 +753,7 @@ BASE_FEATURE(kMediaRemotingWithoutFullscreen,
52
@@ -753,7 +757,7 @@ BASE_FEATURE(kMediaRemotingWithoutFullscreen,
51
 BASE_FEATURE(kGlobalMediaControlsPictureInPicture,
53
 BASE_FEATURE(kGlobalMediaControlsPictureInPicture,
52
              "GlobalMediaControlsPictureInPicture",
54
              "GlobalMediaControlsPictureInPicture",
53
 #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
55
 #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
Lines 56-62 Link Here
56
              base::FEATURE_ENABLED_BY_DEFAULT
58
              base::FEATURE_ENABLED_BY_DEFAULT
57
 #else
59
 #else
58
              base::FEATURE_DISABLED_BY_DEFAULT
60
              base::FEATURE_DISABLED_BY_DEFAULT
59
@@ -782,7 +782,7 @@ BASE_FEATURE(kUnifiedAutoplay,
61
@@ -782,7 +786,7 @@ BASE_FEATURE(kUnifiedAutoplay,
60
              "UnifiedAutoplay",
62
              "UnifiedAutoplay",
61
              base::FEATURE_ENABLED_BY_DEFAULT);
63
              base::FEATURE_ENABLED_BY_DEFAULT);
62
 
64
 
Lines 65-71 Link Here
65
 // Enable vaapi video decoding on linux. This is already enabled by default on
67
 // Enable vaapi video decoding on linux. This is already enabled by default on
66
 // chromeos, but needs an experiment on linux.
68
 // chromeos, but needs an experiment on linux.
67
 BASE_FEATURE(kVaapiVideoDecodeLinux,
69
 BASE_FEATURE(kVaapiVideoDecodeLinux,
68
@@ -873,7 +873,7 @@ BASE_FEATURE(kVaapiVp9SModeHWEncoding,
70
@@ -873,7 +877,7 @@ BASE_FEATURE(kVaapiVp9SModeHWEncoding,
69
              "VaapiVp9SModeHWEncoding",
71
              "VaapiVp9SModeHWEncoding",
70
              base::FEATURE_DISABLED_BY_DEFAULT);
72
              base::FEATURE_DISABLED_BY_DEFAULT);
71
 #endif  // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS)
73
 #endif  // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS)
Lines 74-80 Link Here
74
 // Enables the new V4L2 flat video decoder clients instead of V4L2VideoDecoder.
76
 // Enables the new V4L2 flat video decoder clients instead of V4L2VideoDecoder.
75
 // Owners: frkoenig@chromium.org, mcasas@chromium.org
77
 // Owners: frkoenig@chromium.org, mcasas@chromium.org
76
 // Expiry: When flat decoders are supported on all platforms and the legacy
78
 // Expiry: When flat decoders are supported on all platforms and the legacy
77
@@ -998,7 +998,7 @@ BASE_FEATURE(kLiveCaptionUseWaitK,
79
@@ -998,7 +1002,7 @@ BASE_FEATURE(kLiveCaptionUseWaitK,
78
 // Live Caption can be used in multiple languages, as opposed to just English.
80
 // Live Caption can be used in multiple languages, as opposed to just English.
79
 BASE_FEATURE(kLiveCaptionMultiLanguage,
81
 BASE_FEATURE(kLiveCaptionMultiLanguage,
80
              "LiveCaptionMultiLanguage",
82
              "LiveCaptionMultiLanguage",
Lines 83-89 Link Here
83
              base::FEATURE_ENABLED_BY_DEFAULT
85
              base::FEATURE_ENABLED_BY_DEFAULT
84
 #else
86
 #else
85
              base::FEATURE_DISABLED_BY_DEFAULT
87
              base::FEATURE_DISABLED_BY_DEFAULT
86
@@ -1033,7 +1033,7 @@ BASE_FEATURE(kLiveCaptionSystemWideOnChromeOS,
88
@@ -1033,7 +1037,7 @@ BASE_FEATURE(kLiveCaptionSystemWideOnChromeOS,
87
 // Live Translate translates captions generated by Live Caption.
89
 // Live Translate translates captions generated by Live Caption.
88
 BASE_FEATURE(kLiveTranslate,
90
 BASE_FEATURE(kLiveTranslate,
89
              "LiveTranslate",
91
              "LiveTranslate",
Lines 92-98 Link Here
92
              base::FEATURE_ENABLED_BY_DEFAULT
94
              base::FEATURE_ENABLED_BY_DEFAULT
93
 #else
95
 #else
94
              base::FEATURE_DISABLED_BY_DEFAULT
96
              base::FEATURE_DISABLED_BY_DEFAULT
95
@@ -1500,7 +1500,7 @@ BASE_FEATURE(kUseGTFOOutOfProcessVideoDecoding,
97
@@ -1500,7 +1504,7 @@ BASE_FEATURE(kUseGTFOOutOfProcessVideoDecoding,
96
              base::FEATURE_DISABLED_BY_DEFAULT);
98
              base::FEATURE_DISABLED_BY_DEFAULT);
97
 #endif  // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER)
99
 #endif  // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER)
98
 
100
 
(-)b/www/chromium/files/patch-media_base_media__switches.h (-5 / +16 lines)
Lines 1-6 Link Here
1
--- media/base/media_switches.h.orig	2024-04-19 13:02:56 UTC
1
--- media/base/media_switches.h.orig	2024-05-06 11:00:55 UTC
2
+++ media/base/media_switches.h
2
+++ media/base/media_switches.h
3
@@ -315,7 +315,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kPlatformHEVCEncoder
3
@@ -42,6 +42,10 @@ MEDIA_EXPORT extern const char kDisableBackgroundMedia
4
 
5
 MEDIA_EXPORT extern const char kReportVp9AsAnUnsupportedMimeType[];
6
 
7
+#if BUILDFLAG(IS_BSD)
8
+MEDIA_EXPORT extern const char kAudioBackend[];
9
+#endif
10
+
11
 #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FREEBSD) || \
12
     BUILDFLAG(IS_SOLARIS)
13
 MEDIA_EXPORT extern const char kAlsaInputDevice[];
14
@@ -315,7 +319,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kPlatformHEVCEncoder
4
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kPlaybackSpeedButton);
15
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kPlaybackSpeedButton);
5
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kPreloadMediaEngagementData);
16
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kPreloadMediaEngagementData);
6
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kPreloadMetadataSuspend);
17
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kPreloadMetadataSuspend);
Lines 9-15 Link Here
9
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kPulseaudioLoopbackForCast);
20
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kPulseaudioLoopbackForCast);
10
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kPulseaudioLoopbackForScreenShare);
21
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kPulseaudioLoopbackForScreenShare);
11
 #endif  // BUILDFLAG(IS_LINUX)
22
 #endif  // BUILDFLAG(IS_LINUX)
12
@@ -333,7 +333,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUnifiedAutoplay);
23
@@ -333,7 +337,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUnifiedAutoplay);
13
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseAndroidOverlayForSecureOnly);
24
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseAndroidOverlayForSecureOnly);
14
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseDecoderStreamForWebRTC);
25
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseDecoderStreamForWebRTC);
15
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseFakeDeviceForMediaStream);
26
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseFakeDeviceForMediaStream);
Lines 18-24 Link Here
18
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVideoDecodeLinux);
29
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVideoDecodeLinux);
19
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVideoDecodeLinuxGL);
30
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVideoDecodeLinuxGL);
20
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVideoEncodeLinux);
31
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVideoEncodeLinux);
21
@@ -352,7 +352,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiH264TemporalLa
32
@@ -352,7 +356,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiH264TemporalLa
22
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp8TemporalLayerHWEncoding);
33
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp8TemporalLayerHWEncoding);
23
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp9SModeHWEncoding);
34
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp9SModeHWEncoding);
24
 #endif  // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS)
35
 #endif  // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS)
Lines 27-33 Link Here
27
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2FlatVideoDecoder);
38
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2FlatVideoDecoder);
28
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2FlatStatefulVideoDecoder);
39
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2FlatStatefulVideoDecoder);
29
 #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
40
 #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
30
@@ -491,7 +491,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseOutOfProcessVide
41
@@ -491,7 +495,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseOutOfProcessVide
31
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseGTFOOutOfProcessVideoDecoding);
42
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseGTFOOutOfProcessVideoDecoding);
32
 #endif  // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER)
43
 #endif  // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER)
33
 
44
 
(-)b/www/chromium/files/patch-media_media__options.gni (-13 / +1 lines)
Lines 1-4 Link Here
1
--- media/media_options.gni.orig	2024-02-23 21:04:38 UTC
1
--- media/media_options.gni.orig	2024-05-06 11:00:55 UTC
2
+++ media/media_options.gni
2
+++ media/media_options.gni
3
@@ -190,12 +190,15 @@ declare_args() {
3
@@ -190,12 +190,15 @@ declare_args() {
4
   # Enables runtime selection of ALSA library for audio.
4
   # Enables runtime selection of ALSA library for audio.
Lines 17-30 Link Here
17
       (!is_castos || (target_cpu == "x86" || target_cpu == "x64") ||
17
       (!is_castos || (target_cpu == "x86" || target_cpu == "x64") ||
18
        is_cast_audio_only)) {
18
        is_cast_audio_only)) {
19
     use_alsa = true
19
     use_alsa = true
20
@@ -211,6 +214,10 @@ declare_args() {
21
     if (!use_cras && !is_castos && !is_asan && !is_tsan) {
22
       use_pulseaudio = true
23
     }
24
+  }
25
+  if (is_openbsd) {
26
+    use_sndio = true
27
+    use_pulseaudio = false
28
   }
29
 }
30
 
31
- 

Return to bug 246449