Browse Source

Merge pull request #11003 from neheb/mj

mjpg-streamer: update to latest git version
lilik-openwrt-22.03
Rosen Penev 5 years ago
committed by GitHub
parent
commit
875cbfa9ae
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 52 additions and 32 deletions
  1. +13
    -13
      multimedia/mjpg-streamer/Makefile
  2. +39
    -19
      multimedia/mjpg-streamer/files/mjpg-streamer.init

+ 13
- 13
multimedia/mjpg-streamer/Makefile View File

@ -6,27 +6,25 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=mjpg-streamer
PKG_VERSION:=2018-10-25
PKG_RELEASE:=4
PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>, \
Ted Hess <thess@kitschensync.net>
PKG_VERSION:=2019-05-24
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/jacksonliam/mjpg-streamer.git
PKG_SOURCE_VERSION:=ddb69b7b4f114f3c2ca01adf55712792ca8aed43
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_MIRROR_HASH:=d87ebff5de0c17a35a5b81adad5aa234bc70fe2bb17d1c6277c726845dc043bb
PKG_SOURCE_URL:=https://github.com/jacksonliam/mjpg-streamer
PKG_SOURCE_VERSION:=501f6362c5afddcfb41055f97ae484252c85c912
PKG_MIRROR_HASH:=9e1f098c5092ae6cc70916caf9d45808a312333973524725ae5e729a4af18657
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>, \
Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=MJPG_STREAMER_V4L2:libv4l zmq protobuf-c/host
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
PKG_BUILD_DEPENDS:=MJPG_STREAMER_V4L2:libv4l zmq protobuf-c/host
CMAKE_OPTIONS+=-DCMAKE_SKIP_RPATH=FALSE
define Package/mjpg-streamer
SECTION:=multimedia
CATEGORY:=Multimedia
@ -178,6 +176,8 @@ $(call Package/mjpg-streamer/Default/description)
This package provides simple version of the web content.
endef
CMAKE_OPTIONS += -DCMAKE_SKIP_RPATH=FALSE
CAMBOZOLA:=cambozola-0.936.tar.gz
# Distribution URL doesn't always have the correct version


+ 39
- 19
multimedia/mjpg-streamer/files/mjpg-streamer.init View File

@ -14,99 +14,119 @@ error() {
start_instance() {
local s="$1"
local enabled
config_get_bool enabled "$1" 'enabled' 0
[ $enabled -eq 0 ] && return
[ "$enabled" ] || return
local input
config_get input "$s" 'input'
if [ -z "$input" ]; then
[ -z "$input" ] && {
error "in section '$s' option input is missing"
return 1
fi
}
local output
config_get output "$s" 'output'
if [ -z "$output" ]; then
[ -z "$output" ] && {
error "in section '$s' option output is missing"
return 1
fi
}
local input_arg
if [ "x$input" = 'xuvc' ]; then
[ "x$input" = 'xuvc' ] && {
input_arg="input_uvc.so"
local device
config_get device "$s" 'device'
if [ ! -c "$device" ]; then
[ -c "$device" ] || {
error "device '$device' does not exist"
return 1
fi
}
input_arg="${input_arg} --device $device"
local fps
config_get fps "$s" 'fps'
[ -n "$fps" ] && input_arg="${input_arg} --fps $fps"
local yuv
config_get_bool yuv "$s" 'yuv' 0
if [ $yuv -ne 0 ]; then
[ "$yuv" -ne 0 ] && {
input_arg="${input_arg} --yuv"
local quality
config_get quality "$s" 'quality'
[ -n "$quality" ] && input_arg="${input_arg} --quality $quality"
fi
}
local resolution
config_get resolution "$s" 'resolution'
[ -n "$resolution" ] && input_arg="${input_arg} --resolution $resolution"
local led
config_get led "$s" 'led'
[ -n "$led" ] && input_arg="${input_arg} --led $led"
fi
}
if [ -z "$input_arg" ]; then
[ -z "$input_arg" ] && {
error "unsuported input option '$input' in section '$s'"
return 1
fi
}
local output_arg
if [ "x$output" = 'xhttp' ]; then
[ "x$output" = 'xhttp' ] && {
output_arg="output_http.so"
local port
config_get port "$s" 'port'
[ -n "$port" ] && output_arg="${output_arg} --port $port"
local listen_ip
config_get listen_ip "$s" 'listen_ip'
[ -n "$listen_ip" ] && output_arg="${output_arg} --listen $listen_ip"
local www
config_get www "$s" 'www'
[ -n "$www" ] && output_arg="${output_arg} --www $www"
local username
config_get username "$s" 'username'
local password
config_get password "$s" 'password'
[ -n "$username" ] && [ -n "$password" ] && output_arg="${output_arg} --credentials $username:$password"
fi
}
if [ "x$output" = 'xfile' ]; then
[ "x$output" = 'xfile' ] && {
output_arg="output_file.so"
local folder
config_get folder "$s" 'folder'
[ -n "$folder" ] && output_arg="${output_arg} --folder $folder"
local delay
config_get delay "$s" 'delay'
[ -n "$delay" ] && output_arg="${output_arg} --delay $delay"
local link
config_get link "$s" 'link'
[ -n "$link" ] && output_arg="${output_arg} --link $link"
local ringbuffer
config_get ringbuffer "$s" 'ringbuffer'
[ -n "$ringbuffer" ] && output_arg="${output_arg} --size $ringbuffer"
local exceed
config_get exceed "$s" 'exceed'
[ -n "$exceed" ] && output_arg="${output_arg} --exceed $exceed"
local command
config_get command "$s" 'command'
[ -n "$command" ] && output_arg="${output_arg} --command $command"
fi
}
if [ -z "$output_arg" ]; then
[ -z "$output_arg" ] && {
error "unsuported output option '$output' in section '$s'"
return 1
fi
}
procd_open_instance
procd_set_param command "$PROG" --input "$input_arg" --output "$output_arg"


Loading…
Cancel
Save