Motion - Release Note Motion 3x 1x 20

Release Note - Motion 3.1.20

-- KennethLavrsen - 26 May 2005

Note: We recommend upgrading to Motion 3.2.1. Motion 3.1.X will not be maintained much longer. Motion 3.2.1 has become as stable as 3.1 now and most development effort goes into the new 3.2

Summary of changes since 3.1.19

  • Netcam stability fixes - quite many of them.
  • Improvement in the noise-tune algoritm
  • Fixed a bug in noise tune which was most visible at very low light.
  • Fixed some file descriptor leaks in webcam.c and netcam.c.
  • Initiate cnt->event_nr to 1 to avoid code related to end of events and long mpeg films to be run during startup of Motion.
  • Renamed the top level global context structure to cnt_list so it can be reached from child threads.
  • Fixed compiling issues with gcc 2.95
  • Fixed a problem with file descriptors leaking to the external shell invoked by on_xxxx, sms and mail options. This could cause these external programs to hang.
  • Fixed a problem when compiling with --without-v4l configuration
  • Fixed a bug where rate of fetching picture frames was disturned by the signal SIG_CHLD from exec_command programs terminating. The symptom was that the number of post_capture frames became inaccurate and motion in mpegs did not have constant time between frames.
  • Fixed a bug where motion did not work with gap=1.
  • Added the feature gap=0 which now also works. It disables gap completely so that one single mpeg file is created. You can end the event from the remote control interface make movie feature using for example cron. This makes Motion close the mpeg and make a new with event number increased by one
  • Moved some code in the beginning of the motion_loop to a position later to improve the accuracy of time calculations for the framerate.
  • Fixed a bug in the rgb2yuv420p function.
  • Fix the compile issue with official ffmpeg packages from debian.
  • Fixed a bug in the low_cpu feature where cpu load increased instead of decreasing because the framerate calculations were completely wrong. This was an old bug introduced in 3.0.1.
  • Fixed a bug in switchfilter which caused motion detection to not work when the feature was enabled.
  • Added init script to RPM (Angel Carpintero)

Detailed changes for all 3.1.20 snapshots since 3.1.19

snap1
  • Fixed a bug in noise tune which was most visible at very low light. (Joerg Weber and Kenneth Lavrsen)
  • Improvement in the noise-tune algoritm (Joerg Weber)
  • Netcam fixes and debug code by Christopher Price. http://www.lavrsen.dk/twiki/bin/view/Motion/NetcamStabilityPatch
    • Fixed netcam startup race condition.
    • Refactored image handling back to single unified function
    • Refactored reconnection algorithm
    • Jpeg only based connections should now use less cpu time
    • Synced syslog/printf style to new motion standard
    • Added developer debug trace defines/code
    • Defines now used for many constants
    • Fixed support for netcams without content-length header (streaming only)
    • Remove memmem from netcam_wget.[c|h] (no longer used)
    • Several miscellaneous code cosmetic changes
    • Fixed support for non-streaming (image based) netcams without content-length header.
    • TODO: remove tests for memmem from configure
  • Re-arranged many of the const char declarations so that they are always before any statements within a block { }. This is to avoid compiler errors with older but still used gcc versions such as 2.9.5. (Kenneth Lavrsen)
  • Changed the use of %zd to %llu in printf statements of size_t types. This is done to avoid compiler errors with older but still used gcc versions such as 2.95. (Kenneth Lavrsen)

snap2
  • Removed a gcc 2.95 compiler warning (netcam.c:1036: warning: variable `pic' might be clobbered by `longjmp' or `vfork') (Kenneth Lavrsen)
  • Fixed some file descriptor leaks in webcam.c and netcam.c (Christophe Grenier)
  • Initiate cnt->event_nr to 1 to avoid code related to end of events and long mpeg films to be run during startup of Motion. (Kenneth Lavrsen).
  • Added new function in event.c close_anything_open() which is called from send_sms, send_mail and exec_command in order to prevent file descriptor and open sockets to be inherited by the shell causing freezing and instability. Code contributed by Christophe Grenier, Christopher Price and Kenneth Lavrsen. http://www.lavrsen.dk/twiki/bin/view/Motion/BugReport2005x03x21x070534
  • Renamed the top level global context structure to cnt_list so it can be reached from child threads and by above mentioned close_anything_open() (Christophe Grenier).

