summaryrefslogtreecommitdiff
path: root/utils/checkstyle.py
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-09-04 00:09:28 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-09-07 19:18:18 +0300
commit88589a25318ddf08106262aada6ff71142e42c9d (patch)
tree5720160aa69a3ea3644b641f13e867ff75538096 /utils/checkstyle.py
parent17b9db376ccef2097018c40e17da884e619dd360 (diff)
libcamera: v4l2_videodevice: Take stride into account to compute offsets
When creating FrameBuffer instances, the V4L2VideoDevice computes plane offsets using minimal stride for the format. This doesn't always produce a valid result when the device requires padding at the end of lines. Fix it by computing offsets using the stride reported by V4L2. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'utils/checkstyle.py')
0 files changed, 0 insertions, 0 deletions
2 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
 * Copyright (C) 2021, Google Inc.
 *
 * unique_fd.cpp - File descriptor wrapper that owns a file descriptor
 */

#include <libcamera/base/unique_fd.h>

#include <unistd.h>
#include <utility>

#include <libcamera/base/log.h>

/**
 * \file base/unique_fd.h
 * \brief File descriptor wrapper that owns a file descriptor
 */

namespace libcamera {

LOG_DEFINE_CATEGORY(UniqueFD)

/**
 * \class UniqueFD
 * \brief unique_ptr-like wrapper for a file descriptor
 *
 * The UniqueFD is a wrapper that owns and manages the lifetime of a file
 * descriptor. It is constructed from a numerical file descriptor, and takes
 * over its ownership. The file descriptor is closed when the UniqueFD is
 * destroyed, or when it is assigned another file descriptor with operator=()
 * or reset().
 */

/**
 * \fn UniqueFD::UniqueFD()