@@ -48,6 +48,7 @@ public:
strideAndFrameSize(const PixelFormat &outputFormat, const Size &size) = 0;
virtual void process(uint32_t frame, FrameBuffer *input, FrameBuffer *output, DebayerParams params) = 0;
+ virtual void stop() = 0;
virtual SizeRange sizes(PixelFormat inputFormat, const Size &inputSize) = 0;
@@ -38,6 +38,7 @@ public:
std::tuple<unsigned int, unsigned int>
strideAndFrameSize(const PixelFormat &outputFormat, const Size &size);
void process(uint32_t frame, FrameBuffer *input, FrameBuffer *output, DebayerParams params);
+ void stop() {}
SizeRange sizes(PixelFormat inputFormat, const Size &inputSize);
/**
@@ -366,6 +366,9 @@ int SoftwareIsp::start()
*/
void SoftwareIsp::stop()
{
+ debayer_->invokeMethod(&Debayer::stop,
+ ConnectionTypeQueued);
+
ispWorkerThread_.exit();
ispWorkerThread_.wait();
The eGL class wants to be able to teardown its sync_ data member properly but, doing so in the destructor means we can't make the eGL context current and thus can't tear down the sync primitive properly. Introduce a stop() method to the debayer class which triggers from the softisp's stop method, allowing a controlled and appropriate tear-down of debayer-egl and egl class related data well before the destructors get invoked. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> --- src/libcamera/software_isp/debayer.h | 1 + src/libcamera/software_isp/debayer_cpu.h | 1 + src/libcamera/software_isp/software_isp.cpp | 3 +++ 3 files changed, 5 insertions(+)