-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
plane.fd.fd() has changed to plane.fd.get() #1
Comments
Thanks for reporting! Do you use
(I'm using |
It report to me the same version as yours: 0~git20211020+f4070274-3 |
Same issue as before after download and re-building libcamera: pi@campi:~/LCCV/build $ cmake .. pi@campi: Same version as before: libcamera0/stable 0~git20211020+f4070274-3 armhf Do you think that could be related to some old still existing libs on my system? |
The |
Hi
depending on the version of libcamera you use the usage of plane() has changed.
My libcamera version is:
pi@campi:~/LCCV/build $ cmake ..
-- Platform: armhf
-- libcamera library found:
-- version: 1.0
-- libraries: /usr/local/lib/arm-linux-gnueabihf/libcamera.so;/usr/local/lib/arm-linux-gnueabihf/libcamera-base.so
-- include path: /usr/local/include/libcamera
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/LCCV/build
With this I go a compilation error:
/home/pi/LCCV/src/libcamera_app.cpp: In member function ‘void LibcameraApp::setupCapture()’:
/home/pi/LCCV/src/libcamera_app.cpp:556:54: error: ‘const class libcamera::SharedFD’ has no member named ‘fd’; did you mean ‘std::shared_ptrlibcamera::SharedFD::Descriptor libcamera::SharedFD::fd_’? (not accessible from this context)
556 | if (i == buffer->planes().size() - 1 || plane.fd.fd() != buffer->planes()[i + 1].fd.fd())
| ^~
compilation terminated due to -Wfatal-errors.
make[2]: *** [CMakeFiles/liblccv.dir/build.make:95: CMakeFiles/liblccv.dir/src/libcamera_app.cpp.o] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:95: CMakeFiles/liblccv.dir/all] Fehler 2
make: *** [Makefile:171: all] Fehler 2
So changing following lines in libcamera_apps.cpp from plane().fd.fd() to plane().fd.get() is now working for me:
void LibcameraApp::setupCapture()
...
if (i == buffer->planes().size() - 1 || plane.fd.get() != buffer->planes()[i + 1].fd.get())
{
void *memory = mmap(NULL, buffer_size, PROT_READ | PROT_WRITE, MAP_SHARED, plane.fd.get(), 0);
...
Best Regards and thank's a lot for you work!
The text was updated successfully, but these errors were encountered: