diff --git a/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-low-latency-flag.patch b/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-low-latency-flag.patch index 86507165bd9c..3df917edf5cc 100644 --- a/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-low-latency-flag.patch +++ b/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-low-latency-flag.patch @@ -1,10 +1,10 @@ diff --git a/src/3rdparty/chromium/media/gpu/mac/vt_video_encode_accelerator_mac.cc b/src/3rdparty/chromium/media/gpu/mac/vt_video_encode_accelerator_mac.cc -index 6a3a777..249d4cc 100644 +index d4b0161b2e..e5a0eb1967 100644 --- a/src/3rdparty/chromium/media/gpu/mac/vt_video_encode_accelerator_mac.cc +++ b/src/3rdparty/chromium/media/gpu/mac/vt_video_encode_accelerator_mac.cc -@@ -20,12 +20,6 @@ - #include "media/base/media_log.h" - #include "media/base/video_frame.h" +@@ -29,12 +29,6 @@ + #include "media/base/video_types.h" + #include "media/video/video_encode_accelerator.h" -// This is a min version of macOS where we want to support SVC encoding via -// EnableLowLatencyRateControl flag. The flag is actually supported since 11.3, @@ -15,21 +15,22 @@ index 6a3a777..249d4cc 100644 namespace media { namespace { -@@ -150,8 +144,6 @@ VTVideoEncodeAccelerator::GetSupportedProfiles() { - profile.max_framerate_numerator = kMaxFrameRateNumerator; - profile.max_framerate_denominator = kMaxFrameRateDenominator; - profile.max_resolution = gfx::Size(kMaxResolutionWidth, kMaxResolutionHeight); +@@ -277,8 +271,6 @@ VTVideoEncodeAccelerator::GetSupportedH264Profiles() { + profile.rate_control_modes = VideoEncodeAccelerator::kConstantMode | + VideoEncodeAccelerator::kVariableMode; + profile.scalability_modes.push_back(SVCScalabilityMode::kL1T1); - if (__builtin_available(macOS LOW_LATENCY_FLAG_AVAILABLE_VER, *)) - profile.scalability_modes.push_back(SVCScalabilityMode::kL1T2); + for (const auto& supported_profile : kSupportedProfiles) { - profile.profile = supported_profile; - profiles.push_back(profile); -@@ -595,13 +587,6 @@ bool VTVideoEncodeAccelerator::CreateCompressionSession( - kVTVideoEncoderSpecification_RequireHardwareAcceleratedVideoEncoder}; - std::vector encoder_values{kCFBooleanTrue}; + if (VideoCodecProfileToVideoCodec(supported_profile) == VideoCodec::kH264) { +@@ -814,14 +806,6 @@ bool VTVideoEncodeAccelerator::CreateCompressionSession( + encoder_values.push_back(kCFBooleanFalse); + } - if (__builtin_available(macOS LOW_LATENCY_FLAG_AVAILABLE_VER, *)) { -- if (require_low_delay_) { +- // Remove the validation once HEVC SVC mode is supported on macOS. +- if (require_low_delay_ && codec == VideoCodec::kH264) { - encoder_keys.push_back( - kVTVideoEncoderSpecification_EnableLowLatencyRateControl); - encoder_values.push_back(kCFBooleanTrue); @@ -38,10 +39,10 @@ index 6a3a777..249d4cc 100644 base::ScopedCFTypeRef encoder_spec = video_toolbox::DictionaryWithKeysAndValues( encoder_keys.data(), encoder_values.data(), encoder_keys.size()); -@@ -669,19 +654,8 @@ bool VTVideoEncodeAccelerator::ConfigureCompressionSession() { - } +@@ -891,19 +875,8 @@ bool VTVideoEncodeAccelerator::ConfigureCompressionSession(VideoCodec codec) { - if (num_temporal_layers_ == 2) { + // Remove the validation once HEVC SVC mode is supported on macOS. + if (num_temporal_layers_ == 2 && codec_ == VideoCodec::kH264) { - if (__builtin_available(macOS LOW_LATENCY_FLAG_AVAILABLE_VER, *)) { - if (!session_property_setter.IsSupported( - kVTCompressionPropertyKey_BaseLayerFrameRateFraction)) { diff --git a/pkgs/development/libraries/qt-6/patches/qtwebengine-link-pulseaudio.patch b/pkgs/development/libraries/qt-6/patches/qtwebengine-link-pulseaudio.patch index 31516c41beb0..c4302113786e 100644 --- a/pkgs/development/libraries/qt-6/patches/qtwebengine-link-pulseaudio.patch +++ b/pkgs/development/libraries/qt-6/patches/qtwebengine-link-pulseaudio.patch @@ -1,10 +1,24 @@ +From da66a74e8b8e57b4a60b2cd0d18ef3bebb15509c Mon Sep 17 00:00:00 2001 +From: Nick Cao +Date: Tue, 10 Oct 2023 11:45:24 -0400 +Subject: [PATCH 1/2] qtwebengine: link pulseaudio + +--- + src/core/CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt +index 4153ce180..e89f41798 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt -@@ -341,6 +341,7 @@ - devtools_fast_bundle=false - devtools_skip_typecheck=false - enable_jxl_decoder=false # temporarily because libjxl causes internal compiler error on armv7 +@@ -340,6 +340,7 @@ foreach(arch ${archs}) + use_static_angle=true + chrome_root_store_supported=false + trial_comparison_cert_verifier_supported=false + link_pulseaudio=true ) + extend_gn_list(gnArgArg + ARGS use_v8_context_snapshot v8_use_external_startup_data +-- +2.42.0 - extend_gn_list(gnArgArg \ No newline at end of file diff --git a/pkgs/development/libraries/qt-6/patches/qtwebengine-locales-path.patch b/pkgs/development/libraries/qt-6/patches/qtwebengine-locales-path.patch index 58f2d96f8097..fecdb93cd547 100644 --- a/pkgs/development/libraries/qt-6/patches/qtwebengine-locales-path.patch +++ b/pkgs/development/libraries/qt-6/patches/qtwebengine-locales-path.patch @@ -1,8 +1,18 @@ +From 6f0068359f32d1e7ebaa32650c3b608c008a1127 Mon Sep 17 00:00:00 2001 +From: Nick Cao +Date: Tue, 10 Oct 2023 11:46:28 -0400 +Subject: [PATCH 2/2] qtwebengine: fix path to locales + +--- + src/core/api/CMakeLists.txt | 3 ++- + src/core/web_engine_library_info.cpp | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + diff --git a/src/core/api/CMakeLists.txt b/src/core/api/CMakeLists.txt -index f860e0ba7..30e1a767a 100644 +index a3cb53e17..fcb6d70c5 100644 --- a/src/core/api/CMakeLists.txt +++ b/src/core/api/CMakeLists.txt -@@ -193,7 +193,8 @@ if(QT_FEATURE_framework) +@@ -190,7 +190,8 @@ if(QT_FEATURE_framework) else() install(FILES ${localeFiles} @@ -26,3 +36,6 @@ index c03c9a3b2..430fdfab2 100644 % QLatin1String("qtwebengine_locales"); candidatePaths << fallbackDir(); } +-- +2.42.0 +