--- media/base/media_switches.h.orig 2024-11-14 07:57:23 UTC +++ media/base/media_switches.h @@ -333,13 +333,25 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kPlatformHEVCEncoder MEDIA_EXPORT BASE_DECLARE_FEATURE(kPlaybackSpeedButton); MEDIA_EXPORT BASE_DECLARE_FEATURE(kPreloadMediaEngagementData); MEDIA_EXPORT BASE_DECLARE_FEATURE(kPreloadMetadataSuspend); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) MEDIA_EXPORT BASE_DECLARE_FEATURE(kPulseaudioLoopbackForCast); MEDIA_EXPORT BASE_DECLARE_FEATURE(kPulseaudioLoopbackForScreenShare); + +enum class AudioBackend { + kAuto, + kPulseAudio, + kSndio, + kAlsa +}; + +MEDIA_EXPORT BASE_DECLARE_FEATURE(kAudioBackend); +MEDIA_EXPORT extern const base::FeatureParam< + AudioBackend> + kAudioBackendParam; #endif // BUILDFLAG(IS_LINUX) MEDIA_EXPORT BASE_DECLARE_FEATURE(kRecordMediaEngagementScores); MEDIA_EXPORT BASE_DECLARE_FEATURE(kRecordWebAudioEngagement); -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) MEDIA_EXPORT BASE_DECLARE_FEATURE(kReduceHardwareVideoDecoderBuffers); #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) MEDIA_EXPORT BASE_DECLARE_FEATURE(kResumeBackgroundVideo); @@ -353,7 +365,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kSuspendMutedAudio); MEDIA_EXPORT BASE_DECLARE_FEATURE(kUnifiedAutoplay); MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseAndroidOverlayForSecureOnly); MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseFakeDeviceForMediaStream); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) MEDIA_EXPORT BASE_DECLARE_FEATURE(kAcceleratedVideoDecodeLinux); MEDIA_EXPORT BASE_DECLARE_FEATURE(kAcceleratedVideoDecodeLinuxGL); MEDIA_EXPORT BASE_DECLARE_FEATURE(kAcceleratedVideoEncodeLinux); @@ -374,7 +386,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp8TemporalLay MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp9SModeHWEncoding); MEDIA_EXPORT BASE_DECLARE_FEATURE(kVSyncMjpegDecoding); #endif // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2H264TemporalLayerHWEncoding); #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) MEDIA_EXPORT BASE_DECLARE_FEATURE(kVideoBlitColorAccuracy); @@ -511,7 +523,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseOutOfProcessVide MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseGTFOOutOfProcessVideoDecoding); #endif // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseOutOfProcessVideoEncoding); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)