From 29357bc2c0dd7c43ad3bd0c8e3efa4e6fd9bfd47 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Fri, 6 Jan 2012 19:20:56 +0000 Subject: Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c --- media/libmedia/mediarecorder.cpp | 130 +++++++++++++++++++-------------------- 1 file changed, 65 insertions(+), 65 deletions(-) (limited to 'media/libmedia/mediarecorder.cpp') diff --git a/media/libmedia/mediarecorder.cpp b/media/libmedia/mediarecorder.cpp index ec62978..8d947d8 100644 --- a/media/libmedia/mediarecorder.cpp +++ b/media/libmedia/mediarecorder.cpp @@ -33,11 +33,11 @@ status_t MediaRecorder::setCamera(const sp& camera, const sp& surface) { ALOGV("setPreviewSurface(%p)", surface.get()); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) { - LOGE("setPreviewSurface called in an invalid state(%d)", mCurrentState); + ALOGE("setPreviewSurface called in an invalid state(%d)", mCurrentState); return INVALID_OPERATION; } if (!mIsVideoSourceSet) { - LOGE("try to set preview surface without setting the video source first"); + ALOGE("try to set preview surface without setting the video source first"); return INVALID_OPERATION; } @@ -79,11 +79,11 @@ status_t MediaRecorder::init() { ALOGV("init"); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_IDLE)) { - LOGE("init called in an invalid state(%d)", mCurrentState); + ALOGE("init called in an invalid state(%d)", mCurrentState); return INVALID_OPERATION; } @@ -109,11 +109,11 @@ status_t MediaRecorder::setVideoSource(int vs) { ALOGV("setVideoSource(%d)", vs); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (mIsVideoSourceSet) { - LOGE("video source has already been set"); + ALOGE("video source has already been set"); return INVALID_OPERATION; } if (mCurrentState & MEDIA_RECORDER_IDLE) { @@ -124,7 +124,7 @@ status_t MediaRecorder::setVideoSource(int vs) } } if (!(mCurrentState & MEDIA_RECORDER_INITIALIZED)) { - LOGE("setVideoSource called in an invalid state(%d)", mCurrentState); + ALOGE("setVideoSource called in an invalid state(%d)", mCurrentState); return INVALID_OPERATION; } @@ -144,7 +144,7 @@ status_t MediaRecorder::setAudioSource(int as) { ALOGV("setAudioSource(%d)", as); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (mCurrentState & MEDIA_RECORDER_IDLE) { @@ -155,11 +155,11 @@ status_t MediaRecorder::setAudioSource(int as) } } if (mIsAudioSourceSet) { - LOGE("audio source has already been set"); + ALOGE("audio source has already been set"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_INITIALIZED)) { - LOGE("setAudioSource called in an invalid state(%d)", mCurrentState); + ALOGE("setAudioSource called in an invalid state(%d)", mCurrentState); return INVALID_OPERATION; } @@ -177,21 +177,21 @@ status_t MediaRecorder::setOutputFormat(int of) { ALOGV("setOutputFormat(%d)", of); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_INITIALIZED)) { - LOGE("setOutputFormat called in an invalid state: %d", mCurrentState); + ALOGE("setOutputFormat called in an invalid state: %d", mCurrentState); return INVALID_OPERATION; } if (mIsVideoSourceSet && of >= OUTPUT_FORMAT_AUDIO_ONLY_START && of != OUTPUT_FORMAT_RTP_AVP && of != OUTPUT_FORMAT_MPEG2TS) { //first non-video output format - LOGE("output format (%d) is meant for audio recording only and incompatible with video recording", of); + ALOGE("output format (%d) is meant for audio recording only and incompatible with video recording", of); return INVALID_OPERATION; } status_t ret = mMediaRecorder->setOutputFormat(of); if (OK != ret) { - LOGE("setOutputFormat failed: %d", ret); + ALOGE("setOutputFormat failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -203,19 +203,19 @@ status_t MediaRecorder::setVideoEncoder(int ve) { ALOGV("setVideoEncoder(%d)", ve); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (!mIsVideoSourceSet) { - LOGE("try to set the video encoder without setting the video source first"); + ALOGE("try to set the video encoder without setting the video source first"); return INVALID_OPERATION; } if (mIsVideoEncoderSet) { - LOGE("video encoder has already been set"); + ALOGE("video encoder has already been set"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) { - LOGE("setVideoEncoder called in an invalid state(%d)", mCurrentState); + ALOGE("setVideoEncoder called in an invalid state(%d)", mCurrentState); return INVALID_OPERATION; } @@ -233,19 +233,19 @@ status_t MediaRecorder::setAudioEncoder(int ae) { ALOGV("setAudioEncoder(%d)", ae); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (!mIsAudioSourceSet) { - LOGE("try to set the audio encoder without setting the audio source first"); + ALOGE("try to set the audio encoder without setting the audio source first"); return INVALID_OPERATION; } if (mIsAudioEncoderSet) { - LOGE("audio encoder has already been set"); + ALOGE("audio encoder has already been set"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) { - LOGE("setAudioEncoder called in an invalid state(%d)", mCurrentState); + ALOGE("setAudioEncoder called in an invalid state(%d)", mCurrentState); return INVALID_OPERATION; } @@ -263,15 +263,15 @@ status_t MediaRecorder::setOutputFile(const char* path) { ALOGV("setOutputFile(%s)", path); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (mIsOutputFileSet) { - LOGE("output file has already been set"); + ALOGE("output file has already been set"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) { - LOGE("setOutputFile called in an invalid state(%d)", mCurrentState); + ALOGE("setOutputFile called in an invalid state(%d)", mCurrentState); return INVALID_OPERATION; } @@ -289,15 +289,15 @@ status_t MediaRecorder::setOutputFile(int fd, int64_t offset, int64_t length) { ALOGV("setOutputFile(%d, %lld, %lld)", fd, offset, length); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (mIsOutputFileSet) { - LOGE("output file has already been set"); + ALOGE("output file has already been set"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) { - LOGE("setOutputFile called in an invalid state(%d)", mCurrentState); + ALOGE("setOutputFile called in an invalid state(%d)", mCurrentState); return INVALID_OPERATION; } @@ -308,7 +308,7 @@ status_t MediaRecorder::setOutputFile(int fd, int64_t offset, int64_t length) // this issue by checking the file descriptor first before passing // it through binder call. if (fd < 0) { - LOGE("Invalid file descriptor: %d", fd); + ALOGE("Invalid file descriptor: %d", fd); return BAD_VALUE; } @@ -326,21 +326,21 @@ status_t MediaRecorder::setVideoSize(int width, int height) { ALOGV("setVideoSize(%d, %d)", width, height); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) { - LOGE("setVideoSize called in an invalid state: %d", mCurrentState); + ALOGE("setVideoSize called in an invalid state: %d", mCurrentState); return INVALID_OPERATION; } if (!mIsVideoSourceSet) { - LOGE("Cannot set video size without setting video source first"); + ALOGE("Cannot set video size without setting video source first"); return INVALID_OPERATION; } status_t ret = mMediaRecorder->setVideoSize(width, height); if (OK != ret) { - LOGE("setVideoSize failed: %d", ret); + ALOGE("setVideoSize failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -358,7 +358,7 @@ sp MediaRecorder:: mSurfaceMediaSource = mMediaRecorder->querySurfaceMediaSource(); if (mSurfaceMediaSource == NULL) { - LOGE("SurfaceMediaSource could not be initialized!"); + ALOGE("SurfaceMediaSource could not be initialized!"); } return mSurfaceMediaSource; } @@ -369,21 +369,21 @@ status_t MediaRecorder::setVideoFrameRate(int frames_per_second) { ALOGV("setVideoFrameRate(%d)", frames_per_second); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) { - LOGE("setVideoFrameRate called in an invalid state: %d", mCurrentState); + ALOGE("setVideoFrameRate called in an invalid state: %d", mCurrentState); return INVALID_OPERATION; } if (!mIsVideoSourceSet) { - LOGE("Cannot set video frame rate without setting video source first"); + ALOGE("Cannot set video frame rate without setting video source first"); return INVALID_OPERATION; } status_t ret = mMediaRecorder->setVideoFrameRate(frames_per_second); if (OK != ret) { - LOGE("setVideoFrameRate failed: %d", ret); + ALOGE("setVideoFrameRate failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -393,7 +393,7 @@ status_t MediaRecorder::setVideoFrameRate(int frames_per_second) status_t MediaRecorder::setParameters(const String8& params) { ALOGV("setParameters(%s)", params.string()); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } @@ -402,13 +402,13 @@ status_t MediaRecorder::setParameters(const String8& params) { MEDIA_RECORDER_RECORDING | MEDIA_RECORDER_ERROR)); if (isInvalidState) { - LOGE("setParameters is called in an invalid state: %d", mCurrentState); + ALOGE("setParameters is called in an invalid state: %d", mCurrentState); return INVALID_OPERATION; } status_t ret = mMediaRecorder->setParameters(params); if (OK != ret) { - LOGE("setParameters(%s) failed: %d", params.string(), ret); + ALOGE("setParameters(%s) failed: %d", params.string(), ret); // Do not change our current state to MEDIA_RECORDER_ERROR, failures // of the only currently supported parameters, "max-duration" and // "max-filesize" are _not_ fatal. @@ -421,34 +421,34 @@ status_t MediaRecorder::prepare() { ALOGV("prepare"); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) { - LOGE("prepare called in an invalid state: %d", mCurrentState); + ALOGE("prepare called in an invalid state: %d", mCurrentState); return INVALID_OPERATION; } if (mIsAudioSourceSet != mIsAudioEncoderSet) { if (mIsAudioSourceSet) { - LOGE("audio source is set, but audio encoder is not set"); + ALOGE("audio source is set, but audio encoder is not set"); } else { // must not happen, since setAudioEncoder checks this already - LOGE("audio encoder is set, but audio source is not set"); + ALOGE("audio encoder is set, but audio source is not set"); } return INVALID_OPERATION; } if (mIsVideoSourceSet != mIsVideoEncoderSet) { if (mIsVideoSourceSet) { - LOGE("video source is set, but video encoder is not set"); + ALOGE("video source is set, but video encoder is not set"); } else { // must not happen, since setVideoEncoder checks this already - LOGE("video encoder is set, but video source is not set"); + ALOGE("video encoder is set, but video source is not set"); } return INVALID_OPERATION; } status_t ret = mMediaRecorder->prepare(); if (OK != ret) { - LOGE("prepare failed: %d", ret); + ALOGE("prepare failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -460,17 +460,17 @@ status_t MediaRecorder::getMaxAmplitude(int* max) { ALOGV("getMaxAmplitude"); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (mCurrentState & MEDIA_RECORDER_ERROR) { - LOGE("getMaxAmplitude called in an invalid state: %d", mCurrentState); + ALOGE("getMaxAmplitude called in an invalid state: %d", mCurrentState); return INVALID_OPERATION; } status_t ret = mMediaRecorder->getMaxAmplitude(max); if (OK != ret) { - LOGE("getMaxAmplitude failed: %d", ret); + ALOGE("getMaxAmplitude failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -481,17 +481,17 @@ status_t MediaRecorder::start() { ALOGV("start"); if (mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_PREPARED)) { - LOGE("start called in an invalid state: %d", mCurrentState); + ALOGE("start called in an invalid state: %d", mCurrentState); return INVALID_OPERATION; } status_t ret = mMediaRecorder->start(); if (OK != ret) { - LOGE("start failed: %d", ret); + ALOGE("start failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -503,17 +503,17 @@ status_t MediaRecorder::stop() { ALOGV("stop"); if (mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_RECORDING)) { - LOGE("stop called in an invalid state: %d", mCurrentState); + ALOGE("stop called in an invalid state: %d", mCurrentState); return INVALID_OPERATION; } status_t ret = mMediaRecorder->stop(); if (OK != ret) { - LOGE("stop failed: %d", ret); + ALOGE("stop failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -531,7 +531,7 @@ status_t MediaRecorder::reset() { ALOGV("reset"); if (mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } @@ -556,7 +556,7 @@ status_t MediaRecorder::reset() break; default: { - LOGE("Unexpected non-existing state: %d", mCurrentState); + ALOGE("Unexpected non-existing state: %d", mCurrentState); break; } } @@ -567,12 +567,12 @@ status_t MediaRecorder::close() { ALOGV("close"); if (!(mCurrentState & MEDIA_RECORDER_INITIALIZED)) { - LOGE("close called in an invalid state: %d", mCurrentState); + ALOGE("close called in an invalid state: %d", mCurrentState); return INVALID_OPERATION; } status_t ret = mMediaRecorder->close(); if (OK != ret) { - LOGE("close failed: %d", ret); + ALOGE("close failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return UNKNOWN_ERROR; } else { @@ -586,7 +586,7 @@ status_t MediaRecorder::doReset() ALOGV("doReset"); status_t ret = mMediaRecorder->reset(); if (OK != ret) { - LOGE("doReset failed: %d", ret); + ALOGE("doReset failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } else { -- cgit v1.1