Lucas Gabriel Vuotto <lu...@sexy.is> writes: > On Mon, Dec 16, 2024 at 07:07:19PM +0100, Paco Esteban wrote: >> Updated diff with py-gstreamer added as a RDEP. >> Without it we encounter all sorts of crashes. >> >> Tried to apply a patch that's already in master, >> https://dev.gajim.org/gajim/gajim/-/commit/d3f0067f8ad5a36ad6a7f5163767b34e72257b2d >> as suggested by lucas@ but the problem persist. >> >> We can get ride of gstreamer in a future version. >> >> comments ? ok ? > > I'm able to run Gajim withour gstreamer with this patch.
Still crashes for me with this patch without py3-gstreamer installed: ## Versions: - OS: OpenBSD 7.6 - GTK Version: 3.24.43 - PyGObject Version: 3.50.0 - GLib Version : 2.82.4 - libsoup Version: 3.6.1 - python-nbxmpp Version: 5.0.4 - Gajim Version: 1.9.5 ## Traceback ``` Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/gajim/gtk/application.py", line 382, in _handle_local_options self._startup() File "/usr/local/lib/python3.11/site-packages/gajim/gtk/application.py", line 263, in _startup MainWindow() File "/usr/local/lib/python3.11/site-packages/gajim/gtk/main.py", line 98, in __init__ self._main_stack = MainStack() ^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/gajim/gtk/main_stack.py", line 29, in __init__ self._chat_page = ChatPage() ^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/gajim/gtk/chat_page.py", line 51, in __init__ self._chat_stack = ChatStack() ^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/gajim/gtk/chat_stack.py", line 77, in __init__ self._message_action_box = MessageActionsBox() ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/gajim/gtk/message_actions_box.py", line 86, in __init__ self.voice_message_recorder_button = VoiceMessageRecorderButton() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/gajim/gtk/voice_message_recorder_widget.py", line 51, in __init__ self.set_child( ^^^^^^^^^^^^^^ AttributeError: 'VoiceMessageRecorderButton' object has no attribute 'set_child' ``` > diff refs/heads/master 76e7828e73ee68d8979840699ec5511355dc805b > commit - 69dc97fac29da02f0611602cc0916150ba5793f7 > commit + 76e7828e73ee68d8979840699ec5511355dc805b > blob - a571aeefa6de02dc057831137b69dc3ed1df1607 > blob + 96d62e41a38df3adf5f8031dd6fb48550c4b6652 > --- net/gajim/Makefile > +++ net/gajim/Makefile > @@ -2,6 +2,7 @@ COMMENT= fully-featured XMPP client written in Python > MODPY_EGG_VERSION= 1.9.5 > DISTNAME= gajim-${MODPY_EGG_VERSION} > CATEGORIES= net x11 > +REVISION= 0 > > HOMEPAGE= https://www.gajim.org > > @@ -27,7 +28,6 @@ RUN_DEPENDS= audio/gsound \ > graphics/py-Pillow${MODPY_FLAVOR} \ > graphics/py-cairo${MODPY_FLAVOR} \ > graphics/py-qrcode${MODPY_FLAVOR}>=7.3.1 \ > - multimedia/gstreamer1/py-gstreamer${MODPY_FLAVOR} \ > net/py-nbxmpp${MODPY_FLAVOR}>=5.0.4 \ > security/py-cryptodome${MODPY_FLAVOR} \ > security/py-cryptography${MODPY_FLAVOR} \ > blob - /dev/null > blob + d55a075a77f050afa370d082c36078bbdbd13601 (mode 644) > --- /dev/null > +++ net/gajim/patches/patch-gajim_gtk_voice_message_recorder_py > @@ -0,0 +1,18 @@ > +From d3f0067f8ad5a36ad6a7f5163767b34e72257b2d Mon Sep 17 00:00:00 2001 > +From: wurstsalat <mailtr...@posteo.de> > +Date: Wed, 4 Dec 2024 21:03:50 +0100 > +Subject: [PATCH] cfix: VoiceMessageRecorder: Disbale if Gstreamer is missing > + > +Index: gajim/gtk/voice_message_recorder.py > +--- gajim/gtk/voice_message_recorder.py.orig > ++++ gajim/gtk/voice_message_recorder.py > +@@ -36,6 +36,9 @@ GST_ERROR_ON_MERGING = 3 > + class VoiceMessageRecorder: > + > + def __init__(self, error_callback: Callable[[int, str], None]) -> None: > ++ if not app.is_installed("GST"): > ++ return > ++ > + # React to settings change > + app.settings.connect_signal( > + 'audio_input_device', self._on_audio_input_device_changed > blob - /dev/null > blob + 958c60639072afbcb50d5830fd94a02fb02436db (mode 644) > --- /dev/null > +++ net/gajim/patches/patch-gajim_gtk_voice_message_recorder_widget_py > @@ -0,0 +1,33 @@ > +From d3f0067f8ad5a36ad6a7f5163767b34e72257b2d Mon Sep 17 00:00:00 2001 > +From: wurstsalat <mailtr...@posteo.de> > +Date: Wed, 4 Dec 2024 21:03:50 +0100 > +Subject: [PATCH] cfix: VoiceMessageRecorder: Disbale if Gstreamer is missing > + > +Index: gajim/gtk/voice_message_recorder_widget.py > +--- gajim/gtk/voice_message_recorder_widget.py.orig > ++++ gajim/gtk/voice_message_recorder_widget.py > +@@ -43,6 +43,16 @@ class VoiceMessageRecorderButton(Gtk.MenuButton): > + > + app.settings.bind_signal('show_voice_message_button', self, > 'set_visible') > + > ++ self._ui = get_builder("voice_message_recorder.ui") > ++ > ++ if not app.is_installed("GST"): > ++ self.set_sensitive(False) > ++ self.set_tooltip_text(_("Voice Message are not available")) > ++ self.set_child( > ++ > Gtk.Image.new_from_icon_name("audio-input-microphone-symbolic") > ++ ) > ++ return > ++ > + app.settings.connect_signal( > + 'audio_input_device', self._on_audio_input_device_changed > + ) > +@@ -69,7 +79,6 @@ class VoiceMessageRecorderButton(Gtk.MenuButton): > + self._voice_message_recorder = > VoiceMessageRecorder(self._on_error_occurred) > + self._audio_player_widget = AudioWidget(Path('')) > + > +- self._ui = get_builder('voice_message_recorder.ui') > + self._ui.connect_signals(self) > + self.set_popover(self._ui.popover) > + self._ui.popover.connect('closed', self._on_popover_closed)