EmulatedFakeCamera2: Add more static metadata
- Add entries for all metadata - Use better idiom for static metadata construction - Revise dynamic and static metadata - New resolution reporting - Minor revision to some enums - Quiet excess logging Bug: 6243944 Change-Id: I0558d7d60ae97d2df9e209f24c1e04330737c220
This commit is contained in:
@@ -22,7 +22,7 @@
|
|||||||
* for all camera API calls that defined by camera2_device_ops_t API.
|
* for all camera API calls that defined by camera2_device_ops_t API.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define LOG_NDEBUG 0
|
//#define LOG_NDEBUG 0
|
||||||
#define LOG_TAG "EmulatedCamera2_Camera"
|
#define LOG_TAG "EmulatedCamera2_Camera"
|
||||||
#include <cutils/log.h>
|
#include <cutils/log.h>
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
* available for emulation.
|
* available for emulation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define LOG_NDEBUG 0
|
//#define LOG_NDEBUG 0
|
||||||
#define LOG_TAG "EmulatedCamera_Factory"
|
#define LOG_TAG "EmulatedCamera_Factory"
|
||||||
#include <cutils/log.h>
|
#include <cutils/log.h>
|
||||||
#include <cutils/properties.h>
|
#include <cutils/properties.h>
|
||||||
@@ -44,6 +44,7 @@ EmulatedCameraFactory::EmulatedCameraFactory()
|
|||||||
mFakeCameraNum(0),
|
mFakeCameraNum(0),
|
||||||
mConstructedOK(false)
|
mConstructedOK(false)
|
||||||
{
|
{
|
||||||
|
status_t res;
|
||||||
/* Connect to the factory service in the emulator, and create Qemu cameras. */
|
/* Connect to the factory service in the emulator, and create Qemu cameras. */
|
||||||
if (mQemuClient.connectClient(NULL) == NO_ERROR) {
|
if (mQemuClient.connectClient(NULL) == NO_ERROR) {
|
||||||
/* Connection has succeeded. Create emulated cameras for each camera
|
/* Connection has succeeded. Create emulated cameras for each camera
|
||||||
@@ -90,7 +91,10 @@ EmulatedCameraFactory::EmulatedCameraFactory()
|
|||||||
if (mEmulatedCameras[camera_id] != NULL) {
|
if (mEmulatedCameras[camera_id] != NULL) {
|
||||||
ALOGV("%s: Back camera device version is %d", __FUNCTION__,
|
ALOGV("%s: Back camera device version is %d", __FUNCTION__,
|
||||||
getBackCameraHalVersion());
|
getBackCameraHalVersion());
|
||||||
if (mEmulatedCameras[camera_id]->Initialize() != NO_ERROR) {
|
res = mEmulatedCameras[camera_id]->Initialize();
|
||||||
|
if (res != NO_ERROR) {
|
||||||
|
ALOGE("%s: Unable to intialize back camera %d: %s (%d)",
|
||||||
|
__FUNCTION__, camera_id, strerror(-res), res);
|
||||||
delete mEmulatedCameras[camera_id];
|
delete mEmulatedCameras[camera_id];
|
||||||
mEmulatedCameraNum--;
|
mEmulatedCameraNum--;
|
||||||
}
|
}
|
||||||
@@ -139,7 +143,10 @@ EmulatedCameraFactory::EmulatedCameraFactory()
|
|||||||
if (mEmulatedCameras[camera_id] != NULL) {
|
if (mEmulatedCameras[camera_id] != NULL) {
|
||||||
ALOGV("%s: Front camera device version is %d", __FUNCTION__,
|
ALOGV("%s: Front camera device version is %d", __FUNCTION__,
|
||||||
getFrontCameraHalVersion());
|
getFrontCameraHalVersion());
|
||||||
if (mEmulatedCameras[camera_id]->Initialize() != NO_ERROR) {
|
res = mEmulatedCameras[camera_id]->Initialize();
|
||||||
|
if (res != NO_ERROR) {
|
||||||
|
ALOGE("%s: Unable to intialize front camera %d: %s (%d)",
|
||||||
|
__FUNCTION__, camera_id, strerror(-res), res);
|
||||||
delete mEmulatedCameras[camera_id];
|
delete mEmulatedCameras[camera_id];
|
||||||
mEmulatedCameraNum--;
|
mEmulatedCameraNum--;
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -130,6 +130,11 @@ private:
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Utility methods
|
* Utility methods
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
/** Construct static camera metadata, two-pass */
|
||||||
|
status_t constructStaticInfo(
|
||||||
|
camera_metadata_t **info,
|
||||||
|
bool sizeRequest);
|
||||||
|
|
||||||
/** Two-pass implementation of constructDefaultRequest */
|
/** Two-pass implementation of constructDefaultRequest */
|
||||||
status_t constructDefaultRequest(
|
status_t constructDefaultRequest(
|
||||||
int request_template,
|
int request_template,
|
||||||
@@ -144,7 +149,6 @@ private:
|
|||||||
const void *entry_data,
|
const void *entry_data,
|
||||||
size_t entry_count);
|
size_t entry_count);
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pipeline controller threads
|
* Pipeline controller threads
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
@@ -220,9 +224,12 @@ private:
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
private:
|
private:
|
||||||
static const uint32_t kAvailableFormats[];
|
static const uint32_t kAvailableFormats[];
|
||||||
static const uint32_t kAvailableSizesPerFormat[];
|
static const uint32_t kAvailableRawSizes[];
|
||||||
static const uint32_t kAvailableSizes[];
|
static const uint64_t kAvailableRawMinDurations[];
|
||||||
static const uint64_t kAvailableMinFrameDurations[];
|
static const uint32_t kAvailableProcessedSizes[];
|
||||||
|
static const uint64_t kAvailableProcessedMinDurations[];
|
||||||
|
static const uint32_t kAvailableJpegSizes[];
|
||||||
|
static const uint64_t kAvailableJpegMinDurations[];
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Data members.
|
* Data members.
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define LOG_NDEBUG 0
|
//#define LOG_NDEBUG 0
|
||||||
#define LOG_TAG "EmulatedCamera2_Sensor"
|
#define LOG_TAG "EmulatedCamera2_Sensor"
|
||||||
#include <utils/Log.h>
|
#include <utils/Log.h>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user