mirror of
https://github.com/pikvm/ustreamer.git
synced 2026-02-28 20:56:33 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
29c98e3908 | ||
|
|
acc8cecbe4 | ||
|
|
8c31af2f03 | ||
|
|
a727c9b7c5 | ||
|
|
eabc8d8343 | ||
|
|
4e4ae21a83 | ||
|
|
412a1775a6 |
@@ -1,7 +1,7 @@
|
|||||||
[bumpversion]
|
[bumpversion]
|
||||||
commit = True
|
commit = True
|
||||||
tag = True
|
tag = True
|
||||||
current_version = 6.19
|
current_version = 6.22
|
||||||
parse = (?P<major>\d+)\.(?P<minor>\d+)
|
parse = (?P<major>\d+)\.(?P<minor>\d+)
|
||||||
serialize =
|
serialize =
|
||||||
{major}.{minor}
|
{major}.{minor}
|
||||||
|
|||||||
@@ -458,8 +458,9 @@ static struct janus_plugin_result *_plugin_handle_message(
|
|||||||
PUSH_STATUS("stopped", NULL, NULL);
|
PUSH_STATUS("stopped", NULL, NULL);
|
||||||
|
|
||||||
} else if (!strcmp(request_str, "watch")) {
|
} else if (!strcmp(request_str, "watch")) {
|
||||||
bool with_audio = false;
|
|
||||||
uint video_orient = 0;
|
uint video_orient = 0;
|
||||||
|
bool with_audio = false;
|
||||||
|
bool with_mic = false;
|
||||||
{
|
{
|
||||||
json_t *const params = json_object_get(msg, "params");
|
json_t *const params = json_object_get(msg, "params");
|
||||||
if (params != NULL) {
|
if (params != NULL) {
|
||||||
@@ -469,6 +470,12 @@ static struct janus_plugin_result *_plugin_handle_message(
|
|||||||
with_audio = (_g_rtpa != NULL && json_boolean_value(obj));
|
with_audio = (_g_rtpa != NULL && json_boolean_value(obj));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
json_t *const obj = json_object_get(params, "microphone");
|
||||||
|
if (obj != NULL && json_is_boolean(obj)) {
|
||||||
|
with_mic = (with_audio && json_boolean_value(obj)); // FIXME: also check playback
|
||||||
|
}
|
||||||
|
}
|
||||||
{
|
{
|
||||||
json_t *const obj = json_object_get(params, "orientation");
|
json_t *const obj = json_object_get(params, "orientation");
|
||||||
if (obj != NULL && json_is_integer(obj)) {
|
if (obj != NULL && json_is_integer(obj)) {
|
||||||
@@ -485,7 +492,7 @@ static struct janus_plugin_result *_plugin_handle_message(
|
|||||||
{
|
{
|
||||||
char *sdp;
|
char *sdp;
|
||||||
char *const video_sdp = us_rtpv_make_sdp(_g_rtpv);
|
char *const video_sdp = us_rtpv_make_sdp(_g_rtpv);
|
||||||
char *const audio_sdp = (with_audio ? us_rtpa_make_sdp(_g_rtpa) : us_strdup(""));
|
char *const audio_sdp = (with_audio ? us_rtpa_make_sdp(_g_rtpa, with_mic) : us_strdup(""));
|
||||||
US_ASPRINTF(sdp,
|
US_ASPRINTF(sdp,
|
||||||
"v=0" RN
|
"v=0" RN
|
||||||
"o=- %" PRIu64 " 1 IN IP4 0.0.0.0" RN
|
"o=- %" PRIu64 " 1 IN IP4 0.0.0.0" RN
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ void us_rtpa_destroy(us_rtpa_s *rtpa) {
|
|||||||
free(rtpa);
|
free(rtpa);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *us_rtpa_make_sdp(us_rtpa_s *rtpa) {
|
char *us_rtpa_make_sdp(us_rtpa_s *rtpa, bool mic) {
|
||||||
const uint pl = rtpa->rtp->payload;
|
const uint pl = rtpa->rtp->payload;
|
||||||
char *sdp;
|
char *sdp;
|
||||||
US_ASPRINTF(sdp,
|
US_ASPRINTF(sdp,
|
||||||
@@ -55,9 +55,10 @@ char *us_rtpa_make_sdp(us_rtpa_s *rtpa) {
|
|||||||
"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=%s" RN,
|
||||||
pl, pl, pl, pl, pl, pl,
|
pl, pl, pl, pl, pl, pl,
|
||||||
rtpa->rtp->ssrc
|
rtpa->rtp->ssrc,
|
||||||
|
(mic ? "sendrecv" : "sendonly")
|
||||||
);
|
);
|
||||||
return sdp;
|
return sdp;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,5 +36,5 @@ typedef struct {
|
|||||||
us_rtpa_s *us_rtpa_init(us_rtp_callback_f callback);
|
us_rtpa_s *us_rtpa_init(us_rtp_callback_f callback);
|
||||||
void us_rtpa_destroy(us_rtpa_s *rtpa);
|
void us_rtpa_destroy(us_rtpa_s *rtpa);
|
||||||
|
|
||||||
char *us_rtpa_make_sdp(us_rtpa_s *rtpa);
|
char *us_rtpa_make_sdp(us_rtpa_s *rtpa, bool mic);
|
||||||
void us_rtpa_wrap(us_rtpa_s *rtpa, const u8 *data, uz size, u32 pts);
|
void us_rtpa_wrap(us_rtpa_s *rtpa, const u8 *data, uz size, u32 pts);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ envlist = cppcheck, flake8, pylint, mypy, vulture, htmlhint
|
|||||||
skipsdist = true
|
skipsdist = true
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
basepython = python3.12
|
basepython = python3.13
|
||||||
changedir = /src
|
changedir = /src
|
||||||
|
|
||||||
[testenv:cppcheck]
|
[testenv:cppcheck]
|
||||||
|
|||||||
@@ -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.19" "January 2021"
|
.TH USTREAMER-DUMP 1 "version 6.22" "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.19" "November 2020"
|
.TH USTREAMER 1 "version 6.22" "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.19
|
pkgver=6.22
|
||||||
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.19
|
PKG_VERSION:=6.22
|
||||||
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.19",
|
version="6.22",
|
||||||
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 19
|
#define US_VERSION_MINOR 22
|
||||||
|
|
||||||
#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)
|
||||||
|
|||||||
@@ -598,10 +598,10 @@ static void _stream_update_captured_fpsi(us_stream_s *stream, const us_frame_s *
|
|||||||
us_stream_runtime_s *const run = stream->run;
|
us_stream_runtime_s *const run = stream->run;
|
||||||
|
|
||||||
us_fpsi_meta_s meta = {0};
|
us_fpsi_meta_s meta = {0};
|
||||||
us_fpsi_frame_to_meta(run->blank->raw, &meta);
|
us_fpsi_frame_to_meta(frame, &meta);
|
||||||
us_fpsi_update(run->http->captured_fpsi, false, &meta);
|
us_fpsi_update(run->http->captured_fpsi, bump, &meta);
|
||||||
|
|
||||||
if (stream->notify_parent && !memcmp(&run->notify_meta, &meta, sizeof(us_fpsi_meta_s))) {
|
if (stream->notify_parent && memcmp(&run->notify_meta, &meta, sizeof(us_fpsi_meta_s))) {
|
||||||
memcpy(&run->notify_meta, &meta, sizeof(us_fpsi_meta_s));
|
memcpy(&run->notify_meta, &meta, sizeof(us_fpsi_meta_s));
|
||||||
us_process_notify_parent();
|
us_process_notify_parent();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user