[libcamera-devel,v2,01/12] libcamera: FrameBuffer: Correct Buffer references

Message ID 20200803161816.107113-2-kieran.bingham@ideasonboard.com
State Superseded
Headers show
Series
  • android: jpeg
Related show

Commit Message

Kieran Bingham Aug. 3, 2020, 4:18 p.m. UTC
Update the remaining (capitalised) Buffer references to the new FrameBuffer
object that they refer to.

Lower-case 'buffer' terms are kept, as a generic reference to a buffer
rather than the specific type 'FrameBuffer'.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
---
 src/libcamera/buffer.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Laurent Pinchart Aug. 3, 2020, 4:21 p.m. UTC | #1
Hi Kieran,

Thank you for the patch.

On Mon, Aug 03, 2020 at 05:18:05PM +0100, Kieran Bingham wrote:
> Update the remaining (capitalised) Buffer references to the new FrameBuffer
> object that they refer to.
> 
> Lower-case 'buffer' terms are kept, as a generic reference to a buffer
> rather than the specific type 'FrameBuffer'.
> 
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
> ---
>  src/libcamera/buffer.cpp | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/libcamera/buffer.cpp b/src/libcamera/buffer.cpp
> index 1a1d4bac7aed..8278f8a92af4 100644
> --- a/src/libcamera/buffer.cpp
> +++ b/src/libcamera/buffer.cpp
> @@ -174,11 +174,11 @@ FrameBuffer::FrameBuffer(const std::vector<Plane> &planes, unsigned int cookie)
>   * The intended callers of this method are buffer completion handlers that
>   * need to associate a buffer to the request it belongs to.
>   *
> - * A Buffer is associated to a request by Request::addBuffer() and the
> + * A FrameBuffer is associated to a request by Request::addBuffer() and the
>   * association is valid until the buffer completes. The returned request
>   * pointer is valid only during that interval.
>   *
> - * \return The Request the Buffer belongs to, or nullptr if the buffer is
> + * \return The Request the FrameBuffer belongs to, or nullptr if the buffer is
>   * not associated with a request
>   */
>  
> @@ -224,7 +224,7 @@ FrameBuffer::FrameBuffer(const std::vector<Plane> &planes, unsigned int cookie)
>  
>  /**
>   * \brief Copy the contents from another buffer
> - * \param[in] src Buffer to copy
> + * \param[in] src FrameBuffer to copy

This could stay the same as Buffer is capitalized due to being the first
word. Doesn't matter much though.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

>   *
>   * Copy the buffer contents and metadata from \a src to this buffer. The
>   * destination FrameBuffer shall have the same number of planes as the source
Kieran Bingham Aug. 4, 2020, 8:03 a.m. UTC | #2
Hi Laurent,

On 03/08/2020 17:21, Laurent Pinchart wrote:
> Hi Kieran,
> 
> Thank you for the patch.
> 
> On Mon, Aug 03, 2020 at 05:18:05PM +0100, Kieran Bingham wrote:
>> Update the remaining (capitalised) Buffer references to the new FrameBuffer
>> object that they refer to.
>>
>> Lower-case 'buffer' terms are kept, as a generic reference to a buffer
>> rather than the specific type 'FrameBuffer'.
>>
>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
>> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
>> ---
>>  src/libcamera/buffer.cpp | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/src/libcamera/buffer.cpp b/src/libcamera/buffer.cpp
>> index 1a1d4bac7aed..8278f8a92af4 100644
>> --- a/src/libcamera/buffer.cpp
>> +++ b/src/libcamera/buffer.cpp
>> @@ -174,11 +174,11 @@ FrameBuffer::FrameBuffer(const std::vector<Plane> &planes, unsigned int cookie)
>>   * The intended callers of this method are buffer completion handlers that
>>   * need to associate a buffer to the request it belongs to.
>>   *
>> - * A Buffer is associated to a request by Request::addBuffer() and the
>> + * A FrameBuffer is associated to a request by Request::addBuffer() and the
>>   * association is valid until the buffer completes. The returned request
>>   * pointer is valid only during that interval.
>>   *
>> - * \return The Request the Buffer belongs to, or nullptr if the buffer is
>> + * \return The Request the FrameBuffer belongs to, or nullptr if the buffer is
>>   * not associated with a request
>>   */
>>  
>> @@ -224,7 +224,7 @@ FrameBuffer::FrameBuffer(const std::vector<Plane> &planes, unsigned int cookie)
>>  
>>  /**
>>   * \brief Copy the contents from another buffer
>> - * \param[in] src Buffer to copy
>> + * \param[in] src FrameBuffer to copy
> 
> This could stay the same as Buffer is capitalized due to being the first
> word. Doesn't matter much though.

Good point, but I think the context is correct in both cases anyway.

> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Thanks ;-)

> 
>>   *
>>   * Copy the buffer contents and metadata from \a src to this buffer. The
>>   * destination FrameBuffer shall have the same number of planes as the source
>

Patch

diff --git a/src/libcamera/buffer.cpp b/src/libcamera/buffer.cpp
index 1a1d4bac7aed..8278f8a92af4 100644
--- a/src/libcamera/buffer.cpp
+++ b/src/libcamera/buffer.cpp
@@ -174,11 +174,11 @@  FrameBuffer::FrameBuffer(const std::vector<Plane> &planes, unsigned int cookie)
  * The intended callers of this method are buffer completion handlers that
  * need to associate a buffer to the request it belongs to.
  *
- * A Buffer is associated to a request by Request::addBuffer() and the
+ * A FrameBuffer is associated to a request by Request::addBuffer() and the
  * association is valid until the buffer completes. The returned request
  * pointer is valid only during that interval.
  *
- * \return The Request the Buffer belongs to, or nullptr if the buffer is
+ * \return The Request the FrameBuffer belongs to, or nullptr if the buffer is
  * not associated with a request
  */
 
@@ -224,7 +224,7 @@  FrameBuffer::FrameBuffer(const std::vector<Plane> &planes, unsigned int cookie)
 
 /**
  * \brief Copy the contents from another buffer
- * \param[in] src Buffer to copy
+ * \param[in] src FrameBuffer to copy
  *
  * Copy the buffer contents and metadata from \a src to this buffer. The
  * destination FrameBuffer shall have the same number of planes as the source