mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-24 00:45:52 +00:00
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
This commit is contained in:
parent
061394be1b
commit
3e364dcb58
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=364473
@ -214,6 +214,7 @@
|
||||
SUBDIR += minitube
|
||||
SUBDIR += miro
|
||||
SUBDIR += mjpegtools
|
||||
SUBDIR += mjpg-streamer
|
||||
SUBDIR += mkclean
|
||||
SUBDIR += mkvalidator
|
||||
SUBDIR += mkvtoolnix
|
||||
|
76
multimedia/mjpg-streamer/Makefile
Normal file
76
multimedia/mjpg-streamer/Makefile
Normal file
@ -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>
|
2
multimedia/mjpg-streamer/distinfo
Normal file
2
multimedia/mjpg-streamer/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (mjpg-streamer-r63.tar.gz) = 311d00b48c638f95e5e4837ad6aa5c54d76b0824a2b8e5f7c59a4b6f2652f4f8
|
||||
SIZE (mjpg-streamer-r63.tar.gz) = 478235
|
28
multimedia/mjpg-streamer/files/mjpg_streamer.in
Normal file
28
multimedia/mjpg-streamer/files/mjpg_streamer.in
Normal file
@ -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"
|
15
multimedia/mjpg-streamer/files/patch-Makefile
Normal file
15
multimedia/mjpg-streamer/files/patch-Makefile
Normal file
@ -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
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
*
|
@ -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 */
|
@ -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
|
@ -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
|
||||
|
@ -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"
|
15
multimedia/mjpg-streamer/files/patch-utils.c
Normal file
15
multimedia/mjpg-streamer/files/patch-utils.c
Normal file
@ -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>
|
||||
|
12
multimedia/mjpg-streamer/files/pkg-message.in
Normal file
12
multimedia/mjpg-streamer/files/pkg-message.in
Normal file
@ -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
|
||||
|
||||
=============================================================================
|
6
multimedia/mjpg-streamer/pkg-descr
Normal file
6
multimedia/mjpg-streamer/pkg-descr
Normal file
@ -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/
|
28
multimedia/mjpg-streamer/pkg-plist
Normal file
28
multimedia/mjpg-streamer/pkg-plist
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user