[libcamera-devel] [PATCH v2 1/4] libcamera: pipeline: uvcvideo: Treat all UVC cameras as external

Laurent Pinchart laurent.pinchart at ideasonboard.com
Tue Aug 11 16:42:54 CEST 2020


Hello,

On Tue, Aug 11, 2020 at 03:19:24PM +0100, Kieran Bingham wrote:
> On 10/08/2020 13:04, Umang Jain wrote:
> > Treat all UVC cameras as external for android framework to know that
> > they are external.
> > 
> > Signed-off-by: Umang Jain <email at uajain.com>
> > ---
> >  src/libcamera/pipeline/uvcvideo/uvcvideo.cpp | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
> > index bc892ec..ed61d12 100644
> > --- a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
> > +++ b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
> > @@ -14,6 +14,7 @@
> >  #include <libcamera/camera.h>
> >  #include <libcamera/control_ids.h>
> >  #include <libcamera/controls.h>
> > +#include <libcamera/property_ids.h>
> >  #include <libcamera/request.h>
> >  #include <libcamera/stream.h>
> >  
> > @@ -500,6 +501,9 @@ int UVCCameraData::init(MediaEntity *entity)
> >  
> >  	video_->bufferReady.connect(this, &UVCCameraData::bufferReady);
> >  
> > +	/* Initialise Camera Property. Treat all UVC cameras as external. */
> 
> Probably don't need to say "Initialise Camera Property", but either way.

Best would be to add a todo item to explain what will need to change.

	/*
	 * \todo Find a way to tell internal and external UVC cameras apart.
	 * Until then, treat all UVC cameras as external.
	 */

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

> Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
> 
> > +	properties_.set(properties::Location, properties::CameraLocationExternal);
> > +
> >  	/* Initialise the supported controls. */
> >  	ControlInfoMap::Map ctrls;
> >  

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list