ubuntu-phone team mailing list archive
-
ubuntu-phone team
-
Mailing list archive
-
Message #13641
Getting cpuinfo hardware field via API
Hi folks, I'm looking for some advice for how to figure out the phone model we are running on.
Specifically, we are having major grief with gstreamer. On a Nexus 4, we can run two processes side by side that each use a single gstreamer pipeline (at least most of the time). On a BQ, we can run only one, otherwise, things crash, hang, silently deliver the wrong information without an error, etc.
So, by looking at /proc/cpuinfo, I can tell a BQ from, say, a Nexus 4. On a BQ, I get:
Hardware : MT6582
On a Nexus 4, I get:
Hardware : QCT APQ8064 MAKO
Now, this is the information I need, and I can set things up such that they work based on that.
But having to parse the output of /proc/cpuinfo sucks majorly. It's brittle and just awful.
I tried using QDeviceInfo (even though it's unofficial), but there don't appear to be any methods in there that deliver the hardware string I need.
Any suggestions as to how I can get at this information without having to parse /proc/cpuinfo and mucking around with regex and the like?
Thanks,
Michi.
Follow ups