summaryrefslogtreecommitdiff
path: root/src/libcamera/converter.cpp
AgeCommit message (Collapse)Author
2023-10-06libcamera: converter: drop unnecessary #include directiveAndrey Konovalov
libcamera/internal/media_device.h includes linux/media.h already. Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org> Suggested-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2023-10-06libcamera: converter: A few fixes to ConverterFactoryBase documentationAndrey Konovalov
The description of ConverterFactoryBase::registerType() referred to a converter factory as "converter class" and "converter". Fix that. Also make the descriptions of ConverterFactoryBase::compatibles() and ConverterFactoryBase::create() a bit more specific. Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2023-03-09libcamera: converter: Check converter validitySuhrid Subramaniam
The ConverterFactoryBase::create() function returns a nullptr when no converter is found. The only caller, SimpleCameraData::init(), checks if the converter is valid with isValid(), but doesn't check if the pointer is null, which can lead to a crash. We could check both pointer validity and converter validity in the caller, but to limit the complexity in callers, it is better to check the converter validity in the create() function and return a null pointer when no valid converter is found. Signed-off-by: Suhrid Subramaniam <suhrid.subramaniam@mediatek.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2022-12-14libcamera: Declare generic converter interfaceXavier Roumegue
Declare a converter Abstract Base Class intended to provide generic interfaces to hardware offering size and format conversion services on streams. This is mainly based on the public interfaces of the current converter class implementation found in the simple pipeline handler. The main change is the introduction of loadConfiguration() function which can be used by the concrete implementation to load hardware specific runtime parameters defined by the application. Signed-off-by: Xavier Roumegue <xavier.roumegue@oss.nxp.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>