Kaynağa Gözat

mjpg-streamer: Upgrade to r182, update copyright and license info

    Add options for using libv4l (controls) and installing additional plugins
    Download and use latest cambozola.jar if Web UI selected

Signed-off-by: Ted Hess <thess@kitschensync.net>
Ted Hess 10 yıl önce
ebeveyn
işleme
99a4852b37

+ 16
- 7
multimedia/mjpg-streamer/Config.in Dosyayı Görüntüle

@@ -1,23 +1,32 @@
1 1
 if PACKAGE_mjpg-streamer
2 2
 
3
+config MJPG_STREAMER_V4L2
4
+	bool "Compile input_uvc with libv4l2 (camera controls)"
5
+	depends on PACKAGE_libv4l
6
+	default n
7
+
3 8
 config MJPG_STREAMER_INPUT_FILE
4
-	bool "Install input file library"
5
-	default y
9
+	bool "Install input file plugin"
10
+	default n
6 11
 
7 12
 config MJPG_STREAMER_INPUT_UVC
8
-	bool "Install input uvc library"
13
+	bool "Install input uvc plugin"
9 14
 	default y
10 15
 
16
+config MJPG_STREAMER_INPUT_TESTPICTURE
17
+	bool "Install input testpicture plugin"
18
+	default n
19
+
11 20
 config MJPG_STREAMER_OUTPUT_FILE
12
-	bool "Install output file library"
13
-	default y
21
+	bool "Install output file plugin"
22
+	default n
14 23
 
15 24
 config MJPG_STREAMER_OUTPUT_HTTP
16
-	bool "Install output http library"
25
+	bool "Install output http plugin"
17 26
 	default y
18 27
 
19 28
 config MJPG_STREAMER_WWW
20
-	bool "Install WWW files"
29
+	bool "Install Web UI files (includes cambozola)"
21 30
 	default y
22 31
 
23 32
 endif

+ 34
- 3
multimedia/mjpg-streamer/Makefile Dosyayı Görüntüle

@@ -1,5 +1,5 @@
1 1
 #
2
-# Copyright (C) 2006-2013 OpenWrt.org
2
+# Copyright (C) 2006-2014 OpenWrt.org
3 3
 #
4 4
 # This is free software, licensed under the GNU General Public License v2.
5 5
 # See /LICENSE for more information.
@@ -8,7 +8,7 @@
8 8
 include $(TOPDIR)/rules.mk
9 9
 
10 10
 PKG_NAME:=mjpg-streamer
11
-PKG_REV:=181
11
+PKG_REV:=182
12 12
 PKG_VERSION:=r$(PKG_REV)
13 13
 PKG_RELEASE:=1
14 14
 PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
@@ -19,13 +19,17 @@ PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
19 19
 PKG_SOURCE_VERSION:=$(PKG_REV)
20 20
 PKG_SOURCE_PROTO:=svn
21 21
 
22
+PKG_LICENSE:=GPL-2.0
23
+PKG_LICENSE_FILE:=LICENSE
24
+
22 25
 include $(INCLUDE_DIR)/package.mk
23 26
 
24 27
 define Package/mjpg-streamer
25 28
   SECTION:=multimedia
26 29
   CATEGORY:=Multimedia
27 30
   TITLE:=MJPG-streamer
28
-  DEPENDS:=+libpthread +libjpeg
31
+  DEPENDS:=+libpthread +libjpeg +PACKAGE_libv4l:libv4l
32
+#$(if $(CONFIG_MJPG_STREAMER_V4L2),+libv4l)
29 33
   URL:=http://mjpg-streamer.wiki.sourceforge.net/
30 34
   MENU:=1
31 35
 endef
@@ -44,6 +48,30 @@ define Package/mjpg-streamer/conffiles
44 48
 /etc/config/mjpg-streamer
45 49
 endef
46 50
 
51
+CAMBOZOLA:=cambozola-latest.tar.gz
52
+
53
+define Download/cambozola
54
+  URL:=http://www.andywilcock.com/code/cambozola
55
+  FILE:=$(CAMBOZOLA)
56
+  MD5SUM:=6c48fd994685d4d72668850eeb613e24
57
+endef
58
+
59
+# Fetch latest cambozola that works with latest Java(s)
60
+# Yes, I know this is ugly
61
+define Build/Prepare
62
+    $(call Build/Prepare/Default)
63
+    ifeq ($(CONFIG_MJPG_STREAMER_WWW),y)
64
+	$(eval $(call Download,cambozola))
65
+	$(TAR) -xvf $(DL_DIR)/$(CAMBOZOLA) --strip=2 --wildcards \
66
+		-C $(PKG_BUILD_DIR)/www */dist/cambozola.jar
67
+    endif
68
+endef
69
+
70
+ifeq ($(CONFIG_MJPG_STREAMER_V4L2),y)
71
+    TARGET_CFLAGS+= -DUSE_LIBV4L2
72
+    TARGET_LDFLAGS+= -lv4l2
73
+endif
74
+
47 75
 define Package/mjpg-streamer/install
48 76
 	$(INSTALL_DIR) $(1)/usr/bin
49 77
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/mjpg_streamer $(1)/usr/bin/
@@ -60,6 +88,9 @@ endif
60 88
 ifeq ($(CONFIG_MJPG_STREAMER_INPUT_UVC),y)
61 89
 	$(CP) $(PKG_BUILD_DIR)/input_uvc.so $(1)/usr/lib
62 90
 endif
91
+ifeq ($(CONFIG_MJPG_STREAMER_INPUT_TESTPICTURE),y)
92
+	$(CP) $(PKG_BUILD_DIR)/input_testpicture.so $(1)/usr/lib
93
+endif
63 94
 ifeq ($(CONFIG_MJPG_STREAMER_OUTPUT_FILE),y)
64 95
 	$(CP) $(PKG_BUILD_DIR)/output_file.so $(1)/usr/lib
65 96
 endif

+ 0
- 4
multimedia/mjpg-streamer/files/mjpg-streamer.init Dosyayı Görüntüle

@@ -61,10 +61,6 @@ start_instance() {
61 61
 
62 62
 		config_get www "$s" 'www'
63 63
 		[ -n "$www" ] && output_arg="${output_arg} --www $www"
64
-
65
-		config_get username "$s" 'username'
66
-		config_get password "$s" 'password'
67
-		[ -n "$username" ] && [ -n "$password" ] && output_arg="${output_arg} --credentials $username:$password"
68 64
 	fi
69 65
 
70 66
 	if [ -z "$output_arg" ]; then

+ 17
- 0
multimedia/mjpg-streamer/patches/010-enable-more-plugins.patch Dosyayı Görüntüle

@@ -0,0 +1,17 @@
1
+--- a/Makefile
2
++++ b/Makefile
3
+@@ -33,12 +33,12 @@ APP_BINARY = mjpg_streamer
4
+ 
5
+ # define the names and targets of the plugins
6
+ PLUGINS = input_uvc.so
7
+-#PLUGINS += output_file.so
8
++PLUGINS += output_file.so
9
+ #PLUGINS += output_udp.so
10
+ PLUGINS += output_http.so
11
+ PLUGINS += input_testpicture.so
12
+ #PLUGINS += output_autofocus.so
13
+-#PLUGINS += input_file.so
14
++PLUGINS += input_file.so
15
+ # PLUGINS += input_pylon.so
16
+ # PLUGINS += input_megatec.so
17
+ # PLUGINS += output_mars2020.so