[libcamera-devel] [PATCH 1/3] libcamera: ipu3: Improve error on multiple raw streams request

Jacopo Mondi jacopo at jmondi.org
Mon Jun 29 12:32:02 CEST 2020


Hi Kieran,

On Mon, Jun 29, 2020 at 11:21:45AM +0100, Kieran Bingham wrote:
> Hi Jacopo,
>
> On 28/06/2020 16:55, Jacopo Mondi wrote:
> > Improve the error message emitted when multiple raw streams are
> > requested.
> >
> > Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
> > ---
> >  src/libcamera/pipeline/ipu3/ipu3.cpp | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
> > index f2aa0caede7f..ef57196c32da 100644
> > --- a/src/libcamera/pipeline/ipu3/ipu3.cpp
> > +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
> > @@ -341,8 +341,7 @@ CameraConfiguration *PipelineHandlerIPU3::generateConfiguration(Camera *camera,
> >  		case StreamRole::StillCaptureRaw: {
> >  			if (streams.find(&data->rawStream_) == streams.end()) {
> >  				LOG(IPU3, Error)
> > -					<< "No stream available for requested role "
> > -					<< role;
> > +					<< "Multiple raw streams are not supported";
>
> I'm confused. Doesn't this conditional block look to find the rawStream
> in the streams, and if it doesn't exist print this message?
>

Yes

> I can't see where the context is that means this is adding 'another' raw
> stream... unless the logic is inverted in the if statement? (or I'm just
> getting it wrong).


The functions declares an array of available streams
	std::set<Stream *> streams = {
		&data->outStream_,
		&data->vfStream_,
		&data->rawStream_,
	};

when one gets assigned it is removed from there

		streams.erase(stream);

So if we get here and fail to find rawStream_, it means it has been
assigned already.


>
>
>
>
> >  				break;
> >  			}
> >
> >
>
> --
> Regards
> --
> Kieran


More information about the libcamera-devel mailing list