@@ -36,7 +36,7 @@
#include "libcamera/internal/v4l2_subdevice.h"
#include "libcamera/internal/v4l2_videodevice.h"
-#include "converter.h"
+#include "converter_gl.h"
namespace libcamera {
@@ -187,6 +187,7 @@ static const SimplePipelineInfo supportedDevices[] = {
{ "imx7-csi", { { "pxp", 1 } } },
{ "qcom-camss", {} },
{ "sun6i-csi", {} },
+ { "unicam", {} },
};
} /* namespace */
@@ -452,18 +453,16 @@ int SimpleCameraData::init()
SimplePipelineHandler *pipe = SimpleCameraData::pipe();
int ret;
- /* Open the converter, if any. */
- MediaDevice *converter = pipe->converter();
- if (converter) {
- converter_ = std::make_unique<SimpleConverter>(converter);
- if (!converter_->isValid()) {
- LOG(SimplePipeline, Warning)
- << "Failed to create converter, disabling format conversion";
- converter_.reset();
- } else {
- converter_->inputBufferReady.connect(this, &SimpleCameraData::converterInputDone);
- converter_->outputBufferReady.connect(this, &SimpleCameraData::converterOutputDone);
- }
+ /* Open the converter. */
+
+ converter_ = std::make_unique<SimpleConverter>();
+ if (!converter_->isValid()) {
+ LOG(SimplePipeline, Warning)
+ << "Failed to create converter, disabling format conversion";
+ converter_.reset();
+ } else {
+ converter_->inputBufferReady.connect(this, &SimpleCameraData::converterInputDone);
+ converter_->outputBufferReady.connect(this, &SimpleCameraData::converterOutputDone);
}
video_ = pipe->video(entities_.back().entity);
@@ -1281,7 +1280,7 @@ bool SimplePipelineHandler::match(DeviceEnumerator *enumerator)
DeviceMatch converterMatch(name);
converter_ = acquireMediaDevice(enumerator, converterMatch);
if (converter_) {
- numStreams = streams;
+ numStreams = 1;
break;
}
}
Includes converter_gl header file and add unicam to list of supported devices to run on RaspberryPi Removes parameterized constructor call for SimpleConverter, which passed Mediadevice converter Sets Number of streams to 1 when converter is in use Signed-off-by: Kunal Agarwal <kunalagarwal1072002@gmail.com> --- src/libcamera/pipeline/simple/simple.cpp | 27 ++++++++++++------------ 1 file changed, 13 insertions(+), 14 deletions(-)