site  contact  subhomenews

Latest libcamera and pipewire compiled

November 01, 2021 — BarryK

I posted about a problem with meson version, and had to compile an older version of 'libcamera' in OpenEmbedded:

https://bkhome.org/news/202110/libcamera-compiled-in-openembedded.html

I had previously compiled meson 0.59.2 in OE, then rolled back to 0.53.0, however, I did keep the 0.59.2 binary package, and have made it into a PET. That PET will be in the 'devx' SFS in the next release of EasyOS.

With meson 0.59.2 in a running EasyOS, I was then able to compile the latest 'libcamera' and 'pipewire'. I have done that, and made them into PETs. They also will be in the next release of EasyOS.

Well probably, it depends how successful setting up pipewire is. I have got it basically working, that will have to be the subject of a later blog post. 

For this post, documenting how I compiled libcamera and pipewire. Here are my notes, firstly, preliminary notes:

easyos 3.1.3
------------
20211031 after complete recompile in oe, with pulseaudio and pavucontrol.

easy 3.1.3:
apulse and bluez-alsa not in build-list.
pulseaudio and pavucontrol are in build-list.

downloaded tag 0.3.39 from here:
https://github.com/PipeWire/pipewire

requires meson >= 0.54.0
I had previously compiled meson 0.59.2, but in last recompile
rolled back to 0.53.2

install meson 0.59.2 binary tarball.

Now the notes on compiling libcamera:

libcamera 20211028
------------------
libcamera is optional dep
# git clone https://git.libcamera.org/libcamera/libcamera.git --depth 1
# mv libcamera libcamera-20211028
# dir2tgz libcamera-20211028
# cd libcamera-20211028
# meson build -Dprefix=/usr
# ninja -C build
# new2dir ninja -C build install
...hmmm, copy headers from /usr/include/libcamera/libcamera up-one
(otherwise breaks compile of pipewire).

This is the configuration of libcamera:

libcamera 0.0.0

Paths
LIBCAMERA_DATA_DIR : "/usr/share/libcamera"
LIBCAMERA_SYSCONF_DIR : "/etc/libcamera"
IPA_PROXY_DIR : "/usr/libexec/libcamera"
IPA_CONFIG_DIR : "/etc/libcamera/ipa:/usr/share/libcamera/ipa"
IPA_MODULE_DIR : "/usr/lib/libcamera"

Configuration
Enabled pipelines : ipu3
raspberrypi
rkisp1
simple
uvcvideo
vimc
Enabled IPA modules : ipu3
raspberrypi
rkisp1
vimc
Android support : NO
GStreamer support : NO
V4L2 emulation support : NO
cam application : YES
qcam application : NO
lc-compliance application: NO
Unit tests : YES

Here are the notes on compiling pipewire:

pipewire 0.3.39
---------------
# meson setup builddir
internet connection required, as downloads 'media-session' package
# meson configure builddir -Dprefix=/usr -Dlibpulse=enabled -Dpipewire-jack=enabled -Dpipewire-v4l2=enabled -Dpipewire-alsa=enabled -Djack-devel=true
# ninja -C builddir
# cd builddir
# new2dir meson install

in target pet:
copy /usr/share/pipewire to /etc/
created /root/Startup/pipewire

Here is the configuration for pipewire:

media-session 0.4.1

systemd conf data: NO
libsystemd : NO
intl support : YES

pipewire 0.3.39

systemd conf data : NO
libsystemd : NO
intl support : YES
pipewire-alsa : YES
Manpage generation : YES

Misc dependencies
dbus (Bluetooth, rtkit, portal, pw-reserve): YES
SDL 2 : YES
readline (for pw-cli) : YES
WebRTC Echo Canceling : NO

pw-cat/pw-play/pw-dump/filter-chain
sndfile : YES

Streaming between daemons
libpulse : YES
Avahi DNS-SD (Zeroconf) : NO
ROC : NO

Backend
libusb (Bluetooth quirks) : YES
gstreamer-device-provider : NO
ALSA : YES
Bluetooth audio : YES
JACK2 : NO
libcamera : YES
Udev : YES
V4L2 kernel header : YES
V4L2 enabled : YES
libdrm : YES

GStreamer modules
gio-2.0 : YES
gio-unix-2.0 : YES
glib-2.0 : YES
gmodule-2.0 : YES
gobject-2.0 : YES
gstreamer-1.0 : NO

Bluetooth audio codecs
SBC : YES
LDAC : NO
LDAC ABR : NO
aptX : NO
AAC : NO

Optional programs
find (for header testing) : YES
valgrind (test setup) : NO

Session managers
Build media-session : YES
Build wireplumber : NO
Default session-manager : media-session

pw-cat/pw-play/pw-dump tool
Build pw-cat tool : YES

Optional Modules
rt : YES
rtkit : YES
portal : YES
pulse-tunnel : YES
zeroconf-discover : NO
roc-sink : NO
roc-source : NO

Subprojects
media-session : YES

Eventually, want to compile pipewire in OE. For future reference, a note on the likely dependencies:

dbus, sdl2, sndfile, libusb, libcap, webrtc, libnotify, alsa-lib, alsa-plugins,
bluez5, libv4l, libva, libx11, libasound, udev, ncurses, gstreamer

Notice further above, libcamera and pipewire are compiled without 'gstreamer', as don't currently have it in the running EasyOS. The focus for now is on audio, but pipewire is also planned to be a management daemon for video -- so sometime in the future might have to include gstreamer as a dependency. Don't know about webrtc, just saw it mentioned somewhere as a possible dependency.    

Tags: easy