diff --git a/.github/workflows/build-and-make.yaml b/.github/workflows/build-and-make.yaml index 41dd2a48e..9032775f1 100644 --- a/.github/workflows/build-and-make.yaml +++ b/.github/workflows/build-and-make.yaml @@ -68,7 +68,7 @@ jobs: if: matrix.os == 'linux' run: | sudo apt-get update - sudo apt-get install --no-install-recommends -y rpm libarchive-tools flatpak flatpak-builder appstream libx11-dev libxext-dev libmpv-dev mpv pkg-config + sudo apt-get install --no-install-recommends -y rpm libarchive-tools flatpak flatpak-builder appstream libx11-dev libxext-dev libmpv-dev mpv pkg-config libegl-dev libgl-dev libgbm-dev # Configure Flatpak # 1. Add the Flathub repository (source of runtimes) @@ -336,6 +336,15 @@ jobs: ldd dist/apps/electron-backend/native/embedded_mpv.node exit 1 fi + # The frame-copy helper is the inverse: a separate process + # that MUST link libmpv (dev-mode engine; stripped from + # packages until the bundled-runtime staging lands). + test -x dist/apps/electron-backend/native/iptvnator_mpv_helper + if ! ldd dist/apps/electron-backend/native/iptvnator_mpv_helper | grep -q 'libmpv'; then + echo "::error::Linux frame-copy helper must link libmpv" + ldd dist/apps/electron-backend/native/iptvnator_mpv_helper + exit 1 + fi ;; esac diff --git a/apps/electron-backend/native/helper/frame_helper_gl.h b/apps/electron-backend/native/helper/frame_helper_gl.h index 46cae3ebe..b7ad7895c 100644 --- a/apps/electron-backend/native/helper/frame_helper_gl.h +++ b/apps/electron-backend/native/helper/frame_helper_gl.h @@ -212,18 +212,29 @@ public: private: bool acquireDisplay() { + /* Tier log goes to stderr (the adapter mirrors it) — stdout is + * reserved for the JSON event protocol. */ display_ = eglGetPlatformDisplay(EGL_PLATFORM_SURFACELESS_MESA, nullptr, nullptr); - if (initDisplay(display_)) return true; + if (initDisplay(display_)) { + std::fprintf(stderr, "egl display: surfaceless-mesa\n"); + return true; + } display_ = eglGetDisplay(EGL_DEFAULT_DISPLAY); - if (initDisplay(display_)) return true; + if (initDisplay(display_)) { + std::fprintf(stderr, "egl display: default\n"); + return true; + } display_ = EGL_NO_DISPLAY; if (openGbmDevice()) { display_ = eglGetPlatformDisplay(EGL_PLATFORM_GBM_KHR, gbmDevice_, nullptr); - if (initDisplay(display_)) return true; + if (initDisplay(display_)) { + std::fprintf(stderr, "egl display: gbm render node\n"); + return true; + } } display_ = EGL_NO_DISPLAY; return false;