Skip to content

Commit 45641e1

Browse files
committed
build: build libaom in the docker image
1 parent dfc5795 commit 45641e1

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

docker/Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,29 @@ RUN if [ "${FFMPEG_INSTALL_METHOD}" = "source" ]; then \
203203
libavformat-dev \
204204
libavutil-dev \
205205
libswscale-dev \
206+
libaom-dev \
207+
libaom3 \
206208
&& rm -rf /var/lib/apt/lists/*; \
207209
fi
208210

211+
# Install AV1 reference decoder (libaom)
212+
RUN apt-get update && apt-get install -y --no-install-recommends \
213+
git \
214+
cmake \
215+
build-essential \
216+
&& mkdir /tmp/aom-tools \
217+
&& cd /tmp/aom-tools \
218+
&& git clone --depth 1 https://aomedia.googlesource.com/aom \
219+
&& mkdir -p aom/build \
220+
&& cd aom/build \
221+
&& cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_TESTS=OFF -DENABLE_DOCS=OFF -DENABLE_EXAMPLES=ON .. \
222+
&& make -j$(nproc) \
223+
&& make install \
224+
&& cd / && rm -rf /tmp/aom-tools \
225+
&& apt-get remove -y git cmake build-essential \
226+
&& apt-get autoremove -y \
227+
&& rm -rf /var/lib/apt/lists/*
228+
209229
# GStreamer installation (2 methods: system, source)
210230
# Method "source": Build GStreamer from source (needed for new versions on old distros)
211231
# Note: gst-libav is disabled when building from source to avoid FFmpeg API incompatibilities

scripts/build_iso_decoders.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
set -e
1616

1717
# Convert relative paths to absolute paths
18+
mkdir -p "$1"
1819
CONTRIB_DIR="$(cd "$1" && pwd)"
1920
DECODERS_DIR="$(mkdir -p "$2" && cd "$2" && pwd)"
2021
ISOBMFF_DIR="$(cd "$3" && pwd)"
@@ -45,6 +46,12 @@ needs_aac_support() {
4546
should_build "mpeg2-aac" || should_build "mpeg4-aac" || should_build "mpeg4-aac-er"
4647
}
4748

49+
# macOS compatibility: add compat include path for missing headers (malloc.h, etc.)
50+
if [[ "$OSTYPE" == "darwin"* ]]; then
51+
COMPAT_INCLUDE="-I$SCRIPTS_DIR/compat/macos"
52+
CFLAGS_EXTRA="$COMPAT_INCLUDE $CFLAGS_EXTRA"
53+
fi
54+
4855
echo "=== ISO Reference Decoders Build Script ==="
4956
echo "Contrib directory: $CONTRIB_DIR"
5057
echo "Decoders directory: $DECODERS_DIR"

scripts/compat/macos/malloc.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Fluster - testing framework for decoders conformance
3+
* Copyright (C) 2025, Fluendo, S.A.
4+
*
5+
* Compatibility header for macOS
6+
* malloc.h doesn't exist on macOS - redirect to stdlib.h
7+
*/
8+
9+
#ifndef _COMPAT_MALLOC_H
10+
#define _COMPAT_MALLOC_H
11+
12+
#include <stdlib.h>
13+
14+
#endif /* _COMPAT_MALLOC_H */

0 commit comments

Comments
 (0)