diff options
author | pi <pi@FreeBSD.org> | 2014-08-10 04:33:06 +0800 |
---|---|---|
committer | pi <pi@FreeBSD.org> | 2014-08-10 04:33:06 +0800 |
commit | da2b53141de92bb789156729d25b6bd9625ae7c9 (patch) | |
tree | 85dd3b666020bc85fd1c0f71cd8ffb6fc23c9899 /multimedia/mjpg-streamer | |
parent | ec2be86abb12ac3f9a04559964a6f46885717d9e (diff) | |
download | freebsd-ports-gnome-da2b53141de92bb789156729d25b6bd9625ae7c9.tar.gz freebsd-ports-gnome-da2b53141de92bb789156729d25b6bd9625ae7c9.tar.zst freebsd-ports-gnome-da2b53141de92bb789156729d25b6bd9625ae7c9.zip |
New port: multimedia/mjpg-streamer
MJPG-streamer takes JPGs from Linux-UVC compatible webcams, filesystem or
other input plugins and streams them as M-JPEG via HTTP to webbrowsers,
VLC and other software. It is the successor of uvc-streamer, a Linux-UVC
streaming application with Pan/Tilt
WWW: http://sourceforge.net/projects/mjpg-streamer/
PR: 181527
Submitted by: kozlov.sergey.404@gmail.com
Diffstat (limited to 'multimedia/mjpg-streamer')
15 files changed, 291 insertions, 0 deletions
diff --git a/multimedia/mjpg-streamer/Makefile b/multimedia/mjpg-streamer/Makefile new file mode 100644 index 000000000000..2bdb6698f5df --- /dev/null +++ b/multimedia/mjpg-streamer/Makefile @@ -0,0 +1,76 @@ +# Created by: Kozlov Sergey <kozlov.sergey.404@gmail.com> +# $FreeBSD$ + +PORTNAME= mjpg-streamer +PORTVERSION= r63 +CATEGORIES= multimedia net +MASTER_SITES= SF +MASTER_SITE_SUBDIR= ${PORTNAME}/${PORTNAME}/Sourcecode + +MAINTAINER= kozlov.sergey.404@gmail.com +COMMENT= HTTP video streaming daemon + +LICENSE= GPLv2 + +BUILD_DEPENDS= ${LOCALBASE}/include/linux/videodev.h:${PORTSDIR}/multimedia/v4l_compat + +APP_BINARY= mjpg_streamer +CFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib +DEBUG_FLAGS+= -DDEBUG +USE_LDCONFIG= ${PREFIX}/lib/${PORTNAME} + +OPTIONS_DEFINE= DEBUG +OPTIONS_MULTI= INPUT_PLUGINS OUTPUT_PLUGINS +OPTIONS_MULTI_INPUT_PLUGINS= TESTPICTURE UVC +OPTIONS_MULTI_OUTPUT_PLUGINS= HTTP FILE + +TESTPICTURE_DESC= Test picture plugin +UVC_DESC= Linux-UVC V4L2 plugin + +HTTP_DESC= HTTP streaming plugin +FILE_DESC= File output plugin + +OPTIONS_DEFAULT= TESTPICTURE UVC HTTP FILE +OPTIONS_SUB= yes + +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MTESTPICTURE} +MJPEG_STREAMER_PLUGINS+= input_testpicture.so +.endif + +.if ${PORT_OPTIONS:MUVC} +MJPEG_STREAMER_PLUGINS+= input_uvc.so +LIB_DEPENDS+= libjpeg.so:${PORTSDIR}/graphics/jpeg +.endif + +.if ${PORT_OPTIONS:MHTTP} +MJPEG_STREAMER_PLUGINS+= output_http.so +.endif + +.if ${PORT_OPTIONS:MFILE} +MJPEG_STREAMER_PLUGINS+= output_file.so +.endif + +.if ${PORT_OPTIONS:MHTTP} +.if ${PORT_OPTIONS:MUVC} +USE_RC_SUBR= mjpg_streamer +SUB_FILES+= pkg-message +.endif +.endif + +ALL_TARGET= ${APP_BINARY} ${MJPEG_STREAMER_PLUGINS} + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/${APP_BINARY} ${STAGEDIR}${PREFIX}/bin + ${MKDIR} ${STAGEDIR}${PREFIX}/lib/${PORTNAME} + @for plugin in ${MJPEG_STREAMER_PLUGINS}; do \ + ${INSTALL_LIB} ${WRKSRC}/$${plugin} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}; \ + done +.if ${PORT_OPTIONS:MHTTP} + cd ${WRKSRC}/www && \ + ${COPYTREE_SHARE} "*" ${STAGEDIR}${WWWDIR} +.endif + +.include <bsd.port.mk> diff --git a/multimedia/mjpg-streamer/distinfo b/multimedia/mjpg-streamer/distinfo new file mode 100644 index 000000000000..9cb97400f8dc --- /dev/null +++ b/multimedia/mjpg-streamer/distinfo @@ -0,0 +1,2 @@ +SHA256 (mjpg-streamer-r63.tar.gz) = 311d00b48c638f95e5e4837ad6aa5c54d76b0824a2b8e5f7c59a4b6f2652f4f8 +SIZE (mjpg-streamer-r63.tar.gz) = 478235 diff --git a/multimedia/mjpg-streamer/files/mjpg_streamer.in b/multimedia/mjpg-streamer/files/mjpg_streamer.in new file mode 100644 index 000000000000..41e94fa8608e --- /dev/null +++ b/multimedia/mjpg-streamer/files/mjpg_streamer.in @@ -0,0 +1,28 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: mjpg_streamer +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# mjpg_streamer_enable="YES" +# #optional +# mjpg_streamer_flags="" + +. /etc/rc.subr + +name=mjpg_streamer +rcvar=mjpg_streamer_enable + +command=%%PREFIX%%/bin/${name} +command_args="-b" + +mjpg_streamer_enable="NO" +mjpg_streamer_flags="-o 'output_http.so -w %%WWWDIR%%'" + +load_rc_config $name +run_rc_command "$1" diff --git a/multimedia/mjpg-streamer/files/patch-Makefile b/multimedia/mjpg-streamer/files/patch-Makefile new file mode 100644 index 000000000000..8897a249ab4b --- /dev/null +++ b/multimedia/mjpg-streamer/files/patch-Makefile @@ -0,0 +1,15 @@ +--- Makefile.orig 2008-06-16 14:23:53.000000000 +0300 ++++ Makefile 2013-08-24 05:01:20.000000000 +0300 +@@ -7,11 +7,8 @@ + # + ############################################################### + +-CC = gcc + +-CFLAGS += -O2 -DLINUX -D_GNU_SOURCE -Wall +-#CFLAGS += -O2 -DDEBUG -DLINUX -D_GNU_SOURCE -Wall +-LFLAGS += -lpthread -ldl ++LFLAGS += -pthread + + APP_BINARY=mjpg_streamer + OBJECTS=mjpg_streamer.o utils.o diff --git a/multimedia/mjpg-streamer/files/patch-plugins-input__testpicture-Makefile b/multimedia/mjpg-streamer/files/patch-plugins-input__testpicture-Makefile new file mode 100644 index 000000000000..df2d7665f91c --- /dev/null +++ b/multimedia/mjpg-streamer/files/patch-plugins-input__testpicture-Makefile @@ -0,0 +1,15 @@ +--- plugins/input_testpicture/Makefile.orig 2008-06-16 14:23:51.000000000 +0300 ++++ plugins/input_testpicture/Makefile 2013-08-24 05:02:26.000000000 +0300 +@@ -7,11 +7,10 @@ + # + ############################################################### + +-CC = gcc + + OTHER_HEADERS = ../../mjpg_streamer.h ../../utils.h ../output.h ../input.h + +-CFLAGS += -O2 -DLINUX -D_GNU_SOURCE -Wall -shared -fPIC ++CFLAGS += -shared -fPIC + #CFLAGS += -DDEBUG + LFLAGS += -lpthread -ldl + diff --git a/multimedia/mjpg-streamer/files/patch-plugins-input__uvc-Makefile b/multimedia/mjpg-streamer/files/patch-plugins-input__uvc-Makefile new file mode 100644 index 000000000000..2ac58a91bd0e --- /dev/null +++ b/multimedia/mjpg-streamer/files/patch-plugins-input__uvc-Makefile @@ -0,0 +1,15 @@ +--- plugins/input_uvc/Makefile.orig 2008-06-16 14:23:51.000000000 +0300 ++++ plugins/input_uvc/Makefile 2013-08-24 05:02:59.000000000 +0300 +@@ -7,11 +7,10 @@ + # + ############################################################### + +-CC = gcc + + OTHER_HEADERS = ../../mjpg_streamer.h ../../utils.h ../output.h ../input.h + +-CFLAGS += -O2 -DLINUX -D_GNU_SOURCE -Wall -shared -fPIC ++CFLAGS += -shared -fPIC ${LDFLAGS} + #CFLAGS += -DDEBUG + LFLAGS += -lpthread -ldl + diff --git a/multimedia/mjpg-streamer/files/patch-plugins-input__uvc-uvc__compat.h b/multimedia/mjpg-streamer/files/patch-plugins-input__uvc-uvc__compat.h new file mode 100644 index 000000000000..775c09821e86 --- /dev/null +++ b/multimedia/mjpg-streamer/files/patch-plugins-input__uvc-uvc__compat.h @@ -0,0 +1,27 @@ +--- plugins/input_uvc/uvc_compat.h.orig 2008-06-16 14:23:51.000000000 +0300 ++++ plugins/input_uvc/uvc_compat.h 2013-08-24 04:49:30.000000000 +0300 +@@ -26,14 +26,13 @@ + #ifndef _UVC_COMPAT_H + #define _UVC_COMPAT_H + +-#include <linux/version.h> + #ifndef __KERNEL__ + #ifndef __user + #define __user + #endif + #endif + +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) ++#if 0 + /* + * Extended control API + */ +@@ -85,7 +84,7 @@ + + #endif + +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) ++#if 0 + /* + * Frame size and frame rate enumeration + * diff --git a/multimedia/mjpg-streamer/files/patch-plugins-input__uvc-uvcvideo.h b/multimedia/mjpg-streamer/files/patch-plugins-input__uvc-uvcvideo.h new file mode 100644 index 000000000000..b6f2da390f21 --- /dev/null +++ b/multimedia/mjpg-streamer/files/patch-plugins-input__uvc-uvcvideo.h @@ -0,0 +1,11 @@ +--- plugins/input_uvc/uvcvideo.h.orig 2008-06-16 14:23:51.000000000 +0300 ++++ plugins/input_uvc/uvcvideo.h 2013-08-24 04:50:23.000000000 +0300 +@@ -25,7 +25,7 @@ + #ifndef _USB_VIDEO_H_ + #define _USB_VIDEO_H_ + +-#include <linux/kernel.h> ++#include <sys/types.h> + #include <linux/videodev.h> + + /* Compatibility */ diff --git a/multimedia/mjpg-streamer/files/patch-plugins-output__file-Makefile b/multimedia/mjpg-streamer/files/patch-plugins-output__file-Makefile new file mode 100644 index 000000000000..1eddacf07804 --- /dev/null +++ b/multimedia/mjpg-streamer/files/patch-plugins-output__file-Makefile @@ -0,0 +1,15 @@ +--- plugins/output_file/Makefile.orig 2008-06-16 14:23:47.000000000 +0300 ++++ plugins/output_file/Makefile 2013-08-24 05:01:30.000000000 +0300 +@@ -7,11 +7,10 @@ + # + ############################################################### + +-CC = gcc + + OTHER_HEADERS = ../../mjpg_streamer.h ../../utils.h ../output.h ../input.h + +-CFLAGS += -O2 -DLINUX -D_GNU_SOURCE -Wall -shared -fPIC ++CFLAGS += -shared -fPIC + LFLAGS += -lpthread -ldl + + all: output_file.so diff --git a/multimedia/mjpg-streamer/files/patch-plugins-output__http-Makefile b/multimedia/mjpg-streamer/files/patch-plugins-output__http-Makefile new file mode 100644 index 000000000000..b5ff6b79edcb --- /dev/null +++ b/multimedia/mjpg-streamer/files/patch-plugins-output__http-Makefile @@ -0,0 +1,15 @@ +--- plugins/output_http/Makefile.orig 2008-06-16 14:23:47.000000000 +0300 ++++ plugins/output_http/Makefile 2013-08-24 05:01:32.000000000 +0300 +@@ -7,11 +7,10 @@ + # + ############################################################### + +-CC = gcc + + OTHER_HEADERS = ../../mjpg_streamer.h ../../utils.h ../output.h ../input.h + +-CFLAGS += -O2 -DLINUX -D_GNU_SOURCE -Wall -shared -fPIC ++CFLAGS += -shared -fPIC + #CFLAGS += -DDEBUG + LFLAGS += -lpthread -ldl + diff --git a/multimedia/mjpg-streamer/files/patch-plugins-output__http-httpd.c b/multimedia/mjpg-streamer/files/patch-plugins-output__http-httpd.c new file mode 100644 index 000000000000..04a83843b790 --- /dev/null +++ b/multimedia/mjpg-streamer/files/patch-plugins-output__http-httpd.c @@ -0,0 +1,11 @@ +--- plugins/output_http/httpd.c.orig 2008-06-16 14:23:47.000000000 +0300 ++++ plugins/output_http/httpd.c 2013-08-24 04:52:20.000000000 +0300 +@@ -33,6 +33,8 @@ + #include <fcntl.h> + #include <syslog.h> + ++#include <netinet/in.h> ++ + #include "../../mjpg_streamer.h" + #include "../../utils.h" + #include "httpd.h" diff --git a/multimedia/mjpg-streamer/files/patch-utils.c b/multimedia/mjpg-streamer/files/patch-utils.c new file mode 100644 index 000000000000..ea044715670b --- /dev/null +++ b/multimedia/mjpg-streamer/files/patch-utils.c @@ -0,0 +1,15 @@ +--- utils.c.orig 2008-06-16 14:23:53.000000000 +0300 ++++ utils.c 2013-08-24 04:23:19.000000000 +0300 +@@ -23,10 +23,10 @@ + #include <stdio.h> + #include <stdlib.h> + #include <unistd.h> +-#include <linux/types.h> ++#include <sys/types.h> + #include <string.h> + #include <fcntl.h> +-#include <wait.h> ++#include <sys/wait.h> + #include <time.h> + #include <limits.h> + diff --git a/multimedia/mjpg-streamer/files/pkg-message.in b/multimedia/mjpg-streamer/files/pkg-message.in new file mode 100644 index 000000000000..f92c2754cbb0 --- /dev/null +++ b/multimedia/mjpg-streamer/files/pkg-message.in @@ -0,0 +1,12 @@ +============================================================================= + +To launch MJPG-streamer demo, run +%%PREFIX%%/rc.d/mjpg_streamer start + +Then point your browser to +http://your.server.com:8080 + +To run MJPG-streamer at startup, add +'mjpg_streamer_enable="YES"' to /etc/rc.conf + +============================================================================= diff --git a/multimedia/mjpg-streamer/pkg-descr b/multimedia/mjpg-streamer/pkg-descr new file mode 100644 index 000000000000..1f0f9bdd510c --- /dev/null +++ b/multimedia/mjpg-streamer/pkg-descr @@ -0,0 +1,6 @@ +MJPG-streamer takes JPGs from Linux-UVC compatible webcams, filesystem or +other input plugins and streams them as M-JPEG via HTTP to webbrowsers, +VLC and other software. It is the successor of uvc-streamer, a Linux-UVC +streaming application with Pan/Tilt + +WWW: http://sourceforge.net/projects/mjpg-streamer/ diff --git a/multimedia/mjpg-streamer/pkg-plist b/multimedia/mjpg-streamer/pkg-plist new file mode 100644 index 000000000000..b32f7710f5fd --- /dev/null +++ b/multimedia/mjpg-streamer/pkg-plist @@ -0,0 +1,28 @@ +bin/mjpg_streamer +%%TESTPICTURE%%lib/mjpg-streamer/input_testpicture.so +%%UVC%%lib/mjpg-streamer/input_uvc.so +%%FILE%%lib/mjpg-streamer/output_file.so +%%HTTP%%lib/mjpg-streamer/output_http.so +%%HTTP%%%%WWWDIR%%/java.html +%%HTTP%%%%WWWDIR%%/control.htm +%%HTTP%%%%WWWDIR%%/java_control.html +%%HTTP%%%%WWWDIR%%/stream.html +%%HTTP%%%%WWWDIR%%/static.html +%%HTTP%%%%WWWDIR%%/java_simple.html +%%HTTP%%%%WWWDIR%%/bodybg.gif +%%HTTP%%%%WWWDIR%%/static_simple.html +%%HTTP%%%%WWWDIR%%/favicon.png +%%HTTP%%%%WWWDIR%%/javascript.html +%%HTTP%%%%WWWDIR%%/functions.js +%%HTTP%%%%WWWDIR%%/index.html +%%HTTP%%%%WWWDIR%%/stream_simple.html +%%HTTP%%%%WWWDIR%%/javascript_simple.html +%%HTTP%%%%WWWDIR%%/fix.css +%%HTTP%%%%WWWDIR%%/favicon.ico +%%HTTP%%%%WWWDIR%%/style.css +%%HTTP%%%%WWWDIR%%/sidebarbg.gif +%%HTTP%%%%WWWDIR%%/example.jpg +%%HTTP%%%%WWWDIR%%/cambozola.jar +%%HTTP%%%%WWWDIR%%/LICENSE.txt +%%HTTP%%@dirrm %%WWWDIR%% +@dirrm lib/mjpg-streamer |