libcamera: Add debug printouts
Add a few debug printouts that help follow the library intialization process: what pipeline handlers are registered, what media devices are created, and which pipeline manager gets matches with the current system. The resulting output is the following, on IPU3 devices: DBG pipeline_handler.cpp:119 Pipeline handler: "PipeHandlerVimc" registered DBG pipeline_handler.cpp:119 Pipeline handler: "PipelineHandlerIPU3" registered DBG device_enumerator.cpp:214 New media device: ipu3-imgu created from: /dev/media0 DBG device_enumerator.cpp:214 New media device: ipu3-cio2 created from: /dev/media1 DBG device_enumerator.cpp:255 Succesfull match for media device: ipu3-cio2 DBG device_enumerator.cpp:255 Succesfull match for media device: ipu3-imgu DBG pipeline_handler.cpp:150 Pipeline handler: "PipelineHandlerIPU3" matched Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
parent
bced32d514
commit
fd0339da1a
2 changed files with 11 additions and 2 deletions
|
@ -211,6 +211,9 @@ int DeviceEnumerator::addDevice(const std::string &devnode)
|
|||
return ret;
|
||||
}
|
||||
|
||||
LOG(Debug) << "New media device \"" << media->driver()
|
||||
<< "\" created from " << devnode;
|
||||
|
||||
/* Associate entities to device node paths. */
|
||||
for (MediaEntity *entity : media->entities()) {
|
||||
if (entity->deviceMajor() == 0 && entity->deviceMinor() == 0)
|
||||
|
@ -248,8 +251,11 @@ MediaDevice *DeviceEnumerator::search(const DeviceMatch &dm) const
|
|||
if (dev->busy())
|
||||
continue;
|
||||
|
||||
if (dm.match(dev))
|
||||
if (dm.match(dev)) {
|
||||
LOG(Debug) << "Successful match for media device "
|
||||
<< dev->driver();
|
||||
return dev;
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
|
|
|
@ -116,6 +116,7 @@ void PipelineHandlerFactory::registerType(const std::string &name,
|
|||
return;
|
||||
}
|
||||
|
||||
LOG(Debug) << "Registered pipeline handler: \"" << name << "\"";
|
||||
factories[name] = factory;
|
||||
}
|
||||
|
||||
|
@ -145,8 +146,10 @@ PipelineHandler *PipelineHandlerFactory::create(const std::string &name,
|
|||
|
||||
PipelineHandler *pipe = it->second->create();
|
||||
|
||||
if (pipe->match(enumerator))
|
||||
if (pipe->match(enumerator)) {
|
||||
LOG(Debug) << "Pipeline handler \"" << name << "\" matched";
|
||||
return pipe;
|
||||
}
|
||||
|
||||
delete pipe;
|
||||
return nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue