mirror of
https://github.com/pikvm/ustreamer.git
synced 2026-11-09 06:24:15 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
23dd2f9e66 | ||
|
|
fdfd4225d0 | ||
|
|
9424b655eb | ||
|
|
f94fe25845 | ||
|
|
bdcbaae8b3 | ||
|
|
52a2326426 | ||
|
|
fa15d9693f |
@@ -1,7 +1,7 @@
|
|||||||
[bumpversion]
|
[bumpversion]
|
||||||
commit = True
|
commit = True
|
||||||
tag = True
|
tag = True
|
||||||
current_version = 6.55
|
current_version = 6.56
|
||||||
parse = (?P<major>\d+)\.(?P<minor>\d+)
|
parse = (?P<major>\d+)\.(?P<minor>\d+)
|
||||||
serialize =
|
serialize =
|
||||||
{major}.{minor}
|
{major}.{minor}
|
||||||
|
|||||||
@@ -719,11 +719,15 @@ static void _plugin_incoming_rtp(janus_plugin_session *session, janus_plugin_rtp
|
|||||||
|
|
||||||
static void _plugin_incoming_rtcp(janus_plugin_session *session, janus_plugin_rtcp *packet) {
|
static void _plugin_incoming_rtcp(janus_plugin_session *session, janus_plugin_rtcp *packet) {
|
||||||
_IF_DISABLED({ return; });
|
_IF_DISABLED({ return; });
|
||||||
if (session == NULL || packet == NULL || !packet->video) {
|
if (session == NULL || packet == NULL /*|| !packet->video*/) {
|
||||||
|
// FIXME: Since Chromium 147 we can't distinguish video/audio packets
|
||||||
|
// so we just disable !package->video condition for now.
|
||||||
return; // Accept only valid video
|
return; // Accept only valid video
|
||||||
}
|
}
|
||||||
if (janus_rtcp_has_pli(packet->buffer, packet->length)) {
|
if (
|
||||||
// US_JLOG_INFO("main", "Got video PLI");
|
janus_rtcp_has_pli(packet->buffer, packet->length)
|
||||||
|
|| janus_rtcp_has_fir(packet->buffer, packet->length)
|
||||||
|
) {
|
||||||
atomic_store(&_g_key_required, true);
|
atomic_store(&_g_key_required, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,13 +27,13 @@
|
|||||||
|
|
||||||
// Max RTP size for WebRTC is 1200 bytes:
|
// Max RTP size for WebRTC is 1200 bytes:
|
||||||
// - https://stackoverflow.com/questions/47635545/why-webrtc-chose-rtp-max-packet-size-to-1200-bytes
|
// - https://stackoverflow.com/questions/47635545/why-webrtc-chose-rtp-max-packet-size-to-1200-bytes
|
||||||
// But(!) Tailscale has 1200 MTU. So to fit it required to substract:
|
// But(!) Tailscale has 1280 MTU. So to fit it required to subtract:
|
||||||
// 1. possible RTP extensions (see sdp.c)
|
// 1. possible RTP extensions (see sdp.c)
|
||||||
// 2. additional SRTP fields (>= 10 bytes)
|
// 2. additional SRTP fields (>= 10 bytes)
|
||||||
// 3. UDP header (8 bytes)
|
// 3. UDP header (8 bytes)
|
||||||
// 4. IPv6 header (40 bytes)
|
// 4. IPv6 header (40 bytes)
|
||||||
// Finally it looks like 100 bytes for all above should be enough
|
// Finally it looks like below value should be good enought for all cases
|
||||||
#define US_RTP_TOTAL_SIZE (1200 - 100)
|
#define US_RTP_TOTAL_SIZE 1150
|
||||||
#define US_RTP_HEADER_SIZE 12
|
#define US_RTP_HEADER_SIZE 12
|
||||||
#define US_RTP_PAYLOAD_SIZE (US_RTP_TOTAL_SIZE - US_RTP_HEADER_SIZE)
|
#define US_RTP_PAYLOAD_SIZE (US_RTP_TOTAL_SIZE - US_RTP_HEADER_SIZE)
|
||||||
|
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ char *us_sdp_create(us_rtpv_s *rtpv, us_rtpa_s *rtpa, bool mic) {
|
|||||||
"c=IN IP4 0.0.0.0" RN
|
"c=IN IP4 0.0.0.0" RN
|
||||||
"a=rtpmap:%u H264/90000" RN
|
"a=rtpmap:%u H264/90000" RN
|
||||||
"a=fmtp:%u profile-level-id=42E01F;packetization-mode=1" RN
|
"a=fmtp:%u profile-level-id=42E01F;packetization-mode=1" RN
|
||||||
|
"a=rtcp-fb:%u ccm fir" RN
|
||||||
"a=rtcp-fb:%u nack" RN
|
"a=rtcp-fb:%u nack" RN
|
||||||
"a=rtcp-fb:%u nack pli" RN
|
"a=rtcp-fb:%u nack pli" RN
|
||||||
"a=rtcp-fb:%u goog-remb" RN
|
"a=rtcp-fb:%u goog-remb" RN
|
||||||
@@ -56,7 +57,7 @@ char *us_sdp_create(us_rtpv_s *rtpv, us_rtpa_s *rtpa, bool mic) {
|
|||||||
"a=extmap:2/sendonly http://www.webrtc.org/experiments/rtp-hdrext/playout-delay" RN
|
"a=extmap:2/sendonly http://www.webrtc.org/experiments/rtp-hdrext/playout-delay" RN
|
||||||
"a=extmap:3/sendonly http://www.webrtc.org/experiments/rtp-hdrext/abs-capture-time" RN
|
"a=extmap:3/sendonly http://www.webrtc.org/experiments/rtp-hdrext/abs-capture-time" RN
|
||||||
"a=sendonly" RN,
|
"a=sendonly" RN,
|
||||||
pl, pl, pl, pl, pl, pl,
|
pl, pl, pl, pl, pl, pl, pl,
|
||||||
rtpv->rtp->ssrc);
|
rtpv->rtp->ssrc);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,16 +72,13 @@ char *us_sdp_create(us_rtpv_s *rtpv, us_rtpa_s *rtpa, bool mic) {
|
|||||||
"c=IN IP4 0.0.0.0" RN
|
"c=IN IP4 0.0.0.0" RN
|
||||||
"a=rtpmap:%u OPUS/%u/%u" RN
|
"a=rtpmap:%u OPUS/%u/%u" RN
|
||||||
"a=fmtp:%u sprop-stereo=1" RN // useinbandfec=1
|
"a=fmtp:%u sprop-stereo=1" RN // useinbandfec=1
|
||||||
"a=rtcp-fb:%u nack" RN
|
|
||||||
"a=rtcp-fb:%u nack pli" RN
|
|
||||||
"a=rtcp-fb:%u goog-remb" RN
|
|
||||||
"a=mid:a" RN
|
"a=mid:a" RN
|
||||||
"a=msid:audio a" RN
|
"a=msid:audio a" RN
|
||||||
"a=ssrc:%" PRIu32 " cname:ustreamer" RN
|
"a=ssrc:%" PRIu32 " cname:ustreamer" RN
|
||||||
"a=%s" RN,
|
"a=%s" RN,
|
||||||
pl, pl,
|
pl, pl,
|
||||||
US_RTP_OPUS_HZ, US_RTP_OPUS_CH,
|
US_RTP_OPUS_HZ, US_RTP_OPUS_CH,
|
||||||
pl, pl, pl, pl,
|
pl,
|
||||||
rtpa->rtp->ssrc,
|
rtpa->rtp->ssrc,
|
||||||
(mic ? "sendrecv" : "sendonly"));
|
(mic ? "sendrecv" : "sendonly"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ deps =
|
|||||||
|
|
||||||
[testenv:mypy]
|
[testenv:mypy]
|
||||||
allowlist_externals = bash
|
allowlist_externals = bash
|
||||||
commands = bash -c 'mypy --config-file=linters/mypy.ini tools/*.py python/*.py'
|
commands = bash -c 'mypy --config-file=linters/mypy.ini --cache-dir=/dev/null tools/*.py python/*.py'
|
||||||
deps =
|
deps =
|
||||||
mypy
|
mypy
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.\" Manpage for ustreamer-dump.
|
.\" Manpage for ustreamer-dump.
|
||||||
.\" Open an issue or pull request to https://github.com/pikvm/ustreamer to correct errors or typos
|
.\" Open an issue or pull request to https://github.com/pikvm/ustreamer to correct errors or typos
|
||||||
.TH USTREAMER-DUMP 1 "version 6.55" "January 2021"
|
.TH USTREAMER-DUMP 1 "version 6.56" "January 2021"
|
||||||
|
|
||||||
.SH NAME
|
.SH NAME
|
||||||
ustreamer-dump \- Dump uStreamer's memory sink to file
|
ustreamer-dump \- Dump uStreamer's memory sink to file
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.\" Manpage for ustreamer.
|
.\" Manpage for ustreamer.
|
||||||
.\" Open an issue or pull request to https://github.com/pikvm/ustreamer to correct errors or typos
|
.\" Open an issue or pull request to https://github.com/pikvm/ustreamer to correct errors or typos
|
||||||
.TH USTREAMER 1 "version 6.55" "November 2020"
|
.TH USTREAMER 1 "version 6.56" "November 2020"
|
||||||
|
|
||||||
.SH NAME
|
.SH NAME
|
||||||
ustreamer \- stream MJPEG video from any V4L2 device to the network
|
ustreamer \- stream MJPEG video from any V4L2 device to the network
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
|
|
||||||
pkgname=ustreamer
|
pkgname=ustreamer
|
||||||
pkgver=6.55
|
pkgver=6.56
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Lightweight and fast MJPEG-HTTP streamer"
|
pkgdesc="Lightweight and fast MJPEG-HTTP streamer"
|
||||||
url="https://github.com/pikvm/ustreamer"
|
url="https://github.com/pikvm/ustreamer"
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=ustreamer
|
PKG_NAME:=ustreamer
|
||||||
PKG_VERSION:=6.55
|
PKG_VERSION:=6.56
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
PKG_MAINTAINER:=Maxim Devaev <mdevaev@gmail.com>
|
PKG_MAINTAINER:=Maxim Devaev <mdevaev@gmail.com>
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ def main() -> None:
|
|||||||
flags = _find_flags()
|
flags = _find_flags()
|
||||||
setup(
|
setup(
|
||||||
name="ustreamer",
|
name="ustreamer",
|
||||||
version="6.55",
|
version="6.56",
|
||||||
description="uStreamer tools",
|
description="uStreamer tools",
|
||||||
author="Maxim Devaev",
|
author="Maxim Devaev",
|
||||||
author_email="mdevaev@gmail.com",
|
author_email="mdevaev@gmail.com",
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#define US_VERSION_MAJOR 6
|
#define US_VERSION_MAJOR 6
|
||||||
#define US_VERSION_MINOR 55
|
#define US_VERSION_MINOR 56
|
||||||
|
|
||||||
#define US_MAKE_VERSION2(_major, _minor) #_major "." #_minor
|
#define US_MAKE_VERSION2(_major, _minor) #_major "." #_minor
|
||||||
#define US_MAKE_VERSION1(_major, _minor) US_MAKE_VERSION2(_major, _minor)
|
#define US_MAKE_VERSION1(_major, _minor) US_MAKE_VERSION2(_major, _minor)
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ uz us_memsink_calculate_size(const char *obj) {
|
|||||||
} else if (!strcasecmp(ptr, "h264")) {
|
} else if (!strcasecmp(ptr, "h264")) {
|
||||||
return 2 * 1024 * 1024;
|
return 2 * 1024 * 1024;
|
||||||
} else if (!strcasecmp(ptr, "raw")) {
|
} else if (!strcasecmp(ptr, "raw")) {
|
||||||
return 1920 * 1200 * 3; // RGB
|
return 3840 * 2160 * 3; // RGB
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#define US_MEMSINK_MAGIC ((u64)0xCAFEBABECAFEBABE)
|
#define US_MEMSINK_MAGIC ((u64)0xCAFEBABECAFEBABE)
|
||||||
#define US_MEMSINK_VERSION ((u32)7)
|
#define US_MEMSINK_VERSION ((u32)8)
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user