hongquan / CoBang

A QR code scanner desktop app for Linux
GNU General Public License v3.0
253 stars 26 forks source link

Camera not working on Pinephone #42

Open AndyM48 opened 3 years ago

AndyM48 commented 3 years ago

I am running CoBang on a Pinephone with Arch Linux and Phosh. Starting CoBang from the command line (SSH) shows: $ cobang

(main.py:12121): GStreamer-CRITICAL **: 08:43:05.970: gst_element_message_full_with_details: assertion GST_IS_ELEMENT (element) failed

(main.py:12121): GStreamer-CRITICAL **: 08:43:05.971: gst_element_message_full_with_details: assertion GST_IS_ELEMENT (element) failed

There is no video and it seems that only one of the cameras has been identified

screenshot

According to the wiki

The PinePhone has two cameras, OmniVision OV5640 with 5MP (up to 2592 x 1944 pixels) as rear camera and GalaxyCore GC2145 with 2MP (up to 1600 x 1200 pixels) as front camera.

Both cameras work with Megapixel.

hongquan commented 3 years ago

Hi @fdservices

According to MegaPixel author https://git.sr.ht/~martijnbraam/megapixels, this camera is not supported by higher-level library (GStreamer), he has to do low-level stuff to access this camera video stream. Doing like this requires to have a real device. I don't have a real device so I cannot do it. Hopefully the camera is supported by some higher-level libraries someday.

rafael2k commented 2 years ago

Libcamera does support the cameras and gstlibcamera gstreamer source does provide support for them.