<div dir="ltr"><div><br></div><div>I have fixed the review comments and have installed and configured git send-email. However, apparently it started a new thread, I don't think that is what it should have done:</div><div><a href="https://lists.libcamera.org/pipermail/libcamera-devel/2023-May/037925.html" target="_blank">https://lists.libcamera.org/pipermail/libcamera-devel/2023-May/037925.html</a></div><div>(I used "git send-email --in-reply-to=037947 --to=<a href="mailto:libcamera-devel@lists.libcamera.org" target="_blank">libcamera-devel@lists.libcamera.org</a> patch_file.patch")</div><div><br></div><div>Also, you mentioned that would like to see the original patch better formatted. Should I just create a whole new patch altogether?</div><div><br></div><div>Finally, about the default/non-default discussion, I was trying to be conservative here, because when I opened the original bug (#188), the reply I got sounded like you thought it was a missing feature rather than a bug. For me this is a blocking bug: I can't use the PiCamV3 at all due to random focus behaviour. So therefore I opted for keeping the default behaviour as it was before to make it more likely that this patch will be accepted.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 2, 2023 at 7:19 AM Laurent Pinchart <<a href="mailto:laurent.pinchart@ideasonboard.com" target="_blank">laurent.pinchart@ideasonboard.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, Jun 01, 2023 at 12:24:22PM -0400, Nicolas Dufresne wrote:<br>
> Le jeudi 01 juin 2023 à 08:39 +0100, Naushir Patuck a écrit :<br>
> > > If you have any idea what the default should be in the GStreamer<br>
> > > element, please feel free to chime in :-)<br>
> > <br>
> > Perhaps GStreamer should do nothing with focus by default and rely on the IPA<br>
> > default behaviour (i.e. go to hyperfocal)? This then relies on the application<br>
> > to choose what it wants to do on startup, just like any other application that<br>
> > directly uses libcamera.<br>
> <br>
> To reassure you, it can't be worse then what most UVC camera do today. Having a<br>
> default matching this would help consistency though (or being similarly bad from<br>
> some point of view). Later, on top, there should be ways to move to a more<br>
> manual control in focus aware Gst applications.<br>
<br>
Hmmmm... I'm really in two minds here.<br>
<br>
First of all, we can't expect the same default behaviour for all cameras<br>
when it comes to auto-focus, simply because many cameras don't have a<br>
controllable focus lens, and some (I'm thinking about UVC devices here)<br>
may not have the ability to turn auto-focus on. Still, implementing<br>
consistent defaults where possible is a goal I highly value, in order to<br>
maximize application portability.<br>
<br>
When it comes to the libcamera core, setting the focus lens to the<br>
hyperfocal distance and disabling auto-focus seems like a good default<br>
to me. Different use cases would favour different defaults, and I don't<br>
think there's one particular use case that could be considered so<br>
prevalent that it would call for enabling continuous auto-focus by<br>
default. Different defaults could however be implemented in different<br>
layers. For instance, I could imagine PipeWire deciding to enabling<br>
continuous auto-focus by default on desktop or mobile systems.<br>
<br>
For libcamerasrc, I don't know if the same reasoning should lead to the<br>
same result, or if we should consider that the vast majority of use<br>
cases for the GStreamer element call for enabling auto-focus by default.<br>
I currently side towards doing the same as in the libcamera core, as I<br>
believe it would be confusing for users to have different default<br>
behaviours when using libcamera through different adaptation layers.<br>
However, I could also imagine enabling auto-focus by default in the V4L2<br>
adaptation layer for instance, as that layer is mostly meant to expose<br>
libcamera-based cameras as webcams.<br>
<br>
-- <br>
Regards,<br>
<br>
Laurent Pinchart<br>
</blockquote></div>