Fix build
Change-Id: Ifb5dd0b11bd616ef5a5a1e79b510b00f1d55672a
diff --git a/tools/emulator/system/camera/EmulatedCamera.cpp b/tools/emulator/system/camera/EmulatedCamera.cpp
index 720b88d..8e02802 100755
--- a/tools/emulator/system/camera/EmulatedCamera.cpp
+++ b/tools/emulator/system/camera/EmulatedCamera.cpp
@@ -88,8 +88,6 @@
status_t EmulatedCamera::Initialize()
{
- LOGV("%s", __FUNCTION__);
-
/*
* Fake required parameters.
*/
@@ -243,16 +241,12 @@
status_t EmulatedCamera::startPreview()
{
- LOGV("%s", __FUNCTION__);
-
/* Callback should return a negative errno. */
return -doStartPreview();
}
void EmulatedCamera::stopPreview()
{
- LOGV("%s", __FUNCTION__);
-
doStopPreview();
}
@@ -458,6 +452,8 @@
status_t EmulatedCamera::doStartPreview()
{
+ LOGV("%s", __FUNCTION__);
+
status_t res = mPreviewWindow.startPreview();
/* Start the camera. */
@@ -474,6 +470,8 @@
status_t EmulatedCamera::doStopPreview()
{
+ LOGV("%s", __FUNCTION__);
+
status_t res = NO_ERROR;
/* Stop the camera. */
if (getCameraDevice()->isCapturing()) {
@@ -490,6 +488,8 @@
status_t EmulatedCamera::startCamera()
{
+ LOGV("%s", __FUNCTION__);
+
status_t res = EINVAL;
EmulatedCameraDevice* camera_dev = getCameraDevice();
if (camera_dev != NULL) {
@@ -539,6 +539,8 @@
status_t EmulatedCamera::stopCamera()
{
+ LOGV("%s", __FUNCTION__);
+
status_t res = NO_ERROR;
EmulatedCameraDevice* const camera_dev = getCameraDevice();
if (camera_dev != NULL) {
diff --git a/tools/emulator/system/camera/EmulatedCameraDevice.cpp b/tools/emulator/system/camera/EmulatedCameraDevice.cpp
index 69c61c5..603affc 100755
--- a/tools/emulator/system/camera/EmulatedCameraDevice.cpp
+++ b/tools/emulator/system/camera/EmulatedCameraDevice.cpp
@@ -54,8 +54,6 @@
status_t EmulatedCameraDevice::Initialize()
{
- LOGV("%s", __FUNCTION__);
-
if (isInitialized()) {
LOGW("%s: Emulated camera device is already initialized: mState = %d",
__FUNCTION__, mState);
diff --git a/tools/emulator/system/camera/EmulatedCameraFactory.cpp b/tools/emulator/system/camera/EmulatedCameraFactory.cpp
index 68c9179..d6ba9b4 100755
--- a/tools/emulator/system/camera/EmulatedCameraFactory.cpp
+++ b/tools/emulator/system/camera/EmulatedCameraFactory.cpp
@@ -112,6 +112,8 @@
int EmulatedCameraFactory::cameraDeviceOpen(int camera_id, hw_device_t** device)
{
+ LOGV("%s: id = %d", __FUNCTION__, camera_id);
+
*device = NULL;
if (!isConstructedOK()) {
@@ -130,6 +132,8 @@
int EmulatedCameraFactory::getCameraInfo(int camera_id, struct camera_info* info)
{
+ LOGV("%s: id = %d", __FUNCTION__, camera_id);
+
if (!isConstructedOK()) {
LOGE("%s: EmulatedCameraFactory has failed to initialize", __FUNCTION__);
return -EINVAL;
diff --git a/tools/emulator/system/camera/EmulatedFakeCamera.cpp b/tools/emulator/system/camera/EmulatedFakeCamera.cpp
index b2d0969..8365e14 100755
--- a/tools/emulator/system/camera/EmulatedFakeCamera.cpp
+++ b/tools/emulator/system/camera/EmulatedFakeCamera.cpp
@@ -43,8 +43,6 @@
status_t EmulatedFakeCamera::Initialize()
{
- LOGV("%s", __FUNCTION__);
-
status_t res = mFakeCameraDevice.Initialize();
if (res != NO_ERROR) {
return res;
diff --git a/tools/emulator/system/camera/EmulatedQemuCameraDevice.cpp b/tools/emulator/system/camera/EmulatedQemuCameraDevice.cpp
index e80cbb7..da2c42d 100755
--- a/tools/emulator/system/camera/EmulatedQemuCameraDevice.cpp
+++ b/tools/emulator/system/camera/EmulatedQemuCameraDevice.cpp
@@ -62,7 +62,7 @@
__FUNCTION__, device_name);
mDeviceName = device_name;
} else {
- mQemuClient.disconnectDevice();
+ mQemuClient.queryDisconnect();
}
return res;
diff --git a/tools/emulator/system/camera/PreviewWindow.cpp b/tools/emulator/system/camera/PreviewWindow.cpp
index 113951f..f0b9364 100755
--- a/tools/emulator/system/camera/PreviewWindow.cpp
+++ b/tools/emulator/system/camera/PreviewWindow.cpp
@@ -111,6 +111,8 @@
nsecs_t timestamp,
EmulatedCameraDevice* camera_dev)
{
+ LOGV("%s", __FUNCTION__);
+
int res;
Mutex::Autolock locker(&mObjectLock);
diff --git a/tools/emulator/system/camera/QemuClient.cpp b/tools/emulator/system/camera/QemuClient.cpp
index 82a8574..2844772 100755
--- a/tools/emulator/system/camera/QemuClient.cpp
+++ b/tools/emulator/system/camera/QemuClient.cpp
@@ -240,6 +240,8 @@
void QemuClient::disconnectClient()
{
+ LOGV("%s", __FUNCTION__);
+
if (mPipeFD >= 0) {
close(mPipeFD);
mPipeFD = -1;
@@ -368,6 +370,8 @@
status_t FactoryQemuClient::listCameras(char** list)
{
+ LOGV("%s", __FUNCTION__);
+
QemuQuery query(mQueryList);
doQuery(&query);
if (!query.isQuerySucceeded()) {
@@ -424,6 +428,8 @@
status_t CameraQemuClient::queryConnect()
{
+ LOGV("%s", __FUNCTION__);
+
QemuQuery query(mQueryConnect);
doQuery(&query);
const status_t res = query.getCompletionStatus();
@@ -435,6 +441,8 @@
status_t CameraQemuClient::queryDisconnect()
{
+ LOGV("%s", __FUNCTION__);
+
QemuQuery query(mQueryDisconnect);
doQuery(&query);
const status_t res = query.getCompletionStatus();
@@ -448,6 +456,8 @@
int width,
int height)
{
+ LOGV("%s", __FUNCTION__);
+
char query_str[256];
snprintf(query_str, sizeof(query_str), "%s dim=%dx%d pix=%d",
mQueryStart, width, height, pixel_format);
@@ -462,6 +472,8 @@
status_t CameraQemuClient::queryStop()
{
+ LOGV("%s", __FUNCTION__);
+
QemuQuery query(mQueryStop);
doQuery(&query);
const status_t res = query.getCompletionStatus();
@@ -476,6 +488,8 @@
size_t vframe_size,
size_t pframe_size)
{
+ LOGV("%s", __FUNCTION__);
+
char query_str[256];
snprintf(query_str, sizeof(query_str), "%s video=%d preview=%d",
mQueryFrame, (vframe && vframe_size) ? vframe_size : 0,