Motion - Motion Release 3x 2x 1snap 16

Motion Snapshot Release 3.2.1_snap16

Release Notes

3.2.1 snap16 - 08 May 2005

Development Release - not recommended for normal use

The netcam code is still under development but we are very interested in getting test reports on these releases from people with Network cameras.

Netcam related bug reports from the 3.2.1 snapshot releases can be added as a comment to http://www.lavrsen.dk/twiki/bin/view/Motion/NetcamStabilityPatch

Changes since 3.1.19_snap4

snap1

snap2

snap3

snap4
  • Fix for tracking control with http control (Angel Carpintero)
  • Added the new feature Setup Mode (Joerg Weber). This also enables much more error messages given to the console when in non-daemon mode while still preserving the messages in syslog which are important for daemon mode debugging.
    The patch is still being worked on and is not finished. Changes in the FreeBSD code are not yet tested.
    http://www.lavrsen.dk/twiki/bin/view/Motion/SetupModePatch
  • Remove most command line options and replace them by an option to specify location to motion.conf and a few options related to setting up motion. (Joerg Weber). This is also included in http://www.lavrsen.dk/twiki/bin/view/Motion/SetupModePatch.
  • Small improvement of the http control interface (link to setting itself on the html response when setting parameter) (Kenneth Lavrsen)

snap5
  • Fixed a bug in noise tune which was most visible at very low light. (Joerg Weber and Kenneth Lavrsen)
  • Further improvement in the setup mode. Messages are now prefixed by the thread number in [brackets]. Moved 2 funtions from motion.c to picture.c. The setup mode patch is now considered finished. (Joerg Weber)

snap6
Netcam fixes and debug code by Christopher Price - http://www.lavrsen.dk/twiki/bin/view/Motion/NetcamStabilityPatch - snap5_post1_video.c and snap5-post1 patches.
  • 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.
  • Temporarily removed support for devices that do not support content-length (in progress).
  • Synced syslog/printf style to new motion standard.
  • Added developer debug trace defines/code.
  • Defines now used for many constants.

snap7
  • Improved console output in setup mode. Now also outputs threshold. (Joerg Weber)
  • Added some additional text to the motion http messages to the terminal so that you know where the messages come from. (Kenneth Lavrsen)
  • Netcam Stability Patch version snap6-post1 (Christopher Price)
    • Added support for netcams without content-length header (streaming only)
    • Remove memmem from netcam_wget.[c|h] (no longer used)
    • Several miscellaneous code cosmetic changes
    • TODO: remove tests for memmem from configure

snap8
  • Added support for non-streaming (image based) netcams without content-length header. (3.2.1-snap7-post1 version of the Netcam Stabilty Patch by Christopher Price).
  • Improvement in the noise-tune algoritm (Joerg Weber)
  • 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)

snap9
  • Fixed even more gcc 2.95 compiler errors (declarations not at beginning of block) (Kenneth Lavrsen).
  • Removed a gcc 2.95 compiler warning (netcam.c:1036: warning: variable `pic' might be clobbered by `longjmp' or `vfork') (Kenneth Lavrsen)
  • The values for cnt->locate and cnt->new_img are now #defines in motion.h to enhance code readability (Kenneth Lavrsen).
  • The setting of sql_mask is now only done once per second to save CPU power (Kenneth Lavrsen)
  • Adding checking for conflict between control port and webcam port. Webcam port for a thread is disabled if it is set to the same value as the control port (Kenneth Lavrsen).
  • Fixed some file descriptor leaks in webcam.c and netcam.c (Christophe Grenier).
  • Added "motion-http:" prefix to error messages from the http control thread (Kenneth Lavrsen).
  • Added additional error information when connection to MySQL fails (Kenneth Lavrsen).
  • 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
  • Added new context global cnt_list.control_socket_server set by the httpd thread so that the above mentioned close_anything_open() can close open control sockets (Kenneth Lavrsen).
  • 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).

snap10
  • 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 9 because it caused more trouble than it fixed. Removed the close_anything_open() and the cnt_list.control_socket_server field. 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).
  • Improved the http remote control action features so that makemovie and snapshot for thread 0 (all) works on all threads instead of being ignored (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).
  • Updated code so Motion again runs on FreeBSD (Angel Carpintero).
  • Removed chech for memmem from configure (Angel Carpintero).
  • Updated http control interface so that an additional check is done before saving config files (Angel Carpintero).
  • Fixed a problem with URLs http://192.168.1.3:8080/0 which did not work without a trailing space (Angel Carpintero).

snap11
  • Implemented new Generic onxxxx features.
    Function --- Old Option --- New Option
    Start of event (first motion) --- execute --- on_event_start
    End of event (no motion for gap seconds) --- New! --- on_event_end
    Picture saved (jpg or ppm) --- onsave --- on_picture_save
    Movie starts (mpeg file opened) --- onmpeg --- on_movie_start
    Movie ends (mpeg file closed) --- onffmpegclose --- on_movie_end
    Motion detected --- New! --- on_motion_detected
    http://www.lavrsen.dk/twiki/bin/view/Motion/OnXxxCommandsPatch and http://www.lavrsen.dk/twiki/bin/view/Motion/OnXxxxFeatureDiscussion (Joerg Weber)
  • More Netcam Stability Fixes (snap10-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.
  • Improvements of motion.conf help comments including improvements in new onxxxx options. (Kenneth Lavrsen)

snap12
  • Fixed a bug in the rgb2yuv420p function. (Daniel Ladd). http://www.lavrsen.dk/twiki/bin/view/Motion/BugReport2005x03x30x011107
  • Fixed a bug of locate feature for movement images combined with the new output_normal best feature (Joerg Weber).
  • More Netcam Stability Fixes (snap11-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.
  • Motion Guide refactored completely for 3.2.1 with better web navigation and auto generation of pages. Makefile updated so that the Motion TWiki topic. MotionGuideOneLargeDocument is fetched when updating the guide and making releases. (Kenneth Lavrsen).

snap13
  • Removed the debug_parameter option which had no use. Programmers can still use it because the code is only commented out. This change required a small update in the code that rewrites motion.conf so that a remote control command to write the config files still adds a text header for the thread section at the end of motion.conf (Kenneth Lavrsen).
  • Changed the default values for a few options: quiet on, webcam_maxrate 1, threshold_tune off, webcam_quality 50 (Kenneth Lavrsen).
  • Changed some cosmetics in the way motion.conf is written (space after #) (Kenneth Lavrsen).
  • Updated the motion-dist.conf to use default values unless there is a reason not to (Kenneth Lavrsen).
  • Fix the compile issue with official ffmpeg packages from debian (Angel Carpintero).
  • More Netcam Stability Fixes (snap12-post1) (Christopher Price) http://www.lavrsen.dk/twiki/bin/view/Motion/NetcamStabilityPatch
    • Newrote url parser, better syntax checking and error handling of urls.
    • Userpass now allowed in url (http://user:pass@example.com/). Netcam_userpass has precedence, it will override a userpass embedded in the url.

snap14
  • Added basic authentication to the http control interface introducing new config option control_authentication (Angel Carpintero).
  • Fixed memory leak when restarting Motion from http control (Angel Carpintero).
  • Small improvement in configure script for Debian (Angel Carpintero).
  • Added the ability to clear an option to off (bool), 0 (int) or undefined (string) by submitting blank entry field in the http control interface (Angel Carpintero).

snap15

snap16

Next Steps

  • Still open todos on Netcam code. Keep on sending bug reports.
  • Fix open bugs.
  • Finish the tuner_number feature. Most code is there but is still not active.
  • Range checking of options - includes a complete redesign of how options are loaded and changed via remote control. This redesign is mainly making the code more robust and should be transparent to the user.

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.

Download

Bug Reports


-- KennethLavrsen - 08 May 2005
Topic revision: r1 - 08 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.