mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-17 09:25:07 +03:00
v4l2: v4l2_camera_proxy: Set the compressed flag in enum_fmt
Set the compressed flag in ENUM_FMT if the format is MJPEG. As the only compressed format that libcamera currently supports is MJPEG, this should be sufficient. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
This commit is contained in:
parent
69cffe7012
commit
4e3d152d1e
1 changed files with 1 additions and 2 deletions
|
@ -276,8 +276,7 @@ int V4L2CameraProxy::vidioc_enum_fmt(V4L2CameraFile *file, struct v4l2_fmtdesc *
|
|||
PixelFormat format = streamConfig_.formats().pixelformats()[arg->index];
|
||||
V4L2PixelFormat v4l2Format = V4L2PixelFormat::fromPixelFormat(format);
|
||||
|
||||
/* \todo Set V4L2_FMT_FLAG_COMPRESSED for compressed formats. */
|
||||
arg->flags = 0;
|
||||
arg->flags = format == formats::MJPEG ? V4L2_FMT_FLAG_COMPRESSED : 0;
|
||||
utils::strlcpy(reinterpret_cast<char *>(arg->description),
|
||||
v4l2Format.description(), sizeof(arg->description));
|
||||
arg->pixelformat = v4l2Format;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue