From 8d073518d8d726ae1c4fbdd92b1fa7c4c9411f9e Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Fri, 2 Aug 2024 10:05:29 +1000 Subject: [PATCH] tg_owt: bump version --- ....patchset => tg_owt-0.0.20240730.patchset} | 213 +++++++++--------- ...0615.recipe => tg_owt-0.0.20240730.recipe} | 11 +- 2 files changed, 110 insertions(+), 114 deletions(-) rename media-libs/tg_owt/patches/{tg_owt-0.0.20240615.patchset => tg_owt-0.0.20240730.patchset} (94%) rename media-libs/tg_owt/{tg_owt-0.0.20240615.recipe => tg_owt-0.0.20240730.recipe} (90%) diff --git a/media-libs/tg_owt/patches/tg_owt-0.0.20240615.patchset b/media-libs/tg_owt/patches/tg_owt-0.0.20240730.patchset similarity index 94% rename from media-libs/tg_owt/patches/tg_owt-0.0.20240615.patchset rename to media-libs/tg_owt/patches/tg_owt-0.0.20240730.patchset index 01d54385b..e2c5f8449 100644 --- a/media-libs/tg_owt/patches/tg_owt-0.0.20240615.patchset +++ b/media-libs/tg_owt/patches/tg_owt-0.0.20240730.patchset @@ -1,15 +1,15 @@ -From b3f57d8bb90d1d8c70d6b3046d6f6e0e3463bc81 Mon Sep 17 00:00:00 2001 +From 85c4f122585172f2aee5d993247596e3e1e880e1 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Sat, 31 Dec 2022 11:14:56 +1000 +Date: Thu, 1 Aug 2024 20:17:51 +1000 Subject: Add Haiku support diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8b6d5a7..a9b4967 100644 +index a36752b..28dd4a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -1488,6 +1488,9 @@ PRIVATE - modules/video_capture/linux/video_capture_linux.cc +@@ -1453,6 +1453,9 @@ PRIVATE + modules/video_capture/linux/video_capture_pipewire.h modules/video_capture/linux/video_capture_v4l2.cc modules/video_capture/linux/video_capture_v4l2.h + modules/video_capture/haiku/device_info_haiku.cc @@ -18,7 +18,7 @@ index 8b6d5a7..a9b4967 100644 modules/video_capture/windows/device_info_ds.cc modules/video_capture/windows/device_info_ds.h modules/video_capture/windows/help_functions_ds.cc -@@ -2222,6 +2225,7 @@ PRIVATE +@@ -2212,6 +2215,7 @@ PRIVATE modules/desktop_capture/mouse_cursor.h modules/desktop_capture/mouse_cursor_monitor.h modules/desktop_capture/mouse_cursor_monitor_linux.cc @@ -26,7 +26,7 @@ index 8b6d5a7..a9b4967 100644 modules/desktop_capture/mouse_cursor_monitor_mac.mm modules/desktop_capture/mouse_cursor_monitor_win.cc modules/desktop_capture/resolution_tracker.cc -@@ -2233,8 +2237,10 @@ PRIVATE +@@ -2223,8 +2227,10 @@ PRIVATE modules/desktop_capture/screen_capturer_helper.h modules/desktop_capture/screen_capturer_darwin.mm modules/desktop_capture/screen_capturer_linux.cc @@ -37,7 +37,7 @@ index 8b6d5a7..a9b4967 100644 modules/desktop_capture/window_capturer_mac.mm modules/desktop_capture/window_capturer_win.cc modules/desktop_capture/window_finder.cc -@@ -2249,6 +2255,10 @@ PRIVATE +@@ -2239,6 +2245,10 @@ PRIVATE modules/desktop_capture/screen_capturer_null.cc modules/desktop_capture/window_capturer_null.cc @@ -49,12 +49,12 @@ index 8b6d5a7..a9b4967 100644 modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc modules/desktop_capture/linux/wayland/base_capturer_pipewire.h diff --git a/cmake/libwebrtcbuild.cmake b/cmake/libwebrtcbuild.cmake -index 388b7aa..9db3d48 100644 +index 4838e03..c15cef1 100644 --- a/cmake/libwebrtcbuild.cmake +++ b/cmake/libwebrtcbuild.cmake -@@ -61,6 +61,12 @@ if (WIN32) - INTERFACE +@@ -64,6 +64,12 @@ if (WIN32) WEBRTC_WIN + RTC_ENABLE_WIN_WGC ) +elseif (HAIKU) + target_compile_definitions(libwebrtcbuild @@ -108,10 +108,10 @@ index cfc6aeb..699d0e6 100644 set_source_files_properties(${not_linux_sources} PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties(${not_linux_sources} PROPERTIES SKIP_AUTOGEN TRUE) diff --git a/src/api/task_queue/BUILD.gn b/src/api/task_queue/BUILD.gn -index dc69686..718c9d8 100644 +index 1b9425d..ff93aea 100644 --- a/src/api/task_queue/BUILD.gn +++ b/src/api/task_queue/BUILD.gn -@@ -90,7 +90,7 @@ rtc_library("default_task_queue_factory") { +@@ -95,7 +95,7 @@ rtc_library("default_task_queue_factory") { "../../rtc_base/memory:always_valid_pointer", ] @@ -120,6 +120,18 @@ index dc69686..718c9d8 100644 if (is_android) { sources += [ "default_task_queue_factory_stdlib_or_libevent_experiment.cc" ] +diff --git a/src/modules/audio_coding/neteq/reorder_optimizer.cc b/src/modules/audio_coding/neteq/reorder_optimizer.cc +index f6e073f..ed71751 100644 +--- a/src/modules/audio_coding/neteq/reorder_optimizer.cc ++++ b/src/modules/audio_coding/neteq/reorder_optimizer.cc +@@ -12,6 +12,7 @@ + + #include + #include ++#include + #include + + namespace webrtc { diff --git a/src/modules/desktop_capture/haiku/screen_capturer_haiku.cc b/src/modules/desktop_capture/haiku/screen_capturer_haiku.cc new file mode 100644 index 0000000..b6f4d24 @@ -1512,10 +1524,10 @@ index 0000000..7308f0c + +#endif // VIDEO_CONSUMER_H diff --git a/src/rtc_base/BUILD.gn b/src/rtc_base/BUILD.gn -index b171b16..6907693 100644 +index 2cf9c11..cd10a6d 100644 --- a/src/rtc_base/BUILD.gn +++ b/src/rtc_base/BUILD.gn -@@ -628,7 +628,7 @@ rtc_source_set("rtc_operations_chain") { +@@ -679,7 +679,7 @@ rtc_source_set("rtc_operations_chain") { absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ] } @@ -1525,10 +1537,10 @@ index b171b16..6907693 100644 visibility = [ "../api/task_queue:default_task_queue_factory" ] sources = [ diff --git a/src/rtc_base/byte_order.h b/src/rtc_base/byte_order.h -index b4e7e9d..0501bcd 100644 +index 0ebaaaf..1e9566b 100644 --- a/src/rtc_base/byte_order.h +++ b/src/rtc_base/byte_order.h -@@ -88,7 +88,7 @@ +@@ -90,7 +90,7 @@ #error WEBRTC_ARCH_BIG_ENDIAN or WEBRTC_ARCH_LITTLE_ENDIAN must be defined. #endif // defined(WEBRTC_ARCH_LITTLE_ENDIAN) @@ -1538,7 +1550,7 @@ index b4e7e9d..0501bcd 100644 #elif defined(WEBRTC_FREEBSD) || defined(WEBRTC_OPENBSD) #include diff --git a/src/rtc_base/ip_address.cc b/src/rtc_base/ip_address.cc -index f1d2f96..7260f5c 100644 +index 04fbc9b..93c7fe3 100644 --- a/src/rtc_base/ip_address.cc +++ b/src/rtc_base/ip_address.cc @@ -13,6 +13,9 @@ @@ -1551,7 +1563,7 @@ index f1d2f96..7260f5c 100644 #ifdef OPENBSD #include #endif -@@ -32,6 +35,15 @@ +@@ -31,6 +34,15 @@ namespace rtc { // Prefixes used for categorizing IPv6 addresses. @@ -1567,7 +1579,7 @@ index f1d2f96..7260f5c 100644 static const in6_addr kV4MappedPrefix = { {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFF, 0xFF, 0}}}; static const in6_addr k6To4Prefix = {{{0x20, 0x02, 0}}}; -@@ -39,6 +51,7 @@ static const in6_addr kTeredoPrefix = {{{0x20, 0x01, 0x00, 0x00}}}; +@@ -38,6 +50,7 @@ static const in6_addr kTeredoPrefix = {{{0x20, 0x01, 0x00, 0x00}}}; static const in6_addr kV4CompatibilityPrefix = {{{0}}}; static const in6_addr k6BonePrefix = {{{0x3f, 0xfe, 0}}}; static const in6_addr kPrivateNetworkPrefix = {{{0xFD}}}; @@ -1575,24 +1587,39 @@ index f1d2f96..7260f5c 100644 static bool IPIsHelper(const IPAddress& ip, const in6_addr& tomatch, +diff --git a/src/rtc_base/logging.cc b/src/rtc_base/logging.cc +index 61a3c66..c61a47e 100644 +--- a/src/rtc_base/logging.cc ++++ b/src/rtc_base/logging.cc +@@ -97,7 +97,7 @@ std::string LogLineRef::DefaultLogLine() const { + log_output << timestamp; + } + if (thread_id_.has_value()) { +- log_output << "[" << *thread_id_ << "] "; ++ log_output << "[" << (uint64_t)(*thread_id_) << "] "; + } + if (!filename_.empty()) { + #if defined(WEBRTC_ANDROID) diff --git a/src/rtc_base/network.cc b/src/rtc_base/network.cc -index 5ff8d14..cde0071 100644 +index 4be6eed..691fb2e 100644 --- a/src/rtc_base/network.cc +++ b/src/rtc_base/network.cc -@@ -603,7 +603,7 @@ void BasicNetworkManager::ConvertIfAddrs( +@@ -630,8 +630,8 @@ void BasicNetworkManager::ConvertIfAddrs( continue; } // Skip ones which are down. - if (!(cursor->ifa_flags & IFF_RUNNING)) { +- RTC_LOG(LS_INFO) << "Skip interface because of not IFF_RUNNING: " + if (!(cursor->ifa_flags & IFF_LINK)) { ++ RTC_LOG(LS_INFO) << "Skip interface because of not IFF_LINK: " + << ip.ToSensitiveString(); continue; } - // Skip unknown family. diff --git a/src/rtc_base/physical_socket_server.cc b/src/rtc_base/physical_socket_server.cc -index 0a83dc3..78b2b06 100644 +index 727e200..5ce1edf 100644 --- a/src/rtc_base/physical_socket_server.cc +++ b/src/rtc_base/physical_socket_server.cc -@@ -327,7 +327,7 @@ int PhysicalSocket::SetOption(Option opt, int value) { +@@ -334,7 +334,7 @@ int PhysicalSocket::SetOption(Option opt, int value) { value <<= 2; #endif } @@ -1601,7 +1628,7 @@ index 0a83dc3..78b2b06 100644 if (sopt == IPV6_TCLASS) { // Set the IPv4 option in all cases to support dual-stack sockets. // Don't bother checking the return code, as this is expected to fail if -@@ -587,7 +587,7 @@ int PhysicalSocket::TranslateOption(Option opt, int* slevel, int* sopt) { +@@ -687,7 +687,7 @@ int PhysicalSocket::TranslateOption(Option opt, int* slevel, int* sopt) { *sopt = TCP_NODELAY; break; case OPT_DSCP: @@ -1650,94 +1677,60 @@ index 4ac7043..5fe950f 100644 RTC_EXPORT_TEMPLATE_TEST(DEFAULT, __declspec(dllimport)); #undef RTC_EXPORT_TEMPLATE_TEST -diff --git a/src/third_party/openh264/src/codec/common/src/WelsThreadLib.cpp b/src/third_party/openh264/src/codec/common/src/WelsThreadLib.cpp -index 8aa67f1..11c500f 100644 ---- a/src/third_party/openh264/src/codec/common/src/WelsThreadLib.cpp -+++ b/src/third_party/openh264/src/codec/common/src/WelsThreadLib.cpp -@@ -48,9 +48,12 @@ - #include - #include - #include --#ifndef __Fuchsia__ -+#if !defined(__Fuchsia__) && !defined(__HAIKU__) - #include - #endif -+#ifdef __HAIKU__ -+#include +-- +2.45.2 + + +From f4560193b4024a83faa3e9ef85f6fa2ea09704ff Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Fri, 2 Aug 2024 09:49:48 +1000 +Subject: Disable WebRTC-SCM-Timestamp experiment for Haiku + + +diff --git a/src/rtc_base/async_udp_socket.cc b/src/rtc_base/async_udp_socket.cc +index 3d258bc..f2d42bf 100644 +--- a/src/rtc_base/async_udp_socket.cc ++++ b/src/rtc_base/async_udp_socket.cc +@@ -24,7 +24,11 @@ namespace rtc { + // Returns true if the experiement "WebRTC-SCM-Timestamp" is explicitly + // disabled. + static bool IsScmTimeStampExperimentDisabled() { ++#if defined(WEBRTC_HAIKU) ++ return true; ++#else + return webrtc::field_trial::IsDisabled("WebRTC-SCM-Timestamp"); +#endif - #ifdef __APPLE__ - #define HW_NCPU_NAME "hw.logicalcpu" - #else -@@ -244,7 +247,7 @@ WELS_THREAD_ERROR_CODE WelsThreadCreate (WELS_THREAD_HANDLE* thread, LPWELS_ - err = pthread_attr_init (&at); - if (err) - return err; --#if !defined(__ANDROID__) && !defined(__Fuchsia__) -+#if !defined(__ANDROID__) && !defined(__Fuchsia__) && !defined(__HAIKU__) - err = pthread_attr_setscope (&at, PTHREAD_SCOPE_SYSTEM); - if (err) - return err; -@@ -517,6 +520,15 @@ WELS_THREAD_ERROR_CODE WelsQueryLogicalProcessInfo (WelsLogicalProcessInfo* p + } - return WELS_THREAD_ERROR_OK; + AsyncUDPSocket* AsyncUDPSocket::Create(Socket* socket, +diff --git a/src/rtc_base/physical_socket_server.cc b/src/rtc_base/physical_socket_server.cc +index 5ce1edf..de8c2b7 100644 +--- a/src/rtc_base/physical_socket_server.cc ++++ b/src/rtc_base/physical_socket_server.cc +@@ -57,6 +57,11 @@ + #include + #endif -+#elif defined(__HAIKU__) -+ system_info sysinfo; -+ if (get_system_info(&sysinfo) == B_OK) { -+ pInfo->ProcessorCount = sysinfo.cpu_count; -+ } else { -+ pInfo->ProcessorCount = 1; -+ } -+ return WELS_THREAD_ERROR_OK; ++#if defined(WEBRTC_HAIKU) ++#define SO_TIMESTAMP 0 ++#define SCM_TIMESTAMP 0 ++#endif + - #elif defined(__EMSCRIPTEN__) + #if defined(WEBRTC_WIN) + #define LAST_SYSTEM_ERROR (::GetLastError()) + #elif defined(__native_client__) && __native_client__ +@@ -123,7 +128,11 @@ class ScopedSetTrue { + // Returns true if the experiement "WebRTC-SCM-Timestamp" is explicitly + // disabled. + bool IsScmTimeStampExperimentDisabled() { ++#if defined(WEBRTC_HAIKU) ++ return true; ++#else + return webrtc::field_trial::IsDisabled("WebRTC-SCM-Timestamp"); ++#endif + } + } // namespace - // There is not yet a way to determine CPU count in emscripten JS environment. -- -2.37.3 - - -From 1ad39ff9d93a9cba0a282ea76435d6104151ad95 Mon Sep 17 00:00:00 2001 -From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Wed, 4 Jan 2023 12:17:32 +1000 -Subject: Fix build - - -diff --git a/src/rtc_base/logging.cc b/src/rtc_base/logging.cc -index 4bc9183..581e399 100644 ---- a/src/rtc_base/logging.cc -+++ b/src/rtc_base/logging.cc -@@ -97,7 +97,7 @@ std::string LogLineRef::DefaultLogLine() const { - log_output << timestamp; - } - if (thread_id_.has_value()) { -- log_output << "[" << *thread_id_ << "] "; -+ log_output << "[" << (uint64_t)(*thread_id_) << "] "; - } - if (!filename_.empty()) { - #if defined(WEBRTC_ANDROID) --- -2.37.3 - - -From e0941e0c8c34c37ac02194b717eb0adbeecfe109 Mon Sep 17 00:00:00 2001 -From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Fri, 22 Sep 2023 23:22:17 +1000 -Subject: Add missing header - - -diff --git a/src/modules/audio_coding/neteq/reorder_optimizer.cc b/src/modules/audio_coding/neteq/reorder_optimizer.cc -index f6e073f..ed71751 100644 ---- a/src/modules/audio_coding/neteq/reorder_optimizer.cc -+++ b/src/modules/audio_coding/neteq/reorder_optimizer.cc -@@ -12,6 +12,7 @@ - - #include - #include -+#include - #include - - namespace webrtc { --- -2.37.3 +2.45.2 diff --git a/media-libs/tg_owt/tg_owt-0.0.20240615.recipe b/media-libs/tg_owt/tg_owt-0.0.20240730.recipe similarity index 90% rename from media-libs/tg_owt/tg_owt-0.0.20240615.recipe rename to media-libs/tg_owt/tg_owt-0.0.20240730.recipe index 584483644..eedfa7d41 100644 --- a/media-libs/tg_owt/tg_owt-0.0.20240615.recipe +++ b/media-libs/tg_owt/tg_owt-0.0.20240730.recipe @@ -4,10 +4,10 @@ HOMEPAGE="https://github.com/desktop-app/tg_owt" COPYRIGHT="2013-2024 Telegram" LICENSE="BSD (3-clause)" REVISION="1" -srcGitRev="c9cc4390ab951f2cbc103ff783a11f398b27660b" +srcGitRev="e9d103e2480e0983bf464debc371b049cdd83648" SOURCE_URI="https://github.com/desktop-app/tg_owt/archive/$srcGitRev.tar.gz" SOURCE_DIR="tg_owt-$srcGitRev" -CHECKSUM_SHA256="b6bb446b4f7bff8b47da859cafeab6dcbc4215e606de3afce49129d8314e2970" +CHECKSUM_SHA256="cb455014c44aa745d0bb9e833fb4dcb6d34230afe07ecdc898e05f22180855fa" SOURCE_FILENAME="tg_owt-$srcGitRev.tar.gz" srcGitRev_2="04821d1e7d60845525e8db55c7bcd41ef5be9406" SOURCE_URI_2="https://gitlab.com/chromiumsrc/libyuv/-/archive/$srcGitRev_2/libyuv-$srcGitRev_2.tar.bz2" @@ -17,9 +17,9 @@ srcGitRev_3="21fc8ef30415a635e7351ffa0e5d5367943d4a94" SOURCE_URI_3="https://github.com/google/crc32c/archive/$srcGitRev_3.tar.gz" CHECKSUM_SHA256_3="97d404992dcab9ab6be56067a37889b0cba1ea6cabcc2bc3feeb0131ee35a340" SOURCE_FILENAME_3="crc32c-$srcGitRev_3.tar.gz" -srcGitRev_4="8c0b94e793a66495e0b1f34a5eb26bd7dc672db0" +srcGitRev_4="d7aaad83b488fd62bd51c81ecf16cd938532cc0a" SOURCE_URI_4="https://github.com/abseil/abseil-cpp/archive/$srcGitRev_4.tar.gz" -CHECKSUM_SHA256_4="a6be76f59c474a215f2df5116b312257462e97f2e38b2bfa6df8b6a55710b058" +CHECKSUM_SHA256_4="3a1f642ea21f45b220a01708d06b46042a3b750f31772b52371d6268f02d5bbc" SOURCE_FILENAME_4="abseil-cpp-$srcGitRev_4.tar.gz" srcGitRev_5="a566a9cfcd619e8327784aa7cff4a1276dc1e895" SOURCE_URI_5="https://github.com/cisco/libsrtp/archive/$srcGitRev_5.tar.gz" @@ -42,6 +42,7 @@ REQUIRES=" lib:libavutil$secondaryArchSuffix lib:libcrypto$secondaryArchSuffix lib:libjpeg$secondaryArchSuffix + lib:libopenh264$secondaryArchSuffix lib:libopus$secondaryArchSuffix lib:libprotobuf$secondaryArchSuffix lib:libswresample$secondaryArchSuffix @@ -56,6 +57,7 @@ BUILD_REQUIRES=" devel:libavcodec$secondaryArchSuffix >= 58 devel:libcrypto$secondaryArchSuffix devel:libjpeg$secondaryArchSuffix + devel:libopenh264$secondaryArchSuffix devel:libopus$secondaryArchSuffix devel:libprotobuf$secondaryArchSuffix devel:libssl$secondaryArchSuffix @@ -67,6 +69,7 @@ BUILD_PREREQUIRES=" cmd:gcc$secondaryArchSuffix cmd:make cmd:pkg_config$secondaryArchSuffix + cmd:python3 cmd:sed cmd:yasm "