PipeWire libcamera-utils.cpp fails to build since libcamera 560f5cf on 2021-12-04
libcamera commit 560f5cf998646ddc54a20dc1c7326012834d3204 renames fd() to get(), breaking spa/plugins/libcamera/libcamera-utils.cpp in pipewire:
In file included from ../../../../../../code/pipewire/spa/plugins/libcamera/libcamera-source.cpp:175:
../../../../../../code/pipewire/spa/plugins/libcamera/libcamera-utils.cpp: In function ‘int mmap_init(impl*, port*, spa_buffer**, uint32_t)’:
../../../../../../code/pipewire/spa/plugins/libcamera/libcamera-utils.cpp:561:67: error: ‘const class libcamera::SharedFD’ has no member named ‘fd’; did you mean ‘std::shared_ptr<libcamera::SharedFD::Descriptor> libcamera::SharedFD::fd_’? (not accessible from this context)
561 | d[j].fd = bufs[i]->planes()[j].fd.fd();
| ^~
In file included from /usr/include/libcamera/libcamera/framebuffer.h:17,
from /usr/include/libcamera/libcamera/stream.h:16,
from /usr/include/libcamera/libcamera/camera.h:22,
from ../../../../../../code/pipewire/spa/plugins/libcamera/libcamera-source.cpp:54:
/usr/include/libcamera/libcamera/base/shared_fd.h:46:37: note: declared private here
46 | std::shared_ptr<Descriptor> fd_;
| ^~~
In file included from ../../../../../../code/pipewire/spa/plugins/libcamera/libcamera-source.cpp:175:
../../../../../../code/pipewire/spa/plugins/libcamera/libcamera-utils.cpp:571:73: error: ‘const class libcamera::SharedFD’ has no member named ‘fd’; did you mean ‘std::shared_ptr<libcamera::SharedFD::Descriptor> libcamera::SharedFD::fd_’? (not accessible from this context)
571 | bufs[i]->planes()[j].fd.fd(),
| ^~
In file included from /usr/include/libcamera/libcamera/framebuffer.h:17,
from /usr/include/libcamera/libcamera/stream.h:16,
from /usr/include/libcamera/libcamera/camera.h:22,
from ../../../../../../code/pipewire/spa/plugins/libcamera/libcamera-source.cpp:54:
/usr/include/libcamera/libcamera/base/shared_fd.h:46:37: note: declared private here
46 | std::shared_ptr<Descriptor> fd_;
| ^~~
When do you plan to change pipewire to use this new API? (Arch Linux only has a libcamera-git package tracking master, not a libcamera AUR or official package, and libcamera has no version tags other than v0.0.0 from 2018.) I'm not sure how to make pipewire support building with both old and new libcamera.