Thanks, it's greatly appreciated! I'll take a look at the source code and see if we can use a combination of libcamera-still for regular captures and libcamera-vid for streaming.
Not libcamera-vid. but libcamera-raw for video. That is my recommendation, due to speed. Unfortunately that means no preview but we get raw data and that is important.
Hi again. Thanks for all the work! Though I'm having problems when trying to make the driver from your git. I get 2 errors; have you run into these before? Thanks again.
astroberry@astroberry:~/Projects/build/indi-rpicam2x $ make -j4
[ 6%] Building CXX object CMakeFiles/rpicam2x.dir/mmaldriver.cpp.o
In file included from /home/astroberry/Projects/indi-3rdparty/indi-rpicam2x/mmaldriver.cpp:37:
/home/astroberry/Projects/indi-3rdparty/indi-rpicam2x/mmaldriver.h:65:18: error: ?virtual void MMALDriver::addFITSKeywords(fitsfile*, INDI::CCDChip*)? marked ?override?, but does not override
virtual void addFITSKeywords(fitsfile * fptr, INDI::CCDChip * targetChip) override;
^~~~~~~~~~~~~~~
/home/astroberry/Projects/indi-3rdparty/indi-rpicam2x/mmaldriver.cpp: In member function ?virtual void MMALDriver::addFITSKeywords(fitsfile*, INDI::CCDChip*)?:
/home/astroberry/Projects/indi-3rdparty/indi-rpicam2x/mmaldriver.cpp:103:48: error: no matching function for call to ?MMALDriver::addFITSKeywords(fitsfile*&, INDI::CCDChip*&)?
INDI::CCD::addFITSKeywords(fptr, targetChip);
^
In file included from /home/astroberry/Projects/indi-3rdparty/indi-rpicam2x/mmaldriver.h:24,
from /home/astroberry/Projects/indi-3rdparty/indi-rpicam2x/mmaldriver.cpp:37:
/usr/include/libindi/indiccd.h:508:22: note: candidate: ?virtual void INDI::CCD::addFITSKeywords(INDI::CCDChip*)?
virtual void addFITSKeywords(CCDChip * targetChip);
^~~~~~~~~~~~~~~
/usr/include/libindi/indiccd.h:508:22: note: candidate expects 1 argument, 2 provided
make[2]: *** [CMakeFiles/rpicam2x.dir/build.make:76: CMakeFiles/rpicam2x.dir/mmaldriver.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:78: CMakeFiles/rpicam2x.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
You can find the code in this git, and there are guides on git how to build and install. I saw Jason started on libcamera implementation, hopefully I will be able to help with that and we can forget about this implementation, but for now I still use it for guiding. Not the best option but fairly good.
mkdir -p ~/Projects/build/indi-rpicam
cd ~/Projects/build/indi-rpicam
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug ~/Projects/indi-3rdparty/indi-rpicam
make -j4
sudo make install
It depends on both libcamera and libcamera-apps (provided by Raspberry PI OS). It would be nice if it is just dependency on libcamera, but that would take more work. One problem I encountered is that in detectCamera() We use camera manager. Because also libcamera-apps uses camera manager, this results in some conflicts where only 1 instance can be alive at a time. Despite the fact that the object is destroyed when the function goes out of scope, libcamera crashes when libcamera-apps tries again to create another instance of CameraManager.
I was able to capture from IMX219 camera just fine. This driver is in its early stages.