Philipp Hörist pushed to branch master at gajim / gajim
Commits: 58c59ec5 by Philipp Hörist at 2022-11-30T23:38:26+01:00 refactor: Move GstPbutils import into method
app.detect_dependencies() needs to call gi.require() first, so import this inside the method
- - - - - d3953b58 by Philipp Hörist at 2022-11-30T23:59:57+01:00 imprv: Features: Add entry for Audio Preview
- - - - - 4ad531df by Philipp Hörist at 2022-12-01T00:14:02+01:00 refactor: Remove debian related package names
- - - - -
2 changed files:
- gajim/common/preview_helpers.py - gajim/gtk/features.py
Changes:
===================================== gajim/common/preview_helpers.py ===================================== @@ -32,11 +32,6 @@ from gi.repository import GLib from gi.repository import Gio
-try: - from gi.repository import GstPbutils -except Exception: - pass - from PIL import Image from PIL import ImageFile
@@ -421,6 +416,9 @@ def aes_decrypt(key: bytes, iv: bytes, payload: bytes) -> bytes:
def contains_audio_streams(file_path: Path) -> bool: # Check if it is really an audio file + + from gi.repository import GstPbutils + has_audio = False discoverer = GstPbutils.Discoverer() try:
===================================== gajim/gtk/features.py ===================================== @@ -107,12 +107,18 @@ def _get_features(self) -> list[Feature]: _('Requires: libappindicator3'), _('No additional requirements'), None), - Feature(_('Audio / Video'), + Feature(_('Audio Preview'), + app.is_installed('GST'), + _('Enables Gajim to provide a Audio preview'), + _('Requires: gstreamer-1.0, gst-plugins-base-1.0'), + _('No additional requirements'), + None), + Feature(_('Audio / Video Calls'), av_available, _('Enables Gajim to provide Audio and Video chats'), - _('Requires: gir1.2-farstream-0.2, gir1.2-gstreamer-1.0, ' - 'gstreamer1.0-plugins-base, gstreamer1.0-plugins-ugly, ' - 'gstreamer1.0-libav, and gstreamer1.0-gtk3'), + _('Requires: farstream-0.2, gstreamer-1.0, ' + 'gst-plugins-base-1.0, gst-plugins-ugly-1.0, ' + 'gst-libav and gstreamer-gtk3-plugin'), _('Feature not available on Windows'), None), Feature(_('Automatic Status'), @@ -146,7 +152,7 @@ def _get_features(self) -> list[Feature]: app.is_installed('UPNP'), _('Enables Gajim to request your router to forward ports ' 'for file transfers'), - _('Requires: gir1.2-gupnpigd-1.0'), + _('Requires: gupnpigd-1.0'), _('Feature not available on Windows'), None) ]
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/d0fb8c5b47620d3d2831ecb529ef4225...