From 967fc394b8241e306307c239dd46781fbc321daf Mon Sep 17 00:00:00 2001 From: Marius Vlad Date: Tue, 17 Dec 2024 11:49:15 +0200 Subject: agl-compositor-stream-pipewire: Add an artificial wait out time This improves the preceived time on the receiver side to display incoming frames. In testing, the sender gstreamer pipleine starts much faster that receiver one. Besides that, the receiver client has an additional delay time when starting up as it waits for the gRPC proxy server to have a ready channel available, thus increaseing that start-up time. If the sender side starts the gstreamer pipeline prior to the receiver one, it won't actually get a frame renderered, and displaying a black screen. Users will notice that black screen for over a minute when the client (in this case tbtnavi) renders something on the screen which would also show if tbtnavi client starting just then, which in reality happpend far sooner. Any other client would alleviate this issue if they would continuously update the screen. This artifical delay would make the gstreamer pipeline start a bit later, overall improving the time when tbtnavi would be displayed on the receiver side, pretty much a few seconds after xdg-cluster-recevier started as well. Bug-AGL: SPEC-5235 Change-Id: Ib71ca64212dc37314ccab3d33fbb6ad0400be828 Signed-off-by: Marius Vlad Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/30681 Tested-by: Jenkins Job builder account ci-image-boot-test: Jenkins Job builder account ci-image-build: Jenkins Job builder account Reviewed-by: Jan-Simon Moeller --- .../agl-compositor-init/agl-compositor-stream-pipewire.service | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meta-agl-core/recipes-graphics/wayland/agl-compositor-init/agl-compositor-stream-pipewire.service b/meta-agl-core/recipes-graphics/wayland/agl-compositor-init/agl-compositor-stream-pipewire.service index 949162c22..a01edda22 100644 --- a/meta-agl-core/recipes-graphics/wayland/agl-compositor-init/agl-compositor-stream-pipewire.service +++ b/meta-agl-core/recipes-graphics/wayland/agl-compositor-init/agl-compositor-stream-pipewire.service @@ -10,6 +10,11 @@ ConditionPathExists=/usr/bin/agl-stream-pipewire-output [Service] Type=simple EnvironmentFile=-/etc/default/agl-stream-pipewire-output +# need to wait until receiver has its receiver client started; this might be a +# bit controversial but this actually decreases the preceived time when we +# start displaying frames on the receiver side. A proper solution would be +# somehow have a way to convey when it is the best time start the stream +ExecStartPre=sleep 10 ExecStart=/usr/bin/agl-stream-pipewire-output @REMOTE_OUTPUT_IP@ @REMOTE_OUTPUT_PORT@ User=agl-driver -- cgit 1.2.3-korg