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:
@@ -80,7 +80,7 @@ static void PrintMessages(uint32_t msg)
|
||||
const char* strs[lCameraMessagesNum];
|
||||
const int translated = GetMessageStrings(msg, strs, lCameraMessagesNum);
|
||||
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,
|
||||
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);
|
||||
|
||||
Mutex::Autolock locker(&mObjectLock);
|
||||
@@ -126,29 +126,29 @@ void CallbackNotifier::setCallbacks(camera_notify_callback notify_cb,
|
||||
|
||||
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);
|
||||
|
||||
Mutex::Autolock locker(&mObjectLock);
|
||||
mMessageEnabler |= msg_type;
|
||||
LOGV("**** Currently enabled messages:");
|
||||
ALOGV("**** Currently enabled messages:");
|
||||
PrintMessages(mMessageEnabler);
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
Mutex::Autolock locker(&mObjectLock);
|
||||
mMessageEnabler &= ~msg_type;
|
||||
LOGV("**** Currently enabled messages:");
|
||||
ALOGV("**** Currently enabled messages:");
|
||||
PrintMessages(mMessageEnabler);
|
||||
}
|
||||
|
||||
status_t CallbackNotifier::enableVideoRecording(int fps)
|
||||
{
|
||||
LOGV("%s: FPS = %d", __FUNCTION__, fps);
|
||||
ALOGV("%s: FPS = %d", __FUNCTION__, fps);
|
||||
|
||||
Mutex::Autolock locker(&mObjectLock);
|
||||
mVideoRecEnabled = true;
|
||||
@@ -160,7 +160,7 @@ status_t CallbackNotifier::enableVideoRecording(int fps)
|
||||
|
||||
void CallbackNotifier::disableVideoRecording()
|
||||
{
|
||||
LOGV("%s:", __FUNCTION__);
|
||||
ALOGV("%s:", __FUNCTION__);
|
||||
|
||||
Mutex::Autolock locker(&mObjectLock);
|
||||
mVideoRecEnabled = false;
|
||||
|
||||
@@ -180,7 +180,7 @@ void EmulatedCamera::onCameraDeviceError(int err)
|
||||
|
||||
status_t EmulatedCamera::connectCamera(hw_device_t** device)
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
status_t res = EINVAL;
|
||||
EmulatedCameraDevice* const camera_dev = getCameraDevice();
|
||||
@@ -199,14 +199,14 @@ status_t EmulatedCamera::connectCamera(hw_device_t** device)
|
||||
|
||||
status_t EmulatedCamera::closeCamera()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
return cleanupCamera();
|
||||
}
|
||||
|
||||
status_t EmulatedCamera::getCameraInfo(struct camera_info* info)
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
const char* valstr = NULL;
|
||||
|
||||
@@ -309,7 +309,7 @@ void EmulatedCamera::releaseRecordingFrame(const void* opaque)
|
||||
|
||||
status_t EmulatedCamera::setAutoFocus()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
/* TODO: Future enhancements. */
|
||||
return NO_ERROR;
|
||||
@@ -317,7 +317,7 @@ status_t EmulatedCamera::setAutoFocus()
|
||||
|
||||
status_t EmulatedCamera::cancelAutoFocus()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
/* TODO: Future enhancements. */
|
||||
return NO_ERROR;
|
||||
@@ -325,7 +325,7 @@ status_t EmulatedCamera::cancelAutoFocus()
|
||||
|
||||
status_t EmulatedCamera::takePicture()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
status_t res;
|
||||
int width, height;
|
||||
@@ -402,14 +402,14 @@ status_t EmulatedCamera::takePicture()
|
||||
|
||||
status_t EmulatedCamera::cancelPicture()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
status_t EmulatedCamera::setParameters(const char* parms)
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
PrintParamDiff(mParameters, parms);
|
||||
|
||||
CameraParameters new_param;
|
||||
@@ -459,7 +459,7 @@ status_t EmulatedCamera::setParameters(const char* parms)
|
||||
CameraParameters::KEY_WHITE_BALANCE);
|
||||
if ((current_white_balance == NULL) ||
|
||||
(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);
|
||||
}
|
||||
}
|
||||
@@ -498,7 +498,7 @@ void EmulatedCamera::putParameters(char* params)
|
||||
|
||||
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. */
|
||||
return 0;
|
||||
@@ -506,14 +506,14 @@ status_t EmulatedCamera::sendCommand(int32_t cmd, int32_t arg1, int32_t arg2)
|
||||
|
||||
void EmulatedCamera::releaseCamera()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
cleanupCamera();
|
||||
}
|
||||
|
||||
status_t EmulatedCamera::dumpCamera(int fd)
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
/* TODO: Future enhancements. */
|
||||
return -EINVAL;
|
||||
@@ -525,7 +525,7 @@ status_t EmulatedCamera::dumpCamera(int fd)
|
||||
|
||||
status_t EmulatedCamera::doStartPreview()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
EmulatedCameraDevice* camera_dev = getCameraDevice();
|
||||
if (camera_dev->isStarted()) {
|
||||
@@ -613,7 +613,7 @@ status_t EmulatedCamera::doStartPreview()
|
||||
|
||||
status_t EmulatedCamera::doStopPreview()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
status_t res = NO_ERROR;
|
||||
if (mPreviewWindow.isPreviewEnabled()) {
|
||||
|
||||
@@ -34,12 +34,12 @@ public:
|
||||
/* Constructor that prints an "entry" trace message. */
|
||||
explicit HWERoutineTracker(const char* name)
|
||||
: mName(name) {
|
||||
LOGV("Entering %s", mName);
|
||||
ALOGV("Entering %s", mName);
|
||||
}
|
||||
|
||||
/* Destructor that prints a "leave" trace message. */
|
||||
~HWERoutineTracker() {
|
||||
LOGV("Leaving %s", mName);
|
||||
ALOGV("Leaving %s", mName);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -47,7 +47,7 @@ EmulatedCameraDevice::EmulatedCameraDevice(EmulatedCamera* camera_hal)
|
||||
|
||||
EmulatedCameraDevice::~EmulatedCameraDevice()
|
||||
{
|
||||
LOGV("EmulatedCameraDevice destructor");
|
||||
ALOGV("EmulatedCameraDevice destructor");
|
||||
if (mCurrentFrame != NULL) {
|
||||
delete[] mCurrentFrame;
|
||||
}
|
||||
@@ -84,7 +84,7 @@ status_t EmulatedCameraDevice::Initialize()
|
||||
|
||||
status_t EmulatedCameraDevice::startDeliveringFrames(bool one_burst)
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
if (!isStarted()) {
|
||||
LOGE("%s: Device is not started", __FUNCTION__);
|
||||
@@ -99,7 +99,7 @@ status_t EmulatedCameraDevice::startDeliveringFrames(bool one_burst)
|
||||
|
||||
status_t EmulatedCameraDevice::stopDeliveringFrames()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
if (!isStarted()) {
|
||||
LOGW("%s: Device is not started", __FUNCTION__);
|
||||
@@ -112,27 +112,27 @@ status_t EmulatedCameraDevice::stopDeliveringFrames()
|
||||
}
|
||||
|
||||
void EmulatedCameraDevice::setExposureCompensation(const float ev) {
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
if (!isStarted()) {
|
||||
LOGW("%s: Fake camera device is not started.", __FUNCTION__);
|
||||
}
|
||||
|
||||
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,
|
||||
const float r_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];
|
||||
value[0] = r_scale; value[1] = 1.0f; value[2] = b_scale;
|
||||
mSupportedWhiteBalanceScale.add(String8(mode), value);
|
||||
}
|
||||
|
||||
void EmulatedCameraDevice::setWhiteBalanceMode(const char* mode) {
|
||||
LOGV("%s with white balance %s", __FUNCTION__, mode);
|
||||
ALOGV("%s with white balance %s", __FUNCTION__, mode);
|
||||
mWhiteBalanceScale =
|
||||
mSupportedWhiteBalanceScale.valueFor(String8(mode));
|
||||
}
|
||||
@@ -223,7 +223,7 @@ status_t EmulatedCameraDevice::commonStartDevice(int width,
|
||||
LOGE("%s: Unable to allocate framebuffer", __FUNCTION__);
|
||||
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,
|
||||
reinterpret_cast<const char*>(&mPixelFormat), mFrameWidth, mFrameHeight);
|
||||
return NO_ERROR;
|
||||
@@ -246,7 +246,7 @@ void EmulatedCameraDevice::commonStopDevice()
|
||||
|
||||
status_t EmulatedCameraDevice::startWorkerThread(bool one_burst)
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
if (!isInitialized()) {
|
||||
LOGE("%s: Emulated camera device is not initialized", __FUNCTION__);
|
||||
@@ -260,7 +260,7 @@ status_t EmulatedCameraDevice::startWorkerThread(bool one_burst)
|
||||
|
||||
status_t EmulatedCameraDevice::stopWorkerThread()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
if (!isInitialized()) {
|
||||
LOGE("%s: Emulated camera device is not initialized", __FUNCTION__);
|
||||
@@ -285,7 +285,7 @@ bool EmulatedCameraDevice::inWorkerThread()
|
||||
|
||||
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,
|
||||
"%s: Thread control FDs are opened", __FUNCTION__);
|
||||
@@ -294,7 +294,7 @@ status_t EmulatedCameraDevice::WorkerThread::readyToRun()
|
||||
if (pipe(thread_fds) == 0) {
|
||||
mThreadControl = thread_fds[1];
|
||||
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;
|
||||
} else {
|
||||
LOGE("%s: Unable to create thread control FDs: %d -> %s",
|
||||
@@ -305,7 +305,7 @@ status_t EmulatedCameraDevice::WorkerThread::readyToRun()
|
||||
|
||||
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;
|
||||
if (mThreadControl >= 0) {
|
||||
@@ -326,7 +326,7 @@ status_t EmulatedCameraDevice::WorkerThread::stopThread()
|
||||
close(mControlFD);
|
||||
mControlFD = -1;
|
||||
}
|
||||
LOGV("Emulated camera device's worker thread has been stopped.");
|
||||
ALOGV("Emulated camera device's worker thread has been stopped.");
|
||||
} else {
|
||||
LOGE("%s: requestExitAndWait failed: %d -> %s",
|
||||
__FUNCTION__, res, strerror(-res));
|
||||
@@ -380,7 +380,7 @@ EmulatedCameraDevice::WorkerThread::Select(int fd, int timeout)
|
||||
}
|
||||
/* THREAD_STOP is the only message expected here. */
|
||||
if (msg == THREAD_STOP) {
|
||||
LOGV("%s: THREAD_STOP message is received", __FUNCTION__);
|
||||
ALOGV("%s: THREAD_STOP message is received", __FUNCTION__);
|
||||
return EXIT_THREAD;
|
||||
} else {
|
||||
LOGE("Unknown worker thread message %d", msg);
|
||||
|
||||
@@ -86,7 +86,7 @@ EmulatedCameraFactory::EmulatedCameraFactory()
|
||||
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);
|
||||
|
||||
mConstructedOK = true;
|
||||
@@ -114,7 +114,7 @@ EmulatedCameraFactory::~EmulatedCameraFactory()
|
||||
|
||||
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;
|
||||
|
||||
@@ -134,7 +134,7 @@ int EmulatedCameraFactory::cameraDeviceOpen(int camera_id, hw_device_t** device)
|
||||
|
||||
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()) {
|
||||
LOGE("%s: EmulatedCameraFactory has failed to initialize", __FUNCTION__);
|
||||
|
||||
@@ -66,7 +66,7 @@ status_t EmulatedFakeCamera::Initialize()
|
||||
mParameters.set(CameraParameters::KEY_MIN_EXPOSURE_COMPENSATION, "-6");
|
||||
mParameters.set(CameraParameters::KEY_EXPOSURE_COMPENSATION_STEP, "0.5");
|
||||
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.
|
||||
mFakeCameraDevice.initializeWhiteBalanceModes(
|
||||
@@ -86,7 +86,7 @@ status_t EmulatedFakeCamera::Initialize()
|
||||
mParameters.set(CameraParameters::KEY_SUPPORTED_WHITE_BALANCE,
|
||||
supported_white_balance);
|
||||
|
||||
LOGV("Set camera supported white balance modes");
|
||||
ALOGV("Set camera supported white balance modes");
|
||||
|
||||
if (res != NO_ERROR) {
|
||||
return res;
|
||||
|
||||
@@ -63,7 +63,7 @@ EmulatedFakeCameraDevice::~EmulatedFakeCameraDevice()
|
||||
|
||||
status_t EmulatedFakeCameraDevice::connectDevice()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
Mutex::Autolock locker(&mObjectLock);
|
||||
if (!isInitialized()) {
|
||||
@@ -83,7 +83,7 @@ status_t EmulatedFakeCameraDevice::connectDevice()
|
||||
|
||||
status_t EmulatedFakeCameraDevice::disconnectDevice()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
Mutex::Autolock locker(&mObjectLock);
|
||||
if (!isConnected()) {
|
||||
@@ -105,7 +105,7 @@ status_t EmulatedFakeCameraDevice::startDevice(int width,
|
||||
int height,
|
||||
uint32_t pix_fmt)
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
Mutex::Autolock locker(&mObjectLock);
|
||||
if (!isConnected()) {
|
||||
@@ -170,7 +170,7 @@ status_t EmulatedFakeCameraDevice::startDevice(int width,
|
||||
|
||||
status_t EmulatedFakeCameraDevice::stopDevice()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
Mutex::Autolock locker(&mObjectLock);
|
||||
if (!isStarted()) {
|
||||
@@ -195,7 +195,7 @@ bool EmulatedFakeCameraDevice::inWorkerThread()
|
||||
WorkerThread::SelectRes res =
|
||||
getWorkerThread()->Select(-1, 1000000 / mEmulatedFPS);
|
||||
if (res == WorkerThread::EXIT_THREAD) {
|
||||
LOGV("%s: Worker thread has been terminated.", __FUNCTION__);
|
||||
ALOGV("%s: Worker thread has been terminated.", __FUNCTION__);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ status_t EmulatedQemuCamera::Initialize(const char* device_name,
|
||||
const char* frame_dims,
|
||||
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);
|
||||
/* Save dimensions. */
|
||||
mFrameDims = frame_dims;
|
||||
@@ -105,7 +105,7 @@ status_t EmulatedQemuCamera::Initialize(const char* device_name,
|
||||
mParameters.setPreviewSize(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);
|
||||
|
||||
return NO_ERROR;
|
||||
|
||||
@@ -58,7 +58,7 @@ status_t EmulatedQemuCameraDevice::Initialize(const char* device_name)
|
||||
/* Initialize base class. */
|
||||
res = EmulatedCameraDevice::Initialize();
|
||||
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);
|
||||
mDeviceName = device_name;
|
||||
} else {
|
||||
@@ -74,7 +74,7 @@ status_t EmulatedQemuCameraDevice::Initialize(const char* device_name)
|
||||
|
||||
status_t EmulatedQemuCameraDevice::connectDevice()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
Mutex::Autolock locker(&mObjectLock);
|
||||
if (!isInitialized()) {
|
||||
@@ -90,7 +90,7 @@ status_t EmulatedQemuCameraDevice::connectDevice()
|
||||
/* Connect to the camera device via emulator. */
|
||||
const status_t res = mQemuClient.queryConnect();
|
||||
if (res == NO_ERROR) {
|
||||
LOGV("%s: Connected to device '%s'",
|
||||
ALOGV("%s: Connected to device '%s'",
|
||||
__FUNCTION__, (const char*)mDeviceName);
|
||||
mState = ECDS_CONNECTED;
|
||||
} else {
|
||||
@@ -103,7 +103,7 @@ status_t EmulatedQemuCameraDevice::connectDevice()
|
||||
|
||||
status_t EmulatedQemuCameraDevice::disconnectDevice()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
Mutex::Autolock locker(&mObjectLock);
|
||||
if (!isConnected()) {
|
||||
@@ -120,7 +120,7 @@ status_t EmulatedQemuCameraDevice::disconnectDevice()
|
||||
/* Disconnect from the camera device via emulator. */
|
||||
const status_t res = mQemuClient.queryDisconnect();
|
||||
if (res == NO_ERROR) {
|
||||
LOGV("%s: Disonnected from device '%s'",
|
||||
ALOGV("%s: Disonnected from device '%s'",
|
||||
__FUNCTION__, (const char*)mDeviceName);
|
||||
mState = ECDS_INITIALIZED;
|
||||
} else {
|
||||
@@ -135,7 +135,7 @@ status_t EmulatedQemuCameraDevice::startDevice(int width,
|
||||
int height,
|
||||
uint32_t pix_fmt)
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
Mutex::Autolock locker(&mObjectLock);
|
||||
if (!isConnected()) {
|
||||
@@ -168,7 +168,7 @@ status_t EmulatedQemuCameraDevice::startDevice(int width,
|
||||
/* Start the actual camera device. */
|
||||
res = mQemuClient.queryStart(mPixelFormat, mFrameWidth, mFrameHeight);
|
||||
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,
|
||||
reinterpret_cast<const char*>(&mPixelFormat),
|
||||
mFrameWidth, mFrameHeight);
|
||||
@@ -184,7 +184,7 @@ status_t EmulatedQemuCameraDevice::startDevice(int width,
|
||||
|
||||
status_t EmulatedQemuCameraDevice::stopDevice()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
Mutex::Autolock locker(&mObjectLock);
|
||||
if (!isStarted()) {
|
||||
@@ -202,7 +202,7 @@ status_t EmulatedQemuCameraDevice::stopDevice()
|
||||
}
|
||||
EmulatedCameraDevice::commonStopDevice();
|
||||
mState = ECDS_CONNECTED;
|
||||
LOGV("%s: Qemu camera device '%s' is stopped",
|
||||
ALOGV("%s: Qemu camera device '%s' is stopped",
|
||||
__FUNCTION__, (const char*)mDeviceName);
|
||||
} else {
|
||||
LOGE("%s: Unable to stop device '%s'",
|
||||
@@ -237,7 +237,7 @@ bool EmulatedQemuCameraDevice::inWorkerThread()
|
||||
WorkerThread::SelectRes res =
|
||||
getWorkerThread()->Select(-1, 1000000 / mEmulatedFPS);
|
||||
if (res == WorkerThread::EXIT_THREAD) {
|
||||
LOGV("%s: Worker thread has been terminated.", __FUNCTION__);
|
||||
ALOGV("%s: Worker thread has been terminated.", __FUNCTION__);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ status_t NV21JpegCompressor::compressRawImage(const void* image,
|
||||
int height,
|
||||
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);
|
||||
int offsets[2];
|
||||
offsets[0] = 0;
|
||||
@@ -52,7 +52,7 @@ status_t NV21JpegCompressor::compressRawImage(const void* image,
|
||||
mStrides[0] = width;
|
||||
mStrides[1] = width;
|
||||
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());
|
||||
return NO_ERROR;
|
||||
} else {
|
||||
|
||||
@@ -49,7 +49,7 @@ PreviewWindow::~PreviewWindow()
|
||||
status_t PreviewWindow::setPreviewWindow(struct preview_stream_ops* window,
|
||||
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;
|
||||
Mutex::Autolock locker(&mObjectLock);
|
||||
@@ -81,7 +81,7 @@ status_t PreviewWindow::setPreviewWindow(struct preview_stream_ops* window,
|
||||
|
||||
status_t PreviewWindow::startPreview()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
Mutex::Autolock locker(&mObjectLock);
|
||||
mPreviewEnabled = true;
|
||||
@@ -91,7 +91,7 @@ status_t PreviewWindow::startPreview()
|
||||
|
||||
void PreviewWindow::stopPreview()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
Mutex::Autolock locker(&mObjectLock);
|
||||
mPreviewEnabled = false;
|
||||
@@ -117,7 +117,7 @@ void PreviewWindow::onNextFrameAvailable(const void* frame,
|
||||
/* Need to set / adjust buffer geometry for the preview window.
|
||||
* Note that in the emulator preview window uses only RGB for pixel
|
||||
* formats. */
|
||||
LOGV("%s: Adjusting preview windows %p geometry to %dx%d",
|
||||
ALOGV("%s: Adjusting preview windows %p geometry to %dx%d",
|
||||
__FUNCTION__, mPreviewWindow, mPreviewFrameWidth,
|
||||
mPreviewFrameHeight);
|
||||
res = mPreviewWindow->set_buffers_geometry(mPreviewWindow,
|
||||
|
||||
@@ -212,7 +212,7 @@ QemuClient::~QemuClient()
|
||||
|
||||
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. */
|
||||
if (mPipeFD >= 0) {
|
||||
@@ -247,7 +247,7 @@ status_t QemuClient::connectClient(const char* param)
|
||||
|
||||
void QemuClient::disconnectClient()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
if (mPipeFD >= 0) {
|
||||
close(mPipeFD);
|
||||
@@ -386,7 +386,7 @@ FactoryQemuClient::~FactoryQemuClient()
|
||||
|
||||
status_t FactoryQemuClient::listCameras(char** list)
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
QemuQuery query(mQueryList);
|
||||
if (doQuery(&query) || !query.isQuerySucceeded()) {
|
||||
@@ -445,7 +445,7 @@ CameraQemuClient::~CameraQemuClient()
|
||||
|
||||
status_t CameraQemuClient::queryConnect()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
QemuQuery query(mQueryConnect);
|
||||
doQuery(&query);
|
||||
@@ -458,7 +458,7 @@ status_t CameraQemuClient::queryConnect()
|
||||
|
||||
status_t CameraQemuClient::queryDisconnect()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
QemuQuery query(mQueryDisconnect);
|
||||
doQuery(&query);
|
||||
@@ -473,7 +473,7 @@ status_t CameraQemuClient::queryStart(uint32_t pixel_format,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
char query_str[256];
|
||||
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()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
QemuQuery query(mQueryStop);
|
||||
doQuery(&query);
|
||||
@@ -505,7 +505,7 @@ status_t CameraQemuClient::queryFrame(void* vframe,
|
||||
size_t vframe_size,
|
||||
size_t pframe_size)
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
char query_str[256];
|
||||
snprintf(query_str, sizeof(query_str), "%s video=%d preview=%d",
|
||||
|
||||
Reference in New Issue
Block a user