libcamera: Rename 'method' to 'function'

Usage of 'method' to refer to member functions comes from Java. The C++
standard uses the term 'function' only. Replace 'method' with 'function'
or 'member function' through the whole code base and documentation.
While at it, fix two typos (s/backeng/backend/).

The BoundMethod and Object::invokeMethod() are left as-is here, and will
be addressed separately.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Laurent Pinchart 2021-04-07 15:48:59 +03:00
parent 0536a9aa71
commit a48a000a33
53 changed files with 314 additions and 309 deletions

View file

@ -305,7 +305,7 @@ std::unique_ptr<CameraDevice> CameraDevice::create(unsigned int id,
* cameraConfigData is optional for external camera devices and can be
* nullptr.
*
* This method is called before the camera device is opened.
* This function is called before the camera device is opened.
*/
int CameraDevice::initialize(const CameraConfigData *cameraConfigData)
{

View file

@ -40,7 +40,7 @@ enum class _ExifTag {
*
* Calls to generate() must check the return code to determine if any error
* occurred during the construction of the Exif data, and if successful the
* data can be obtained using the data() method.
* data can be obtained using the data() function.
*/
Exif::Exif()
: valid_(false), data_(nullptr), order_(EXIF_BYTE_ORDER_INTEL),

View file

@ -105,7 +105,7 @@ int IPAIPU3::start()
}
/**
* This method calculates a grid for the AWB algorithm in the IPU3 firmware.
* This function calculates a grid for the AWB algorithm in the IPU3 firmware.
* Its input is the BDS output size calculated in the ImgU.
* It is limited for now to the simplest method: find the lesser error
* with the width/height and respective log2 width/height of the cells.

View file

@ -41,7 +41,7 @@ namespace ipa {
* \brief Construct a CameraSensorHelper instance
*
* CameraSensorHelper derived class instances shall never be constructed
* manually but always through the CameraSensorHelperFactory::create() method.
* manually but always through the CameraSensorHelperFactory::create() function.
*/
/**

View file

@ -117,7 +117,7 @@ void CamHelper::GetDelays(int &exposure_delay, int &gain_delay,
{
/*
* These values are correct for many sensors. Other sensors will
* need to over-ride this method.
* need to over-ride this function.
*/
exposure_delay = 2;
gain_delay = 1;
@ -133,7 +133,7 @@ double CamHelper::GetModeSensitivity([[maybe_unused]] const CameraMode &mode) co
{
/*
* Most sensors have the same sensitivity in every mode, but this
* method can be overridden for those that do not. Note that it is
* function can be overridden for those that do not. Note that it is
* called before mode_ is set, so it must return the sensitivity
* of the mode that is passed in.
*/

View file

@ -34,25 +34,25 @@ namespace RPiController {
// exposure time, and to convert between the sensor's gain codes and actual
// gains.
//
// A method to return the number of frames of delay between updating exposure,
// A function to return the number of frames of delay between updating exposure,
// analogue gain and vblanking, and for the changes to take effect. For many
// sensors these take the values 2, 1 and 2 respectively, but sensors that are
// different will need to over-ride the default method provided.
// different will need to over-ride the default function provided.
//
// A method to query if the sensor outputs embedded data that can be parsed.
// A function to query if the sensor outputs embedded data that can be parsed.
//
// A method to return the sensitivity of a given camera mode.
// A function to return the sensitivity of a given camera mode.
//
// A parser to parse the embedded data buffers provided by some sensors (for
// example, the imx219 does; the ov5647 doesn't). This allows us to know for
// sure the exposure and gain of the frame we're looking at. CamHelper
// provides methods for converting analogue gains to and from the sensor's
// provides functions for converting analogue gains to and from the sensor's
// native gain codes.
//
// Finally, a set of methods that determine how to handle the vagaries of
// Finally, a set of functions that determine how to handle the vagaries of
// different camera modules on start-up or when switching modes. Some
// modules may produce one or more frames that are not yet correctly exposed,
// or where the metadata may be suspect. We have the following methods:
// or where the metadata may be suspect. We have the following functions:
// HideFramesStartup(): Tell the pipeline handler not to return this many
// frames at start-up. This can also be used to hide initial frames
// while the AGC and other algorithms are sorting themselves out.

View file

@ -27,8 +27,8 @@ typedef std::shared_ptr<bcm2835_isp_stats> StatisticsPtr;
// The Controller holds a pointer to some global_metadata, which is how
// different controllers and control algorithms within them can exchange
// information. The Prepare method returns a pointer to metadata for this
// specific image, and which should be passed on to the Process method.
// information. The Prepare function returns a pointer to metadata for this
// specific image, and which should be passed on to the Process function.
class Controller
{

View file

@ -82,7 +82,7 @@ private:
int frame_phase_;
// counts up to startup_frames
int frame_count_;
// counts up to startup_frames for Process method
// counts up to startup_frames for Process function
int frame_count2_;
double sync_results_[3][ALSC_CELLS_Y][ALSC_CELLS_X];
double prev_sync_results_[3][ALSC_CELLS_Y][ALSC_CELLS_X];

View file

@ -50,7 +50,7 @@ void Sharpen::Read(boost::property_tree::ptree const &params)
void Sharpen::SetStrength(double strength)
{
// Note that this method is how an application sets the overall
// Note that this function is how an application sets the overall
// sharpening "strength". We call this the "user strength" field
// as there already is a strength_ field - being an internal gain
// parameter that gets passed to the ISP control code. Negative

View file

@ -113,8 +113,8 @@ protected:
/*
* This isn't a full implementation of a metadata parser for SMIA sensors,
* however, it does provide the findRegs method which will prove useful and make
* it easier to implement parsers for other SMIA-like sensors (see
* however, it does provide the findRegs function which will prove useful and
* make it easier to implement parsers for other SMIA-like sensors (see
* md_parser_imx219.cpp for an example).
*/

View file

@ -741,7 +741,7 @@ void IPARPi::queueRequest(const ControlList &controls)
}
/*
* The SetEv() method takes in a direct exposure multiplier.
* The SetEv() function takes in a direct exposure multiplier.
* So convert to 2^EV
*/
double ev = pow(2.0, ctrl.second.get<float>());

View file

@ -101,7 +101,7 @@ void EventDispatcherPoll::unregisterEventNotifier(EventNotifier *notifier)
set.notifiers[type] = nullptr;
/*
* Don't race with event processing if this method is called from an
* Don't race with event processing if this function is called from an
* event notifier. The notifiers_ entry will be erased by
* processEvents().
*/

View file

@ -423,7 +423,7 @@ void Logger::backtrace()
msg << "Backtrace:" << std::endl;
/*
* Skip the first two entries that correspond to this method and
* Skip the first two entries that correspond to this function and
* ~LogMessage().
*/
for (int i = 2; i < num_entries; ++i)
@ -865,9 +865,9 @@ LogMessage::~LogMessage()
*
* The Loggable class allows classes to extend log messages without any change
* to the way the LOG() macro is invoked. By inheriting from Loggable and
* implementing the logPrefix() virtual method, a class can specify extra
* implementing the logPrefix() virtual function, a class can specify extra
* information to be automatically added to messages logged from class member
* methods.
* function.
*/
Loggable::~Loggable()
@ -878,7 +878,7 @@ Loggable::~Loggable()
* \fn Loggable::logPrefix()
* \brief Retrieve a string to be prefixed to the log message
*
* This method allows classes inheriting from the Loggable class to extend the
* This function allows classes inheriting from the Loggable class to extend the
* logger with an object-specific prefix output right before the log message
* contents.
*
@ -892,7 +892,7 @@ Loggable::~Loggable()
* \param[in] fileName The file name where the message is logged from
* \param[in] line The line number where the message is logged from
*
* This method is used as a backeng by the LOG() macro to create a log message
* This function is used as a backend by the LOG() macro to create a log message
* for locations inheriting from the Loggable class.
*
* \return A log message
@ -915,7 +915,7 @@ LogMessage Loggable::_log(const LogCategory *category, LogSeverity severity,
* \param[in] fileName The file name where the message is logged from
* \param[in] line The line number where the message is logged from
*
* This function is used as a backeng by the LOG() macro to create a log
* This function is used as a backend by the LOG() macro to create a log
* message for locations not inheriting from the Loggable class.
*
* \return A log message

View file

@ -24,7 +24,7 @@
* thus the message shall not store any temporary data.
*
* The message is delivered in the context of the object's thread, through the
* Object::message() virtual method. After delivery the message is
* Object::message() virtual function. After delivery the message is
* automatically deleted.
*/
@ -84,10 +84,10 @@ Message::~Message()
*
* Custom message types use values starting at Message::UserMessage. Assigning
* custom types manually may lead to accidental duplicated types. To avoid this
* problem, this method reserves and returns the next available user-defined
* problem, this function reserves and returns the next available user-defined
* message type.
*
* The recommended way to use this method is to subclass Message and provide a
* The recommended way to use this function is to subclass Message and provide a
* static accessor for the custom message type.
*
* \code{.cpp}

View file

@ -145,8 +145,8 @@ void Object::deleteLater()
* \brief Post a message to the object's thread
* \param[in] msg The message
*
* This method posts the message \a msg to the message queue of the object's
* thread, to be delivered to the object through the message() method in the
* This function posts the message \a msg to the message queue of the object's
* thread, to be delivered to the object through the message() function in the
* context of its thread. Message ownership is passed to the thread, and the
* message will be deleted after being delivered.
*
@ -169,13 +169,13 @@ void Object::postMessage(std::unique_ptr<Message> msg)
* \brief Message handler for the object
* \param[in] msg The message
*
* This virtual method receives messages for the object. It is called in the
* This virtual function receives messages for the object. It is called in the
* context of the object's thread, and can be overridden to process custom
* messages. The parent Object::message() method shall be called for any
* message not handled by the override method.
* messages. The parent Object::message() function shall be called for any
* message not handled by the override function.
*
* The message \a msg is valid only for the duration of the call, no reference
* to it shall be kept after this method returns.
* to it shall be kept after this function returns.
*/
void Object::message(Message *msg)
{
@ -207,7 +207,7 @@ void Object::message(Message *msg)
* \param[in] type Connection type for method invocation
* \param[in] args The method arguments
*
* This method invokes the member method \a func with arguments \a args, based
* This function invokes the member method \a func with arguments \a args, based
* on the connection \a type. Depending on the type, the method will be called
* synchronously in the same thread or asynchronously in the object's thread.
*
@ -237,12 +237,12 @@ void Object::message(Message *msg)
* \brief Move the object and all its children to a different thread
* \param[in] thread The target thread
*
* This method moves the object and all its children from the current thread to
* the new \a thread.
* This function moves the object and all its children from the current thread
* to the new \a thread.
*
* Before the object is moved, a Message::ThreadMoveMessage message is sent to
* it. The message() method can be reimplement in derived classes to be notified
* of the upcoming thread move and perform any required processing.
* it. The message() function can be reimplement in derived classes to be
* notified of the upcoming thread move and perform any required processing.
*
* Moving an object that has a parent is not allowed, and causes undefined
* behaviour.

View file

@ -21,10 +21,10 @@ namespace libcamera {
*
* A semaphore is a locking primitive that protects resources. It is created
* with an initial number of resources (which may be 0), and offers two
* primitives to acquire and release resources. The acquire() method tries to
* primitives to acquire and release resources. The acquire() function tries to
* acquire a number of resources, and blocks if not enough resources are
* available until they get released. The release() method releases a number of
* resources, waking up any consumer blocked on an acquire() call.
* available until they get released. The release() function releases a number
* of resources, waking up any consumer blocked on an acquire() call.
*/
/**
@ -50,7 +50,7 @@ unsigned int Semaphore::available()
* \brief Acquire \a n resources
* \param[in] n The resource count
*
* This method attempts to acquire \a n resources. If \a n is higher than the
* This function attempts to acquire \a n resources. If \a n is higher than the
* number of available resources, the call will block until enough resources
* become available.
*/
@ -65,7 +65,7 @@ void Semaphore::acquire(unsigned int n)
* \brief Try to acquire \a n resources without blocking
* \param[in] n The resource count
*
* This method attempts to acquire \a n resources. If \a n is higher than the
* This function attempts to acquire \a n resources. If \a n is higher than the
* number of available resources, it returns false immediately without
* acquiring any resource. Otherwise it acquires the resources and returns
* true.
@ -86,9 +86,9 @@ bool Semaphore::tryAcquire(unsigned int n)
* \brief Release \a n resources
* \param[in] n The resource count
*
* This method releases \a n resources, increasing the available resource count
* by \a n. If the number of available resources becomes large enough for any
* consumer blocked on an acquire() call, those consumers get woken up.
* This function releases \a n resources, increasing the available resource
* count by \a n. If the number of available resources becomes large enough for
* any consumer blocked on an acquire() call, those consumers get woken up.
*/
void Semaphore::release(unsigned int n)
{

View file

@ -102,7 +102,7 @@ SignalBase::SlotList SignalBase::slots()
* emitted from the same thread, the slot will be called synchronously, before
* Signal::emit() returns. If the signal is emitted from a different thread,
* the slot will be called asynchronously from the object's thread's event
* loop, after the Signal::emit() method returns, with a copy of the signal's
* loop, after the Signal::emit() function returns, with a copy of the signal's
* arguments. The emitter shall thus ensure that any pointer or reference
* passed through the signal will remain valid after the signal is emitted.
*/

View file

@ -222,7 +222,7 @@ ThreadData *ThreadData::current()
* The Thread class is a wrapper around std::thread that handles integration
* with the Object, Signal and EventDispatcher classes.
*
* Thread instances by default run an event loop until the exit() method is
* Thread instances by default run an event loop until the exit() function is
* called. The event loop dispatches events (messages, notifiers and timers)
* sent to the objects living in the thread. This behaviour can be modified by
* overriding the run() function.
@ -318,7 +318,7 @@ void Thread::startThread()
};
/*
* Make sure the thread is cleaned up even if the run method exits
* Make sure the thread is cleaned up even if the run() function exits
* abnormally (for instance via a direct call to pthread_cancel()).
*/
thread_local ThreadCleaner cleaner(this, &Thread::finishThread);
@ -332,12 +332,12 @@ void Thread::startThread()
/**
* \brief Enter the event loop
*
* This method enters an event loop based on the event dispatcher instance for
* the thread, and blocks until the exit() method is called. It is meant to be
* called within the thread from the run() method and shall not be called
* This function enters an event loop based on the event dispatcher instance for
* the thread, and blocks until the exit() function is called. It is meant to be
* called within the thread from the run() function and shall not be called
* outside of the thread.
*
* \return The exit code passed to the exit() method
* \return The exit code passed to the exit() function
*/
int Thread::exec()
{
@ -356,14 +356,14 @@ int Thread::exec()
}
/**
* \brief Main method of the thread
* \brief Main function of the thread
*
* When the thread is started with start(), it calls this method in the context
* of the new thread. The run() method can be overridden to perform custom
* work, either custom initialization and cleanup before and after calling the
* Thread::exec() function, or a custom thread loop altogether. When this
* method returns the thread execution is stopped, and the \ref finished signal
* is emitted.
* When the thread is started with start(), it calls this function in the
* context of the new thread. The run() function can be overridden to perform
* custom work, either custom initialization and cleanup before and after
* calling the Thread::exec() function, or a custom thread loop altogether. When
* this function returns the thread execution is stopped, and the \ref finished
* signal is emitted.
*
* Note that if this function is overridden and doesn't call Thread::exec(), no
* events will be dispatched to the objects living in the thread. These objects
@ -392,10 +392,10 @@ void Thread::finishThread()
* \brief Stop the thread's event loop
* \param[in] code The exit code
*
* This method interrupts the event loop started by the exec() method, causing
* exec() to return \a code.
* This function interrupts the event loop started by the exec() function,
* causing exec() to return \a code.
*
* Calling exit() on a thread that reimplements the run() method and doesn't
* Calling exit() on a thread that reimplements the run() function and doesn't
* call exec() will likely have no effect.
*
* \context This function is \threadsafe.
@ -449,8 +449,8 @@ bool Thread::wait(utils::duration duration)
* \brief Check if the thread is running
*
* A Thread instance is considered as running once the underlying thread has
* started. This method guarantees that it returns true after the start()
* method returns, and false after the wait() method returns.
* started. This function guarantees that it returns true after the start()
* function returns, and false after the wait() function returns.
*
* \context This function is \threadsafe.
*
@ -518,8 +518,8 @@ EventDispatcher *Thread::eventDispatcher()
* \param[in] msg The message
* \param[in] receiver The receiver
*
* This method stores the message \a msg in the message queue of the thread for
* the \a receiver and wake up the thread's event loop. Message ownership is
* This function stores the message \a msg in the message queue of the thread
* for the \a receiver and wake up the thread's event loop. Message ownership is
* passed to the thread, and the message will be deleted after being delivered.
*
* Messages are delivered through the thread's event loop. If the thread is not

View file

@ -40,7 +40,8 @@ LOG_DEFINE_CATEGORY(Serialization)
* respectively. Access is strictly sequential, the buffer keeps track of the
* current access location and advances it automatically. Reading or writing
* the same location multiple times is thus not possible. Bytes may also be
* skipped with the skip() method.
* skipped with the skip() function.
*
*
* The ByteStreamBuffer also supports carving out pieces of memory into other
* ByteStreamBuffer instances. Like a read or write operation, a carveOut()
@ -52,7 +53,7 @@ LOG_DEFINE_CATEGORY(Serialization)
* the buffer being marked as having overflown. If the buffer has been carved
* out from a parent buffer, the parent buffer is also marked as having
* overflown. Any later access on an overflown buffer is blocked. The buffer
* overflow status can be checked with the overflow() method.
* overflow status can be checked with the overflow() function.
*/
/**
@ -155,7 +156,7 @@ void ByteStreamBuffer::setOverflow()
* \brief Carve out an area of \a size bytes into a new ByteStreamBuffer
* \param[in] size The size of the newly created memory buffer
*
* This method carves out an area of \a size bytes from the buffer into a new
* This function carves out an area of \a size bytes from the buffer into a new
* ByteStreamBuffer, and returns the new buffer. It operates identically to a
* read or write access from the point of view of the current buffer, but allows
* the new buffer to be read or written at a later time after other read or
@ -194,7 +195,7 @@ ByteStreamBuffer ByteStreamBuffer::carveOut(size_t size)
* \brief Skip \a size bytes from the buffer
* \param[in] size The number of bytes to skip
*
* This method skips the next \a size bytes from the buffer.
* This function skips the next \a size bytes from the buffer.
*
* \return 0 on success, a negative error code otherwise
* \retval -ENOSPC no more space is available in the managed memory buffer

View file

@ -177,7 +177,7 @@ void CameraConfiguration::addConfiguration(const StreamConfiguration &cfg)
* \fn CameraConfiguration::validate()
* \brief Validate and possibly adjust the camera configuration
*
* This method adjusts the camera configuration to the closest valid
* This function adjusts the camera configuration to the closest valid
* configuration and returns the validation status.
*
* \todo: Define exactly when to return each status code. Should stream
@ -206,7 +206,7 @@ void CameraConfiguration::addConfiguration(const StreamConfiguration &cfg)
*
* The \a index represents the zero based insertion order of stream
* configuration into the camera configuration with addConfiguration(). Calling
* this method with an invalid index results in undefined behaviour.
* this function with an invalid index results in undefined behaviour.
*
* \return The stream configuration
*/
@ -221,7 +221,7 @@ StreamConfiguration &CameraConfiguration::at(unsigned int index)
*
* The \a index represents the zero based insertion order of stream
* configuration into the camera configuration with addConfiguration(). Calling
* this method with an invalid index results in undefined behaviour.
* this function with an invalid index results in undefined behaviour.
*
* \return The stream configuration
*/
@ -237,7 +237,7 @@ const StreamConfiguration &CameraConfiguration::at(unsigned int index) const
*
* The \a index represents the zero based insertion order of stream
* configuration into the camera configuration with addConfiguration(). Calling
* this method with an invalid index results in undefined behaviour.
* this function with an invalid index results in undefined behaviour.
*
* \return The stream configuration
*/
@ -249,7 +249,7 @@ const StreamConfiguration &CameraConfiguration::at(unsigned int index) const
*
* The \a index represents the zero based insertion order of stream
* configuration into the camera configuration with addConfiguration(). Calling
* this method with an invalid index results in undefined behaviour.
* this function with an invalid index results in undefined behaviour.
*
* \return The stream configuration
*/
@ -607,7 +607,7 @@ Camera::~Camera()
/**
* \brief Notify camera disconnection
*
* This method is used to notify the camera instance that the underlying
* This function is used to notify the camera instance that the underlying
* hardware has been unplugged. In response to the disconnection the camera
* instance notifies the application by emitting the #disconnected signal, and
* ensures that all new calls to the application-facing Camera API return an
@ -823,7 +823,7 @@ std::unique_ptr<CameraConfiguration> Camera::generateConfiguration(const StreamR
* by populating \a config.
*
* The configuration is created by generateConfiguration(), and adjusted by the
* caller with CameraConfiguration::validate(). This method only accepts fully
* caller with CameraConfiguration::validate(). This function only accepts fully
* valid configurations and returns an error if \a config is not valid.
*
* Exclusive access to the camera shall be ensured by a call to acquire() prior
@ -897,11 +897,11 @@ int Camera::configure(CameraConfiguration *config)
* \brief Create a request object for the camera
* \param[in] cookie Opaque cookie for application use
*
* This method creates an empty request for the application to fill with
* This function creates an empty request for the application to fill with
* buffers and parameters, and queue for capture.
*
* The \a cookie is stored in the request and is accessible through the
* Request::cookie() method at any time. It is typically used by applications
* Request::cookie() function at any time. It is typically used by applications
* to map the request to an external resource in the request completion
* handler, and is completely opaque to libcamera.
*
@ -928,7 +928,7 @@ std::unique_ptr<Request> Camera::createRequest(uint64_t cookie)
* \brief Queue a request to the camera
* \param[in] request The request to queue to the camera
*
* This method queues a \a request to the camera for capture.
* This function queues a \a request to the camera for capture.
*
* After allocating the request with createRequest(), the application shall
* fill it with at least one capture buffer before queuing it. Requests that
@ -1021,8 +1021,8 @@ int Camera::start(const ControlList *controls)
/**
* \brief Stop capture from camera
*
* This method stops capturing and processing requests immediately. All pending
* requests are cancelled and complete synchronously in an error state.
* This function stops capturing and processing requests immediately. All
* pending requests are cancelled and complete synchronously in an error state.
*
* \context This function may be called in any camera state as defined in \ref
* camera_operation, and shall be synchronized by the caller with other

View file

@ -367,7 +367,7 @@ std::shared_ptr<Camera> CameraManager::get(const std::string &id)
* \brief Retrieve a camera based on device number
* \param[in] devnum Device number of camera to get
*
* This method is meant solely for the use of the V4L2 compatibility
* This function is meant solely for the use of the V4L2 compatibility
* layer, to map device nodes to Camera instances. Applications shall
* not use it and shall instead retrieve cameras by name.
*

View file

@ -69,7 +69,7 @@ CameraSensor::~CameraSensor()
/**
* \brief Initialize the camera sensor instance
*
* This method performs the initialisation steps of the CameraSensor that may
* This function performs the initialisation steps of the CameraSensor that may
* fail. It shall be called once and only once after constructing the instance.
*
* \return 0 on success or a negative error code otherwise
@ -490,7 +490,7 @@ int CameraSensor::initProperties()
*
* \todo Consider if it desirable to distinguish between the maximum resolution
* the sensor can produce (also including upscaled ones) and the actual pixel
* array size by splitting this method in two.
* array size by splitting this function in two.
*
* \return The camera sensor resolution in pixels
*/
@ -517,7 +517,7 @@ Size CameraSensor::resolution() const
* sensor but not listed in \a mbusCodes are ignored. If none of the desired
* codes is supported, it returns an error.
*
* \a size indicates the desired size at the output of the sensor. This method
* \a size indicates the desired size at the output of the sensor. This function
* selects the best media bus code and size supported by the sensor according
* to the following criteria.
*
@ -533,12 +533,12 @@ Size CameraSensor::resolution() const
* When multiple media bus codes can produce the same size, the code at the
* lowest position in \a mbusCodes is selected.
*
* The use of this method is optional, as the above criteria may not match the
* The use of this function is optional, as the above criteria may not match the
* needs of all pipeline handlers. Pipeline handlers may implement custom
* sensor format selection when needed.
*
* The returned sensor output format is guaranteed to be acceptable by the
* setFormat() method without any modification.
* setFormat() function without any modification.
*
* \return The best sensor output format matching the desired media bus codes
* and size on success, or an empty format otherwise.
@ -632,14 +632,14 @@ const ControlInfoMap &CameraSensor::controls() const
* \brief Read V4L2 controls from the sensor
* \param[in] ids The list of controls to read, specified by their ID
*
* This method reads the value of all controls contained in \a ids, and returns
* their values as a ControlList. The control identifiers are defined by the
* V4L2 specification (V4L2_CID_*).
* This function reads the value of all controls contained in \a ids, and
* returns their values as a ControlList. The control identifiers are defined by
* the V4L2 specification (V4L2_CID_*).
*
* If any control in \a ids is not supported by the device, is disabled (i.e.
* has the V4L2_CTRL_FLAG_DISABLED flag set), or if any other error occurs
* during validation of the requested controls, no control is read and this
* method returns an empty control list.
* function returns an empty control list.
*
* \sa V4L2Device::getControls()
*
@ -655,7 +655,7 @@ ControlList CameraSensor::getControls(const std::vector<uint32_t> &ids)
* \brief Write V4L2 controls to the sensor
* \param[in] ctrls The list of controls to write
*
* This method writes the value of all controls contained in \a ctrls, and
* This function writes the value of all controls contained in \a ctrls, and
* stores the values actually applied to the device in the corresponding \a
* ctrls entry. The control identifiers are defined by the V4L2 specification
* (V4L2_CID_*).
@ -663,7 +663,7 @@ ControlList CameraSensor::getControls(const std::vector<uint32_t> &ids)
* If any control in \a ctrls is not supported by the device, is disabled (i.e.
* has the V4L2_CTRL_FLAG_DISABLED flag set), is read-only, or if any other
* error occurs during validation of the requested controls, no control is
* written and this method returns -EINVAL.
* written and this function returns -EINVAL.
*
* If an error occurs while writing the controls, the index of the first
* control that couldn't be written is returned. All controls below that index
@ -707,7 +707,7 @@ int CameraSensor::setControls(ControlList *ctrls)
* sensor, this function returns -EINVAL.
*
* Pipeline handlers that do not change the sensor format using the setFormat()
* method may need to call updateControlInfo() beforehand, to ensure all the
* function may need to call updateControlInfo() beforehand, to ensure all the
* control ranges are up to date.
*
* \return 0 on success, a negative error code otherwise

View file

@ -332,7 +332,7 @@ ControlInfo ControlSerializer::loadControlInfo(ControlType type,
* \brief Deserialize an object from a binary buffer
* \param[in] buffer The memory buffer that contains the object
*
* This method is only valid when specialized for ControlInfoMap or
* This function is only valid when specialized for ControlInfoMap or
* ControlList. Any other typename \a T is not supported.
*/
@ -341,7 +341,7 @@ ControlInfo ControlSerializer::loadControlInfo(ControlType type,
* \param[in] buffer The memory buffer that contains the serialized map
*
* Re-construct a ControlInfoMap from a binary \a buffer containing data
* serialized using the serialize() method.
* serialized using the serialize() function.
*
* \return The deserialized ControlInfoMap
*/
@ -420,7 +420,7 @@ ControlInfoMap ControlSerializer::deserialize<ControlInfoMap>(ByteStreamBuffer &
* \param[in] buffer The memory buffer that contains the serialized list
*
* Re-construct a ControlList from a binary \a buffer containing data
* serialized using the serialize() method.
* serialized using the serialize() function.
*
* \return The deserialized ControlList
*/

View file

@ -35,7 +35,7 @@ namespace libcamera {
* \brief Validate a control
* \param[in] id The control ID
*
* This method validates the control \a id against the object corresponding to
* This function validates the control \a id against the object corresponding to
* the validator. It shall at least validate that the control is applicable to
* the object instance, and may perform additional checks.
*

View file

@ -41,7 +41,7 @@
* int32_t exposure = controls->get(controls::ManualExposure);
* \endcode
*
* The ControlList::get() and ControlList::set() methods automatically deduce
* The ControlList::get() and ControlList::set() functions automatically deduce
* the data type based on the control.
*/
@ -433,9 +433,9 @@ void ControlValue::reserve(ControlType type, bool isArray, std::size_t numElemen
* \brief Describe a control and its intrinsic properties
*
* The Control class models a control exposed by an object. Its template type
* name T refers to the control data type, and allows methods that operate on
* control values to be defined as template methods using the same type T for
* the control value. See for instance how the ControlList::get() method
* name T refers to the control data type, and allows functions that operate on
* control values to be defined as template functions using the same type T for
* the control value. See for instance how the ControlList::get() function
* returns a value corresponding to the type of the requested control.
*
* While this class is the main means to refer to a control, the control
@ -577,7 +577,7 @@ ControlInfo::ControlInfo(bool value)
*
* For controls that support a pre-defined number of values, the enumeration of
* those is reported through a vector of ControlValue instances accessible with
* this method.
* this function.
*
* \return A vector of ControlValue representing the control valid values
*/
@ -628,7 +628,7 @@ std::string ControlInfo::toString() const
* In addition to the features of the standard unsorted map, this class also
* provides access to the mapped elements using numerical ID keys. It maintains
* an internal map of numerical ID to ControlId for this purpose, and exposes it
* through the idmap() method to help construction of ControlList instances.
* through the idmap() function to help construction of ControlList instances.
*/
/**
@ -770,7 +770,7 @@ ControlInfoMap::const_iterator ControlInfoMap::find(unsigned int id) const
* \brief Retrieve the ControlId map
*
* Constructing ControlList instances for V4L2 controls requires a ControlIdMap
* for the V4L2 device that the control list targets. This helper method
* for the V4L2 device that the control list targets. This helper function
* returns a suitable idmap for that purpose.
*
* \return The ControlId map
@ -808,7 +808,7 @@ void ControlInfoMap::generateIdmap()
* \brief Associate a list of ControlId with their values for an object
*
* The ControlList class stores values of controls exposed by an object. The
* lists returned by the Request::controls() and Request::metadata() methods
* lists returned by the Request::controls() and Request::metadata() functions
* refer to the camera that the request belongs to.
*
* Control lists are constructed with a map of all the controls supported by
@ -987,7 +987,7 @@ bool ControlList::contains(unsigned int id) const
* \param[in] ctrl The control
* \param[in] value The control value
*
* This method sets the value of a control in the control list. If the control
* This function sets the value of a control in the control list. If the control
* is already present in the list, its value is updated, otherwise it is added
* to the list.
*
@ -1027,7 +1027,7 @@ const ControlValue &ControlList::get(unsigned int id) const
* \param[in] id The control ID
* \param[in] value The control value
*
* This method sets the value of a control in the control list. If the control
* This function sets the value of a control in the control list. If the control
* is already present in the list, its value is updated, otherwise it is added
* to the list.
*

View file

@ -244,7 +244,7 @@ std::unique_ptr<MediaDevice> DeviceEnumerator::createDevice(const std::string &d
*
* Store the media device in the internal list for later matching with
* pipeline handlers. \a media shall be created with createDevice() first.
* This method shall be called after all members of the entities of the
* This function shall be called after all members of the entities of the
* media graph have been confirmed to be initialized.
*/
void DeviceEnumerator::addDevice(std::unique_ptr<MediaDevice> media)

View file

@ -47,11 +47,11 @@ LOG_DEFINE_CATEGORY(FileDescriptor)
* by fd() will be identical to the value passed to the constructor.
*
* The copy constructor and assignment operator create copies that share the
* Descriptor, while the move versions of those methods additionally make the
* Descriptor, while the move versions of those functions additionally make the
* other FileDescriptor invalid. When the last FileDescriptor that references a
* Descriptor is destroyed, the file descriptor is closed.
*
* The numerical file descriptor is available through the fd() method. All
* The numerical file descriptor is available through the fd() function. All
* FileDescriptor instances created as copies of a FileDescriptor will report
* the same fd() value. Callers can perform operations on the fd(), but shall
* never close it manually.
@ -68,7 +68,7 @@ LOG_DEFINE_CATEGORY(FileDescriptor)
* FileDescriptor instances that reference it are destroyed.
*
* If the \a fd is negative, the FileDescriptor is constructed as invalid and
* the fd() method will return -1.
* the fd() function will return -1.
*/
FileDescriptor::FileDescriptor(const int &fd)
{
@ -92,7 +92,7 @@ FileDescriptor::FileDescriptor(const int &fd)
* destroyed.
*
* If the \a fd is negative, the FileDescriptor is constructed as invalid and
* the fd() method will return -1.
* the fd() function will return -1.
*/
FileDescriptor::FileDescriptor(int &&fd)
{
@ -129,7 +129,7 @@ FileDescriptor::FileDescriptor(const FileDescriptor &other)
*
* Moving a FileDescriptor moves the reference to the wrapped descriptor owned
* by \a other to the new FileDescriptor. The \a other FileDescriptor is
* invalidated and its fd() method will return -1. The wrapped file descriptor
* invalidated and its fd() function will return -1. The wrapped file descriptor
* will be closed automatically when all FileDescriptor instances that
* reference it are destroyed.
*/
@ -178,7 +178,7 @@ FileDescriptor &FileDescriptor::operator=(const FileDescriptor &other)
* Moving a FileDescriptor moves the reference to the wrapped descriptor owned
* by \a other to the new FileDescriptor. If \a other is invalid, *this will
* also be invalid. The \a other FileDescriptor is invalidated and its fd()
* method will return -1. The wrapped file descriptor will be closed
* function will return -1. The wrapped file descriptor will be closed
* automatically when all FileDescriptor instances that reference it are
* destroyed.
*
@ -209,7 +209,7 @@ FileDescriptor &FileDescriptor::operator=(FileDescriptor &&other)
*
* Duplicating a FileDescriptor creates a duplicate of the wrapped file
* descriptor and returns a new FileDescriptor instance that wraps the
* duplicate. The fd() method of the original and duplicate instances will
* duplicate. The fd() function of the original and duplicate instances will
* return different values. The duplicate instance will not be affected by
* destruction of the original instance or its copies.
*

View file

@ -16,7 +16,7 @@
/**
* \file internal/formats.h
* \brief Types and helper methods to handle libcamera image formats
* \brief Types and helper functions to handle libcamera image formats
*/
namespace libcamera {

View file

@ -120,7 +120,7 @@ FrameBuffer::Private::Private()
* \brief Set the request this buffer belongs to
* \param[in] request Request to set
*
* For buffers added to requests by applications, this method is called by
* For buffers added to requests by applications, this function is called by
* Request::addBuffer() or Request::reuse(). For buffers internal to pipeline
* handlers, it is called by the pipeline handlers themselves.
*/
@ -199,7 +199,7 @@ FrameBuffer::FrameBuffer(const std::vector<Plane> &planes, unsigned int cookie)
/**
* \brief Retrieve the request this buffer belongs to
*
* The intended callers of this method are buffer completion handlers that
* The intended callers of this function are buffer completion handlers that
* need to associate a buffer to the request it belongs to.
*
* A FrameBuffer is associated to a request by Request::addBuffer() and the
@ -238,9 +238,9 @@ Request *FrameBuffer::request() const
* \param[in] cookie Cookie to set
*
* The cookie belongs to the creator of the FrameBuffer. Its value may be
* modified at any time with this method. Applications and IPAs shall not modify
* the cookie value of buffers they haven't created themselves. The libcamera
* core never modifies the buffer cookie.
* modified at any time with this function. Applications and IPAs shall not
* modify the cookie value of buffers they haven't created themselves. The
* libcamera core never modifies the buffer cookie.
*/
/**

View file

@ -77,7 +77,7 @@ FrameBufferAllocator::~FrameBufferAllocator()
* stopped, and the stream shall be part of the active camera configuration.
*
* Upon successful allocation, the allocated buffers can be retrieved with the
* buffers() method.
* buffers() function.
*
* \return The number of allocated buffers on success or a negative error code
* otherwise
@ -137,7 +137,7 @@ int FrameBufferAllocator::free(Stream *stream)
* \brief Retrieve the buffers allocated for a \a stream
* \param[in] stream The stream to retrieve buffers for
*
* This method shall only be called after successfully allocating buffers for
* This function shall only be called after successfully allocating buffers for
* \a stream with allocate(). The returned buffers are valid until free() is
* called for the same stream or the FrameBufferAllocator instance is destroyed.
*

View file

@ -651,7 +651,7 @@ Rectangle &Rectangle::translateBy(const Point &point)
* \brief Calculate the intersection of this Rectangle with another
* \param[in] bound The Rectangle that is intersected with this Rectangle
*
* This method calculates the standard intersection of two rectangles. If the
* This function calculates the standard intersection of two rectangles. If the
* rectangles do not overlap in either the x or y direction, then the size
* of that dimension in the result (its width or height) is set to zero. Even
* when one dimension is set to zero, note that the other dimension may still

View file

@ -57,8 +57,8 @@
* Due to IPC, synchronous communication between pipeline handlers and IPAs can
* be costly. For that reason, functions that cannot afford the high cost
* should be marked as [async] in the mojom file, and they will operate
* asynchronously. This implies that these methods don't return a status, and
* that all methods may copy their arguments. Synchronous functions are still
* asynchronously. This implies that these functions don't return a status, and
* that all functions may copy their arguments. Synchronous functions are still
* allowed, but should be used with caution.
*/
@ -84,11 +84,11 @@ namespace libcamera {
* include/libcamera/ipa/ (see the IPA Writers Guide for details
* on how to do so).
*
* Due to process isolation all arguments to the IPAInterface methods and
* signals may need to be transferred over IPC. The class thus uses serializable
* data types only. The IPA C++ interface defines custom data structures that
* mirror core libcamera structures when the latter are not suitable, such as
* IPAStream to carry StreamConfiguration data.
* Due to process isolation all arguments to the IPAInterface member functions
* and signals may need to be transferred over IPC. The class thus uses
* serializable data types only. The IPA C++ interface defines custom data
* structures that mirror core libcamera structures when the latter are not
* suitable, such as IPAStream to carry StreamConfiguration data.
*
* Custom data structures may also be defined in the mojom file, in which case
* the (de)serialization will automatically be generated. If any other libcamera

View file

@ -45,7 +45,7 @@ LOG_DEFINE_CATEGORY(IPAManager)
* ever run in the libcamera process.
*
* To create an IPA context, pipeline handlers call the IPAManager::createIPA()
* method. For a directly loaded module, the manager calls the module's
* function. For a directly loaded module, the manager calls the module's
* ipaCreate() function directly and wraps the returned context in an
* IPAContextWrapper that exposes an IPAInterface.
*
@ -89,9 +89,10 @@ LOG_DEFINE_CATEGORY(IPAManager)
* returned to the pipeline handler, and all interactions with the IPA context
* go the same interface regardless of process isolation.
*
* In all cases the data passed to the IPAInterface methods is serialized to
* Plain Old Data, either for the purpose of passing it to the IPA context
* plain C API, or to transmit the data to the isolated process through IPC.
* In all cases the data passed to the IPAInterface member functions is
* serialized to Plain Old Data, either for the purpose of passing it to the IPA
* context plain C API, or to transmit the data to the isolated process through
* IPC.
*/
IPAManager *IPAManager::self_ = nullptr;
@ -211,7 +212,7 @@ void IPAManager::parseDir(const char *libDir, unsigned int maxDepth,
* \param[in] libDir The directory to search for IPA modules
* \param[in] maxDepth The maximum depth of sub-directories to search
*
* This method tries to create an IPAModule instance for every shared object
* This function tries to create an IPAModule instance for every shared object
* found in \a libDir, and skips invalid IPA modules.
*
* Sub-directories are searched up to a depth of \a maxDepth. A \a maxDepth

View file

@ -253,7 +253,7 @@ Span<const uint8_t> elfLoadSymbol(Span<const uint8_t> elf, const char *symbol)
* The IPA module shared object file must be of the same endianness and
* bitness as libcamera.
*
* The caller shall call the isValid() method after constructing an
* The caller shall call the isValid() function after constructing an
* IPAModule instance to verify the validity of the IPAModule.
*/
IPAModule::IPAModule(const std::string &libPath)
@ -392,11 +392,11 @@ const std::string &IPAModule::path() const
* \brief Load the IPA implementation factory from the shared object
*
* The IPA module shared object implements an IPAInterface object to be used
* by pipeline handlers. This method loads the factory function from the
* by pipeline handlers. This function loads the factory function from the
* shared object. Later, createInterface() can be called to instantiate the
* IPAInterface.
*
* This method only needs to be called successfully once, after which
* This function only needs to be called successfully once, after which
* createInterface() can be called as many times as IPAInterface instances are
* needed.
*
@ -441,8 +441,8 @@ bool IPAModule::load()
/**
* \brief Instantiate an IPA interface
*
* After loading the IPA module with load(), this method creates an instance of
* the IPA module interface.
* After loading the IPA module with load(), this function creates an instance
* of the IPA module interface.
*
* Calling this function on a module that has not yet been loaded, or an
* invalid module (as returned by load() and isValid(), respectively) is
@ -464,7 +464,7 @@ IPAInterface *IPAModule::createInterface()
* \param[in] minVersion Minimum acceptable version of IPA module
* \param[in] maxVersion Maximum acceptable version of IPA module
*
* This method checks if this IPA module matches the \a pipe pipeline handler,
* This function checks if this IPA module matches the \a pipe pipeline handler,
* and the input version range.
*
* \return True if the pipeline handler matches the IPA module, or false otherwise

View file

@ -159,7 +159,7 @@ std::string IPAProxy::configurationFile(const std::string &name) const
*
* A proxy worker's executable could be found in either the global installation
* directory, or in the paths specified by the environment variable
* LIBCAMERA_IPA_PROXY_PATH. This method checks the global install directory
* LIBCAMERA_IPA_PROXY_PATH. This function checks the global install directory
* first, then LIBCAMERA_IPA_PROXY_PATH in order, and returns the full path to
* the proxy worker executable that is specified by file. The proxy worker
* executable shall have exec permission.
@ -233,7 +233,7 @@ std::string IPAProxy::resolvePath(const std::string &file) const
*
* The IPAProxy can be Running, Stopped, or Stopping.
*
* This state provides a means to ensure that asynchronous methods are only
* This state provides a means to ensure that asynchronous functions are only
* called while the proxy is running, and prevent new tasks being submitted
* while still enabling events to complete when the IPAProxy is stopping.
*/

View file

@ -58,7 +58,7 @@ LOG_DEFINE_CATEGORY(IPCUnixSocket)
*
* Establishment of an IPC channel is asymmetrical. The side that initiates
* communication first instantiates a local side socket and creates the channel
* with create(). The method returns a file descriptor for the remote side of
* with create(). The function returns a file descriptor for the remote side of
* the channel, which is passed to the remote process through an out-of-band
* communication method. The remote side then instantiates a socket, and binds
* it to the other side by passing the file descriptor to bind(). At that point
@ -80,11 +80,11 @@ IPCUnixSocket::~IPCUnixSocket()
/**
* \brief Create an new IPC channel
*
* This method creates a new IPC channel. The socket instance is bound to the
* local side of the channel, and the method returns a file descriptor bound to
* the remote side. The caller is responsible for passing the file descriptor to
* the remote process, where it can be used with IPCUnixSocket::bind() to bind
* the remote side socket.
* This function creates a new IPC channel. The socket instance is bound to the
* local side of the channel, and the function returns a file descriptor bound
* to the remote side. The caller is responsible for passing the file descriptor
* to the remote process, where it can be used with IPCUnixSocket::bind() to
* bind the remote side socket.
*
* \return A file descriptor on success, negative error code on failure
*/
@ -112,9 +112,9 @@ int IPCUnixSocket::create()
* \brief Bind to an existing IPC channel
* \param[in] fd File descriptor
*
* This method binds the socket instance to an existing IPC channel identified
* This function binds the socket instance to an existing IPC channel identified
* by the file descriptor \a fd. The file descriptor is obtained from the
* IPCUnixSocket::create() method.
* IPCUnixSocket::create() function.
*
* \return 0 on success or a negative error code otherwise
*/
@ -162,7 +162,7 @@ bool IPCUnixSocket::isBound() const
* \brief Send a message payload
* \param[in] payload Message payload to send
*
* This method queues the message payload for transmission to the other end of
* This function queues the message payload for transmission to the other end of
* the IPC channel. It returns immediately, before the message is delivered to
* the remote side.
*
@ -197,7 +197,7 @@ int IPCUnixSocket::send(const Payload &payload)
* \brief Receive a message payload
* \param[out] payload Payload where to write the received message
*
* This method receives the message payload from the IPC channel and writes it
* This function receives the message payload from the IPC channel and writes it
* to the \a payload. If no message payload is available, it returns
* immediately with -EAGAIN. The \ref readyRead signal shall be used to receive
* notification of message availability.
@ -329,7 +329,7 @@ void IPCUnixSocket::dataNotifier([[maybe_unused]] EventNotifier *notifier)
/*
* If the payload has arrived, disable the notifier and emit the
* readyRead signal. The notifier will be reenabled by the receive()
* method.
* function.
*/
struct pollfd fds = { fd_, POLLIN, 0 };
ret = poll(&fds, 1, 0);

View file

@ -134,7 +134,7 @@ void MediaDevice::release()
* they provide at all times, while still allowing an instance to lock a
* resource while it prepares to actively use a camera from the resource.
*
* This method shall not be called from a pipeline handler implementation
* This function shall not be called from a pipeline handler implementation
* directly, as the base PipelineHandler implementation handles this on the
* behalf of the specified implementation.
*
@ -161,7 +161,7 @@ bool MediaDevice::lock()
/**
* \brief Unlock the device and free it for use for libcamera instances
*
* This method shall not be called from a pipeline handler implementation
* This function shall not be called from a pipeline handler implementation
* directly, as the base PipelineHandler implementation handles this on the
* behalf of the specified implementation.
*

View file

@ -724,7 +724,7 @@ int ImgUDevice::stop()
/**
* \brief Enable or disable a single link on the ImgU instance
*
* This method assumes the media device associated with the ImgU instance
* This function assumes the media device associated with the ImgU instance
* is open.
*
* \return 0 on success or a negative error code otherwise
@ -748,7 +748,7 @@ int ImgUDevice::linkSetup(const std::string &source, unsigned int sourcePad,
* \brief Enable or disable all media links in the ImgU instance to prepare
* for capture operations
*
* \todo This method will probably be removed or changed once links will be
* \todo This function will probably be removed or changed once links will be
* enabled or disabled selectively.
*
* \return 0 on success or a negative error code otherwise

View file

@ -48,7 +48,7 @@ LOG_DEFINE_CATEGORY(Pipeline)
*
* Pipeline handlers are expected to extend this base class with platform
* specific implementation, associate instances of the derived classes
* using the registerCamera() method, and access them at a later time
* using the registerCamera() function, and access them at a later time
* with cameraData().
*/
@ -128,7 +128,7 @@ LOG_DEFINE_CATEGORY(Pipeline)
*
* In order to honour the std::enable_shared_from_this<> contract,
* PipelineHandler instances shall never be constructed manually, but always
* through the PipelineHandlerFactory::create() method implemented by the
* through the PipelineHandlerFactory::create() function implemented by the
* respective factories.
*/
PipelineHandler::PipelineHandler(CameraManager *manager)
@ -209,8 +209,8 @@ MediaDevice *PipelineHandler::acquireMediaDevice(DeviceEnumerator *enumerator,
/**
* \brief Lock all media devices acquired by the pipeline
*
* This method shall not be called from pipeline handler implementation, as the
* Camera class handles locking directly.
* This function shall not be called from pipeline handler implementation, as
* the Camera class handles locking directly.
*
* \context This function is \threadsafe.
*
@ -233,8 +233,8 @@ bool PipelineHandler::lock()
/**
* \brief Unlock all media devices acquired by the pipeline
*
* This method shall not be called from pipeline handler implementation, as the
* Camera class handles locking directly.
* This function shall not be called from pipeline handler implementation, as
* the Camera class handles locking directly.
*
* \context This function is \threadsafe.
*
@ -311,7 +311,7 @@ const ControlList &PipelineHandler::properties(const Camera *camera) const
*
* When configuring the camera the pipeline handler shall associate a Stream
* instance to each StreamConfiguration entry in the CameraConfiguration using
* the StreamConfiguration::setStream() method.
* the StreamConfiguration::setStream() function.
*
* \context This function is called from the CameraManager thread.
*
@ -325,13 +325,13 @@ const ControlList &PipelineHandler::properties(const Camera *camera) const
* \param[in] stream The stream to allocate buffers for
* \param[out] buffers Array of buffers successfully allocated
*
* This method allocates buffers for the \a stream from the devices associated
* This function allocates buffers for the \a stream from the devices associated
* with the stream in the corresponding pipeline handler. Those buffers shall be
* suitable to be added to a Request for the stream, and shall be mappable to
* the CPU through their associated dmabufs with mmap().
*
* The method may only be called after the Camera has been configured and before
* it gets started, or after it gets stopped. It shall be called only for
* The function may only be called after the Camera has been configured and
* before it gets started, or after it gets stopped. It shall be called only for
* streams that are part of the active camera configuration.
*
* The only intended caller is Camera::exportFrameBuffers().
@ -349,8 +349,8 @@ const ControlList &PipelineHandler::properties(const Camera *camera) const
* \param[in] controls Controls to be applied before starting the Camera
*
* Start the group of streams that have been configured for capture by
* \a configure(). The intended caller of this method is the Camera class which
* will in turn be called from the application to indicate that it has
* \a configure(). The intended caller of this function is the Camera class
* which will in turn be called from the application to indicate that it has
* configured the streams and is ready to capture.
*
* \context This function is called from the CameraManager thread.
@ -363,8 +363,8 @@ const ControlList &PipelineHandler::properties(const Camera *camera) const
* \brief Stop capturing from all running streams
* \param[in] camera The camera to stop
*
* This method stops capturing and processing requests immediately. All pending
* requests are cancelled and complete immediately in an error state.
* This function stops capturing and processing requests immediately. All
* pending requests are cancelled and complete immediately in an error state.
*
* \context This function is called from the CameraManager thread.
*/
@ -373,7 +373,7 @@ const ControlList &PipelineHandler::properties(const Camera *camera) const
* \brief Determine if the camera has any requests pending
* \param[in] camera The camera to check
*
* This method determines if there are any requests queued to the pipeline
* This function determines if there are any requests queued to the pipeline
* awaiting processing.
*
* \return True if there are pending requests, or false otherwise
@ -389,15 +389,15 @@ bool PipelineHandler::hasPendingRequests(const Camera *camera) const
* \brief Queue a request
* \param[in] request The request to queue
*
* This method queues a capture request to the pipeline handler for processing.
* The request is first added to the internal list of queued requests, and
* then passed to the pipeline handler with a call to queueRequestDevice().
* If the pipeline handler fails in queuing the request to the hardware the
* request is cancelled.
* This function queues a capture request to the pipeline handler for
* processing. The request is first added to the internal list of queued
* requests, and then passed to the pipeline handler with a call to
* queueRequestDevice(). If the pipeline handler fails in queuing the request
* to the hardware the request is cancelled.
*
* Keeping track of queued requests ensures automatic completion of all requests
* when the pipeline handler is stopped with stop(). Request completion shall be
* signalled by the pipeline handler using the completeRequest() method.
* signalled by the pipeline handler using the completeRequest() function.
*
* \context This function is called from the CameraManager thread.
*/
@ -424,7 +424,7 @@ void PipelineHandler::queueRequest(Request *request)
* \param[in] camera The camera to queue the request to
* \param[in] request The request to queue
*
* This method queues a capture request to the device for processing. The
* This function queues a capture request to the device for processing. The
* request contains a set of buffers associated with streams and a set of
* parameters. The pipeline handler shall program the device to ensure that the
* parameters will be applied to the frames captured in the buffers provided in
@ -440,8 +440,8 @@ void PipelineHandler::queueRequest(Request *request)
* \param[in] request The request the buffer belongs to
* \param[in] buffer The buffer that has completed
*
* This method shall be called by pipeline handlers to signal completion of the
* \a buffer part of the \a request. It notifies applications of buffer
* This function shall be called by pipeline handlers to signal completion of
* the \a buffer part of the \a request. It notifies applications of buffer
* completion and updates the request's internal buffer tracking. The request
* is not completed automatically when the last buffer completes to give
* pipeline handlers a chance to perform any operation that may still be
@ -463,11 +463,11 @@ bool PipelineHandler::completeBuffer(Request *request, FrameBuffer *buffer)
* \brief Signal request completion
* \param[in] request The request that has completed
*
* The pipeline handler shall call this method to notify the \a camera that the
* request has completed. The request is no longer managed by the pipeline
* handler and shall not be accessed once this method returns.
* The pipeline handler shall call this function to notify the \a camera that
* the request has completed. The request is no longer managed by the pipeline
* handler and shall not be accessed once this function returns.
*
* This method ensures that requests will be returned to the application in
* This function ensures that requests will be returned to the application in
* submission order, the pipeline handler may call it on any complete request
* without any ordering constraint.
*
@ -497,7 +497,7 @@ void PipelineHandler::completeRequest(Request *request)
* \param[in] camera The camera to be added
* \param[in] data Pipeline-specific data for the camera
*
* This method is called by pipeline handlers to register the cameras they
* This function is called by pipeline handlers to register the cameras they
* handle with the camera manager. It associates the pipeline-specific \a data
* with the camera, for later retrieval with cameraData(). Ownership of \a data
* is transferred to the PipelineHandler.

View file

@ -95,7 +95,7 @@ void ProcessManager::sighandler([[maybe_unused]] EventNotifier *notifier)
* \brief Register process with process manager
* \param[in] proc Process to register
*
* This method registers the \a proc with the process manager. It
* This function registers the \a proc with the process manager. It
* shall be called by the parent process after successfully forking, in
* order to let the parent signal process termination.
*/
@ -164,7 +164,7 @@ ProcessManager *ProcessManager::instance()
/**
* \brief Retrieve the Process manager's write pipe
*
* This method is meant only to be used by the static signal handler.
* This function is meant only to be used by the static signal handler.
*
* \return Pipe for writing
*/
@ -176,7 +176,7 @@ int ProcessManager::writePipe() const
/**
* \brief Retrive the old signal action data
*
* This method is meant only to be used by the static signal handler.
* This function is meant only to be used by the static signal handler.
*
* \return The old signal action data
*/
@ -317,7 +317,7 @@ int Process::isolate()
* \brief SIGCHLD handler
* \param[in] wstatus The status as output by waitpid()
*
* This method is called when the process associated with Process terminates.
* This function is called when the process associated with Process terminates.
* It emits the Process::finished signal.
*/
void Process::died(int wstatus)
@ -346,7 +346,7 @@ void Process::died(int wstatus)
* \fn Process::exitCode()
* \brief Retrieve the exit code of the process
*
* This method is only valid if exitStatus() returned NormalExit.
* This function is only valid if exitStatus() returned NormalExit.
*
* \return Exit code
*/

View file

@ -69,10 +69,9 @@ LOG_DEFINE_CATEGORY(Request)
* \param[in] cookie Opaque cookie for application use
*
* The \a cookie is stored in the request and is accessible through the
* cookie() method at any time. It is typically used by applications to map the
* request to an external resource in the request completion handler, and is
* cookie() function at any time. It is typically used by applications to map
* the request to an external resource in the request completion handler, and is
* completely opaque to libcamera.
*
*/
Request::Request(Camera *camera, uint64_t cookie)
: camera_(camera), sequence_(0), cookie_(cookie),
@ -143,7 +142,7 @@ void Request::reuse(ReuseFlag flags)
*
* Requests store a list of controls to be applied to all frames captured for
* the request. They are created with an empty list of controls that can be
* accessed through this method. Control values can be retrieved using
* accessed through this function. Control values can be retrieved using
* ControlList::get() and updated using ControlList::set().
*
* Only controls supported by the camera to which this request will be
@ -173,7 +172,7 @@ void Request::reuse(ReuseFlag flags)
* callback is called.
*
* A request can only contain one buffer per stream. If a buffer has already
* been added to the request for the same stream, this method returns -EEXIST.
* been added to the request for the same stream, this function returns -EEXIST.
*
* \return 0 on success or a negative error code otherwise
* \retval -EEXIST The request already contains a buffer for the stream
@ -325,7 +324,7 @@ void Request::cancel()
* pending buffers. This function removes the \a buffer from the set to mark it
* as complete. All buffers associate with the request shall be marked as
* complete by calling this function once and once only before reporting the
* request as complete with the complete() method.
* request as complete with the complete() function.
*
* \return True if all buffers contained in the request have completed, false
* otherwise

View file

@ -276,7 +276,7 @@ SizeRange StreamFormats::range(const PixelFormat &pixelformat) const
*/
/**
* \todo This method is deprecated and should be removed once all pipeline
* \todo This function is deprecated and should be removed once all pipeline
* handlers provide StreamFormats.
*/
StreamConfiguration::StreamConfiguration()
@ -334,7 +334,7 @@ StreamConfiguration::StreamConfiguration(const StreamFormats &formats)
* \brief Retrieve the stream associated with the configuration
*
* When a camera is configured with Camera::configure() Stream instances are
* associated with each stream configuration entry. This method retrieves the
* associated with each stream configuration entry. This function retrieves the
* associated Stream, which remains valid until the next call to
* Camera::configure() or Camera::release().
*
@ -345,8 +345,8 @@ StreamConfiguration::StreamConfiguration(const StreamFormats &formats)
* \fn StreamConfiguration::setStream()
* \brief Associate a stream with a configuration
*
* This method is meant for the PipelineHandler::configure() method and shall
* not be called by applications.
* This function is meant for the PipelineHandler::configure() function and
* shall not be called by applications.
*
* \param[in] stream The stream
*/
@ -355,10 +355,11 @@ StreamConfiguration::StreamConfiguration(const StreamFormats &formats)
* \fn StreamConfiguration::formats()
* \brief Retrieve advisory stream format information
*
* This method retrieves information about the pixel formats and sizes supported
* by the stream configuration. The sizes are advisory and not all of them are
* guaranteed to be supported by the stream. Users shall always inspect the size
* in the stream configuration after calling CameraConfiguration::validate().
* This function retrieves information about the pixel formats and sizes
* supported by the stream configuration. The sizes are advisory and not all of
* them are guaranteed to be supported by the stream. Users shall always inspect
* the size in the stream configuration after calling
* CameraConfiguration::validate().
*
* \return Stream formats information
*/

View file

@ -35,9 +35,9 @@ LOG_DEFINE_CATEGORY(V4L2)
* \class V4L2Device
* \brief Base class for V4L2VideoDevice and V4L2Subdevice
*
* The V4L2Device class groups together the methods and fields common to
* The V4L2Device class groups together the functions and fields common to
* both the V4L2VideoDevice and V4L2Subdevice classes, and provides a base
* class with methods to open and close the device node associated with the
* class with functions to open and close the device node associated with the
* device and to perform IOCTL system calls on it.
*
* The V4L2Device class cannot be instantiated directly, as its constructor
@ -100,15 +100,15 @@ int V4L2Device::open(unsigned int flags)
* \brief Set the file descriptor of a V4L2 device
* \param[in] fd The file descriptor handle
*
* This method allows a device to provide an already opened file descriptor
* This function allows a device to provide an already opened file descriptor
* referring to the V4L2 device node, instead of opening it with open(). This
* can be used for V4L2 M2M devices where a single video device node is used for
* both the output and capture devices, or when receiving an open file
* descriptor in a context that doesn't have permission to open the device node
* itself.
*
* This method and the open() method are mutually exclusive, only one of the two
* shall be used for a V4L2Device instance.
* This function and the open() function are mutually exclusive, only one of the
* two shall be used for a V4L2Device instance.
*
* \return 0 on success or a negative error code otherwise
*/
@ -160,13 +160,13 @@ void V4L2Device::close()
* \brief Read controls from the device
* \param[in] ids The list of controls to read, specified by their ID
*
* This method reads the value of all controls contained in \a ids, and returns
* their values as a ControlList.
* This function reads the value of all controls contained in \a ids, and
* returns their values as a ControlList.
*
* If any control in \a ids is not supported by the device, is disabled (i.e.
* has the V4L2_CTRL_FLAG_DISABLED flag set), or if any other error occurs
* during validation of the requested controls, no control is read and this
* method returns an empty control list.
* function returns an empty control list.
*
* \return The control values in a ControlList on success, or an empty list on
* error
@ -256,14 +256,14 @@ ControlList V4L2Device::getControls(const std::vector<uint32_t> &ids)
* \brief Write controls to the device
* \param[in] ctrls The list of controls to write
*
* This method writes the value of all controls contained in \a ctrls, and
* This function writes the value of all controls contained in \a ctrls, and
* stores the values actually applied to the device in the corresponding
* \a ctrls entry.
*
* If any control in \a ctrls is not supported by the device, is disabled (i.e.
* has the V4L2_CTRL_FLAG_DISABLED flag set), is read-only, if any other error
* occurs during validation of the requested controls, no control is written and
* this method returns -EINVAL.
* this function returns -EINVAL.
*
* If an error occurs while writing the controls, the index of the first
* control that couldn't be written is returned. All controls below that index

View file

@ -589,15 +589,15 @@ int V4L2VideoDevice::open()
* \param[in] handle The file descriptor to set
* \param[in] type The device type to operate on
*
* This methods opens a video device from the existing file descriptor \a
* handle. Like open(), this method queries the capabilities of the device, but
* handles it according to the given device \a type instead of determining its
* type from the capabilities. This can be used to force a given device type for
* memory-to-memory devices.
* This function opens a video device from the existing file descriptor \a
* handle. Like open(), this function queries the capabilities of the device,
* but handles it according to the given device \a type instead of determining
* its type from the capabilities. This can be used to force a given device type
* for memory-to-memory devices.
*
* The file descriptor \a handle is duplicated, and the caller is responsible
* for closing the \a handle when it has no further use for it. The close()
* method will close the duplicated file descriptor, leaving \a handle
* function will close the duplicated file descriptor, leaving \a handle
* untouched.
*
* \return 0 on success or a negative error code otherwise
@ -1489,8 +1489,8 @@ void V4L2VideoDevice::bufferAvailable([[maybe_unused]] EventNotifier *notifier)
/**
* \brief Dequeue the next available buffer from the video device
*
* This method dequeues the next available buffer from the device. If no buffer
* is available to be dequeued it will return nullptr immediately.
* This function dequeues the next available buffer from the device. If no
* buffer is available to be dequeued it will return nullptr immediately.
*
* \return A pointer to the dequeued buffer on success, or nullptr otherwise
*/