Bug 1121769 - push picture size to the camera driver, even in video mode, r=aosmond

This commit is contained in:
Mike Habicher 2015-01-22 12:25:49 -05:00
parent 463e25d3fd
commit d55fba3d1c

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2012-2014 Mozilla Foundation
* Copyright (C) 2012-2015 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -349,11 +349,19 @@ nsGonkCameraControl::SetConfigurationInternal(const Configuration& aConfig)
if (NS_FAILED(rv)) {
DOM_CAMERA_LOGE("Failed to set recording hint (0x%x)\n", rv);
}
}
mCurrentConfiguration.mMode = config.mMode;
mCurrentConfiguration.mRecorderProfile = config.mRecorderProfile;
mCurrentConfiguration.mPictureSize = config.mPictureSize;
mCurrentConfiguration.mMode = config.mMode;
mCurrentConfiguration.mRecorderProfile = config.mRecorderProfile;
if (config.mMode == kPictureMode) {
mCurrentConfiguration.mPictureSize = config.mPictureSize;
} else /* if config.mMode == kVideoMode */ {
// The following is best-effort; we don't currently support taking
// pictures while in video mode, but we should at least return
// sane values to OnConfigurationChange() handlers...
SetPictureSizeImpl(config.mPictureSize);
}
}
return NS_OK;
}