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

Niklas Söderlund niklas.soderlund at ragnatech.se
Thu Aug 13 12:31:14 CEST 2020


Hi Umang,

Thanks for your work.

On 2020-08-10 12:04:11 +0000, Umang Jain wrote:
> Treat all UVC cameras as external for android framework to know that
> they are external.

nit: I would rewrite this to describe that as we currently have no way 
to determine the location if a UVC camera mark it External to have a 
starting point for the property.

With or without this fixed but with the comments by Kieran and Laurent 
fixed,

Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>

> 
> 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. */
> +	properties_.set(properties::Location, properties::CameraLocationExternal);
> +
>  	/* Initialise the supported controls. */
>  	ControlInfoMap::Map ctrls;
>  
> -- 
> 2.26.2
> 
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

-- 
Regards,
Niklas Söderlund


More information about the libcamera-devel mailing list