summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEsteve Varela Colominas <esteve.varela@gmail.com>2021-12-10 16:16:20 +0100
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2021-12-10 13:29:36 -0800
commita1b825fb223fb6ba135082e0ac83f776dab3e63a (patch)
treede557fa4e5698c6c92e2d6992263449242119efc /media-libs/tg_owt/files
parentmedia-libs/tg_owt: Drop old (diff)
downloadgentoo-a1b825fb223fb6ba135082e0ac83f776dab3e63a.tar.gz
gentoo-a1b825fb223fb6ba135082e0ac83f776dab3e63a.tar.bz2
gentoo-a1b825fb223fb6ba135082e0ac83f776dab3e63a.zip
media-libs/tg_owt: Bump to 0_pre20211207
Signed-off-by: Esteve Varela Colominas <esteve.varela@gmail.com> Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'media-libs/tg_owt/files')
-rw-r--r--media-libs/tg_owt/files/tg_owt-0_pre20211207-allow-disabling-X11.patch115
-rw-r--r--media-libs/tg_owt/files/tg_owt-0_pre20211207-fix-dcsctp-references.patch17
2 files changed, 132 insertions, 0 deletions
diff --git a/media-libs/tg_owt/files/tg_owt-0_pre20211207-allow-disabling-X11.patch b/media-libs/tg_owt/files/tg_owt-0_pre20211207-allow-disabling-X11.patch
new file mode 100644
index 000000000000..0abb3cfb4a37
--- /dev/null
+++ b/media-libs/tg_owt/files/tg_owt-0_pre20211207-allow-disabling-X11.patch
@@ -0,0 +1,115 @@
+Add -DTG_OWT_USE_X11
+
+Allows disabling X11 desktop capturing independently of pipewire support, for
+the few people that run wayland without any X11 support whatsoever.
+
+This setup is untested, but supported by the GNI build system, see:
+* src/modules/desktop_capture/BUILD.gn (option rtc_use_x11_extensions)
+
+Toggling the WEBRTC_USE_X11 define also affects some files under
+src/modules/audio_device, but that falls under "X11 support", regardless...
+
+--- tg_owt-d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589.orig/CMakeLists.txt
++++ tg_owt-d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589/CMakeLists.txt
+@@ -21,11 +21,13 @@
+
+ option(BUILD_SHARED_LIBS "Builds shared libraries instead of static." ${TG_OWT_PACKAGED_BUILD})
+ option(TG_OWT_USE_PROTOBUF "Use protobuf to generate additional headers. Useful for packaged build." ${BUILD_SHARED_LIBS})
++option(TG_OWT_USE_X11 "Use X11 for desktop capture on non-Apple Unix." ON)
+ option(TG_OWT_USE_PIPEWIRE "Use pipewire for desktop capture on non-Apple Unix." ON)
+ option(TG_OWT_DLOPEN_PIPEWIRE "dlopen pipewire 0.3 for desktop capture on non-Apple Unix." ${not_packaged_build})
+ option(TG_OWT_BUILD_AUDIO_BACKENDS "Build webrtc audio backends." ON)
+
+ if (NOT UNIX OR APPLE)
++ set(TG_OWT_USE_X11 OFF)
+ set(TG_OWT_USE_PIPEWIRE OFF)
+ endif()
+
+@@ -84,6 +86,10 @@
+ add_library(tg_owt)
+ init_target(tg_owt)
+
++if (TG_OWT_USE_X11)
++ link_x11(tg_owt)
++endif()
++
+ if (TG_OWT_USE_PIPEWIRE)
+ link_glib(tg_owt)
+ if (TG_OWT_DLOPEN_PIPEWIRE)
+@@ -161,10 +167,6 @@
+ include(cmake/libwebrtcbuild.cmake)
+ target_link_libraries(tg_owt PUBLIC tg_owt::libwebrtcbuild)
+
+-if (UNIX AND NOT APPLE)
+- link_x11(tg_owt)
+-endif()
+-
+ function(add_sublibrary postfix)
+ add_library(tg_owt_${postfix} OBJECT)
+ init_feature_target(tg_owt_${postfix} ${postfix})
+@@ -2204,6 +2206,37 @@
+ )
+ endif()
+
++if (NOT TG_OWT_USE_X11)
++ remove_target_sources(tg_owt ${webrtc_loc}
++ modules/desktop_capture/linux/mouse_cursor_monitor_x11.cc
++ modules/desktop_capture/linux/mouse_cursor_monitor_x11.h
++ modules/desktop_capture/linux/screen_capturer_x11.cc
++ modules/desktop_capture/linux/screen_capturer_x11.h
++ modules/desktop_capture/linux/shared_x_display.cc
++ modules/desktop_capture/linux/shared_x_display.h
++ modules/desktop_capture/linux/window_capturer_x11.cc
++ modules/desktop_capture/linux/window_capturer_x11.h
++ modules/desktop_capture/linux/window_finder_x11.cc
++ modules/desktop_capture/linux/window_finder_x11.h
++ modules/desktop_capture/linux/window_list_utils.cc
++ modules/desktop_capture/linux/window_list_utils.h
++ modules/desktop_capture/linux/x_atom_cache.cc
++ modules/desktop_capture/linux/x_atom_cache.h
++ modules/desktop_capture/linux/x_error_trap.cc
++ modules/desktop_capture/linux/x_error_trap.h
++ modules/desktop_capture/linux/x_server_pixel_buffer.cc
++ modules/desktop_capture/linux/x_server_pixel_buffer.h
++ modules/desktop_capture/linux/x_window_property.cc
++ modules/desktop_capture/linux/x_window_property.h
++
++ modules/desktop_capture/screen_drawer.cc
++ modules/desktop_capture/screen_drawer.h
++ modules/desktop_capture/screen_drawer_linux.cc
++ modules/desktop_capture/screen_drawer_lock_posix.cc
++ modules/desktop_capture/screen_drawer_lock_posix.h
++ )
++endif()
++
+ if (NOT TG_OWT_USE_PIPEWIRE)
+ remove_target_sources(tg_owt ${webrtc_loc}
+ modules/desktop_capture/linux/base_capturer_pipewire.cc
+--- tg_owt-d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589.orig/cmake/libwebrtcbuild.cmake
++++ tg_owt-d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589/cmake/libwebrtcbuild.cmake
+@@ -28,6 +28,13 @@
+ BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0
+ )
+
++if (TG_OWT_USE_X11)
++ target_compile_definitions(libwebrtcbuild
++ INTERFACE
++ WEBRTC_USE_X11
++ )
++endif()
++
+ if (TG_OWT_USE_PIPEWIRE)
+ target_compile_definitions(libwebrtcbuild
+ INTERFACE
+@@ -64,11 +71,6 @@
+ INTERFACE
+ WEBRTC_MAC
+ )
+- else()
+- target_compile_definitions(libwebrtcbuild
+- INTERFACE
+- WEBRTC_USE_X11
+- )
+ endif()
+
+ if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
diff --git a/media-libs/tg_owt/files/tg_owt-0_pre20211207-fix-dcsctp-references.patch b/media-libs/tg_owt/files/tg_owt-0_pre20211207-fix-dcsctp-references.patch
new file mode 100644
index 000000000000..7b3380dd55de
--- /dev/null
+++ b/media-libs/tg_owt/files/tg_owt-0_pre20211207-fix-dcsctp-references.patch
@@ -0,0 +1,17 @@
+Fix undefined references to dcsctp when linking this library
+
+/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.1/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libtg_owt.so.0.0.0: undefined reference to `dcsctp::TaskQueueTimeoutFactory::TaskQueueTimeout::TaskQueueTimeout(dcsctp::TaskQueueTimeoutFactory&)'
+/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.1/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libtg_owt.so.0.0.0: undefined reference to `dcsctp::DcSctpSocketFactory::Create(std::basic_string_view<char, std::char_traits<char> >, dcsctp::DcSctpSocketCallbacks&, std::unique_ptr<dcsctp::PacketObserver, std::default_delete<dcsctp::PacketObserver> >, dcsctp::DcSctpOptions const&)'
+/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.1/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libtg_owt.so.0.0.0: undefined reference to `vtable for dcsctp::TextPcapPacketObserver'
+
+--- tg_owt-d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589.orig/CMakeLists.txt
++++ tg_owt-d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589/CMakeLists.txt
+@@ -808,8 +808,6 @@
+ media/engine/webrtc_media_engine_defaults.cc
+ media/engine/webrtc_video_engine.cc
+ media/engine/webrtc_voice_engine.cc
+- media/sctp/dcsctp_transport.cc
+- media/sctp/dcsctp_transport.h
+ media/sctp/sctp_transport_factory.cc
+ media/sctp/sctp_transport_factory.h
+ media/sctp/usrsctp_transport.cc