зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1103400
- add autofocus support to WebRTC on Gonk, r=aosmond,jesup
This commit is contained in:
Родитель
8f08848fe0
Коммит
2c017fb242
|
@ -329,6 +329,15 @@ MediaEngineGonkVideoSource::StartImpl(webrtc::CaptureCapability aCapability) {
|
||||||
mCameraControl->Start(&config);
|
mCameraControl->Start(&config);
|
||||||
mCameraControl->Set(CAMERA_PARAM_PICTURE_SIZE, config.mPreviewSize);
|
mCameraControl->Set(CAMERA_PARAM_PICTURE_SIZE, config.mPreviewSize);
|
||||||
|
|
||||||
|
nsTArray<nsString> focusModes;
|
||||||
|
mCameraControl->Get(CAMERA_PARAM_SUPPORTED_FOCUSMODES, focusModes);
|
||||||
|
for (nsTArray<nsString>::index_type i = 0; i < focusModes.Length(); ++i) {
|
||||||
|
if (focusModes[i].EqualsASCII("continuous-video")) {
|
||||||
|
mCameraControl->Set(CAMERA_PARAM_FOCUSMODE, focusModes[i]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
hal::RegisterScreenConfigurationObserver(this);
|
hal::RegisterScreenConfigurationObserver(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче