android: capabilties: Rationalize get[YUV|Raw]Resolution names
The getYUVResolutions() and getRawResolutions() functions are called from the initializeStreamConfigurations() function, which is called by initialize(). Rationalize the function naming scheme by renaming the two functions to initializeYUVResolutions() and initializeRawResolution(). Cosmetic change only. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
e1d43481b9
commit
18d61deb3c
2 changed files with 11 additions and 9 deletions
|
@ -138,8 +138,9 @@ int CameraCapabilities::initialize(std::shared_ptr<libcamera::Camera> camera,
|
|||
return initializeStaticMetadata();
|
||||
}
|
||||
|
||||
std::vector<Size> CameraCapabilities::getYUVResolutions(const PixelFormat &pixelFormat,
|
||||
const std::vector<Size> &resolutions)
|
||||
std::vector<Size>
|
||||
CameraCapabilities::initializeYUVResolutions(const PixelFormat &pixelFormat,
|
||||
const std::vector<Size> &resolutions)
|
||||
{
|
||||
std::vector<Size> supportedResolutions;
|
||||
std::unique_ptr<CameraConfiguration> cameraConfig =
|
||||
|
@ -164,7 +165,8 @@ std::vector<Size> CameraCapabilities::getYUVResolutions(const PixelFormat &pixel
|
|||
return supportedResolutions;
|
||||
}
|
||||
|
||||
std::vector<Size> CameraCapabilities::getRawResolutions(const libcamera::PixelFormat &pixelFormat)
|
||||
std::vector<Size>
|
||||
CameraCapabilities::initializeRawResolutions(const libcamera::PixelFormat &pixelFormat)
|
||||
{
|
||||
std::unique_ptr<CameraConfiguration> cameraConfig =
|
||||
camera_->generateConfiguration({ StreamRole::Raw });
|
||||
|
@ -323,10 +325,10 @@ int CameraCapabilities::initializeStreamConfigurations()
|
|||
std::vector<Size> resolutions;
|
||||
const PixelFormatInfo &info = PixelFormatInfo::info(mappedFormat);
|
||||
if (info.colourEncoding == PixelFormatInfo::ColourEncodingRAW)
|
||||
resolutions = getRawResolutions(mappedFormat);
|
||||
resolutions = initializeRawResolutions(mappedFormat);
|
||||
else
|
||||
resolutions = getYUVResolutions(mappedFormat,
|
||||
cameraResolutions);
|
||||
resolutions = initializeYUVResolutions(mappedFormat,
|
||||
cameraResolutions);
|
||||
|
||||
for (const Size &res : resolutions) {
|
||||
streamConfigurations_.push_back({ res, androidFormat });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue