diff --git a/include/libcamera_app.hpp b/include/libcamera_app.hpp index ecd5771..2522a13 100644 --- a/include/libcamera_app.hpp +++ b/include/libcamera_app.hpp @@ -30,6 +30,7 @@ #include #include #include +#include class Options; struct CompletedRequest; @@ -226,9 +227,15 @@ struct FrameInfo if (fom) focus = *fom; - auto ae = ctrls.get(libcamera::controls::AeState); - if (ae) - aelock = (*ae == libcamera::controls::AeStateSearching); +#if LIBCAMERA_VERSION_MINOR == 4 + auto ae = ctrls.get(libcamera::controls::draft::AeState); + if (ae) + aelock = (*ae == libcamera::controls::draft::AeStateLocked); +#else + auto ae = ctrls.get(libcamera::controls::AeState); + if (ae) + aelock = (*ae == libcamera::controls::AeStateSearching); +#endif//LIBCAMERA_VERSION_MINOR } std::string ToString(std::string &info_string) const