diff --git a/src/encoders/hw/encoder.c b/src/encoders/hw/encoder.c index 445c047..57310c5 100644 --- a/src/encoders/hw/encoder.c +++ b/src/encoders/hw/encoder.c @@ -51,12 +51,12 @@ int hw_encoder_prepare(struct device_t *dev, unsigned quality) { MEMSET_ZERO(comp); if (xioctl(dev->run->fd, VIDIOC_G_JPEGCOMP, &comp) < 0) { - LOG_ERROR("Can't query HW encoder params and set quality (unsupported)"); + LOG_ERROR("Device does not support setting of HW encoding quality parameters"); return -1; } comp.quality = quality; if (xioctl(dev->run->fd, VIDIOC_S_JPEGCOMP, &comp) < 0) { - LOG_ERROR("Can't set HW encoder quality (unsupported)"); + LOG_ERROR("Unable to change MJPG quality for JPEG source with HW pass-through encoder"); return -1; } return 0; diff --git a/src/options.c b/src/options.c index 47b6c0d..a812005 100644 --- a/src/options.c +++ b/src/options.c @@ -466,13 +466,23 @@ static void _help(struct device_t *dev, struct encoder_t *encoder, struct http_s printf(" Default: %u (the number of CPU cores (but not more than 4) + 1).\n\n", dev->n_buffers); printf(" -w|--workers ──────────────────── The number of worker threads but not more than buffers.\n"); printf(" Default: %u (the number of CPU cores (but not more than 4)).\n\n", dev->n_workers); - printf(" -q|--quality ──────────────────── Set quality of JPEG encoding from 1 to 100 (best). Default: %u.\n\n", encoder->quality); - printf(" -c|--encoder ───────────────── Use specified encoder. It may affect the number of workers.\n\n"); + printf(" -q|--quality ──────────────────── Set quality of JPEG encoding from 1 to 100 (best). Default: %u.\n", encoder->quality); + printf(" Note: If HW encoding is used (JPEG source format selected),\n"); + printf(" this parameter attempts to configure the camera\n"); + printf(" or capture device hardware's internal encoder.\n"); + printf(" It does not re-encode MJPG to MJPG to change the quality level\n"); + printf(" for sources that already output MJPG.\n\n"); + printf(" -c|--encoder ───────────────── Use specified encoder. It may affect the number of workers.\n"); + printf(" Available:\n"); + printf(" * CPU ─ Software MJPG encoding (default);\n"); +# ifdef WITH_OMX + printf(" * OMX ─ GPU hardware accelerated MJPG encoding with OpenMax;\n"); +# endif + printf(" * HW ── Use pre-encoded MJPG frames directly from camera hardware.\n\n"); # ifdef WITH_OMX printf(" -g|--glitched-resolutions ─ Comma-separated list of resolutions that require forced\n"); + printf(" encoding on CPU instead of OMX. Default: disabled.\n\n"); # endif - printf(" encoding on CPU instead of OMX. Default: disabled.\n"); - printf(" Available: %s; default: CPU.\n\n", ENCODER_TYPES_STR); printf(" --device-timeout ────────── Timeout for device querying. Default: %u.\n\n", dev->timeout); printf(" --device-error-delay ────── Delay before trying to connect to the device again\n"); printf(" after an error (timeout for example). Default: %u.\n\n", dev->error_delay);