@@ -276,7 +276,7 @@ std::optional<int> CameraSensorRaw::init()
}
/* Identify the stream type based on the supported formats. */
- V4L2Subdevice::Formats formats = subdev_->formats(route.source);
+ V4L2Subdevice::Formats formats = subdev_->formats(route.sink);
std::optional<MediaBusFormatInfo::Type> type;
@@ -291,7 +291,7 @@ std::optional<int> CameraSensorRaw::init()
if (!type) {
LOG(CameraSensor, Warning)
- << "No known format on pad " << route.source;
+ << "No known format on pad " << route.sink;
continue;
}
The sensor may enumerate multiple formats when queried for a source pad/stream, as it can pad or sometimes truncate the data before putting it on the bus. But it is guaranteed to enumerate a single format (native size) on the internal pad. Use that to figure out the identify the type of a stream, as it is cleaner. Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com> --- src/libcamera/sensor/camera_sensor_raw.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)