diff options
author | Steve Block <steveblock@google.com> | 2012-01-06 19:20:56 +0000 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2012-01-08 13:19:13 +0000 |
commit | 29357bc2c0dd7c43ad3bd0c8e3efa4e6fd9bfd47 (patch) | |
tree | 3bdafe4b02fe36f6ee29c3170f0b0d2799bebf86 | |
parent | d709ca9c6a0fa1c8f40cbe624a119398643c5087 (diff) | |
download | frameworks_av-29357bc2c0dd7c43ad3bd0c8e3efa4e6fd9bfd47.zip frameworks_av-29357bc2c0dd7c43ad3bd0c8e3efa4e6fd9bfd47.tar.gz frameworks_av-29357bc2c0dd7c43ad3bd0c8e3efa4e6fd9bfd47.tar.bz2 |
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
101 files changed, 675 insertions, 675 deletions
diff --git a/camera/Camera.cpp b/camera/Camera.cpp index d28b7f8..ee458f1 100644 --- a/camera/Camera.cpp +++ b/camera/Camera.cpp @@ -56,7 +56,7 @@ const sp<ICameraService>& Camera::getCameraService() binder->linkToDeath(mDeathNotifier); mCameraService = interface_cast<ICameraService>(binder); } - LOGE_IF(mCameraService==0, "no CameraService!?"); + ALOGE_IF(mCameraService==0, "no CameraService!?"); return mCameraService; } @@ -72,7 +72,7 @@ sp<Camera> Camera::create(const sp<ICamera>& camera) { ALOGV("create"); if (camera == 0) { - LOGE("camera remote is a NULL pointer"); + ALOGE("camera remote is a NULL pointer"); return 0; } diff --git a/camera/CameraParameters.cpp b/camera/CameraParameters.cpp index 209d84a..059a8a5 100644 --- a/camera/CameraParameters.cpp +++ b/camera/CameraParameters.cpp @@ -231,12 +231,12 @@ void CameraParameters::set(const char *key, const char *value) { // XXX i think i can do this with strspn() if (strchr(key, '=') || strchr(key, ';')) { - //XXX LOGE("Key \"%s\"contains invalid character (= or ;)", key); + //XXX ALOGE("Key \"%s\"contains invalid character (= or ;)", key); return; } if (strchr(value, '=') || strchr(key, ';')) { - //XXX LOGE("Value \"%s\"contains invalid character (= or ;)", value); + //XXX ALOGE("Value \"%s\"contains invalid character (= or ;)", value); return; } @@ -294,7 +294,7 @@ static int parse_pair(const char *str, int *first, int *second, char delim, int w = (int)strtol(str, &end, 10); // If a delimeter does not immediately follow, give up. if (*end != delim) { - LOGE("Cannot find delimeter (%c) in str=%s", delim, str); + ALOGE("Cannot find delimeter (%c) in str=%s", delim, str); return -1; } @@ -324,7 +324,7 @@ static void parseSizesList(const char *sizesStr, Vector<Size> &sizes) int success = parse_pair(sizeStartPtr, &width, &height, 'x', &sizeStartPtr); if (success == -1 || (*sizeStartPtr != ',' && *sizeStartPtr != '\0')) { - LOGE("Picture sizes string \"%s\" contains invalid character.", sizesStr); + ALOGE("Picture sizes string \"%s\" contains invalid character.", sizesStr); return; } sizes.push(Size(width, height)); diff --git a/cmds/stagefright/sf2.cpp b/cmds/stagefright/sf2.cpp index 7551d31..ae80f88 100644 --- a/cmds/stagefright/sf2.cpp +++ b/cmds/stagefright/sf2.cpp @@ -454,7 +454,7 @@ private: if (sizeNeeded > sizeLeft) { if (outBuffer->size() == 0) { - LOGE("Unable to fit even a single input buffer of size %d.", + ALOGE("Unable to fit even a single input buffer of size %d.", sizeNeeded); } CHECK_GT(outBuffer->size(), 0u); diff --git a/drm/common/ReadWriteUtils.cpp b/drm/common/ReadWriteUtils.cpp index c16214e..fd17e98 100644 --- a/drm/common/ReadWriteUtils.cpp +++ b/drm/common/ReadWriteUtils.cpp @@ -85,7 +85,7 @@ void ReadWriteUtils::writeToFile(const String8& filePath, const String8& data) { int size = data.size(); if (FAILURE != ftruncate(fd, size)) { if (size != write(fd, data.string(), size)) { - LOGE("Failed to write the data to: %s", filePath.string()); + ALOGE("Failed to write the data to: %s", filePath.string()); } } fclose(file); @@ -101,7 +101,7 @@ void ReadWriteUtils::appendToFile(const String8& filePath, const String8& data) int size = data.size(); if (size != write(fd, data.string(), size)) { - LOGE("Failed to write the data to: %s", filePath.string()); + ALOGE("Failed to write the data to: %s", filePath.string()); } fclose(file); } diff --git a/drm/libdrmframework/plugins/forward-lock/FwdLockEngine/src/FwdLockEngine.cpp b/drm/libdrmframework/plugins/forward-lock/FwdLockEngine/src/FwdLockEngine.cpp index 7799040..0273a4b 100644 --- a/drm/libdrmframework/plugins/forward-lock/FwdLockEngine/src/FwdLockEngine.cpp +++ b/drm/libdrmframework/plugins/forward-lock/FwdLockEngine/src/FwdLockEngine.cpp @@ -92,12 +92,12 @@ int FwdLockEngine::getConvertedStatus(FwdLockConv_Status_t status) { case FwdLockConv_Status_InvalidArgument: case FwdLockConv_Status_UnsupportedFileFormat: case FwdLockConv_Status_UnsupportedContentTransferEncoding: - LOGE("FwdLockEngine getConvertedStatus: file conversion Error %d. " + ALOGE("FwdLockEngine getConvertedStatus: file conversion Error %d. " "Returning STATUS_INPUTDATA_ERROR", status); retStatus = DrmConvertedStatus::STATUS_INPUTDATA_ERROR; break; default: - LOGE("FwdLockEngine getConvertedStatus: file conversion Error %d. " + ALOGE("FwdLockEngine getConvertedStatus: file conversion Error %d. " "Returning STATUS_ERROR", status); retStatus = DrmConvertedStatus::STATUS_ERROR; break; @@ -139,7 +139,7 @@ android::status_t FwdLockEngine::onInitialize(int uniqueId) { if (FwdLockGlue_InitializeKeyEncryption()) { LOG_VERBOSE("FwdLockEngine::onInitialize -- FwdLockGlue_InitializeKeyEncryption succeeded"); } else { - LOGE("FwdLockEngine::onInitialize -- FwdLockGlue_InitializeKeyEncryption failed:" + ALOGE("FwdLockEngine::onInitialize -- FwdLockGlue_InitializeKeyEncryption failed:" "errno = %d", errno); } @@ -351,7 +351,7 @@ status_t FwdLockEngine::onOpenConvertSession(int uniqueId, convertSessionMap.addValue(convertId, newSession); result = DRM_NO_ERROR; } else { - LOGE("FwdLockEngine::onOpenConvertSession -- FwdLockConv_OpenSession failed."); + ALOGE("FwdLockEngine::onOpenConvertSession -- FwdLockConv_OpenSession failed."); delete newSession; } } @@ -448,7 +448,7 @@ status_t FwdLockEngine::onOpenDecryptSession(int uniqueId, (!decodeSessionMap.isCreated(decryptHandle->decryptId))) { fileDesc = dup(fd); } else { - LOGE("FwdLockEngine::onOpenDecryptSession parameter error"); + ALOGE("FwdLockEngine::onOpenDecryptSession parameter error"); return result; } @@ -550,13 +550,13 @@ status_t FwdLockEngine::onInitializeDecryptUnit(int uniqueId, DecryptHandle* decryptHandle, int decryptUnitId, const DrmBuffer* headerInfo) { - LOGE("FwdLockEngine::onInitializeDecryptUnit is not supported for this DRM scheme"); + ALOGE("FwdLockEngine::onInitializeDecryptUnit is not supported for this DRM scheme"); return DRM_ERROR_UNKNOWN; } status_t FwdLockEngine::onDecrypt(int uniqueId, DecryptHandle* decryptHandle, int decryptUnitId, const DrmBuffer* encBuffer, DrmBuffer** decBuffer, DrmBuffer* IV) { - LOGE("FwdLockEngine::onDecrypt is not supported for this DRM scheme"); + ALOGE("FwdLockEngine::onDecrypt is not supported for this DRM scheme"); return DRM_ERROR_UNKNOWN; } @@ -565,14 +565,14 @@ status_t FwdLockEngine::onDecrypt(int uniqueId, int decryptUnitId, const DrmBuffer* encBuffer, DrmBuffer** decBuffer) { - LOGE("FwdLockEngine::onDecrypt is not supported for this DRM scheme"); + ALOGE("FwdLockEngine::onDecrypt is not supported for this DRM scheme"); return DRM_ERROR_UNKNOWN; } status_t FwdLockEngine::onFinalizeDecryptUnit(int uniqueId, DecryptHandle* decryptHandle, int decryptUnitId) { - LOGE("FwdLockEngine::onFinalizeDecryptUnit is not supported for this DRM scheme"); + ALOGE("FwdLockEngine::onFinalizeDecryptUnit is not supported for this DRM scheme"); return DRM_ERROR_UNKNOWN; } @@ -650,11 +650,11 @@ ssize_t FwdLockEngine::onPread(int uniqueId, if (((off_t)-1) != decoderSession->offset) { bytesRead = onRead(uniqueId, decryptHandle, buffer, numBytes); if (bytesRead < 0) { - LOGE("FwdLockEngine::onPread error reading"); + ALOGE("FwdLockEngine::onPread error reading"); } } } else { - LOGE("FwdLockEngine::onPread decryptId not found"); + ALOGE("FwdLockEngine::onPread decryptId not found"); } return bytesRead; diff --git a/media/libeffects/preprocessing/PreProcessing.cpp b/media/libeffects/preprocessing/PreProcessing.cpp index 8dfcb78..e988e06 100755 --- a/media/libeffects/preprocessing/PreProcessing.cpp +++ b/media/libeffects/preprocessing/PreProcessing.cpp @@ -616,7 +616,7 @@ int Effect_SetState(preproc_effect_t *effect, uint32_t state) case PREPROC_EFFECT_STATE_CREATED: case PREPROC_EFFECT_STATE_ACTIVE: case PREPROC_EFFECT_STATE_CONFIG: - LOGE("Effect_SetState invalid transition"); + ALOGE("Effect_SetState invalid transition"); status = -ENOSYS; break; default: @@ -626,7 +626,7 @@ int Effect_SetState(preproc_effect_t *effect, uint32_t state) case PREPROC_EFFECT_STATE_CONFIG: switch(effect->state) { case PREPROC_EFFECT_STATE_INIT: - LOGE("Effect_SetState invalid transition"); + ALOGE("Effect_SetState invalid transition"); status = -ENOSYS; break; case PREPROC_EFFECT_STATE_ACTIVE: @@ -645,7 +645,7 @@ int Effect_SetState(preproc_effect_t *effect, uint32_t state) case PREPROC_EFFECT_STATE_INIT: case PREPROC_EFFECT_STATE_CREATED: case PREPROC_EFFECT_STATE_ACTIVE: - LOGE("Effect_SetState invalid transition"); + ALOGE("Effect_SetState invalid transition"); status = -ENOSYS; break; case PREPROC_EFFECT_STATE_CONFIG: diff --git a/media/libmedia/AudioEffect.cpp b/media/libmedia/AudioEffect.cpp index d74389d..6639d06 100644 --- a/media/libmedia/AudioEffect.cpp +++ b/media/libmedia/AudioEffect.cpp @@ -107,7 +107,7 @@ status_t AudioEffect::set(const effect_uuid_t *type, const sp<IAudioFlinger>& audioFlinger = AudioSystem::get_audio_flinger(); if (audioFlinger == 0) { - LOGE("set(): Could not get audioflinger"); + ALOGE("set(): Could not get audioflinger"); return NO_INIT; } @@ -138,7 +138,7 @@ status_t AudioEffect::set(const effect_uuid_t *type, mIEffectClient, priority, io, mSessionId, &mStatus, &mId, &enabled); if (iEffect == 0 || (mStatus != NO_ERROR && mStatus != ALREADY_EXISTS)) { - LOGE("set(): AudioFlinger could not create effect, status: %d", mStatus); + ALOGE("set(): AudioFlinger could not create effect, status: %d", mStatus); return mStatus; } @@ -148,7 +148,7 @@ status_t AudioEffect::set(const effect_uuid_t *type, cblk = iEffect->getCblk(); if (cblk == 0) { mStatus = NO_INIT; - LOGE("Could not get control block"); + ALOGE("Could not get control block"); return mStatus; } diff --git a/media/libmedia/AudioRecord.cpp b/media/libmedia/AudioRecord.cpp index c1591a4..2674070 100644 --- a/media/libmedia/AudioRecord.cpp +++ b/media/libmedia/AudioRecord.cpp @@ -54,12 +54,12 @@ status_t AudioRecord::getMinFrameCount( size_t size = 0; if (AudioSystem::getInputBufferSize(sampleRate, format, channelCount, &size) != NO_ERROR) { - LOGE("AudioSystem could not query the input buffer size."); + ALOGE("AudioSystem could not query the input buffer size."); return NO_INIT; } if (size == 0) { - LOGE("Unsupported configuration: sampleRate %d, format %d, channelCount %d", + ALOGE("Unsupported configuration: sampleRate %d, format %d, channelCount %d", sampleRate, format, channelCount); return BAD_VALUE; } @@ -153,7 +153,7 @@ status_t AudioRecord::set( } // validate parameters if (!audio_is_valid_format(format)) { - LOGE("Invalid format"); + ALOGE("Invalid format"); return BAD_VALUE; } @@ -177,7 +177,7 @@ status_t AudioRecord::set( (audio_in_acoustics_t)flags, mSessionId); if (input == 0) { - LOGE("Could not get audio input for record source %d", inputSource); + ALOGE("Could not get audio input for record source %d", inputSource); return BAD_VALUE; } @@ -292,7 +292,7 @@ status_t AudioRecord::start() if (t != 0) { if (t->exitPending()) { if (t->requestExitAndWait() == WOULD_BLOCK) { - LOGE("AudioRecord::start called from thread"); + ALOGE("AudioRecord::start called from thread"); return WOULD_BLOCK; } } @@ -472,12 +472,12 @@ status_t AudioRecord::openRecord_l( &status); if (record == 0) { - LOGE("AudioFlinger could not create record track, status: %d", status); + ALOGE("AudioFlinger could not create record track, status: %d", status); return status; } sp<IMemory> cblk = record->getCblk(); if (cblk == 0) { - LOGE("Could not get control block"); + ALOGE("Could not get control block"); return NO_INIT; } mAudioRecord.clear(); @@ -626,7 +626,7 @@ ssize_t AudioRecord::read(void* buffer, size_t userSize) if (ssize_t(userSize) < 0) { // sanity-check. user is most-likely passing an error code. - LOGE("AudioRecord::read(buffer=%p, size=%u (%d)", + ALOGE("AudioRecord::read(buffer=%p, size=%u (%d)", buffer, userSize, userSize); return BAD_VALUE; } @@ -709,7 +709,7 @@ bool AudioRecord::processAudioBuffer(const sp<ClientRecordThread>& thread) status_t err = obtainBuffer(&audioBuffer, 1); if (err < NO_ERROR) { if (err != TIMED_OUT) { - LOGE_IF(err != status_t(NO_MORE_BUFFERS), "Error obtaining an audio buffer, giving up."); + ALOGE_IF(err != status_t(NO_MORE_BUFFERS), "Error obtaining an audio buffer, giving up."); return false; } break; diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp index 0ef1885..f7f129c 100644 --- a/media/libmedia/AudioSystem.cpp +++ b/media/libmedia/AudioSystem.cpp @@ -70,7 +70,7 @@ const sp<IAudioFlinger>& AudioSystem::get_audio_flinger() gAudioFlinger = interface_cast<IAudioFlinger>(binder); gAudioFlinger->registerClient(gAudioFlingerClient); } - LOGE_IF(gAudioFlinger==0, "no AudioFlinger!?"); + ALOGE_IF(gAudioFlinger==0, "no AudioFlinger!?"); return gAudioFlinger; } diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp index 891e331..d290cd1 100644 --- a/media/libmedia/AudioTrack.cpp +++ b/media/libmedia/AudioTrack.cpp @@ -158,7 +158,7 @@ status_t AudioTrack::set( AutoMutex lock(mLock); if (mAudioTrack != 0) { - LOGE("Track already in use"); + ALOGE("Track already in use"); return INVALID_OPERATION; } @@ -188,7 +188,7 @@ status_t AudioTrack::set( // validate parameters if (!audio_is_valid_format(format)) { - LOGE("Invalid format"); + ALOGE("Invalid format"); return BAD_VALUE; } @@ -198,7 +198,7 @@ status_t AudioTrack::set( } if (!audio_is_output_channel(channelMask)) { - LOGE("Invalid channel mask"); + ALOGE("Invalid channel mask"); return BAD_VALUE; } uint32_t channelCount = popcount(channelMask); @@ -209,7 +209,7 @@ status_t AudioTrack::set( (audio_policy_output_flags_t)flags); if (output == 0) { - LOGE("Could not get audio output for stream type %d", streamType); + ALOGE("Could not get audio output for stream type %d", streamType); return BAD_VALUE; } @@ -239,7 +239,7 @@ status_t AudioTrack::set( if (cbf != 0) { mAudioTrackThread = new AudioTrackThread(*this, threadCanCallJava); if (mAudioTrackThread == 0) { - LOGE("Could not create callback thread"); + ALOGE("Could not create callback thread"); return NO_INIT; } } @@ -324,7 +324,7 @@ void AudioTrack::start() if (t != 0) { if (t->exitPending()) { if (t->requestExitAndWait() == WOULD_BLOCK) { - LOGE("AudioTrack::start called from thread"); + ALOGE("AudioTrack::start called from thread"); return; } } @@ -566,12 +566,12 @@ status_t AudioTrack::setLoop_l(uint32_t loopStart, uint32_t loopEnd, int loopCou if (loopStart >= loopEnd || loopEnd - loopStart > cblk->frameCount || cblk->server > loopStart) { - LOGE("setLoop invalid value: loopStart %d, loopEnd %d, loopCount %d, framecount %d, user %d", loopStart, loopEnd, loopCount, cblk->frameCount, cblk->user); + ALOGE("setLoop invalid value: loopStart %d, loopEnd %d, loopCount %d, framecount %d, user %d", loopStart, loopEnd, loopCount, cblk->frameCount, cblk->user); return BAD_VALUE; } if ((mSharedBuffer != 0) && (loopEnd > cblk->frameCount)) { - LOGE("setLoop invalid value: loop markers beyond data: loopStart %d, loopEnd %d, framecount %d", + ALOGE("setLoop invalid value: loop markers beyond data: loopStart %d, loopEnd %d, framecount %d", loopStart, loopEnd, cblk->frameCount); return BAD_VALUE; } @@ -726,7 +726,7 @@ status_t AudioTrack::createTrack_l( status_t status; const sp<IAudioFlinger>& audioFlinger = AudioSystem::get_audio_flinger(); if (audioFlinger == 0) { - LOGE("Could not get audioflinger"); + ALOGE("Could not get audioflinger"); return NO_INIT; } @@ -769,7 +769,7 @@ status_t AudioTrack::createTrack_l( } if (frameCount < minFrameCount) { if (enforceFrameCount) { - LOGE("Invalid buffer size: minFrameCount %d, frameCount %d", minFrameCount, frameCount); + ALOGE("Invalid buffer size: minFrameCount %d, frameCount %d", minFrameCount, frameCount); return BAD_VALUE; } else { frameCount = minFrameCount; @@ -779,7 +779,7 @@ status_t AudioTrack::createTrack_l( // Ensure that buffer alignment matches channelcount int channelCount = popcount(channelMask); if (((uint32_t)sharedBuffer->pointer() & (channelCount | 1)) != 0) { - LOGE("Invalid buffer alignement: address %p, channelCount %d", sharedBuffer->pointer(), channelCount); + ALOGE("Invalid buffer alignement: address %p, channelCount %d", sharedBuffer->pointer(), channelCount); return BAD_VALUE; } frameCount = sharedBuffer->size()/channelCount/sizeof(int16_t); @@ -799,12 +799,12 @@ status_t AudioTrack::createTrack_l( &status); if (track == 0) { - LOGE("AudioFlinger could not create track, status: %d", status); + ALOGE("AudioFlinger could not create track, status: %d", status); return status; } sp<IMemory> cblk = track->getCblk(); if (cblk == 0) { - LOGE("Could not get control block"); + ALOGE("Could not get control block"); return NO_INIT; } mAudioTrack = track; @@ -964,7 +964,7 @@ ssize_t AudioTrack::write(const void* buffer, size_t userSize) if (ssize_t(userSize) < 0) { // sanity-check. user is most-likely passing an error code. - LOGE("AudioTrack::write(buffer=%p, size=%u (%d)", + ALOGE("AudioTrack::write(buffer=%p, size=%u (%d)", buffer, userSize, userSize); return BAD_VALUE; } @@ -1096,7 +1096,7 @@ bool AudioTrack::processAudioBuffer(const sp<AudioTrackThread>& thread) status_t err = obtainBuffer(&audioBuffer, waitCount); if (err < NO_ERROR) { if (err != TIMED_OUT) { - LOGE_IF(err != status_t(NO_MORE_BUFFERS), "Error obtaining an audio buffer, giving up."); + ALOGE_IF(err != status_t(NO_MORE_BUFFERS), "Error obtaining an audio buffer, giving up."); return false; } break; diff --git a/media/libmedia/IAudioFlinger.cpp b/media/libmedia/IAudioFlinger.cpp index bedf8d3..abd491f 100644 --- a/media/libmedia/IAudioFlinger.cpp +++ b/media/libmedia/IAudioFlinger.cpp @@ -112,7 +112,7 @@ public: data.writeInt32(lSessionId); status_t lStatus = remote()->transact(CREATE_TRACK, data, &reply); if (lStatus != NO_ERROR) { - LOGE("createTrack error: %s", strerror(-lStatus)); + ALOGE("createTrack error: %s", strerror(-lStatus)); } else { lSessionId = reply.readInt32(); if (sessionId != NULL) { @@ -155,7 +155,7 @@ public: data.writeInt32(lSessionId); status_t lStatus = remote()->transact(OPEN_RECORD, data, &reply); if (lStatus != NO_ERROR) { - LOGE("openRecord error: %s", strerror(-lStatus)); + ALOGE("openRecord error: %s", strerror(-lStatus)); } else { lSessionId = reply.readInt32(); if (sessionId != NULL) { @@ -632,7 +632,7 @@ public: status_t lStatus = remote()->transact(CREATE_EFFECT, data, &reply); if (lStatus != NO_ERROR) { - LOGE("createEffect error: %s", strerror(-lStatus)); + ALOGE("createEffect error: %s", strerror(-lStatus)); } else { lStatus = reply.readInt32(); int tmp = reply.readInt32(); diff --git a/media/libmedia/IMediaDeathNotifier.cpp b/media/libmedia/IMediaDeathNotifier.cpp index 08b2286..8525482 100644 --- a/media/libmedia/IMediaDeathNotifier.cpp +++ b/media/libmedia/IMediaDeathNotifier.cpp @@ -54,7 +54,7 @@ IMediaDeathNotifier::getMediaPlayerService() binder->linkToDeath(sDeathNotifier); sMediaPlayerService = interface_cast<IMediaPlayerService>(binder); } - LOGE_IF(sMediaPlayerService == 0, "no media player service!?"); + ALOGE_IF(sMediaPlayerService == 0, "no media player service!?"); return sMediaPlayerService; } diff --git a/media/libmedia/JetPlayer.cpp b/media/libmedia/JetPlayer.cpp index afa84b7..188e582 100644 --- a/media/libmedia/JetPlayer.cpp +++ b/media/libmedia/JetPlayer.cpp @@ -68,21 +68,21 @@ int JetPlayer::init() if (pLibConfig == NULL) pLibConfig = EAS_Config(); if (pLibConfig == NULL) { - LOGE("JetPlayer::init(): EAS library configuration could not be retrieved, aborting."); + ALOGE("JetPlayer::init(): EAS library configuration could not be retrieved, aborting."); return EAS_FAILURE; } // init the EAS library result = EAS_Init(&mEasData); if( result != EAS_SUCCESS) { - LOGE("JetPlayer::init(): Error initializing Sonivox EAS library, aborting."); + ALOGE("JetPlayer::init(): Error initializing Sonivox EAS library, aborting."); mState = EAS_STATE_ERROR; return result; } // init the JET library with the default app event controller range result = JET_Init(mEasData, NULL, sizeof(S_JET_CONFIG)); if( result != EAS_SUCCESS) { - LOGE("JetPlayer::init(): Error initializing JET library, aborting."); + ALOGE("JetPlayer::init(): Error initializing JET library, aborting."); mState = EAS_STATE_ERROR; return result; } @@ -109,7 +109,7 @@ int JetPlayer::init() ALOGV("JetPlayer::init(): render thread(%d) successfully started.", mTid); mState = EAS_STATE_READY; } else { - LOGE("JetPlayer::init(): failed to start render thread."); + ALOGE("JetPlayer::init(): failed to start render thread."); mState = EAS_STATE_ERROR; return EAS_FAILURE; } @@ -169,7 +169,7 @@ int JetPlayer::render() { mAudioBuffer = new EAS_PCM[pLibConfig->mixBufferSize * pLibConfig->numChannels * MIX_NUM_BUFFERS]; if (!mAudioBuffer) { - LOGE("JetPlayer::render(): mAudioBuffer allocate failed"); + ALOGE("JetPlayer::render(): mAudioBuffer allocate failed"); goto threadExit; } @@ -210,7 +210,7 @@ int JetPlayer::render() { for (int i = 0; i < MIX_NUM_BUFFERS; i++) { result = EAS_Render(mEasData, p, pLibConfig->mixBufferSize, &count); if (result != EAS_SUCCESS) { - LOGE("JetPlayer::render(): EAS_Render returned error %ld", result); + ALOGE("JetPlayer::render(): EAS_Render returned error %ld", result); } p += count * pLibConfig->numChannels; num_output += count * pLibConfig->numChannels * sizeof(EAS_PCM); @@ -229,14 +229,14 @@ int JetPlayer::render() { // check audio output track if (mAudioTrack == NULL) { - LOGE("JetPlayer::render(): output AudioTrack was not created"); + ALOGE("JetPlayer::render(): output AudioTrack was not created"); goto threadExit; } // Write data to the audio hardware //ALOGV("JetPlayer::render(): writing to audio output"); if ((temp = mAudioTrack->write(mAudioBuffer, num_output)) < 0) { - LOGE("JetPlayer::render(): Error in writing:%d",temp); + ALOGE("JetPlayer::render(): Error in writing:%d",temp); return temp; } @@ -469,7 +469,7 @@ int JetPlayer::clearQueue() //------------------------------------------------------------------------------------------------- void JetPlayer::dump() { - LOGE("JetPlayer dump: JET file=%s", mEasJetFileLoc->path); + ALOGE("JetPlayer dump: JET file=%s", mEasJetFileLoc->path); } void JetPlayer::dumpJetStatus(S_JET_STATUS* pJetStatus) @@ -479,7 +479,7 @@ void JetPlayer::dumpJetStatus(S_JET_STATUS* pJetStatus) pJetStatus->currentUserID, pJetStatus->segmentRepeatCount, pJetStatus->numQueuedSegments, pJetStatus->paused); else - LOGE(">> JET player status is NULL"); + ALOGE(">> JET player status is NULL"); } diff --git a/media/libmedia/MediaProfiles.cpp b/media/libmedia/MediaProfiles.cpp index c9e8bc2..c905762 100644 --- a/media/libmedia/MediaProfiles.cpp +++ b/media/libmedia/MediaProfiles.cpp @@ -903,7 +903,7 @@ MediaProfiles::createInstanceFromXmlFile(const char *xml) expat is not compiled with -DXML_DTD. We don't have DTD parsing support. if (!::XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS)) { - LOGE("failed to enable DTD support in the xml file"); + ALOGE("failed to enable DTD support in the xml file"); return UNKNOWN_ERROR; } @@ -913,7 +913,7 @@ MediaProfiles::createInstanceFromXmlFile(const char *xml) for (;;) { void *buff = ::XML_GetBuffer(parser, BUFF_SIZE); if (buff == NULL) { - LOGE("failed to in call to XML_GetBuffer()"); + ALOGE("failed to in call to XML_GetBuffer()"); delete profiles; profiles = NULL; goto exit; @@ -921,7 +921,7 @@ MediaProfiles::createInstanceFromXmlFile(const char *xml) int bytes_read = ::fread(buff, 1, BUFF_SIZE, fp); if (bytes_read < 0) { - LOGE("failed in call to read"); + ALOGE("failed in call to read"); delete profiles; profiles = NULL; goto exit; @@ -963,7 +963,7 @@ int MediaProfiles::getVideoEncoderParamByName(const char *name, video_encoder co } } if (index == -1) { - LOGE("The given video encoder %d is not found", codec); + ALOGE("The given video encoder %d is not found", codec); return -1; } @@ -976,7 +976,7 @@ int MediaProfiles::getVideoEncoderParamByName(const char *name, video_encoder co if (!strcmp("enc.vid.fps.min", name)) return mVideoEncoders[index]->mMinFrameRate; if (!strcmp("enc.vid.fps.max", name)) return mVideoEncoders[index]->mMaxFrameRate; - LOGE("The given video encoder param name %s is not found", name); + ALOGE("The given video encoder param name %s is not found", name); return -1; } int MediaProfiles::getVideoEditorExportParamByName( @@ -993,7 +993,7 @@ int MediaProfiles::getVideoEditorExportParamByName( } } if (index == -1) { - LOGE("The given video decoder %d is not found", codec); + ALOGE("The given video decoder %d is not found", codec); return -1; } if (!strcmp("videoeditor.export.profile", name)) @@ -1001,7 +1001,7 @@ int MediaProfiles::getVideoEditorExportParamByName( if (!strcmp("videoeditor.export.level", name)) return exportProfile->mLevel; - LOGE("The given video editor export param name %s is not found", name); + ALOGE("The given video editor export param name %s is not found", name); return -1; } int MediaProfiles::getVideoEditorCapParamByName(const char *name) const @@ -1009,7 +1009,7 @@ int MediaProfiles::getVideoEditorCapParamByName(const char *name) const ALOGV("getVideoEditorCapParamByName: %s", name); if (mVideoEditorCap == NULL) { - LOGE("The mVideoEditorCap is not created, then create default cap."); + ALOGE("The mVideoEditorCap is not created, then create default cap."); createDefaultVideoEditorCap(sInstance); } @@ -1024,7 +1024,7 @@ int MediaProfiles::getVideoEditorCapParamByName(const char *name) const if (!strcmp("maxPrefetchYUVFrames", name)) return mVideoEditorCap->mMaxPrefetchYUVFrames; - LOGE("The given video editor param name %s is not found", name); + ALOGE("The given video editor param name %s is not found", name); return -1; } @@ -1048,7 +1048,7 @@ int MediaProfiles::getAudioEncoderParamByName(const char *name, audio_encoder co } } if (index == -1) { - LOGE("The given audio encoder %d is not found", codec); + ALOGE("The given audio encoder %d is not found", codec); return -1; } @@ -1059,7 +1059,7 @@ int MediaProfiles::getAudioEncoderParamByName(const char *name, audio_encoder co if (!strcmp("enc.aud.hz.min", name)) return mAudioEncoders[index]->mMinSampleRate; if (!strcmp("enc.aud.hz.max", name)) return mAudioEncoders[index]->mMaxSampleRate; - LOGE("The given audio encoder param name %s is not found", name); + ALOGE("The given audio encoder param name %s is not found", name); return -1; } @@ -1103,7 +1103,7 @@ int MediaProfiles::getCamcorderProfileParamByName(const char *name, int index = getCamcorderProfileIndex(cameraId, quality); if (index == -1) { - LOGE("The given camcorder profile camera %d quality %d is not found", + ALOGE("The given camcorder profile camera %d quality %d is not found", cameraId, quality); return -1; } @@ -1120,7 +1120,7 @@ int MediaProfiles::getCamcorderProfileParamByName(const char *name, if (!strcmp("aud.ch", name)) return mCamcorderProfiles[index]->mAudioCodec->mChannels; if (!strcmp("aud.hz", name)) return mCamcorderProfiles[index]->mAudioCodec->mSampleRate; - LOGE("The given camcorder profile param id %d name %s is not found", cameraId, name); + ALOGE("The given camcorder profile param id %d name %s is not found", cameraId, name); return -1; } diff --git a/media/libmedia/MediaScannerClient.cpp b/media/libmedia/MediaScannerClient.cpp index 629b165..40b8188 100644 --- a/media/libmedia/MediaScannerClient.cpp +++ b/media/libmedia/MediaScannerClient.cpp @@ -142,12 +142,12 @@ void MediaScannerClient::convertValues(uint32_t encoding) UConverter *conv = ucnv_open(enc, &status); if (U_FAILURE(status)) { - LOGE("could not create UConverter for %s\n", enc); + ALOGE("could not create UConverter for %s\n", enc); return; } UConverter *utf8Conv = ucnv_open("UTF-8", &status); if (U_FAILURE(status)) { - LOGE("could not create UConverter for UTF-8\n"); + ALOGE("could not create UConverter for UTF-8\n"); ucnv_close(conv); return; } @@ -180,7 +180,7 @@ void MediaScannerClient::convertValues(uint32_t encoding) ucnv_convertEx(utf8Conv, conv, &target, target + targetLength, &source, (const char *)dest, NULL, NULL, NULL, NULL, TRUE, TRUE, &status); if (U_FAILURE(status)) { - LOGE("ucnv_convertEx failed: %d\n", status); + ALOGE("ucnv_convertEx failed: %d\n", status); mValues->setEntry(i, "???"); } else { // zero terminate diff --git a/media/libmedia/Metadata.cpp b/media/libmedia/Metadata.cpp index 8eeebbb..546a9b0 100644 --- a/media/libmedia/Metadata.cpp +++ b/media/libmedia/Metadata.cpp @@ -135,7 +135,7 @@ bool Metadata::checkKey(int key) { if (key < FIRST_SYSTEM_ID || (LAST_SYSTEM_ID < key && key < FIRST_CUSTOM_ID)) { - LOGE("Bad key %d", key); + ALOGE("Bad key %d", key); return false; } size_t curr = mData->dataPosition(); @@ -152,7 +152,7 @@ bool Metadata::checkKey(int key) break; } if (mData->readInt32() == key) { - LOGE("Key exists already %d", key); + ALOGE("Key exists already %d", key); error = true; break; } diff --git a/media/libmedia/ToneGenerator.cpp b/media/libmedia/ToneGenerator.cpp index 6a38ff1..35dfbb8 100644 --- a/media/libmedia/ToneGenerator.cpp +++ b/media/libmedia/ToneGenerator.cpp @@ -805,7 +805,7 @@ ToneGenerator::ToneGenerator(int streamType, float volume, bool threadCanCallJav mState = TONE_IDLE; if (AudioSystem::getOutputSamplingRate(&mSamplingRate, streamType) != NO_ERROR) { - LOGE("Unable to marshal AudioFlinger"); + ALOGE("Unable to marshal AudioFlinger"); return; } mThreadCanCallJava = threadCanCallJava; @@ -906,7 +906,7 @@ bool ToneGenerator::startTone(int toneType, int durationMs) { ALOGV("Start waiting for previous tone to stop"); lStatus = mWaitCbkCond.waitRelative(mLock, seconds(3)); if (lStatus != NO_ERROR) { - LOGE("--- start wait for stop timed out, status %d", lStatus); + ALOGE("--- start wait for stop timed out, status %d", lStatus); mState = TONE_IDLE; mLock.unlock(); return lResult; @@ -925,7 +925,7 @@ bool ToneGenerator::startTone(int toneType, int durationMs) { ALOGV("Wait for start callback"); lStatus = mWaitCbkCond.waitRelative(mLock, seconds(3)); if (lStatus != NO_ERROR) { - LOGE("--- Immediate start timed out, status %d", lStatus); + ALOGE("--- Immediate start timed out, status %d", lStatus); mState = TONE_IDLE; lResult = false; } @@ -943,7 +943,7 @@ bool ToneGenerator::startTone(int toneType, int durationMs) { } ALOGV("cond received"); } else { - LOGE("--- Delayed start timed out, status %d", lStatus); + ALOGE("--- Delayed start timed out, status %d", lStatus); mState = TONE_IDLE; } } @@ -979,7 +979,7 @@ void ToneGenerator::stopTone() { if (lStatus == NO_ERROR) { ALOGV("track stop complete, time %d", (unsigned int)(systemTime()/1000000)); } else { - LOGE("--- Stop timed out"); + ALOGE("--- Stop timed out"); mState = TONE_IDLE; mpAudioTrack->stop(); } @@ -1018,7 +1018,7 @@ bool ToneGenerator::initAudioTrack() { // Open audio track in mono, PCM 16bit, default sampling rate, default buffer size mpAudioTrack = new AudioTrack(); if (mpAudioTrack == 0) { - LOGE("AudioTrack allocation failed"); + ALOGE("AudioTrack allocation failed"); goto initAudioTrack_exit; } ALOGV("Create Track: %p\n", mpAudioTrack); @@ -1036,7 +1036,7 @@ bool ToneGenerator::initAudioTrack() { mThreadCanCallJava); if (mpAudioTrack->initCheck() != NO_ERROR) { - LOGE("AudioTrack->initCheck failed"); + ALOGE("AudioTrack->initCheck failed"); goto initAudioTrack_exit; } diff --git a/media/libmedia/Visualizer.cpp b/media/libmedia/Visualizer.cpp index de40f98..d08ffa5 100644 --- a/media/libmedia/Visualizer.cpp +++ b/media/libmedia/Visualizer.cpp @@ -61,7 +61,7 @@ status_t Visualizer::setEnabled(bool enabled) if (enabled) { if (t->exitPending()) { if (t->requestExitAndWait() == WOULD_BLOCK) { - LOGE("Visualizer::enable() called from thread"); + ALOGE("Visualizer::enable() called from thread"); return INVALID_OPERATION; } } @@ -116,7 +116,7 @@ status_t Visualizer::setCaptureCallBack(capture_cbk_t cbk, void* user, uint32_t if (cbk != NULL) { mCaptureThread = new CaptureThread(*this, rate, ((flags & CAPTURE_CALL_JAVA) != 0)); if (mCaptureThread == 0) { - LOGE("Could not create callback thread"); + ALOGE("Could not create callback thread"); return NO_INIT; } } diff --git a/media/libmedia/mediametadataretriever.cpp b/media/libmedia/mediametadataretriever.cpp index 1658f41..88e269f 100644 --- a/media/libmedia/mediametadataretriever.cpp +++ b/media/libmedia/mediametadataretriever.cpp @@ -52,7 +52,7 @@ const sp<IMediaPlayerService>& MediaMetadataRetriever::getService() binder->linkToDeath(sDeathNotifier); sService = interface_cast<IMediaPlayerService>(binder); } - LOGE_IF(sService == 0, "no MediaPlayerService!?"); + ALOGE_IF(sService == 0, "no MediaPlayerService!?"); return sService; } @@ -61,12 +61,12 @@ MediaMetadataRetriever::MediaMetadataRetriever() ALOGV("constructor"); const sp<IMediaPlayerService>& service(getService()); if (service == 0) { - LOGE("failed to obtain MediaMetadataRetrieverService"); + ALOGE("failed to obtain MediaMetadataRetrieverService"); return; } sp<IMediaMetadataRetriever> retriever(service->createMetadataRetriever(getpid())); if (retriever == 0) { - LOGE("failed to create IMediaMetadataRetriever object from server"); + ALOGE("failed to create IMediaMetadataRetriever object from server"); } mRetriever = retriever; } @@ -98,11 +98,11 @@ status_t MediaMetadataRetriever::setDataSource( ALOGV("setDataSource"); Mutex::Autolock _l(mLock); if (mRetriever == 0) { - LOGE("retriever is not initialized"); + ALOGE("retriever is not initialized"); return INVALID_OPERATION; } if (srcUrl == NULL) { - LOGE("data source is a null pointer"); + ALOGE("data source is a null pointer"); return UNKNOWN_ERROR; } ALOGV("data source (%s)", srcUrl); @@ -114,11 +114,11 @@ status_t MediaMetadataRetriever::setDataSource(int fd, int64_t offset, int64_t l ALOGV("setDataSource(%d, %lld, %lld)", fd, offset, length); Mutex::Autolock _l(mLock); if (mRetriever == 0) { - LOGE("retriever is not initialized"); + ALOGE("retriever is not initialized"); return INVALID_OPERATION; } if (fd < 0 || offset < 0 || length < 0) { - LOGE("Invalid negative argument"); + ALOGE("Invalid negative argument"); return UNKNOWN_ERROR; } return mRetriever->setDataSource(fd, offset, length); @@ -129,7 +129,7 @@ sp<IMemory> MediaMetadataRetriever::getFrameAtTime(int64_t timeUs, int option) ALOGV("getFrameAtTime: time(%lld us) option(%d)", timeUs, option); Mutex::Autolock _l(mLock); if (mRetriever == 0) { - LOGE("retriever is not initialized"); + ALOGE("retriever is not initialized"); return NULL; } return mRetriever->getFrameAtTime(timeUs, option); @@ -140,7 +140,7 @@ const char* MediaMetadataRetriever::extractMetadata(int keyCode) ALOGV("extractMetadata(%d)", keyCode); Mutex::Autolock _l(mLock); if (mRetriever == 0) { - LOGE("retriever is not initialized"); + ALOGE("retriever is not initialized"); return NULL; } return mRetriever->extractMetadata(keyCode); @@ -151,7 +151,7 @@ sp<IMemory> MediaMetadataRetriever::extractAlbumArt() ALOGV("extractAlbumArt"); Mutex::Autolock _l(mLock); if (mRetriever == 0) { - LOGE("retriever is not initialized"); + ALOGE("retriever is not initialized"); return NULL; } return mRetriever->extractAlbumArt(); diff --git a/media/libmedia/mediaplayer.cpp b/media/libmedia/mediaplayer.cpp index 6054749..2284927 100644 --- a/media/libmedia/mediaplayer.cpp +++ b/media/libmedia/mediaplayer.cpp @@ -115,7 +115,7 @@ status_t MediaPlayer::attachNewPlayer(const sp<IMediaPlayer>& player) if ( !( (mCurrentState & MEDIA_PLAYER_IDLE) || (mCurrentState == MEDIA_PLAYER_STATE_ERROR ) ) ) { - LOGE("attachNewPlayer called in state %d", mCurrentState); + ALOGE("attachNewPlayer called in state %d", mCurrentState); return INVALID_OPERATION; } @@ -126,7 +126,7 @@ status_t MediaPlayer::attachNewPlayer(const sp<IMediaPlayer>& player) mCurrentState = MEDIA_PLAYER_INITIALIZED; err = NO_ERROR; } else { - LOGE("Unable to to create media player"); + ALOGE("Unable to to create media player"); } } @@ -195,7 +195,7 @@ status_t MediaPlayer::invoke(const Parcel& request, Parcel *reply) ALOGV("invoke %d", request.dataSize()); return mPlayer->invoke(request, reply); } - LOGE("invoke failed: wrong state %X", mCurrentState); + ALOGE("invoke failed: wrong state %X", mCurrentState); return INVALID_OPERATION; } @@ -236,7 +236,7 @@ status_t MediaPlayer::prepareAsync_l() mCurrentState = MEDIA_PLAYER_PREPARING; return mPlayer->prepareAsync(); } - LOGE("prepareAsync called in state %d", mCurrentState); + ALOGE("prepareAsync called in state %d", mCurrentState); return INVALID_OPERATION; } @@ -298,7 +298,7 @@ status_t MediaPlayer::start() } return ret; } - LOGE("start called in state %d", mCurrentState); + ALOGE("start called in state %d", mCurrentState); return INVALID_OPERATION; } @@ -317,7 +317,7 @@ status_t MediaPlayer::stop() } return ret; } - LOGE("stop called in state %d", mCurrentState); + ALOGE("stop called in state %d", mCurrentState); return INVALID_OPERATION; } @@ -336,7 +336,7 @@ status_t MediaPlayer::pause() } return ret; } - LOGE("pause called in state %d", mCurrentState); + ALOGE("pause called in state %d", mCurrentState); return INVALID_OPERATION; } @@ -348,7 +348,7 @@ bool MediaPlayer::isPlaying() mPlayer->isPlaying(&temp); ALOGV("isPlaying: %d", temp); if ((mCurrentState & MEDIA_PLAYER_STARTED) && ! temp) { - LOGE("internal/external state mismatch corrected"); + ALOGE("internal/external state mismatch corrected"); mCurrentState = MEDIA_PLAYER_PAUSED; } return temp; @@ -402,7 +402,7 @@ status_t MediaPlayer::getDuration_l(int *msec) *msec = mDuration; return ret; } - LOGE("Attempt to call getDuration without a valid mediaplayer"); + ALOGE("Attempt to call getDuration without a valid mediaplayer"); return INVALID_OPERATION; } @@ -435,7 +435,7 @@ status_t MediaPlayer::seekTo_l(int msec) return NO_ERROR; } } - LOGE("Attempt to perform seekTo in wrong state: mPlayer=%p, mCurrentState=%u", mPlayer.get(), mCurrentState); + ALOGE("Attempt to perform seekTo in wrong state: mPlayer=%p, mCurrentState=%u", mPlayer.get(), mCurrentState); return INVALID_OPERATION; } @@ -457,7 +457,7 @@ status_t MediaPlayer::reset_l() if (mPlayer != 0) { status_t ret = mPlayer->reset(); if (ret != NO_ERROR) { - LOGE("reset() failed with return code (%d)", ret); + ALOGE("reset() failed with return code (%d)", ret); mCurrentState = MEDIA_PLAYER_STATE_ERROR; } else { mCurrentState = MEDIA_PLAYER_IDLE; @@ -486,7 +486,7 @@ status_t MediaPlayer::setAudioStreamType(int type) if (mCurrentState & ( MEDIA_PLAYER_PREPARED | MEDIA_PLAYER_STARTED | MEDIA_PLAYER_PAUSED | MEDIA_PLAYER_PLAYBACK_COMPLETE ) ) { // Can't change the stream type after prepare - LOGE("setAudioStream called in state %d", mCurrentState); + ALOGE("setAudioStream called in state %d", mCurrentState); return INVALID_OPERATION; } // cache @@ -532,7 +532,7 @@ status_t MediaPlayer::setAudioSessionId(int sessionId) ALOGV("MediaPlayer::setAudioSessionId(%d)", sessionId); Mutex::Autolock _l(mLock); if (!(mCurrentState & MEDIA_PLAYER_IDLE)) { - LOGE("setAudioSessionId called in state %d", mCurrentState); + ALOGE("setAudioSessionId called in state %d", mCurrentState); return INVALID_OPERATION; } if (sessionId < 0) { @@ -570,7 +570,7 @@ status_t MediaPlayer::attachAuxEffect(int effectId) if (mPlayer == 0 || (mCurrentState & MEDIA_PLAYER_IDLE) || (mCurrentState == MEDIA_PLAYER_STATE_ERROR )) { - LOGE("attachAuxEffect called in state %d", mCurrentState); + ALOGE("attachAuxEffect called in state %d", mCurrentState); return INVALID_OPERATION; } @@ -641,7 +641,7 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj) case MEDIA_PLAYBACK_COMPLETE: ALOGV("playback complete"); if (mCurrentState == MEDIA_PLAYER_IDLE) { - LOGE("playback complete in idle state"); + ALOGE("playback complete in idle state"); } if (!mLoop) { mCurrentState = MEDIA_PLAYER_PLAYBACK_COMPLETE; @@ -651,7 +651,7 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj) // Always log errors. // ext1: Media framework error code. // ext2: Implementation dependant error code. - LOGE("error (%d, %d)", ext1, ext2); + ALOGE("error (%d, %d)", ext1, ext2); mCurrentState = MEDIA_PLAYER_STATE_ERROR; if (mPrepareSync) { @@ -717,7 +717,7 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj) if (service != 0) { p = service->decode(url, pSampleRate, pNumChannels, pFormat); } else { - LOGE("Unable to locate media service"); + ALOGE("Unable to locate media service"); } return p; @@ -737,7 +737,7 @@ void MediaPlayer::died() if (service != 0) { p = service->decode(fd, offset, length, pSampleRate, pNumChannels, pFormat); } else { - LOGE("Unable to locate media service"); + ALOGE("Unable to locate media service"); } return p; 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<ICamera>& camera, const sp<ICameraRec { ALOGV("setCamera(%p,%p)", camera.get(), proxy.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_IDLE)) { - LOGE("setCamera called in an invalid state(%d)", mCurrentState); + ALOGE("setCamera called in an invalid state(%d)", mCurrentState); return INVALID_OPERATION; } @@ -54,15 +54,15 @@ status_t MediaRecorder::setPreviewSurface(const sp<Surface>& 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<ISurfaceTexture> 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 { diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp index 91221ac..f5cb019 100644 --- a/media/libmediaplayerservice/MediaPlayerService.cpp +++ b/media/libmediaplayerservice/MediaPlayerService.cpp @@ -112,14 +112,14 @@ bool unmarshallFilter(const Parcel& p, int32_t val; if (p.readInt32(&val) != OK) { - LOGE("Failed to read filter's length"); + ALOGE("Failed to read filter's length"); *status = NOT_ENOUGH_DATA; return false; } if( val > kMaxFilterSize || val < 0) { - LOGE("Invalid filter len %d", val); + ALOGE("Invalid filter len %d", val); *status = BAD_VALUE; return false; } @@ -134,7 +134,7 @@ bool unmarshallFilter(const Parcel& p, if (p.dataAvail() < size) { - LOGE("Filter too short expected %d but got %d", size, p.dataAvail()); + ALOGE("Filter too short expected %d but got %d", size, p.dataAvail()); *status = NOT_ENOUGH_DATA; return false; } @@ -144,7 +144,7 @@ bool unmarshallFilter(const Parcel& p, if (NULL == data) { - LOGE("Filter had no data"); + ALOGE("Filter had no data"); *status = BAD_VALUE; return false; } @@ -184,7 +184,7 @@ static bool checkPermission(const char* permissionString) { #endif if (getpid() == IPCThreadState::self()->getCallingPid()) return true; bool ok = checkCallingPermission(String16(permissionString)); - if (!ok) LOGE("Request requires %s", permissionString); + if (!ok) ALOGE("Request requires %s", permissionString); return ok; } @@ -630,7 +630,7 @@ static sp<MediaPlayerBase> createPlayer(player_type playerType, void* cookie, p = new TestPlayerStub(); break; default: - LOGE("Unknown player type: %d", playerType); + ALOGE("Unknown player type: %d", playerType); return NULL; } if (p != NULL) { @@ -641,7 +641,7 @@ static sp<MediaPlayerBase> createPlayer(player_type playerType, void* cookie, } } if (p == NULL) { - LOGE("Failed to create player object"); + ALOGE("Failed to create player object"); } return p; } @@ -688,7 +688,7 @@ status_t MediaPlayerService::Client::setDataSource( int fd = android::openContentProviderFile(url16); if (fd < 0) { - LOGE("Couldn't open fd for %s", url); + ALOGE("Couldn't open fd for %s", url); return UNKNOWN_ERROR; } setDataSource(fd, 0, 0x7fffffffffLL); // this sets mStatus @@ -713,7 +713,7 @@ status_t MediaPlayerService::Client::setDataSource( if (mStatus == NO_ERROR) { mPlayer = p; } else { - LOGE(" error: %d", mStatus); + ALOGE(" error: %d", mStatus); } return mStatus; } @@ -725,7 +725,7 @@ status_t MediaPlayerService::Client::setDataSource(int fd, int64_t offset, int64 struct stat sb; int ret = fstat(fd, &sb); if (ret != 0) { - LOGE("fstat(%d) failed: %d, %s", fd, ret, strerror(errno)); + ALOGE("fstat(%d) failed: %d, %s", fd, ret, strerror(errno)); return UNKNOWN_ERROR; } @@ -736,7 +736,7 @@ status_t MediaPlayerService::Client::setDataSource(int fd, int64_t offset, int64 ALOGV("st_size = %llu", sb.st_size); if (offset >= sb.st_size) { - LOGE("offset error"); + ALOGE("offset error"); ::close(fd); return UNKNOWN_ERROR; } @@ -821,7 +821,7 @@ status_t MediaPlayerService::Client::setVideoSurfaceTexture( NATIVE_WINDOW_API_MEDIA); if (err != OK) { - LOGE("setVideoSurfaceTexture failed: %d", err); + ALOGE("setVideoSurfaceTexture failed: %d", err); // Note that we must do the reset before disconnecting from the ANW. // Otherwise queue/dequeue calls could be made on the disconnected // ANW, which may result in errors. @@ -905,7 +905,7 @@ status_t MediaPlayerService::Client::getMetadata( if (status != OK) { metadata.resetParcel(); - LOGE("getMetadata failed %d", status); + ALOGE("getMetadata failed %d", status); return status; } @@ -975,7 +975,7 @@ status_t MediaPlayerService::Client::getCurrentPosition(int *msec) if (ret == NO_ERROR) { ALOGV("[%d] getCurrentPosition = %d", mConnId, *msec); } else { - LOGE("getCurrentPosition returned %d", ret); + ALOGE("getCurrentPosition returned %d", ret); } return ret; } @@ -989,7 +989,7 @@ status_t MediaPlayerService::Client::getDuration(int *msec) if (ret == NO_ERROR) { ALOGV("[%d] getDuration = %d", mConnId, *msec); } else { - LOGE("getDuration returned %d", ret); + ALOGE("getDuration returned %d", ret); } return ret; } @@ -1394,7 +1394,7 @@ status_t MediaPlayerService::AudioOutput::open( } if ((t == 0) || (t->initCheck() != NO_ERROR)) { - LOGE("Unable to create audio track"); + ALOGE("Unable to create audio track"); delete t; return NO_INIT; } @@ -1652,7 +1652,7 @@ ssize_t MediaPlayerService::AudioCache::write(const void* buffer, size_t size) p += mSize; ALOGV("memcpy(%p, %p, %u)", p, buffer, size); if (mSize + size > mHeap->getSize()) { - LOGE("Heap size overflow! req size: %d, max size: %d", (mSize + size), mHeap->getSize()); + ALOGE("Heap size overflow! req size: %d, max size: %d", (mSize + size), mHeap->getSize()); size = mHeap->getSize() - mSize; } memcpy(p, buffer, size); @@ -1687,7 +1687,7 @@ void MediaPlayerService::AudioCache::notify( switch (msg) { case MEDIA_ERROR: - LOGE("Error %d, %d occurred", ext1, ext2); + ALOGE("Error %d, %d occurred", ext1, ext2); p->mError = ext1; break; case MEDIA_PREPARED: @@ -1807,7 +1807,7 @@ void MediaPlayerService::addBatteryData(uint32_t params) info.refCount = 0; if (mBatteryData.add(uid, info) == NO_MEMORY) { - LOGE("Battery track error: no memory for new app"); + ALOGE("Battery track error: no memory for new app"); return; } } @@ -1828,7 +1828,7 @@ void MediaPlayerService::addBatteryData(uint32_t params) ALOGW("Battery track warning: refCount is already 0"); return; } else if (info.refCount < 0) { - LOGE("Battery track error: refCount < 0"); + ALOGE("Battery track error: refCount < 0"); mBatteryData.removeItem(uid); return; } diff --git a/media/libmediaplayerservice/MediaRecorderClient.cpp b/media/libmediaplayerservice/MediaRecorderClient.cpp index ca92c77..d219fc2 100644 --- a/media/libmediaplayerservice/MediaRecorderClient.cpp +++ b/media/libmediaplayerservice/MediaRecorderClient.cpp @@ -54,7 +54,7 @@ static bool checkPermission(const char* permissionString) { #endif if (getpid() == IPCThreadState::self()->getCallingPid()) return true; bool ok = checkCallingPermission(String16(permissionString)); - if (!ok) LOGE("Request requires %s", permissionString); + if (!ok) ALOGE("Request requires %s", permissionString); return ok; } @@ -64,7 +64,7 @@ sp<ISurfaceTexture> MediaRecorderClient::querySurfaceMediaSource() ALOGV("Query SurfaceMediaSource"); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NULL; } return mRecorder->querySurfaceMediaSource(); @@ -78,7 +78,7 @@ status_t MediaRecorderClient::setCamera(const sp<ICamera>& camera, ALOGV("setCamera"); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->setCamera(camera, proxy); @@ -89,7 +89,7 @@ status_t MediaRecorderClient::setPreviewSurface(const sp<Surface>& surface) ALOGV("setPreviewSurface"); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->setPreviewSurface(surface); @@ -103,7 +103,7 @@ status_t MediaRecorderClient::setVideoSource(int vs) } Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->setVideoSource((video_source)vs); @@ -117,7 +117,7 @@ status_t MediaRecorderClient::setAudioSource(int as) } Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->setAudioSource((audio_source_t)as); @@ -128,7 +128,7 @@ status_t MediaRecorderClient::setOutputFormat(int of) ALOGV("setOutputFormat(%d)", of); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->setOutputFormat((output_format)of); @@ -139,7 +139,7 @@ status_t MediaRecorderClient::setVideoEncoder(int ve) ALOGV("setVideoEncoder(%d)", ve); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->setVideoEncoder((video_encoder)ve); @@ -150,7 +150,7 @@ status_t MediaRecorderClient::setAudioEncoder(int ae) ALOGV("setAudioEncoder(%d)", ae); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->setAudioEncoder((audio_encoder)ae); @@ -161,7 +161,7 @@ status_t MediaRecorderClient::setOutputFile(const char* path) ALOGV("setOutputFile(%s)", path); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->setOutputFile(path); @@ -172,7 +172,7 @@ status_t MediaRecorderClient::setOutputFile(int fd, int64_t offset, int64_t leng ALOGV("setOutputFile(%d, %lld, %lld)", fd, offset, length); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->setOutputFile(fd, offset, length); @@ -183,7 +183,7 @@ status_t MediaRecorderClient::setVideoSize(int width, int height) ALOGV("setVideoSize(%dx%d)", width, height); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->setVideoSize(width, height); @@ -194,7 +194,7 @@ status_t MediaRecorderClient::setVideoFrameRate(int frames_per_second) ALOGV("setVideoFrameRate(%d)", frames_per_second); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->setVideoFrameRate(frames_per_second); @@ -204,7 +204,7 @@ status_t MediaRecorderClient::setParameters(const String8& params) { ALOGV("setParameters(%s)", params.string()); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->setParameters(params); @@ -215,7 +215,7 @@ status_t MediaRecorderClient::prepare() ALOGV("prepare"); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->prepare(); @@ -227,7 +227,7 @@ status_t MediaRecorderClient::getMaxAmplitude(int* max) ALOGV("getMaxAmplitude"); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->getMaxAmplitude(max); @@ -238,7 +238,7 @@ status_t MediaRecorderClient::start() ALOGV("start"); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->start(); @@ -250,7 +250,7 @@ status_t MediaRecorderClient::stop() ALOGV("stop"); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->stop(); @@ -261,7 +261,7 @@ status_t MediaRecorderClient::init() ALOGV("init"); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->init(); @@ -272,7 +272,7 @@ status_t MediaRecorderClient::close() ALOGV("close"); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->close(); @@ -284,7 +284,7 @@ status_t MediaRecorderClient::reset() ALOGV("reset"); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->reset(); @@ -322,7 +322,7 @@ status_t MediaRecorderClient::setListener(const sp<IMediaRecorderClient>& listen ALOGV("setListener"); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->setListener(listener); diff --git a/media/libmediaplayerservice/MetadataRetrieverClient.cpp b/media/libmediaplayerservice/MetadataRetrieverClient.cpp index f945c6a..7dbb57f 100644 --- a/media/libmediaplayerservice/MetadataRetrieverClient.cpp +++ b/media/libmediaplayerservice/MetadataRetrieverClient.cpp @@ -98,11 +98,11 @@ static sp<MediaMetadataRetrieverBase> createRetriever(player_type playerType) default: // TODO: // support for TEST_PLAYER - LOGE("player type %d is not supported", playerType); + ALOGE("player type %d is not supported", playerType); break; } if (p == NULL) { - LOGE("failed to create a retriever object"); + ALOGE("failed to create a retriever object"); } return p; } @@ -131,7 +131,7 @@ status_t MetadataRetrieverClient::setDataSource(int fd, int64_t offset, int64_t struct stat sb; int ret = fstat(fd, &sb); if (ret != 0) { - LOGE("fstat(%d) failed: %d, %s", fd, ret, strerror(errno)); + ALOGE("fstat(%d) failed: %d, %s", fd, ret, strerror(errno)); return BAD_VALUE; } ALOGV("st_dev = %llu", sb.st_dev); @@ -141,7 +141,7 @@ status_t MetadataRetrieverClient::setDataSource(int fd, int64_t offset, int64_t ALOGV("st_size = %llu", sb.st_size); if (offset >= sb.st_size) { - LOGE("offset (%lld) bigger than file size (%llu)", offset, sb.st_size); + ALOGE("offset (%lld) bigger than file size (%llu)", offset, sb.st_size); ::close(fd); return BAD_VALUE; } @@ -169,24 +169,24 @@ sp<IMemory> MetadataRetrieverClient::getFrameAtTime(int64_t timeUs, int option) Mutex::Autolock lock(mLock); mThumbnail.clear(); if (mRetriever == NULL) { - LOGE("retriever is not initialized"); + ALOGE("retriever is not initialized"); return NULL; } VideoFrame *frame = mRetriever->getFrameAtTime(timeUs, option); if (frame == NULL) { - LOGE("failed to capture a video frame"); + ALOGE("failed to capture a video frame"); return NULL; } size_t size = sizeof(VideoFrame) + frame->mSize; sp<MemoryHeapBase> heap = new MemoryHeapBase(size, 0, "MetadataRetrieverClient"); if (heap == NULL) { - LOGE("failed to create MemoryDealer"); + ALOGE("failed to create MemoryDealer"); delete frame; return NULL; } mThumbnail = new MemoryBase(heap, 0, size); if (mThumbnail == NULL) { - LOGE("not enough memory for VideoFrame size=%u", size); + ALOGE("not enough memory for VideoFrame size=%u", size); delete frame; return NULL; } @@ -210,24 +210,24 @@ sp<IMemory> MetadataRetrieverClient::extractAlbumArt() Mutex::Autolock lock(mLock); mAlbumArt.clear(); if (mRetriever == NULL) { - LOGE("retriever is not initialized"); + ALOGE("retriever is not initialized"); return NULL; } MediaAlbumArt *albumArt = mRetriever->extractAlbumArt(); if (albumArt == NULL) { - LOGE("failed to extract an album art"); + ALOGE("failed to extract an album art"); return NULL; } size_t size = sizeof(MediaAlbumArt) + albumArt->mSize; sp<MemoryHeapBase> heap = new MemoryHeapBase(size, 0, "MetadataRetrieverClient"); if (heap == NULL) { - LOGE("failed to create MemoryDealer object"); + ALOGE("failed to create MemoryDealer object"); delete albumArt; return NULL; } mAlbumArt = new MemoryBase(heap, 0, size); if (mAlbumArt == NULL) { - LOGE("not enough memory for MediaAlbumArt size=%u", size); + ALOGE("not enough memory for MediaAlbumArt size=%u", size); delete albumArt; return NULL; } @@ -244,7 +244,7 @@ const char* MetadataRetrieverClient::extractMetadata(int keyCode) ALOGV("extractMetadata"); Mutex::Autolock lock(mLock); if (mRetriever == NULL) { - LOGE("retriever is not initialized"); + ALOGE("retriever is not initialized"); return NULL; } return mRetriever->extractMetadata(keyCode); diff --git a/media/libmediaplayerservice/MidiFile.cpp b/media/libmediaplayerservice/MidiFile.cpp index 4946956..7cb8c29 100644 --- a/media/libmediaplayerservice/MidiFile.cpp +++ b/media/libmediaplayerservice/MidiFile.cpp @@ -69,13 +69,13 @@ MidiFile::MidiFile() : if (pLibConfig == NULL) pLibConfig = EAS_Config(); if ((pLibConfig == NULL) || (LIB_VERSION != pLibConfig->libVersion)) { - LOGE("EAS library/header mismatch"); + ALOGE("EAS library/header mismatch"); goto Failed; } // initialize EAS library if (EAS_Init(&mEasData) != EAS_SUCCESS) { - LOGE("EAS_Init failed"); + ALOGE("EAS_Init failed"); goto Failed; } @@ -134,7 +134,7 @@ status_t MidiFile::setDataSource( } if (result != EAS_SUCCESS) { - LOGE("EAS_OpenFile failed: [%d]", (int)result); + ALOGE("EAS_OpenFile failed: [%d]", (int)result); mState = EAS_STATE_ERROR; return ERROR_OPEN_FAILED; } @@ -162,7 +162,7 @@ status_t MidiFile::setDataSource(int fd, int64_t offset, int64_t length) updateState(); if (result != EAS_SUCCESS) { - LOGE("EAS_OpenFile failed: [%d]", (int)result); + ALOGE("EAS_OpenFile failed: [%d]", (int)result); mState = EAS_STATE_ERROR; return ERROR_OPEN_FAILED; } @@ -181,7 +181,7 @@ status_t MidiFile::prepare() } EAS_RESULT result; if ((result = EAS_Prepare(mEasData, mEasHandle)) != EAS_SUCCESS) { - LOGE("EAS_Prepare failed: [%ld]", result); + ALOGE("EAS_Prepare failed: [%ld]", result); return ERROR_EAS_FAILURE; } updateState(); @@ -237,7 +237,7 @@ status_t MidiFile::stop() if (!mPaused && (mState != EAS_STATE_STOPPED)) { EAS_RESULT result = EAS_Pause(mEasData, mEasHandle); if (result != EAS_SUCCESS) { - LOGE("EAS_Pause returned error %ld", result); + ALOGE("EAS_Pause returned error %ld", result); return ERROR_EAS_FAILURE; } } @@ -258,7 +258,7 @@ status_t MidiFile::seekTo(int position) if ((result = EAS_Locate(mEasData, mEasHandle, position, false)) != EAS_SUCCESS) { - LOGE("EAS_Locate returned %ld", result); + ALOGE("EAS_Locate returned %ld", result); return ERROR_EAS_FAILURE; } EAS_GetLocation(mEasData, mEasHandle, &mPlayTime); @@ -293,11 +293,11 @@ status_t MidiFile::getCurrentPosition(int* position) { ALOGV("MidiFile::getCurrentPosition"); if (!mEasHandle) { - LOGE("getCurrentPosition(): file not open"); + ALOGE("getCurrentPosition(): file not open"); return ERROR_NOT_OPEN; } if (mPlayTime < 0) { - LOGE("getCurrentPosition(): mPlayTime = %ld", mPlayTime); + ALOGE("getCurrentPosition(): mPlayTime = %ld", mPlayTime); return ERROR_EAS_FAILURE; } *position = mPlayTime; @@ -422,7 +422,7 @@ status_t MidiFile::setLooping(int loop) status_t MidiFile::createOutputTrack() { if (mAudioSink->open(pLibConfig->sampleRate, pLibConfig->numChannels, AUDIO_FORMAT_PCM_16_BIT, 2) != NO_ERROR) { - LOGE("mAudioSink open failed"); + ALOGE("mAudioSink open failed"); return ERROR_OPEN_FAILED; } return NO_ERROR; @@ -439,7 +439,7 @@ int MidiFile::render() { // allocate render buffer mAudioBuffer = new EAS_PCM[pLibConfig->mixBufferSize * pLibConfig->numChannels * NUM_BUFFERS]; if (!mAudioBuffer) { - LOGE("mAudioBuffer allocate failed"); + ALOGE("mAudioBuffer allocate failed"); goto threadExit; } @@ -473,7 +473,7 @@ int MidiFile::render() { for (int i = 0; i < NUM_BUFFERS; i++) { result = EAS_Render(mEasData, p, pLibConfig->mixBufferSize, &count); if (result != EAS_SUCCESS) { - LOGE("EAS_Render returned %ld", result); + ALOGE("EAS_Render returned %ld", result); } p += count * pLibConfig->numChannels; num_output += count * pLibConfig->numChannels * sizeof(EAS_PCM); @@ -495,7 +495,7 @@ int MidiFile::render() { // Write data to the audio hardware // ALOGV("MidiFile::render - writing to audio output"); if ((temp = mAudioSink->write(mAudioBuffer, num_output)) < 0) { - LOGE("Error in writing:%d",temp); + ALOGE("Error in writing:%d",temp); return temp; } @@ -519,7 +519,7 @@ int MidiFile::render() { } case EAS_STATE_ERROR: { - LOGE("MidiFile::render - error"); + ALOGE("MidiFile::render - error"); sendEvent(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN); break; } diff --git a/media/libmediaplayerservice/MidiMetadataRetriever.cpp b/media/libmediaplayerservice/MidiMetadataRetriever.cpp index bb65ed4..465209f 100644 --- a/media/libmediaplayerservice/MidiMetadataRetriever.cpp +++ b/media/libmediaplayerservice/MidiMetadataRetriever.cpp @@ -63,7 +63,7 @@ const char* MidiMetadataRetriever::extractMetadata(int keyCode) ALOGV("extractMetdata: key(%d)", keyCode); Mutex::Autolock lock(mLock); if (mMidiPlayer == 0 || mMidiPlayer->initCheck() != NO_ERROR) { - LOGE("Midi player is not initialized yet"); + ALOGE("Midi player is not initialized yet"); return NULL; } switch (keyCode) { @@ -72,7 +72,7 @@ const char* MidiMetadataRetriever::extractMetadata(int keyCode) if (mMetadataValues[0][0] == '\0') { int duration = -1; if (mMidiPlayer->getDuration(&duration) != NO_ERROR) { - LOGE("failed to get duration"); + ALOGE("failed to get duration"); return NULL; } snprintf(mMetadataValues[0], MAX_METADATA_STRING_LENGTH, "%d", duration); @@ -82,7 +82,7 @@ const char* MidiMetadataRetriever::extractMetadata(int keyCode) return mMetadataValues[0]; } default: - LOGE("Unsupported key code (%d)", keyCode); + ALOGE("Unsupported key code (%d)", keyCode); return NULL; } return NULL; diff --git a/media/libmediaplayerservice/StagefrightRecorder.cpp b/media/libmediaplayerservice/StagefrightRecorder.cpp index 87305ee..4632016 100644 --- a/media/libmediaplayerservice/StagefrightRecorder.cpp +++ b/media/libmediaplayerservice/StagefrightRecorder.cpp @@ -97,7 +97,7 @@ status_t StagefrightRecorder::setAudioSource(audio_source_t as) { ALOGV("setAudioSource: %d", as); if (as < AUDIO_SOURCE_DEFAULT || as >= AUDIO_SOURCE_CNT) { - LOGE("Invalid audio source: %d", as); + ALOGE("Invalid audio source: %d", as); return BAD_VALUE; } @@ -114,7 +114,7 @@ status_t StagefrightRecorder::setVideoSource(video_source vs) { ALOGV("setVideoSource: %d", vs); if (vs < VIDEO_SOURCE_DEFAULT || vs >= VIDEO_SOURCE_LIST_END) { - LOGE("Invalid video source: %d", vs); + ALOGE("Invalid video source: %d", vs); return BAD_VALUE; } @@ -131,7 +131,7 @@ status_t StagefrightRecorder::setOutputFormat(output_format of) { ALOGV("setOutputFormat: %d", of); if (of < OUTPUT_FORMAT_DEFAULT || of >= OUTPUT_FORMAT_LIST_END) { - LOGE("Invalid output format: %d", of); + ALOGE("Invalid output format: %d", of); return BAD_VALUE; } @@ -148,7 +148,7 @@ status_t StagefrightRecorder::setAudioEncoder(audio_encoder ae) { ALOGV("setAudioEncoder: %d", ae); if (ae < AUDIO_ENCODER_DEFAULT || ae >= AUDIO_ENCODER_LIST_END) { - LOGE("Invalid audio encoder: %d", ae); + ALOGE("Invalid audio encoder: %d", ae); return BAD_VALUE; } @@ -165,7 +165,7 @@ status_t StagefrightRecorder::setVideoEncoder(video_encoder ve) { ALOGV("setVideoEncoder: %d", ve); if (ve < VIDEO_ENCODER_DEFAULT || ve >= VIDEO_ENCODER_LIST_END) { - LOGE("Invalid video encoder: %d", ve); + ALOGE("Invalid video encoder: %d", ve); return BAD_VALUE; } @@ -181,7 +181,7 @@ status_t StagefrightRecorder::setVideoEncoder(video_encoder ve) { status_t StagefrightRecorder::setVideoSize(int width, int height) { ALOGV("setVideoSize: %dx%d", width, height); if (width <= 0 || height <= 0) { - LOGE("Invalid video size: %dx%d", width, height); + ALOGE("Invalid video size: %dx%d", width, height); return BAD_VALUE; } @@ -196,7 +196,7 @@ status_t StagefrightRecorder::setVideoFrameRate(int frames_per_second) { ALOGV("setVideoFrameRate: %d", frames_per_second); if ((frames_per_second <= 0 && frames_per_second != -1) || frames_per_second > 120) { - LOGE("Invalid video frame rate: %d", frames_per_second); + ALOGE("Invalid video frame rate: %d", frames_per_second); return BAD_VALUE; } @@ -210,11 +210,11 @@ status_t StagefrightRecorder::setCamera(const sp<ICamera> &camera, const sp<ICameraRecordingProxy> &proxy) { ALOGV("setCamera"); if (camera == 0) { - LOGE("camera is NULL"); + ALOGE("camera is NULL"); return BAD_VALUE; } if (proxy == 0) { - LOGE("camera proxy is NULL"); + ALOGE("camera proxy is NULL"); return BAD_VALUE; } @@ -231,7 +231,7 @@ status_t StagefrightRecorder::setPreviewSurface(const sp<Surface> &surface) { } status_t StagefrightRecorder::setOutputFile(const char *path) { - LOGE("setOutputFile(const char*) must not be called"); + ALOGE("setOutputFile(const char*) must not be called"); // We don't actually support this at all, as the media_server process // no longer has permissions to create files. @@ -245,7 +245,7 @@ status_t StagefrightRecorder::setOutputFile(int fd, int64_t offset, int64_t leng CHECK_EQ(length, 0); if (fd < 0) { - LOGE("Invalid file descriptor: %d", fd); + ALOGE("Invalid file descriptor: %d", fd); return -EBADF; } @@ -315,7 +315,7 @@ static void TrimString(String8 *s) { status_t StagefrightRecorder::setParamAudioSamplingRate(int32_t sampleRate) { ALOGV("setParamAudioSamplingRate: %d", sampleRate); if (sampleRate <= 0) { - LOGE("Invalid audio sampling rate: %d", sampleRate); + ALOGE("Invalid audio sampling rate: %d", sampleRate); return BAD_VALUE; } @@ -327,7 +327,7 @@ status_t StagefrightRecorder::setParamAudioSamplingRate(int32_t sampleRate) { status_t StagefrightRecorder::setParamAudioNumberOfChannels(int32_t channels) { ALOGV("setParamAudioNumberOfChannels: %d", channels); if (channels <= 0 || channels >= 3) { - LOGE("Invalid number of audio channels: %d", channels); + ALOGE("Invalid number of audio channels: %d", channels); return BAD_VALUE; } @@ -339,7 +339,7 @@ status_t StagefrightRecorder::setParamAudioNumberOfChannels(int32_t channels) { status_t StagefrightRecorder::setParamAudioEncodingBitRate(int32_t bitRate) { ALOGV("setParamAudioEncodingBitRate: %d", bitRate); if (bitRate <= 0) { - LOGE("Invalid audio encoding bit rate: %d", bitRate); + ALOGE("Invalid audio encoding bit rate: %d", bitRate); return BAD_VALUE; } @@ -354,7 +354,7 @@ status_t StagefrightRecorder::setParamAudioEncodingBitRate(int32_t bitRate) { status_t StagefrightRecorder::setParamVideoEncodingBitRate(int32_t bitRate) { ALOGV("setParamVideoEncodingBitRate: %d", bitRate); if (bitRate <= 0) { - LOGE("Invalid video encoding bit rate: %d", bitRate); + ALOGE("Invalid video encoding bit rate: %d", bitRate); return BAD_VALUE; } @@ -370,7 +370,7 @@ status_t StagefrightRecorder::setParamVideoEncodingBitRate(int32_t bitRate) { status_t StagefrightRecorder::setParamVideoRotation(int32_t degrees) { ALOGV("setParamVideoRotation: %d", degrees); if (degrees < 0 || degrees % 90 != 0) { - LOGE("Unsupported video rotation angle: %d", degrees); + ALOGE("Unsupported video rotation angle: %d", degrees); return BAD_VALUE; } mRotationDegrees = degrees % 360; @@ -385,7 +385,7 @@ status_t StagefrightRecorder::setParamMaxFileDurationUs(int64_t timeUs) { ALOGW("Max file duration is not positive: %lld us. Disabling duration limit.", timeUs); timeUs = 0; // Disable the duration limit for zero or negative values. } else if (timeUs <= 100000LL) { // XXX: 100 milli-seconds - LOGE("Max file duration is too short: %lld us", timeUs); + ALOGE("Max file duration is too short: %lld us", timeUs); return BAD_VALUE; } @@ -405,7 +405,7 @@ status_t StagefrightRecorder::setParamMaxFileSizeBytes(int64_t bytes) { "Disabling file size limit.", bytes); bytes = 0; // Disable the file size limit for zero or negative values. } else if (bytes <= 1024) { // XXX: 1 kB - LOGE("Max file size is too small: %lld bytes", bytes); + ALOGE("Max file size is too small: %lld bytes", bytes); return BAD_VALUE; } @@ -423,13 +423,13 @@ status_t StagefrightRecorder::setParamInterleaveDuration(int32_t durationUs) { // If interleave duration is too small, it is very inefficient to do // interleaving since the metadata overhead will count for a significant // portion of the saved contents - LOGE("Audio/video interleave duration is too small: %d us", durationUs); + ALOGE("Audio/video interleave duration is too small: %d us", durationUs); return BAD_VALUE; } else if (durationUs >= 10000000) { // 10 seconds // If interleaving duration is too large, it can cause the recording // session to use too much memory since we have to save the output // data before we write them out - LOGE("Audio/video interleave duration is too large: %d us", durationUs); + ALOGE("Audio/video interleave duration is too large: %d us", durationUs); return BAD_VALUE; } mInterleaveDurationUs = durationUs; @@ -464,7 +464,7 @@ status_t StagefrightRecorder::setParamVideoCameraId(int32_t cameraId) { status_t StagefrightRecorder::setParamTrackTimeStatus(int64_t timeDurationUs) { ALOGV("setParamTrackTimeStatus: %lld", timeDurationUs); if (timeDurationUs < 20000) { // Infeasible if shorter than 20 ms? - LOGE("Tracking time duration too short: %lld us", timeDurationUs); + ALOGE("Tracking time duration too short: %lld us", timeDurationUs); return BAD_VALUE; } mTrackEveryTimeDurationUs = timeDurationUs; @@ -495,7 +495,7 @@ status_t StagefrightRecorder::setParamMovieTimeScale(int32_t timeScale) { // The range is set to be the same as the audio's time scale range // since audio's time scale has a wider range. if (timeScale < 600 || timeScale > 96000) { - LOGE("Time scale (%d) for movie is out of range [600, 96000]", timeScale); + ALOGE("Time scale (%d) for movie is out of range [600, 96000]", timeScale); return BAD_VALUE; } mMovieTimeScale = timeScale; @@ -508,7 +508,7 @@ status_t StagefrightRecorder::setParamVideoTimeScale(int32_t timeScale) { // 60000 is chosen to make sure that each video frame from a 60-fps // video has 1000 ticks. if (timeScale < 600 || timeScale > 60000) { - LOGE("Time scale (%d) for video is out of range [600, 60000]", timeScale); + ALOGE("Time scale (%d) for video is out of range [600, 60000]", timeScale); return BAD_VALUE; } mVideoTimeScale = timeScale; @@ -520,7 +520,7 @@ status_t StagefrightRecorder::setParamAudioTimeScale(int32_t timeScale) { // 96000 Hz is the highest sampling rate support in AAC. if (timeScale < 600 || timeScale > 96000) { - LOGE("Time scale (%d) for audio is out of range [600, 96000]", timeScale); + ALOGE("Time scale (%d) for audio is out of range [600, 96000]", timeScale); return BAD_VALUE; } mAudioTimeScale = timeScale; @@ -545,7 +545,7 @@ status_t StagefrightRecorder::setParamTimeBetweenTimeLapseFrameCapture(int64_t t // Not allowing time more than a day if (timeUs <= 0 || timeUs > 86400*1E6) { - LOGE("Time between time lapse frame capture (%lld) is out of range [0, 1 Day]", timeUs); + ALOGE("Time between time lapse frame capture (%lld) is out of range [0, 1 Day]", timeUs); return BAD_VALUE; } @@ -683,7 +683,7 @@ status_t StagefrightRecorder::setParameter( 1000LL * timeBetweenTimeLapseFrameCaptureMs); } } else { - LOGE("setParameter: failed to find key %s", key.string()); + ALOGE("setParameter: failed to find key %s", key.string()); } return BAD_VALUE; } @@ -695,13 +695,13 @@ status_t StagefrightRecorder::setParameters(const String8 ¶ms) { for (;;) { const char *equal_pos = strchr(key_start, '='); if (equal_pos == NULL) { - LOGE("Parameters %s miss a value", cparams); + ALOGE("Parameters %s miss a value", cparams); return BAD_VALUE; } String8 key(key_start, equal_pos - key_start); TrimString(&key); if (key.length() == 0) { - LOGE("Parameters %s contains an empty key", cparams); + ALOGE("Parameters %s contains an empty key", cparams); return BAD_VALUE; } const char *value_start = equal_pos + 1; @@ -737,7 +737,7 @@ status_t StagefrightRecorder::start() { CHECK(mOutputFd >= 0); if (mWriter != NULL) { - LOGE("File writer is not avaialble"); + ALOGE("File writer is not avaialble"); return UNKNOWN_ERROR; } @@ -769,7 +769,7 @@ status_t StagefrightRecorder::start() { break; default: - LOGE("Unsupported output file format: %d", mOutputFormat); + ALOGE("Unsupported output file format: %d", mOutputFormat); status = UNKNOWN_ERROR; break; } @@ -801,7 +801,7 @@ sp<MediaSource> StagefrightRecorder::createAudioSource() { status_t err = audioSource->initCheck(); if (err != OK) { - LOGE("audio source is not initialized"); + ALOGE("audio source is not initialized"); return NULL; } @@ -819,7 +819,7 @@ sp<MediaSource> StagefrightRecorder::createAudioSource() { mime = MEDIA_MIMETYPE_AUDIO_AAC; break; default: - LOGE("Unknown audio encoder: %d", mAudioEncoder); + ALOGE("Unknown audio encoder: %d", mAudioEncoder); return NULL; } encMeta->setCString(kKeyMIMEType, mime); @@ -872,13 +872,13 @@ status_t StagefrightRecorder::startAMRRecording() { if (mOutputFormat == OUTPUT_FORMAT_AMR_NB) { if (mAudioEncoder != AUDIO_ENCODER_DEFAULT && mAudioEncoder != AUDIO_ENCODER_AMR_NB) { - LOGE("Invalid encoder %d used for AMRNB recording", + ALOGE("Invalid encoder %d used for AMRNB recording", mAudioEncoder); return BAD_VALUE; } } else { // mOutputFormat must be OUTPUT_FORMAT_AMR_WB if (mAudioEncoder != AUDIO_ENCODER_AMR_WB) { - LOGE("Invlaid encoder %d used for AMRWB recording", + ALOGE("Invlaid encoder %d used for AMRWB recording", mAudioEncoder); return BAD_VALUE; } @@ -895,7 +895,7 @@ status_t StagefrightRecorder::startAMRRecording() { status_t StagefrightRecorder::startRawAudioRecording() { if (mAudioSource >= AUDIO_SOURCE_CNT) { - LOGE("Invalid audio source: %d", mAudioSource); + ALOGE("Invalid audio source: %d", mAudioSource); return BAD_VALUE; } @@ -1432,7 +1432,7 @@ status_t StagefrightRecorder::setupAudioEncoder(const sp<MediaWriter>& writer) { break; default: - LOGE("Unsupported audio encoder: %d", mAudioEncoder); + ALOGE("Unsupported audio encoder: %d", mAudioEncoder); return UNKNOWN_ERROR; } @@ -1667,7 +1667,7 @@ status_t StagefrightRecorder::getMaxAmplitude(int *max) { ALOGV("getMaxAmplitude"); if (max == NULL) { - LOGE("Null pointer argument"); + ALOGE("Null pointer argument"); return BAD_VALUE; } diff --git a/media/libmediaplayerservice/TestPlayerStub.cpp b/media/libmediaplayerservice/TestPlayerStub.cpp index 169e49a..0f0ff65 100644 --- a/media/libmediaplayerservice/TestPlayerStub.cpp +++ b/media/libmediaplayerservice/TestPlayerStub.cpp @@ -134,7 +134,7 @@ status_t TestPlayerStub::setDataSource( // None of the entry points should be NULL. mHandle = ::dlopen(mFilename, RTLD_NOW | RTLD_GLOBAL); if (!mHandle) { - LOGE("dlopen failed: %s", ::dlerror()); + ALOGE("dlopen failed: %s", ::dlerror()); resetInternal(); return UNKNOWN_ERROR; } @@ -147,7 +147,7 @@ status_t TestPlayerStub::setDataSource( if (err || mNewPlayer == NULL) { // if err is NULL the string <null> is inserted in the logs => // mNewPlayer was NULL. - LOGE("dlsym for newPlayer failed %s", err); + ALOGE("dlsym for newPlayer failed %s", err); resetInternal(); return UNKNOWN_ERROR; } @@ -156,7 +156,7 @@ status_t TestPlayerStub::setDataSource( "deletePlayer")); err = ::dlerror(); if (err || mDeletePlayer == NULL) { - LOGE("dlsym for deletePlayer failed %s", err); + ALOGE("dlsym for deletePlayer failed %s", err); resetInternal(); return UNKNOWN_ERROR; } diff --git a/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp b/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp index 1612df0..22b8847 100644 --- a/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp +++ b/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp @@ -131,7 +131,7 @@ status_t NuPlayer::HTTPLiveSource::feedMoreTSData() { status_t err = mTSParser->feedTSPacket(buffer, sizeof(buffer)); if (err != OK) { - LOGE("TS Parser returned error %d", err); + ALOGE("TS Parser returned error %d", err); mTSParser->signalEOS(err); mFinalResult = err; break; diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp index 9ef9237..b731d0f 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp +++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp @@ -383,7 +383,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { finishFlushIfPossible(); } else if (what == ACodec::kWhatError) { - LOGE("Received error from %s decoder, aborting playback.", + ALOGE("Received error from %s decoder, aborting playback.", audio ? "audio" : "video"); mRenderer->queueEOS(audio, UNKNOWN_ERROR); @@ -417,7 +417,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { if (finalResult == ERROR_END_OF_STREAM) { ALOGV("reached %s EOS", audio ? "audio" : "video"); } else { - LOGE("%s track encountered an error (%d)", + ALOGE("%s track encountered an error (%d)", audio ? "audio" : "video", finalResult); notifyListener( diff --git a/media/libmediaplayerservice/nuplayer/StreamingSource.cpp b/media/libmediaplayerservice/nuplayer/StreamingSource.cpp index c997942..7c9bc5e 100644 --- a/media/libmediaplayerservice/nuplayer/StreamingSource.cpp +++ b/media/libmediaplayerservice/nuplayer/StreamingSource.cpp @@ -70,7 +70,7 @@ status_t NuPlayer::StreamingSource::feedMoreTSData() { && extra->findInt32( IStreamListener::kKeyDiscontinuityMask, &mask)) { if (mask == 0) { - LOGE("Client specified an illegal discontinuity type."); + ALOGE("Client specified an illegal discontinuity type."); return ERROR_UNSUPPORTED; } @@ -94,7 +94,7 @@ status_t NuPlayer::StreamingSource::feedMoreTSData() { status_t err = mTSParser->feedTSPacket(buffer, sizeof(buffer)); if (err != OK) { - LOGE("TS Parser returned error %d", err); + ALOGE("TS Parser returned error %d", err); mTSParser->signalEOS(err); mFinalResult = err; diff --git a/media/libstagefright/AACWriter.cpp b/media/libstagefright/AACWriter.cpp index 03fb33b..1673ccd 100644 --- a/media/libstagefright/AACWriter.cpp +++ b/media/libstagefright/AACWriter.cpp @@ -84,7 +84,7 @@ status_t AACWriter::addSource(const sp<MediaSource> &source) { } if (mSource != NULL) { - LOGE("AAC files only support a single track of audio."); + ALOGE("AAC files only support a single track of audio."); return UNKNOWN_ERROR; } @@ -216,7 +216,7 @@ static bool getSampleRateTableIndex(int sampleRate, uint8_t* tableIndex) { } } - LOGE("Sampling rate %d bps is not supported", sampleRate); + ALOGE("Sampling rate %d bps is not supported", sampleRate); return false; } diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp index 8ca37b8..ca44ea3 100644 --- a/media/libstagefright/ACodec.cpp +++ b/media/libstagefright/ACodec.cpp @@ -445,7 +445,7 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() { def.format.video.eColorFormat); if (err != 0) { - LOGE("native_window_set_buffers_geometry failed: %s (%d)", + ALOGE("native_window_set_buffers_geometry failed: %s (%d)", strerror(-err), -err); return err; } @@ -464,7 +464,7 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() { usage | GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_EXTERNAL_DISP); if (err != 0) { - LOGE("native_window_set_usage failed: %s (%d)", strerror(-err), -err); + ALOGE("native_window_set_usage failed: %s (%d)", strerror(-err), -err); return err; } @@ -474,7 +474,7 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() { &minUndequeuedBufs); if (err != 0) { - LOGE("NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS query failed: %s (%d)", + ALOGE("NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS query failed: %s (%d)", strerror(-err), -err); return err; } @@ -489,7 +489,7 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() { mNode, OMX_IndexParamPortDefinition, &def, sizeof(def)); if (err != OK) { - LOGE("[%s] setting nBufferCountActual to %lu failed: %d", + ALOGE("[%s] setting nBufferCountActual to %lu failed: %d", mComponentName.c_str(), newBufferCount, err); return err; } @@ -499,7 +499,7 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() { mNativeWindow.get(), def.nBufferCountActual); if (err != 0) { - LOGE("native_window_set_buffer_count failed: %s (%d)", strerror(-err), + ALOGE("native_window_set_buffer_count failed: %s (%d)", strerror(-err), -err); return err; } @@ -513,7 +513,7 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() { ANativeWindowBuffer *buf; err = mNativeWindow->dequeueBuffer(mNativeWindow.get(), &buf); if (err != 0) { - LOGE("dequeueBuffer failed: %s (%d)", strerror(-err), -err); + ALOGE("dequeueBuffer failed: %s (%d)", strerror(-err), -err); break; } @@ -528,7 +528,7 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() { err = mOMX->useGraphicBuffer(mNode, kPortIndexOutput, graphicBuffer, &bufferId); if (err != 0) { - LOGE("registering GraphicBuffer %lu with OMX IL component failed: " + ALOGE("registering GraphicBuffer %lu with OMX IL component failed: " "%d", i, err); break; } @@ -581,7 +581,7 @@ status_t ACodec::cancelBufferToNativeWindow(BufferInfo *info) { ACodec::BufferInfo *ACodec::dequeueBufferFromNativeWindow() { ANativeWindowBuffer *buf; if (mNativeWindow->dequeueBuffer(mNativeWindow.get(), &buf) != 0) { - LOGE("dequeueBuffer failed."); + ALOGE("dequeueBuffer failed."); return NULL; } @@ -1367,7 +1367,7 @@ bool ACodec::BaseState::onOMXEvent( return false; } - LOGE("[%s] ERROR(0x%08lx)", mCodec->mComponentName.c_str(), data1); + ALOGE("[%s] ERROR(0x%08lx)", mCodec->mComponentName.c_str(), data1); mCodec->signalError((OMX_ERRORTYPE)data1); @@ -1826,7 +1826,7 @@ void ACodec::UninitializedState::onSetup( } if (node == NULL) { - LOGE("Unable to instantiate a decoder for type '%s'.", mime.c_str()); + ALOGE("Unable to instantiate a decoder for type '%s'.", mime.c_str()); mCodec->signalError(OMX_ErrorComponentNotFound); return; @@ -1874,7 +1874,7 @@ void ACodec::LoadedToIdleState::stateEntered() { status_t err; if ((err = allocateBuffers()) != OK) { - LOGE("Failed to allocate buffers after transitioning to IDLE state " + ALOGE("Failed to allocate buffers after transitioning to IDLE state " "(error 0x%08x)", err); @@ -2198,7 +2198,7 @@ bool ACodec::OutputPortSettingsChangedState::onOMXEvent( status_t err; if ((err = mCodec->allocateBuffersOnPort( kPortIndexOutput)) != OK) { - LOGE("Failed to allocate output port buffers after " + ALOGE("Failed to allocate output port buffers after " "port reconfiguration (error 0x%08x)", err); diff --git a/media/libstagefright/AMRExtractor.cpp b/media/libstagefright/AMRExtractor.cpp index 7eca5e4..5a28347 100644 --- a/media/libstagefright/AMRExtractor.cpp +++ b/media/libstagefright/AMRExtractor.cpp @@ -85,7 +85,7 @@ static size_t getFrameSize(bool isWide, unsigned FT) { }; if (FT > 15 || (isWide && FT > 9 && FT < 14) || (!isWide && FT > 11 && FT < 15)) { - LOGE("illegal AMR frame type %d", FT); + ALOGE("illegal AMR frame type %d", FT); return 0; } @@ -285,7 +285,7 @@ status_t AMRSource::read( if (header & 0x83) { // Padding bits must be 0. - LOGE("padding bits must be 0, header is 0x%02x", header); + ALOGE("padding bits must be 0, header is 0x%02x", header); return ERROR_MALFORMED; } diff --git a/media/libstagefright/AVIExtractor.cpp b/media/libstagefright/AVIExtractor.cpp index 91555ba..a3187b7 100644 --- a/media/libstagefright/AVIExtractor.cpp +++ b/media/libstagefright/AVIExtractor.cpp @@ -1080,7 +1080,7 @@ status_t AVIExtractor::addH264CodecSpecificData(size_t trackIndex) { sp<MetaData> meta = MakeAVCCodecSpecificData(buffer); if (meta == NULL) { - LOGE("Unable to extract AVC codec specific data"); + ALOGE("Unable to extract AVC codec specific data"); return ERROR_MALFORMED; } diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp index 6fce890..7a2d7b3 100644 --- a/media/libstagefright/AwesomePlayer.cpp +++ b/media/libstagefright/AwesomePlayer.cpp @@ -132,7 +132,7 @@ struct AwesomeNativeWindowRenderer : public AwesomeRenderer { status_t err = mNativeWindow->queueBuffer( mNativeWindow.get(), buffer->graphicBuffer().get()); if (err != 0) { - LOGE("queueBuffer failed with error %s (%d)", strerror(-err), + ALOGE("queueBuffer failed with error %s (%d)", strerror(-err), -err); return; } @@ -1192,7 +1192,7 @@ status_t AwesomePlayer::setNativeWindow_l(const sp<ANativeWindow> &native) { status_t err = initVideoDecoder(); if (err != OK) { - LOGE("failed to reinstantiate video decoder after surface change."); + ALOGE("failed to reinstantiate video decoder after surface change."); return err; } @@ -1683,7 +1683,7 @@ void AwesomePlayer::onVideoEvent() { if (mAudioPlayer != NULL && !(mFlags & (AUDIO_RUNNING | SEEK_PREVIEW))) { status_t err = startAudioPlayer_l(); if (err != OK) { - LOGE("Starting the audio player failed w/ err %d", err); + ALOGE("Starting the audio player failed w/ err %d", err); return; } } diff --git a/media/libstagefright/CameraSource.cpp b/media/libstagefright/CameraSource.cpp index 94d18fa..1850c9c 100755 --- a/media/libstagefright/CameraSource.cpp +++ b/media/libstagefright/CameraSource.cpp @@ -111,7 +111,7 @@ static int32_t getColorFormat(const char* colorFormat) { return OMX_TI_COLOR_FormatYUV420PackedSemiPlanar; } - LOGE("Uknown color format (%s), please add it to " + ALOGE("Uknown color format (%s), please add it to " "CameraSource::getColorFormat", colorFormat); CHECK_EQ(0, "Unknown color format"); @@ -301,7 +301,7 @@ status_t CameraSource::configureCamera( bool isCameraParamChanged = false; if (width != -1 && height != -1) { if (!isVideoSizeSupported(width, height, sizes)) { - LOGE("Video dimension (%dx%d) is unsupported", width, height); + ALOGE("Video dimension (%dx%d) is unsupported", width, height); return BAD_VALUE; } if (isSetVideoSizeSupportedByCamera) { @@ -314,7 +314,7 @@ status_t CameraSource::configureCamera( (width != -1 && height == -1)) { // If one and only one of the width and height is -1 // we reject such a request. - LOGE("Requested video size (%dx%d) is not supported", width, height); + ALOGE("Requested video size (%dx%d) is not supported", width, height); return BAD_VALUE; } else { // width == -1 && height == -1 // Do not configure the camera. @@ -330,7 +330,7 @@ status_t CameraSource::configureCamera( char buf[4]; snprintf(buf, 4, "%d", frameRate); if (strstr(supportedFrameRates, buf) == NULL) { - LOGE("Requested frame rate (%d) is not supported: %s", + ALOGE("Requested frame rate (%d) is not supported: %s", frameRate, supportedFrameRates); return BAD_VALUE; } @@ -347,7 +347,7 @@ status_t CameraSource::configureCamera( // Either frame rate or frame size needs to be changed. String8 s = params->flatten(); if (OK != mCamera->setParameters(s)) { - LOGE("Could not change settings." + ALOGE("Could not change settings." " Someone else is using camera %p?", mCamera.get()); return -EBUSY; } @@ -387,7 +387,7 @@ status_t CameraSource::checkVideoSize( params.getVideoSize(&frameWidthActual, &frameHeightActual); } if (frameWidthActual < 0 || frameHeightActual < 0) { - LOGE("Failed to retrieve video frame size (%dx%d)", + ALOGE("Failed to retrieve video frame size (%dx%d)", frameWidthActual, frameHeightActual); return UNKNOWN_ERROR; } @@ -396,7 +396,7 @@ status_t CameraSource::checkVideoSize( // video frame size. if (width != -1 && height != -1) { if (frameWidthActual != width || frameHeightActual != height) { - LOGE("Failed to set video frame size to %dx%d. " + ALOGE("Failed to set video frame size to %dx%d. " "The actual video size is %dx%d ", width, height, frameWidthActual, frameHeightActual); return UNKNOWN_ERROR; @@ -425,14 +425,14 @@ status_t CameraSource::checkFrameRate( ALOGV("checkFrameRate"); int32_t frameRateActual = params.getPreviewFrameRate(); if (frameRateActual < 0) { - LOGE("Failed to retrieve preview frame rate (%d)", frameRateActual); + ALOGE("Failed to retrieve preview frame rate (%d)", frameRateActual); return UNKNOWN_ERROR; } // Check the actual video frame rate against the target/requested // video frame rate. if (frameRate != -1 && (frameRateActual - frameRate) != 0) { - LOGE("Failed to set preview frame rate to %d fps. The actual " + ALOGE("Failed to set preview frame rate to %d fps. The actual " "frame rate is %d", frameRate, frameRateActual); return UNKNOWN_ERROR; } @@ -489,7 +489,7 @@ status_t CameraSource::initWithCameraAccess( status_t err = OK; if ((err = isCameraAvailable(camera, proxy, cameraId)) != OK) { - LOGE("Camera connection could not be established."); + ALOGE("Camera connection could not be established."); return err; } CameraParameters params(mCamera->getParameters()); @@ -579,7 +579,7 @@ status_t CameraSource::start(MetaData *meta) { ALOGV("start"); CHECK(!mStarted); if (mInitCheck != OK) { - LOGE("CameraSource is not initialized yet"); + ALOGE("CameraSource is not initialized yet"); return mInitCheck; } diff --git a/media/libstagefright/CameraSourceTimeLapse.cpp b/media/libstagefright/CameraSourceTimeLapse.cpp index 8bf18b2..263ab50 100644 --- a/media/libstagefright/CameraSourceTimeLapse.cpp +++ b/media/libstagefright/CameraSourceTimeLapse.cpp @@ -140,7 +140,7 @@ bool CameraSourceTimeLapse::trySettingVideoSize( if (mCamera->setParameters(params.flatten()) == OK) { isSuccessful = true; } else { - LOGE("Failed to set preview size to %dx%d", width, height); + ALOGE("Failed to set preview size to %dx%d", width, height); isSuccessful = false; } } diff --git a/media/libstagefright/FLACExtractor.cpp b/media/libstagefright/FLACExtractor.cpp index 381a2d1..668d7f7 100644 --- a/media/libstagefright/FLACExtractor.cpp +++ b/media/libstagefright/FLACExtractor.cpp @@ -327,7 +327,7 @@ FLAC__StreamDecoderWriteStatus FLACParser::writeCallback( mWriteCompleted = true; return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE; } else { - LOGE("FLACParser::writeCallback unexpected"); + ALOGE("FLACParser::writeCallback unexpected"); return FLAC__STREAM_DECODER_WRITE_STATUS_ABORT; } } @@ -340,7 +340,7 @@ void FLACParser::metadataCallback(const FLAC__StreamMetadata *metadata) mStreamInfo = metadata->data.stream_info; mStreamInfoValid = true; } else { - LOGE("FLACParser::metadataCallback unexpected STREAMINFO"); + ALOGE("FLACParser::metadataCallback unexpected STREAMINFO"); } break; case FLAC__METADATA_TYPE_VORBIS_COMMENT: @@ -373,7 +373,7 @@ void FLACParser::metadataCallback(const FLAC__StreamMetadata *metadata) void FLACParser::errorCallback(FLAC__StreamDecoderErrorStatus status) { - LOGE("FLACParser::errorCallback status=%d", status); + ALOGE("FLACParser::errorCallback status=%d", status); mErrorStatus = status; } @@ -477,7 +477,7 @@ status_t FLACParser::init() // The new should succeed, since probably all it does is a malloc // that always succeeds in Android. But to avoid dependence on the // libFLAC internals, we check and log here. - LOGE("new failed"); + ALOGE("new failed"); return NO_INIT; } FLAC__stream_decoder_set_md5_checking(mDecoder, false); @@ -497,12 +497,12 @@ status_t FLACParser::init() if (initStatus != FLAC__STREAM_DECODER_INIT_STATUS_OK) { // A failure here probably indicates a programming error and so is // unlikely to happen. But we check and log here similarly to above. - LOGE("init_stream failed %d", initStatus); + ALOGE("init_stream failed %d", initStatus); return NO_INIT; } // parse all metadata if (!FLAC__stream_decoder_process_until_end_of_metadata(mDecoder)) { - LOGE("end_of_metadata failed"); + ALOGE("end_of_metadata failed"); return NO_INIT; } if (mStreamInfoValid) { @@ -512,7 +512,7 @@ status_t FLACParser::init() case 2: break; default: - LOGE("unsupported channel count %u", getChannels()); + ALOGE("unsupported channel count %u", getChannels()); return NO_INIT; } // check bit depth @@ -522,7 +522,7 @@ status_t FLACParser::init() case 24: break; default: - LOGE("unsupported bits per sample %u", getBitsPerSample()); + ALOGE("unsupported bits per sample %u", getBitsPerSample()); return NO_INIT; } // check sample rate @@ -539,7 +539,7 @@ status_t FLACParser::init() break; default: // 96000 would require a proper downsampler in AudioFlinger - LOGE("unsupported sample rate %u", getSampleRate()); + ALOGE("unsupported sample rate %u", getSampleRate()); return NO_INIT; } // configure the appropriate copy function, defaulting to trespass @@ -572,7 +572,7 @@ status_t FLACParser::init() (getTotalSamples() * 1000000LL) / getSampleRate()); } } else { - LOGE("missing STREAMINFO"); + ALOGE("missing STREAMINFO"); return NO_INIT; } if (mFileMetadata != 0) { @@ -603,13 +603,13 @@ MediaBuffer *FLACParser::readBuffer(bool doSeek, FLAC__uint64 sample) if (doSeek) { // We implement the seek callback, so this works without explicit flush if (!FLAC__stream_decoder_seek_absolute(mDecoder, sample)) { - LOGE("FLACParser::readBuffer seek to sample %llu failed", sample); + ALOGE("FLACParser::readBuffer seek to sample %llu failed", sample); return NULL; } ALOGV("FLACParser::readBuffer seek to sample %llu succeeded", sample); } else { if (!FLAC__stream_decoder_process_single(mDecoder)) { - LOGE("FLACParser::readBuffer process_single failed"); + ALOGE("FLACParser::readBuffer process_single failed"); return NULL; } } @@ -620,13 +620,13 @@ MediaBuffer *FLACParser::readBuffer(bool doSeek, FLAC__uint64 sample) // verify that block header keeps the promises made by STREAMINFO unsigned blocksize = mWriteHeader.blocksize; if (blocksize == 0 || blocksize > getMaxBlockSize()) { - LOGE("FLACParser::readBuffer write invalid blocksize %u", blocksize); + ALOGE("FLACParser::readBuffer write invalid blocksize %u", blocksize); return NULL; } if (mWriteHeader.sample_rate != getSampleRate() || mWriteHeader.channels != getChannels() || mWriteHeader.bits_per_sample != getBitsPerSample()) { - LOGE("FLACParser::readBuffer write changed parameters mid-stream"); + ALOGE("FLACParser::readBuffer write changed parameters mid-stream"); } // acquire a media buffer CHECK(mGroup != NULL); diff --git a/media/libstagefright/FileSource.cpp b/media/libstagefright/FileSource.cpp index 0794f57..73cb48c 100644 --- a/media/libstagefright/FileSource.cpp +++ b/media/libstagefright/FileSource.cpp @@ -101,7 +101,7 @@ ssize_t FileSource::readAt(off64_t offset, void *data, size_t size) { } else { off64_t result = lseek64(mFd, offset + mOffset, SEEK_SET); if (result == -1) { - LOGE("seek to %lld failed", offset + mOffset); + ALOGE("seek to %lld failed", offset + mOffset); return UNKNOWN_ERROR; } diff --git a/media/libstagefright/HTTPBase.cpp b/media/libstagefright/HTTPBase.cpp index 5950b37..d7eea3f 100644 --- a/media/libstagefright/HTTPBase.cpp +++ b/media/libstagefright/HTTPBase.cpp @@ -111,7 +111,7 @@ status_t HTTPBase::setBandwidthStatCollectFreq(int32_t freqMs) { if (freqMs < kMinBandwidthCollectFreqMs || freqMs > kMaxBandwidthCollectFreqMs) { - LOGE("frequency (%d ms) is out of range [1000, 60000]", freqMs); + ALOGE("frequency (%d ms) is out of range [1000, 60000]", freqMs); return BAD_VALUE; } @@ -139,7 +139,7 @@ bool HTTPBase::getUID(uid_t *uid) const { void HTTPBase::RegisterSocketUserTag(int sockfd, uid_t uid, uint32_t kTag) { int res = qtaguid_tagSocket(sockfd, kTag, uid); if (res != 0) { - LOGE("Failed tagging socket %d for uid %d (My UID=%d)", sockfd, uid, geteuid()); + ALOGE("Failed tagging socket %d for uid %d (My UID=%d)", sockfd, uid, geteuid()); } } @@ -147,7 +147,7 @@ void HTTPBase::RegisterSocketUserTag(int sockfd, uid_t uid, uint32_t kTag) { void HTTPBase::UnRegisterSocketUserTag(int sockfd) { int res = qtaguid_untagSocket(sockfd); if (res != 0) { - LOGE("Failed untagging socket %d (My UID=%d)", sockfd, geteuid()); + ALOGE("Failed untagging socket %d (My UID=%d)", sockfd, geteuid()); } } diff --git a/media/libstagefright/MP3Extractor.cpp b/media/libstagefright/MP3Extractor.cpp index cb82deb..2215c07 100644 --- a/media/libstagefright/MP3Extractor.cpp +++ b/media/libstagefright/MP3Extractor.cpp @@ -487,7 +487,7 @@ status_t MP3Source::read( off64_t pos = mCurrentPos; if (!Resync(mDataSource, mFixedHeader, &pos, NULL, NULL)) { - LOGE("Unable to resync. Signalling end of stream."); + ALOGE("Unable to resync. Signalling end of stream."); buffer->release(); buffer = NULL; diff --git a/media/libstagefright/MPEG4Extractor.cpp b/media/libstagefright/MPEG4Extractor.cpp index 43bd1ac..bc88015 100644 --- a/media/libstagefright/MPEG4Extractor.cpp +++ b/media/libstagefright/MPEG4Extractor.cpp @@ -1250,7 +1250,7 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) { char buffer[23]; if (chunk_data_size != 7 && chunk_data_size != 23) { - LOGE("Incorrect D263 box size %lld", chunk_data_size); + ALOGE("Incorrect D263 box size %lld", chunk_data_size); return ERROR_MALFORMED; } @@ -1751,7 +1751,7 @@ status_t MPEG4Extractor::updateAudioTrackInfoFromESDS_MPEG4Audio( // The media subtype is MP3 audio // Our software MP3 audio decoder may not be able to handle // packetized MP3 audio; for now, lets just return ERROR_UNSUPPORTED - LOGE("MP3 track in MP4/3GPP file is not supported"); + ALOGE("MP3 track in MP4/3GPP file is not supported"); return ERROR_UNSUPPORTED; } @@ -2123,7 +2123,7 @@ status_t MPEG4Source::read( size_t nal_size = parseNALSize(src); if (mBuffer->range_length() < mNALLengthSize + nal_size) { - LOGE("incomplete NAL unit."); + ALOGE("incomplete NAL unit."); mBuffer->release(); mBuffer = NULL; @@ -2187,7 +2187,7 @@ status_t MPEG4Source::read( } if (isMalFormed) { - LOGE("Video is malformed"); + ALOGE("Video is malformed"); mBuffer->release(); mBuffer = NULL; return ERROR_MALFORMED; diff --git a/media/libstagefright/MPEG4Writer.cpp b/media/libstagefright/MPEG4Writer.cpp index 8b270cb..06dd875 100755 --- a/media/libstagefright/MPEG4Writer.cpp +++ b/media/libstagefright/MPEG4Writer.cpp @@ -327,7 +327,7 @@ status_t MPEG4Writer::Track::dump( status_t MPEG4Writer::addSource(const sp<MediaSource> &source) { Mutex::Autolock l(mLock); if (mStarted) { - LOGE("Attempt to add source AFTER recording is started"); + ALOGE("Attempt to add source AFTER recording is started"); return UNKNOWN_ERROR; } Track *track = new Track(this, source, mTracks.size()); @@ -1525,7 +1525,7 @@ status_t MPEG4Writer::Track::pause() { status_t MPEG4Writer::Track::stop() { ALOGD("Stopping %s track", mIsAudio? "Audio": "Video"); if (!mStarted) { - LOGE("Stop() called but track is not started"); + ALOGE("Stop() called but track is not started"); return ERROR_END_OF_STREAM; } @@ -1596,14 +1596,14 @@ const uint8_t *MPEG4Writer::Track::parseParamSet( const uint8_t *nextStartCode = findNextStartCode(data, length); *paramSetLen = nextStartCode - data; if (*paramSetLen == 0) { - LOGE("Param set is malformed, since its length is 0"); + ALOGE("Param set is malformed, since its length is 0"); return NULL; } AVCParamSet paramSet(*paramSetLen, data); if (type == kNalUnitTypeSeqParamSet) { if (*paramSetLen < 4) { - LOGE("Seq parameter set malformed"); + ALOGE("Seq parameter set malformed"); return NULL; } if (mSeqParamSets.empty()) { @@ -1614,7 +1614,7 @@ const uint8_t *MPEG4Writer::Track::parseParamSet( if (mProfileIdc != data[1] || mProfileCompatible != data[2] || mLevelIdc != data[3]) { - LOGE("Inconsistent profile/level found in seq parameter sets"); + ALOGE("Inconsistent profile/level found in seq parameter sets"); return NULL; } } @@ -1632,7 +1632,7 @@ status_t MPEG4Writer::Track::copyAVCCodecSpecificData( // 2 bytes for each of the parameter set length field // plus the 7 bytes for the header if (size < 4 + 7) { - LOGE("Codec specific data length too short: %d", size); + ALOGE("Codec specific data length too short: %d", size); return ERROR_MALFORMED; } @@ -1661,7 +1661,7 @@ status_t MPEG4Writer::Track::parseAVCCodecSpecificData( getNalUnitType(*(tmp + 4), &type); if (type == kNalUnitTypeSeqParamSet) { if (gotPps) { - LOGE("SPS must come before PPS"); + ALOGE("SPS must come before PPS"); return ERROR_MALFORMED; } if (!gotSps) { @@ -1670,7 +1670,7 @@ status_t MPEG4Writer::Track::parseAVCCodecSpecificData( nextStartCode = parseParamSet(tmp + 4, bytesLeft - 4, type, ¶mSetLen); } else if (type == kNalUnitTypePicParamSet) { if (!gotSps) { - LOGE("SPS must come before PPS"); + ALOGE("SPS must come before PPS"); return ERROR_MALFORMED; } if (!gotPps) { @@ -1678,7 +1678,7 @@ status_t MPEG4Writer::Track::parseAVCCodecSpecificData( } nextStartCode = parseParamSet(tmp + 4, bytesLeft - 4, type, ¶mSetLen); } else { - LOGE("Only SPS and PPS Nal units are expected"); + ALOGE("Only SPS and PPS Nal units are expected"); return ERROR_MALFORMED; } @@ -1696,12 +1696,12 @@ status_t MPEG4Writer::Track::parseAVCCodecSpecificData( // Check on the number of seq parameter sets size_t nSeqParamSets = mSeqParamSets.size(); if (nSeqParamSets == 0) { - LOGE("Cound not find sequence parameter set"); + ALOGE("Cound not find sequence parameter set"); return ERROR_MALFORMED; } if (nSeqParamSets > 0x1F) { - LOGE("Too many seq parameter sets (%d) found", nSeqParamSets); + ALOGE("Too many seq parameter sets (%d) found", nSeqParamSets); return ERROR_MALFORMED; } } @@ -1710,11 +1710,11 @@ status_t MPEG4Writer::Track::parseAVCCodecSpecificData( // Check on the number of pic parameter sets size_t nPicParamSets = mPicParamSets.size(); if (nPicParamSets == 0) { - LOGE("Cound not find picture parameter set"); + ALOGE("Cound not find picture parameter set"); return ERROR_MALFORMED; } if (nPicParamSets > 0xFF) { - LOGE("Too many pic parameter sets (%d) found", nPicParamSets); + ALOGE("Too many pic parameter sets (%d) found", nPicParamSets); return ERROR_MALFORMED; } } @@ -1727,7 +1727,7 @@ status_t MPEG4Writer::Track::parseAVCCodecSpecificData( // These profiles requires additional parameter set extensions if (mProfileIdc == 100 || mProfileIdc == 110 || mProfileIdc == 122 || mProfileIdc == 144) { - LOGE("Sorry, no support for profile_idc: %d!", mProfileIdc); + ALOGE("Sorry, no support for profile_idc: %d!", mProfileIdc); return BAD_VALUE; } } @@ -1739,12 +1739,12 @@ status_t MPEG4Writer::Track::makeAVCCodecSpecificData( const uint8_t *data, size_t size) { if (mCodecSpecificData != NULL) { - LOGE("Already have codec specific data"); + ALOGE("Already have codec specific data"); return ERROR_MALFORMED; } if (size < 4) { - LOGE("Codec specific data length too short: %d", size); + ALOGE("Codec specific data length too short: %d", size); return ERROR_MALFORMED; } @@ -2160,12 +2160,12 @@ status_t MPEG4Writer::Track::threadEntry() { bool MPEG4Writer::Track::isTrackMalFormed() const { if (mSampleSizes.empty()) { // no samples written - LOGE("The number of recorded samples is 0"); + ALOGE("The number of recorded samples is 0"); return true; } if (!mIsAudio && mNumStssTableEntries == 0) { // no sync frames for video - LOGE("There are no sync frames for video track"); + ALOGE("There are no sync frames for video track"); return true; } @@ -2308,13 +2308,13 @@ status_t MPEG4Writer::Track::checkCodecSpecificData() const { !strcasecmp(MEDIA_MIMETYPE_VIDEO_AVC, mime)) { if (!mCodecSpecificData || mCodecSpecificDataSize <= 0) { - LOGE("Missing codec specific data"); + ALOGE("Missing codec specific data"); return ERROR_MALFORMED; } } else { if (mCodecSpecificData || mCodecSpecificDataSize > 0) { - LOGE("Unexepected codec specific data found"); + ALOGE("Unexepected codec specific data found"); return ERROR_MALFORMED; } } @@ -2378,7 +2378,7 @@ void MPEG4Writer::Track::writeVideoFourCCBox() { } else if (!strcasecmp(MEDIA_MIMETYPE_VIDEO_AVC, mime)) { mOwner->beginBox("avc1"); } else { - LOGE("Unknown mime type '%s'.", mime); + ALOGE("Unknown mime type '%s'.", mime); CHECK(!"should not be here, unknown mime type."); } @@ -2432,7 +2432,7 @@ void MPEG4Writer::Track::writeAudioFourCCBox() { } else if (!strcasecmp(MEDIA_MIMETYPE_AUDIO_AAC, mime)) { fourcc = "mp4a"; } else { - LOGE("Unknown mime type '%s'.", mime); + ALOGE("Unknown mime type '%s'.", mime); CHECK(!"should not be here, unknown mime type."); } diff --git a/media/libstagefright/MediaBuffer.cpp b/media/libstagefright/MediaBuffer.cpp index 0b14f1e..96271e4 100644 --- a/media/libstagefright/MediaBuffer.cpp +++ b/media/libstagefright/MediaBuffer.cpp @@ -135,7 +135,7 @@ size_t MediaBuffer::range_length() const { void MediaBuffer::set_range(size_t offset, size_t length) { if ((mGraphicBuffer == NULL) && (offset + length > mSize)) { - LOGE("offset = %d, length = %d, mSize = %d", offset, length, mSize); + ALOGE("offset = %d, length = %d, mSize = %d", offset, length, mSize); } CHECK((mGraphicBuffer != NULL) || (offset + length <= mSize)); diff --git a/media/libstagefright/NuCachedSource2.cpp b/media/libstagefright/NuCachedSource2.cpp index 6e5f8ab..249c298 100644 --- a/media/libstagefright/NuCachedSource2.cpp +++ b/media/libstagefright/NuCachedSource2.cpp @@ -317,7 +317,7 @@ void NuCachedSource2::fetchInternal() { Mutex::Autolock autoLock(mLock); if (n < 0) { - LOGE("source returned error %ld, %d retries left", n, mNumRetriesLeft); + ALOGE("source returned error %ld, %d retries left", n, mNumRetriesLeft); mFinalStatus = n; mCache->releasePage(page); } else if (n == 0) { @@ -634,7 +634,7 @@ void NuCachedSource2::updateCacheParamsFromString(const char *s) { if (sscanf(s, "%ld/%ld/%d", &lowwaterMarkKb, &highwaterMarkKb, &keepAliveSecs) != 3) { - LOGE("Failed to parse cache parameters from '%s'.", s); + ALOGE("Failed to parse cache parameters from '%s'.", s); return; } @@ -651,7 +651,7 @@ void NuCachedSource2::updateCacheParamsFromString(const char *s) { } if (mLowwaterThresholdBytes >= mHighwaterThresholdBytes) { - LOGE("Illegal low/highwater marks specified, reverting to defaults."); + ALOGE("Illegal low/highwater marks specified, reverting to defaults."); mLowwaterThresholdBytes = kDefaultLowWaterThreshold; mHighwaterThresholdBytes = kDefaultHighWaterThreshold; diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp index 2244c6d..60d9bb7 100755 --- a/media/libstagefright/OMXCodec.cpp +++ b/media/libstagefright/OMXCodec.cpp @@ -181,7 +181,7 @@ static const CodecInfo kEncoderInfo[] = { #define CODEC_LOGI(x, ...) ALOGI("[%s] "x, mComponentName, ##__VA_ARGS__) #define CODEC_LOGV(x, ...) ALOGV("[%s] "x, mComponentName, ##__VA_ARGS__) -#define CODEC_LOGE(x, ...) LOGE("[%s] "x, mComponentName, ##__VA_ARGS__) +#define CODEC_LOGE(x, ...) ALOGE("[%s] "x, mComponentName, ##__VA_ARGS__) struct OMXCodecObserver : public BnOMXObserver { OMXCodecObserver() { @@ -625,7 +625,7 @@ status_t OMXCodec::configureCodec(const sp<MetaData> &meta) { status_t err; if ((err = parseAVCCodecSpecificData( data, size, &profile, &level)) != OK) { - LOGE("Malformed AVC codec specific data."); + ALOGE("Malformed AVC codec specific data."); return err; } @@ -639,7 +639,7 @@ status_t OMXCodec::configureCodec(const sp<MetaData> &meta) { // does not handle this gracefully and would clobber the heap // and wreak havoc instead... - LOGE("Profile and/or level exceed the decoder's capabilities."); + ALOGE("Profile and/or level exceed the decoder's capabilities."); return ERROR_UNSUPPORTED; } } else if (meta->findData(kKeyVorbisInfo, &type, &data, &size)) { @@ -981,7 +981,7 @@ void OMXCodec::setVideoInputFormat( } else if (!strcasecmp(MEDIA_MIMETYPE_VIDEO_H263, mime)) { compressionFormat = OMX_VIDEO_CodingH263; } else { - LOGE("Not a supported video mime type: %s", mime); + ALOGE("Not a supported video mime type: %s", mime); CHECK(!"Should not be here. Not a supported video mime type."); } @@ -1375,7 +1375,7 @@ status_t OMXCodec::setVideoOutputFormat( } else if (!strcasecmp(MEDIA_MIMETYPE_VIDEO_MPEG2, mime)) { compressionFormat = OMX_VIDEO_CodingMPEG2; } else { - LOGE("Not a supported video mime type: %s", mime); + ALOGE("Not a supported video mime type: %s", mime); CHECK(!"Should not be here. Not a supported video mime type."); } @@ -1664,7 +1664,7 @@ status_t OMXCodec::allocateBuffersOnPort(OMX_U32 portIndex) { } if ((mFlags & kEnableGrallocUsageProtected) && portIndex == kPortIndexOutput) { - LOGE("protected output buffers must be stent to an ANativeWindow"); + ALOGE("protected output buffers must be stent to an ANativeWindow"); return PERMISSION_DENIED; } @@ -1673,7 +1673,7 @@ status_t OMXCodec::allocateBuffersOnPort(OMX_U32 portIndex) { && portIndex == kPortIndexInput) { err = mOMX->storeMetaDataInBuffers(mNode, kPortIndexInput, OMX_TRUE); if (err != OK) { - LOGE("Storing meta data in video buffers is not supported"); + ALOGE("Storing meta data in video buffers is not supported"); return err; } } @@ -1735,7 +1735,7 @@ status_t OMXCodec::allocateBuffersOnPort(OMX_U32 portIndex) { } if (err != OK) { - LOGE("allocate_buffer_with_backup failed"); + ALOGE("allocate_buffer_with_backup failed"); return err; } @@ -1849,7 +1849,7 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() { def.format.video.eColorFormat); if (err != 0) { - LOGE("native_window_set_buffers_geometry failed: %s (%d)", + ALOGE("native_window_set_buffers_geometry failed: %s (%d)", strerror(-err), -err); return err; } @@ -1881,11 +1881,11 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() { mNativeWindow.get(), NATIVE_WINDOW_QUEUES_TO_WINDOW_COMPOSER, &queuesToNativeWindow); if (err != 0) { - LOGE("error authenticating native window: %d", err); + ALOGE("error authenticating native window: %d", err); return err; } if (queuesToNativeWindow != 1) { - LOGE("native window could not be authenticated"); + ALOGE("native window could not be authenticated"); return PERMISSION_DENIED; } } @@ -1894,7 +1894,7 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() { err = native_window_set_usage( mNativeWindow.get(), usage | GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_EXTERNAL_DISP); if (err != 0) { - LOGE("native_window_set_usage failed: %s (%d)", strerror(-err), -err); + ALOGE("native_window_set_usage failed: %s (%d)", strerror(-err), -err); return err; } @@ -1902,7 +1902,7 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() { err = mNativeWindow->query(mNativeWindow.get(), NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS, &minUndequeuedBufs); if (err != 0) { - LOGE("NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS query failed: %s (%d)", + ALOGE("NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS query failed: %s (%d)", strerror(-err), -err); return err; } @@ -1925,7 +1925,7 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() { err = native_window_set_buffer_count( mNativeWindow.get(), def.nBufferCountActual); if (err != 0) { - LOGE("native_window_set_buffer_count failed: %s (%d)", strerror(-err), + ALOGE("native_window_set_buffer_count failed: %s (%d)", strerror(-err), -err); return err; } @@ -1938,7 +1938,7 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() { ANativeWindowBuffer* buf; err = mNativeWindow->dequeueBuffer(mNativeWindow.get(), &buf); if (err != 0) { - LOGE("dequeueBuffer failed: %s (%d)", strerror(-err), -err); + ALOGE("dequeueBuffer failed: %s (%d)", strerror(-err), -err); break; } @@ -2052,7 +2052,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() { err = native_window_api_disconnect(mNativeWindow.get(), NATIVE_WINDOW_API_MEDIA); if (err != NO_ERROR) { - LOGE("error pushing blank frames: api_disconnect failed: %s (%d)", + ALOGE("error pushing blank frames: api_disconnect failed: %s (%d)", strerror(-err), -err); return err; } @@ -2060,7 +2060,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() { err = native_window_api_connect(mNativeWindow.get(), NATIVE_WINDOW_API_CPU); if (err != NO_ERROR) { - LOGE("error pushing blank frames: api_connect failed: %s (%d)", + ALOGE("error pushing blank frames: api_connect failed: %s (%d)", strerror(-err), -err); return err; } @@ -2068,7 +2068,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() { err = native_window_set_scaling_mode(mNativeWindow.get(), NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW); if (err != NO_ERROR) { - LOGE("error pushing blank frames: set_buffers_geometry failed: %s (%d)", + ALOGE("error pushing blank frames: set_buffers_geometry failed: %s (%d)", strerror(-err), -err); goto error; } @@ -2076,7 +2076,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() { err = native_window_set_buffers_geometry(mNativeWindow.get(), 1, 1, HAL_PIXEL_FORMAT_RGBX_8888); if (err != NO_ERROR) { - LOGE("error pushing blank frames: set_buffers_geometry failed: %s (%d)", + ALOGE("error pushing blank frames: set_buffers_geometry failed: %s (%d)", strerror(-err), -err); goto error; } @@ -2084,7 +2084,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() { err = native_window_set_usage(mNativeWindow.get(), GRALLOC_USAGE_SW_WRITE_OFTEN); if (err != NO_ERROR) { - LOGE("error pushing blank frames: set_usage failed: %s (%d)", + ALOGE("error pushing blank frames: set_usage failed: %s (%d)", strerror(-err), -err); goto error; } @@ -2092,7 +2092,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() { err = mNativeWindow->query(mNativeWindow.get(), NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS, &minUndequeuedBufs); if (err != NO_ERROR) { - LOGE("error pushing blank frames: MIN_UNDEQUEUED_BUFFERS query " + ALOGE("error pushing blank frames: MIN_UNDEQUEUED_BUFFERS query " "failed: %s (%d)", strerror(-err), -err); goto error; } @@ -2100,7 +2100,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() { numBufs = minUndequeuedBufs + 1; err = native_window_set_buffer_count(mNativeWindow.get(), numBufs); if (err != NO_ERROR) { - LOGE("error pushing blank frames: set_buffer_count failed: %s (%d)", + ALOGE("error pushing blank frames: set_buffer_count failed: %s (%d)", strerror(-err), -err); goto error; } @@ -2112,7 +2112,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() { for (int i = 0; i < numBufs + 1; i++) { err = mNativeWindow->dequeueBuffer(mNativeWindow.get(), &anb); if (err != NO_ERROR) { - LOGE("error pushing blank frames: dequeueBuffer failed: %s (%d)", + ALOGE("error pushing blank frames: dequeueBuffer failed: %s (%d)", strerror(-err), -err); goto error; } @@ -2121,7 +2121,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() { err = mNativeWindow->lockBuffer(mNativeWindow.get(), buf->getNativeBuffer()); if (err != NO_ERROR) { - LOGE("error pushing blank frames: lockBuffer failed: %s (%d)", + ALOGE("error pushing blank frames: lockBuffer failed: %s (%d)", strerror(-err), -err); goto error; } @@ -2130,7 +2130,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() { uint32_t* img = NULL; err = buf->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)(&img)); if (err != NO_ERROR) { - LOGE("error pushing blank frames: lock failed: %s (%d)", + ALOGE("error pushing blank frames: lock failed: %s (%d)", strerror(-err), -err); goto error; } @@ -2139,7 +2139,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() { err = buf->unlock(); if (err != NO_ERROR) { - LOGE("error pushing blank frames: unlock failed: %s (%d)", + ALOGE("error pushing blank frames: unlock failed: %s (%d)", strerror(-err), -err); goto error; } @@ -2147,7 +2147,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() { err = mNativeWindow->queueBuffer(mNativeWindow.get(), buf->getNativeBuffer()); if (err != NO_ERROR) { - LOGE("error pushing blank frames: queueBuffer failed: %s (%d)", + ALOGE("error pushing blank frames: queueBuffer failed: %s (%d)", strerror(-err), -err); goto error; } @@ -2174,7 +2174,7 @@ error: err = native_window_api_disconnect(mNativeWindow.get(), NATIVE_WINDOW_API_CPU); if (err != NO_ERROR) { - LOGE("error pushing blank frames: api_disconnect failed: %s (%d)", + ALOGE("error pushing blank frames: api_disconnect failed: %s (%d)", strerror(-err), -err); return err; } @@ -2182,7 +2182,7 @@ error: err = native_window_api_connect(mNativeWindow.get(), NATIVE_WINDOW_API_MEDIA); if (err != NO_ERROR) { - LOGE("error pushing blank frames: api_connect failed: %s (%d)", + ALOGE("error pushing blank frames: api_connect failed: %s (%d)", strerror(-err), -err); return err; } diff --git a/media/libstagefright/OggExtractor.cpp b/media/libstagefright/OggExtractor.cpp index b7a9faf..73efc27 100644 --- a/media/libstagefright/OggExtractor.cpp +++ b/media/libstagefright/OggExtractor.cpp @@ -899,7 +899,7 @@ static void extractAlbumArt( uint8_t *flac = DecodeBase64((const char *)data, size, &flacSize); if (flac == NULL) { - LOGE("malformed base64 encoded data."); + ALOGE("malformed base64 encoded data."); return; } diff --git a/media/libstagefright/SampleIterator.cpp b/media/libstagefright/SampleIterator.cpp index 7b8e008..81ec5c1 100644 --- a/media/libstagefright/SampleIterator.cpp +++ b/media/libstagefright/SampleIterator.cpp @@ -77,7 +77,7 @@ status_t SampleIterator::seekTo(uint32_t sampleIndex) { if (sampleIndex >= mStopChunkSampleIndex) { status_t err; if ((err = findChunkRange(sampleIndex)) != OK) { - LOGE("findChunkRange failed"); + ALOGE("findChunkRange failed"); return err; } } @@ -93,7 +93,7 @@ status_t SampleIterator::seekTo(uint32_t sampleIndex) { status_t err; if ((err = getChunkOffset(chunk, &mCurrentChunkOffset)) != OK) { - LOGE("getChunkOffset return error"); + ALOGE("getChunkOffset return error"); return err; } @@ -107,7 +107,7 @@ status_t SampleIterator::seekTo(uint32_t sampleIndex) { size_t sampleSize; if ((err = getSampleSizeDirect( firstChunkSampleIndex + i, &sampleSize)) != OK) { - LOGE("getSampleSizeDirect return error"); + ALOGE("getSampleSizeDirect return error"); return err; } @@ -134,7 +134,7 @@ status_t SampleIterator::seekTo(uint32_t sampleIndex) { status_t err; if ((err = findSampleTime(sampleIndex, &mCurrentSampleTime)) != OK) { - LOGE("findSampleTime return error"); + ALOGE("findSampleTime return error"); return err; } diff --git a/media/libstagefright/SampleTable.cpp b/media/libstagefright/SampleTable.cpp index 305c9bb..d9858d7 100644 --- a/media/libstagefright/SampleTable.cpp +++ b/media/libstagefright/SampleTable.cpp @@ -634,7 +634,7 @@ status_t SampleTable::findSyncSampleNear( } if (left == mNumSyncSamples) { if (flags == kFlagAfter) { - LOGE("tried to find a sync frame after the last one: %d", left); + ALOGE("tried to find a sync frame after the last one: %d", left); return ERROR_OUT_OF_RANGE; } left = left - 1; diff --git a/media/libstagefright/StagefrightMediaScanner.cpp b/media/libstagefright/StagefrightMediaScanner.cpp index 4345184..bd7a226 100644 --- a/media/libstagefright/StagefrightMediaScanner.cpp +++ b/media/libstagefright/StagefrightMediaScanner.cpp @@ -57,7 +57,7 @@ static MediaScanResult HandleMIDI( // get the library configuration and do sanity check const S_EAS_LIB_CONFIG* pLibConfig = EAS_Config(); if ((pLibConfig == NULL) || (LIB_VERSION != pLibConfig->libVersion)) { - LOGE("EAS library/header mismatch\n"); + ALOGE("EAS library/header mismatch\n"); return MEDIA_SCAN_RESULT_ERROR; } EAS_I32 temp; diff --git a/media/libstagefright/StagefrightMetadataRetriever.cpp b/media/libstagefright/StagefrightMetadataRetriever.cpp index 8875af0..43bfd9e 100644 --- a/media/libstagefright/StagefrightMetadataRetriever.cpp +++ b/media/libstagefright/StagefrightMetadataRetriever.cpp @@ -138,7 +138,7 @@ static VideoFrame *extractVideoFrameWithCodecFlags( if (seekMode < MediaSource::ReadOptions::SEEK_PREVIOUS_SYNC || seekMode > MediaSource::ReadOptions::SEEK_CLOSEST) { - LOGE("Unknown seek mode: %d", seekMode); + ALOGE("Unknown seek mode: %d", seekMode); return NULL; } @@ -264,7 +264,7 @@ static VideoFrame *extractVideoFrameWithCodecFlags( decoder->stop(); if (err != OK) { - LOGE("Colorconverter failed to convert frame."); + ALOGE("Colorconverter failed to convert frame."); delete frame; frame = NULL; @@ -292,7 +292,7 @@ VideoFrame *StagefrightMetadataRetriever::getFrameAtTime( int32_t drm = 0; if (fileMeta->findInt32(kKeyIsDRM, &drm) && drm != 0) { - LOGE("frame grab not allowed."); + ALOGE("frame grab not allowed."); return NULL; } diff --git a/media/libstagefright/SurfaceMediaSource.cpp b/media/libstagefright/SurfaceMediaSource.cpp index 2f807d0..2233d1b 100644 --- a/media/libstagefright/SurfaceMediaSource.cpp +++ b/media/libstagefright/SurfaceMediaSource.cpp @@ -112,7 +112,7 @@ status_t SurfaceMediaSource::setBufferCountServer(int bufferCount) { status_t SurfaceMediaSource::setBufferCount(int bufferCount) { ALOGV("SurfaceMediaSource::setBufferCount"); if (bufferCount > NUM_BUFFER_SLOTS) { - LOGE("setBufferCount: bufferCount is larger than the number of buffer slots"); + ALOGE("setBufferCount: bufferCount is larger than the number of buffer slots"); return BAD_VALUE; } @@ -120,7 +120,7 @@ status_t SurfaceMediaSource::setBufferCount(int bufferCount) { // Error out if the user has dequeued buffers for (int i = 0 ; i < mBufferCount ; i++) { if (mSlots[i].mBufferState == BufferSlot::DEQUEUED) { - LOGE("setBufferCount: client owns some buffers"); + ALOGE("setBufferCount: client owns some buffers"); return INVALID_OPERATION; } } @@ -155,7 +155,7 @@ status_t SurfaceMediaSource::requestBuffer(int slot, sp<GraphicBuffer>* buf) { ALOGV("SurfaceMediaSource::requestBuffer"); Mutex::Autolock lock(mMutex); if (slot < 0 || mBufferCount <= slot) { - LOGE("requestBuffer: slot index out of range [0, %d]: %d", + ALOGE("requestBuffer: slot index out of range [0, %d]: %d", mBufferCount, slot); return BAD_VALUE; } @@ -183,7 +183,7 @@ status_t SurfaceMediaSource::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h, // we might declare mHeight and mWidth and check against those here. if ((w != 0) || (h != 0)) { if ((w != mDefaultWidth) || (h != mDefaultHeight)) { - LOGE("dequeuebuffer: invalid buffer size! Req: %dx%d, Found: %dx%d", + ALOGE("dequeuebuffer: invalid buffer size! Req: %dx%d, Found: %dx%d", mDefaultWidth, mDefaultHeight, w, h); return BAD_VALUE; } @@ -284,7 +284,7 @@ status_t SurfaceMediaSource::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h, // than allowed. const int avail = mBufferCount - (dequeuedCount+1); if (avail < (MIN_UNDEQUEUED_BUFFERS-int(mSynchronousMode))) { - LOGE("dequeueBuffer: MIN_UNDEQUEUED_BUFFERS=%d exceeded (dequeued=%d)", + ALOGE("dequeueBuffer: MIN_UNDEQUEUED_BUFFERS=%d exceeded (dequeued=%d)", MIN_UNDEQUEUED_BUFFERS-int(mSynchronousMode), dequeuedCount); return -EBUSY; @@ -346,7 +346,7 @@ status_t SurfaceMediaSource::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h, mGraphicBufferAlloc->createGraphicBuffer( w, h, format, usage, &error)); if (graphicBuffer == 0) { - LOGE("dequeueBuffer: SurfaceComposer::createGraphicBuffer failed"); + ALOGE("dequeueBuffer: SurfaceComposer::createGraphicBuffer failed"); return error; } if (updateFormat) { @@ -363,13 +363,13 @@ status_t SurfaceMediaSource::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h, status_t SurfaceMediaSource::setSynchronousMode(bool enabled) { Mutex::Autolock lock(mMutex); if (mStopped) { - LOGE("setSynchronousMode: SurfaceMediaSource has been stopped!"); + ALOGE("setSynchronousMode: SurfaceMediaSource has been stopped!"); return NO_INIT; } if (!enabled) { // Async mode is not allowed - LOGE("SurfaceMediaSource can be used only synchronous mode!"); + ALOGE("SurfaceMediaSource can be used only synchronous mode!"); return INVALID_OPERATION; } @@ -390,7 +390,7 @@ status_t SurfaceMediaSource::connect(int api, Mutex::Autolock lock(mMutex); if (mStopped) { - LOGE("Connect: SurfaceMediaSource has been stopped!"); + ALOGE("Connect: SurfaceMediaSource has been stopped!"); return NO_INIT; } @@ -431,7 +431,7 @@ status_t SurfaceMediaSource::disconnect(int api) { Mutex::Autolock lock(mMutex); if (mStopped) { - LOGE("disconnect: SurfaceMediaSoource is already stopped!"); + ALOGE("disconnect: SurfaceMediaSoource is already stopped!"); return NO_INIT; } @@ -467,15 +467,15 @@ status_t SurfaceMediaSource::queueBuffer(int bufIndex, int64_t timestamp, *outTransform = 0; if (bufIndex < 0 || bufIndex >= mBufferCount) { - LOGE("queueBuffer: slot index out of range [0, %d]: %d", + ALOGE("queueBuffer: slot index out of range [0, %d]: %d", mBufferCount, bufIndex); return -EINVAL; } else if (mSlots[bufIndex].mBufferState != BufferSlot::DEQUEUED) { - LOGE("queueBuffer: slot %d is not owned by the client (state=%d)", + ALOGE("queueBuffer: slot %d is not owned by the client (state=%d)", bufIndex, mSlots[bufIndex].mBufferState); return -EINVAL; } else if (!mSlots[bufIndex].mRequestBufferCalled) { - LOGE("queueBuffer: slot %d was enqueued without requesting a " + ALOGE("queueBuffer: slot %d was enqueued without requesting a " "buffer", bufIndex); return -EINVAL; } @@ -561,11 +561,11 @@ void SurfaceMediaSource::cancelBuffer(int bufIndex) { ALOGV("SurfaceMediaSource::cancelBuffer"); Mutex::Autolock lock(mMutex); if (bufIndex < 0 || bufIndex >= mBufferCount) { - LOGE("cancelBuffer: slot index out of range [0, %d]: %d", + ALOGE("cancelBuffer: slot index out of range [0, %d]: %d", mBufferCount, bufIndex); return; } else if (mSlots[bufIndex].mBufferState != BufferSlot::DEQUEUED) { - LOGE("cancelBuffer: slot %d is not owned by the client (state=%d)", + ALOGE("cancelBuffer: slot %d is not owned by the client (state=%d)", bufIndex, mSlots[bufIndex].mBufferState); return; } @@ -814,7 +814,7 @@ void SurfaceMediaSource::passMetadataBufferLocked(MediaBuffer **buffer) { new MediaBuffer(4 + sizeof(buffer_handle_t)); char *data = (char *)tempBuffer->data(); if (data == NULL) { - LOGE("Cannot allocate memory for metadata buffer!"); + ALOGE("Cannot allocate memory for metadata buffer!"); return; } OMX_U32 type = kMetadataBufferTypeGrallocSource; diff --git a/media/libstagefright/WVMExtractor.cpp b/media/libstagefright/WVMExtractor.cpp index 26eda0c..2092cb6 100644 --- a/media/libstagefright/WVMExtractor.cpp +++ b/media/libstagefright/WVMExtractor.cpp @@ -53,7 +53,7 @@ WVMExtractor::WVMExtractor(const sp<DataSource> &source) } if (gVendorLibHandle == NULL) { - LOGE("Failed to open libwvm.so"); + ALOGE("Failed to open libwvm.so"); return; } } @@ -67,7 +67,7 @@ WVMExtractor::WVMExtractor(const sp<DataSource> &source) mImpl = (*getInstanceFunc)(source); CHECK(mImpl != NULL); } else { - LOGE("Failed to locate GetInstance in libwvm.so"); + ALOGE("Failed to locate GetInstance in libwvm.so"); } } diff --git a/media/libstagefright/codecs/aacdec/SoftAAC.cpp b/media/libstagefright/codecs/aacdec/SoftAAC.cpp index f3283a4..da9d280 100644 --- a/media/libstagefright/codecs/aacdec/SoftAAC.cpp +++ b/media/libstagefright/codecs/aacdec/SoftAAC.cpp @@ -116,7 +116,7 @@ status_t SoftAAC::initDecoder() { Int err = PVMP4AudioDecoderInitLibrary(mConfig, mDecoderBuf); if (err != MP4AUDEC_SUCCESS) { - LOGE("Failed to initialize MP4 audio decoder"); + ALOGE("Failed to initialize MP4 audio decoder"); return UNKNOWN_ERROR; } diff --git a/media/libstagefright/codecs/aacenc/AACEncoder.cpp b/media/libstagefright/codecs/aacenc/AACEncoder.cpp index a94ccab..2b8633d 100644 --- a/media/libstagefright/codecs/aacenc/AACEncoder.cpp +++ b/media/libstagefright/codecs/aacenc/AACEncoder.cpp @@ -53,7 +53,7 @@ status_t AACEncoder::initCheck() { CHECK(mApiHandle); if (VO_ERR_NONE != voGetAACEncAPI(mApiHandle)) { - LOGE("Failed to get api handle"); + ALOGE("Failed to get api handle"); return UNKNOWN_ERROR; } @@ -70,11 +70,11 @@ status_t AACEncoder::initCheck() { userData.memflag = VO_IMF_USERMEMOPERATOR; userData.memData = (VO_PTR) mMemOperator; if (VO_ERR_NONE != mApiHandle->Init(&mEncoderHandle, VO_AUDIO_CodingAAC, &userData)) { - LOGE("Failed to init AAC encoder"); + ALOGE("Failed to init AAC encoder"); return UNKNOWN_ERROR; } if (OK != setAudioSpecificConfigData()) { - LOGE("Failed to configure AAC encoder"); + ALOGE("Failed to configure AAC encoder"); return UNKNOWN_ERROR; } @@ -86,7 +86,7 @@ status_t AACEncoder::initCheck() { params.nChannels = mChannels; params.adtsUsed = 0; // We add adts header in the file writer if needed. if (VO_ERR_NONE != mApiHandle->SetParam(mEncoderHandle, VO_PID_AAC_ENCPARAM, ¶ms)) { - LOGE("Failed to set AAC encoder parameters"); + ALOGE("Failed to set AAC encoder parameters"); return UNKNOWN_ERROR; } @@ -106,7 +106,7 @@ static status_t getSampleRateTableIndex(int32_t sampleRate, int32_t &index) { } } - LOGE("Sampling rate %d bps is not supported", sampleRate); + ALOGE("Sampling rate %d bps is not supported", sampleRate); return UNKNOWN_ERROR; } @@ -117,7 +117,7 @@ status_t AACEncoder::setAudioSpecificConfigData() { int32_t index; CHECK_EQ(OK, getSampleRateTableIndex(mSampleRate, index)); if (mChannels > 2 || mChannels <= 0) { - LOGE("Unsupported number of channels(%d)", mChannels); + ALOGE("Unsupported number of channels(%d)", mChannels); return UNKNOWN_ERROR; } @@ -153,7 +153,7 @@ status_t AACEncoder::start(MetaData *params) { status_t err = mSource->start(params); if (err != OK) { - LOGE("AudioSource is not available"); + ALOGE("AudioSource is not available"); return err; } diff --git a/media/libstagefright/codecs/amrnb/dec/SoftAMR.cpp b/media/libstagefright/codecs/amrnb/dec/SoftAMR.cpp index c0a588f..7602f2d 100644 --- a/media/libstagefright/codecs/amrnb/dec/SoftAMR.cpp +++ b/media/libstagefright/codecs/amrnb/dec/SoftAMR.cpp @@ -304,7 +304,7 @@ void SoftAMR::onQueueFilled(OMX_U32 portIndex) { MIME_IETF); if (numBytesRead == -1) { - LOGE("PV AMR decoder AMRDecode() call failed"); + ALOGE("PV AMR decoder AMRDecode() call failed"); notify(OMX_EventError, OMX_ErrorUndefined, 0, NULL); mSignalledError = true; diff --git a/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp b/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp index 2f158b6..3afbc4f 100644 --- a/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp +++ b/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp @@ -84,7 +84,7 @@ status_t AMRNBEncoder::start(MetaData *params) { status_t err = mSource->start(params); if (err != OK) { - LOGE("AudioSource is not available"); + ALOGE("AudioSource is not available"); return err; } diff --git a/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp b/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp index ebc2e5d..60b1163 100644 --- a/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp +++ b/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp @@ -80,7 +80,7 @@ status_t AMRWBEncoder::initCheck() { CHECK(mApiHandle); if (VO_ERR_NONE != voGetAMRWBEncAPI(mApiHandle)) { - LOGE("Failed to get api handle"); + ALOGE("Failed to get api handle"); return UNKNOWN_ERROR; } @@ -97,20 +97,20 @@ status_t AMRWBEncoder::initCheck() { userData.memflag = VO_IMF_USERMEMOPERATOR; userData.memData = (VO_PTR) mMemOperator; if (VO_ERR_NONE != mApiHandle->Init(&mEncoderHandle, VO_AUDIO_CodingAMRWB, &userData)) { - LOGE("Failed to init AMRWB encoder"); + ALOGE("Failed to init AMRWB encoder"); return UNKNOWN_ERROR; } // Configure AMRWB encoder$ VOAMRWBMODE mode = pickModeFromBitRate(mBitRate); if (VO_ERR_NONE != mApiHandle->SetParam(mEncoderHandle, VO_PID_AMRWB_MODE, &mode)) { - LOGE("Failed to set AMRWB encoder mode to %d", mode); + ALOGE("Failed to set AMRWB encoder mode to %d", mode); return UNKNOWN_ERROR; } VOAMRWBFRAMETYPE type = VOAMRWB_RFC3267; if (VO_ERR_NONE != mApiHandle->SetParam(mEncoderHandle, VO_PID_AMRWB_FRAMETYPE, &type)) { - LOGE("Failed to set AMRWB encoder frame type to %d", type); + ALOGE("Failed to set AMRWB encoder frame type to %d", type); return UNKNOWN_ERROR; } @@ -140,7 +140,7 @@ status_t AMRWBEncoder::start(MetaData *params) { status_t err = mSource->start(params); if (err != OK) { - LOGE("AudioSource is not available"); + ALOGE("AudioSource is not available"); return err; } mStarted = true; diff --git a/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp b/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp index 40f6f1a..e202a2b 100644 --- a/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp +++ b/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp @@ -41,7 +41,7 @@ static status_t ConvertOmxAvcProfileToAvcSpecProfile( *pvProfile = AVC_BASELINE; return OK; default: - LOGE("Unsupported omx profile: %d", omxProfile); + ALOGE("Unsupported omx profile: %d", omxProfile); } return BAD_VALUE; } @@ -100,7 +100,7 @@ static status_t ConvertOmxAvcLevelToAvcSpecLevel( level = AVC_LEVEL5_1; break; default: - LOGE("Unknown omx level: %d", omxLevel); + ALOGE("Unknown omx level: %d", omxLevel); return BAD_VALUE; } *pvLevel = level; @@ -214,7 +214,7 @@ status_t AVCEncoder::initCheck(const sp<MetaData>& meta) { CHECK(meta->findInt32(kKeyColorFormat, &mVideoColorFormat)); if (mVideoColorFormat != OMX_COLOR_FormatYUV420Planar) { if (mVideoColorFormat != OMX_COLOR_FormatYUV420SemiPlanar) { - LOGE("Color format %d is not supported", mVideoColorFormat); + ALOGE("Color format %d is not supported", mVideoColorFormat); return BAD_VALUE; } // Allocate spare buffer only when color conversion is needed. @@ -226,7 +226,7 @@ status_t AVCEncoder::initCheck(const sp<MetaData>& meta) { // XXX: Remove this restriction if (mVideoWidth % 16 != 0 || mVideoHeight % 16 != 0) { - LOGE("Video frame size %dx%d must be a multiple of 16", + ALOGE("Video frame size %dx%d must be a multiple of 16", mVideoWidth, mVideoHeight); return BAD_VALUE; } @@ -343,7 +343,7 @@ status_t AVCEncoder::start(MetaData *params) { AVCEnc_Status err; err = PVAVCEncInitialize(mHandle, mEncParams, NULL, NULL); if (err != AVCENC_SUCCESS) { - LOGE("Failed to initialize the encoder: %d", err); + ALOGE("Failed to initialize the encoder: %d", err); return UNKNOWN_ERROR; } @@ -461,7 +461,7 @@ status_t AVCEncoder::read( *out = outputBuffer; return OK; default: - LOGE("Nal type (%d) other than SPS/PPS is unexpected", type); + ALOGE("Nal type (%d) other than SPS/PPS is unexpected", type); return UNKNOWN_ERROR; } } @@ -476,7 +476,7 @@ status_t AVCEncoder::read( status_t err = mSource->read(&mInputBuffer, options); if (err != OK) { if (err != ERROR_END_OF_STREAM) { - LOGE("Failed to read input video frame: %d", err); + ALOGE("Failed to read input video frame: %d", err); } outputBuffer->release(); return err; diff --git a/media/libstagefright/codecs/g711/dec/SoftG711.cpp b/media/libstagefright/codecs/g711/dec/SoftG711.cpp index 15e2c26..32ef003 100644 --- a/media/libstagefright/codecs/g711/dec/SoftG711.cpp +++ b/media/libstagefright/codecs/g711/dec/SoftG711.cpp @@ -210,7 +210,7 @@ void SoftG711::onQueueFilled(OMX_U32 portIndex) { } if (inHeader->nFilledLen > kMaxNumSamplesPerFrame) { - LOGE("input buffer too large (%ld).", inHeader->nFilledLen); + ALOGE("input buffer too large (%ld).", inHeader->nFilledLen); notify(OMX_EventError, OMX_ErrorUndefined, 0, NULL); mSignalledError = true; diff --git a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp index be669f2..a34a0ca 100644 --- a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp +++ b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp @@ -207,7 +207,7 @@ OMX_ERRORTYPE SoftMPEG4::internalGetParameter( (OMX_VIDEO_PARAM_PROFILELEVELTYPE *) params; if (profileLevel->nPortIndex != 0) { // Input port only - LOGE("Invalid port index: %ld", profileLevel->nPortIndex); + ALOGE("Invalid port index: %ld", profileLevel->nPortIndex); return OMX_ErrorUnsupportedIndex; } @@ -430,7 +430,7 @@ void SoftMPEG4::onQueueFilled(OMX_U32 portIndex) { mHandle, &bitstream, ×tamp, &tmp, &useExtTimestamp, outHeader->pBuffer) != PV_TRUE) { - LOGE("failed to decode video frame."); + ALOGE("failed to decode video frame."); notify(OMX_EventError, OMX_ErrorUndefined, 0, NULL); mSignalledError = true; diff --git a/media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp b/media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp index 2c4b63d..d538603 100644 --- a/media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp +++ b/media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp @@ -43,7 +43,7 @@ static status_t ConvertOmxProfileLevel( switch (omxProfile) { case OMX_VIDEO_H263ProfileBaseline: if (omxLevel > OMX_VIDEO_H263Level45) { - LOGE("Unsupported level (%d) for H263", omxLevel); + ALOGE("Unsupported level (%d) for H263", omxLevel); return BAD_VALUE; } else { ALOGW("PV does not support level configuration for H263"); @@ -52,7 +52,7 @@ static status_t ConvertOmxProfileLevel( } break; default: - LOGE("Unsupported profile (%d) for H263", omxProfile); + ALOGE("Unsupported profile (%d) for H263", omxProfile); return BAD_VALUE; } } else { // MPEG4 @@ -72,7 +72,7 @@ static status_t ConvertOmxProfileLevel( profileLevel = SIMPLE_PROFILE_LEVEL3; break; default: - LOGE("Unsupported level (%d) for MPEG4 simple profile", + ALOGE("Unsupported level (%d) for MPEG4 simple profile", omxLevel); return BAD_VALUE; } @@ -89,7 +89,7 @@ static status_t ConvertOmxProfileLevel( profileLevel = SIMPLE_SCALABLE_PROFILE_LEVEL2; break; default: - LOGE("Unsupported level (%d) for MPEG4 simple " + ALOGE("Unsupported level (%d) for MPEG4 simple " "scalable profile", omxLevel); return BAD_VALUE; } @@ -103,7 +103,7 @@ static status_t ConvertOmxProfileLevel( profileLevel = CORE_PROFILE_LEVEL2; break; default: - LOGE("Unsupported level (%d) for MPEG4 core " + ALOGE("Unsupported level (%d) for MPEG4 core " "profile", omxLevel); return BAD_VALUE; } @@ -120,13 +120,13 @@ static status_t ConvertOmxProfileLevel( profileLevel = CORE_SCALABLE_PROFILE_LEVEL3; break; default: - LOGE("Unsupported level (%d) for MPEG4 core " + ALOGE("Unsupported level (%d) for MPEG4 core " "scalable profile", omxLevel); return BAD_VALUE; } break; default: - LOGE("Unsupported MPEG4 profile (%d)", omxProfile); + ALOGE("Unsupported MPEG4 profile (%d)", omxProfile); return BAD_VALUE; } } @@ -207,7 +207,7 @@ status_t M4vH263Encoder::initCheck(const sp<MetaData>& meta) { CHECK(meta->findInt32(kKeyColorFormat, &mVideoColorFormat)); if (mVideoColorFormat != OMX_COLOR_FormatYUV420Planar) { if (mVideoColorFormat != OMX_COLOR_FormatYUV420SemiPlanar) { - LOGE("Color format %d is not supported", mVideoColorFormat); + ALOGE("Color format %d is not supported", mVideoColorFormat); return BAD_VALUE; } // Allocate spare buffer only when color conversion is needed. @@ -219,7 +219,7 @@ status_t M4vH263Encoder::initCheck(const sp<MetaData>& meta) { // XXX: Remove this restriction if (mVideoWidth % 16 != 0 || mVideoHeight % 16 != 0) { - LOGE("Video frame size %dx%d must be a multiple of 16", + ALOGE("Video frame size %dx%d must be a multiple of 16", mVideoWidth, mVideoHeight); return BAD_VALUE; } @@ -227,7 +227,7 @@ status_t M4vH263Encoder::initCheck(const sp<MetaData>& meta) { mEncParams = new tagvideoEncOptions; memset(mEncParams, 0, sizeof(tagvideoEncOptions)); if (!PVGetDefaultEncOption(mEncParams, 0)) { - LOGE("Failed to get default encoding parameters"); + ALOGE("Failed to get default encoding parameters"); return BAD_VALUE; } @@ -319,7 +319,7 @@ status_t M4vH263Encoder::start(MetaData *params) { } if (!PVInitVideoEncoder(mHandle, mEncParams)) { - LOGE("Failed to initialize the encoder"); + ALOGE("Failed to initialize the encoder"); return UNKNOWN_ERROR; } @@ -386,7 +386,7 @@ status_t M4vH263Encoder::read( // Output codec specific data if (mNumInputFrames < 0) { if (!PVGetVolHeader(mHandle, outPtr, &dataLength, 0)) { - LOGE("Failed to get VOL header"); + ALOGE("Failed to get VOL header"); return UNKNOWN_ERROR; } ALOGV("Output VOL header: %d bytes", dataLength); @@ -401,7 +401,7 @@ status_t M4vH263Encoder::read( status_t err = mSource->read(&mInputBuffer, options); if (OK != err) { if (err != ERROR_END_OF_STREAM) { - LOGE("Failed to read from data source"); + ALOGE("Failed to read from data source"); } outputBuffer->release(); return err; @@ -460,7 +460,7 @@ status_t M4vH263Encoder::read( if (!PVEncodeVideoFrame(mHandle, &vin, &vout, &modTimeMs, outPtr, &dataLength, &nLayer) || !PVGetHintTrack(mHandle, &hintTrack)) { - LOGE("Failed to encode frame or get hink track at frame %lld", + ALOGE("Failed to encode frame or get hink track at frame %lld", mNumInputFrames); outputBuffer->release(); mInputBuffer->release(); diff --git a/media/libstagefright/codecs/mp3dec/SoftMP3.cpp b/media/libstagefright/codecs/mp3dec/SoftMP3.cpp index 43fb30a..ad55295 100644 --- a/media/libstagefright/codecs/mp3dec/SoftMP3.cpp +++ b/media/libstagefright/codecs/mp3dec/SoftMP3.cpp @@ -223,10 +223,10 @@ void SoftMP3::onQueueFilled(OMX_U32 portIndex) { if (decoderErr != NO_ENOUGH_MAIN_DATA_ERROR || mConfig->outputFrameSize == 0) { - LOGE("mp3 decoder returned error %d", decoderErr); + ALOGE("mp3 decoder returned error %d", decoderErr); if (mConfig->outputFrameSize == 0) { - LOGE("Output frame size is 0"); + ALOGE("Output frame size is 0"); } notify(OMX_EventError, OMX_ErrorUndefined, decoderErr, NULL); diff --git a/media/libstagefright/codecs/on2/dec/SoftVPX.cpp b/media/libstagefright/codecs/on2/dec/SoftVPX.cpp index c5fe199..bf9ab3a 100644 --- a/media/libstagefright/codecs/on2/dec/SoftVPX.cpp +++ b/media/libstagefright/codecs/on2/dec/SoftVPX.cpp @@ -138,7 +138,7 @@ status_t SoftVPX::initDecoder() { cfg.threads = GetCPUCoreCount(); if ((vpx_err = vpx_codec_dec_init( (vpx_codec_ctx_t *)mCtx, &vpx_codec_vp8_dx_algo, &cfg, 0))) { - LOGE("on2 decoder failed to initialize. (%d)", vpx_err); + ALOGE("on2 decoder failed to initialize. (%d)", vpx_err); return UNKNOWN_ERROR; } @@ -254,7 +254,7 @@ void SoftVPX::onQueueFilled(OMX_U32 portIndex) { inHeader->nFilledLen, NULL, 0)) { - LOGE("on2 decoder failed to decode frame."); + ALOGE("on2 decoder failed to decode frame."); notify(OMX_EventError, OMX_ErrorUndefined, 0, NULL); return; diff --git a/media/libstagefright/codecs/on2/h264dec/SoftAVC.cpp b/media/libstagefright/codecs/on2/h264dec/SoftAVC.cpp index dede3ac..6c3f834 100644 --- a/media/libstagefright/codecs/on2/h264dec/SoftAVC.cpp +++ b/media/libstagefright/codecs/on2/h264dec/SoftAVC.cpp @@ -204,7 +204,7 @@ OMX_ERRORTYPE SoftAVC::internalGetParameter( (OMX_VIDEO_PARAM_PROFILELEVELTYPE *) params; if (profileLevel->nPortIndex != kInputPortIndex) { - LOGE("Invalid port index: %ld", profileLevel->nPortIndex); + ALOGE("Invalid port index: %ld", profileLevel->nPortIndex); return OMX_ErrorUnsupportedIndex; } @@ -371,7 +371,7 @@ void SoftAVC::onQueueFilled(OMX_U32 portIndex) { } inPicture.dataLen = 0; if (ret < 0) { - LOGE("Decoder failed: %d", ret); + ALOGE("Decoder failed: %d", ret); notify(OMX_EventError, OMX_ErrorUndefined, ERROR_MALFORMED, NULL); diff --git a/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp b/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp index 74e893f..ac88107 100644 --- a/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp +++ b/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp @@ -360,7 +360,7 @@ void SoftVorbis::onQueueFilled(OMX_U32 portIndex) { kMaxNumSamplesPerBuffer); if (numFrames < 0) { - LOGE("vorbis_dsp_pcmout returned %d", numFrames); + ALOGE("vorbis_dsp_pcmout returned %d", numFrames); numFrames = 0; } } diff --git a/media/libstagefright/foundation/AMessage.cpp b/media/libstagefright/foundation/AMessage.cpp index f039bc1..0a6776e 100644 --- a/media/libstagefright/foundation/AMessage.cpp +++ b/media/libstagefright/foundation/AMessage.cpp @@ -471,7 +471,7 @@ sp<AMessage> AMessage::FromParcel(const Parcel &parcel) { default: { - LOGE("This type of object cannot cross process boundaries."); + ALOGE("This type of object cannot cross process boundaries."); TRESPASS(); } } @@ -535,7 +535,7 @@ void AMessage::writeToParcel(Parcel *parcel) const { default: { - LOGE("This type of object cannot cross process boundaries."); + ALOGE("This type of object cannot cross process boundaries."); TRESPASS(); } } diff --git a/media/libstagefright/httplive/LiveDataSource.cpp b/media/libstagefright/httplive/LiveDataSource.cpp index 5f5c6d4..7560642 100644 --- a/media/libstagefright/httplive/LiveDataSource.cpp +++ b/media/libstagefright/httplive/LiveDataSource.cpp @@ -59,7 +59,7 @@ ssize_t LiveDataSource::readAtNonBlocking( Mutex::Autolock autoLock(mLock); if (offset != mOffset) { - LOGE("Attempt at reading non-sequentially from LiveDataSource."); + ALOGE("Attempt at reading non-sequentially from LiveDataSource."); return -EPIPE; } @@ -89,7 +89,7 @@ ssize_t LiveDataSource::readAt(off64_t offset, void *data, size_t size) { ssize_t LiveDataSource::readAt_l(off64_t offset, void *data, size_t size) { if (offset != mOffset) { - LOGE("Attempt at reading non-sequentially from LiveDataSource."); + ALOGE("Attempt at reading non-sequentially from LiveDataSource."); return -EPIPE; } diff --git a/media/libstagefright/httplive/LiveSession.cpp b/media/libstagefright/httplive/LiveSession.cpp index ee76bcd..0cddd2e 100644 --- a/media/libstagefright/httplive/LiveSession.cpp +++ b/media/libstagefright/httplive/LiveSession.cpp @@ -179,7 +179,7 @@ void LiveSession::onConnect(const sp<AMessage> &msg) { sp<M3UParser> playlist = fetchPlaylist(url.c_str(), &dummy); if (playlist == NULL) { - LOGE("unable to fetch master playlist '%s'.", url.c_str()); + ALOGE("unable to fetch master playlist '%s'.", url.c_str()); mDataSource->queueEOS(ERROR_IO); return; @@ -360,7 +360,7 @@ sp<M3UParser> LiveSession::fetchPlaylist(const char *url, bool *unchanged) { new M3UParser(url, buffer->data(), buffer->size()); if (playlist->initCheck() != OK) { - LOGE("failed to parse .m3u8 playlist"); + ALOGE("failed to parse .m3u8 playlist"); return NULL; } @@ -531,7 +531,7 @@ rinse_repeat: // We succeeded in fetching the playlist, but it was // unchanged from the last time we tried. } else { - LOGE("failed to load playlist at url '%s'", url.c_str()); + ALOGE("failed to load playlist at url '%s'", url.c_str()); mDataSource->queueEOS(ERROR_IO); return; } @@ -659,7 +659,7 @@ rinse_repeat: // fall through } else { - LOGE("Cannot find sequence number %d in playlist " + ALOGE("Cannot find sequence number %d in playlist " "(contains %d - %d)", mSeqNumber, firstSeqNumberInPlaylist, firstSeqNumberInPlaylist + mPlaylist->size() - 1); @@ -693,7 +693,7 @@ rinse_repeat: sp<ABuffer> buffer; status_t err = fetchFile(uri.c_str(), &buffer, range_offset, range_length); if (err != OK) { - LOGE("failed to fetch .ts segment at url '%s'", uri.c_str()); + ALOGE("failed to fetch .ts segment at url '%s'", uri.c_str()); mDataSource->queueEOS(err); return; } @@ -703,7 +703,7 @@ rinse_repeat: err = decryptBuffer(mSeqNumber - firstSeqNumberInPlaylist, buffer); if (err != OK) { - LOGE("decryptBuffer failed w/ error %d", err); + ALOGE("decryptBuffer failed w/ error %d", err); mDataSource->queueEOS(err); return; @@ -712,7 +712,7 @@ rinse_repeat: if (buffer->size() == 0 || buffer->data()[0] != 0x47) { // Not a transport stream??? - LOGE("This doesn't look like a transport stream..."); + ALOGE("This doesn't look like a transport stream..."); mBandwidthItems.removeAt(bandwidthIndex); @@ -796,13 +796,13 @@ status_t LiveSession::decryptBuffer( if (method == "NONE") { return OK; } else if (!(method == "AES-128")) { - LOGE("Unsupported cipher method '%s'", method.c_str()); + ALOGE("Unsupported cipher method '%s'", method.c_str()); return ERROR_UNSUPPORTED; } AString keyURI; if (!itemMeta->findString("cipher-uri", &keyURI)) { - LOGE("Missing key uri"); + ALOGE("Missing key uri"); return ERROR_MALFORMED; } @@ -844,7 +844,7 @@ status_t LiveSession::decryptBuffer( } if (err != OK) { - LOGE("failed to fetch cipher key from '%s'.", keyURI.c_str()); + ALOGE("failed to fetch cipher key from '%s'.", keyURI.c_str()); return ERROR_IO; } @@ -853,7 +853,7 @@ status_t LiveSession::decryptBuffer( AES_KEY aes_key; if (AES_set_decrypt_key(key->data(), 128, &aes_key) != 0) { - LOGE("failed to set AES decryption key."); + ALOGE("failed to set AES decryption key."); return UNKNOWN_ERROR; } @@ -863,7 +863,7 @@ status_t LiveSession::decryptBuffer( if (itemMeta->findString("cipher-iv", &iv)) { if ((!iv.startsWith("0x") && !iv.startsWith("0X")) || iv.size() != 16 * 2 + 2) { - LOGE("malformed cipher IV '%s'.", iv.c_str()); + ALOGE("malformed cipher IV '%s'.", iv.c_str()); return ERROR_MALFORMED; } @@ -872,7 +872,7 @@ status_t LiveSession::decryptBuffer( char c1 = tolower(iv.c_str()[2 + 2 * i]); char c2 = tolower(iv.c_str()[3 + 2 * i]); if (!isxdigit(c1) || !isxdigit(c2)) { - LOGE("malformed cipher IV '%s'.", iv.c_str()); + ALOGE("malformed cipher IV '%s'.", iv.c_str()); return ERROR_MALFORMED; } uint8_t nibble1 = isdigit(c1) ? c1 - '0' : c1 - 'a' + 10; diff --git a/media/libstagefright/httplive/M3UParser.cpp b/media/libstagefright/httplive/M3UParser.cpp index f7bbc3e..7d3cf05 100644 --- a/media/libstagefright/httplive/M3UParser.cpp +++ b/media/libstagefright/httplive/M3UParser.cpp @@ -451,7 +451,7 @@ status_t M3UParser::parseCipherInfo( if (MakeURL(baseURI.c_str(), val.c_str(), &absURI)) { val = absURI; } else { - LOGE("failed to make absolute url for '%s'.", + ALOGE("failed to make absolute url for '%s'.", val.c_str()); } } diff --git a/media/libstagefright/id3/ID3.cpp b/media/libstagefright/id3/ID3.cpp index 943a937..6dde9d8 100644 --- a/media/libstagefright/id3/ID3.cpp +++ b/media/libstagefright/id3/ID3.cpp @@ -129,7 +129,7 @@ struct id3_header { } if (size > kMaxMetadataSize) { - LOGE("skipping huge ID3 metadata of size %d", size); + ALOGE("skipping huge ID3 metadata of size %d", size); return false; } diff --git a/media/libstagefright/matroska/MatroskaExtractor.cpp b/media/libstagefright/matroska/MatroskaExtractor.cpp index f215f52..4fbf47e 100644 --- a/media/libstagefright/matroska/MatroskaExtractor.cpp +++ b/media/libstagefright/matroska/MatroskaExtractor.cpp @@ -245,7 +245,7 @@ void BlockIterator::advance_l() { if (res < 0) { // I/O error - LOGE("Cluster::Parse returned result %ld", res); + ALOGE("Cluster::Parse returned result %ld", res); mCluster = NULL; break; diff --git a/media/libstagefright/mpeg2ts/ATSParser.cpp b/media/libstagefright/mpeg2ts/ATSParser.cpp index 576693a..3f4de1f 100644 --- a/media/libstagefright/mpeg2ts/ATSParser.cpp +++ b/media/libstagefright/mpeg2ts/ATSParser.cpp @@ -697,7 +697,7 @@ status_t ATSParser::Stream::parsePES(ABitReader *br) { PES_packet_length - 3 - PES_header_data_length; if (br->numBitsLeft() < dataLength * 8) { - LOGE("PES packet does not carry enough data to contain " + ALOGE("PES packet does not carry enough data to contain " "payload. (numBitsLeft = %d, required = %d)", br->numBitsLeft(), dataLength * 8); diff --git a/media/libstagefright/mpeg2ts/MPEG2PSExtractor.cpp b/media/libstagefright/mpeg2ts/MPEG2PSExtractor.cpp index 727c931..dd714c9 100644 --- a/media/libstagefright/mpeg2ts/MPEG2PSExtractor.cpp +++ b/media/libstagefright/mpeg2ts/MPEG2PSExtractor.cpp @@ -471,7 +471,7 @@ ssize_t MPEG2PSExtractor::dequeuePES() { PES_packet_length - 3 - PES_header_data_length; if (br.numBitsLeft() < dataLength * 8) { - LOGE("PES packet does not carry enough data to contain " + ALOGE("PES packet does not carry enough data to contain " "payload. (numBitsLeft = %d, required = %d)", br.numBitsLeft(), dataLength * 8); diff --git a/media/libstagefright/omx/OMXMaster.cpp b/media/libstagefright/omx/OMXMaster.cpp index c8278ab..d698939 100644 --- a/media/libstagefright/omx/OMXMaster.cpp +++ b/media/libstagefright/omx/OMXMaster.cpp @@ -81,7 +81,7 @@ void OMXMaster::addPlugin(OMXPluginBase *plugin) { String8 name8(name); if (mPluginByComponentName.indexOfKey(name8) >= 0) { - LOGE("A component of name '%s' already exists, ignoring this one.", + ALOGE("A component of name '%s' already exists, ignoring this one.", name8.string()); continue; @@ -91,7 +91,7 @@ void OMXMaster::addPlugin(OMXPluginBase *plugin) { } if (err != OMX_ErrorNoMore) { - LOGE("OMX plugin failed w/ error 0x%08x after registering %d " + ALOGE("OMX plugin failed w/ error 0x%08x after registering %d " "components", err, mPluginByComponentName.size()); } } diff --git a/media/libstagefright/omx/OMXNodeInstance.cpp b/media/libstagefright/omx/OMXNodeInstance.cpp index 31b1a2f..8938e33 100644 --- a/media/libstagefright/omx/OMXNodeInstance.cpp +++ b/media/libstagefright/omx/OMXNodeInstance.cpp @@ -150,7 +150,7 @@ status_t OMXNodeInstance::freeNode(OMXMaster *master) { && state != OMX_StateIdle && state != OMX_StateInvalid) { if (++iteration > kMaxNumIterations) { - LOGE("component failed to enter Idle state, aborting."); + ALOGE("component failed to enter Idle state, aborting."); state = OMX_StateInvalid; break; } @@ -179,7 +179,7 @@ status_t OMXNodeInstance::freeNode(OMXMaster *master) { && state != OMX_StateLoaded && state != OMX_StateInvalid) { if (++iteration > kMaxNumIterations) { - LOGE("component failed to enter Loaded state, aborting."); + ALOGE("component failed to enter Loaded state, aborting."); state = OMX_StateInvalid; break; } @@ -209,7 +209,7 @@ status_t OMXNodeInstance::freeNode(OMXMaster *master) { mHandle = NULL; if (err != OMX_ErrorNone) { - LOGE("FreeHandle FAILED with error 0x%08x.", err); + ALOGE("FreeHandle FAILED with error 0x%08x.", err); } mOwner->invalidateNodeID(mNodeID); @@ -285,7 +285,7 @@ status_t OMXNodeInstance::enableGraphicBuffers( &index); if (err != OMX_ErrorNone) { - LOGE("OMX_GetExtensionIndex failed"); + ALOGE("OMX_GetExtensionIndex failed"); return StatusFromOMXError(err); } @@ -302,7 +302,7 @@ status_t OMXNodeInstance::enableGraphicBuffers( err = OMX_SetParameter(mHandle, index, ¶ms); if (err != OMX_ErrorNone) { - LOGE("OMX_EnableAndroidNativeBuffers failed with error %d (0x%08x)", + ALOGE("OMX_EnableAndroidNativeBuffers failed with error %d (0x%08x)", err, err); return UNKNOWN_ERROR; @@ -323,7 +323,7 @@ status_t OMXNodeInstance::getGraphicBufferUsage( &index); if (err != OMX_ErrorNone) { - LOGE("OMX_GetExtensionIndex failed"); + ALOGE("OMX_GetExtensionIndex failed"); return StatusFromOMXError(err); } @@ -340,7 +340,7 @@ status_t OMXNodeInstance::getGraphicBufferUsage( err = OMX_GetParameter(mHandle, index, ¶ms); if (err != OMX_ErrorNone) { - LOGE("OMX_GetAndroidNativeBufferUsage failed with error %d (0x%08x)", + ALOGE("OMX_GetAndroidNativeBufferUsage failed with error %d (0x%08x)", err, err); return UNKNOWN_ERROR; } @@ -361,7 +361,7 @@ status_t OMXNodeInstance::storeMetaDataInBuffers( OMX_ERRORTYPE err = OMX_GetExtensionIndex(mHandle, name, &index); if (err != OMX_ErrorNone) { - LOGE("OMX_GetExtensionIndex %s failed", name); + ALOGE("OMX_GetExtensionIndex %s failed", name); return StatusFromOMXError(err); } @@ -375,7 +375,7 @@ status_t OMXNodeInstance::storeMetaDataInBuffers( params.nPortIndex = portIndex; params.bStoreMetaData = enable; if ((err = OMX_SetParameter(mHandle, index, ¶ms)) != OMX_ErrorNone) { - LOGE("OMX_SetParameter() failed for StoreMetaDataInBuffers: 0x%08x", err); + ALOGE("OMX_SetParameter() failed for StoreMetaDataInBuffers: 0x%08x", err); return UNKNOWN_ERROR; } return err; @@ -395,7 +395,7 @@ status_t OMXNodeInstance::useBuffer( params->size(), static_cast<OMX_U8 *>(params->pointer())); if (err != OMX_ErrorNone) { - LOGE("OMX_UseBuffer failed with error %d (0x%08x)", err, err); + ALOGE("OMX_UseBuffer failed with error %d (0x%08x)", err, err); delete buffer_meta; buffer_meta = NULL; @@ -429,7 +429,7 @@ status_t OMXNodeInstance::useGraphicBuffer2_l( OMX_ERRORTYPE err = OMX_GetParameter(mHandle, OMX_IndexParamPortDefinition, &def); if (err != OMX_ErrorNone) { - LOGE("%s::%d:Error getting OMX_IndexParamPortDefinition", __FUNCTION__, __LINE__); + ALOGE("%s::%d:Error getting OMX_IndexParamPortDefinition", __FUNCTION__, __LINE__); return err; } @@ -448,7 +448,7 @@ status_t OMXNodeInstance::useGraphicBuffer2_l( bufferHandle); if (err != OMX_ErrorNone) { - LOGE("OMX_UseBuffer failed with error %d (0x%08x)", err, err); + ALOGE("OMX_UseBuffer failed with error %d (0x%08x)", err, err); delete bufferMeta; bufferMeta = NULL; *buffer = 0; @@ -488,7 +488,7 @@ status_t OMXNodeInstance::useGraphicBuffer( &index); if (err != OMX_ErrorNone) { - LOGE("OMX_GetExtensionIndex failed"); + ALOGE("OMX_GetExtensionIndex failed"); return StatusFromOMXError(err); } @@ -510,7 +510,7 @@ status_t OMXNodeInstance::useGraphicBuffer( err = OMX_SetParameter(mHandle, index, ¶ms); if (err != OMX_ErrorNone) { - LOGE("OMX_UseAndroidNativeBuffer failed with error %d (0x%08x)", err, + ALOGE("OMX_UseAndroidNativeBuffer failed with error %d (0x%08x)", err, err); delete bufferMeta; @@ -543,7 +543,7 @@ status_t OMXNodeInstance::allocateBuffer( mHandle, &header, portIndex, buffer_meta, size); if (err != OMX_ErrorNone) { - LOGE("OMX_AllocateBuffer failed with error %d (0x%08x)", err, err); + ALOGE("OMX_AllocateBuffer failed with error %d (0x%08x)", err, err); delete buffer_meta; buffer_meta = NULL; @@ -576,7 +576,7 @@ status_t OMXNodeInstance::allocateBufferWithBackup( mHandle, &header, portIndex, buffer_meta, params->size()); if (err != OMX_ErrorNone) { - LOGE("OMX_AllocateBuffer failed with error %d (0x%08x)", err, err); + ALOGE("OMX_AllocateBuffer failed with error %d (0x%08x)", err, err); delete buffer_meta; buffer_meta = NULL; @@ -672,7 +672,7 @@ void OMXNodeInstance::onMessage(const omx_message &msg) { } void OMXNodeInstance::onObserverDied(OMXMaster *master) { - LOGE("!!! Observer died. Quickly, do something, ... anything..."); + ALOGE("!!! Observer died. Quickly, do something, ... anything..."); // Try to force shutdown of the node and hope for the best. freeNode(master); diff --git a/media/libstagefright/omx/SoftOMXPlugin.cpp b/media/libstagefright/omx/SoftOMXPlugin.cpp index 8aeb763..da3ae42 100644 --- a/media/libstagefright/omx/SoftOMXPlugin.cpp +++ b/media/libstagefright/omx/SoftOMXPlugin.cpp @@ -72,7 +72,7 @@ OMX_ERRORTYPE SoftOMXPlugin::makeComponentInstance( void *libHandle = dlopen(libName.c_str(), RTLD_NOW); if (libHandle == NULL) { - LOGE("unable to dlopen %s", libName.c_str()); + ALOGE("unable to dlopen %s", libName.c_str()); return OMX_ErrorComponentNotFound; } diff --git a/media/libstagefright/omx/tests/OMXHarness.cpp b/media/libstagefright/omx/tests/OMXHarness.cpp index 3a15a5e..8faf544 100644 --- a/media/libstagefright/omx/tests/OMXHarness.cpp +++ b/media/libstagefright/omx/tests/OMXHarness.cpp @@ -174,7 +174,7 @@ status_t Harness::getPortDefinition( #define EXPECT(condition, info) \ if (!(condition)) { \ - LOGE(info); printf("\n * " info "\n"); return UNKNOWN_ERROR; \ + ALOGE(info); printf("\n * " info "\n"); return UNKNOWN_ERROR; \ } #define EXPECT_SUCCESS(err, info) \ diff --git a/media/libstagefright/rtsp/ARTPSession.cpp b/media/libstagefright/rtsp/ARTPSession.cpp index 5783beb..7a05b88 100644 --- a/media/libstagefright/rtsp/ARTPSession.cpp +++ b/media/libstagefright/rtsp/ARTPSession.cpp @@ -53,24 +53,24 @@ status_t ARTPSession::setup(const sp<ASessionDescription> &desc) { if (!mDesc->findAttribute(i, "c=", &connection)) { // No per-stream connection information, try global fallback. if (!mDesc->findAttribute(0, "c=", &connection)) { - LOGE("Unable to find connection attribute."); + ALOGE("Unable to find connection attribute."); return mInitCheck; } } if (!(connection == "IN IP4 127.0.0.1")) { - LOGE("We only support localhost connections for now."); + ALOGE("We only support localhost connections for now."); return mInitCheck; } unsigned port; if (!validateMediaFormat(i, &port) || (port & 1) != 0) { - LOGE("Invalid media format."); + ALOGE("Invalid media format."); return mInitCheck; } sp<APacketSource> source = new APacketSource(mDesc, i); if (source->initCheck() != OK) { - LOGE("Unsupported format."); + ALOGE("Unsupported format."); return mInitCheck; } diff --git a/media/libstagefright/rtsp/ARTSPConnection.cpp b/media/libstagefright/rtsp/ARTSPConnection.cpp index b5d2e9f..80a010e 100644 --- a/media/libstagefright/rtsp/ARTSPConnection.cpp +++ b/media/libstagefright/rtsp/ARTSPConnection.cpp @@ -55,7 +55,7 @@ ARTSPConnection::ARTSPConnection(bool uidValid, uid_t uid) ARTSPConnection::~ARTSPConnection() { if (mSocket >= 0) { - LOGE("Connection is still open, closing the socket."); + ALOGE("Connection is still open, closing the socket."); if (mUIDValid) { HTTPBase::UnRegisterSocketUserTag(mSocket); } @@ -235,7 +235,7 @@ void ARTSPConnection::onConnect(const sp<AMessage> &msg) { // right here, since we currently have no way of asking the user // for this information. - LOGE("Malformed rtsp url %s", url.c_str()); + ALOGE("Malformed rtsp url %s", url.c_str()); reply->setInt32("result", ERROR_MALFORMED); reply->post(); @@ -250,7 +250,7 @@ void ARTSPConnection::onConnect(const sp<AMessage> &msg) { struct hostent *ent = gethostbyname(host.c_str()); if (ent == NULL) { - LOGE("Unknown host %s", host.c_str()); + ALOGE("Unknown host %s", host.c_str()); reply->setInt32("result", -ENOENT); reply->post(); @@ -376,7 +376,7 @@ void ARTSPConnection::onCompleteConnection(const sp<AMessage> &msg) { CHECK_EQ(optionLen, (socklen_t)sizeof(err)); if (err != 0) { - LOGE("err = %d (%s)", err, strerror(err)); + ALOGE("err = %d (%s)", err, strerror(err)); reply->setInt32("result", -err); @@ -446,12 +446,12 @@ void ARTSPConnection::onSendRequest(const sp<AMessage> &msg) { if (n == 0) { // Server closed the connection. - LOGE("Server unexpectedly closed the connection."); + ALOGE("Server unexpectedly closed the connection."); reply->setInt32("result", ERROR_IO); reply->post(); } else { - LOGE("Error sending rtsp request. (%s)", strerror(errno)); + ALOGE("Error sending rtsp request. (%s)", strerror(errno)); reply->setInt32("result", -errno); reply->post(); } @@ -536,10 +536,10 @@ status_t ARTSPConnection::receive(void *data, size_t size) { if (n == 0) { // Server closed the connection. - LOGE("Server unexpectedly closed the connection."); + ALOGE("Server unexpectedly closed the connection."); return ERROR_IO; } else { - LOGE("Error reading rtsp response. (%s)", strerror(errno)); + ALOGE("Error reading rtsp response. (%s)", strerror(errno)); return -errno; } } @@ -793,9 +793,9 @@ bool ARTSPConnection::handleServerRequest(const sp<ARTSPResponse> &request) { if (n <= 0) { if (n == 0) { // Server closed the connection. - LOGE("Server unexpectedly closed the connection."); + ALOGE("Server unexpectedly closed the connection."); } else { - LOGE("Error sending rtsp response (%s).", strerror(errno)); + ALOGE("Error sending rtsp response (%s).", strerror(errno)); } performDisconnect(); diff --git a/media/libstagefright/rtsp/MyHandler.h b/media/libstagefright/rtsp/MyHandler.h index cda787e..2391c5c 100644 --- a/media/libstagefright/rtsp/MyHandler.h +++ b/media/libstagefright/rtsp/MyHandler.h @@ -269,7 +269,7 @@ struct MyHandler : public AHandler { struct hostent *ent = gethostbyname(mSessionHost.c_str()); if (ent == NULL) { - LOGE("Failed to look up address of session host '%s'", + ALOGE("Failed to look up address of session host '%s'", mSessionHost.c_str()); return false; @@ -292,7 +292,7 @@ struct MyHandler : public AHandler { || rtpPort <= 0 || rtpPort > 65535 || rtcpPort <=0 || rtcpPort > 65535 || rtcpPort != rtpPort + 1) { - LOGE("Server picked invalid RTP/RTCP port pair %s," + ALOGE("Server picked invalid RTP/RTCP port pair %s," " RTP port must be even, RTCP port must be one higher.", server_port.c_str()); @@ -327,7 +327,7 @@ struct MyHandler : public AHandler { (const sockaddr *)&addr, sizeof(addr)); if (n < (ssize_t)buf->size()) { - LOGE("failed to poke a hole for RTP packets"); + ALOGE("failed to poke a hole for RTP packets"); return false; } @@ -338,7 +338,7 @@ struct MyHandler : public AHandler { (const sockaddr *)&addr, sizeof(addr)); if (n < (ssize_t)buf->size()) { - LOGE("failed to poke a hole for RTCP packets"); + ALOGE("failed to poke a hole for RTCP packets"); return false; } @@ -429,7 +429,7 @@ struct MyHandler : public AHandler { response->mContent->size()); if (!mSessionDesc->isValid()) { - LOGE("Failed to parse session description."); + ALOGE("Failed to parse session description."); result = ERROR_MALFORMED; } else { ssize_t i = response->mHeaders.indexOfKey("content-base"); @@ -988,7 +988,7 @@ struct MyHandler : public AHandler { } if (result != OK) { - LOGE("seek failed, aborting."); + ALOGE("seek failed, aborting."); (new AMessage('abor', id()))->post(); } diff --git a/media/libstagefright/rtsp/UDPPusher.cpp b/media/libstagefright/rtsp/UDPPusher.cpp index 6a4c87b..47ea6f1 100644 --- a/media/libstagefright/rtsp/UDPPusher.cpp +++ b/media/libstagefright/rtsp/UDPPusher.cpp @@ -81,7 +81,7 @@ bool UDPPusher::onPush() { sp<ABuffer> buffer = new ABuffer(length); if (fread(buffer->data(), 1, length, mFile) < length) { - LOGE("File truncated?."); + ALOGE("File truncated?."); return false; } diff --git a/media/libstagefright/rtsp/rtp_test.cpp b/media/libstagefright/rtsp/rtp_test.cpp index f0cb5a5..d43cd2a 100644 --- a/media/libstagefright/rtsp/rtp_test.cpp +++ b/media/libstagefright/rtsp/rtp_test.cpp @@ -204,7 +204,7 @@ int main(int argc, char **argv) { continue; } - LOGE("decoder returned error 0x%08x", err); + ALOGE("decoder returned error 0x%08x", err); break; } diff --git a/media/libstagefright/tests/DummyRecorder.cpp b/media/libstagefright/tests/DummyRecorder.cpp index fbb606d..ac37b28 100644 --- a/media/libstagefright/tests/DummyRecorder.cpp +++ b/media/libstagefright/tests/DummyRecorder.cpp @@ -47,7 +47,7 @@ status_t DummyRecorder::start() { pthread_attr_destroy(&attr); if (err) { - LOGE("Error creating thread!"); + ALOGE("Error creating thread!"); return -ENODEV; } return OK; diff --git a/media/libstagefright/tests/SurfaceMediaSource_test.cpp b/media/libstagefright/tests/SurfaceMediaSource_test.cpp index 6be5e9a..76b507f 100644 --- a/media/libstagefright/tests/SurfaceMediaSource_test.cpp +++ b/media/libstagefright/tests/SurfaceMediaSource_test.cpp @@ -731,7 +731,7 @@ TEST_F(SurfaceMediaSourceTest, DISABLED_EncodingFromCpuYV12BufferNpotWriteMediaS const char *fileName = "/sdcard/outputSurfEncMSource.mp4"; int fd = open(fileName, O_RDWR | O_CREAT, 0744); if (fd < 0) { - LOGE("ERROR: Could not open the the file %s, fd = %d !!", fileName, fd); + ALOGE("ERROR: Could not open the the file %s, fd = %d !!", fileName, fd); } CHECK(fd >= 0); @@ -861,7 +861,7 @@ TEST_F(SurfaceMediaSourceGLTest, EncodingFromGLRgbaSameImageEachBufNpotWrite) { const char *fileName = "/sdcard/outputSurfEncMSourceGL.mp4"; int fd = open(fileName, O_RDWR | O_CREAT, 0744); if (fd < 0) { - LOGE("ERROR: Could not open the the file %s, fd = %d !!", fileName, fd); + ALOGE("ERROR: Could not open the the file %s, fd = %d !!", fileName, fd); } CHECK(fd >= 0); @@ -904,7 +904,7 @@ TEST_F(SurfaceMediaSourceGLTest, EncodingFromGLRgbaDiffImageEachBufNpotWrite) { const char *fileName = "/sdcard/outputSurfEncMSourceGLDiff.mp4"; int fd = open(fileName, O_RDWR | O_CREAT, 0744); if (fd < 0) { - LOGE("ERROR: Could not open the the file %s, fd = %d !!", fileName, fd); + ALOGE("ERROR: Could not open the the file %s, fd = %d !!", fileName, fd); } CHECK(fd >= 0); diff --git a/media/libstagefright/timedtext/TimedTextPlayer.cpp b/media/libstagefright/timedtext/TimedTextPlayer.cpp index 7c8a747..3014b0b 100644 --- a/media/libstagefright/timedtext/TimedTextPlayer.cpp +++ b/media/libstagefright/timedtext/TimedTextPlayer.cpp @@ -91,7 +91,7 @@ status_t TimedTextPlayer::start(uint8_t index) { if (index >= mTextTrackVector.size() + mTextOutOfBandVector.size()) { - LOGE("Incorrect text track index: %d", index); + ALOGE("Incorrect text track index: %d", index); return BAD_VALUE; } diff --git a/media/libstagefright/yuv/YUVImage.cpp b/media/libstagefright/yuv/YUVImage.cpp index b712062..0d67c96 100644 --- a/media/libstagefright/yuv/YUVImage.cpp +++ b/media/libstagefright/yuv/YUVImage.cpp @@ -54,7 +54,7 @@ size_t YUVImage::bufferSize(YUVFormat yuvFormat, int32_t width, int32_t height) // Y takes numberOfPixels bytes and U/V take numberOfPixels/4 bytes each. numberOfBytes = (size_t)(numberOfPixels + (numberOfPixels >> 1)); } else { - LOGE("Format not supported"); + ALOGE("Format not supported"); } return numberOfBytes; } @@ -74,7 +74,7 @@ bool YUVImage::initializeYUVPointers() { mVdata = mYdata + numberOfPixels; mUdata = mVdata + 1; } else { - LOGE("Format not supported"); + ALOGE("Format not supported"); return false; } return true; @@ -98,7 +98,7 @@ bool YUVImage::getOffsets(int32_t x, int32_t y, *uOffset = 2*uvOffset; *vOffset = 2*uvOffset; } else { - LOGE("Format not supported"); + ALOGE("Format not supported"); return false; } @@ -122,7 +122,7 @@ bool YUVImage::getOffsetIncrementsPerDataRow( *uDataOffsetIncrement = 2*uvDataOffsetIncrement; *vDataOffsetIncrement = 2*uvDataOffsetIncrement; } else { - LOGE("Format not supported"); + ALOGE("Format not supported"); return false; } diff --git a/media/mtp/MtpDataPacket.cpp b/media/mtp/MtpDataPacket.cpp index cfea7e8..930f0b0 100644 --- a/media/mtp/MtpDataPacket.cpp +++ b/media/mtp/MtpDataPacket.cpp @@ -418,7 +418,7 @@ int MtpDataPacket::readData(struct usb_request *request, void* buffer, int lengt // Queue a read request. Call readDataWait to wait for result int MtpDataPacket::readDataAsync(struct usb_request *req) { if (usb_request_queue(req)) { - LOGE("usb_endpoint_queue failed, errno: %d", errno); + ALOGE("usb_endpoint_queue failed, errno: %d", errno); return -1; } return 0; diff --git a/media/mtp/MtpDevice.cpp b/media/mtp/MtpDevice.cpp index 2fc6ba8..bf7795c 100644 --- a/media/mtp/MtpDevice.cpp +++ b/media/mtp/MtpDevice.cpp @@ -53,7 +53,7 @@ static bool isMtpDevice(uint16_t vendor, uint16_t product) { MtpDevice* MtpDevice::open(const char* deviceName, int fd) { struct usb_device *device = usb_device_new(deviceName, fd); if (!device) { - LOGE("usb_device_new failed for %s", deviceName); + ALOGE("usb_device_new failed for %s", deviceName); return NULL; } @@ -134,7 +134,7 @@ MtpDevice* MtpDevice::open(const char* deviceName, int fd) { for (int i = 0; i < 3; i++) { ep = (struct usb_endpoint_descriptor *)usb_descriptor_iter_next(&iter); if (!ep || ep->bDescriptorType != USB_DT_ENDPOINT) { - LOGE("endpoints not found\n"); + ALOGE("endpoints not found\n"); usb_device_close(device); return NULL; } @@ -149,13 +149,13 @@ MtpDevice* MtpDevice::open(const char* deviceName, int fd) { } } if (!ep_in_desc || !ep_out_desc || !ep_intr_desc) { - LOGE("endpoints not found\n"); + ALOGE("endpoints not found\n"); usb_device_close(device); return NULL; } if (usb_device_claim_interface(device, interface->bInterfaceNumber)) { - LOGE("usb_device_claim_interface failed errno: %d\n", errno); + ALOGE("usb_device_claim_interface failed errno: %d\n", errno); usb_device_close(device); return NULL; } @@ -168,7 +168,7 @@ MtpDevice* MtpDevice::open(const char* deviceName, int fd) { } usb_device_close(device); - LOGE("device not found"); + ALOGE("device not found"); return NULL; } @@ -260,7 +260,7 @@ void MtpDevice::print() { property->print(); delete property; } else { - LOGE("could not fetch property: %s", + ALOGE("could not fetch property: %s", MtpDebug::getObjectPropCodeName(prop)); } } @@ -584,7 +584,7 @@ bool MtpDevice::readObject(MtpObjectHandle handle, && mData.readDataHeader(mRequestIn1)) { uint32_t length = mData.getContainerLength(); if (length - MTP_CONTAINER_HEADER_SIZE != objectSize) { - LOGE("readObject error objectSize: %d, length: %d", + ALOGE("readObject error objectSize: %d, length: %d", objectSize, length); goto fail; } @@ -617,7 +617,7 @@ bool MtpDevice::readObject(MtpObjectHandle handle, // queue up a read request req->buffer_length = (remaining > sizeof(buffer1) ? sizeof(buffer1) : remaining); if (mData.readDataAsync(req)) { - LOGE("readDataAsync failed"); + ALOGE("readDataAsync failed"); goto fail; } } else { @@ -627,7 +627,7 @@ bool MtpDevice::readObject(MtpObjectHandle handle, if (writeBuffer) { // write previous buffer if (!callback(writeBuffer, offset, writeLength, clientData)) { - LOGE("write failed"); + ALOGE("write failed"); // wait for pending read before failing if (req) mData.readDataWait(mDevice); @@ -669,7 +669,7 @@ bool MtpDevice::readObject(MtpObjectHandle handle, const char* destPath, int gro ALOGD("readObject: %s", destPath); int fd = ::open(destPath, O_RDWR | O_CREAT | O_TRUNC); if (fd < 0) { - LOGE("open failed for %s", destPath); + ALOGE("open failed for %s", destPath); return false; } @@ -718,7 +718,7 @@ bool MtpDevice::readObject(MtpObjectHandle handle, const char* destPath, int gro // queue up a read request req->buffer_length = (remaining > sizeof(buffer1) ? sizeof(buffer1) : remaining); if (mData.readDataAsync(req)) { - LOGE("readDataAsync failed"); + ALOGE("readDataAsync failed"); goto fail; } } else { @@ -728,7 +728,7 @@ bool MtpDevice::readObject(MtpObjectHandle handle, const char* destPath, int gro if (writeBuffer) { // write previous buffer if (write(fd, writeBuffer, writeLength) != writeLength) { - LOGE("write failed"); + ALOGE("write failed"); // wait for pending read before failing if (req) mData.readDataWait(mDevice); diff --git a/media/mtp/MtpPacket.cpp b/media/mtp/MtpPacket.cpp index 39815d4..dd07843 100644 --- a/media/mtp/MtpPacket.cpp +++ b/media/mtp/MtpPacket.cpp @@ -36,7 +36,7 @@ MtpPacket::MtpPacket(int bufferSize) { mBuffer = (uint8_t *)malloc(bufferSize); if (!mBuffer) { - LOGE("out of memory!"); + ALOGE("out of memory!"); abort(); } } @@ -57,7 +57,7 @@ void MtpPacket::allocate(int length) { int newLength = length + mAllocationIncrement; mBuffer = (uint8_t *)realloc(mBuffer, newLength); if (!mBuffer) { - LOGE("out of memory!"); + ALOGE("out of memory!"); abort(); } mBufferSize = newLength; @@ -134,7 +134,7 @@ void MtpPacket::setTransactionID(MtpTransactionID id) { uint32_t MtpPacket::getParameter(int index) const { if (index < 1 || index > 5) { - LOGE("index %d out of range in MtpPacket::getParameter", index); + ALOGE("index %d out of range in MtpPacket::getParameter", index); return 0; } return getUInt32(MTP_CONTAINER_PARAMETER_OFFSET + (index - 1) * sizeof(uint32_t)); @@ -142,7 +142,7 @@ uint32_t MtpPacket::getParameter(int index) const { void MtpPacket::setParameter(int index, uint32_t value) { if (index < 1 || index > 5) { - LOGE("index %d out of range in MtpPacket::setParameter", index); + ALOGE("index %d out of range in MtpPacket::setParameter", index); return; } int offset = MTP_CONTAINER_PARAMETER_OFFSET + (index - 1) * sizeof(uint32_t); diff --git a/media/mtp/MtpProperty.cpp b/media/mtp/MtpProperty.cpp index d06f214..64dd45b 100644 --- a/media/mtp/MtpProperty.cpp +++ b/media/mtp/MtpProperty.cpp @@ -91,7 +91,7 @@ MtpProperty::MtpProperty(MtpPropertyCode propCode, mDefaultValue.u.u64 = defaultValue; break; default: - LOGE("unknown type %04X in MtpProperty::MtpProperty", type); + ALOGE("unknown type %04X in MtpProperty::MtpProperty", type); } } } @@ -267,7 +267,7 @@ void MtpProperty::setFormRange(int min, int max, int step) { mStepSize.u.u64 = step; break; default: - LOGE("unsupported type for MtpProperty::setRange"); + ALOGE("unsupported type for MtpProperty::setRange"); break; } } @@ -306,7 +306,7 @@ void MtpProperty::setFormEnum(const int* values, int count) { mEnumValues[i].u.u64 = value; break; default: - LOGE("unsupported type for MtpProperty::setEnum"); + ALOGE("unsupported type for MtpProperty::setEnum"); break; } } @@ -402,7 +402,7 @@ void MtpProperty::print(MtpPropertyValue& value, MtpString& buffer) { buffer.appendFormat("%s", value.str); break; default: - LOGE("unsupported type for MtpProperty::print\n"); + ALOGE("unsupported type for MtpProperty::print\n"); break; } } @@ -456,7 +456,7 @@ void MtpProperty::readValue(MtpDataPacket& packet, MtpPropertyValue& value) { value.str = strdup(stringBuffer); break; default: - LOGE("unknown type %04X in MtpProperty::readValue", mType); + ALOGE("unknown type %04X in MtpProperty::readValue", mType); } } @@ -511,7 +511,7 @@ void MtpProperty::writeValue(MtpDataPacket& packet, MtpPropertyValue& value) { packet.putEmptyString(); break; default: - LOGE("unknown type %04X in MtpProperty::writeValue", mType); + ALOGE("unknown type %04X in MtpProperty::writeValue", mType); } } diff --git a/media/mtp/MtpServer.cpp b/media/mtp/MtpServer.cpp index 838c13e..5606187 100644 --- a/media/mtp/MtpServer.cpp +++ b/media/mtp/MtpServer.cpp @@ -179,7 +179,7 @@ void MtpServer::run() { if (dataIn) { int ret = mData.read(fd); if (ret < 0) { - LOGE("data read returned %d, errno: %d", ret, errno); + ALOGE("data read returned %d, errno: %d", ret, errno); if (errno == ECANCELED) { // return to top of loop and wait for next command continue; @@ -200,7 +200,7 @@ void MtpServer::run() { mData.dump(); ret = mData.write(fd); if (ret < 0) { - LOGE("request write returned %d, errno: %d", ret, errno); + ALOGE("request write returned %d, errno: %d", ret, errno); if (errno == ECANCELED) { // return to top of loop and wait for next command continue; @@ -214,7 +214,7 @@ void MtpServer::run() { ret = mResponse.write(fd); mResponse.dump(); if (ret < 0) { - LOGE("request write returned %d, errno: %d", ret, errno); + ALOGE("request write returned %d, errno: %d", ret, errno); if (errno == ECANCELED) { // return to top of loop and wait for next command continue; @@ -296,7 +296,7 @@ void MtpServer::removeEditObject(MtpObjectHandle handle) { return; } } - LOGE("ObjectEdit not found in removeEditObject"); + ALOGE("ObjectEdit not found in removeEditObject"); } void MtpServer::commitEdit(ObjectEdit* edit) { @@ -314,7 +314,7 @@ bool MtpServer::handleRequest() { if (mSendObjectHandle != kInvalidObjectHandle && operation != MTP_OPERATION_SEND_OBJECT) { // FIXME - need to delete mSendObjectHandle from the database - LOGE("expected SendObject after SendObjectInfo"); + ALOGE("expected SendObject after SendObjectInfo"); mSendObjectHandle = kInvalidObjectHandle; } @@ -408,7 +408,7 @@ bool MtpServer::handleRequest() { response = doEndEditObject(); break; default: - LOGE("got unsupported command %s", MtpDebug::getOperationCodeName(operation)); + ALOGE("got unsupported command %s", MtpDebug::getOperationCodeName(operation)); response = MTP_RESPONSE_OPERATION_NOT_SUPPORTED; break; } @@ -917,7 +917,7 @@ MtpResponseCode MtpServer::doSendObject() { int ret, initialData; if (mSendObjectHandle == kInvalidObjectHandle) { - LOGE("Expected SendObjectInfo before SendObject"); + ALOGE("Expected SendObjectInfo before SendObject"); result = MTP_RESPONSE_NO_VALID_OBJECT_INFO; goto done; } @@ -984,7 +984,7 @@ static void deleteRecursive(const char* path) { char pathbuf[PATH_MAX]; int pathLength = strlen(path); if (pathLength >= sizeof(pathbuf) - 1) { - LOGE("path too long: %s\n", path); + ALOGE("path too long: %s\n", path); } strcpy(pathbuf, path); if (pathbuf[pathLength - 1] != '/') { @@ -995,7 +995,7 @@ static void deleteRecursive(const char* path) { DIR* dir = opendir(path); if (!dir) { - LOGE("opendir %s failed: %s", path, strerror(errno)); + ALOGE("opendir %s failed: %s", path, strerror(errno)); return; } @@ -1010,7 +1010,7 @@ static void deleteRecursive(const char* path) { int nameLength = strlen(name); if (nameLength > pathRemaining) { - LOGE("path %s/%s too long\n", path, name); + ALOGE("path %s/%s too long\n", path, name); continue; } strcpy(fileSpot, name); @@ -1036,7 +1036,7 @@ static void deletePath(const char* path) { unlink(path); } } else { - LOGE("deletePath stat failed for %s: %s", path, strerror(errno)); + ALOGE("deletePath stat failed for %s: %s", path, strerror(errno)); } } @@ -1098,7 +1098,7 @@ MtpResponseCode MtpServer::doSendPartialObject() { ObjectEdit* edit = getEditObject(handle); if (!edit) { - LOGE("object not open for edit in doSendPartialObject"); + ALOGE("object not open for edit in doSendPartialObject"); return MTP_RESPONSE_GENERAL_ERROR; } @@ -1155,7 +1155,7 @@ MtpResponseCode MtpServer::doTruncateObject() { MtpObjectHandle handle = mRequest.getParameter(1); ObjectEdit* edit = getEditObject(handle); if (!edit) { - LOGE("object not open for edit in doTruncateObject"); + ALOGE("object not open for edit in doTruncateObject"); return MTP_RESPONSE_GENERAL_ERROR; } @@ -1173,7 +1173,7 @@ MtpResponseCode MtpServer::doTruncateObject() { MtpResponseCode MtpServer::doBeginEditObject() { MtpObjectHandle handle = mRequest.getParameter(1); if (getEditObject(handle)) { - LOGE("object already open for edit in doBeginEditObject"); + ALOGE("object already open for edit in doBeginEditObject"); return MTP_RESPONSE_GENERAL_ERROR; } @@ -1186,7 +1186,7 @@ MtpResponseCode MtpServer::doBeginEditObject() { int fd = open((const char *)path, O_RDWR | O_EXCL); if (fd < 0) { - LOGE("open failed for %s in doBeginEditObject (%d)", (const char *)path, errno); + ALOGE("open failed for %s in doBeginEditObject (%d)", (const char *)path, errno); return MTP_RESPONSE_GENERAL_ERROR; } @@ -1198,7 +1198,7 @@ MtpResponseCode MtpServer::doEndEditObject() { MtpObjectHandle handle = mRequest.getParameter(1); ObjectEdit* edit = getEditObject(handle); if (!edit) { - LOGE("object not open for edit in doEndEditObject"); + ALOGE("object not open for edit in doEndEditObject"); return MTP_RESPONSE_GENERAL_ERROR; } diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index 7bef5a9..2b3c442 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -105,14 +105,14 @@ static const uint32_t kMaxThreadSleepTimeShift = 2; static bool recordingAllowed() { if (getpid() == IPCThreadState::self()->getCallingPid()) return true; bool ok = checkCallingPermission(String16("android.permission.RECORD_AUDIO")); - if (!ok) LOGE("Request requires android.permission.RECORD_AUDIO"); + if (!ok) ALOGE("Request requires android.permission.RECORD_AUDIO"); return ok; } static bool settingsAllowed() { if (getpid() == IPCThreadState::self()->getCallingPid()) return true; bool ok = checkCallingPermission(String16("android.permission.MODIFY_AUDIO_SETTINGS")); - if (!ok) LOGE("Request requires android.permission.MODIFY_AUDIO_SETTINGS"); + if (!ok) ALOGE("Request requires android.permission.MODIFY_AUDIO_SETTINGS"); return ok; } @@ -139,7 +139,7 @@ static int load_audio_interface(const char *if_name, const hw_module_t **mod, goto out; rc = audio_hw_device_open(*mod, dev); - LOGE_IF(rc, "couldn't open audio hw device in %s.%s (%s)", + ALOGE_IF(rc, "couldn't open audio hw device in %s.%s (%s)", AUDIO_HARDWARE_MODULE_ID, if_name, strerror(-rc)); if (rc) goto out; @@ -199,7 +199,7 @@ void AudioFlinger::onFirstRef() mHardwareStatus = AUDIO_HW_INIT; if (!mPrimaryHardwareDev || mAudioHwDevs.size() == 0) { - LOGE("Primary audio interface not found"); + ALOGE("Primary audio interface not found"); return; } @@ -400,7 +400,7 @@ sp<IAudioTrack> AudioFlinger::createTrack( int lSessionId; if (streamType >= AUDIO_STREAM_CNT) { - LOGE("createTrack() invalid stream type %d", streamType); + ALOGE("createTrack() invalid stream type %d", streamType); lStatus = BAD_VALUE; goto Exit; } @@ -410,7 +410,7 @@ sp<IAudioTrack> AudioFlinger::createTrack( PlaybackThread *thread = checkPlaybackThread_l(output); PlaybackThread *effectThread = NULL; if (thread == NULL) { - LOGE("unknown output thread"); + ALOGE("unknown output thread"); lStatus = BAD_VALUE; goto Exit; } @@ -432,7 +432,7 @@ sp<IAudioTrack> AudioFlinger::createTrack( // prevent same audio session on different output threads uint32_t sessions = t->hasAudioSession(*sessionId); if (sessions & PlaybackThread::TRACK_SESSION) { - LOGE("createTrack() session ID %d already in use", *sessionId); + ALOGE("createTrack() session ID %d already in use", *sessionId); lStatus = BAD_VALUE; goto Exit; } @@ -663,7 +663,7 @@ status_t AudioFlinger::setStreamVolume(int stream, float value, int output) } if (stream < 0 || uint32_t(stream) >= AUDIO_STREAM_CNT) { - LOGE("setStreamVolume() invalid stream %d", stream); + ALOGE("setStreamVolume() invalid stream %d", stream); return BAD_VALUE; } @@ -698,7 +698,7 @@ status_t AudioFlinger::setStreamMute(int stream, bool muted) if (stream < 0 || uint32_t(stream) >= AUDIO_STREAM_CNT || uint32_t(stream) == AUDIO_STREAM_ENFORCED_AUDIBLE) { - LOGE("setStreamMute() invalid stream %d", stream); + ALOGE("setStreamMute() invalid stream %d", stream); return BAD_VALUE; } @@ -1471,7 +1471,7 @@ status_t AudioFlinger::PlaybackThread::readyToRun() if (status == NO_ERROR) { ALOGI("AudioFlinger's thread %p ready to run", this); } else { - LOGE("No working audio driver found."); + ALOGE("No working audio driver found."); } return status; } @@ -1499,7 +1499,7 @@ sp<AudioFlinger::PlaybackThread::Track> AudioFlinger::PlaybackThread::createTra if (mType == DIRECT) { if ((format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_PCM) { if (sampleRate != mSampleRate || format != mFormat || channelMask != mChannelMask) { - LOGE("createTrack_l() Bad parameter: sampleRate %d format %d, channelMask 0x%08x \"" + ALOGE("createTrack_l() Bad parameter: sampleRate %d format %d, channelMask 0x%08x \"" "for output %p with format %d", sampleRate, format, channelMask, mOutput, mFormat); lStatus = BAD_VALUE; @@ -1509,7 +1509,7 @@ sp<AudioFlinger::PlaybackThread::Track> AudioFlinger::PlaybackThread::createTra } else { // Resampler implementation limits input sampling rate to 2 x output sampling rate. if (sampleRate > mSampleRate*2) { - LOGE("Sample rate out of range: %d mSampleRate %d", sampleRate, mSampleRate); + ALOGE("Sample rate out of range: %d mSampleRate %d", sampleRate, mSampleRate); lStatus = BAD_VALUE; goto Exit; } @@ -1517,7 +1517,7 @@ sp<AudioFlinger::PlaybackThread::Track> AudioFlinger::PlaybackThread::createTra lStatus = initCheck(); if (lStatus != NO_ERROR) { - LOGE("Audio driver not initialized."); + ALOGE("Audio driver not initialized."); goto Exit; } @@ -1534,7 +1534,7 @@ sp<AudioFlinger::PlaybackThread::Track> AudioFlinger::PlaybackThread::createTra if (t != 0) { uint32_t actual = AudioSystem::getStrategyForStream((audio_stream_type_t)t->type()); if (sessionId == t->sessionId() && strategy != actual) { - LOGE("createTrack_l() mismatched strategy; expected %u but found %u", + ALOGE("createTrack_l() mismatched strategy; expected %u but found %u", strategy, actual); lStatus = BAD_VALUE; goto Exit; @@ -1847,7 +1847,7 @@ AudioFlinger::MixerThread::MixerThread(const sp<AudioFlinger>& audioFlinger, Aud // FIXME - Current mixer implementation only supports stereo output if (mChannelCount == 1) { - LOGE("Invalid audio hardware channel count"); + ALOGE("Invalid audio hardware channel count"); } } @@ -3238,7 +3238,7 @@ AudioFlinger::ThreadBase::TrackBase::TrackBase( mBufferEnd = (uint8_t *)mBuffer + bufferSize; } } else { - LOGE("not enough memory for AudioTrack size=%u", size); + ALOGE("not enough memory for AudioTrack size=%u", size); client->heap()->dump("AudioTrack"); return; } @@ -3332,7 +3332,7 @@ void* AudioFlinger::ThreadBase::TrackBase::getBuffer(uint32_t offset, uint32_t f // Check validity of returned pointer in case the track control block would have been corrupted. if (bufferStart < mBuffer || bufferStart > bufferEnd || bufferEnd > mBufferEnd || ((unsigned long)bufferStart & (unsigned long)(cblk->frameSize - 1))) { - LOGE("TrackBase::getBuffer buffer out of range:\n start: %p, end %p , mBuffer %p mBufferEnd %p\n \ + ALOGE("TrackBase::getBuffer buffer out of range:\n start: %p, end %p , mBuffer %p mBufferEnd %p\n \ server %d, serverBase %d, user %d, userBase %d", bufferStart, bufferEnd, mBuffer, mBufferEnd, cblk->server, cblk->serverBase, cblk->user, cblk->userBase); @@ -3368,7 +3368,7 @@ AudioFlinger::PlaybackThread::Track::Track( } ALOGV("Track constructor name %d, calling thread %d", mName, IPCThreadState::self()->getCallingPid()); if (mName < 0) { - LOGE("no more track names available"); + ALOGE("no more track names available"); } mVolume[0] = 1.0f; mVolume[1] = 1.0f; @@ -4380,7 +4380,7 @@ bool AudioFlinger::RecordThread::threadLoop() mRsmpInIndex = 0; } if (mBytesRead < 0) { - LOGE("Error reading audio input"); + ALOGE("Error reading audio input"); if (mActiveTrack->mState == TrackBase::ACTIVE) { // Force input into standby so that it tries to // recover at next read attempt @@ -4470,7 +4470,7 @@ sp<AudioFlinger::RecordThread::RecordTrack> AudioFlinger::RecordThread::createR lStatus = initCheck(); if (lStatus != NO_ERROR) { - LOGE("Audio driver not initialized."); + ALOGE("Audio driver not initialized."); goto Exit; } @@ -4626,7 +4626,7 @@ status_t AudioFlinger::RecordThread::getNextBuffer(AudioBufferProvider::Buffer* if (framesReady == 0) { mBytesRead = mInput->stream->read(mInput->stream, mRsmpInBuffer, mInputBytes); if (mBytesRead < 0) { - LOGE("RecordThread::getNextBuffer() Error reading audio input"); + ALOGE("RecordThread::getNextBuffer() Error reading audio input"); if (mActiveTrack->mState == TrackBase::ACTIVE) { // Force input into standby so that it tries to // recover at next read attempt @@ -5545,7 +5545,7 @@ sp<IEffect> AudioFlinger::createEffect(pid_t pid, if (thread == NULL) { thread = checkPlaybackThread_l(io); if (thread == NULL) { - LOGE("createEffect() unknown output thread"); + ALOGE("createEffect() unknown output thread"); lStatus = BAD_VALUE; goto Exit; } @@ -6828,7 +6828,7 @@ AudioFlinger::EffectHandle::EffectHandle(const sp<EffectModule>& effect, mBuffer = (uint8_t *)mCblk + bufOffset; } } else { - LOGE("not enough memory for Effect size=%u", EFFECT_PARAM_BUFFER_SIZE + sizeof(effect_param_cblk_t)); + ALOGE("not enough memory for Effect size=%u", EFFECT_PARAM_BUFFER_SIZE + sizeof(effect_param_cblk_t)); return; } } diff --git a/services/audioflinger/AudioMixer.cpp b/services/audioflinger/AudioMixer.cpp index b8e456f..36cdeb8 100644 --- a/services/audioflinger/AudioMixer.cpp +++ b/services/audioflinger/AudioMixer.cpp @@ -1004,7 +1004,7 @@ void AudioMixer::process__OneTrack16BitsStereoNoResampling(state_t* state) // been enabled for mixing. if (in == NULL || ((unsigned long)in & 3)) { memset(out, 0, numFrames*MAX_NUM_CHANNELS*sizeof(int16_t)); - LOGE_IF(((unsigned long)in & 3), "process stereo track: input buffer alignment pb: buffer %p track %d, channels %d, needs %08x", + ALOGE_IF(((unsigned long)in & 3), "process stereo track: input buffer alignment pb: buffer %p track %d, channels %d, needs %08x", in, i, t.channelCount, t.needs); return; } diff --git a/services/audioflinger/AudioPolicyService.cpp b/services/audioflinger/AudioPolicyService.cpp index 144f04e..f572fce 100644 --- a/services/audioflinger/AudioPolicyService.cpp +++ b/services/audioflinger/AudioPolicyService.cpp @@ -52,7 +52,7 @@ static const int kDumpLockSleep = 20000; static bool checkPermission() { if (getpid() == IPCThreadState::self()->getCallingPid()) return true; bool ok = checkCallingPermission(String16("android.permission.MODIFY_AUDIO_SETTINGS")); - if (!ok) LOGE("Request requires android.permission.MODIFY_AUDIO_SETTINGS"); + if (!ok) ALOGE("Request requires android.permission.MODIFY_AUDIO_SETTINGS"); return ok; } @@ -83,18 +83,18 @@ AudioPolicyService::AudioPolicyService() return; rc = audio_policy_dev_open(module, &mpAudioPolicyDev); - LOGE_IF(rc, "couldn't open audio policy device (%s)", strerror(-rc)); + ALOGE_IF(rc, "couldn't open audio policy device (%s)", strerror(-rc)); if (rc) return; rc = mpAudioPolicyDev->create_audio_policy(mpAudioPolicyDev, &aps_ops, this, &mpAudioPolicy); - LOGE_IF(rc, "couldn't create audio policy (%s)", strerror(-rc)); + ALOGE_IF(rc, "couldn't create audio policy (%s)", strerror(-rc)); if (rc) return; rc = mpAudioPolicy->init_check(mpAudioPolicy); - LOGE_IF(rc, "couldn't init_check the audio policy (%s)", strerror(-rc)); + ALOGE_IF(rc, "couldn't init_check the audio policy (%s)", strerror(-rc)); if (rc) return; @@ -1027,9 +1027,9 @@ int AudioPolicyService::startTone(audio_policy_tone_t tone, audio_stream_type_t stream) { if (tone != AUDIO_POLICY_TONE_IN_CALL_NOTIFICATION) - LOGE("startTone: illegal tone requested (%d)", tone); + ALOGE("startTone: illegal tone requested (%d)", tone); if (stream != AUDIO_STREAM_VOICE_CALL) - LOGE("startTone: illegal stream (%d) requested for tone %d", stream, + ALOGE("startTone: illegal stream (%d) requested for tone %d", stream, tone); mTonePlaybackThread->startToneCommand(ToneGenerator::TONE_SUP_CALL_WAITING, AUDIO_STREAM_VOICE_CALL); diff --git a/services/audioflinger/AudioResampler.cpp b/services/audioflinger/AudioResampler.cpp index 7205045..fbdcb62 100644 --- a/services/audioflinger/AudioResampler.cpp +++ b/services/audioflinger/AudioResampler.cpp @@ -121,7 +121,7 @@ AudioResampler::AudioResampler(int bitDepth, int inChannelCount, mPhaseFraction(0) { // sanity check on format if ((bitDepth != 16) ||(inChannelCount < 1) || (inChannelCount > 2)) { - LOGE("Unsupported sample format, %d bits, %d channels", bitDepth, + ALOGE("Unsupported sample format, %d bits, %d channels", bitDepth, inChannelCount); // LOG_ASSERT(0); } @@ -190,7 +190,7 @@ void AudioResamplerOrder1::resampleStereo16(int32_t* out, size_t outFrameCount, size_t outputSampleCount = outFrameCount * 2; size_t inFrameCount = (outFrameCount*mInSampleRate)/mSampleRate; - // LOGE("starting resample %d frames, inputIndex=%d, phaseFraction=%d, phaseIncrement=%d\n", + // ALOGE("starting resample %d frames, inputIndex=%d, phaseFraction=%d, phaseIncrement=%d\n", // outFrameCount, inputIndex, phaseFraction, phaseIncrement); while (outputIndex < outputSampleCount) { @@ -203,7 +203,7 @@ void AudioResamplerOrder1::resampleStereo16(int32_t* out, size_t outFrameCount, goto resampleStereo16_exit; } - // LOGE("New buffer fetched: %d frames\n", mBuffer.frameCount); + // ALOGE("New buffer fetched: %d frames\n", mBuffer.frameCount); if (mBuffer.frameCount > inputIndex) break; inputIndex -= mBuffer.frameCount; @@ -217,7 +217,7 @@ void AudioResamplerOrder1::resampleStereo16(int32_t* out, size_t outFrameCount, // handle boundary case while (inputIndex == 0) { - // LOGE("boundary case\n"); + // ALOGE("boundary case\n"); out[outputIndex++] += vl * Interp(mX0L, in[0], phaseFraction); out[outputIndex++] += vr * Interp(mX0R, in[1], phaseFraction); Advance(&inputIndex, &phaseFraction, phaseIncrement); @@ -226,7 +226,7 @@ void AudioResamplerOrder1::resampleStereo16(int32_t* out, size_t outFrameCount, } // process input samples - // LOGE("general case\n"); + // ALOGE("general case\n"); #ifdef ASM_ARM_RESAMP1 // asm optimisation for ResamplerOrder1 if (inputIndex + 2 < mBuffer.frameCount) { @@ -248,13 +248,13 @@ void AudioResamplerOrder1::resampleStereo16(int32_t* out, size_t outFrameCount, Advance(&inputIndex, &phaseFraction, phaseIncrement); } - // LOGE("loop done - outputIndex=%d, inputIndex=%d\n", outputIndex, inputIndex); + // ALOGE("loop done - outputIndex=%d, inputIndex=%d\n", outputIndex, inputIndex); // if done with buffer, save samples if (inputIndex >= mBuffer.frameCount) { inputIndex -= mBuffer.frameCount; - // LOGE("buffer done, new input index %d", inputIndex); + // ALOGE("buffer done, new input index %d", inputIndex); mX0L = mBuffer.i16[mBuffer.frameCount*2-2]; mX0R = mBuffer.i16[mBuffer.frameCount*2-1]; @@ -265,7 +265,7 @@ void AudioResamplerOrder1::resampleStereo16(int32_t* out, size_t outFrameCount, } } - // LOGE("output buffer full - outputIndex=%d, inputIndex=%d\n", outputIndex, inputIndex); + // ALOGE("output buffer full - outputIndex=%d, inputIndex=%d\n", outputIndex, inputIndex); resampleStereo16_exit: // save state @@ -286,7 +286,7 @@ void AudioResamplerOrder1::resampleMono16(int32_t* out, size_t outFrameCount, size_t outputSampleCount = outFrameCount * 2; size_t inFrameCount = (outFrameCount*mInSampleRate)/mSampleRate; - // LOGE("starting resample %d frames, inputIndex=%d, phaseFraction=%d, phaseIncrement=%d\n", + // ALOGE("starting resample %d frames, inputIndex=%d, phaseFraction=%d, phaseIncrement=%d\n", // outFrameCount, inputIndex, phaseFraction, phaseIncrement); while (outputIndex < outputSampleCount) { // buffer is empty, fetch a new one @@ -298,7 +298,7 @@ void AudioResamplerOrder1::resampleMono16(int32_t* out, size_t outFrameCount, mPhaseFraction = phaseFraction; goto resampleMono16_exit; } - // LOGE("New buffer fetched: %d frames\n", mBuffer.frameCount); + // ALOGE("New buffer fetched: %d frames\n", mBuffer.frameCount); if (mBuffer.frameCount > inputIndex) break; inputIndex -= mBuffer.frameCount; @@ -310,7 +310,7 @@ void AudioResamplerOrder1::resampleMono16(int32_t* out, size_t outFrameCount, // handle boundary case while (inputIndex == 0) { - // LOGE("boundary case\n"); + // ALOGE("boundary case\n"); int32_t sample = Interp(mX0L, in[0], phaseFraction); out[outputIndex++] += vl * sample; out[outputIndex++] += vr * sample; @@ -320,7 +320,7 @@ void AudioResamplerOrder1::resampleMono16(int32_t* out, size_t outFrameCount, } // process input samples - // LOGE("general case\n"); + // ALOGE("general case\n"); #ifdef ASM_ARM_RESAMP1 // asm optimisation for ResamplerOrder1 if (inputIndex + 2 < mBuffer.frameCount) { @@ -343,13 +343,13 @@ void AudioResamplerOrder1::resampleMono16(int32_t* out, size_t outFrameCount, } - // LOGE("loop done - outputIndex=%d, inputIndex=%d\n", outputIndex, inputIndex); + // ALOGE("loop done - outputIndex=%d, inputIndex=%d\n", outputIndex, inputIndex); // if done with buffer, save samples if (inputIndex >= mBuffer.frameCount) { inputIndex -= mBuffer.frameCount; - // LOGE("buffer done, new input index %d", inputIndex); + // ALOGE("buffer done, new input index %d", inputIndex); mX0L = mBuffer.i16[mBuffer.frameCount-1]; provider->releaseBuffer(&mBuffer); @@ -359,7 +359,7 @@ void AudioResamplerOrder1::resampleMono16(int32_t* out, size_t outFrameCount, } } - // LOGE("output buffer full - outputIndex=%d, inputIndex=%d\n", outputIndex, inputIndex); + // ALOGE("output buffer full - outputIndex=%d, inputIndex=%d\n", outputIndex, inputIndex); resampleMono16_exit: // save state 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 2283437..06fc708 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; } @@ -102,7 +102,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); } } @@ -138,13 +138,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; } @@ -182,7 +182,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; } @@ -253,7 +253,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; } @@ -288,7 +288,7 @@ MediaPlayer* CameraService::newMediaPlayer(const char *file) { mp->setAudioStreamType(AUDIO_STREAM_ENFORCED_AUDIBLE); mp->prepare(); } else { - LOGE("Failed to load CameraService sounds: %s", file); + ALOGE("Failed to load CameraService sounds: %s", file); return NULL; } return mp; @@ -389,7 +389,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; @@ -419,7 +419,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; @@ -526,7 +526,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; } @@ -624,7 +624,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(); @@ -676,7 +676,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; } @@ -770,7 +770,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; } @@ -831,7 +831,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; } } @@ -926,12 +926,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; } @@ -989,7 +989,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; } @@ -1022,7 +1022,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; } @@ -1177,7 +1177,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; } @@ -1187,7 +1187,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; } @@ -1213,7 +1213,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; } diff --git a/services/camera/tests/CameraServiceTest/CameraServiceTest.cpp b/services/camera/tests/CameraServiceTest/CameraServiceTest.cpp index 69f60ca..1055538 100644 --- a/services/camera/tests/CameraServiceTest/CameraServiceTest.cpp +++ b/services/camera/tests/CameraServiceTest/CameraServiceTest.cpp @@ -217,7 +217,7 @@ bool MCameraClient::test(OP op, int v1, int v2) { void MCameraClient::assertTest(OP op, int v1, int v2) { if (!test(op, v1, v2)) { - LOGE("assertTest failed: op=%d, v1=%d, v2=%d", op, v1, v2); + ALOGE("assertTest failed: op=%d, v1=%d, v2=%d", op, v1, v2); ASSERT(0); } } |