summaryrefslogtreecommitdiff
path: root/src/gstreamer
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-02-28 02:38:18 +0100
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-03-18 18:02:40 +0100
commitf28ca209602a93a3b7176d86a6329ddb2a341293 (patch)
tree95da5dcb930ed59aa031e812bc1c8b8dcf92a479 /src/gstreamer
parent9a1e71b8a169930c3be06fb71ab01db67588d689 (diff)
libcamera: Use PixelFormat instead of unsigned int where appropriate
Use the PixelFormat instead of unsigned int where a pixel format is to be used. PixelFormat is defined as an unsigned int but is about to be turned into a class to add functionality. There is no functional change in this patch. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/gstreamer')
-rw-r--r--src/gstreamer/gstlibcamera-utils.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gstreamer/gstlibcamera-utils.cpp b/src/gstreamer/gstlibcamera-utils.cpp
index 44a993fa..3b3973bc 100644
--- a/src/gstreamer/gstlibcamera-utils.cpp
+++ b/src/gstreamer/gstlibcamera-utils.cpp
@@ -79,16 +79,16 @@ gst_libcamera_stream_formats_to_caps(const StreamFormats &formats)
{
GstCaps *caps = gst_caps_new_empty();
- for (unsigned int fourcc : formats.pixelformats()) {
- g_autoptr(GstStructure) bare_s = bare_structure_from_fourcc(fourcc);
+ for (PixelFormat pixelformat : formats.pixelformats()) {
+ g_autoptr(GstStructure) bare_s = bare_structure_from_fourcc(pixelformat);
if (!bare_s) {
GST_WARNING("Unsupported DRM format %" GST_FOURCC_FORMAT,
- GST_FOURCC_ARGS(fourcc));
+ GST_FOURCC_ARGS(pixelformat));
continue;
}
- for (const Size &size : formats.sizes(fourcc)) {
+ for (const Size &size : formats.sizes(pixelformat)) {
GstStructure *s = gst_structure_copy(bare_s);
gst_structure_set(s,
"width", G_TYPE_INT, size.width,
@@ -97,7 +97,7 @@ gst_libcamera_stream_formats_to_caps(const StreamFormats &formats)
gst_caps_append_structure(caps, s);
}
- const SizeRange &range = formats.range(fourcc);
+ const SizeRange &range = formats.range(pixelformat);
if (range.hStep && range.vStep) {
GstStructure *s = gst_structure_copy(bare_s);
GValue val = G_VALUE_INIT;