Compare commits

...

5 Commits
v5.9 ... v5.12

Author SHA1 Message Date
Maxim Devaev
fdf3340a7d Bump version: 5.11 → 5.12 2022-07-05 00:50:48 +03:00
Maxim Devaev
02513be220 don't assert if m2m encoder is not successfully prepared 2022-07-05 00:48:22 +03:00
Maxim Devaev
d29ce42f08 Bump version: 5.10 → 5.11 2022-06-28 23:12:59 +03:00
Maxim Devaev
aa6fc7fe04 Bump version: 5.9 → 5.10 2022-06-28 23:03:46 +03:00
Maxim Devaev
c91341a375 fixed missing frame_encoding_begin() for noop encoder 2022-06-28 18:51:30 +03:00
9 changed files with 16 additions and 15 deletions

View File

@@ -1,7 +1,7 @@
[bumpversion] [bumpversion]
commit = True commit = True
tag = True tag = True
current_version = 5.9 current_version = 5.12
parse = (?P<major>\d+)\.(?P<minor>\d+) parse = (?P<major>\d+)\.(?P<minor>\d+)
serialize = serialize =
{major}.{minor} {major}.{minor}

View File

@@ -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 5.9" "January 2021" .TH USTREAMER-DUMP 1 "version 5.12" "January 2021"
.SH NAME .SH NAME
ustreamer-dump \- Dump uStreamer's memory sink to file ustreamer-dump \- Dump uStreamer's memory sink to file

View 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 5.9" "November 2020" .TH USTREAMER 1 "version 5.12" "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

View File

@@ -3,7 +3,7 @@
pkgname=ustreamer pkgname=ustreamer
pkgver=5.9 pkgver=5.12
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"

View File

@@ -6,7 +6,7 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=ustreamer PKG_NAME:=ustreamer
PKG_VERSION:=5.9 PKG_VERSION:=5.12
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_MAINTAINER:=Maxim Devaev <mdevaev@gmail.com> PKG_MAINTAINER:=Maxim Devaev <mdevaev@gmail.com>

View File

@@ -19,7 +19,7 @@ def _find_sources(suffix: str) -> List[str]:
if __name__ == "__main__": if __name__ == "__main__":
setup( setup(
name="ustreamer", name="ustreamer",
version="5.9", version="5.12",
description="uStreamer tools", description="uStreamer tools",
author="Maxim Devaev", author="Maxim Devaev",
author_email="mdevaev@gmail.com", author_email="mdevaev@gmail.com",

View File

@@ -23,7 +23,7 @@
#pragma once #pragma once
#define VERSION_MAJOR 5 #define VERSION_MAJOR 5
#define VERSION_MINOR 9 #define VERSION_MINOR 12
#define MAKE_VERSION2(_major, _minor) #_major "." #_minor #define MAKE_VERSION2(_major, _minor) #_major "." #_minor
#define MAKE_VERSION1(_major, _minor) MAKE_VERSION2(_major, _minor) #define MAKE_VERSION1(_major, _minor) MAKE_VERSION2(_major, _minor)

View File

@@ -224,8 +224,9 @@ static bool _worker_run_job(worker_s *wr) {
} else if (ER(type) == ENCODER_TYPE_NOOP) { } else if (ER(type) == ENCODER_TYPE_NOOP) {
LOG_VERBOSE("Compressing JPEG using NOOP (do nothing): worker=%s, buffer=%u", LOG_VERBOSE("Compressing JPEG using NOOP (do nothing): worker=%s, buffer=%u",
wr->name, job->hw->buf.index); wr->name, job->hw->buf.index);
frame_encoding_begin(src, dest, V4L2_PIX_FMT_JPEG);
usleep(5000); // Просто чтобы работала логика desired_fps usleep(5000); // Просто чтобы работала логика desired_fps
dest->encode_end_ts = get_now_monotonic(); dest->encode_end_ts = get_now_monotonic(); // frame_encoding_end()
} }
LOG_VERBOSE("Compressed new JPEG: size=%zu, time=%0.3Lf, worker=%s, buffer=%u", LOG_VERBOSE("Compressed new JPEG: size=%zu, time=%0.3Lf, worker=%s, buffer=%u",

View File

@@ -27,7 +27,7 @@ static m2m_encoder_s *_m2m_encoder_init(
const char *name, const char *path, unsigned output_format, const char *name, const char *path, unsigned output_format,
unsigned fps, bool allow_dma, m2m_option_s *options); unsigned fps, bool allow_dma, m2m_option_s *options);
static int _m2m_encoder_prepare(m2m_encoder_s *enc, const frame_s *frame); static void _m2m_encoder_prepare(m2m_encoder_s *enc, const frame_s *frame);
static int _m2m_encoder_init_buffers( static int _m2m_encoder_init_buffers(
m2m_encoder_s *enc, const char *name, enum v4l2_buf_type type, m2m_encoder_s *enc, const char *name, enum v4l2_buf_type type,
@@ -117,9 +117,10 @@ int m2m_encoder_compress(m2m_encoder_s *enc, const frame_s *src, frame_s *dest,
|| RUN(stride) != src->stride || RUN(stride) != src->stride
|| RUN(dma) != (enc->allow_dma && src->dma_fd >= 0) || RUN(dma) != (enc->allow_dma && src->dma_fd >= 0)
) { ) {
if (_m2m_encoder_prepare(enc, src) < 0) { _m2m_encoder_prepare(enc, src);
return -1; }
} if (!RUN(ready)) { // Already prepared but failed
return -1;
} }
force_key = (enc->output_format == V4L2_PIX_FMT_H264 && (force_key || RUN(last_online) != src->online)); force_key = (enc->output_format == V4L2_PIX_FMT_H264 && (force_key || RUN(last_online) != src->online));
@@ -179,7 +180,7 @@ static m2m_encoder_s *_m2m_encoder_init(
} \ } \
} }
static int _m2m_encoder_prepare(m2m_encoder_s *enc, const frame_s *frame) { static void _m2m_encoder_prepare(m2m_encoder_s *enc, const frame_s *frame) {
bool dma = (enc->allow_dma && frame->dma_fd >= 0); bool dma = (enc->allow_dma && frame->dma_fd >= 0);
E_LOG_INFO("Configuring encoder: DMA=%d ...", dma); E_LOG_INFO("Configuring encoder: DMA=%d ...", dma);
@@ -273,12 +274,11 @@ static int _m2m_encoder_prepare(m2m_encoder_s *enc, const frame_s *frame) {
RUN(ready) = true; RUN(ready) = true;
E_LOG_DEBUG("Encoder state: *** READY ***"); E_LOG_DEBUG("Encoder state: *** READY ***");
return 0; return;
error: error:
_m2m_encoder_cleanup(enc); _m2m_encoder_cleanup(enc);
E_LOG_ERROR("Encoder destroyed due an error (prepare)"); E_LOG_ERROR("Encoder destroyed due an error (prepare)");
return -1;
} }
static int _m2m_encoder_init_buffers( static int _m2m_encoder_init_buffers(