libcamera: camera configuration: Add at() function in doc
The documentation suggests to use CameraConfiguration::operator[] to access the StreamConfiguration it contains, but as CameraConfiguration instances are generated by the Camera class and are returned wrapped in a unique_ptr<>, the usage of operator[] would require an awkward syntax such as (*config)[i]. Better to suggest the usage of the CameraConfiguration::at() function instead to access the StreamConfigurations. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
6453e75c7a
commit
643cc403fe
1 changed files with 3 additions and 3 deletions
|
@ -114,9 +114,9 @@ LOG_DECLARE_CATEGORY(Camera)
|
||||||
* The CameraConfiguration holds an ordered list of stream configurations. It
|
* The CameraConfiguration holds an ordered list of stream configurations. It
|
||||||
* supports iterators and operates as a vector of StreamConfiguration instances.
|
* supports iterators and operates as a vector of StreamConfiguration instances.
|
||||||
* The stream configurations are inserted by addConfiguration(), and the
|
* The stream configurations are inserted by addConfiguration(), and the
|
||||||
* operator[](int) returns a reference to the StreamConfiguration based on its
|
* at() function or operator[] return a reference to the StreamConfiguration
|
||||||
* insertion index. Accessing a stream configuration with an invalid index
|
* based on its insertion index. Accessing a stream configuration with an
|
||||||
* results in undefined behaviour.
|
* invalid index results in undefined behaviour.
|
||||||
*
|
*
|
||||||
* CameraConfiguration instances are retrieved from the camera with
|
* CameraConfiguration instances are retrieved from the camera with
|
||||||
* Camera::generateConfiguration(). Applications may then inspect the
|
* Camera::generateConfiguration(). Applications may then inspect the
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue