[libcamera-devel,v5,1/2] libcamera: pipeline: Accept a camera having no MediaDevice
diff mbox series

Message ID 20230407102050.17537-2-harveyycyang@gmail.com
State New
Headers show
Series
  • Virtual Pipeline Handler
Related show

Commit Message

Cheng-Hao Yang April 7, 2023, 10:20 a.m. UTC
From: Harvey Yang <chenghaoyang@chromium.org>

The Fatal check of having at least one MediaDevice was to prevent
pipeline handler implementations searching and owning media devices with
custom conventions, instead of using the base function
|acquireMediaDevice|. It also has the assumption that there's at least
one media device to make a camera work.

Now that the assumption will be broken by the virtual pipeline handler
added in the following patches, and developers should be aware of the
available functions in the base class to handle media devices, the Fatal
check is no longer needed.

Signed-off-by: Harvey Yang <chenghaoyang@chromium.org>
---
 src/libcamera/pipeline_handler.cpp | 4 ----
 1 file changed, 4 deletions(-)

Patch
diff mbox series

diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp
index f72613b8..21979ea5 100644
--- a/src/libcamera/pipeline_handler.cpp
+++ b/src/libcamera/pipeline_handler.cpp
@@ -604,10 +604,6 @@  void PipelineHandler::registerCamera(std::shared_ptr<Camera> camera)
 {
 	cameras_.push_back(camera);
 
-	if (mediaDevices_.empty())
-		LOG(Pipeline, Fatal)
-			<< "Registering camera with no media devices!";
-
 	/*
 	 * Walk the entity list and map the devnums of all capture video nodes
 	 * to the camera.