snap3
  • Fixed a problem when compiling with --without-v4l configuration (Philip Marien). http://www.lavrsen.dk/twiki/bin/view/Motion/BugReport2005x03x27x112843
  • Threw away the file descripter leak fix from snap 2 because it caused more trouble than it fixed. Removed the close_anything_open(). Replaced it all with a simple piece of code that all server daemons call when started: setsid() followed by for (i=getdtablesize(); i>2; --i) close(i). Dirty and simple (Kenneth Lavrsen). http://www.lavrsen.dk/twiki/bin/view/Motion/BugReport2005x03x21x070534
  • Fixed a bug where rate of fetching picture frames was disturned by the signal SIG_CHLD from exec_command programs terminating. The symptom was that the number of post_capture frames became inaccurate and motion in mpegs did not have constant time between frames (Kenneth Lavrsen).
  • Fixed a bug where motion did not work with gap=1 (Kenneth Lavrsen). http://www.lavrsen.dk/twiki/bin/view/Motion/BugReport2005x01x30x073616
  • Added the feature gap=0 which now also works. It disables gap completely so that one single mpeg file is created. You can end the event from the remote control interface make movie feature using for example cron. This makes Motion close the mpeg and make a new with event number increased by one (Kenneth Lavrsen).
  • Moved some code in the beginning of the motion_loop to a position later to improve the accuracy of time calculations for the framerate (Kenneth Lavrsen).
  • Removed memmem check in configure , fix version in configure.in.freebsd, fix CPU autodetection in FreeBSD version (Angel Carpintero).

snap4
  • More Netcam Stability Fixes (snap3-post1-6) (Christopher Price) http://www.lavrsen.dk/twiki/bin/view/Motion/NetcamStabilityPatch
    • Destroy mutexes in netcam_cleanup().
    • Add reconnection for netcam_start() - this may block other cameras from starting up!.
    • Added additional defines for reconnect retries.
    • Change reconnection timeouts to 60 seconds.
    • Reworked close(sock) in netcam_connect, to insure future changes won't forget to close the socket.
    • Reworked reconnection for netcam_start() - disabled by default, see source for INIT_RECONNECT_RETRIES.
    • Break some long lines in code.
    • Replaced sleep with nanosleep per suggestion by Kenneth Lavrsen.
    • Added additional header validation check.
    • Changed a couple fd references to use RBUF_FD.
    • Added error message if jpeglib error occurs.
    • Removed additional header validation check.
    • Limited times headers will be checked.
    • Removed mutex lock around netcam_start() in video.c, hopefully race conditions are fixed.
    • Added additional headers in http request.
    • Added back header validation (should fix netcam_read_header lockups).
    • Detect when there is no data on socket in netcam_read_ functions (should fix netcam_read_image_contentlength() and netcam_read_image_no_contentlength() lockups).
    • Rearranged timeout assignments for pthread_cond_timedwait() calls.
    • Adjusted TIMEOUT_COND_WHICH to 4 seconds.

snap5
  • Fixed a bug in the rgb2yuv420p function. (Daniel Ladd). http://www.lavrsen.dk/twiki/bin/view/Motion/BugReport2005x03x30x011107
  • More Netcam Stability Fixes (snap4-post1-4) (Christopher Price) http://www.lavrsen.dk/twiki/bin/view/Motion/NetcamStabilityPatch
    • Reworked thread signal/wait conditions, should fix some race conditions.
    • Use gettimeofday() to determine thread timeouts, results in better accuracy.
    • Adjusted condition timeouts to smaller values due to usage of gettimeofday()
    • and rework of thread signal/wait conditions.
    • Adjusted reconnection retries to 60 (every minute for an hour).
    • Fix bug where motion will not quit if requested when reconnecting.
    • Cruft, feature creep and redudant code removed.
    • Consolated reconnection capability to unified netcam_reconnect function.
    • Rework netcam_start logic, minimize startup variables.
    • Rework netcam_stream_read and netcam_single_read logic.
    • Minor changes to netcam_next logic.
    • Fix bug in streaming camera without content-length, recent mod broke.
    • Fix bug in startup of single image reads without content-length.

snap6
  • Fix the compile issue with official ffmpeg packages from debian (Angel Carpintero).
  • More Netcam Stability Fixes (snap5-post1) (Christopher Price).

snap7

release

Known Problems

  • See the BugReports for open bugs.
  • The pwc-ioctl.h is for pwc version 9.0.1 and 10.0.6. If you still use the pwc 8 series then you need to use the headerfile pwc-ioctl.h-pwc8.0 (copy the pwc-ioctl.h-pwc8.0 over pwc-ioctl.h). This is relevant for USB cameras using Philips chips.

-- KennethLavrsen - 26 May 2005
Topic revision: r3 - 26 May 2005, KennethLavrsen
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.