techyian / MMALSharp

C# wrapper to Broadcom's MMAL with an API to the Raspberry Pi camera.
MIT License
195 stars 33 forks source link

StereoMode not being set #194

Open mike-a-fischer opened 3 years ago

mike-a-fischer commented 3 years ago

I am trying to configure a CM4 with two cameras to operate in side-by-side stereomode. I saw the note that stereomode is untested. I was able to set the MMALCameraConfig.StereoMode to be MMAL_STEREOSCOPIC_MODE_T.MMAL_STEREOSCOPIC_MODE_SIDE_BY_SIDE but the video is not recording stereo.

techyian commented 3 years ago

Without access to the hardware in question, it's very difficult for me to implement and test the code required to get this working for you. I would be happy to accept a PR if you can implement this yourself. The notes clearly state that MMALSharp currently supports just 1 camera module, and therefore stereo mode will not work. The code was simply added for consistency with Raspistill/vid. I suspect the library will need to parse all available cameras and build MMAL pipelines for each in order for this to work, unless MMAL is clever enough to send frames containing data from both cameras using just a single pipeline.