From 593e7771c86706eeb5d4e864ced4a80360d65682 Mon Sep 17 00:00:00 2001 From: Michel Promonet Date: Sun, 19 May 2024 16:26:30 +0200 Subject: [PATCH] debug build --- .github/workflows/cpp-cross-linux.yml | 7 ++++--- CMakeLists.txt | 8 +++++++- Dockerfile.arm64 | 4 ++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cpp-cross-linux.yml b/.github/workflows/cpp-cross-linux.yml index 3e36f540..99884e2b 100644 --- a/.github/workflows/cpp-cross-linux.yml +++ b/.github/workflows/cpp-cross-linux.yml @@ -36,9 +36,10 @@ jobs: - name: build run: | - export PATH=$(pwd)/webrtc/src/third_party/llvm-build/Release+Asserts/bin:$PATH - cmake -DWEBRTCROOT=$(pwd)/webrtc -DCMAKE_BUILD_TYPE=${{ matrix.buildtype }} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY -DWEBRTCDESKTOPCAPTURE=OFF . - make + cmake -DWEBRTCROOT=$(pwd)/webrtc -DCMAKE_BUILD_TYPE=${{ matrix.buildtype }} -DCMAKE_SYSTEM_PROCESSOR=arm64 -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY -DWEBRTCDESKTOPCAPTURE=OFF . + ls -l $(pwd)/webrtc/src/out/Release/obj/api/audio/libaec3_factory.a + file $(pwd)/webrtc/src/out/Release/obj/api/audio/libaec3_factory.a + make VERBOSE=1 - name: cpack run: | diff --git a/CMakeLists.txt b/CMakeLists.txt index 76bc9b34..0d14fe18 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,8 @@ project (webrtc-streamer) set (WEBRTCROOT "${CMAKE_CURRENT_SOURCE_DIR}/../webrtc" CACHE STRING "WEBRTC root directory") set (WEBRTCDESKTOPCAPTURE "ON" CACHE STRING "WEBRTC Desktop capture") +set (WEBRTCCHROMEBRANDED "ON" CACHE STRING "WEBRTC Chrome branded") + if(NOT CMAKE_BUILD_TYPE) set (CMAKE_BUILD_TYPE "Release") endif() @@ -60,7 +62,11 @@ if (NOT EXISTS ${WEBRTCOBJS}/${CMAKE_STATIC_LIBRARY_PREFIX}webrtc${CMAKE_STATIC_ endif() # enable H264 support - set (WEBRTCARGS is_chrome_branded=true\n${WEBRTCARGS}) + if (WEBRTCCHROMEBRANDED STREQUAL "ON") + set (WEBRTCARGS is_chrome_branded=true\n${WEBRTCARGS}) + else() + set (WEBRTCARGS rtc_use_h264=true\nrtc_use_h265=true\n${WEBRTCARGS}) + endif() if (CMAKE_SYSTEM_PROCESSOR MATCHES "armv6.*") set(ENV{PATH} "${WEBRTCROOT}/src/third_party/llvm-build/Release+Asserts/bin:$ENV{PATH}") diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 index 30da536b..b8ff8843 100644 --- a/Dockerfile.arm64 +++ b/Dockerfile.arm64 @@ -12,14 +12,14 @@ COPY . /webrtc-streamer RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates wget git python3 python3-pkg-resources xz-utils cmake make pkg-config gcc-aarch64-linux-gnu g++-aarch64-linux-gnu build-essential \ && mkdir /webrtc \ && git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git /depot_tools \ - && export PATH=/depot_tools:/webrtc/src/third_party/llvm-build/Release+Asserts/bin:$PATH \ + && export PATH=/depot_tools:$PATH \ && cd /webrtc \ && fetch --no-history --nohooks webrtc \ && sed -i -e "s|'src/resources'],|'src/resources'],'condition':'rtc_include_tests==true',|" src/DEPS \ && src/build/linux/sysroot_scripts/install-sysroot.py --arch=arm64 \ && gclient sync \ && cd /webrtc-streamer \ - && cmake -DCMAKE_SYSTEM_PROCESSOR=${ARCH} -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY -DWEBRTCDESKTOPCAPTURE=OFF . && make \ + && cmake -DCMAKE_SYSTEM_PROCESSOR=${ARCH} -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY -DWEBRTCDESKTOPCAPTURE=OFF . && make \ && cpack \ && mkdir /app && tar xvzf webrtc-streamer*.tar.gz --strip=1 -C /app/ \ && rm -rf /webrtc && rm -f *.a && rm -f src/*.o \