Date: Sat, 9 Aug 2014 20:33:06 +0000 (UTC) From: Kurt Jaeger <pi@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r364473 - in head/multimedia: . mjpg-streamer mjpg-streamer/files Message-ID: <53e68582.238d.75f5ea6b@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pi Date: Sat Aug 9 20:33:06 2014 New Revision: 364473 URL: http://svnweb.freebsd.org/changeset/ports/364473 QAT: https://qat.redports.org/buildarchive/r364473/ Log: 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 Added: head/multimedia/mjpg-streamer/ head/multimedia/mjpg-streamer/Makefile (contents, props changed) head/multimedia/mjpg-streamer/distinfo (contents, props changed) head/multimedia/mjpg-streamer/files/ head/multimedia/mjpg-streamer/files/mjpg_streamer.in (contents, props changed) head/multimedia/mjpg-streamer/files/patch-Makefile (contents, props changed) head/multimedia/mjpg-streamer/files/patch-plugins-input__testpicture-Makefile (contents, props changed) head/multimedia/mjpg-streamer/files/patch-plugins-input__uvc-Makefile (contents, props changed) head/multimedia/mjpg-streamer/files/patch-plugins-input__uvc-uvc__compat.h (contents, props changed) head/multimedia/mjpg-streamer/files/patch-plugins-input__uvc-uvcvideo.h (contents, props changed) head/multimedia/mjpg-streamer/files/patch-plugins-output__file-Makefile (contents, props changed) head/multimedia/mjpg-streamer/files/patch-plugins-output__http-Makefile (contents, props changed) head/multimedia/mjpg-streamer/files/patch-plugins-output__http-httpd.c (contents, props changed) head/multimedia/mjpg-streamer/files/patch-utils.c (contents, props changed) head/multimedia/mjpg-streamer/files/pkg-message.in (contents, props changed) head/multimedia/mjpg-streamer/pkg-descr (contents, props changed) head/multimedia/mjpg-streamer/pkg-plist (contents, props changed) Modified: head/multimedia/Makefile Modified: head/multimedia/Makefile ============================================================================== --- head/multimedia/Makefile Sat Aug 9 20:06:21 2014 (r364472) +++ head/multimedia/Makefile Sat Aug 9 20:33:06 2014 (r364473) @@ -214,6 +214,7 @@ SUBDIR += minitube SUBDIR += miro SUBDIR += mjpegtools + SUBDIR += mjpg-streamer SUBDIR += mkclean SUBDIR += mkvalidator SUBDIR += mkvtoolnix Added: head/multimedia/mjpg-streamer/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/mjpg-streamer/Makefile Sat Aug 9 20:33:06 2014 (r364473) @@ -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> Added: head/multimedia/mjpg-streamer/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/mjpg-streamer/distinfo Sat Aug 9 20:33:06 2014 (r364473) @@ -0,0 +1,2 @@ +SHA256 (mjpg-streamer-r63.tar.gz) = 311d00b48c638f95e5e4837ad6aa5c54d76b0824a2b8e5f7c59a4b6f2652f4f8 +SIZE (mjpg-streamer-r63.tar.gz) = 478235 Added: head/multimedia/mjpg-streamer/files/mjpg_streamer.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/mjpg-streamer/files/mjpg_streamer.in Sat Aug 9 20:33:06 2014 (r364473) @@ -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" Added: head/multimedia/mjpg-streamer/files/patch-Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/mjpg-streamer/files/patch-Makefile Sat Aug 9 20:33:06 2014 (r364473) @@ -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 Added: head/multimedia/mjpg-streamer/files/patch-plugins-input__testpicture-Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/mjpg-streamer/files/patch-plugins-input__testpicture-Makefile Sat Aug 9 20:33:06 2014 (r364473) @@ -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 + Added: head/multimedia/mjpg-streamer/files/patch-plugins-input__uvc-Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/mjpg-streamer/files/patch-plugins-input__uvc-Makefile Sat Aug 9 20:33:06 2014 (r364473) @@ -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 + Added: head/multimedia/mjpg-streamer/files/patch-plugins-input__uvc-uvc__compat.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/mjpg-streamer/files/patch-plugins-input__uvc-uvc__compat.h Sat Aug 9 20:33:06 2014 (r364473) @@ -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 + * Added: head/multimedia/mjpg-streamer/files/patch-plugins-input__uvc-uvcvideo.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/mjpg-streamer/files/patch-plugins-input__uvc-uvcvideo.h Sat Aug 9 20:33:06 2014 (r364473) @@ -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 */ Added: head/multimedia/mjpg-streamer/files/patch-plugins-output__file-Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/mjpg-streamer/files/patch-plugins-output__file-Makefile Sat Aug 9 20:33:06 2014 (r364473) @@ -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 Added: head/multimedia/mjpg-streamer/files/patch-plugins-output__http-Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/mjpg-streamer/files/patch-plugins-output__http-Makefile Sat Aug 9 20:33:06 2014 (r364473) @@ -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 + Added: head/multimedia/mjpg-streamer/files/patch-plugins-output__http-httpd.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/mjpg-streamer/files/patch-plugins-output__http-httpd.c Sat Aug 9 20:33:06 2014 (r364473) @@ -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" Added: head/multimedia/mjpg-streamer/files/patch-utils.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/mjpg-streamer/files/patch-utils.c Sat Aug 9 20:33:06 2014 (r364473) @@ -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> + Added: head/multimedia/mjpg-streamer/files/pkg-message.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/mjpg-streamer/files/pkg-message.in Sat Aug 9 20:33:06 2014 (r364473) @@ -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 + +============================================================================= Added: head/multimedia/mjpg-streamer/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/mjpg-streamer/pkg-descr Sat Aug 9 20:33:06 2014 (r364473) @@ -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/ Added: head/multimedia/mjpg-streamer/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/mjpg-streamer/pkg-plist Sat Aug 9 20:33:06 2014 (r364473) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53e68582.238d.75f5ea6b>