droidcam icon indicating copy to clipboard operation
droidcam copied to clipboard

Add initial FreeBSD support

Open davidschlachter opened this issue 4 years ago • 1 comments

v4l2loopback has recently been ported to FreeBSD, allowing Droidcam and similar virtual camera programs to be used. This patch allows the droidcam-cli target to be successfully built and to run on the current FreeBSD version (13.0-RELEASE):

david@freebsd $ doas pkg install gmake gcc pkgconf libjpeg-turbo usbmuxd libusbmuxd alsa-lib v4l_compat speex ffmpeg webcamd

david@freebsd $ gmake droidcam-cli
cc  -Wall -O2 src/droidcam-cli.c src/connection.c src/settings.c src/decoder_snd.c src/decoder_v4l2.c src/decoder.c src/av.c src/usb.c src/queue.c -o droidcam-cli  -I/usr/local/include /usr/local/lib/libturbojpeg.a `pkg-config --libs --cflags libswscale libavutil` -lspeex -lasound -lpthread -lm -lusbmuxd-2.0

david@freebsd $ doas webcamd -B -c v4l2loopback

david@freebsd $ ./droidcam-cli 192.168.4.187 4747
Audio loopback device not found.
Is snd_aloop loaded?
Client v1.8.0
Video: /dev/video0
connecting to 192.168.4.187:4747

I haven't yet tried building the GUI. I'm open to any suggestions for improvement!

davidschlachter avatar Aug 05 '21 00:08 davidschlachter

Thanks @davidschlachter. So other than the includes and gcc, the rest of the code "just works". Thats cool. I'll see if I can spin up a FreeBSD VM and give it a try (soon).

If other FreeBSD users want to comment in the meantime, please feel free before the PR is merged.

aramg avatar Aug 05 '21 16:08 aramg