libcamera: PixelFormat: Mark all function arguments of type PixelFormat as const reference
PixelFormat was previously an alias for unsigned int but is now a class. Make all functions taking PixelFormat do so as a const reference. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
718f5e99a9
commit
aaf1ce50f9
12 changed files with 20 additions and 18 deletions
|
@ -88,7 +88,7 @@ void V4L2Camera::requestComplete(Request *request)
|
|||
}
|
||||
|
||||
int V4L2Camera::configure(StreamConfiguration *streamConfigOut,
|
||||
const Size &size, PixelFormat pixelformat,
|
||||
const Size &size, const PixelFormat &pixelformat,
|
||||
unsigned int bufferCount)
|
||||
{
|
||||
StreamConfiguration &streamConfig = config_->at(0);
|
||||
|
|
|
@ -43,7 +43,7 @@ public:
|
|||
std::vector<Buffer> completedBuffers();
|
||||
|
||||
int configure(StreamConfiguration *streamConfigOut,
|
||||
const Size &size, PixelFormat pixelformat,
|
||||
const Size &size, const PixelFormat &pixelformat,
|
||||
unsigned int bufferCount);
|
||||
|
||||
int allocBuffers(unsigned int count);
|
||||
|
|
|
@ -598,7 +598,7 @@ PixelFormat V4L2CameraProxy::v4l2ToDrm(uint32_t format)
|
|||
return info->format;
|
||||
}
|
||||
|
||||
uint32_t V4L2CameraProxy::drmToV4L2(PixelFormat format)
|
||||
uint32_t V4L2CameraProxy::drmToV4L2(const PixelFormat &format)
|
||||
{
|
||||
auto info = std::find_if(pixelFormatInfo.begin(), pixelFormatInfo.end(),
|
||||
[format](const PixelFormatInfo &info) {
|
||||
|
|
|
@ -60,7 +60,7 @@ private:
|
|||
unsigned int height);
|
||||
|
||||
static PixelFormat v4l2ToDrm(uint32_t format);
|
||||
static uint32_t drmToV4L2(PixelFormat format);
|
||||
static uint32_t drmToV4L2(const PixelFormat &format);
|
||||
|
||||
unsigned int refcount_;
|
||||
unsigned int index_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue