Motion Snapshot Release 3.1.20_snap6
Release Notes
3.1.20 snap6 - 22 Apr 2005
Bugfix Development Release -
not recommended for production 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 snapshot releases can be added as a comment to
http://www.lavrsen.dk/twiki/bin/view/Motion/NetcamStabilityPatch
Changes 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).
Next Steps
- Still open todos on Netcam code. Keep on sending bug reports.
- Fix open bugs.
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 - 22 Apr 2005