Rename LOGV(_IF) to ALOGV(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/143865

Bug: 5449033
Change-Id: Iad3a485eed0dc273d66607d30a7b9b79b02c03b6
This commit is contained in:
Steve Block
2011-10-20 11:55:55 +01:00
parent bd147be5e4
commit 629719e390
12 changed files with 75 additions and 75 deletions

View File

@@ -80,7 +80,7 @@ static void PrintMessages(uint32_t msg)
const char* strs[lCameraMessagesNum]; const char* strs[lCameraMessagesNum];
const int translated = GetMessageStrings(msg, strs, lCameraMessagesNum); const int translated = GetMessageStrings(msg, strs, lCameraMessagesNum);
for (int n = 0; n < translated; n++) { for (int n = 0; n < translated; n++) {
LOGV(" %s", strs[n]); ALOGV(" %s", strs[n]);
} }
} }
@@ -113,7 +113,7 @@ void CallbackNotifier::setCallbacks(camera_notify_callback notify_cb,
camera_request_memory get_memory, camera_request_memory get_memory,
void* user) void* user)
{ {
LOGV("%s: %p, %p, %p, %p (%p)", ALOGV("%s: %p, %p, %p, %p (%p)",
__FUNCTION__, notify_cb, data_cb, data_cb_timestamp, get_memory, user); __FUNCTION__, notify_cb, data_cb, data_cb_timestamp, get_memory, user);
Mutex::Autolock locker(&mObjectLock); Mutex::Autolock locker(&mObjectLock);
@@ -126,29 +126,29 @@ void CallbackNotifier::setCallbacks(camera_notify_callback notify_cb,
void CallbackNotifier::enableMessage(uint msg_type) void CallbackNotifier::enableMessage(uint msg_type)
{ {
LOGV("%s: msg_type = 0x%x", __FUNCTION__, msg_type); ALOGV("%s: msg_type = 0x%x", __FUNCTION__, msg_type);
PrintMessages(msg_type); PrintMessages(msg_type);
Mutex::Autolock locker(&mObjectLock); Mutex::Autolock locker(&mObjectLock);
mMessageEnabler |= msg_type; mMessageEnabler |= msg_type;
LOGV("**** Currently enabled messages:"); ALOGV("**** Currently enabled messages:");
PrintMessages(mMessageEnabler); PrintMessages(mMessageEnabler);
} }
void CallbackNotifier::disableMessage(uint msg_type) void CallbackNotifier::disableMessage(uint msg_type)
{ {
LOGV("%s: msg_type = 0x%x", __FUNCTION__, msg_type); ALOGV("%s: msg_type = 0x%x", __FUNCTION__, msg_type);
PrintMessages(msg_type); PrintMessages(msg_type);
Mutex::Autolock locker(&mObjectLock); Mutex::Autolock locker(&mObjectLock);
mMessageEnabler &= ~msg_type; mMessageEnabler &= ~msg_type;
LOGV("**** Currently enabled messages:"); ALOGV("**** Currently enabled messages:");
PrintMessages(mMessageEnabler); PrintMessages(mMessageEnabler);
} }
status_t CallbackNotifier::enableVideoRecording(int fps) status_t CallbackNotifier::enableVideoRecording(int fps)
{ {
LOGV("%s: FPS = %d", __FUNCTION__, fps); ALOGV("%s: FPS = %d", __FUNCTION__, fps);
Mutex::Autolock locker(&mObjectLock); Mutex::Autolock locker(&mObjectLock);
mVideoRecEnabled = true; mVideoRecEnabled = true;
@@ -160,7 +160,7 @@ status_t CallbackNotifier::enableVideoRecording(int fps)
void CallbackNotifier::disableVideoRecording() void CallbackNotifier::disableVideoRecording()
{ {
LOGV("%s:", __FUNCTION__); ALOGV("%s:", __FUNCTION__);
Mutex::Autolock locker(&mObjectLock); Mutex::Autolock locker(&mObjectLock);
mVideoRecEnabled = false; mVideoRecEnabled = false;

View File

@@ -180,7 +180,7 @@ void EmulatedCamera::onCameraDeviceError(int err)
status_t EmulatedCamera::connectCamera(hw_device_t** device) status_t EmulatedCamera::connectCamera(hw_device_t** device)
{ {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
status_t res = EINVAL; status_t res = EINVAL;
EmulatedCameraDevice* const camera_dev = getCameraDevice(); EmulatedCameraDevice* const camera_dev = getCameraDevice();
@@ -199,14 +199,14 @@ status_t EmulatedCamera::connectCamera(hw_device_t** device)
status_t EmulatedCamera::closeCamera() status_t EmulatedCamera::closeCamera()
{ {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
return cleanupCamera(); return cleanupCamera();
} }
status_t EmulatedCamera::getCameraInfo(struct camera_info* info) status_t EmulatedCamera::getCameraInfo(struct camera_info* info)
{ {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
const char* valstr = NULL; const char* valstr = NULL;
@@ -309,7 +309,7 @@ void EmulatedCamera::releaseRecordingFrame(const void* opaque)
status_t EmulatedCamera::setAutoFocus() status_t EmulatedCamera::setAutoFocus()
{ {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
/* TODO: Future enhancements. */ /* TODO: Future enhancements. */
return NO_ERROR; return NO_ERROR;
@@ -317,7 +317,7 @@ status_t EmulatedCamera::setAutoFocus()
status_t EmulatedCamera::cancelAutoFocus() status_t EmulatedCamera::cancelAutoFocus()
{ {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
/* TODO: Future enhancements. */ /* TODO: Future enhancements. */
return NO_ERROR; return NO_ERROR;
@@ -325,7 +325,7 @@ status_t EmulatedCamera::cancelAutoFocus()
status_t EmulatedCamera::takePicture() status_t EmulatedCamera::takePicture()
{ {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
status_t res; status_t res;
int width, height; int width, height;
@@ -402,14 +402,14 @@ status_t EmulatedCamera::takePicture()
status_t EmulatedCamera::cancelPicture() status_t EmulatedCamera::cancelPicture()
{ {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
return NO_ERROR; return NO_ERROR;
} }
status_t EmulatedCamera::setParameters(const char* parms) status_t EmulatedCamera::setParameters(const char* parms)
{ {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
PrintParamDiff(mParameters, parms); PrintParamDiff(mParameters, parms);
CameraParameters new_param; CameraParameters new_param;
@@ -459,7 +459,7 @@ status_t EmulatedCamera::setParameters(const char* parms)
CameraParameters::KEY_WHITE_BALANCE); CameraParameters::KEY_WHITE_BALANCE);
if ((current_white_balance == NULL) || if ((current_white_balance == NULL) ||
(strcmp(current_white_balance, new_white_balance) != 0)) { (strcmp(current_white_balance, new_white_balance) != 0)) {
LOGV("Setting white balance to %s", new_white_balance); ALOGV("Setting white balance to %s", new_white_balance);
getCameraDevice()->setWhiteBalanceMode(new_white_balance); getCameraDevice()->setWhiteBalanceMode(new_white_balance);
} }
} }
@@ -498,7 +498,7 @@ void EmulatedCamera::putParameters(char* params)
status_t EmulatedCamera::sendCommand(int32_t cmd, int32_t arg1, int32_t arg2) status_t EmulatedCamera::sendCommand(int32_t cmd, int32_t arg1, int32_t arg2)
{ {
LOGV("%s: cmd = %d, arg1 = %d, arg2 = %d", __FUNCTION__, cmd, arg1, arg2); ALOGV("%s: cmd = %d, arg1 = %d, arg2 = %d", __FUNCTION__, cmd, arg1, arg2);
/* TODO: Future enhancements. */ /* TODO: Future enhancements. */
return 0; return 0;
@@ -506,14 +506,14 @@ status_t EmulatedCamera::sendCommand(int32_t cmd, int32_t arg1, int32_t arg2)
void EmulatedCamera::releaseCamera() void EmulatedCamera::releaseCamera()
{ {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
cleanupCamera(); cleanupCamera();
} }
status_t EmulatedCamera::dumpCamera(int fd) status_t EmulatedCamera::dumpCamera(int fd)
{ {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
/* TODO: Future enhancements. */ /* TODO: Future enhancements. */
return -EINVAL; return -EINVAL;
@@ -525,7 +525,7 @@ status_t EmulatedCamera::dumpCamera(int fd)
status_t EmulatedCamera::doStartPreview() status_t EmulatedCamera::doStartPreview()
{ {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
EmulatedCameraDevice* camera_dev = getCameraDevice(); EmulatedCameraDevice* camera_dev = getCameraDevice();
if (camera_dev->isStarted()) { if (camera_dev->isStarted()) {
@@ -613,7 +613,7 @@ status_t EmulatedCamera::doStartPreview()
status_t EmulatedCamera::doStopPreview() status_t EmulatedCamera::doStopPreview()
{ {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
status_t res = NO_ERROR; status_t res = NO_ERROR;
if (mPreviewWindow.isPreviewEnabled()) { if (mPreviewWindow.isPreviewEnabled()) {

View File

@@ -34,12 +34,12 @@ public:
/* Constructor that prints an "entry" trace message. */ /* Constructor that prints an "entry" trace message. */
explicit HWERoutineTracker(const char* name) explicit HWERoutineTracker(const char* name)
: mName(name) { : mName(name) {
LOGV("Entering %s", mName); ALOGV("Entering %s", mName);
} }
/* Destructor that prints a "leave" trace message. */ /* Destructor that prints a "leave" trace message. */
~HWERoutineTracker() { ~HWERoutineTracker() {
LOGV("Leaving %s", mName); ALOGV("Leaving %s", mName);
} }
private: private:

View File

@@ -47,7 +47,7 @@ EmulatedCameraDevice::EmulatedCameraDevice(EmulatedCamera* camera_hal)
EmulatedCameraDevice::~EmulatedCameraDevice() EmulatedCameraDevice::~EmulatedCameraDevice()
{ {
LOGV("EmulatedCameraDevice destructor"); ALOGV("EmulatedCameraDevice destructor");
if (mCurrentFrame != NULL) { if (mCurrentFrame != NULL) {
delete[] mCurrentFrame; delete[] mCurrentFrame;
} }
@@ -84,7 +84,7 @@ status_t EmulatedCameraDevice::Initialize()
status_t EmulatedCameraDevice::startDeliveringFrames(bool one_burst) status_t EmulatedCameraDevice::startDeliveringFrames(bool one_burst)
{ {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
if (!isStarted()) { if (!isStarted()) {
LOGE("%s: Device is not started", __FUNCTION__); LOGE("%s: Device is not started", __FUNCTION__);
@@ -99,7 +99,7 @@ status_t EmulatedCameraDevice::startDeliveringFrames(bool one_burst)
status_t EmulatedCameraDevice::stopDeliveringFrames() status_t EmulatedCameraDevice::stopDeliveringFrames()
{ {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
if (!isStarted()) { if (!isStarted()) {
LOGW("%s: Device is not started", __FUNCTION__); LOGW("%s: Device is not started", __FUNCTION__);
@@ -112,27 +112,27 @@ status_t EmulatedCameraDevice::stopDeliveringFrames()
} }
void EmulatedCameraDevice::setExposureCompensation(const float ev) { void EmulatedCameraDevice::setExposureCompensation(const float ev) {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
if (!isStarted()) { if (!isStarted()) {
LOGW("%s: Fake camera device is not started.", __FUNCTION__); LOGW("%s: Fake camera device is not started.", __FUNCTION__);
} }
mExposureCompensation = std::pow(2.0f, ev / GAMMA_CORRECTION); mExposureCompensation = std::pow(2.0f, ev / GAMMA_CORRECTION);
LOGV("New exposure compensation is %f", mExposureCompensation); ALOGV("New exposure compensation is %f", mExposureCompensation);
} }
void EmulatedCameraDevice::initializeWhiteBalanceModes(const char* mode, void EmulatedCameraDevice::initializeWhiteBalanceModes(const char* mode,
const float r_scale, const float r_scale,
const float b_scale) { const float b_scale) {
LOGV("%s with %s, %f, %f", __FUNCTION__, mode, r_scale, b_scale); ALOGV("%s with %s, %f, %f", __FUNCTION__, mode, r_scale, b_scale);
float* value = new float[3]; float* value = new float[3];
value[0] = r_scale; value[1] = 1.0f; value[2] = b_scale; value[0] = r_scale; value[1] = 1.0f; value[2] = b_scale;
mSupportedWhiteBalanceScale.add(String8(mode), value); mSupportedWhiteBalanceScale.add(String8(mode), value);
} }
void EmulatedCameraDevice::setWhiteBalanceMode(const char* mode) { void EmulatedCameraDevice::setWhiteBalanceMode(const char* mode) {
LOGV("%s with white balance %s", __FUNCTION__, mode); ALOGV("%s with white balance %s", __FUNCTION__, mode);
mWhiteBalanceScale = mWhiteBalanceScale =
mSupportedWhiteBalanceScale.valueFor(String8(mode)); mSupportedWhiteBalanceScale.valueFor(String8(mode));
} }
@@ -223,7 +223,7 @@ status_t EmulatedCameraDevice::commonStartDevice(int width,
LOGE("%s: Unable to allocate framebuffer", __FUNCTION__); LOGE("%s: Unable to allocate framebuffer", __FUNCTION__);
return ENOMEM; return ENOMEM;
} }
LOGV("%s: Allocated %p %d bytes for %d pixels in %.4s[%dx%d] frame", ALOGV("%s: Allocated %p %d bytes for %d pixels in %.4s[%dx%d] frame",
__FUNCTION__, mCurrentFrame, mFrameBufferSize, mTotalPixels, __FUNCTION__, mCurrentFrame, mFrameBufferSize, mTotalPixels,
reinterpret_cast<const char*>(&mPixelFormat), mFrameWidth, mFrameHeight); reinterpret_cast<const char*>(&mPixelFormat), mFrameWidth, mFrameHeight);
return NO_ERROR; return NO_ERROR;
@@ -246,7 +246,7 @@ void EmulatedCameraDevice::commonStopDevice()
status_t EmulatedCameraDevice::startWorkerThread(bool one_burst) status_t EmulatedCameraDevice::startWorkerThread(bool one_burst)
{ {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
if (!isInitialized()) { if (!isInitialized()) {
LOGE("%s: Emulated camera device is not initialized", __FUNCTION__); LOGE("%s: Emulated camera device is not initialized", __FUNCTION__);
@@ -260,7 +260,7 @@ status_t EmulatedCameraDevice::startWorkerThread(bool one_burst)
status_t EmulatedCameraDevice::stopWorkerThread() status_t EmulatedCameraDevice::stopWorkerThread()
{ {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
if (!isInitialized()) { if (!isInitialized()) {
LOGE("%s: Emulated camera device is not initialized", __FUNCTION__); LOGE("%s: Emulated camera device is not initialized", __FUNCTION__);
@@ -285,7 +285,7 @@ bool EmulatedCameraDevice::inWorkerThread()
status_t EmulatedCameraDevice::WorkerThread::readyToRun() status_t EmulatedCameraDevice::WorkerThread::readyToRun()
{ {
LOGV("Starting emulated camera device worker thread..."); ALOGV("Starting emulated camera device worker thread...");
LOGW_IF(mThreadControl >= 0 || mControlFD >= 0, LOGW_IF(mThreadControl >= 0 || mControlFD >= 0,
"%s: Thread control FDs are opened", __FUNCTION__); "%s: Thread control FDs are opened", __FUNCTION__);
@@ -294,7 +294,7 @@ status_t EmulatedCameraDevice::WorkerThread::readyToRun()
if (pipe(thread_fds) == 0) { if (pipe(thread_fds) == 0) {
mThreadControl = thread_fds[1]; mThreadControl = thread_fds[1];
mControlFD = thread_fds[0]; mControlFD = thread_fds[0];
LOGV("Emulated device's worker thread has been started."); ALOGV("Emulated device's worker thread has been started.");
return NO_ERROR; return NO_ERROR;
} else { } else {
LOGE("%s: Unable to create thread control FDs: %d -> %s", LOGE("%s: Unable to create thread control FDs: %d -> %s",
@@ -305,7 +305,7 @@ status_t EmulatedCameraDevice::WorkerThread::readyToRun()
status_t EmulatedCameraDevice::WorkerThread::stopThread() status_t EmulatedCameraDevice::WorkerThread::stopThread()
{ {
LOGV("Stopping emulated camera device's worker thread..."); ALOGV("Stopping emulated camera device's worker thread...");
status_t res = EINVAL; status_t res = EINVAL;
if (mThreadControl >= 0) { if (mThreadControl >= 0) {
@@ -326,7 +326,7 @@ status_t EmulatedCameraDevice::WorkerThread::stopThread()
close(mControlFD); close(mControlFD);
mControlFD = -1; mControlFD = -1;
} }
LOGV("Emulated camera device's worker thread has been stopped."); ALOGV("Emulated camera device's worker thread has been stopped.");
} else { } else {
LOGE("%s: requestExitAndWait failed: %d -> %s", LOGE("%s: requestExitAndWait failed: %d -> %s",
__FUNCTION__, res, strerror(-res)); __FUNCTION__, res, strerror(-res));
@@ -380,7 +380,7 @@ EmulatedCameraDevice::WorkerThread::Select(int fd, int timeout)
} }
/* THREAD_STOP is the only message expected here. */ /* THREAD_STOP is the only message expected here. */
if (msg == THREAD_STOP) { if (msg == THREAD_STOP) {
LOGV("%s: THREAD_STOP message is received", __FUNCTION__); ALOGV("%s: THREAD_STOP message is received", __FUNCTION__);
return EXIT_THREAD; return EXIT_THREAD;
} else { } else {
LOGE("Unknown worker thread message %d", msg); LOGE("Unknown worker thread message %d", msg);

View File

@@ -86,7 +86,7 @@ EmulatedCameraFactory::EmulatedCameraFactory()
LOGD("Fake camera emulation is disabled."); LOGD("Fake camera emulation is disabled.");
} }
LOGV("%d cameras are being emulated. Fake camera ID is %d", ALOGV("%d cameras are being emulated. Fake camera ID is %d",
mEmulatedCameraNum, mFakeCameraID); mEmulatedCameraNum, mFakeCameraID);
mConstructedOK = true; mConstructedOK = true;
@@ -114,7 +114,7 @@ EmulatedCameraFactory::~EmulatedCameraFactory()
int EmulatedCameraFactory::cameraDeviceOpen(int camera_id, hw_device_t** device) int EmulatedCameraFactory::cameraDeviceOpen(int camera_id, hw_device_t** device)
{ {
LOGV("%s: id = %d", __FUNCTION__, camera_id); ALOGV("%s: id = %d", __FUNCTION__, camera_id);
*device = NULL; *device = NULL;
@@ -134,7 +134,7 @@ int EmulatedCameraFactory::cameraDeviceOpen(int camera_id, hw_device_t** device)
int EmulatedCameraFactory::getCameraInfo(int camera_id, struct camera_info* info) int EmulatedCameraFactory::getCameraInfo(int camera_id, struct camera_info* info)
{ {
LOGV("%s: id = %d", __FUNCTION__, camera_id); ALOGV("%s: id = %d", __FUNCTION__, camera_id);
if (!isConstructedOK()) { if (!isConstructedOK()) {
LOGE("%s: EmulatedCameraFactory has failed to initialize", __FUNCTION__); LOGE("%s: EmulatedCameraFactory has failed to initialize", __FUNCTION__);

View File

@@ -66,7 +66,7 @@ status_t EmulatedFakeCamera::Initialize()
mParameters.set(CameraParameters::KEY_MIN_EXPOSURE_COMPENSATION, "-6"); mParameters.set(CameraParameters::KEY_MIN_EXPOSURE_COMPENSATION, "-6");
mParameters.set(CameraParameters::KEY_EXPOSURE_COMPENSATION_STEP, "0.5"); mParameters.set(CameraParameters::KEY_EXPOSURE_COMPENSATION_STEP, "0.5");
mParameters.set(CameraParameters::KEY_EXPOSURE_COMPENSATION, "0"); mParameters.set(CameraParameters::KEY_EXPOSURE_COMPENSATION, "0");
LOGV("Set camera supported exposure values"); ALOGV("Set camera supported exposure values");
// Sets the white balance modes and the device-dependent scale factors. // Sets the white balance modes and the device-dependent scale factors.
mFakeCameraDevice.initializeWhiteBalanceModes( mFakeCameraDevice.initializeWhiteBalanceModes(
@@ -86,7 +86,7 @@ status_t EmulatedFakeCamera::Initialize()
mParameters.set(CameraParameters::KEY_SUPPORTED_WHITE_BALANCE, mParameters.set(CameraParameters::KEY_SUPPORTED_WHITE_BALANCE,
supported_white_balance); supported_white_balance);
LOGV("Set camera supported white balance modes"); ALOGV("Set camera supported white balance modes");
if (res != NO_ERROR) { if (res != NO_ERROR) {
return res; return res;

View File

@@ -63,7 +63,7 @@ EmulatedFakeCameraDevice::~EmulatedFakeCameraDevice()
status_t EmulatedFakeCameraDevice::connectDevice() status_t EmulatedFakeCameraDevice::connectDevice()
{ {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
Mutex::Autolock locker(&mObjectLock); Mutex::Autolock locker(&mObjectLock);
if (!isInitialized()) { if (!isInitialized()) {
@@ -83,7 +83,7 @@ status_t EmulatedFakeCameraDevice::connectDevice()
status_t EmulatedFakeCameraDevice::disconnectDevice() status_t EmulatedFakeCameraDevice::disconnectDevice()
{ {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
Mutex::Autolock locker(&mObjectLock); Mutex::Autolock locker(&mObjectLock);
if (!isConnected()) { if (!isConnected()) {
@@ -105,7 +105,7 @@ status_t EmulatedFakeCameraDevice::startDevice(int width,
int height, int height,
uint32_t pix_fmt) uint32_t pix_fmt)
{ {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
Mutex::Autolock locker(&mObjectLock); Mutex::Autolock locker(&mObjectLock);
if (!isConnected()) { if (!isConnected()) {
@@ -170,7 +170,7 @@ status_t EmulatedFakeCameraDevice::startDevice(int width,
status_t EmulatedFakeCameraDevice::stopDevice() status_t EmulatedFakeCameraDevice::stopDevice()
{ {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
Mutex::Autolock locker(&mObjectLock); Mutex::Autolock locker(&mObjectLock);
if (!isStarted()) { if (!isStarted()) {
@@ -195,7 +195,7 @@ bool EmulatedFakeCameraDevice::inWorkerThread()
WorkerThread::SelectRes res = WorkerThread::SelectRes res =
getWorkerThread()->Select(-1, 1000000 / mEmulatedFPS); getWorkerThread()->Select(-1, 1000000 / mEmulatedFPS);
if (res == WorkerThread::EXIT_THREAD) { if (res == WorkerThread::EXIT_THREAD) {
LOGV("%s: Worker thread has been terminated.", __FUNCTION__); ALOGV("%s: Worker thread has been terminated.", __FUNCTION__);
return false; return false;
} }

View File

@@ -45,7 +45,7 @@ status_t EmulatedQemuCamera::Initialize(const char* device_name,
const char* frame_dims, const char* frame_dims,
const char* facing_dir) const char* facing_dir)
{ {
LOGV("%s:\n Name=%s\n Facing '%s'\n Dimensions=%s", ALOGV("%s:\n Name=%s\n Facing '%s'\n Dimensions=%s",
__FUNCTION__, device_name, facing_dir, frame_dims); __FUNCTION__, device_name, facing_dir, frame_dims);
/* Save dimensions. */ /* Save dimensions. */
mFrameDims = frame_dims; mFrameDims = frame_dims;
@@ -105,7 +105,7 @@ status_t EmulatedQemuCamera::Initialize(const char* device_name,
mParameters.setPreviewSize(x, y); mParameters.setPreviewSize(x, y);
mParameters.setPictureSize(x, y); mParameters.setPictureSize(x, y);
LOGV("%s: Qemu camera %s is initialized. Current frame is %dx%d", ALOGV("%s: Qemu camera %s is initialized. Current frame is %dx%d",
__FUNCTION__, device_name, x, y); __FUNCTION__, device_name, x, y);
return NO_ERROR; return NO_ERROR;

View File

@@ -58,7 +58,7 @@ status_t EmulatedQemuCameraDevice::Initialize(const char* device_name)
/* Initialize base class. */ /* Initialize base class. */
res = EmulatedCameraDevice::Initialize(); res = EmulatedCameraDevice::Initialize();
if (res == NO_ERROR) { if (res == NO_ERROR) {
LOGV("%s: Connected to the emulated camera service '%s'", ALOGV("%s: Connected to the emulated camera service '%s'",
__FUNCTION__, device_name); __FUNCTION__, device_name);
mDeviceName = device_name; mDeviceName = device_name;
} else { } else {
@@ -74,7 +74,7 @@ status_t EmulatedQemuCameraDevice::Initialize(const char* device_name)
status_t EmulatedQemuCameraDevice::connectDevice() status_t EmulatedQemuCameraDevice::connectDevice()
{ {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
Mutex::Autolock locker(&mObjectLock); Mutex::Autolock locker(&mObjectLock);
if (!isInitialized()) { if (!isInitialized()) {
@@ -90,7 +90,7 @@ status_t EmulatedQemuCameraDevice::connectDevice()
/* Connect to the camera device via emulator. */ /* Connect to the camera device via emulator. */
const status_t res = mQemuClient.queryConnect(); const status_t res = mQemuClient.queryConnect();
if (res == NO_ERROR) { if (res == NO_ERROR) {
LOGV("%s: Connected to device '%s'", ALOGV("%s: Connected to device '%s'",
__FUNCTION__, (const char*)mDeviceName); __FUNCTION__, (const char*)mDeviceName);
mState = ECDS_CONNECTED; mState = ECDS_CONNECTED;
} else { } else {
@@ -103,7 +103,7 @@ status_t EmulatedQemuCameraDevice::connectDevice()
status_t EmulatedQemuCameraDevice::disconnectDevice() status_t EmulatedQemuCameraDevice::disconnectDevice()
{ {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
Mutex::Autolock locker(&mObjectLock); Mutex::Autolock locker(&mObjectLock);
if (!isConnected()) { if (!isConnected()) {
@@ -120,7 +120,7 @@ status_t EmulatedQemuCameraDevice::disconnectDevice()
/* Disconnect from the camera device via emulator. */ /* Disconnect from the camera device via emulator. */
const status_t res = mQemuClient.queryDisconnect(); const status_t res = mQemuClient.queryDisconnect();
if (res == NO_ERROR) { if (res == NO_ERROR) {
LOGV("%s: Disonnected from device '%s'", ALOGV("%s: Disonnected from device '%s'",
__FUNCTION__, (const char*)mDeviceName); __FUNCTION__, (const char*)mDeviceName);
mState = ECDS_INITIALIZED; mState = ECDS_INITIALIZED;
} else { } else {
@@ -135,7 +135,7 @@ status_t EmulatedQemuCameraDevice::startDevice(int width,
int height, int height,
uint32_t pix_fmt) uint32_t pix_fmt)
{ {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
Mutex::Autolock locker(&mObjectLock); Mutex::Autolock locker(&mObjectLock);
if (!isConnected()) { if (!isConnected()) {
@@ -168,7 +168,7 @@ status_t EmulatedQemuCameraDevice::startDevice(int width,
/* Start the actual camera device. */ /* Start the actual camera device. */
res = mQemuClient.queryStart(mPixelFormat, mFrameWidth, mFrameHeight); res = mQemuClient.queryStart(mPixelFormat, mFrameWidth, mFrameHeight);
if (res == NO_ERROR) { if (res == NO_ERROR) {
LOGV("%s: Qemu camera device '%s' is started for %.4s[%dx%d] frames", ALOGV("%s: Qemu camera device '%s' is started for %.4s[%dx%d] frames",
__FUNCTION__, (const char*)mDeviceName, __FUNCTION__, (const char*)mDeviceName,
reinterpret_cast<const char*>(&mPixelFormat), reinterpret_cast<const char*>(&mPixelFormat),
mFrameWidth, mFrameHeight); mFrameWidth, mFrameHeight);
@@ -184,7 +184,7 @@ status_t EmulatedQemuCameraDevice::startDevice(int width,
status_t EmulatedQemuCameraDevice::stopDevice() status_t EmulatedQemuCameraDevice::stopDevice()
{ {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
Mutex::Autolock locker(&mObjectLock); Mutex::Autolock locker(&mObjectLock);
if (!isStarted()) { if (!isStarted()) {
@@ -202,7 +202,7 @@ status_t EmulatedQemuCameraDevice::stopDevice()
} }
EmulatedCameraDevice::commonStopDevice(); EmulatedCameraDevice::commonStopDevice();
mState = ECDS_CONNECTED; mState = ECDS_CONNECTED;
LOGV("%s: Qemu camera device '%s' is stopped", ALOGV("%s: Qemu camera device '%s' is stopped",
__FUNCTION__, (const char*)mDeviceName); __FUNCTION__, (const char*)mDeviceName);
} else { } else {
LOGE("%s: Unable to stop device '%s'", LOGE("%s: Unable to stop device '%s'",
@@ -237,7 +237,7 @@ bool EmulatedQemuCameraDevice::inWorkerThread()
WorkerThread::SelectRes res = WorkerThread::SelectRes res =
getWorkerThread()->Select(-1, 1000000 / mEmulatedFPS); getWorkerThread()->Select(-1, 1000000 / mEmulatedFPS);
if (res == WorkerThread::EXIT_THREAD) { if (res == WorkerThread::EXIT_THREAD) {
LOGV("%s: Worker thread has been terminated.", __FUNCTION__); ALOGV("%s: Worker thread has been terminated.", __FUNCTION__);
return false; return false;
} }

View File

@@ -44,7 +44,7 @@ status_t NV21JpegCompressor::compressRawImage(const void* image,
int height, int height,
int quality) int quality)
{ {
LOGV("%s: %p[%dx%d]", __FUNCTION__, image, width, height); ALOGV("%s: %p[%dx%d]", __FUNCTION__, image, width, height);
void* pY = const_cast<void*>(image); void* pY = const_cast<void*>(image);
int offsets[2]; int offsets[2];
offsets[0] = 0; offsets[0] = 0;
@@ -52,7 +52,7 @@ status_t NV21JpegCompressor::compressRawImage(const void* image,
mStrides[0] = width; mStrides[0] = width;
mStrides[1] = width; mStrides[1] = width;
if (encode(&mStream, pY, width, height, offsets, quality)) { if (encode(&mStream, pY, width, height, offsets, quality)) {
LOGV("%s: Compressed JPEG: %d[%dx%d] -> %d bytes", ALOGV("%s: Compressed JPEG: %d[%dx%d] -> %d bytes",
__FUNCTION__, (width * height * 12) / 8, width, height, mStream.getOffset()); __FUNCTION__, (width * height * 12) / 8, width, height, mStream.getOffset());
return NO_ERROR; return NO_ERROR;
} else { } else {

View File

@@ -49,7 +49,7 @@ PreviewWindow::~PreviewWindow()
status_t PreviewWindow::setPreviewWindow(struct preview_stream_ops* window, status_t PreviewWindow::setPreviewWindow(struct preview_stream_ops* window,
int preview_fps) int preview_fps)
{ {
LOGV("%s: current: %p -> new: %p", __FUNCTION__, mPreviewWindow, window); ALOGV("%s: current: %p -> new: %p", __FUNCTION__, mPreviewWindow, window);
status_t res = NO_ERROR; status_t res = NO_ERROR;
Mutex::Autolock locker(&mObjectLock); Mutex::Autolock locker(&mObjectLock);
@@ -81,7 +81,7 @@ status_t PreviewWindow::setPreviewWindow(struct preview_stream_ops* window,
status_t PreviewWindow::startPreview() status_t PreviewWindow::startPreview()
{ {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
Mutex::Autolock locker(&mObjectLock); Mutex::Autolock locker(&mObjectLock);
mPreviewEnabled = true; mPreviewEnabled = true;
@@ -91,7 +91,7 @@ status_t PreviewWindow::startPreview()
void PreviewWindow::stopPreview() void PreviewWindow::stopPreview()
{ {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
Mutex::Autolock locker(&mObjectLock); Mutex::Autolock locker(&mObjectLock);
mPreviewEnabled = false; mPreviewEnabled = false;
@@ -117,7 +117,7 @@ void PreviewWindow::onNextFrameAvailable(const void* frame,
/* Need to set / adjust buffer geometry for the preview window. /* Need to set / adjust buffer geometry for the preview window.
* Note that in the emulator preview window uses only RGB for pixel * Note that in the emulator preview window uses only RGB for pixel
* formats. */ * formats. */
LOGV("%s: Adjusting preview windows %p geometry to %dx%d", ALOGV("%s: Adjusting preview windows %p geometry to %dx%d",
__FUNCTION__, mPreviewWindow, mPreviewFrameWidth, __FUNCTION__, mPreviewWindow, mPreviewFrameWidth,
mPreviewFrameHeight); mPreviewFrameHeight);
res = mPreviewWindow->set_buffers_geometry(mPreviewWindow, res = mPreviewWindow->set_buffers_geometry(mPreviewWindow,

View File

@@ -212,7 +212,7 @@ QemuClient::~QemuClient()
status_t QemuClient::connectClient(const char* param) status_t QemuClient::connectClient(const char* param)
{ {
LOGV("%s: '%s'", __FUNCTION__, param ? param : ""); ALOGV("%s: '%s'", __FUNCTION__, param ? param : "");
/* Make sure that client is not connected already. */ /* Make sure that client is not connected already. */
if (mPipeFD >= 0) { if (mPipeFD >= 0) {
@@ -247,7 +247,7 @@ status_t QemuClient::connectClient(const char* param)
void QemuClient::disconnectClient() void QemuClient::disconnectClient()
{ {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
if (mPipeFD >= 0) { if (mPipeFD >= 0) {
close(mPipeFD); close(mPipeFD);
@@ -386,7 +386,7 @@ FactoryQemuClient::~FactoryQemuClient()
status_t FactoryQemuClient::listCameras(char** list) status_t FactoryQemuClient::listCameras(char** list)
{ {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
QemuQuery query(mQueryList); QemuQuery query(mQueryList);
if (doQuery(&query) || !query.isQuerySucceeded()) { if (doQuery(&query) || !query.isQuerySucceeded()) {
@@ -445,7 +445,7 @@ CameraQemuClient::~CameraQemuClient()
status_t CameraQemuClient::queryConnect() status_t CameraQemuClient::queryConnect()
{ {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
QemuQuery query(mQueryConnect); QemuQuery query(mQueryConnect);
doQuery(&query); doQuery(&query);
@@ -458,7 +458,7 @@ status_t CameraQemuClient::queryConnect()
status_t CameraQemuClient::queryDisconnect() status_t CameraQemuClient::queryDisconnect()
{ {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
QemuQuery query(mQueryDisconnect); QemuQuery query(mQueryDisconnect);
doQuery(&query); doQuery(&query);
@@ -473,7 +473,7 @@ status_t CameraQemuClient::queryStart(uint32_t pixel_format,
int width, int width,
int height) int height)
{ {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
char query_str[256]; char query_str[256];
snprintf(query_str, sizeof(query_str), "%s dim=%dx%d pix=%d", snprintf(query_str, sizeof(query_str), "%s dim=%dx%d pix=%d",
@@ -489,7 +489,7 @@ status_t CameraQemuClient::queryStart(uint32_t pixel_format,
status_t CameraQemuClient::queryStop() status_t CameraQemuClient::queryStop()
{ {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
QemuQuery query(mQueryStop); QemuQuery query(mQueryStop);
doQuery(&query); doQuery(&query);
@@ -505,7 +505,7 @@ status_t CameraQemuClient::queryFrame(void* vframe,
size_t vframe_size, size_t vframe_size,
size_t pframe_size) size_t pframe_size)
{ {
LOGV("%s", __FUNCTION__); ALOGV("%s", __FUNCTION__);
char query_str[256]; char query_str[256];
snprintf(query_str, sizeof(query_str), "%s video=%d preview=%d", snprintf(query_str, sizeof(query_str), "%s video=%d preview=%d",