[solved][jami-daemon] JAMI_VIDEO=ON but no VideoManager

Hi,
I manually compiled jami-damon on linux arm64 with

mkdir build
cd build
cmake .. -DJAMI_DBUS=ON -DJAMI_VIDEO=ON
make -j10

but I do not find VideoManager

$ gdbus introspect --session --dest cx.ring.Ring --object-path /cx/ring/Ring
node /cx/ring/Ring {
  interface org.freedesktop.DBus.Peer {
    methods:
      Ping();
      GetMachineId(out s machine_uuid);
    signals:
    properties:
  };
  interface org.freedesktop.DBus.Introspectable {
    methods:
      Introspect(out s xml_data);
    signals:
    properties:
  };
  interface org.freedesktop.DBus.Properties {
    methods:
      Get(in  s interface_name,
          in  s property_name,
          out v value);
      GetAll(in  s interface_name,
             out a{sv} props);
      Set(in  s interface_name,
          in  s property_name,
          in  v value);
    signals:
      PropertiesChanged(s interface_name,
                        a{sv} changed_properties,
                        as invalidated_properties);
    properties:
  };
  node PresenceManager {
  };
  node NetworkServiceManager {
  };
  node Instance {
  };
  node ConfigurationManager {
  };
  node CallManager {
  };
};

What am I doing wrong?

Thanks for your attention

1 Like

D’après claude.ai

Résumé

Oui, c’était un bug — deux bugs en fait, dans CMakeLists.txt (le build Meson, lui, était correct). Le VideoManager n’apparaissait jamais sur d-bus avec CMake, quelle que soit la valeur de JAMI_VIDEO, à cause de :

  1. ENABLE_VIDEO jamais propagé au binaire jamid : la macro n’était définie qu’en PRIVATE sur la bibliothèque jami-core, jamais sur l’exécutable jamid (qui link juste la lib). Le #ifdef ENABLE_VIDEO dans bin/dbus/main.cpp était donc toujours faux → DBusVideoManager n’était jamais instancié.
  2. ENABLE_SHM totalement absent de CMakeLists.txt (existait seulement dans meson.build). dbusvideomanager.hpp appelle libjami::startShmSink(), déclarée uniquement sous #ifdef ENABLE_SHM dans videomanager_interface.h — donc dès qu’on corrige le bug n°1, la compilation échoue avec startShmSink is not a member of libjami.

Correctif appliqué dans CMakeLists.txt :

  • Ajout de ENABLE_SHM (private, sur jami-core) quand JAMI_VIDEO et JAMI_DBUS sont actifs.
  • Ajout de target_compile_definitions(jamid PRIVATE ENABLE_VIDEO ENABLE_SHM) et ENABLE_PLUGIN sur la cible jamid, dans le bloc if (JAMI_DBUS).

Vérifié : recompilation complète, lancement de jamid -c -d -p, et gdbus introspect montre maintenant bien les nœuds VideoManager et PluginManagerInterface en plus des autres managers.

Patch:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a1fe67c32..7894d41c8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -415,6 +415,9 @@ if (JAMI_VIDEO)
     if (JAMI_VIDEO_ACCEL)
         target_compile_definitions(${PROJECT_NAME} PRIVATE ENABLE_HWACCEL)
     endif()
+    if (JAMI_DBUS)
+        target_compile_definitions(${PROJECT_NAME} PRIVATE ENABLE_SHM)
+    endif()
 endif()
 if (JAMI_PLUGIN)
     target_compile_definitions(${PROJECT_NAME} PRIVATE ENABLE_PLUGIN)
@@ -933,6 +936,12 @@ else()
             ${DBUS_ADAPTOR_FILES}
         )
         target_link_libraries(jamid ${PROJECT_NAME} PkgConfig::DBusCpp)
+        if (JAMI_VIDEO)
+            target_compile_definitions(jamid PRIVATE ENABLE_VIDEO ENABLE_SHM)
+        endif()
+        if (JAMI_PLUGIN)
+            target_compile_definitions(jamid PRIVATE ENABLE_PLUGIN)
+        endif()
         install (TARGETS jamid DESTINATION ${CMAKE_INSTALL_LIBEXECDIR})
 
         # Install service file

Validé sur mon laptop amd64, ma station de compilation aarch64 et mon téléphone arm64.

Merci pour le rapport et le fix.
Ça sera intégré dans le code prochainement.