diff --git a/man/ustreamer.1 b/man/ustreamer.1 index a7364cd..cd51503 100644 --- a/man/ustreamer.1 +++ b/man/ustreamer.1 @@ -96,8 +96,6 @@ HW ─ Use pre-encoded MJPEG frames directly from camera hardware. M2M-VIDEO ─ GPU-accelerated MJPEG encoding. M2M-IMAGE ─ GPU-accelerated JPEG encoding. - -NOOP ─ Don't compress MJPEG stream (do nothing). .TP .BR \-g\ \fIWxH,... ", " \-\-glitched\-resolutions\ \fIWxH,... It doesn't do anything. Still here for compatibility. diff --git a/src/ustreamer/encoder.c b/src/ustreamer/encoder.c index 628dd75..a59c5b4 100644 --- a/src/ustreamer/encoder.c +++ b/src/ustreamer/encoder.c @@ -34,7 +34,7 @@ static const struct { {"M2M-MJPEG", US_ENCODER_TYPE_M2M_VIDEO}, {"M2M-JPEG", US_ENCODER_TYPE_M2M_IMAGE}, {"OMX", US_ENCODER_TYPE_M2M_IMAGE}, - {"NOOP", US_ENCODER_TYPE_NOOP}, + {"NOOP", US_ENCODER_TYPE_CPU}, }; @@ -129,10 +129,6 @@ void us_encoder_open(us_encoder_s *enc, us_capture_s *cap) { _ER(m2ms[_ER(n_m2ms)]) = us_m2m_jpeg_encoder_init(name, enc->m2m_path, quality); } } - - } else if (type == US_ENCODER_TYPE_NOOP) { - n_workers = 1; - quality = 0; } goto ok; @@ -142,9 +138,7 @@ void us_encoder_open(us_encoder_s *enc, us_capture_s *cap) { quality = cap->jpeg_quality; ok: - if (type == US_ENCODER_TYPE_NOOP) { - US_LOG_INFO("Using JPEG NOOP encoder"); - } else if (quality == 0) { + if (quality == 0) { US_LOG_INFO("Using JPEG quality: encoder default"); } else { US_LOG_INFO("Using JPEG quality: %u%%", quality); @@ -222,13 +216,6 @@ static bool _worker_run_job(us_worker_s *wr) { goto error; } - } else if (_ER(type) == US_ENCODER_TYPE_NOOP) { - US_LOG_VERBOSE("Compressing JPEG using NOOP (do nothing): worker=%s, buffer=%u", - wr->name, job->hw->buf.index); - us_frame_encoding_begin(src, dest, V4L2_PIX_FMT_JPEG); - usleep(5000); // Просто чтобы работала логика desired_fps - dest->encode_end_ts = us_get_now_monotonic(); // us_frame_encoding_end() - } else { assert(0 && "Unknown encoder type"); } diff --git a/src/ustreamer/encoder.h b/src/ustreamer/encoder.h index 288a7d7..21a810a 100644 --- a/src/ustreamer/encoder.h +++ b/src/ustreamer/encoder.h @@ -44,14 +44,13 @@ #include "encoders/hw/encoder.h" -#define ENCODER_TYPES_STR "CPU, HW, M2M-VIDEO, M2M-IMAGE, NOOP" +#define ENCODER_TYPES_STR "CPU, HW, M2M-VIDEO, M2M-IMAGE" typedef enum { US_ENCODER_TYPE_CPU, US_ENCODER_TYPE_HW, US_ENCODER_TYPE_M2M_VIDEO, US_ENCODER_TYPE_M2M_IMAGE, - US_ENCODER_TYPE_NOOP, } us_encoder_type_e; typedef struct { diff --git a/src/ustreamer/options.c b/src/ustreamer/options.c index fab2607..9d8be4f 100644 --- a/src/ustreamer/options.c +++ b/src/ustreamer/options.c @@ -651,8 +651,7 @@ static void _help(FILE *fp, const us_capture_s *cap, const us_encoder_s *enc, co SAY(" * CPU ──────── Software MJPEG encoding (default);"); SAY(" * HW ───────── Use pre-encoded MJPEG frames directly from camera hardware;"); SAY(" * M2M-VIDEO ── GPU-accelerated MJPEG encoding using V4L2 M2M video interface;"); - SAY(" * M2M-IMAGE ── GPU-accelerated JPEG encoding using V4L2 M2M image interface;"); - SAY(" * NOOP ─────── Don't compress MJPEG stream (do nothing).\n"); + SAY(" * M2M-IMAGE ── GPU-accelerated JPEG encoding using V4L2 M2M image interface.\n"); SAY(" -g|--glitched-resolutions ─ It doesn't do anything. Still here for compatibility.\n"); SAY(" -k|--blank ─────────────────── It doesn't do anything. Still here for compatibility.\n"); SAY(" -K|--last-as-blank ──────────── It doesn't do anything. Still here for compatibility.\n");