libcamera: PixelFormat: Make constructor explicit
To achieve the goal of preventing unwanted conversion between a DRM and a V4L2 FourCC, make the PixelFormat constructor that takes an integer value explicit. All users of pixel formats flagged by the compiler are fixed. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
parent
8c0bbcd3d3
commit
718f5e99a9
9 changed files with 60 additions and 60 deletions
|
@ -154,9 +154,9 @@ gst_libcamera_configure_stream_from_caps(StreamConfiguration &stream_cfg,
|
|||
if (gst_structure_has_name(s, "video/x-raw")) {
|
||||
const gchar *format = gst_structure_get_string(s, "format");
|
||||
gst_format = gst_video_format_from_string(format);
|
||||
stream_cfg.pixelFormat = gst_format_to_drm(gst_format);
|
||||
stream_cfg.pixelFormat = PixelFormat(gst_format_to_drm(gst_format));
|
||||
} else if (gst_structure_has_name(s, "image/jpeg")) {
|
||||
stream_cfg.pixelFormat = DRM_FORMAT_MJPEG;
|
||||
stream_cfg.pixelFormat = PixelFormat(DRM_FORMAT_MJPEG);
|
||||
} else {
|
||||
g_critical("Unsupported media type: %s", gst_structure_get_name(s));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue