Commit Graph

1003 Commits

Author SHA1 Message Date
Diogo Gomes
667dd72ef2 minor improvements
indentation
shorted string comparison
2017-05-25 23:16:58 +01:00
Diogo Gomes
0b66c6a164 added flip_axis
added flip_axis entries and fixed href on #rotate
2017-05-23 23:22:02 +01:00
Diogo Gomes
f6abf55bf0 minor improvements
removed one loop
2017-05-23 23:14:26 +01:00
Diogo Gomes
949eec3f97 code review
addressing comments in pull request #390
2017-05-23 18:58:50 +01:00
Diogo Gomes
14a1998a0c fix CI error
for() in pre C99 style
2017-05-23 00:50:25 +01:00
Diogo Gomes
8c589bbc5a Image Flip
Addresses issue:

https://github.com/Motion-Project/motion/issues/325
2017-05-23 00:43:43 +01:00
Joseph Heenan
c50d4b5eb7 Merge pull request #380 from ffontaine/master
Fix --without-webp
2017-05-12 08:35:37 +01:00
Joseph Heenan
6aa100fbb3 Merge pull request #383 from iskunk/rtsp-fixes-3
Fix RTSP-related breakage
2017-05-12 08:29:41 +01:00
Daniel Richard G
270c2fd2e1 Un-break compilation without FFmpeg; fixes #382 2017-05-09 15:48:35 -04:00
Daniel Richard G
edabd9f088 Fix for segfault reported by @dimitrystd in #377/3c0a22ad
This occurs when using older (yet supported) versions of FFmpeg.
(Fix was tested with FFmpeg 2.8.11)
2017-05-09 01:27:48 -04:00
Fabrice Fontaine
15c72736b0 Fix --without-webp
Currently if the user sets --without-webp, WEBP is set to yes as
AC_ARG_WITH defines that its third argument is "action-if-present" so
use $withval to retrieve the value instead of always setting WEBP to yes

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2017-05-03 23:05:52 +02:00
Joseph Heenan
6a97d1ab64 Merge pull request #379 from ffontaine/master
Fix cross-compilation
2017-05-03 13:10:56 -07:00
Fabrice Fontaine
ea598bf07c Fix cross-compilation
Currently if "x${DISTRO}" isn't set to "Linux", unsafe header/library
path for cross-compilation such as '-I/usr/local/include' are used.
As a result, motion can't be cross-compiled, so change "x${DISTRO}" to
"${DISTRO}" as it seems that this was the intended use.

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2017-05-03 21:55:30 +02:00
Joseph Heenan
936b114e5a Merge pull request #377 from iskunk/rtsp-fixes-2
Various fixes to Motion's interaction with FFmpeg vis-a-vis RTSP
2017-05-02 02:02:55 +01:00
Daniel Richard G
3c0a22ad1e Various fixes to Motion's interaction with FFmpeg vis-a-vis RTSP
* Added <assert.h> to motion.h, so we can do assertions

* Changed the return-code semantics of rtsp_decode_video() and
  rtsp_decode_packet() to a tristate: negative on error, zero if no
  output is currently available, positive if output was successfully
  obtained

* Assert that avcodec_send_packet() never returns AVERROR(EAGAIN)
  (i.e. we never overfill the codec with packets)

* Treat AVERROR(EAGAIN) from avcodec_receive_frame() as a no-output,
  non-error condition (it means we need to send more packets before we
  can get a frame)

* Changed netcam_read_rtsp_image() to handle the case where the codec
  has a frame ready for output without needing any new packets

* Simplified the logic in the netcam_read_rtsp_image() packet-read loop

* Improved wording of some log messages

* Removed needless variable initializations
2017-04-23 16:31:31 -04:00
Joseph Heenan
4241d21b7b Merge pull request #376 from olivierschonken/master
Fix CMake building of MMAL driver for RaspberryPi
2017-04-23 20:59:39 +01:00
Joseph Heenan
50fcec0eef Merge pull request #368 from iskunk/rtsp-fixes
Various fixes for RTSP crashes and/or Valgrind errors
2017-04-23 20:52:15 +01:00
Olivier Schonken
8886118518 Fix CMake building of MMAL driver for RaspberryPi
Added libraries, include directories and extra source files to
enable a succesfull cross-compile with CMake.

Signed-off-by: Olivier Schonken <olivier.schonken@gmail.com>
2017-04-23 20:58:21 +02:00
Joseph Heenan
d4a35c6fa5 Merge pull request #367 from genius3000/master+conf_guide_fixes
Two small config and guide fixes
2017-04-19 21:09:46 +01:00
Joseph Heenan
96d7023c29 Merge pull request #369 from iskunk/logging-fixes
Logging fixes
2017-04-19 20:57:11 +01:00
Joseph Heenan
d8a2b03090 Merge pull request #370 from isage/osx-build-fix
Fix cmake build on osx
2017-04-19 20:36:00 +01:00
Epifanov Ivan
e2304449b8 Fix cmake build
Add libavdevice dependency, in consistency with autotools
This fixes #342
2017-04-11 22:54:24 +03:00
Daniel Richard G
84671006ff Minor logging fixes (whitespace, timestamp format) 2017-04-10 17:23:49 -04:00
Daniel Richard G
3b75bec4fa Don't put RTSP URL passwords into the log
When logging, use cnt->conf.netcam_url instead of rtsp->path, as the
latter may contain a security-sensitive "user:password@" string. We add
a new rtsp->netcam_url field that is a read-only pointer to the former.

Also, don't try to LOG("%s", NULL).
2017-04-10 17:12:02 -04:00
Daniel Richard G
0374f7458d Various fixes for RTSP crashes and/or Valgrind errors
* Use a dedicated "active" flag to tell if a netcam->rtsp context is
  connected and running, rather than checking
  (netcam->rtsp->format_context != NULL), because the latter may be true
  without a working connection

