[libcamera-devel] [PATCH 4/4] libcamera: mediadevice: Improve documentation

Laurent Pinchart laurent.pinchart at ideasonboard.com
Wed Jan 2 01:43:41 CET 2019


Hi Kieran,

On Wednesday, 2 January 2019 00:06:14 EET Kieran Bingham wrote:
> On 01/01/2019 21:23, Laurent Pinchart wrote:
> > Improve the documentation of the media device operation, including how
> > it handles the lifetime of media objects.
> 
> Some potential issues to consider inline.
> 
> With those fixed,
> 
> Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
> 
> > Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> > ---
> > 
> >  src/libcamera/include/media_device.h |   2 +-
> >  src/libcamera/media_device.cpp       | 113 ++++++++++++++++-----------
> >  2 files changed, 70 insertions(+), 45 deletions(-)

[snip]

> > diff --git a/src/libcamera/media_device.cpp
> > b/src/libcamera/media_device.cpp index 4c77d3787391..2470c0be806e 100644
> > --- a/src/libcamera/media_device.cpp
> > +++ b/src/libcamera/media_device.cpp

[snip]

> >  /**
> > - * \brief Delete all media objects in the MediaDevice.
> > + * \brief Delete all graph objects in the media device
> > + *
> > + * Clear the media graph and delete all the objects it contains. After
> > this + * function returns any previously obtained pointer to a media
> > graph object + * becomes invalid.
> >   *
> > - * Delete all MediaEntities; entities will then delete their pads,
> > - * and each source pad will delete links.
> > + * The media device graph state is reset to invalid when the graph is
> > cleared.
> >   *
> > - * After this function has been called, the media graph will be
> > unpopulated - * and its media objects deleted. The media device has to be
> > populated - * before it could be used again.
> > + * \sa valid()
> 
> What does \sa valid() do here?

It links to the valid() function (sa stands for see also).

> >   */
> >  void MediaDevice::clear()
> >  {

-- 
Regards,

Laurent Pinchart





More information about the libcamera-devel mailing list