mirror of
https://github.com/pikvm/ustreamer.git
synced 2026-02-27 20:26:31 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f96925181 | ||
|
|
74dc1dc146 | ||
|
|
6f8e8205b3 | ||
|
|
5f932d862b | ||
|
|
590a73f9ec |
@@ -1,7 +1,7 @@
|
|||||||
[bumpversion]
|
[bumpversion]
|
||||||
commit = True
|
commit = True
|
||||||
tag = True
|
tag = True
|
||||||
current_version = 6.14
|
current_version = 6.16
|
||||||
parse = (?P<major>\d+)\.(?P<minor>\d+)
|
parse = (?P<major>\d+)\.(?P<minor>\d+)
|
||||||
serialize =
|
serialize =
|
||||||
{major}.{minor}
|
{major}.{minor}
|
||||||
|
|||||||
@@ -50,13 +50,13 @@ char *us_rtpa_make_sdp(us_rtpa_s *rtpa) {
|
|||||||
"m=audio 1 RTP/SAVPF %u" RN
|
"m=audio 1 RTP/SAVPF %u" RN
|
||||||
"c=IN IP4 0.0.0.0" RN
|
"c=IN IP4 0.0.0.0" RN
|
||||||
"a=rtpmap:%u OPUS/48000/2" RN
|
"a=rtpmap:%u OPUS/48000/2" RN
|
||||||
// "a=fmtp:%u useinbandfec=1" RN
|
"a=fmtp:%u sprop-stereo=1" RN // useinbandfec=1
|
||||||
"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
|
||||||
"a=ssrc:%" PRIu32 " cname:ustreamer" RN
|
"a=ssrc:%" PRIu32 " cname:ustreamer" RN
|
||||||
"a=sendonly" RN,
|
"a=sendonly" RN,
|
||||||
pl, pl, pl, pl, pl, // pl,
|
pl, pl, pl, pl, pl, pl,
|
||||||
rtpa->rtp->ssrc
|
rtpa->rtp->ssrc
|
||||||
);
|
);
|
||||||
return sdp;
|
return sdp;
|
||||||
|
|||||||
@@ -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.14" "January 2021"
|
.TH USTREAMER-DUMP 1 "version 6.16" "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.14" "November 2020"
|
.TH USTREAMER 1 "version 6.16" "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
|
||||||
@@ -68,6 +68,9 @@ Desired FPS. Default: maximum possible.
|
|||||||
.BR \-z\ \fIN ", " \-\-min\-frame\-size\ \fIN
|
.BR \-z\ \fIN ", " \-\-min\-frame\-size\ \fIN
|
||||||
Drop frames smaller then this limit. Useful if the device produces small\-sized garbage frames. Default: 128 bytes.
|
Drop frames smaller then this limit. Useful if the device produces small\-sized garbage frames. Default: 128 bytes.
|
||||||
.TP
|
.TP
|
||||||
|
.BR \-T ", " \-\-allow\-truncated\-frames
|
||||||
|
Allows to handle truncated frames. Useful if the device produces incorrect but still acceptable frames. Default: disabled.
|
||||||
|
.TP
|
||||||
.BR \-n ", " \-\-persistent
|
.BR \-n ", " \-\-persistent
|
||||||
Suppress repetitive signal source errors. Default: disabled.
|
Suppress repetitive signal source errors. Default: disabled.
|
||||||
.TP
|
.TP
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
|
|
||||||
pkgname=ustreamer
|
pkgname=ustreamer
|
||||||
pkgver=6.14
|
pkgver=6.16
|
||||||
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"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=ustreamer
|
PKG_NAME:=ustreamer
|
||||||
PKG_VERSION:=6.14
|
PKG_VERSION:=6.16
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
PKG_MAINTAINER:=Maxim Devaev <mdevaev@gmail.com>
|
PKG_MAINTAINER:=Maxim Devaev <mdevaev@gmail.com>
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ def _find_sources(suffix: str) -> list[str]:
|
|||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
setup(
|
setup(
|
||||||
name="ustreamer",
|
name="ustreamer",
|
||||||
version="6.14",
|
version="6.16",
|
||||||
description="uStreamer tools",
|
description="uStreamer tools",
|
||||||
author="Maxim Devaev",
|
author="Maxim Devaev",
|
||||||
author_email="mdevaev@gmail.com",
|
author_email="mdevaev@gmail.com",
|
||||||
|
|||||||
@@ -544,8 +544,11 @@ bool _capture_is_buffer_valid(const us_capture_s *cap, const struct v4l2_buffer
|
|||||||
const u8 *const eoi_ptr = end_ptr - 2;
|
const u8 *const eoi_ptr = end_ptr - 2;
|
||||||
const u16 eoi_marker = (((u16)(eoi_ptr[0]) << 8) | eoi_ptr[1]);
|
const u16 eoi_marker = (((u16)(eoi_ptr[0]) << 8) | eoi_ptr[1]);
|
||||||
if (eoi_marker != 0xFFD9 && eoi_marker != 0xD900 && eoi_marker != 0x0000) {
|
if (eoi_marker != 0xFFD9 && eoi_marker != 0xD900 && eoi_marker != 0x0000) {
|
||||||
_LOG_DEBUG("Discarding truncated JPEG frame: eoi_marker=0x%04x, bytesused=%u", eoi_marker, buf->bytesused);
|
if (!cap->allow_truncated_frames) {
|
||||||
return false;
|
_LOG_DEBUG("Discarding truncated JPEG frame: eoi_marker=0x%04x, bytesused=%u", eoi_marker, buf->bytesused);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
_LOG_DEBUG("Got truncated JPEG frame: eoi_marker=0x%04x, bytesused=%u", eoi_marker, buf->bytesused);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -115,6 +115,7 @@ typedef struct {
|
|||||||
bool dma_required;
|
bool dma_required;
|
||||||
uint desired_fps;
|
uint desired_fps;
|
||||||
uz min_frame_size;
|
uz min_frame_size;
|
||||||
|
bool allow_truncated_frames;
|
||||||
bool persistent;
|
bool persistent;
|
||||||
uint timeout;
|
uint timeout;
|
||||||
us_controls_s ctl;
|
us_controls_s ctl;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#define US_VERSION_MAJOR 6
|
#define US_VERSION_MAJOR 6
|
||||||
#define US_VERSION_MINOR 14
|
#define US_VERSION_MINOR 16
|
||||||
|
|
||||||
#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)
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ enum _US_OPT_VALUES {
|
|||||||
_O_IO_METHOD = 'I',
|
_O_IO_METHOD = 'I',
|
||||||
_O_DESIRED_FPS = 'f',
|
_O_DESIRED_FPS = 'f',
|
||||||
_O_MIN_FRAME_SIZE = 'z',
|
_O_MIN_FRAME_SIZE = 'z',
|
||||||
|
_O_ALLOW_TRUNCATED_FRAMES = 'T',
|
||||||
_O_PERSISTENT = 'n',
|
_O_PERSISTENT = 'n',
|
||||||
_O_DV_TIMINGS = 't',
|
_O_DV_TIMINGS = 't',
|
||||||
_O_BUFFERS = 'b',
|
_O_BUFFERS = 'b',
|
||||||
@@ -142,6 +143,7 @@ static const struct option _LONG_OPTS[] = {
|
|||||||
{"io-method", required_argument, NULL, _O_IO_METHOD},
|
{"io-method", required_argument, NULL, _O_IO_METHOD},
|
||||||
{"desired-fps", required_argument, NULL, _O_DESIRED_FPS},
|
{"desired-fps", required_argument, NULL, _O_DESIRED_FPS},
|
||||||
{"min-frame-size", required_argument, NULL, _O_MIN_FRAME_SIZE},
|
{"min-frame-size", required_argument, NULL, _O_MIN_FRAME_SIZE},
|
||||||
|
{"allow-truncated-frames", no_argument, NULL, _O_ALLOW_TRUNCATED_FRAMES},
|
||||||
{"persistent", no_argument, NULL, _O_PERSISTENT},
|
{"persistent", no_argument, NULL, _O_PERSISTENT},
|
||||||
{"dv-timings", no_argument, NULL, _O_DV_TIMINGS},
|
{"dv-timings", no_argument, NULL, _O_DV_TIMINGS},
|
||||||
{"buffers", required_argument, NULL, _O_BUFFERS},
|
{"buffers", required_argument, NULL, _O_BUFFERS},
|
||||||
@@ -384,6 +386,7 @@ int options_parse(us_options_s *options, us_capture_s *cap, us_encoder_s *enc, u
|
|||||||
case _O_IO_METHOD: OPT_PARSE_ENUM("IO method", cap->io_method, us_capture_parse_io_method, US_IO_METHODS_STR);
|
case _O_IO_METHOD: OPT_PARSE_ENUM("IO method", cap->io_method, us_capture_parse_io_method, US_IO_METHODS_STR);
|
||||||
case _O_DESIRED_FPS: OPT_NUMBER("--desired-fps", cap->desired_fps, 0, US_VIDEO_MAX_FPS, 0);
|
case _O_DESIRED_FPS: OPT_NUMBER("--desired-fps", cap->desired_fps, 0, US_VIDEO_MAX_FPS, 0);
|
||||||
case _O_MIN_FRAME_SIZE: OPT_NUMBER("--min-frame-size", cap->min_frame_size, 1, 8192, 0);
|
case _O_MIN_FRAME_SIZE: OPT_NUMBER("--min-frame-size", cap->min_frame_size, 1, 8192, 0);
|
||||||
|
case _O_ALLOW_TRUNCATED_FRAMES: OPT_SET(cap->allow_truncated_frames, true);
|
||||||
case _O_PERSISTENT: OPT_SET(cap->persistent, true);
|
case _O_PERSISTENT: OPT_SET(cap->persistent, true);
|
||||||
case _O_DV_TIMINGS: OPT_SET(cap->dv_timings, true);
|
case _O_DV_TIMINGS: OPT_SET(cap->dv_timings, true);
|
||||||
case _O_BUFFERS: OPT_NUMBER("--buffers", cap->n_bufs, 1, 32, 0);
|
case _O_BUFFERS: OPT_NUMBER("--buffers", cap->n_bufs, 1, 32, 0);
|
||||||
@@ -632,6 +635,8 @@ static void _help(FILE *fp, const us_capture_s *cap, const us_encoder_s *enc, co
|
|||||||
SAY(" -f|--desired-fps <N> ──────────────── Desired FPS. Default: maximum possible.\n");
|
SAY(" -f|--desired-fps <N> ──────────────── Desired FPS. Default: maximum possible.\n");
|
||||||
SAY(" -z|--min-frame-size <N> ───────────── Drop frames smaller then this limit. Useful if the device");
|
SAY(" -z|--min-frame-size <N> ───────────── Drop frames smaller then this limit. Useful if the device");
|
||||||
SAY(" produces small-sized garbage frames. Default: %zu bytes.\n", cap->min_frame_size);
|
SAY(" produces small-sized garbage frames. Default: %zu bytes.\n", cap->min_frame_size);
|
||||||
|
SAY(" -T|--allow-truncated-frames ───────── Allows to handle truncated frames. Useful if the device");
|
||||||
|
SAY(" produces incorrect but still acceptable frames. Default: disabled.\n");
|
||||||
SAY(" -n|--persistent ───────────────────── Don't re-initialize device on timeout. Default: disabled.\n");
|
SAY(" -n|--persistent ───────────────────── Don't re-initialize device on timeout. Default: disabled.\n");
|
||||||
SAY(" -t|--dv-timings ───────────────────── Enable DV-timings querying and events processing");
|
SAY(" -t|--dv-timings ───────────────────── Enable DV-timings querying and events processing");
|
||||||
SAY(" to automatic resolution change. Default: disabled.\n");
|
SAY(" to automatic resolution change. Default: disabled.\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user