* netcam_open_codec() and netcam_rtsp_open_context() should not return 0
  if something is wrong

* Pass a netcam context into netcam_interrupt_rtsp() instead of
  netcam->rtsp so that the callback can check netcam->finish and react
  appropriately to the shutdown signal
2017-04-10 17:02:15 -04:00
Daniel Richard G
1b6022f595 Various logging-system fixes
* Use openlog() and closelog() so that we don't leak a file descriptor
  (hello Valgrind) when the program exits in syslog mode

* Update comments to reflect actual log text being generated

* Moved va_end() closer to its corresponding va_start()

* Define new LOGMODE_NONE mode so that we can close out logging
  completely at program end
2017-04-10 17:01:36 -04:00
genius3000
4ec8e557a2 Update the ffmpeg_variable_bitrate comment in config_params for the webui config writing 2017-04-07 21:01:47 -06:00
genius3000
54c52f4416 Replace missed netcam_http with netcam_keepalive 2017-04-07 20:55:01 -06:00
Joseph Heenan
8a1b9a982e Merge pull request #359 from Mr-DaveDev/hyper
SQL Event ID
2017-03-19 09:57:34 +00:00
Mr-Dave
4a1aa6e950 Merge pull request #343 from pascal-fb-martin/master
Improved privacy mask performances
closes #340
2017-03-12 14:05:04 -06:00
Joseph Heenan
caf9c5230a Merge pull request #352 from Mr-DaveDev/misc
ffmpeg 3.1 / v4l2 via Netcam
2017-03-12 18:33:45 +00:00
MrDave
fb2b34112d Guide update 2017-03-12 12:25:31 -06:00
MrDave
845b39b914 ffmpeg 3.1 fix, v4l2 via netcam
Resolve crash when decode returned invalid results
Catch interupts on opening netcam
Eliminate option to use h264 with videodevice
Revise configure for pthread
Revise config file to point to guide
2017-03-11 11:39:16 -07:00
MrDave
d121a93019 v4l2 Netcam
This commit resolves some of the netcam v4l2 items and a few other
small issues

1.  Use the correct return codes for the new function rtsp_decode_video
2.  Silence the notices on reconnecting
3.  Revise the v4l2 to video4linux2 for old libav versions
4.  Add additional options for the input_format
5.  Do not permit users to specify zero for camera height or width
6.  Eliminates pthread detection
7.  Revise the ffmpeg messages to INF
8.  Adds H264 palette option
2017-03-09 21:47:13 -07:00
tosiara
be20533355 Bugfix: wrong width and height order in v4l2 netcam av_dict_set 2017-03-08 11:57:21 +02:00
Pascal Martin
b6c1d94845 Forgot the case when no privacy mask is defined 2017-03-06 22:15:14 -08:00
Pascal Martin
34cceefd43 Improved privacy mask performances 2017-03-06 21:51:38 -08:00
Mr-Dave
eb137c5f5d Merge pull request #337 from Mr-DaveDev/netcam-v4l2
V4l2 via netcam
2017-03-05 11:08:48 -07:00
MrDave
ce64cf9601 ffmpeg buffered packet 2017-03-05 10:22:21 -07:00
MrDave
1c7996bdd4 SQL Event ID
Additional revisions for the change related to the sql event id
including variable names to conform with norm as well as documentation
updates.
2017-03-04 20:36:27 -07:00
Mike Wilson
1cd4cccb96 SQL Event ID 2017-03-04 16:33:48 -07:00
MrDave
6ae6fd763d Add libavdevice to travis.yml 2017-03-04 12:54:27 -07:00
MrDave
58baeb4d65 V4l2 via netcam
This commit adds functionality to use a v4l2 device via the netcam_url
option.  This will allow for more v4l2 devices since the netcam_url
uses the ffmpeg libraries which should be able to to decode and transform
the unusual pixel formats and sizes.
2017-03-04 12:37:04 -07:00
Mr-DaveDev
b5c3a73cc6 ffmpeg 3.1 Revisions (#324)
* ffmpeg 3.1 Revisions

The ffmpeg versions after 3.1 eliminated the stream codec which was used
in many different ways in the previous code.  This commit revises the ffmpeg
module to use smaller functions and eliminates the greyscale image handling
since all images are yuv.

* ffmpeg gop and pts

Gop:  Revise the gop based upon the fps of the requested video
to make sure we get enough I frames for low fps videos.
PTS:  Revise the PTS for the timelapse videos as well as permit
debug messages of the PTS when in test mode.

* Libav Problem
 
Closes #144
2017-03-04 11:23:13 -07:00
Mr-Dave
042fd16d6c Merge pull request #335 from Mr-DaveDev/MacThread
FreeBSD instead of BSD for pthread_np.h
2017-03-04 10:25:45 -07:00
tosiara
54f416e685 Merge pull request #334 from Mr-DaveDev/camera_type
Camera Type
2017-03-04 09:20:21 +02:00
MrDave
4cecdd5f03 FreeBSD instead of BSD for pthread_np.h 2017-03-02 20:07:59 -07:00
MrDave
669e531881 Camera Type
Loosen the names permitted for videodevice
2017-03-02 18:44:36 -07:00
Joseph Heenan
ede7a0bccf Merge pull request #330 from tosiara/extpipe-crash-fix
Bugfix: wrong variable logged when extpipe is already closed
2017-02-26 15:29:15 +00:00
tosiara
81ea81aa6a Bugfix: wrong variable logged when extpipe is already closed
This caused memory access violation and process crash
Fixes https://github.com/Motion-Project/motion/issues/329
2017-02-26 17:03:54 +02:00