summaryrefslogtreecommitdiffstats
path: root/services/camera/libcameraservice
diff options
context:
space:
mode:
Diffstat (limited to 'services/camera/libcameraservice')
-rw-r--r--services/camera/libcameraservice/CameraHardwareInterface.h8
-rw-r--r--services/camera/libcameraservice/CameraHardwareStub.cpp8
-rw-r--r--services/camera/libcameraservice/CameraService.cpp44
3 files changed, 30 insertions, 30 deletions
diff --git a/services/camera/libcameraservice/CameraHardwareInterface.h b/services/camera/libcameraservice/CameraHardwareInterface.h
index 44b9de8..34087b5 100644
--- a/services/camera/libcameraservice/CameraHardwareInterface.h
+++ b/services/camera/libcameraservice/CameraHardwareInterface.h
@@ -92,7 +92,7 @@ public:
if(mDevice) {
int rc = mDevice->common.close(&mDevice->common);
if (rc != OK)
- LOGE("Could not close camera %s: %d", mName.string(), rc);
+ ALOGE("Could not close camera %s: %d", mName.string(), rc);
}
}
@@ -102,7 +102,7 @@ public:
int rc = module->methods->open(module, mName.string(),
(hw_device_t **)&mDevice);
if (rc != OK) {
- LOGE("Could not open camera %s: %d", mName.string(), rc);
+ ALOGE("Could not open camera %s: %d", mName.string(), rc);
return rc;
}
initHalPreviewWindow();
@@ -460,7 +460,7 @@ private:
static_cast<CameraHardwareInterface *>(user);
sp<CameraHeapMemory> mem(static_cast<CameraHeapMemory *>(data->handle));
if (index >= mem->mNumBufs) {
- LOGE("%s: invalid buffer index %d, max allowed is %d", __FUNCTION__,
+ ALOGE("%s: invalid buffer index %d, max allowed is %d", __FUNCTION__,
index, mem->mNumBufs);
return;
}
@@ -479,7 +479,7 @@ private:
// MemoryHeapBase.
sp<CameraHeapMemory> mem(static_cast<CameraHeapMemory *>(data->handle));
if (index >= mem->mNumBufs) {
- LOGE("%s: invalid buffer index %d, max allowed is %d", __FUNCTION__,
+ ALOGE("%s: invalid buffer index %d, max allowed is %d", __FUNCTION__,
index, mem->mNumBufs);
return;
}
diff --git a/services/camera/libcameraservice/CameraHardwareStub.cpp b/services/camera/libcameraservice/CameraHardwareStub.cpp
index f922630..cdfb2f5 100644
--- a/services/camera/libcameraservice/CameraHardwareStub.cpp
+++ b/services/camera/libcameraservice/CameraHardwareStub.cpp
@@ -57,7 +57,7 @@ void CameraHardwareStub::initDefaultParameters()
p.setPictureFormat(CameraParameters::PIXEL_FORMAT_JPEG);
if (setParameters(p) != NO_ERROR) {
- LOGE("Failed to set default parameters?!");
+ ALOGE("Failed to set default parameters?!");
}
}
@@ -340,20 +340,20 @@ status_t CameraHardwareStub::setParameters(const CameraParameters& params)
if (strcmp(params.getPreviewFormat(),
CameraParameters::PIXEL_FORMAT_YUV420SP) != 0) {
- LOGE("Only yuv420sp preview is supported");
+ ALOGE("Only yuv420sp preview is supported");
return -1;
}
if (strcmp(params.getPictureFormat(),
CameraParameters::PIXEL_FORMAT_JPEG) != 0) {
- LOGE("Only jpeg still pictures are supported");
+ ALOGE("Only jpeg still pictures are supported");
return -1;
}
int w, h;
params.getPictureSize(&w, &h);
if (w != kCannedJpegWidth && h != kCannedJpegHeight) {
- LOGE("Still picture size must be size of canned JPEG (%dx%d)",
+ ALOGE("Still picture size must be size of canned JPEG (%dx%d)",
kCannedJpegWidth, kCannedJpegHeight);
return -1;
}
diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp
index 3e64db0..6333bd8 100644
--- a/services/camera/libcameraservice/CameraService.cpp
+++ b/services/camera/libcameraservice/CameraService.cpp
@@ -83,13 +83,13 @@ void CameraService::onFirstRef()
if (hw_get_module(CAMERA_HARDWARE_MODULE_ID,
(const hw_module_t **)&mModule) < 0) {
- LOGE("Could not load camera HAL module");
+ ALOGE("Could not load camera HAL module");
mNumberOfCameras = 0;
}
else {
mNumberOfCameras = mModule->get_number_of_cameras();
if (mNumberOfCameras > MAX_CAMERAS) {
- LOGE("Number of cameras(%d) > MAX_CAMERAS(%d).",
+ ALOGE("Number of cameras(%d) > MAX_CAMERAS(%d).",
mNumberOfCameras, MAX_CAMERAS);
mNumberOfCameras = MAX_CAMERAS;
}
@@ -112,7 +112,7 @@ void CameraService::onFirstRef()
CameraService::~CameraService() {
for (int i = 0; i < mNumberOfCameras; i++) {
if (mBusy[i]) {
- LOGE("camera %d is still in use in destructor!", i);
+ ALOGE("camera %d is still in use in destructor!", i);
}
}
@@ -148,13 +148,13 @@ sp<ICamera> CameraService::connect(
LOG1("CameraService::connect E (pid %d, id %d)", callingPid, cameraId);
if (!mModule) {
- LOGE("Camera HAL module not loaded");
+ ALOGE("Camera HAL module not loaded");
return NULL;
}
sp<Client> client;
if (cameraId < 0 || cameraId >= mNumberOfCameras) {
- LOGE("CameraService::connect X (pid %d) rejected (invalid cameraId %d).",
+ ALOGE("CameraService::connect X (pid %d) rejected (invalid cameraId %d).",
callingPid, cameraId);
return NULL;
}
@@ -192,7 +192,7 @@ sp<ICamera> CameraService::connect(
struct camera_info info;
if (mModule->get_camera_info(cameraId, &info) != OK) {
- LOGE("Invalid camera id %d", cameraId);
+ ALOGE("Invalid camera id %d", cameraId);
return NULL;
}
@@ -263,7 +263,7 @@ status_t CameraService::onTransact(
if (!checkCallingPermission(
String16("android.permission.CAMERA"))) {
const int uid = getCallingUid();
- LOGE("Permission Denial: "
+ ALOGE("Permission Denial: "
"can't use the camera pid=%d, uid=%d", pid, uid);
return PERMISSION_DENIED;
}
@@ -298,7 +298,7 @@ MediaPlayer* CameraService::newMediaPlayer(const char *file) {
mp->setAudioStreamType(mAudioStreamType);
mp->prepare();
} else {
- LOGE("Failed to load CameraService sounds: %s", file);
+ ALOGE("Failed to load CameraService sounds: %s", file);
return NULL;
}
return mp;
@@ -399,7 +399,7 @@ status_t CameraService::Client::checkPidAndHardware() const {
status_t result = checkPid();
if (result != NO_ERROR) return result;
if (mHardware == 0) {
- LOGE("attempt to use a camera after disconnect() (pid %d)", getCallingPid());
+ ALOGE("attempt to use a camera after disconnect() (pid %d)", getCallingPid());
return INVALID_OPERATION;
}
return NO_ERROR;
@@ -429,7 +429,7 @@ status_t CameraService::Client::unlock() {
status_t result = checkPid();
if (result == NO_ERROR) {
if (mHardware->recordingEnabled()) {
- LOGE("Not allowed to unlock camera during recording.");
+ ALOGE("Not allowed to unlock camera during recording.");
return INVALID_OPERATION;
}
mClientPid = 0;
@@ -536,7 +536,7 @@ status_t CameraService::Client::setPreviewWindow(const sp<IBinder>& binder,
if (window != 0) {
result = native_window_api_connect(window.get(), NATIVE_WINDOW_API_CAMERA);
if (result != NO_ERROR) {
- LOGE("native_window_api_connect failed: %s (%d)", strerror(-result),
+ ALOGE("native_window_api_connect failed: %s (%d)", strerror(-result),
result);
return result;
}
@@ -634,7 +634,7 @@ status_t CameraService::Client::startCameraMode(camera_mode mode) {
return startPreviewMode();
case CAMERA_RECORDING_MODE:
if (mSurface == 0 && mPreviewWindow == 0) {
- LOGE("mSurface or mPreviewWindow must be set before startRecordingMode.");
+ ALOGE("mSurface or mPreviewWindow must be set before startRecordingMode.");
return INVALID_OPERATION;
}
return startRecordingMode();
@@ -686,7 +686,7 @@ status_t CameraService::Client::startRecordingMode() {
mCameraService->playSound(SOUND_RECORDING);
result = mHardware->startRecording();
if (result != NO_ERROR) {
- LOGE("mHardware->startRecording() failed with status %d", result);
+ ALOGE("mHardware->startRecording() failed with status %d", result);
}
return result;
}
@@ -780,7 +780,7 @@ status_t CameraService::Client::takePicture(int msgType) {
if ((msgType & CAMERA_MSG_RAW_IMAGE) &&
(msgType & CAMERA_MSG_RAW_IMAGE_NOTIFY)) {
- LOGE("CAMERA_MSG_RAW_IMAGE and CAMERA_MSG_RAW_IMAGE_NOTIFY"
+ ALOGE("CAMERA_MSG_RAW_IMAGE and CAMERA_MSG_RAW_IMAGE_NOTIFY"
" cannot be both enabled");
return BAD_VALUE;
}
@@ -841,7 +841,7 @@ status_t CameraService::Client::enableShutterSound(bool enable) {
// Disabling shutter sound is not allowed. Deny if the current
// process is not mediaserver.
if (getCallingPid() != getpid()) {
- LOGE("Failed to disable shutter sound. Permission denied (pid %d)", getCallingPid());
+ ALOGE("Failed to disable shutter sound. Permission denied (pid %d)", getCallingPid());
return PERMISSION_DENIED;
}
}
@@ -936,12 +936,12 @@ sp<CameraService::Client> CameraService::Client::getClientFromCookie(void* user)
// The checks below are not necessary and are for debugging only.
if (client->mCameraService.get() != gCameraService) {
- LOGE("mismatch service!");
+ ALOGE("mismatch service!");
return NULL;
}
if (client->mHardware == 0) {
- LOGE("mHardware == 0: callback after disconnect()?");
+ ALOGE("mHardware == 0: callback after disconnect()?");
return NULL;
}
@@ -999,7 +999,7 @@ void CameraService::Client::dataCallback(int32_t msgType,
if (!client->lockIfMessageWanted(msgType)) return;
if (dataPtr == 0 && metadata == NULL) {
- LOGE("Null data returned in data callback");
+ ALOGE("Null data returned in data callback");
client->handleGenericNotify(CAMERA_MSG_ERROR, UNKNOWN_ERROR, 0);
return;
}
@@ -1032,7 +1032,7 @@ void CameraService::Client::dataCallbackTimestamp(nsecs_t timestamp,
if (!client->lockIfMessageWanted(msgType)) return;
if (dataPtr == 0) {
- LOGE("Null data returned in data with timestamp callback");
+ ALOGE("Null data returned in data with timestamp callback");
client->handleGenericNotify(CAMERA_MSG_ERROR, UNKNOWN_ERROR, 0);
return;
}
@@ -1187,7 +1187,7 @@ void CameraService::Client::copyFrameAndPostCopiedFrame(
mPreviewBuffer = new MemoryHeapBase(size, 0, NULL);
}
if (mPreviewBuffer == 0) {
- LOGE("failed to allocate space for preview buffer");
+ ALOGE("failed to allocate space for preview buffer");
mLock.unlock();
return;
}
@@ -1197,7 +1197,7 @@ void CameraService::Client::copyFrameAndPostCopiedFrame(
sp<MemoryBase> frame = new MemoryBase(previewBuffer, 0, size);
if (frame == 0) {
- LOGE("failed to allocate space for frame callback");
+ ALOGE("failed to allocate space for frame callback");
mLock.unlock();
return;
}
@@ -1223,7 +1223,7 @@ int CameraService::Client::getOrientation(int degrees, bool mirror) {
return HAL_TRANSFORM_FLIP_V | HAL_TRANSFORM_ROT_90;
}
}
- LOGE("Invalid setDisplayOrientation degrees=%d", degrees);
+ ALOGE("Invalid setDisplayOrientation degrees=%d", degrees);
return -1;
}