Closed Bug 1014330 Opened 12 years ago Closed 8 years ago

[Camera] Add support for device profiles for configuration

Categories

(Firefox OS Graveyard :: Gaia::Camera, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: justindarc, Unassigned)

Details

Because of all the inconsistencies with the camera drivers on various devices, we should consider adding support for per-device configuration profiles that can be used to override default configurations. Example: Helix and Nexus 4 do not zoom the preview stream in the camera driver, but Flame does. We can have a different device profile for Helix and Nexus 4 for setting the `useZoomPreviewAdjustment` flag by default.
Would it be possible to have config.js, config.helix.js, config.flame.js, etc and the `make install-gaia` could detect the device type connected, or take a parameter to pick the correct config?
I'm going to try and investigate that today. In a worst-case scenario, we'll have to async update the config at runtime.
I think compiling config at runtime is a bad idea. Perhaps all the config can just live in one file and we pick the correct one. Unless, is there are way to feature detect this stuff?
I agree that it's a bad idea, however there's no other option as far as I can tell. We are unable to feature detect things like whether or not the preview stream will properly represent the current zoom level (it does on Flame, but not on Helix or Nexus 4). We are already doing an ugly hack for zoom for the Nexus 4, so the purpose of this bug is to just clean this up as much as possible to avoid having conditionals within the code. If this can be detected at build-time to pick the proper configuration though, that would be our best option.
Assignee: nobody → jdarcangelo
Not working on this. Unassigning myself.
Assignee: jdarcangelo → nobody
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.