Getting started for developers
#2
For cameras and microphone, you are probably best off targeting PipeWire (using libcamera as the backend) or a higher-level interface such as GStreamer on top of PipeWire (or even a wrapper around GStreamer, such as QtMultimedia). Though you will find that the cameras on the original PinePhone only work with libcamera if you use at least version 6.2 of the megi kernel, which most distros are not yet shipping because the camera application Megapixels (which uses low-level camera interfaces) does not yet work with that version on the original PinePhone.

As for the accelerometer (gravity sensor), it is just an IIO device, so you can access it with a file-based interface, see, e.g., https://svn.calcforge.org/viewvc/pinephone-videorec/record.sh?revision=1&view=markup#l8. Though reportedly the "device3" part actually depends on the distro, so you may be better off allowing any "device*" as long as it contains the correct files. (A device is only going to have files like "in_accel_x_raw" in its directory if it is an accelerometer.) But if all you want to know is whether we are in portrait or landscape (or reverse portrait or reverse landscape, there are 4 possible rotation angles) mode, you are better off asking Wayland directly (as done, e.g., in this Megapixels commit) or using a wrapper API like QtGui's QScreen (QGuiApplication::primaryScreen()->orientation()).
  Reply


Messages In This Thread
Getting started for developers - by lagrang3 - 05-22-2023, 04:20 AM
RE: Getting started for developers - by Kevin Kofler - 05-23-2023, 06:59 PM
RE: Getting started for developers - by lagrang3 - 07-12-2023, 04:58 AM
RE: Getting started for developers - by lagrang3 - 07-15-2023, 06:42 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Developers wanted to make out of the PinePhone a Respiratory Monitor Peter Gamma 0 1,168 03-20-2022, 10:58 AM
Last Post: Peter Gamma
Photo Getting started with Mobian...stuck LG123 5 6,834 03-10-2021, 08:18 AM
Last Post: LG123
  Getting started Mwo87 17 17,141 02-01-2021, 11:10 PM
Last Post: Mwo87
Star Thankyou Pine team and Developers food 3 3,429 11-29-2020, 10:12 AM
Last Post: kern707
  CANT GET STARTED snow season 2 4,091 10-22-2020, 09:44 PM
Last Post: bcnaz
  Any other ham radio folks here? - started a repeater app. programmin 7 9,803 06-25-2020, 10:51 PM
Last Post: programmin

Forum Jump:


Users browsing this thread: 1 Guest(s)