Udev isn't supported inside a Flatpak sandbox and judging by the code inside video_device_monitor_impl.cpp it should automatically fall back to enumerating /dev/video# devices. For some reason this never gets executed and patching out the udev related code triggers some infinite loop. Since I'm not a c++ expert my patch could be at fault as well. Last where are the JAMI_ERR() calls going, I don't see anything in stdout?
The main diff is that we check that /dev/videoX is present and if not leave the loop. addDevice changed a bit since some time and the loop can be infinite if nothing throw
My patch stalls jami-daemon and i see nothing. If I add yours jami-daemon works and lists my camera but that's all. The the preview window stays black and the little control LED next to the camera stays off as well.
dring gets started by jami-gnome over dbus.
When trying to record a video:
** (jami-gnome:2): WARNING **: 18:05:42.052: set_state: failed to start recording, wait preview
or video call:
could not open shm area "Jami Daemon_shm_2_0" , shm_open failed: File or directory not found
Video calls work after adding a custom ffmpeg build with v4l support.
The only confusing thing is that if starting dring manually the video preview in settings and video calls work but starting dring via dbus breaks all previews. Recording video in chat or video calls still work but you don't see yourself.
so the daemon is working and this is at least a nice part.
I'm not sure that the patch for v4l2/video_device_monitor_impl.cpp is necessary anymore since you changed ffmpeg with v4l2 support. I still recommend the one in the daemon/contrib directory
For the logs, it seems "ok" except libcanberra is missing, but it's for sound in notifications so not related. And gnutls should be 3.6.15 like the contrib directory, but not related too.
Commits seems ok too.
So there is 2 possibilities we can dig:
If you run dbus-monitor | grep cx.ring.Ring.VideoManager you should see camera events (startedDecoding, stoppedDecoding, startCamera, stopCamera)
It is certainly a flatpak issue (as the same code show the camera on other packages). And a permission may miss, journalctl/strace can give you inputs for opened files that can't be opened?
Another way to check is to add logs in lrc/src/shmrenderer.cpp to check if frames from the shared memory can be retrieven by the client (but first thing to check is if flatpak doesn't fail to get some files)
Cool. Imho it's the way to go for flatpak. I don't think we want to run the daemon separately here and the flatpak should be used to launch the whole thing (daemon+client together). Moreover, for the logs, all will be done.
I am currently doing the patch for the daemon. Will ping you for testing and once review is done, I think we may close this issue unless you see something else?