Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@ examplesdir = $(datadir)/@PACKAGE_NAME@/examples
# These variables contain compiler flags, object files to build and files to #
# install. #
################################################################################
CFLAGS = @CFLAGS@ -Wall -DVERSION=\"@PACKAGE_VERSION@\" -Dsysconfdir=\"$(sysconfdir)\" @FFMPEG_CFLAGS@
CFLAGS = @CFLAGS@ -Wall -DVERSION=\"@PACKAGE_VERSION@\" -Dsysconfdir=\"$(sysconfdir)\" @FFMPEG_CFLAGS@ @MMAL_CFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@ @FFMPEG_LIBS@
LIBS = @LIBS@ @MMAL_LIBS@ @FFMPEG_LIBS@
VIDEO_OBJ = @VIDEO@
OBJ = motion.o logger.o conf.o draw.o jpegutils.o vloopback_motion.o $(VIDEO_OBJ) \
netcam.o netcam_ftp.o netcam_jpeg.o netcam_wget.o track.o \
alg.o event.o picture.o rotate.o webhttpd.o \
stream.o md5.o netcam_rtsp.o @FFMPEG_OBJ@ @SDL_OBJ@
stream.o md5.o netcam_rtsp.o \
@FFMPEG_OBJ@ @MMAL_OBJ@ @SDL_OBJ@
SRC = $(OBJ:.o=.c)
DOC = CHANGELOG COPYING CREDITS README motion_guide.html mask1.png normal.jpg outputmotion1.jpg outputnormal1.jpg
EXAMPLES = *.conf
Expand Down
25 changes: 25 additions & 0 deletions conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ struct config conf_template = {
netcam_proxy: NULL,
netcam_tolerant_check: 0,
rtsp_uses_tcp: 1,
#ifdef HAVE_MMAL
mmalcam_name: NULL,
mmalcam_control_params: NULL,
#endif
text_changes: 0,
text_left: NULL,
text_right: DEF_TIMESTAMP,
Expand Down Expand Up @@ -421,6 +425,27 @@ config_param config_params[] = {
copy_bool,
print_bool
},
#ifdef HAVE_MMAL
{
"mmalcam_name",
"# Name of camera to use if you are using a camera accessed through OpenMax/MMAL\n"
"# For the raspberry pi official camera, use vc.ril.camera"
"# Default: Not defined",
0,
CONF_OFFSET(mmalcam_name),
copy_string,
print_string
},
{
"mmalcam_control_params",
"# Camera control parameters (see raspivid/raspistill tool documentation)\n"
"# Default: Not defined",
0,
CONF_OFFSET(mmalcam_control_params),
copy_string,
print_string
},
#endif
{
"auto_brightness",
"# Let motion regulate the brightness of a video device (default: off).\n"
Expand Down
4 changes: 4 additions & 0 deletions conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ struct config {
const char *netcam_proxy;
unsigned int netcam_tolerant_check;
unsigned int rtsp_uses_tcp;
#ifdef HAVE_MMAL
const char *mmalcam_name;
const char *mmalcam_control_params;
#endif
int text_changes;
const char *text_left;
const char *text_right;
Expand Down
29 changes: 28 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,24 @@ AC_CHECK_PROG([PKGCONFIG],[pkg-config],[yes],[no])
AM_CONDITIONAL([FOUND_PKGCONFIG], [test "x$PKGCONFIG" = xyes])
AM_COND_IF([FOUND_PKGCONFIG],,[AC_MSG_ERROR([Required package 'pkg-config' not found, please check motion_guide.html and install necessary dependencies.])])

# Check for raspberry pi mmal interface
#
HAVE_MMAL=""
LIBRASPBERRYPIDEVPATH="/opt/vc/include/interface/mmal"

if test -d ${LIBRASPBERRYPIDEVPATH}; then
HAVE_MMAL="yes"
fi

AS_IF([test "${HAVE_MMAL}" = "yes" ], [
AC_SUBST(MMAL_CFLAGS)
AC_SUBST(MMAL_OBJ)
AC_SUBST(MMAL_LIBS)
MMAL_OBJ="mmalcam.o raspicam/RaspiCamControl.o raspicam/RaspiCLI.o"
MMAL_CFLAGS="-std=gnu99 -DHAVE_MMAL -Irasppicam -I/opt/vc/include"
MMAL_LIBS="-L/opt/vc/lib -lmmal_core -lmmal_util -lmmal_vc_client -lvcos -lvchostif -lvchiq_arm"
AC_DEFINE([HAVE_MMAL], 1, [Define to 1 if we want MMAL])
])

#
# Check for libavcodec and libavformat from ffmpeg
Expand Down Expand Up @@ -1112,7 +1130,6 @@ else
fi
fi


AC_SUBST(BIN_PATH)

AC_CONFIG_FILES([
Expand Down Expand Up @@ -1201,6 +1218,16 @@ else
echo "SDL support: No"
fi

if test "${HAVE_MMAL}" = "yes"; then
echo "MMAL support: Yes"
echo " ... MMAL_CFLAGS: $MMAL_CFLAGS"
echo " ... MMAL_OBJ: $MMAL_OBJ"
echo " ... MMAL_LIBS: $MMAL_LIBS"
else
echo "MMAL support: No"
echo " ... libraspberrypi-dev package not installed"
fi

if test "${HAVE_FFMPEG}" = "yes"; then
echo "FFmpeg support: Yes"
echo " ... FFMPEG_CFLAGS: $FFMPEG_CFLAGS"
Expand Down
Loading