Solved Trying to build droidcam-cli

Hi. I am trying to build droidcam-cli because i saw that it could work on FreeBSD on these github topics below:

But when i try to build droidcam-cli with gmake, I get the error below. I have alsa-lib installed.
Code:
% gmake droidcam-cli
cc     droidcam-cli.c   -o droidcam-cli
In file included from droidcam-cli.c:15:
./decoder.h:13:10: fatal error: 'alsa/asoundlib.h' file not found
   13 | #include <alsa/asoundlib.h>
      |          ^~~~~~~~~~~~~~~~~~
1 error generated.
gmake: *** [<builtin>: droidcam-cli] Error 1

Code:
 % pkg info -l alsa-lib | grep asound
        /usr/local/etc/asound.conf.sample
        /usr/local/include/alsa/asoundef.h
        /usr/local/include/alsa/asoundlib.h
        /usr/local/include/alsa/sound/asound_fm.h
        /usr/local/include/alsa/sound/uapi/asound_fm.h
        /usr/local/include/asoundlib.h
        /usr/local/include/sys/asoundlib.h
        /usr/local/lib/libasound.la
        /usr/local/lib/libasound.so
        /usr/local/lib/libasound.so.2
        /usr/local/lib/libasound.so.2.0.0
 
I installed android-tools and pkgconf then it worked.
Code:
% gmake -I /usr/local/include droidcam-cli
cc   src/droidcam-cli.c src/connection.c src/settings.c src/decoder.c src/decoder_snd.c src/decoder_v4l2.c src/av.c src/usb.c src/queue.c -o droidcam-cli  `pkg-config --libs --cflags libswscale libavutil` `pkg-config --libs --cflags libturbojpeg` -lusbmuxd-2.0 -lspeex -lasound -lpthread -lm
 
You have to load cuse to be able to create /dev/video0 device with webcamd. You have to chmod 666 /dev/video0 to be able to run droidcam-cli without super user rights. Now I am looking for some uvc viewer. No need to buy a webcam because everybody has a phone!
 
Back
Top