Update motion to a recent snapshot (#1538)
authorFlorian Fainelli <florian@openwrt.org>
Mon, 2 Apr 2007 10:27:11 +0000 (10:27 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Mon, 2 Apr 2007 10:27:11 +0000 (10:27 +0000)
SVN-Revision: 6822

multimedia/motion/Makefile
multimedia/motion/patches/001-ffmpeg.patch
multimedia/motion/patches/003-sn9c102-common-buffer.patch [new file with mode: 0644]

index 4cbe2c7..9d2d10e 100644 (file)
@@ -9,12 +9,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=motion
-PKG_VERSION:=3.2.6
+PKG_VERSION:=20070331-051001
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=@SF/motion
-PKG_MD5SUM:=71e6bd13fcca70372e9b7c7806d62b30
+PKG_SOURCE_URL:=http://www.lavrsen.dk/sources/motion-daily \
+               @SF/motion
+PKG_MD5SUM:=16e58186022dfee1c0dcaf03cf5393e5
 PKG_CAT:=zcat
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
index 1f4c73e..50c5748 100644 (file)
@@ -1,38 +1,31 @@
-diff -ur motion-3.2.5.1-old/motion.c motion-3.2.5.1/motion.c
---- motion-3.2.5.1-old/motion.c        2006-03-17 10:05:13.490000000 -0800
-+++ motion-3.2.5.1/motion.c    2006-03-17 10:03:38.020000000 -0800
-@@ -1246,10 +1246,10 @@
-                * Note: Negative value means SIGALRM snaps are enabled
+diff -x .svn -ruN motion-3.2.8.old/motion.c motion-3.2.8/motion.c
+--- motion-3.2.8.old/motion.c  2007-03-31 12:54:31.000000000 +0200
++++ motion-3.2.8/motion.c      2007-03-31 13:08:27.000000000 +0200
+@@ -1282,6 +1282,7 @@
                 * httpd-control snaps are always enabled.
                 */
--              
-+#ifdef HAVE_FFMPEG            
++#ifdef HAVE_FFMPEG
                /* time_current_frame is used both for snapshot and timelapse features */
-               time_current_frame = cnt->currenttime;          
--              
-+
-               if ( (cnt->conf.snapshot_interval > 0 && cnt->shots == 0 &&
-                     time_current_frame % cnt->conf.snapshot_interval <= time_last_frame % cnt->conf.snapshot_interval) ||
-                   cnt->snapshot) {
-@@ -1257,7 +1257,7 @@
+               time_current_frame = cnt->currenttime;
+@@ -1291,7 +1292,7 @@
+                       event(cnt, EVENT_IMAGE_SNAPSHOT, newimg, NULL, NULL, cnt->currenttime_tm);
                        cnt->snapshot = 0;
                }
 -
 +#endif /* HAVE_FFMPEG */
        /***** MOTION LOOP - TIMELAPSE FEATURE SECTION *****/
  
- #ifdef HAVE_FFMPEG
-@@ -1331,10 +1331,9 @@
+@@ -1366,9 +1367,9 @@
                        event(cnt, EVENT_TIMELAPSEEND, NULL, NULL, NULL, cnt->currenttime_tm);
-                       
-               
--#endif /* HAVE_FFMPEG */
  
-               time_last_frame = time_current_frame;
--
-+#endif /* HAVE_FFMPEG */
  
-       /***** MOTION LOOP - VIDEO LOOPBACK SECTION *****/
++              time_last_frame = time_current_frame;
+ #endif /* HAVE_FFMPEG */
+-              time_last_frame = time_current_frame;
  
-Only in motion-3.2.5.1-old/: motion.c.orig
+       /***** MOTION LOOP - VIDEO LOOPBACK SECTION *****/
diff --git a/multimedia/motion/patches/003-sn9c102-common-buffer.patch b/multimedia/motion/patches/003-sn9c102-common-buffer.patch
new file mode 100644 (file)
index 0000000..8a9693c
--- /dev/null
@@ -0,0 +1,15 @@
+Index: motion-3.2.8/motion.c
+===================================================================
+--- motion-3.2.8/motion.c      (revision 174)
++++ motion-3.2.8/motion.c      (working copy)
+@@ -474,8 +474,8 @@
+       cnt->imgs.shotstamp = mymalloc(sizeof(int));
+       /* Allocate a buffer for temp. usage in some places */
+-      /* Only despeckle for now... */
+-      cnt->imgs.common_buffer = mymalloc(3 * cnt->imgs.width);
++      /* Only despeckle & bayer2rgb24() for now... */
++      cnt->imgs.common_buffer = mymalloc(3 * cnt->imgs.width * cnt->imgs.height);
+       /* Now is a good time to init rotation data. Since vid_start has been
+        * called, we know that we have imgs.width and imgs.height. When capturing