mirror of
https://github.com/pikvm/ustreamer.git
synced 2026-02-28 04:36:33 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2077d94edc | ||
|
|
defe5eb6fe | ||
|
|
dee5e18134 | ||
|
|
6ef5a7e440 | ||
|
|
462735147d |
@@ -1,7 +1,7 @@
|
|||||||
[bumpversion]
|
[bumpversion]
|
||||||
commit = True
|
commit = True
|
||||||
tag = True
|
tag = True
|
||||||
current_version = 0.66
|
current_version = 0.68
|
||||||
parse = (?P<major>\d+)\.(?P<minor>\d+)(\.(?P<patch>\d+)(\-(?P<release>[a-z]+))?)?
|
parse = (?P<major>\d+)\.(?P<minor>\d+)(\.(?P<patch>\d+)(\-(?P<release>[a-z]+))?)?
|
||||||
serialize =
|
serialize =
|
||||||
{major}.{minor}
|
{major}.{minor}
|
||||||
@@ -14,3 +14,7 @@ replace = VERSION "{new_version}"
|
|||||||
search = pkgver={current_version}
|
search = pkgver={current_version}
|
||||||
replace = pkgver={new_version}
|
replace = pkgver={new_version}
|
||||||
|
|
||||||
|
[bumpversion:file:pkg/openwrt/Makefile]
|
||||||
|
search = PKG_VERSION:={current_version}
|
||||||
|
replace = PKG_VERSION:={new_version}
|
||||||
|
|
||||||
|
|||||||
2
Makefile
2
Makefile
@@ -50,7 +50,7 @@ release:
|
|||||||
|
|
||||||
|
|
||||||
bump:
|
bump:
|
||||||
bumpversion minor
|
bumpversion $(if $(V), $(V), minor)
|
||||||
|
|
||||||
|
|
||||||
push:
|
push:
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
|
|
||||||
pkgname=ustreamer
|
pkgname=ustreamer
|
||||||
pkgver=0.66
|
pkgver=0.68
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Lightweight and fast MJPG-HTTP streamer"
|
pkgdesc="Lightweight and fast MJPG-HTTP streamer"
|
||||||
url="https://github.com/pi-kvm/ustreamer"
|
url="https://github.com/pi-kvm/ustreamer"
|
||||||
|
|||||||
45
pkg/openwrt/Makefile
Normal file
45
pkg/openwrt/Makefile
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=ustreamer
|
||||||
|
PKG_VERSION:=0.68
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
PKG_MAINTAINER:=Maxim Devaev <mdevaev@gmail.com>
|
||||||
|
|
||||||
|
PKG_SOURCE_PROTO:=git
|
||||||
|
PKG_SOURCE_URL:=https://github.com/pi-kvm/ustreamer.git
|
||||||
|
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||||
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||||
|
|
||||||
|
PKG_LICENSE:=GPL-3.0
|
||||||
|
PKG_LICENSE_FILES:=LICENSE
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/ustreamer
|
||||||
|
SECTION:=multimedia
|
||||||
|
CATEGORY:=Multimedia
|
||||||
|
TITLE:=uStreamer
|
||||||
|
DEPENDS:=+libpthread +libjpeg +libv4l +libuuid +libevent2 +libevent2-core +libevent2-extra +libevent2-pthreads
|
||||||
|
URL:=https://github.com/pi-kvm/ustreamer
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/ustreamer/description
|
||||||
|
µStreamer - Lightweight and fast MJPG-HTTP streamer
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/ustreamer/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ustreamer $(1)/usr/bin/
|
||||||
|
$(INSTALL_DIR) $(1)/etc/config
|
||||||
|
$(CP) ./files/ustreamer.config $(1)/etc/config/ustreamer
|
||||||
|
$(INSTALL_DIR) $(1)/etc/init.d
|
||||||
|
$(INSTALL_BIN) ./files/ustreamer.init $(1)/etc/init.d/ustreamer
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,ustreamer))
|
||||||
20
pkg/openwrt/files/ustreamer.config
Normal file
20
pkg/openwrt/files/ustreamer.config
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
|
||||||
|
config ustreamer
|
||||||
|
option enabled '0'
|
||||||
|
|
||||||
|
option device '/dev/video0'
|
||||||
|
option device_timeout '5'
|
||||||
|
option input '0'
|
||||||
|
|
||||||
|
option width '640'
|
||||||
|
option height '480'
|
||||||
|
option format 'YUYV'
|
||||||
|
option quality '80'
|
||||||
|
option desired_fps '0'
|
||||||
|
option encoder 'CPU'
|
||||||
|
|
||||||
|
option host '::'
|
||||||
|
option port '8080'
|
||||||
|
option static ''
|
||||||
|
option user ''
|
||||||
|
option password ''
|
||||||
55
pkg/openwrt/files/ustreamer.init
Normal file
55
pkg/openwrt/files/ustreamer.init
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
# Copyright (C) 2009-2019 OpenWrt.org
|
||||||
|
|
||||||
|
START=90
|
||||||
|
STOP=10
|
||||||
|
|
||||||
|
USE_PROCD=1
|
||||||
|
PROG=/usr/bin/ustreamer
|
||||||
|
|
||||||
|
getcfg() {
|
||||||
|
config_get value ustreamer $1 $2
|
||||||
|
return "$value"
|
||||||
|
}
|
||||||
|
|
||||||
|
start_instance() {
|
||||||
|
config_get_bool enabled ustreamer enabled 0
|
||||||
|
[ "$enabled" -eq 0 ] && return
|
||||||
|
|
||||||
|
local options=""
|
||||||
|
|
||||||
|
options="$options --device='`getcfg device /dev/video0`'"
|
||||||
|
options="$options --device-timeout='`getcfg device_timeout 5`'"
|
||||||
|
options="$options --input='`getcfg input 0`'"
|
||||||
|
|
||||||
|
options="$options --width='`getcfg width 640`'"
|
||||||
|
options="$options --height='`getcfg height 480`'"
|
||||||
|
options="$options --format='`getcfg format YUYV`'"
|
||||||
|
options="$options --quality='`getcfg quality 80`'"
|
||||||
|
options="$options --desired-fps='`getcfg desired_fps 0`'"
|
||||||
|
options="$options --encoder='`getcfg encoder CPU`'"
|
||||||
|
|
||||||
|
options="$options --host='`getcfg host '::'`'"
|
||||||
|
local port=`getcfg port 8080`
|
||||||
|
options="$options --port='$port'"
|
||||||
|
options="$options --static='`getcfg static ''`'"
|
||||||
|
options="$options --user='`getcfg user ''`'"
|
||||||
|
options="$options --passwd='`getcfg password ''`'"
|
||||||
|
|
||||||
|
config-get-bool opt_slowdown ustreamer slowdown 1
|
||||||
|
[ "$slowdown" -eq 1 ] && options="$options --slowdown"
|
||||||
|
|
||||||
|
procd_open_instance
|
||||||
|
procd_set_param command "$PROG" $options
|
||||||
|
procd_add_mdns http tcp "$port" daemon=ustreamer
|
||||||
|
procd_close_instance
|
||||||
|
}
|
||||||
|
|
||||||
|
start_service() {
|
||||||
|
config_load ustreamer
|
||||||
|
config_foreach start_instance ustreamer
|
||||||
|
}
|
||||||
|
|
||||||
|
service_triggers() {
|
||||||
|
procd_add_reload_trigger ustreamer
|
||||||
|
}
|
||||||
@@ -22,4 +22,4 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define VERSION "0.66"
|
#define VERSION "0.68"
|
||||||
|
|||||||
@@ -376,12 +376,12 @@ static int _stream_init_loop(struct stream_t *stream, struct workers_pool_t *poo
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int _stream_init(struct stream_t *stream, struct workers_pool_t *pool) {
|
static int _stream_init(struct stream_t *stream, struct workers_pool_t *pool) {
|
||||||
SEP_INFO('=');
|
|
||||||
|
|
||||||
_stream_destroy_workers(stream, pool);
|
_stream_destroy_workers(stream, pool);
|
||||||
device_switch_capturing(stream->dev, false);
|
device_switch_capturing(stream->dev, false);
|
||||||
device_close(stream->dev);
|
device_close(stream->dev);
|
||||||
|
|
||||||
|
SEP_INFO('=');
|
||||||
|
|
||||||
if (device_open(stream->dev) < 0) {
|
if (device_open(stream->dev) < 0) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user