Przeglądaj źródła

Mise à jour de 'Dockerfile'

penta 4 dni temu
rodzic
commit
80afbd9df1
1 zmienionych plików z 29 dodań i 0 usunięć
  1. 29 0
      Dockerfile

+ 29 - 0
Dockerfile

@@ -204,9 +204,12 @@ RUN apt-get update \
         ca-certificates \
         curl \
         g++ \
+        pkg-config \
         libavcodec-dev \
         libavutil-dev \
+        libdrm-dev \
         libjpeg-dev \
+        libva-dev \
         libx11-dev \
         libx264-dev \
         libxext-dev \
@@ -223,6 +226,32 @@ RUN curl -fsSL \
         --strip-components=1 \
         -C /tmp/pixelflux \
     && mkdir -p /out \
+    && test -f /usr/include/va/va.h \
+    && test -f /usr/include/va/va_drm.h \
+    && test -f /usr/include/libdrm/drm.h \
+    && pkg-config --exists libavcodec libavutil libva libdrm x11 xext xfixes \
+    && g++ \
+        -std=c++17 \
+        -Wno-unused-function \
+        -fPIC \
+        -O3 \
+        -flto \
+        -shared \
+        -Ipixelflux/include \
+        -o /out/screen_capture_module.so \
+        pixelflux/screen_capture_module.cpp \
+        pixelflux/include/xxhash.c \
+        -lX11 \
+        -lXext \
+        -lXfixes \
+        -ljpeg \
+        -lx264 \
+        -lyuv \
+        -ldl \
+        -lavcodec \
+        -lavutil \
+    && test -s /out/screen_capture_module.so \
+    && ! ldd /out/screen_capture_module.so | grep -q "not found"
     && g++ \
         -std=c++17 \
         -Wno-unused-function \