From 5ff1dd576bb93c45b44088a51544a18fc43ebf58 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Thu, 5 Jan 2012 23:22:43 +0000 Subject: Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE See https://android-git.corp.google.com/g/157065 Bug: 5449033 Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69 --- camera/Camera.cpp | 8 +- drm/libdrmframework/DrmManagerClientImpl.cpp | 4 +- media/libeffects/factory/EffectsFactory.c | 22 +++--- media/libeffects/preprocessing/PreProcessing.cpp | 40 +++++----- media/libeffects/testlibs/EffectEqualizer.cpp | 4 +- media/libeffects/testlibs/EffectReverb.c | 4 +- media/libeffects/visualizer/EffectVisualizer.cpp | 4 +- media/libmedia/AudioEffect.cpp | 6 +- media/libmedia/AudioRecord.cpp | 12 +-- media/libmedia/AudioSystem.cpp | 12 +-- media/libmedia/AudioTrack.cpp | 28 +++---- media/libmedia/IAudioRecord.cpp | 2 +- media/libmedia/IAudioTrack.cpp | 4 +- media/libmedia/IMediaDeathNotifier.cpp | 4 +- media/libmedia/IOMX.cpp | 2 +- media/libmedia/MediaProfiles.cpp | 2 +- media/libmedia/MediaScanner.cpp | 2 +- media/libmedia/ToneGenerator.cpp | 4 +- media/libmedia/mediametadataretriever.cpp | 4 +- media/libmedia/mediaplayer.cpp | 6 +- media/libmediaplayerservice/MediaPlayerService.cpp | 6 +- .../libmediaplayerservice/StagefrightRecorder.cpp | 38 +++++----- media/libstagefright/ACodec.cpp | 6 +- media/libstagefright/AVIExtractor.cpp | 4 +- media/libstagefright/AudioSource.cpp | 6 +- media/libstagefright/CameraSource.cpp | 8 +- media/libstagefright/DRMExtractor.cpp | 2 +- media/libstagefright/ESDS.cpp | 2 +- media/libstagefright/FLACExtractor.cpp | 2 +- media/libstagefright/MPEG4Extractor.cpp | 4 +- media/libstagefright/MPEG4Writer.cpp | 4 +- media/libstagefright/OMXCodec.cpp | 18 ++--- .../StagefrightMetadataRetriever.cpp | 2 +- media/libstagefright/TimedEventQueue.cpp | 4 +- media/libstagefright/codecs/aacdec/SoftAAC.cpp | 8 +- media/libstagefright/codecs/aacenc/AACEncoder.cpp | 4 +- .../codecs/amrnb/enc/AMRNBEncoder.cpp | 4 +- .../codecs/amrwbenc/AMRWBEncoder.cpp | 4 +- media/libstagefright/codecs/avc/enc/AVCEncoder.cpp | 4 +- .../codecs/m4v_h263/dec/SoftMPEG4.cpp | 2 +- .../codecs/m4v_h263/enc/M4vH263Encoder.cpp | 6 +- .../codecs/vorbis/dec/SoftVorbis.cpp | 2 +- .../colorconversion/SoftwareRenderer.cpp | 4 +- .../foundation/AHierarchicalStateMachine.cpp | 2 +- media/libstagefright/foundation/ALooperRoster.cpp | 8 +- media/libstagefright/mpeg2ts/ESQueue.cpp | 2 +- media/libstagefright/omx/OMXNodeInstance.cpp | 2 +- media/libstagefright/rtsp/ARTPConnection.cpp | 6 +- media/libstagefright/rtsp/ARTPSource.cpp | 6 +- media/libstagefright/rtsp/ARTSPConnection.cpp | 2 +- media/libstagefright/rtsp/MyHandler.h | 22 +++--- services/audioflinger/AudioFlinger.cpp | 88 +++++++++++----------- services/audioflinger/AudioMixer.cpp | 2 +- services/audioflinger/AudioPolicyService.cpp | 30 ++++---- services/audioflinger/AudioResamplerCubic.cpp | 12 +-- services/camera/libcameraservice/CameraService.cpp | 14 ++-- 56 files changed, 257 insertions(+), 257 deletions(-) diff --git a/camera/Camera.cpp b/camera/Camera.cpp index eef1dd2..d28b7f8 100644 --- a/camera/Camera.cpp +++ b/camera/Camera.cpp @@ -47,7 +47,7 @@ const sp& Camera::getCameraService() binder = sm->getService(String16("media.camera")); if (binder != 0) break; - LOGW("CameraService not published, waiting..."); + ALOGW("CameraService not published, waiting..."); usleep(500000); // 0.5 s } while(true); if (mDeathNotifier == NULL) { @@ -397,13 +397,13 @@ void Camera::dataCallbackTimestamp(nsecs_t timestamp, int32_t msgType, const sp< if (listener != NULL) { listener->postDataTimestamp(timestamp, msgType, dataPtr); } else { - LOGW("No listener was set. Drop a recording frame."); + ALOGW("No listener was set. Drop a recording frame."); releaseRecordingFrame(dataPtr); } } void Camera::binderDied(const wp& who) { - LOGW("ICamera died"); + ALOGW("ICamera died"); notifyCallback(CAMERA_MSG_ERROR, CAMERA_ERROR_SERVER_DIED, 0); } @@ -411,7 +411,7 @@ void Camera::DeathNotifier::binderDied(const wp& who) { ALOGV("binderDied"); Mutex::Autolock _l(Camera::mLock); Camera::mCameraService.clear(); - LOGW("Camera server died!"); + ALOGW("Camera server died!"); } sp Camera::getRecordingProxy() { diff --git a/drm/libdrmframework/DrmManagerClientImpl.cpp b/drm/libdrmframework/DrmManagerClientImpl.cpp index 67f58ca..b222b8f 100644 --- a/drm/libdrmframework/DrmManagerClientImpl.cpp +++ b/drm/libdrmframework/DrmManagerClientImpl.cpp @@ -54,7 +54,7 @@ const sp& DrmManagerClientImpl::getDrmManagerService() { if (binder != 0) { break; } - LOGW("DrmManagerService not published, waiting..."); + ALOGW("DrmManagerService not published, waiting..."); struct timespec reqt; reqt.tv_sec = 0; reqt.tv_nsec = 500000000; //0.5 sec @@ -342,6 +342,6 @@ DrmManagerClientImpl::DeathNotifier::~DeathNotifier() { void DrmManagerClientImpl::DeathNotifier::binderDied(const wp& who) { Mutex::Autolock lock(sMutex); DrmManagerClientImpl::sDrmManagerService.clear(); - LOGW("DrmManager server died!"); + ALOGW("DrmManager server died!"); } diff --git a/media/libeffects/factory/EffectsFactory.c b/media/libeffects/factory/EffectsFactory.c index ee2279a..9f6599f 100644 --- a/media/libeffects/factory/EffectsFactory.c +++ b/media/libeffects/factory/EffectsFactory.c @@ -279,7 +279,7 @@ int EffectCreate(effect_uuid_t *uuid, int32_t sessionId, int32_t ioId, effect_ha ret = init(); if (ret < 0) { - LOGW("EffectCreate() init error: %d", ret); + ALOGW("EffectCreate() init error: %d", ret); return ret; } @@ -293,7 +293,7 @@ int EffectCreate(effect_uuid_t *uuid, int32_t sessionId, int32_t ioId, effect_ha // create effect in library ret = l->desc->create_effect(uuid, sessionId, ioId, &itfe); if (ret != 0) { - LOGW("EffectCreate() library %s: could not create fx %s, error %d", l->name, d->name, ret); + ALOGW("EffectCreate() library %s: could not create fx %s, error %d", l->name, d->name, ret); goto exit; } @@ -359,7 +359,7 @@ int EffectRelease(effect_handle_t handle) // release effect in library if (fx->lib == NULL) { - LOGW("EffectRelease() fx %p library already unloaded", handle); + ALOGW("EffectRelease() fx %p library already unloaded", handle); } else { pthread_mutex_lock(&fx->lib->lock); fx->lib->desc->release_effect(fx->subItfe); @@ -456,24 +456,24 @@ int loadLibrary(cnode *root, const char *name) hdl = dlopen(node->value, RTLD_NOW); if (hdl == NULL) { - LOGW("loadLibrary() failed to open %s", node->value); + ALOGW("loadLibrary() failed to open %s", node->value); goto error; } desc = (audio_effect_library_t *)dlsym(hdl, AUDIO_EFFECT_LIBRARY_INFO_SYM_AS_STR); if (desc == NULL) { - LOGW("loadLibrary() could not find symbol %s", AUDIO_EFFECT_LIBRARY_INFO_SYM_AS_STR); + ALOGW("loadLibrary() could not find symbol %s", AUDIO_EFFECT_LIBRARY_INFO_SYM_AS_STR); goto error; } if (AUDIO_EFFECT_LIBRARY_TAG != desc->tag) { - LOGW("getLibrary() bad tag %08x in lib info struct", desc->tag); + ALOGW("getLibrary() bad tag %08x in lib info struct", desc->tag); goto error; } if (EFFECT_API_VERSION_MAJOR(desc->version) != EFFECT_API_VERSION_MAJOR(EFFECT_LIBRARY_API_VERSION)) { - LOGW("loadLibrary() bad lib version %08x", desc->version); + ALOGW("loadLibrary() bad lib version %08x", desc->version); goto error; } @@ -534,7 +534,7 @@ int loadEffect(cnode *root) l = getLibrary(node->value); if (l == NULL) { - LOGW("loadEffect() could not get library %s", node->value); + ALOGW("loadEffect() could not get library %s", node->value); return -EINVAL; } @@ -543,7 +543,7 @@ int loadEffect(cnode *root) return -EINVAL; } if (stringToUuid(node->value, &uuid) != 0) { - LOGW("loadEffect() invalid uuid %s", node->value); + ALOGW("loadEffect() invalid uuid %s", node->value); return -EINVAL; } @@ -551,7 +551,7 @@ int loadEffect(cnode *root) if (l->desc->get_descriptor(&uuid, d) != 0) { char s[40]; uuidToString(&uuid, s, 40); - LOGW("Error querying effect %s on lib %s", s, l->name); + ALOGW("Error querying effect %s on lib %s", s, l->name); free(d); return -EINVAL; } @@ -562,7 +562,7 @@ int loadEffect(cnode *root) #endif if (EFFECT_API_VERSION_MAJOR(d->apiVersion) != EFFECT_API_VERSION_MAJOR(EFFECT_CONTROL_API_VERSION)) { - LOGW("Bad API version %08x on lib %s", d->apiVersion, l->name); + ALOGW("Bad API version %08x on lib %s", d->apiVersion, l->name); free(d); return -EINVAL; } diff --git a/media/libeffects/preprocessing/PreProcessing.cpp b/media/libeffects/preprocessing/PreProcessing.cpp index c99552b..8dfcb78 100755 --- a/media/libeffects/preprocessing/PreProcessing.cpp +++ b/media/libeffects/preprocessing/PreProcessing.cpp @@ -240,7 +240,7 @@ int AgcCreate(preproc_effect_t *effect) webrtc::GainControl *agc = effect->session->apm->gain_control(); ALOGV("AgcCreate got agc %p", agc); if (agc == NULL) { - LOGW("AgcCreate Error"); + ALOGW("AgcCreate Error"); return -ENOMEM; } effect->engine = static_cast(agc); @@ -280,7 +280,7 @@ int AgcGetParameter(preproc_effect_t *effect, break; default: - LOGW("AgcGetParameter() unknown param %08x", param); + ALOGW("AgcGetParameter() unknown param %08x", param); status = -EINVAL; break; } @@ -305,7 +305,7 @@ int AgcGetParameter(preproc_effect_t *effect, pProperties->limiterEnabled = (bool)agc->is_limiter_enabled(); break; default: - LOGW("AgcGetParameter() unknown param %d", param); + ALOGW("AgcGetParameter() unknown param %d", param); status = -EINVAL; break; } @@ -344,7 +344,7 @@ int AgcSetParameter (preproc_effect_t *effect, void *pParam, void *pValue) status = agc->enable_limiter(pProperties->limiterEnabled); break; default: - LOGW("AgcSetParameter() unknown param %08x value %08x", param, *(uint32_t *)pValue); + ALOGW("AgcSetParameter() unknown param %08x value %08x", param, *(uint32_t *)pValue); status = -EINVAL; break; } @@ -403,7 +403,7 @@ int AecCreate(preproc_effect_t *effect) webrtc::EchoControlMobile *aec = effect->session->apm->echo_control_mobile(); ALOGV("AecCreate got aec %p", aec); if (aec == NULL) { - LOGW("AgcCreate Error"); + ALOGW("AgcCreate Error"); return -ENOMEM; } effect->engine = static_cast(aec); @@ -429,7 +429,7 @@ int AecGetParameter(preproc_effect_t *effect, ALOGV("AecGetParameter() echo delay %d us", *(uint32_t *)pValue); break; default: - LOGW("AecGetParameter() unknown param %08x value %08x", param, *(uint32_t *)pValue); + ALOGW("AecGetParameter() unknown param %08x value %08x", param, *(uint32_t *)pValue); status = -EINVAL; break; } @@ -449,7 +449,7 @@ int AecSetParameter (preproc_effect_t *effect, void *pParam, void *pValue) ALOGV("AecSetParameter() echo delay %d us, status %d", value, status); break; default: - LOGW("AecSetParameter() unknown param %08x value %08x", param, *(uint32_t *)pValue); + ALOGW("AecSetParameter() unknown param %08x value %08x", param, *(uint32_t *)pValue); status = -EINVAL; break; } @@ -522,7 +522,7 @@ int NsCreate(preproc_effect_t *effect) webrtc::NoiseSuppression *ns = effect->session->apm->noise_suppression(); ALOGV("NsCreate got ns %p", ns); if (ns == NULL) { - LOGW("AgcCreate Error"); + ALOGW("AgcCreate Error"); return -ENOMEM; } effect->engine = static_cast(ns); @@ -730,7 +730,7 @@ extern "C" int Session_CreateEffect(preproc_session_t *session, if (session->createdMsk == 0) { session->apm = webrtc::AudioProcessing::Create(session->io); if (session->apm == NULL) { - LOGW("Session_CreateEffect could not get apm engine"); + ALOGW("Session_CreateEffect could not get apm engine"); goto error; } session->apm->set_sample_rate_hz(kPreprocDefaultSr); @@ -738,12 +738,12 @@ extern "C" int Session_CreateEffect(preproc_session_t *session, session->apm->set_num_reverse_channels(kPreProcDefaultCnl); session->procFrame = new webrtc::AudioFrame(); if (session->procFrame == NULL) { - LOGW("Session_CreateEffect could not allocate audio frame"); + ALOGW("Session_CreateEffect could not allocate audio frame"); goto error; } session->revFrame = new webrtc::AudioFrame(); if (session->revFrame == NULL) { - LOGW("Session_CreateEffect could not allocate reverse audio frame"); + ALOGW("Session_CreateEffect could not allocate reverse audio frame"); goto error; } session->apmSamplingRate = kPreprocDefaultSr; @@ -794,7 +794,7 @@ error: int Session_ReleaseEffect(preproc_session_t *session, preproc_effect_t *fx) { - LOGW_IF(Effect_Release(fx) != 0, " Effect_Release() failed for proc ID %d", fx->procId); + ALOGW_IF(Effect_Release(fx) != 0, " Effect_Release() failed for proc ID %d", fx->procId); session->createdMsk &= ~(1<procId); if (session->createdMsk == 0) { webrtc::AudioProcessing::Destroy(session->apm); @@ -904,7 +904,7 @@ int Session_SetConfig(preproc_session_t *session, effect_config_t *config) RESAMPLER_QUALITY, &error); if (session->inResampler == NULL) { - LOGW("Session_SetConfig Cannot create speex resampler: %s", + ALOGW("Session_SetConfig Cannot create speex resampler: %s", speex_resampler_strerror(error)); return -EINVAL; } @@ -914,7 +914,7 @@ int Session_SetConfig(preproc_session_t *session, effect_config_t *config) RESAMPLER_QUALITY, &error); if (session->outResampler == NULL) { - LOGW("Session_SetConfig Cannot create speex resampler: %s", + ALOGW("Session_SetConfig Cannot create speex resampler: %s", speex_resampler_strerror(error)); speex_resampler_destroy(session->inResampler); session->inResampler = NULL; @@ -926,7 +926,7 @@ int Session_SetConfig(preproc_session_t *session, effect_config_t *config) RESAMPLER_QUALITY, &error); if (session->revResampler == NULL) { - LOGW("Session_SetConfig Cannot create speex resampler: %s", + ALOGW("Session_SetConfig Cannot create speex resampler: %s", speex_resampler_strerror(error)); speex_resampler_destroy(session->inResampler); session->inResampler = NULL; @@ -1105,7 +1105,7 @@ int PreProcessingFx_Process(effect_handle_t self, if (inBuffer == NULL || inBuffer->raw == NULL || outBuffer == NULL || outBuffer->raw == NULL){ - LOGW("PreProcessingFx_Process() ERROR bad pointer"); + ALOGW("PreProcessingFx_Process() ERROR bad pointer"); return -EINVAL; } @@ -1443,13 +1443,13 @@ int PreProcessingFx_ProcessReverse(effect_handle_t self, int status = 0; if (effect == NULL){ - LOGW("PreProcessingFx_ProcessReverse() ERROR effect == NULL"); + ALOGW("PreProcessingFx_ProcessReverse() ERROR effect == NULL"); return -EINVAL; } preproc_session_t * session = (preproc_session_t *)effect->session; if (inBuffer == NULL || inBuffer->raw == NULL){ - LOGW("PreProcessingFx_ProcessReverse() ERROR bad pointer"); + ALOGW("PreProcessingFx_ProcessReverse() ERROR bad pointer"); return -EINVAL; } @@ -1585,14 +1585,14 @@ int PreProcessingLib_Create(effect_uuid_t *uuid, } desc = PreProc_GetDescriptor(uuid); if (desc == NULL) { - LOGW("EffectCreate: fx not found uuid: %08x", uuid->timeLow); + ALOGW("EffectCreate: fx not found uuid: %08x", uuid->timeLow); return -EINVAL; } procId = UuidToProcId(&desc->type); session = PreProc_GetSession(procId, sessionId, ioId); if (session == NULL) { - LOGW("EffectCreate: no more session available"); + ALOGW("EffectCreate: no more session available"); return -EINVAL; } diff --git a/media/libeffects/testlibs/EffectEqualizer.cpp b/media/libeffects/testlibs/EffectEqualizer.cpp index 52fbf79..5241660 100644 --- a/media/libeffects/testlibs/EffectEqualizer.cpp +++ b/media/libeffects/testlibs/EffectEqualizer.cpp @@ -165,7 +165,7 @@ extern "C" int EffectCreate(effect_uuid_t *uuid, ret = Equalizer_init(pContext); if (ret < 0) { - LOGW("EffectLibCreateEffect() init failed"); + ALOGW("EffectLibCreateEffect() init failed"); delete pContext; return ret; } @@ -735,7 +735,7 @@ extern "C" int Equalizer_command(effect_handle_t self, uint32_t cmdCode, uint32_ case EFFECT_CMD_SET_AUDIO_MODE: break; default: - LOGW("Equalizer_command invalid command %d",cmdCode); + ALOGW("Equalizer_command invalid command %d",cmdCode); return -EINVAL; } diff --git a/media/libeffects/testlibs/EffectReverb.c b/media/libeffects/testlibs/EffectReverb.c index 419a41c..ebb72c1 100644 --- a/media/libeffects/testlibs/EffectReverb.c +++ b/media/libeffects/testlibs/EffectReverb.c @@ -154,7 +154,7 @@ int EffectCreate(effect_uuid_t *uuid, } ret = Reverb_Init(module, aux, preset); if (ret < 0) { - LOGW("EffectLibCreateEffect() init failed"); + ALOGW("EffectLibCreateEffect() init failed"); free(module); return ret; } @@ -405,7 +405,7 @@ static int Reverb_Command(effect_handle_t self, uint32_t cmdCode, uint32_t cmdSi ALOGV("Reverb_Command EFFECT_CMD_SET_AUDIO_MODE: %d", *(uint32_t *)pCmdData); break; default: - LOGW("Reverb_Command invalid command %d",cmdCode); + ALOGW("Reverb_Command invalid command %d",cmdCode); return -EINVAL; } diff --git a/media/libeffects/visualizer/EffectVisualizer.cpp b/media/libeffects/visualizer/EffectVisualizer.cpp index b2a7a35..5d70a9b 100644 --- a/media/libeffects/visualizer/EffectVisualizer.cpp +++ b/media/libeffects/visualizer/EffectVisualizer.cpp @@ -212,7 +212,7 @@ int VisualizerLib_Create(effect_uuid_t *uuid, ret = Visualizer_init(pContext); if (ret < 0) { - LOGW("VisualizerLib_Create() init failed"); + ALOGW("VisualizerLib_Create() init failed"); delete pContext; return ret; } @@ -472,7 +472,7 @@ int Visualizer_command(effect_handle_t self, uint32_t cmdCode, uint32_t cmdSize, break; default: - LOGW("Visualizer_command invalid command %d",cmdCode); + ALOGW("Visualizer_command invalid command %d",cmdCode); return -EINVAL; } diff --git a/media/libmedia/AudioEffect.cpp b/media/libmedia/AudioEffect.cpp index 6e53a15..d74389d 100644 --- a/media/libmedia/AudioEffect.cpp +++ b/media/libmedia/AudioEffect.cpp @@ -101,7 +101,7 @@ status_t AudioEffect::set(const effect_uuid_t *type, ALOGV("set %p mUserData: %p uuid: %p timeLow %08x", this, user, type, type ? type->timeLow : 0); if (mIEffect != 0) { - LOGW("Effect already in use"); + ALOGW("Effect already in use"); return INVALID_OPERATION; } @@ -112,7 +112,7 @@ status_t AudioEffect::set(const effect_uuid_t *type, } if (type == NULL && uuid == NULL) { - LOGW("Must specify at least type or uuid"); + ALOGW("Must specify at least type or uuid"); return BAD_VALUE; } @@ -340,7 +340,7 @@ status_t AudioEffect::getParameter(effect_param_t *param) void AudioEffect::binderDied() { - LOGW("IEffect died"); + ALOGW("IEffect died"); mStatus = NO_INIT; if (mCbf) { status_t status = DEAD_OBJECT; diff --git a/media/libmedia/AudioRecord.cpp b/media/libmedia/AudioRecord.cpp index dd1c6a5..c1591a4 100644 --- a/media/libmedia/AudioRecord.cpp +++ b/media/libmedia/AudioRecord.cpp @@ -535,7 +535,7 @@ status_t AudioRecord::obtainBuffer(Buffer* audioBuffer, int32_t waitCount) if (CC_UNLIKELY(result != NO_ERROR)) { cblk->waitTimeMs += waitTimeMs; if (cblk->waitTimeMs >= cblk->bufferTimeoutMs) { - LOGW( "obtainBuffer timed out (is the CPU pegged?) " + ALOGW( "obtainBuffer timed out (is the CPU pegged?) " "user=%08x, server=%08x", cblk->user, cblk->server); cblk->lock.unlock(); result = mAudioRecord->start(); @@ -546,7 +546,7 @@ create_new_record: result = AudioRecord::restoreRecord_l(cblk); } if (result != NO_ERROR) { - LOGW("obtainBuffer create Track error %d", result); + ALOGW("obtainBuffer create Track error %d", result); cblk->lock.unlock(); return result; } @@ -764,7 +764,7 @@ status_t AudioRecord::restoreRecord_l(audio_track_cblk_t*& cblk) status_t result; if (!(android_atomic_or(CBLK_RESTORING_ON, &cblk->flags) & CBLK_RESTORING_MSK)) { - LOGW("dead IAudioRecord, creating a new one"); + ALOGW("dead IAudioRecord, creating a new one"); // signal old cblk condition so that other threads waiting for available buffers stop // waiting now cblk->cv.broadcast(); @@ -787,13 +787,13 @@ status_t AudioRecord::restoreRecord_l(audio_track_cblk_t*& cblk) cblk->cv.broadcast(); } else { if (!(cblk->flags & CBLK_RESTORED_MSK)) { - LOGW("dead IAudioRecord, waiting for a new one to be created"); + ALOGW("dead IAudioRecord, waiting for a new one to be created"); mLock.unlock(); result = cblk->cv.waitRelative(cblk->lock, milliseconds(RESTORE_TIMEOUT_MS)); cblk->lock.unlock(); mLock.lock(); } else { - LOGW("dead IAudioRecord, already restored"); + ALOGW("dead IAudioRecord, already restored"); result = NO_ERROR; cblk->lock.unlock(); } @@ -810,7 +810,7 @@ status_t AudioRecord::restoreRecord_l(audio_track_cblk_t*& cblk) } cblk->lock.lock(); - LOGW_IF(result != NO_ERROR, "restoreRecord_l() error %d", result); + ALOGW_IF(result != NO_ERROR, "restoreRecord_l() error %d", result); return result; } diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp index 61d0dad..0ef1885 100644 --- a/media/libmedia/AudioSystem.cpp +++ b/media/libmedia/AudioSystem.cpp @@ -56,7 +56,7 @@ const sp& AudioSystem::get_audio_flinger() binder = sm->getService(String16("media.audio_flinger")); if (binder != 0) break; - LOGW("AudioFlinger not published, waiting..."); + ALOGW("AudioFlinger not published, waiting..."); usleep(500000); // 0.5 s } while(true); if (gAudioFlingerClient == NULL) { @@ -383,7 +383,7 @@ void AudioSystem::AudioFlingerClient::binderDied(const wp& who) { if (gAudioErrorCallback) { gAudioErrorCallback(DEAD_OBJECT); } - LOGW("AudioFlinger server died!"); + ALOGW("AudioFlinger server died!"); } void AudioSystem::AudioFlingerClient::ioConfigChanged(int event, int ioHandle, void *param2) { @@ -419,7 +419,7 @@ void AudioSystem::AudioFlingerClient::ioConfigChanged(int event, int ioHandle, v } break; case OUTPUT_CLOSED: { if (gOutputs.indexOfKey(ioHandle) < 0) { - LOGW("ioConfigChanged() closing unknow output! %d", ioHandle); + ALOGW("ioConfigChanged() closing unknow output! %d", ioHandle); break; } ALOGV("ioConfigChanged() output %d closed", ioHandle); @@ -435,7 +435,7 @@ void AudioSystem::AudioFlingerClient::ioConfigChanged(int event, int ioHandle, v case OUTPUT_CONFIG_CHANGED: { int index = gOutputs.indexOfKey(ioHandle); if (index < 0) { - LOGW("ioConfigChanged() modifying unknow output! %d", ioHandle); + ALOGW("ioConfigChanged() modifying unknow output! %d", ioHandle); break; } if (param2 == 0) break; @@ -491,7 +491,7 @@ const sp& AudioSystem::get_audio_policy_service() binder = sm->getService(String16("media.audio_policy")); if (binder != 0) break; - LOGW("AudioPolicyService not published, waiting..."); + ALOGW("AudioPolicyService not published, waiting..."); usleep(500000); // 0.5 s } while(true); if (gAudioPolicyServiceClient == NULL) { @@ -747,7 +747,7 @@ void AudioSystem::AudioPolicyServiceClient::binderDied(const wp& who) { Mutex::Autolock _l(AudioSystem::gLock); AudioSystem::gAudioPolicyService.clear(); - LOGW("AudioPolicyService server died!"); + ALOGW("AudioPolicyService server died!"); } }; // namespace android diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp index e0c6ca5..891e331 100644 --- a/media/libmedia/AudioTrack.cpp +++ b/media/libmedia/AudioTrack.cpp @@ -883,7 +883,7 @@ status_t AudioTrack::obtainBuffer(Buffer* audioBuffer, int32_t waitCount) // timing out when a loop has been set and we have already written upto loop end // is a normal condition: no need to wake AudioFlinger up. if (cblk->user < cblk->loopEnd) { - LOGW( "obtainBuffer timed out (is the CPU pegged?) %p " + ALOGW( "obtainBuffer timed out (is the CPU pegged?) %p " "user=%08x, server=%08x", this, cblk->user, cblk->server); //unlock cblk mutex before calling mAudioTrack->start() (see issue #1617140) cblk->lock.unlock(); @@ -895,7 +895,7 @@ create_new_track: result = restoreTrack_l(cblk, false); } if (result != NO_ERROR) { - LOGW("obtainBuffer create Track error %d", result); + ALOGW("obtainBuffer create Track error %d", result); cblk->lock.unlock(); return result; } @@ -918,7 +918,7 @@ create_new_track: // restart track if it was disabled by audioflinger due to previous underrun if (mActive && (cblk->flags & CBLK_DISABLED_MSK)) { android_atomic_and(~CBLK_DISABLED_ON, &cblk->flags); - LOGW("obtainBuffer() track %p disabled, restarting", this); + ALOGW("obtainBuffer() track %p disabled, restarting", this); mAudioTrack->start(); } @@ -1164,7 +1164,7 @@ status_t AudioTrack::restoreTrack_l(audio_track_cblk_t*& cblk, bool fromStart) status_t result; if (!(android_atomic_or(CBLK_RESTORING_ON, &cblk->flags) & CBLK_RESTORING_MSK)) { - LOGW("dead IAudioTrack, creating a new one from %s TID %d", + ALOGW("dead IAudioTrack, creating a new one from %s TID %d", fromStart ? "start()" : "obtainBuffer()", gettid()); // signal old cblk condition so that other threads waiting for available buffers stop @@ -1220,7 +1220,7 @@ status_t AudioTrack::restoreTrack_l(audio_track_cblk_t*& cblk, bool fromStart) } if (mActive) { result = mAudioTrack->start(); - LOGW_IF(result != NO_ERROR, "restoreTrack_l() start() failed status %d", result); + ALOGW_IF(result != NO_ERROR, "restoreTrack_l() start() failed status %d", result); } if (fromStart && result == NO_ERROR) { mNewPosition = mCblk->server + mUpdatePeriod; @@ -1228,7 +1228,7 @@ status_t AudioTrack::restoreTrack_l(audio_track_cblk_t*& cblk, bool fromStart) } if (result != NO_ERROR) { android_atomic_and(~CBLK_RESTORING_ON, &cblk->flags); - LOGW_IF(result != NO_ERROR, "restoreTrack_l() failed status %d", result); + ALOGW_IF(result != NO_ERROR, "restoreTrack_l() failed status %d", result); } mRestoreStatus = result; // signal old cblk condition for other threads waiting for restore completion @@ -1236,7 +1236,7 @@ status_t AudioTrack::restoreTrack_l(audio_track_cblk_t*& cblk, bool fromStart) cblk->cv.broadcast(); } else { if (!(cblk->flags & CBLK_RESTORED_MSK)) { - LOGW("dead IAudioTrack, waiting for a new one TID %d", gettid()); + ALOGW("dead IAudioTrack, waiting for a new one TID %d", gettid()); mLock.unlock(); result = cblk->cv.waitRelative(cblk->lock, milliseconds(RESTORE_TIMEOUT_MS)); if (result == NO_ERROR) { @@ -1245,7 +1245,7 @@ status_t AudioTrack::restoreTrack_l(audio_track_cblk_t*& cblk, bool fromStart) cblk->lock.unlock(); mLock.lock(); } else { - LOGW("dead IAudioTrack, already restored TID %d", gettid()); + ALOGW("dead IAudioTrack, already restored TID %d", gettid()); result = mRestoreStatus; cblk->lock.unlock(); } @@ -1259,7 +1259,7 @@ status_t AudioTrack::restoreTrack_l(audio_track_cblk_t*& cblk, bool fromStart) } cblk->lock.lock(); - LOGW_IF(result != NO_ERROR, "restoreTrack_l() error %d TID %d", result, gettid()); + ALOGW_IF(result != NO_ERROR, "restoreTrack_l() error %d TID %d", result, gettid()); return result; } @@ -1328,7 +1328,7 @@ uint32_t audio_track_cblk_t::stepUser(uint32_t frameCount) bufferTimeoutMs = MAX_RUN_TIMEOUT_MS; } } else if (u > server) { - LOGW("stepServer occurred after track reset"); + ALOGW("stepServer occurred after track reset"); u = server; } @@ -1349,7 +1349,7 @@ uint32_t audio_track_cblk_t::stepUser(uint32_t frameCount) bool audio_track_cblk_t::stepServer(uint32_t frameCount) { if (!tryLock()) { - LOGW("stepServer() could not lock cblk"); + ALOGW("stepServer() could not lock cblk"); return false; } @@ -1367,13 +1367,13 @@ bool audio_track_cblk_t::stepServer(uint32_t frameCount) // stepServer() is called After the flush() has reset u & s and // we have s > u if (s > user) { - LOGW("stepServer occurred after track reset"); + ALOGW("stepServer occurred after track reset"); s = user; } } if (s >= loopEnd) { - LOGW_IF(s > loopEnd, "stepServer: s %u > loopEnd %u", s, loopEnd); + ALOGW_IF(s > loopEnd, "stepServer: s %u > loopEnd %u", s, loopEnd); s = loopStart; if (--loopCount == 0) { loopEnd = UINT_MAX; @@ -1428,7 +1428,7 @@ uint32_t audio_track_cblk_t::framesReady() } else { // do not block on mutex shared with client on AudioFlinger side if (!tryLock()) { - LOGW("framesReady() could not lock cblk"); + ALOGW("framesReady() could not lock cblk"); return 0; } uint32_t frames = UINT_MAX; diff --git a/media/libmedia/IAudioRecord.cpp b/media/libmedia/IAudioRecord.cpp index ba0d55b..8c7a960 100644 --- a/media/libmedia/IAudioRecord.cpp +++ b/media/libmedia/IAudioRecord.cpp @@ -50,7 +50,7 @@ public: if (status == NO_ERROR) { status = reply.readInt32(); } else { - LOGW("start() error: %s", strerror(-status)); + ALOGW("start() error: %s", strerror(-status)); } return status; } diff --git a/media/libmedia/IAudioTrack.cpp b/media/libmedia/IAudioTrack.cpp index bc8ff34..0b372f3 100644 --- a/media/libmedia/IAudioTrack.cpp +++ b/media/libmedia/IAudioTrack.cpp @@ -54,7 +54,7 @@ public: if (status == NO_ERROR) { status = reply.readInt32(); } else { - LOGW("start() error: %s", strerror(-status)); + ALOGW("start() error: %s", strerror(-status)); } return status; } @@ -109,7 +109,7 @@ public: if (status == NO_ERROR) { status = reply.readInt32(); } else { - LOGW("attachAuxEffect() error: %s", strerror(-status)); + ALOGW("attachAuxEffect() error: %s", strerror(-status)); } return status; } diff --git a/media/libmedia/IMediaDeathNotifier.cpp b/media/libmedia/IMediaDeathNotifier.cpp index da33edb..08b2286 100644 --- a/media/libmedia/IMediaDeathNotifier.cpp +++ b/media/libmedia/IMediaDeathNotifier.cpp @@ -44,7 +44,7 @@ IMediaDeathNotifier::getMediaPlayerService() if (binder != 0) { break; } - LOGW("Media player service not published, waiting..."); + ALOGW("Media player service not published, waiting..."); usleep(500000); // 0.5 s } while(true); @@ -76,7 +76,7 @@ IMediaDeathNotifier::removeObitRecipient(const wp& recipien void IMediaDeathNotifier::DeathNotifier::binderDied(const wp& who) { - LOGW("media server died"); + ALOGW("media server died"); // Need to do this with the lock held SortedVector< wp > list; diff --git a/media/libmedia/IOMX.cpp b/media/libmedia/IOMX.cpp index 7d2fbce..d2f5f71 100644 --- a/media/libmedia/IOMX.cpp +++ b/media/libmedia/IOMX.cpp @@ -407,7 +407,7 @@ IMPLEMENT_META_INTERFACE(OMX, "android.hardware.IOMX"); #define CHECK_INTERFACE(interface, data, reply) \ do { if (!data.enforceInterface(interface::getInterfaceDescriptor())) { \ - LOGW("Call incorrectly routed to " #interface); \ + ALOGW("Call incorrectly routed to " #interface); \ return PERMISSION_DENIED; \ } } while (0) diff --git a/media/libmedia/MediaProfiles.cpp b/media/libmedia/MediaProfiles.cpp index 109f294..c9e8bc2 100644 --- a/media/libmedia/MediaProfiles.cpp +++ b/media/libmedia/MediaProfiles.cpp @@ -620,7 +620,7 @@ MediaProfiles::getInstance() const char *defaultXmlFile = "/etc/media_profiles.xml"; FILE *fp = fopen(defaultXmlFile, "r"); if (fp == NULL) { - LOGW("could not find media config xml file"); + ALOGW("could not find media config xml file"); sInstance = createDefaultInstance(); } else { fclose(fp); // close the file first. diff --git a/media/libmedia/MediaScanner.cpp b/media/libmedia/MediaScanner.cpp index cda185f..79cab74 100644 --- a/media/libmedia/MediaScanner.cpp +++ b/media/libmedia/MediaScanner.cpp @@ -153,7 +153,7 @@ MediaScanResult MediaScanner::doProcessDirectory( DIR* dir = opendir(path); if (!dir) { - LOGW("Error opening directory '%s', skipping: %s.", path, strerror(errno)); + ALOGW("Error opening directory '%s', skipping: %s.", path, strerror(errno)); return MEDIA_SCAN_RESULT_SKIPPED; } diff --git a/media/libmedia/ToneGenerator.cpp b/media/libmedia/ToneGenerator.cpp index 28b54b5..6a38ff1 100644 --- a/media/libmedia/ToneGenerator.cpp +++ b/media/libmedia/ToneGenerator.cpp @@ -950,7 +950,7 @@ bool ToneGenerator::startTone(int toneType, int durationMs) { mLock.unlock(); ALOGV_IF(lResult, "Tone started, time %d\n", (unsigned int)(systemTime()/1000000)); - LOGW_IF(!lResult, "Tone start failed!!!, time %d\n", (unsigned int)(systemTime()/1000000)); + ALOGW_IF(!lResult, "Tone start failed!!!, time %d\n", (unsigned int)(systemTime()/1000000)); return lResult; } @@ -1261,7 +1261,7 @@ audioCallback_EndLoop: // must reload lpToneDesc as prepareWave() may change mpToneDesc lpToneDesc = lpToneGen->mpToneDesc; } else { - LOGW("Cbk restarting prepareWave() failed\n"); + ALOGW("Cbk restarting prepareWave() failed\n"); lpToneGen->mState = TONE_IDLE; lpToneGen->mpAudioTrack->stop(); // Force loop exit diff --git a/media/libmedia/mediametadataretriever.cpp b/media/libmedia/mediametadataretriever.cpp index fd8c065..1658f41 100644 --- a/media/libmedia/mediametadataretriever.cpp +++ b/media/libmedia/mediametadataretriever.cpp @@ -43,7 +43,7 @@ const sp& MediaMetadataRetriever::getService() if (binder != 0) { break; } - LOGW("MediaPlayerService not published, waiting..."); + ALOGW("MediaPlayerService not published, waiting..."); usleep(500000); // 0.5 s } while(true); if (sDeathNotifier == NULL) { @@ -160,7 +160,7 @@ sp MediaMetadataRetriever::extractAlbumArt() void MediaMetadataRetriever::DeathNotifier::binderDied(const wp& who) { Mutex::Autolock lock(MediaMetadataRetriever::sServiceLock); MediaMetadataRetriever::sService.clear(); - LOGW("MediaMetadataRetriever server died!"); + ALOGW("MediaMetadataRetriever server died!"); } MediaMetadataRetriever::DeathNotifier::~DeathNotifier() diff --git a/media/libmedia/mediaplayer.cpp b/media/libmedia/mediaplayer.cpp index 695c4a8..6054749 100644 --- a/media/libmedia/mediaplayer.cpp +++ b/media/libmedia/mediaplayer.cpp @@ -417,10 +417,10 @@ status_t MediaPlayer::seekTo_l(int msec) ALOGV("seekTo %d", msec); if ((mPlayer != 0) && ( mCurrentState & ( MEDIA_PLAYER_STARTED | MEDIA_PLAYER_PREPARED | MEDIA_PLAYER_PAUSED | MEDIA_PLAYER_PLAYBACK_COMPLETE) ) ) { if ( msec < 0 ) { - LOGW("Attempt to seek to invalid position: %d", msec); + ALOGW("Attempt to seek to invalid position: %d", msec); msec = 0; } else if ((mDuration > 0) && (msec > mDuration)) { - LOGW("Attempt to seek to past end of file: request = %d, EOF = %d", msec, mDuration); + ALOGW("Attempt to seek to past end of file: request = %d, EOF = %d", msec, mDuration); msec = mDuration; } // cache duration @@ -666,7 +666,7 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj) // ext1: Media framework error code. // ext2: Implementation dependant error code. if (ext1 != MEDIA_INFO_VIDEO_TRACK_LAGGING) { - LOGW("info/warning (%d, %d)", ext1, ext2); + ALOGW("info/warning (%d, %d)", ext1, ext2); } break; case MEDIA_SEEK_COMPLETE: diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp index 487c433..91221ac 100644 --- a/media/libmediaplayerservice/MediaPlayerService.cpp +++ b/media/libmediaplayerservice/MediaPlayerService.cpp @@ -794,7 +794,7 @@ void MediaPlayerService::Client::disconnectNativeWindow() { NATIVE_WINDOW_API_MEDIA); if (err != OK) { - LOGW("native_window_api_disconnect returned an error: %s (%d)", + ALOGW("native_window_api_disconnect returned an error: %s (%d)", strerror(-err), err); } } @@ -1772,7 +1772,7 @@ void MediaPlayerService::addBatteryData(uint32_t params) } else if (params & kBatteryDataAudioFlingerStop) { if (mBatteryAudio.refCount <= 0) { - LOGW("Battery track warning: refCount is <= 0"); + ALOGW("Battery track warning: refCount is <= 0"); return; } @@ -1825,7 +1825,7 @@ void MediaPlayerService::addBatteryData(uint32_t params) } } else { if (info.refCount == 0) { - LOGW("Battery track warning: refCount is already 0"); + ALOGW("Battery track warning: refCount is already 0"); return; } else if (info.refCount < 0) { LOGE("Battery track error: refCount < 0"); diff --git a/media/libmediaplayerservice/StagefrightRecorder.cpp b/media/libmediaplayerservice/StagefrightRecorder.cpp index 2be0ae2..87305ee 100644 --- a/media/libmediaplayerservice/StagefrightRecorder.cpp +++ b/media/libmediaplayerservice/StagefrightRecorder.cpp @@ -382,7 +382,7 @@ status_t StagefrightRecorder::setParamMaxFileDurationUs(int64_t timeUs) { // This is meant for backward compatibility for MediaRecorder.java if (timeUs <= 0) { - LOGW("Max file duration is not positive: %lld us. Disabling duration limit.", 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); @@ -390,7 +390,7 @@ status_t StagefrightRecorder::setParamMaxFileDurationUs(int64_t timeUs) { } if (timeUs <= 15 * 1000000LL) { - LOGW("Target duration (%lld us) too short to be respected", timeUs); + ALOGW("Target duration (%lld us) too short to be respected", timeUs); } mMaxFileDurationUs = timeUs; return OK; @@ -401,7 +401,7 @@ status_t StagefrightRecorder::setParamMaxFileSizeBytes(int64_t bytes) { // This is meant for backward compatibility for MediaRecorder.java if (bytes <= 0) { - LOGW("Max file size is not positive: %lld bytes. " + ALOGW("Max file size is not positive: %lld 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 @@ -410,7 +410,7 @@ status_t StagefrightRecorder::setParamMaxFileSizeBytes(int64_t bytes) { } if (bytes <= 100 * 1024) { - LOGW("Target file size (%lld bytes) is too small to be respected", bytes); + ALOGW("Target file size (%lld bytes) is too small to be respected", bytes); } mMaxFileSizeBytes = bytes; @@ -1022,11 +1022,11 @@ void StagefrightRecorder::clipVideoFrameRate() { int maxFrameRate = mEncoderProfiles->getVideoEncoderParamByName( "enc.vid.fps.max", mVideoEncoder); if (mFrameRate < minFrameRate && mFrameRate != -1) { - LOGW("Intended video encoding frame rate (%d fps) is too small" + ALOGW("Intended video encoding frame rate (%d fps) is too small" " and will be set to (%d fps)", mFrameRate, minFrameRate); mFrameRate = minFrameRate; } else if (mFrameRate > maxFrameRate) { - LOGW("Intended video encoding frame rate (%d fps) is too large" + ALOGW("Intended video encoding frame rate (%d fps) is too large" " and will be set to (%d fps)", mFrameRate, maxFrameRate); mFrameRate = maxFrameRate; } @@ -1039,11 +1039,11 @@ void StagefrightRecorder::clipVideoBitRate() { int maxBitRate = mEncoderProfiles->getVideoEncoderParamByName( "enc.vid.bps.max", mVideoEncoder); if (mVideoBitRate < minBitRate) { - LOGW("Intended video encoding bit rate (%d bps) is too small" + ALOGW("Intended video encoding bit rate (%d bps) is too small" " and will be set to (%d bps)", mVideoBitRate, minBitRate); mVideoBitRate = minBitRate; } else if (mVideoBitRate > maxBitRate) { - LOGW("Intended video encoding bit rate (%d bps) is too large" + ALOGW("Intended video encoding bit rate (%d bps) is too large" " and will be set to (%d bps)", mVideoBitRate, maxBitRate); mVideoBitRate = maxBitRate; } @@ -1056,11 +1056,11 @@ void StagefrightRecorder::clipVideoFrameWidth() { int maxFrameWidth = mEncoderProfiles->getVideoEncoderParamByName( "enc.vid.width.max", mVideoEncoder); if (mVideoWidth < minFrameWidth) { - LOGW("Intended video encoding frame width (%d) is too small" + ALOGW("Intended video encoding frame width (%d) is too small" " and will be set to (%d)", mVideoWidth, minFrameWidth); mVideoWidth = minFrameWidth; } else if (mVideoWidth > maxFrameWidth) { - LOGW("Intended video encoding frame width (%d) is too large" + ALOGW("Intended video encoding frame width (%d) is too large" " and will be set to (%d)", mVideoWidth, maxFrameWidth); mVideoWidth = maxFrameWidth; } @@ -1151,7 +1151,7 @@ void StagefrightRecorder::clipAudioBitRate() { mEncoderProfiles->getAudioEncoderParamByName( "enc.aud.bps.min", mAudioEncoder); if (mAudioBitRate < minAudioBitRate) { - LOGW("Intended audio encoding bit rate (%d) is too small" + ALOGW("Intended audio encoding bit rate (%d) is too small" " and will be set to (%d)", mAudioBitRate, minAudioBitRate); mAudioBitRate = minAudioBitRate; } @@ -1160,7 +1160,7 @@ void StagefrightRecorder::clipAudioBitRate() { mEncoderProfiles->getAudioEncoderParamByName( "enc.aud.bps.max", mAudioEncoder); if (mAudioBitRate > maxAudioBitRate) { - LOGW("Intended audio encoding bit rate (%d) is too large" + ALOGW("Intended audio encoding bit rate (%d) is too large" " and will be set to (%d)", mAudioBitRate, maxAudioBitRate); mAudioBitRate = maxAudioBitRate; } @@ -1173,7 +1173,7 @@ void StagefrightRecorder::clipAudioSampleRate() { mEncoderProfiles->getAudioEncoderParamByName( "enc.aud.hz.min", mAudioEncoder); if (mSampleRate < minSampleRate) { - LOGW("Intended audio sample rate (%d) is too small" + ALOGW("Intended audio sample rate (%d) is too small" " and will be set to (%d)", mSampleRate, minSampleRate); mSampleRate = minSampleRate; } @@ -1182,7 +1182,7 @@ void StagefrightRecorder::clipAudioSampleRate() { mEncoderProfiles->getAudioEncoderParamByName( "enc.aud.hz.max", mAudioEncoder); if (mSampleRate > maxSampleRate) { - LOGW("Intended audio sample rate (%d) is too large" + ALOGW("Intended audio sample rate (%d) is too large" " and will be set to (%d)", mSampleRate, maxSampleRate); mSampleRate = maxSampleRate; } @@ -1195,7 +1195,7 @@ void StagefrightRecorder::clipNumberOfAudioChannels() { mEncoderProfiles->getAudioEncoderParamByName( "enc.aud.ch.min", mAudioEncoder); if (mAudioChannels < minChannels) { - LOGW("Intended number of audio channels (%d) is too small" + ALOGW("Intended number of audio channels (%d) is too small" " and will be set to (%d)", mAudioChannels, minChannels); mAudioChannels = minChannels; } @@ -1204,7 +1204,7 @@ void StagefrightRecorder::clipNumberOfAudioChannels() { mEncoderProfiles->getAudioEncoderParamByName( "enc.aud.ch.max", mAudioEncoder); if (mAudioChannels > maxChannels) { - LOGW("Intended number of audio channels (%d) is too large" + ALOGW("Intended number of audio channels (%d) is too large" " and will be set to (%d)", mAudioChannels, maxChannels); mAudioChannels = maxChannels; } @@ -1217,11 +1217,11 @@ void StagefrightRecorder::clipVideoFrameHeight() { int maxFrameHeight = mEncoderProfiles->getVideoEncoderParamByName( "enc.vid.height.max", mVideoEncoder); if (mVideoHeight < minFrameHeight) { - LOGW("Intended video encoding frame height (%d) is too small" + ALOGW("Intended video encoding frame height (%d) is too small" " and will be set to (%d)", mVideoHeight, minFrameHeight); mVideoHeight = minFrameHeight; } else if (mVideoHeight > maxFrameHeight) { - LOGW("Intended video encoding frame height (%d) is too large" + ALOGW("Intended video encoding frame height (%d) is too large" " and will be set to (%d)", mVideoHeight, maxFrameHeight); mVideoHeight = maxFrameHeight; } @@ -1406,7 +1406,7 @@ status_t StagefrightRecorder::setupVideoEncoder( true /* createEncoder */, cameraSource, NULL, encoder_flags); if (encoder == NULL) { - LOGW("Failed to create the encoder"); + ALOGW("Failed to create the encoder"); // When the encoder fails to be created, we need // release the camera source due to the camera's lock // and unlock mechanism. diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp index ebf5fab..8ca37b8 100644 --- a/media/libstagefright/ACodec.cpp +++ b/media/libstagefright/ACodec.cpp @@ -394,7 +394,7 @@ status_t ACodec::allocateBuffersOnPort(OMX_U32 portIndex) { if (portIndex == kPortIndexInput && i == 0) { // Only log this warning once per allocation round. - LOGW("OMX.TI.DUCATI1.VIDEO.DECODER requires the use of " + ALOGW("OMX.TI.DUCATI1.VIDEO.DECODER requires the use of " "OMX_AllocateBuffer instead of the preferred " "OMX_UseBuffer. Vendor must fix this."); } @@ -454,7 +454,7 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() { OMX_U32 usage = 0; err = mOMX->getGraphicBufferUsage(mNode, kPortIndexOutput, &usage); if (err != 0) { - LOGW("querying usage flags from OMX IL component failed: %d", err); + ALOGW("querying usage flags from OMX IL component failed: %d", err); // XXX: Currently this error is logged, but not fatal. usage = 0; } @@ -734,7 +734,7 @@ void ACodec::setComponentRole( &roleParams, sizeof(roleParams)); if (err != OK) { - LOGW("[%s] Failed to set standard component role '%s'.", + ALOGW("[%s] Failed to set standard component role '%s'.", mComponentName.c_str(), role); } } diff --git a/media/libstagefright/AVIExtractor.cpp b/media/libstagefright/AVIExtractor.cpp index 142fa5b..91555ba 100644 --- a/media/libstagefright/AVIExtractor.cpp +++ b/media/libstagefright/AVIExtractor.cpp @@ -625,7 +625,7 @@ status_t AVIExtractor::parseStreamHeader(off64_t offset, size_t size) { } if (mime == NULL) { - LOGW("Unsupported video format '%c%c%c%c'", + ALOGW("Unsupported video format '%c%c%c%c'", (char)(handler >> 24), (char)((handler >> 16) & 0xff), (char)((handler >> 8) & 0xff), @@ -705,7 +705,7 @@ status_t AVIExtractor::parseStreamFormat(off64_t offset, size_t size) { if (format == 0x55) { track->mMeta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_MPEG); } else { - LOGW("Unsupported audio format = 0x%04x", format); + ALOGW("Unsupported audio format = 0x%04x", format); } uint32_t numChannels = U16LE_AT(&data[2]); diff --git a/media/libstagefright/AudioSource.cpp b/media/libstagefright/AudioSource.cpp index 3fae957..2172cc0 100644 --- a/media/libstagefright/AudioSource.cpp +++ b/media/libstagefright/AudioSource.cpp @@ -37,7 +37,7 @@ static void AudioRecordCallbackFunction(int event, void *user, void *info) { break; } case AudioRecord::EVENT_OVERRUN: { - LOGW("AudioRecord reported overrun!"); + ALOGW("AudioRecord reported overrun!"); break; } default: @@ -259,7 +259,7 @@ status_t AudioSource::dataCallbackTimestamp( ALOGV("dataCallbackTimestamp: %lld us", timeUs); Mutex::Autolock autoLock(mLock); if (!mStarted) { - LOGW("Spurious callback from AudioRecord. Drop the audio data."); + ALOGW("Spurious callback from AudioRecord. Drop the audio data."); return OK; } @@ -301,7 +301,7 @@ status_t AudioSource::dataCallbackTimestamp( audioBuffer.i16, audioBuffer.size); } else { if (audioBuffer.size == 0) { - LOGW("Nothing is available from AudioRecord callback buffer"); + ALOGW("Nothing is available from AudioRecord callback buffer"); buffer->release(); return OK; } diff --git a/media/libstagefright/CameraSource.cpp b/media/libstagefright/CameraSource.cpp index 966b457..94d18fa 100755 --- a/media/libstagefright/CameraSource.cpp +++ b/media/libstagefright/CameraSource.cpp @@ -649,7 +649,7 @@ status_t CameraSource::stop() { if (NO_ERROR != mFrameCompleteCondition.waitRelative(mLock, mTimeBetweenFrameCaptureUs * 1000LL + CAMERA_SOURCE_TIMEOUT_NS)) { - LOGW("Timed out waiting for outstanding frames being encoded: %d", + ALOGW("Timed out waiting for outstanding frames being encoded: %d", mFramesBeingEncoded.size()); } } @@ -666,7 +666,7 @@ status_t CameraSource::stop() { } if (mNumGlitches > 0) { - LOGW("%d long delays between neighboring video frames", mNumGlitches); + ALOGW("%d long delays between neighboring video frames", mNumGlitches); } CHECK_EQ(mNumFramesReceived, mNumFramesEncoded + mNumFramesDropped); @@ -744,10 +744,10 @@ status_t CameraSource::read( mTimeBetweenFrameCaptureUs * 1000LL + CAMERA_SOURCE_TIMEOUT_NS)) { if (mCameraRecordingProxy != 0 && !mCameraRecordingProxy->asBinder()->isBinderAlive()) { - LOGW("camera recording proxy is gone"); + ALOGW("camera recording proxy is gone"); return ERROR_END_OF_STREAM; } - LOGW("Timed out waiting for incoming camera video frames: %lld us", + ALOGW("Timed out waiting for incoming camera video frames: %lld us", mLastFrameTimestampUs); } } diff --git a/media/libstagefright/DRMExtractor.cpp b/media/libstagefright/DRMExtractor.cpp index 1f3d581..9452ab1 100644 --- a/media/libstagefright/DRMExtractor.cpp +++ b/media/libstagefright/DRMExtractor.cpp @@ -286,7 +286,7 @@ bool SniffDRM( *mimeType = String8("drm+es_based+") + decryptHandle->mimeType; } else if (decryptHandle->decryptApiType == DecryptApiType::WV_BASED) { *mimeType = MEDIA_MIMETYPE_CONTAINER_WVM; - LOGW("SniffWVM: found match\n"); + ALOGW("SniffWVM: found match\n"); } *confidence = 10.0f; diff --git a/media/libstagefright/ESDS.cpp b/media/libstagefright/ESDS.cpp index 1b225fa..4a0c35c 100644 --- a/media/libstagefright/ESDS.cpp +++ b/media/libstagefright/ESDS.cpp @@ -162,7 +162,7 @@ status_t ESDS::parseESDescriptor(size_t offset, size_t size) { offset -= 2; size += 2; - LOGW("Found malformed 'esds' atom, ignoring missing OCR_ES_Id."); + ALOGW("Found malformed 'esds' atom, ignoring missing OCR_ES_Id."); } } diff --git a/media/libstagefright/FLACExtractor.cpp b/media/libstagefright/FLACExtractor.cpp index a0c08e2..381a2d1 100644 --- a/media/libstagefright/FLACExtractor.cpp +++ b/media/libstagefright/FLACExtractor.cpp @@ -366,7 +366,7 @@ void FLACParser::metadataCallback(const FLAC__StreamMetadata *metadata) } break; default: - LOGW("FLACParser::metadataCallback unexpected type %u", metadata->type); + ALOGW("FLACParser::metadataCallback unexpected type %u", metadata->type); break; } } diff --git a/media/libstagefright/MPEG4Extractor.cpp b/media/libstagefright/MPEG4Extractor.cpp index 26b8a42..43bd1ac 100644 --- a/media/libstagefright/MPEG4Extractor.cpp +++ b/media/libstagefright/MPEG4Extractor.cpp @@ -1519,7 +1519,7 @@ status_t MPEG4Extractor::parseTrackHeader( } else if (a00 == -kFixedOne && a01 == 0 && a10 == 0 && a11 == -kFixedOne) { rotationDegrees = 180; } else { - LOGW("We only support 0,90,180,270 degree rotation matrices"); + ALOGW("We only support 0,90,180,270 degree rotation matrices"); rotationDegrees = 0; } @@ -2422,7 +2422,7 @@ bool SniffMPEG4( } if (LegacySniffMPEG4(source, mimeType, confidence)) { - LOGW("Identified supported mpeg4 through LegacySniffMPEG4."); + ALOGW("Identified supported mpeg4 through LegacySniffMPEG4."); return true; } diff --git a/media/libstagefright/MPEG4Writer.cpp b/media/libstagefright/MPEG4Writer.cpp index b808cc0..8b270cb 100755 --- a/media/libstagefright/MPEG4Writer.cpp +++ b/media/libstagefright/MPEG4Writer.cpp @@ -443,7 +443,7 @@ status_t MPEG4Writer::start(MetaData *param) { // If file size is set to be larger than the 32 bit file // size limit, treat it as an error. if (mMaxFileSizeLimitBytes > kMax32BitFileSize) { - LOGW("32-bit file size limit (%lld bytes) too big. " + ALOGW("32-bit file size limit (%lld bytes) too big. " "It is changed to %lld bytes", mMaxFileSizeLimitBytes, kMax32BitFileSize); mMaxFileSizeLimitBytes = kMax32BitFileSize; @@ -1173,7 +1173,7 @@ void MPEG4Writer::Track::addOneSttsTableEntry( size_t sampleCount, int32_t duration) { if (duration == 0) { - LOGW("0-duration samples found: %d", sampleCount); + ALOGW("0-duration samples found: %d", sampleCount); } SttsTableEntry sttsEntry(sampleCount, duration); mSttsTableEntries.push_back(sttsEntry); diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp index 2dc19fd..2244c6d 100755 --- a/media/libstagefright/OMXCodec.cpp +++ b/media/libstagefright/OMXCodec.cpp @@ -484,7 +484,7 @@ sp OMXCodec::Create( // For OMX.SEC.* decoders we can enable a special mode that // gives the client access to the framebuffer contents. - LOGW("Component '%s' does not give the client access to " + ALOGW("Component '%s' does not give the client access to " "the framebuffer contents. Skipping.", componentName); @@ -1093,7 +1093,7 @@ status_t OMXCodec::setupErrorCorrectionParameters() { mNode, OMX_IndexParamVideoErrorCorrection, &errorCorrectionType, sizeof(errorCorrectionType)); if (err != OK) { - LOGW("Error correction param query is not supported"); + ALOGW("Error correction param query is not supported"); return OK; // Optional feature. Ignore this failure } @@ -1107,7 +1107,7 @@ status_t OMXCodec::setupErrorCorrectionParameters() { mNode, OMX_IndexParamVideoErrorCorrection, &errorCorrectionType, sizeof(errorCorrectionType)); if (err != OK) { - LOGW("Error correction param configuration is not supported"); + ALOGW("Error correction param configuration is not supported"); } // Optional feature. Ignore the failure. @@ -1579,7 +1579,7 @@ void OMXCodec::setComponentRole( &roleParams, sizeof(roleParams)); if (err != OK) { - LOGW("Failed to set standard component role '%s'.", role); + ALOGW("Failed to set standard component role '%s'.", role); } } } @@ -1863,7 +1863,7 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() { OMX_U32 usage = 0; err = mOMX->getGraphicBufferUsage(mNode, kPortIndexOutput, &usage); if (err != 0) { - LOGW("querying usage flags from OMX IL component failed: %d", err); + ALOGW("querying usage flags from OMX IL component failed: %d", err); // XXX: Currently this error is logged, but not fatal. usage = 0; } @@ -2214,7 +2214,7 @@ int64_t OMXCodec::retrieveDecodingTimeUs(bool isCodecSpecific) { void OMXCodec::on_message(const omx_message &msg) { if (mState == ERROR) { - LOGW("Dropping OMX message - we're in ERROR state."); + ALOGW("Dropping OMX message - we're in ERROR state."); return; } @@ -2242,7 +2242,7 @@ void OMXCodec::on_message(const omx_message &msg) { CHECK(i < buffers->size()); if ((*buffers)[i].mStatus != OWNED_BY_COMPONENT) { - LOGW("We already own input buffer %p, yet received " + ALOGW("We already own input buffer %p, yet received " "an EMPTY_BUFFER_DONE.", buffer); } @@ -2302,7 +2302,7 @@ void OMXCodec::on_message(const omx_message &msg) { BufferInfo *info = &buffers->editItemAt(i); if (info->mStatus != OWNED_BY_COMPONENT) { - LOGW("We already own output buffer %p, yet received " + ALOGW("We already own output buffer %p, yet received " "a FILL_BUFFER_DONE.", buffer); } @@ -3556,7 +3556,7 @@ void OMXCodec::setAMRFormat(bool isWAMR, int32_t bitRate) { status_t OMXCodec::setAACFormat(int32_t numChannels, int32_t sampleRate, int32_t bitRate) { if (numChannels > 2) - LOGW("Number of channels: (%d) \n", numChannels); + ALOGW("Number of channels: (%d) \n", numChannels); if (mIsEncoder) { //////////////// input port //////////////////// diff --git a/media/libstagefright/StagefrightMetadataRetriever.cpp b/media/libstagefright/StagefrightMetadataRetriever.cpp index 2634da0..8875af0 100644 --- a/media/libstagefright/StagefrightMetadataRetriever.cpp +++ b/media/libstagefright/StagefrightMetadataRetriever.cpp @@ -127,7 +127,7 @@ static VideoFrame *extractVideoFrameWithCodecFlags( status_t err = decoder->start(); if (err != OK) { - LOGW("OMXCodec::start returned error %d (0x%08x)\n", err, err); + ALOGW("OMXCodec::start returned error %d (0x%08x)\n", err, err); return NULL; } diff --git a/media/libstagefright/TimedEventQueue.cpp b/media/libstagefright/TimedEventQueue.cpp index 43511ec..12c9c36 100644 --- a/media/libstagefright/TimedEventQueue.cpp +++ b/media/libstagefright/TimedEventQueue.cpp @@ -265,7 +265,7 @@ void TimedEventQueue::threadEntry() { static int64_t kMaxTimeoutUs = 10000000ll; // 10 secs bool timeoutCapped = false; if (delay_us > kMaxTimeoutUs) { - LOGW("delay_us exceeds max timeout: %lld us", delay_us); + ALOGW("delay_us exceeds max timeout: %lld us", delay_us); // We'll never block for more than 10 secs, instead // we will split up the full timeout into chunks of @@ -315,7 +315,7 @@ sp TimedEventQueue::removeEventFromQueue_l( } } - LOGW("Event %d was not found in the queue, already cancelled?", id); + ALOGW("Event %d was not found in the queue, already cancelled?", id); return NULL; } diff --git a/media/libstagefright/codecs/aacdec/SoftAAC.cpp b/media/libstagefright/codecs/aacdec/SoftAAC.cpp index c408b2c..f3283a4 100644 --- a/media/libstagefright/codecs/aacdec/SoftAAC.cpp +++ b/media/libstagefright/codecs/aacdec/SoftAAC.cpp @@ -326,7 +326,7 @@ void SoftAAC::onQueueFilled(OMX_U32 portIndex) { mUpsamplingFactor = mConfig->aacPlusUpsamplingFactor; // Check on the sampling rate to see whether it is changed. if (mConfig->samplingRate != prevSamplingRate) { - LOGW("Sample rate was %d Hz, but now is %d Hz", + ALOGW("Sample rate was %d Hz, but now is %d Hz", prevSamplingRate, mConfig->samplingRate); // We'll hold onto the input buffer and will decode @@ -341,7 +341,7 @@ void SoftAAC::onQueueFilled(OMX_U32 portIndex) { mConfig->extendedAudioObjectType == MP4AUDIO_LTP) { if (mUpsamplingFactor == 2) { // The stream turns out to be not aacPlus mode anyway - LOGW("Disable AAC+/eAAC+ since extended audio object " + ALOGW("Disable AAC+/eAAC+ since extended audio object " "type is %d", mConfig->extendedAudioObjectType); mConfig->aacPlusEnabled = 0; @@ -351,7 +351,7 @@ void SoftAAC::onQueueFilled(OMX_U32 portIndex) { // aacPlus mode does not buy us anything, but to cause // 1. CPU load to increase, and // 2. a half speed of decoding - LOGW("Disable AAC+/eAAC+ since upsampling factor is 1"); + ALOGW("Disable AAC+/eAAC+ since upsampling factor is 1"); mConfig->aacPlusEnabled = 0; } } @@ -367,7 +367,7 @@ void SoftAAC::onQueueFilled(OMX_U32 portIndex) { inHeader->nFilledLen -= mConfig->inputBufferUsedLength; inHeader->nOffset += mConfig->inputBufferUsedLength; } else { - LOGW("AAC decoder returned error %d, substituting silence", + ALOGW("AAC decoder returned error %d, substituting silence", decoderErr); memset(outHeader->pBuffer + outHeader->nOffset, 0, numOutBytes); diff --git a/media/libstagefright/codecs/aacenc/AACEncoder.cpp b/media/libstagefright/codecs/aacenc/AACEncoder.cpp index 2b15b75..a94ccab 100644 --- a/media/libstagefright/codecs/aacenc/AACEncoder.cpp +++ b/media/libstagefright/codecs/aacenc/AACEncoder.cpp @@ -135,7 +135,7 @@ AACEncoder::~AACEncoder() { status_t AACEncoder::start(MetaData *params) { if (mStarted) { - LOGW("Call start() when encoder already started"); + ALOGW("Call start() when encoder already started"); return OK; } @@ -177,7 +177,7 @@ status_t AACEncoder::stop() { } if (!mStarted) { - LOGW("Call stop() when encoder has not started"); + ALOGW("Call stop() when encoder has not started"); return ERROR_END_OF_STREAM; } diff --git a/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp b/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp index d361ef4..2f158b6 100644 --- a/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp +++ b/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp @@ -71,7 +71,7 @@ static Mode PickModeFromBitrate(int32_t bps) { status_t AMRNBEncoder::start(MetaData *params) { if (mStarted) { - LOGW("Call start() when encoder already started"); + ALOGW("Call start() when encoder already started"); return OK; } @@ -105,7 +105,7 @@ status_t AMRNBEncoder::start(MetaData *params) { status_t AMRNBEncoder::stop() { if (!mStarted) { - LOGW("Call stop() when encoder has not started."); + ALOGW("Call stop() when encoder has not started."); return OK; } diff --git a/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp b/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp index 5eacc16..ebc2e5d 100644 --- a/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp +++ b/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp @@ -125,7 +125,7 @@ AMRWBEncoder::~AMRWBEncoder() { status_t AMRWBEncoder::start(MetaData *params) { if (mStarted) { - LOGW("Call start() when encoder already started"); + ALOGW("Call start() when encoder already started"); return OK; } @@ -150,7 +150,7 @@ status_t AMRWBEncoder::start(MetaData *params) { status_t AMRWBEncoder::stop() { if (!mStarted) { - LOGW("Call stop() when encoder has not started"); + ALOGW("Call stop() when encoder has not started"); return OK; } diff --git a/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp b/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp index 37df634..40f6f1a 100644 --- a/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp +++ b/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp @@ -336,7 +336,7 @@ status_t AVCEncoder::start(MetaData *params) { } if (mStarted) { - LOGW("Call start() when encoder already started"); + ALOGW("Call start() when encoder already started"); return OK; } @@ -368,7 +368,7 @@ status_t AVCEncoder::start(MetaData *params) { status_t AVCEncoder::stop() { ALOGV("stop"); if (!mStarted) { - LOGW("Call stop() when encoder has not started"); + ALOGW("Call stop() when encoder has not started"); return OK; } diff --git a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp index bedfc58..be669f2 100644 --- a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp +++ b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp @@ -371,7 +371,7 @@ void SoftMPEG4::onQueueFilled(OMX_U32 portIndex) { mHandle, vol_data, &vol_size, 1, mWidth, mHeight, mode); if (!success) { - LOGW("PVInitVideoDecoder failed. Unsupported content?"); + ALOGW("PVInitVideoDecoder failed. Unsupported content?"); 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 1188780..2c4b63d 100644 --- a/media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp +++ b/media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp @@ -46,7 +46,7 @@ static status_t ConvertOmxProfileLevel( LOGE("Unsupported level (%d) for H263", omxLevel); return BAD_VALUE; } else { - LOGW("PV does not support level configuration for H263"); + ALOGW("PV does not support level configuration for H263"); profileLevel = CORE_PROFILE_LEVEL2; break; } @@ -314,7 +314,7 @@ status_t M4vH263Encoder::start(MetaData *params) { } if (mStarted) { - LOGW("Call start() when encoder already started"); + ALOGW("Call start() when encoder already started"); return OK; } @@ -341,7 +341,7 @@ status_t M4vH263Encoder::start(MetaData *params) { status_t M4vH263Encoder::stop() { ALOGV("stop"); if (!mStarted) { - LOGW("Call stop() when encoder has not started"); + ALOGW("Call stop() when encoder has not started"); return OK; } diff --git a/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp b/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp index 47dbd5c..74e893f 100644 --- a/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp +++ b/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp @@ -353,7 +353,7 @@ void SoftVorbis::onQueueFilled(OMX_U32 portIndex) { int err = vorbis_dsp_synthesis(mState, &pack, 1); if (err != 0) { - LOGW("vorbis_dsp_synthesis returned %d", err); + ALOGW("vorbis_dsp_synthesis returned %d", err); } else { numFrames = vorbis_dsp_pcmout( mState, (int16_t *)outHeader->pBuffer, diff --git a/media/libstagefright/colorconversion/SoftwareRenderer.cpp b/media/libstagefright/colorconversion/SoftwareRenderer.cpp index 3246021..e892f92 100644 --- a/media/libstagefright/colorconversion/SoftwareRenderer.cpp +++ b/media/libstagefright/colorconversion/SoftwareRenderer.cpp @@ -135,7 +135,7 @@ void SoftwareRenderer::render( ANativeWindowBuffer *buf; int err; if ((err = mNativeWindow->dequeueBuffer(mNativeWindow.get(), &buf)) != 0) { - LOGW("Surface::dequeueBuffer returned error %d", err); + ALOGW("Surface::dequeueBuffer returned error %d", err); return; } @@ -225,7 +225,7 @@ void SoftwareRenderer::render( CHECK_EQ(0, mapper.unlock(buf->handle)); if ((err = mNativeWindow->queueBuffer(mNativeWindow.get(), buf)) != 0) { - LOGW("Surface::queueBuffer returned error %d", err); + ALOGW("Surface::queueBuffer returned error %d", err); } buf = NULL; } diff --git a/media/libstagefright/foundation/AHierarchicalStateMachine.cpp b/media/libstagefright/foundation/AHierarchicalStateMachine.cpp index 3b3f786..40c5a3c 100644 --- a/media/libstagefright/foundation/AHierarchicalStateMachine.cpp +++ b/media/libstagefright/foundation/AHierarchicalStateMachine.cpp @@ -63,7 +63,7 @@ void AHierarchicalStateMachine::onMessageReceived(const sp &msg) { return; } - LOGW("Warning message %s unhandled in root state.", + ALOGW("Warning message %s unhandled in root state.", msg->debugString().c_str()); } diff --git a/media/libstagefright/foundation/ALooperRoster.cpp b/media/libstagefright/foundation/ALooperRoster.cpp index e399f2f..dff931d 100644 --- a/media/libstagefright/foundation/ALooperRoster.cpp +++ b/media/libstagefright/foundation/ALooperRoster.cpp @@ -82,7 +82,7 @@ status_t ALooperRoster::postMessage_l( ssize_t index = mHandlers.indexOfKey(msg->target()); if (index < 0) { - LOGW("failed to post message. Target handler not registered."); + ALOGW("failed to post message. Target handler not registered."); return -ENOENT; } @@ -91,7 +91,7 @@ status_t ALooperRoster::postMessage_l( sp looper = info.mLooper.promote(); if (looper == NULL) { - LOGW("failed to post message. " + ALOGW("failed to post message. " "Target handler %d still registered, but object gone.", msg->target()); @@ -113,7 +113,7 @@ void ALooperRoster::deliverMessage(const sp &msg) { ssize_t index = mHandlers.indexOfKey(msg->target()); if (index < 0) { - LOGW("failed to deliver message. Target handler not registered."); + ALOGW("failed to deliver message. Target handler not registered."); return; } @@ -121,7 +121,7 @@ void ALooperRoster::deliverMessage(const sp &msg) { handler = info.mHandler.promote(); if (handler == NULL) { - LOGW("failed to deliver message. " + ALOGW("failed to deliver message. " "Target handler %d registered, but object gone.", msg->target()); diff --git a/media/libstagefright/mpeg2ts/ESQueue.cpp b/media/libstagefright/mpeg2ts/ESQueue.cpp index 05c87fd..7fd99a8 100644 --- a/media/libstagefright/mpeg2ts/ESQueue.cpp +++ b/media/libstagefright/mpeg2ts/ESQueue.cpp @@ -408,7 +408,7 @@ sp ElementaryStreamQueue::dequeueAccessUnitAAC() { if (timeUs >= 0) { accessUnit->meta()->setInt64("timeUs", timeUs); } else { - LOGW("no time for AAC access unit"); + ALOGW("no time for AAC access unit"); } return accessUnit; diff --git a/media/libstagefright/omx/OMXNodeInstance.cpp b/media/libstagefright/omx/OMXNodeInstance.cpp index 802c429..31b1a2f 100644 --- a/media/libstagefright/omx/OMXNodeInstance.cpp +++ b/media/libstagefright/omx/OMXNodeInstance.cpp @@ -742,7 +742,7 @@ void OMXNodeInstance::removeActiveBuffer( } if (!found) { - LOGW("Attempt to remove an active buffer we know nothing about..."); + ALOGW("Attempt to remove an active buffer we know nothing about..."); } } diff --git a/media/libstagefright/rtsp/ARTPConnection.cpp b/media/libstagefright/rtsp/ARTPConnection.cpp index 853ea14..8c9dd8d 100644 --- a/media/libstagefright/rtsp/ARTPConnection.cpp +++ b/media/libstagefright/rtsp/ARTPConnection.cpp @@ -294,7 +294,7 @@ void ARTPConnection::onPollStreams() { if (err == -ECONNRESET) { // socket failure, this stream is dead, Jim. - LOGW("failed to receive RTP/RTCP datagram."); + ALOGW("failed to receive RTP/RTCP datagram."); it = mStreams.erase(it); continue; } @@ -347,7 +347,7 @@ void ARTPConnection::onPollStreams() { } while (n < 0 && errno == EINTR); if (n <= 0) { - LOGW("failed to send RTCP receiver report (%s).", + ALOGW("failed to send RTCP receiver report (%s).", n == 0 ? "connection gone" : strerror(errno)); it = mStreams.erase(it); @@ -561,7 +561,7 @@ status_t ARTPConnection::parseRTCP(StreamInfo *s, const sp &buffer) { default: { - LOGW("Unknown RTCP packet type %u of size %d", + ALOGW("Unknown RTCP packet type %u of size %d", (unsigned)data[1], headerLength); break; } diff --git a/media/libstagefright/rtsp/ARTPSource.cpp b/media/libstagefright/rtsp/ARTPSource.cpp index dc5f17e..ed68790 100644 --- a/media/libstagefright/rtsp/ARTPSource.cpp +++ b/media/libstagefright/rtsp/ARTPSource.cpp @@ -147,7 +147,7 @@ bool ARTPSource::queuePacket(const sp &buffer) { } if (it != mQueue.end() && (uint32_t)(*it)->int32Data() == seqNum) { - LOGW("Discarding duplicate buffer"); + ALOGW("Discarding duplicate buffer"); return false; } @@ -174,7 +174,7 @@ void ARTPSource::addFIR(const sp &buffer) { mLastFIRRequestUs = nowUs; if (buffer->size() + 20 > buffer->capacity()) { - LOGW("RTCP buffer too small to accomodate FIR."); + ALOGW("RTCP buffer too small to accomodate FIR."); return; } @@ -212,7 +212,7 @@ void ARTPSource::addFIR(const sp &buffer) { void ARTPSource::addReceiverReport(const sp &buffer) { if (buffer->size() + 32 > buffer->capacity()) { - LOGW("RTCP buffer too small to accomodate RR."); + ALOGW("RTCP buffer too small to accomodate RR."); return; } diff --git a/media/libstagefright/rtsp/ARTSPConnection.cpp b/media/libstagefright/rtsp/ARTSPConnection.cpp index 12cca13..b5d2e9f 100644 --- a/media/libstagefright/rtsp/ARTSPConnection.cpp +++ b/media/libstagefright/rtsp/ARTSPConnection.cpp @@ -615,7 +615,7 @@ bool ARTSPConnection::receiveRTSPReponse() { notify->setObject("buffer", buffer); notify->post(); } else { - LOGW("received binary data, but no one cares."); + ALOGW("received binary data, but no one cares."); } return true; diff --git a/media/libstagefright/rtsp/MyHandler.h b/media/libstagefright/rtsp/MyHandler.h index 53691d1..cda787e 100644 --- a/media/libstagefright/rtsp/MyHandler.h +++ b/media/libstagefright/rtsp/MyHandler.h @@ -264,7 +264,7 @@ struct MyHandler : public AHandler { if (!GetAttribute(transport.c_str(), "source", &source)) { - LOGW("Missing 'source' field in Transport response. Using " + ALOGW("Missing 'source' field in Transport response. Using " "RTSP endpoint address."); struct hostent *ent = gethostbyname(mSessionHost.c_str()); @@ -300,7 +300,7 @@ struct MyHandler : public AHandler { } if (rtpPort & 1) { - LOGW("Server picked an odd RTP port, it should've picked an " + ALOGW("Server picked an odd RTP port, it should've picked an " "even one, we'll let it pass for now, but this may break " "in the future."); } @@ -450,7 +450,7 @@ struct MyHandler : public AHandler { // it with the absolute session URL to get // something usable... - LOGW("Server specified a non-absolute base URL" + ALOGW("Server specified a non-absolute base URL" ", combining it with the session URL to " "get something usable..."); @@ -468,7 +468,7 @@ struct MyHandler : public AHandler { // The first "track" is merely session meta // data. - LOGW("Session doesn't contain any playable " + ALOGW("Session doesn't contain any playable " "tracks. Aborting."); result = ERROR_UNSUPPORTED; } else { @@ -527,12 +527,12 @@ struct MyHandler : public AHandler { strtoul(timeoutStr.c_str(), &end, 10); if (end == timeoutStr.c_str() || *end != '\0') { - LOGW("server specified malformed timeout '%s'", + ALOGW("server specified malformed timeout '%s'", timeoutStr.c_str()); mKeepAliveTimeoutUs = kDefaultKeepAliveTimeoutUs; } else if (timeoutSecs < 15) { - LOGW("server specified too short a timeout " + ALOGW("server specified too short a timeout " "(%lu secs), using default.", timeoutSecs); @@ -884,7 +884,7 @@ struct MyHandler : public AHandler { case 'seek': { if (!mSeekable) { - LOGW("This is a live stream, ignoring seek request."); + ALOGW("This is a live stream, ignoring seek request."); sp msg = mNotify->dup(); msg->setInt32("what", kWhatSeekDone); @@ -1017,7 +1017,7 @@ struct MyHandler : public AHandler { { if (!mReceivedFirstRTCPPacket) { if (mReceivedFirstRTPPacket && !mTryFakeRTCP) { - LOGW("We received RTP packets but no RTCP packets, " + ALOGW("We received RTP packets but no RTCP packets, " "using fake timestamps."); mTryFakeRTCP = true; @@ -1026,7 +1026,7 @@ struct MyHandler : public AHandler { fakeTimestamps(); } else if (!mReceivedFirstRTPPacket && !mTryTCPInterleaving) { - LOGW("Never received any data, switching transports."); + ALOGW("Never received any data, switching transports."); mTryTCPInterleaving = true; @@ -1034,7 +1034,7 @@ struct MyHandler : public AHandler { msg->setInt32("reconnect", true); msg->post(); } else { - LOGW("Never received any data, disconnecting."); + ALOGW("Never received any data, disconnecting."); (new AMessage('abor', id()))->post(); } } @@ -1233,7 +1233,7 @@ private: new APacketSource(mSessionDesc, index); if (source->initCheck() != OK) { - LOGW("Unsupported format. Ignoring track #%d.", index); + ALOGW("Unsupported format. Ignoring track #%d.", index); sp reply = new AMessage('setu', id()); reply->setSize("index", index); diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index ab94bb8..7bef5a9 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -122,7 +122,7 @@ static void addBatteryData(uint32_t params) { defaultServiceManager()->getService(String16("media.player")); sp service = interface_cast(binder); if (service.get() == NULL) { - LOGW("Cannot connect to the MediaPlayerService for battery tracking"); + ALOGW("Cannot connect to the MediaPlayerService for battery tracking"); return; } @@ -484,7 +484,7 @@ uint32_t AudioFlinger::sampleRate(int output) const Mutex::Autolock _l(mLock); PlaybackThread *thread = checkPlaybackThread_l(output); if (thread == NULL) { - LOGW("sampleRate() unknown thread %d", output); + ALOGW("sampleRate() unknown thread %d", output); return 0; } return thread->sampleRate(); @@ -495,7 +495,7 @@ int AudioFlinger::channelCount(int output) const Mutex::Autolock _l(mLock); PlaybackThread *thread = checkPlaybackThread_l(output); if (thread == NULL) { - LOGW("channelCount() unknown thread %d", output); + ALOGW("channelCount() unknown thread %d", output); return 0; } return thread->channelCount(); @@ -506,7 +506,7 @@ uint32_t AudioFlinger::format(int output) const Mutex::Autolock _l(mLock); PlaybackThread *thread = checkPlaybackThread_l(output); if (thread == NULL) { - LOGW("format() unknown thread %d", output); + ALOGW("format() unknown thread %d", output); return 0; } return thread->format(); @@ -517,7 +517,7 @@ size_t AudioFlinger::frameCount(int output) const Mutex::Autolock _l(mLock); PlaybackThread *thread = checkPlaybackThread_l(output); if (thread == NULL) { - LOGW("frameCount() unknown thread %d", output); + ALOGW("frameCount() unknown thread %d", output); return 0; } return thread->frameCount(); @@ -528,7 +528,7 @@ uint32_t AudioFlinger::latency(int output) const Mutex::Autolock _l(mLock); PlaybackThread *thread = checkPlaybackThread_l(output); if (thread == NULL) { - LOGW("latency() unknown thread %d", output); + ALOGW("latency() unknown thread %d", output); return 0; } return thread->latency(); @@ -576,7 +576,7 @@ status_t AudioFlinger::setMode(int mode) return PERMISSION_DENIED; } if ((mode < 0) || (mode >= AUDIO_MODE_CNT)) { - LOGW("Illegal value: setMode(%d)", mode); + ALOGW("Illegal value: setMode(%d)", mode); return BAD_VALUE; } @@ -1180,7 +1180,7 @@ void AudioFlinger::ThreadBase::acquireWakeLock_l() sp binder = defaultServiceManager()->checkService(String16("power")); if (binder == 0) { - LOGW("Thread %s cannot connect to the power manager service", mName); + ALOGW("Thread %s cannot connect to the power manager service", mName); } else { mPowerManager = interface_cast(binder); binder->linkToDeath(mDeathRecipient); @@ -1228,7 +1228,7 @@ void AudioFlinger::ThreadBase::PMDeathRecipient::binderDied(const wp& w if (thread != 0) { thread->clearPowerManager(); } - LOGW("power manager service died !!!"); + ALOGW("power manager service died !!!"); } void AudioFlinger::ThreadBase::setEffectSuspended( @@ -1561,7 +1561,7 @@ sp AudioFlinger::PlaybackThread::createTra // invalidate track immediately if the stream type was moved to another thread since // createTrack() was called by the client process. if (!mStreamTypes[streamType].valid) { - LOGW("createTrack_l() on thread %p: invalidating track on stream %d", + ALOGW("createTrack_l() on thread %p: invalidating track on stream %d", this, streamType); android_atomic_or(CBLK_INVALID_ON, &track->mCblk->flags); } @@ -2038,7 +2038,7 @@ bool AudioFlinger::MixerThread::threadLoop() if (!mStandby && delta > maxPeriod) { mNumDelayedWrites++; if ((now - lastWarning) > kWarningThrottleNs) { - LOGW("write blocked for %llu msecs, %d delayed writes, thread %p", + ALOGW("write blocked for %llu msecs, %d delayed writes, thread %p", ns2ms(delta), mNumDelayedWrites, this); lastWarning = now; } @@ -2147,7 +2147,7 @@ uint32_t AudioFlinger::MixerThread::prepareTracks_l(const SortedVector< wpsessionId()); } } @@ -3164,7 +3164,7 @@ bool AudioFlinger::DuplicatingThread::outputsReady(SortedVector< sp for (size_t i = 0; i < outputTracks.size(); i++) { sp thread = outputTracks[i]->thread().promote(); if (thread == 0) { - LOGW("DuplicatingThread::outputsReady() could not promote thread on output track %p", outputTracks[i].get()); + ALOGW("DuplicatingThread::outputsReady() could not promote thread on output track %p", outputTracks[i].get()); return false; } PlaybackThread *playbackThread = (PlaybackThread *)thread.get(); @@ -3795,7 +3795,7 @@ AudioFlinger::PlaybackThread::OutputTrack::OutputTrack( mCblk, mBuffer, mCblk->buffers, mCblk->frameCount, mCblk->sampleRate, mChannelMask, mBufferEnd); } else { - LOGW("Error creating output track on thread %p", playbackThread); + ALOGW("Error creating output track on thread %p", playbackThread); } } @@ -3850,7 +3850,7 @@ bool AudioFlinger::PlaybackThread::OutputTrack::write(int16_t* data, uint32_t fr memset(pInBuffer->raw, 0, startFrames * channelCount * sizeof(int16_t)); mBufferQueue.add(pInBuffer); } else { - LOGW ("OutputTrack::write() %p no more buffers in queue", this); + ALOGW ("OutputTrack::write() %p no more buffers in queue", this); } } } @@ -3917,7 +3917,7 @@ bool AudioFlinger::PlaybackThread::OutputTrack::write(int16_t* data, uint32_t fr mBufferQueue.add(pInBuffer); ALOGV("OutputTrack::write() %p thread %p adding overflow buffer %d", this, mThread.unsafe_get(), mBufferQueue.size()); } else { - LOGW("OutputTrack::write() %p thread %p no more overflow buffers", mThread.unsafe_get(), this); + ALOGW("OutputTrack::write() %p thread %p no more overflow buffers", mThread.unsafe_get(), this); } } } @@ -4260,7 +4260,7 @@ void AudioFlinger::RecordThread::onFirstRef() status_t AudioFlinger::RecordThread::readyToRun() { status_t status = initCheck(); - LOGW_IF(status != NO_ERROR,"RecordThread %p could not initialize", this); + ALOGW_IF(status != NO_ERROR,"RecordThread %p could not initialize", this); return status; } @@ -4426,7 +4426,7 @@ bool AudioFlinger::RecordThread::threadLoop() if (!mActiveTrack->setOverflow()) { nsecs_t now = systemTime(); if ((now - lastWarning) > kWarningThrottleNs) { - LOGW("RecordThread: buffer overflow"); + ALOGW("RecordThread: buffer overflow"); lastWarning = now; } } @@ -4967,7 +4967,7 @@ int AudioFlinger::openDuplicateOutput(int output1, int output2) MixerThread *thread2 = checkMixerThread_l(output2); if (thread1 == NULL || thread2 == NULL) { - LOGW("openDuplicateOutput() wrong output mixer type for output %d or %d", output1, output2); + ALOGW("openDuplicateOutput() wrong output mixer type for output %d or %d", output1, output2); return 0; } @@ -5163,7 +5163,7 @@ status_t AudioFlinger::setStreamOutput(uint32_t stream, int output) Mutex::Autolock _l(mLock); MixerThread *dstThread = checkMixerThread_l(output); if (dstThread == NULL) { - LOGW("setStreamOutput() bad output id %d", output); + ALOGW("setStreamOutput() bad output id %d", output); return BAD_VALUE; } @@ -5232,7 +5232,7 @@ void AudioFlinger::releaseAudioSessionId(int audioSession) return; } } - LOGW("session id %d not found for pid %d", audioSession, caller); + ALOGW("session id %d not found for pid %d", audioSession, caller); } void AudioFlinger::purgeStaleEffects_l() { @@ -5443,14 +5443,14 @@ sp AudioFlinger::createEffect(pid_t pid, // if uuid is specified, request effect descriptor lStatus = EffectGetDescriptor(&pDesc->uuid, &desc); if (lStatus < 0) { - LOGW("createEffect() error %d from EffectGetDescriptor", lStatus); + ALOGW("createEffect() error %d from EffectGetDescriptor", lStatus); goto Exit; } } else { // if uuid is not specified, look for an available implementation // of the required type in effect factory if (EffectIsNullUuid(&pDesc->type)) { - LOGW("createEffect() no effect type"); + ALOGW("createEffect() no effect type"); lStatus = BAD_VALUE; goto Exit; } @@ -5461,13 +5461,13 @@ sp AudioFlinger::createEffect(pid_t pid, lStatus = EffectQueryNumberEffects(&numEffects); if (lStatus < 0) { - LOGW("createEffect() error %d from EffectQueryNumberEffects", lStatus); + ALOGW("createEffect() error %d from EffectQueryNumberEffects", lStatus); goto Exit; } for (uint32_t i = 0; i < numEffects; i++) { lStatus = EffectQueryEffect(i, &desc); if (lStatus < 0) { - LOGW("createEffect() error %d from EffectQueryEffect", lStatus); + ALOGW("createEffect() error %d from EffectQueryEffect", lStatus); continue; } if (memcmp(&desc.type, &pDesc->type, sizeof(effect_uuid_t)) == 0) { @@ -5484,7 +5484,7 @@ sp AudioFlinger::createEffect(pid_t pid, } if (!found) { lStatus = BAD_VALUE; - LOGW("createEffect() effect not found"); + ALOGW("createEffect() effect not found"); goto Exit; } // For same effect type, chose auxiliary version over insert version if @@ -5581,17 +5581,17 @@ status_t AudioFlinger::moveEffects(int sessionId, int srcOutput, int dstOutput) sessionId, srcOutput, dstOutput); Mutex::Autolock _l(mLock); if (srcOutput == dstOutput) { - LOGW("moveEffects() same dst and src outputs %d", dstOutput); + ALOGW("moveEffects() same dst and src outputs %d", dstOutput); return NO_ERROR; } PlaybackThread *srcThread = checkPlaybackThread_l(srcOutput); if (srcThread == NULL) { - LOGW("moveEffects() bad srcOutput %d", srcOutput); + ALOGW("moveEffects() bad srcOutput %d", srcOutput); return BAD_VALUE; } PlaybackThread *dstThread = checkPlaybackThread_l(dstOutput); if (dstThread == NULL) { - LOGW("moveEffects() bad dstOutput %d", dstOutput); + ALOGW("moveEffects() bad dstOutput %d", dstOutput); return BAD_VALUE; } @@ -5613,7 +5613,7 @@ status_t AudioFlinger::moveEffectChain_l(int sessionId, sp chain = srcThread->getEffectChain_l(sessionId); if (chain == 0) { - LOGW("moveEffectChain_l() effect chain for session %d not on source thread %p", + ALOGW("moveEffectChain_l() effect chain for session %d not on source thread %p", sessionId, srcThread); return INVALID_OPERATION; } @@ -5643,7 +5643,7 @@ status_t AudioFlinger::moveEffectChain_l(int sessionId, if (dstChain == 0) { dstChain = effect->chain().promote(); if (dstChain == 0) { - LOGW("moveEffectChain_l() cannot get chain from effect %p", effect.get()); + ALOGW("moveEffectChain_l() cannot get chain from effect %p", effect.get()); srcThread->addEffect_l(effect); return NO_INIT; } @@ -5685,14 +5685,14 @@ sp AudioFlinger::ThreadBase::createEffect_l( lStatus = initCheck(); if (lStatus != NO_ERROR) { - LOGW("createEffect_l() Audio driver not initialized."); + ALOGW("createEffect_l() Audio driver not initialized."); goto Exit; } // Do not allow effects with session ID 0 on direct output or duplicating threads // TODO: add rule for hw accelerated effects on direct outputs with non PCM format if (sessionId == AUDIO_SESSION_OUTPUT_MIX && mType != MIXER) { - LOGW("createEffect_l() Cannot add auxiliary effect %s to session %d", + ALOGW("createEffect_l() Cannot add auxiliary effect %s to session %d", desc->name, sessionId); lStatus = BAD_VALUE; goto Exit; @@ -5702,7 +5702,7 @@ sp AudioFlinger::ThreadBase::createEffect_l( (desc->flags & EFFECT_FLAG_TYPE_MASK) != EFFECT_FLAG_TYPE_PRE_PROC) || (mType != RECORD && (desc->flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_PRE_PROC)) { - LOGW("createEffect_l() effect %s (flags %08x) created on wrong thread type %d", + ALOGW("createEffect_l() effect %s (flags %08x) created on wrong thread type %d", desc->name, desc->flags, mType); lStatus = BAD_VALUE; goto Exit; @@ -5811,7 +5811,7 @@ status_t AudioFlinger::ThreadBase::addEffect_l(const sp& effect) ALOGV("addEffect_l() %p chain %p effect %p", this, chain.get(), effect.get()); if (chain->getEffectFromId_l(effect->id()) != 0) { - LOGW("addEffect_l() %p effect %s already present in chain %p", + ALOGW("addEffect_l() %p effect %s already present in chain %p", this, effect->desc().name, chain.get()); return BAD_VALUE; } @@ -5844,7 +5844,7 @@ void AudioFlinger::ThreadBase::removeEffect_l(const sp& effect) { removeEffectChain_l(chain); } } else { - LOGW("removeEffect_l() %p cannot promote chain for effect %p", this, effect.get()); + ALOGW("removeEffect_l() %p cannot promote chain for effect %p", this, effect.get()); } } @@ -6066,7 +6066,7 @@ status_t AudioFlinger::RecordThread::addEffectChain_l(const sp& cha size_t AudioFlinger::RecordThread::removeEffectChain_l(const sp& chain) { ALOGV("removeEffectChain_l() %p from thread %p", chain.get(), this); - LOGW_IF(mEffectChains.size() != 1, + ALOGW_IF(mEffectChains.size() != 1, "removeEffectChain_l() %p invalid chain size %d on thread %p", chain.get(), mEffectChains.size(), this); if (mEffectChains.size() == 1) { @@ -6963,12 +6963,12 @@ status_t AudioFlinger::EffectHandle::command(uint32_t cmdCode, int *p = (int *)(mBuffer + mCblk->serverIndex); int size = *p++; if (((uint8_t *)p + size) > mBuffer + mCblk->clientIndex) { - LOGW("command(): invalid parameter block size"); + ALOGW("command(): invalid parameter block size"); break; } effect_param_t *param = (effect_param_t *)p; if (param->psize == 0 || param->vsize == 0) { - LOGW("command(): null parameter or value size"); + ALOGW("command(): null parameter or value size"); mCblk->serverIndex += size; continue; } @@ -7144,7 +7144,7 @@ void AudioFlinger::EffectChain::process_l() { sp thread = mThread.promote(); if (thread == 0) { - LOGW("process_l(): cannot promote mixer thread"); + ALOGW("process_l(): cannot promote mixer thread"); return; } bool isGlobalSession = (mSessionId == AUDIO_SESSION_OUTPUT_MIX) || @@ -7240,7 +7240,7 @@ status_t AudioFlinger::EffectChain::addEffect_l(const sp& effect) // check invalid effect chaining combinations if (insertPref == EFFECT_FLAG_INSERT_EXCLUSIVE || iPref == EFFECT_FLAG_INSERT_EXCLUSIVE) { - LOGW("addEffect_l() could not insert effect %s: exclusive conflict with %s", desc.name, d.name); + ALOGW("addEffect_l() could not insert effect %s: exclusive conflict with %s", desc.name, d.name); return INVALID_OPERATION; } // remember position of first insert effect and by default @@ -7476,7 +7476,7 @@ void AudioFlinger::EffectChain::setEffectSuspended_l( } desc = mSuspendedEffects.valueAt(index); if (desc->mRefCount <= 0) { - LOGW("setEffectSuspended_l() restore refcount should not be 0 %d", desc->mRefCount); + ALOGW("setEffectSuspended_l() restore refcount should not be 0 %d", desc->mRefCount); desc->mRefCount = 1; } if (--desc->mRefCount == 0) { @@ -7523,7 +7523,7 @@ void AudioFlinger::EffectChain::setEffectSuspendedAll_l(bool suspend) } desc = mSuspendedEffects.valueAt(index); if (desc->mRefCount <= 0) { - LOGW("setEffectSuspendedAll_l() restore refcount should not be 0 %d", desc->mRefCount); + ALOGW("setEffectSuspendedAll_l() restore refcount should not be 0 %d", desc->mRefCount); desc->mRefCount = 1; } if (--desc->mRefCount == 0) { @@ -7603,7 +7603,7 @@ void AudioFlinger::EffectChain::checkSuspendOnEffectEnabled(const spdesc().type, enabled); index = mSuspendedEffects.indexOfKey(effect->desc().type.timeLow); if (index < 0) { - LOGW("checkSuspendOnEffectEnabled() Fx should be suspended here!"); + ALOGW("checkSuspendOnEffectEnabled() Fx should be suspended here!"); return; } } diff --git a/services/audioflinger/AudioMixer.cpp b/services/audioflinger/AudioMixer.cpp index c9c61a5..b8e456f 100644 --- a/services/audioflinger/AudioMixer.cpp +++ b/services/audioflinger/AudioMixer.cpp @@ -365,7 +365,7 @@ void AudioMixer::process() void AudioMixer::process__validate(state_t* state) { - LOGW_IF(!state->needsChanged, + ALOGW_IF(!state->needsChanged, "in process__validate() but nothing's invalid"); uint32_t changed = state->needsChanged; diff --git a/services/audioflinger/AudioPolicyService.cpp b/services/audioflinger/AudioPolicyService.cpp index d99f66a..144f04e 100644 --- a/services/audioflinger/AudioPolicyService.cpp +++ b/services/audioflinger/AudioPolicyService.cpp @@ -338,7 +338,7 @@ audio_io_handle_t AudioPolicyService::getInput(int inputSource, sp fx = new AudioEffect(NULL, &effect->mUuid, -1, 0, 0, audioSession, input); status_t status = fx->initCheck(); if (status != NO_ERROR && status != ALREADY_EXISTS) { - LOGW("Failed to create Fx %s on input %d", effect->mName, input); + ALOGW("Failed to create Fx %s on input %d", effect->mName, input); // fx goes out of scope and strong ref on AudioEffect is released continue; } @@ -533,7 +533,7 @@ status_t AudioPolicyService::queryDefaultPreProcessing(int audioSession, } void AudioPolicyService::binderDied(const wp& who) { - LOGW("binderDied() %p, tid %d, calling tid %d", who.unsafe_get(), gettid(), + ALOGW("binderDied() %p, tid %d, calling tid %d", who.unsafe_get(), gettid(), IPCThreadState::self()->getCallingPid()); } @@ -726,7 +726,7 @@ bool AudioPolicyService::AudioCommandThread::threadLoop() delete data; }break; default: - LOGW("AudioCommandThread() unknown command %d", command->mCommand); + ALOGW("AudioCommandThread() unknown command %d", command->mCommand); } delete command; waitTime = INT64_MAX; @@ -1134,7 +1134,7 @@ size_t AudioPolicyService::readParamValue(cnode *node, ALOGV("readParamValue() reading string %s", param + *curSize - len); return len; } - LOGW("readParamValue() unknown param type %s", node->name); + ALOGW("readParamValue() unknown param type %s", node->name); return 0; } @@ -1155,7 +1155,7 @@ effect_param_t *AudioPolicyService::loadEffectParameter(cnode *root) // Note: that a pair of random strings is read as 0 0 int *ptr = (int *)fx_param->data; int *ptr2 = (int *)((char *)param + sizeof(effect_param_t)); - LOGW("loadEffectParameter() ptr %p ptr2 %p", ptr, ptr2); + ALOGW("loadEffectParameter() ptr %p ptr2 %p", ptr, ptr2); *ptr++ = atoi(param->name); *ptr = atoi(param->value); fx_param->psize = sizeof(int); @@ -1164,7 +1164,7 @@ effect_param_t *AudioPolicyService::loadEffectParameter(cnode *root) } } if (param == NULL || value == NULL) { - LOGW("loadEffectParameter() invalid parameter description %s", root->name); + ALOGW("loadEffectParameter() invalid parameter description %s", root->name); goto error; } @@ -1223,7 +1223,7 @@ AudioPolicyService::InputSourceDesc *AudioPolicyService::loadInputSource( { cnode *node = root->first_child; if (node == NULL) { - LOGW("loadInputSource() empty element %s", root->name); + ALOGW("loadInputSource() empty element %s", root->name); return NULL; } InputSourceDesc *source = new InputSourceDesc(); @@ -1247,7 +1247,7 @@ AudioPolicyService::InputSourceDesc *AudioPolicyService::loadInputSource( node = node->next; } if (source->mEffects.size() == 0) { - LOGW("loadInputSource() no valid effects found in source %s", root->name); + ALOGW("loadInputSource() no valid effects found in source %s", root->name); delete source; return NULL; } @@ -1264,7 +1264,7 @@ status_t AudioPolicyService::loadInputSources(cnode *root, const Vector name); if (source == AUDIO_SOURCE_CNT) { - LOGW("loadInputSources() invalid input source %s", node->name); + ALOGW("loadInputSources() invalid input source %s", node->name); node = node->next; continue; } @@ -1288,7 +1288,7 @@ AudioPolicyService::EffectDesc *AudioPolicyService::loadEffect(cnode *root) } effect_uuid_t uuid; if (AudioEffect::stringToGuid(node->value, &uuid) != NO_ERROR) { - LOGW("loadEffect() invalid uuid %s", node->value); + ALOGW("loadEffect() invalid uuid %s", node->value); return NULL; } EffectDesc *effect = new EffectDesc(); @@ -1354,7 +1354,7 @@ static audio_io_handle_t aps_open_output(void *service, { sp af = AudioSystem::get_audio_flinger(); if (af == NULL) { - LOGW("%s: could not get AudioFlinger", __func__); + ALOGW("%s: could not get AudioFlinger", __func__); return 0; } @@ -1368,7 +1368,7 @@ static audio_io_handle_t aps_open_dup_output(void *service, { sp af = AudioSystem::get_audio_flinger(); if (af == NULL) { - LOGW("%s: could not get AudioFlinger", __func__); + ALOGW("%s: could not get AudioFlinger", __func__); return 0; } return af->openDuplicateOutput(output1, output2); @@ -1387,7 +1387,7 @@ static int aps_suspend_output(void *service, audio_io_handle_t output) { sp af = AudioSystem::get_audio_flinger(); if (af == NULL) { - LOGW("%s: could not get AudioFlinger", __func__); + ALOGW("%s: could not get AudioFlinger", __func__); return PERMISSION_DENIED; } @@ -1398,7 +1398,7 @@ static int aps_restore_output(void *service, audio_io_handle_t output) { sp af = AudioSystem::get_audio_flinger(); if (af == NULL) { - LOGW("%s: could not get AudioFlinger", __func__); + ALOGW("%s: could not get AudioFlinger", __func__); return PERMISSION_DENIED; } @@ -1414,7 +1414,7 @@ static audio_io_handle_t aps_open_input(void *service, { sp af = AudioSystem::get_audio_flinger(); if (af == NULL) { - LOGW("%s: could not get AudioFlinger", __func__); + ALOGW("%s: could not get AudioFlinger", __func__); return 0; } diff --git a/services/audioflinger/AudioResamplerCubic.cpp b/services/audioflinger/AudioResamplerCubic.cpp index 4d721f6..587c7be 100644 --- a/services/audioflinger/AudioResamplerCubic.cpp +++ b/services/audioflinger/AudioResamplerCubic.cpp @@ -68,7 +68,7 @@ void AudioResamplerCubic::resampleStereo16(int32_t* out, size_t outFrameCount, provider->getNextBuffer(&mBuffer); if (mBuffer.raw == NULL) return; - // LOGW("New buffer: offset=%p, frames=%dn", mBuffer.raw, mBuffer.frameCount); + // ALOGW("New buffer: offset=%p, frames=%dn", mBuffer.raw, mBuffer.frameCount); } int16_t *in = mBuffer.i16; @@ -99,7 +99,7 @@ void AudioResamplerCubic::resampleStereo16(int32_t* out, size_t outFrameCount, if (mBuffer.raw == NULL) goto save_state; // ugly, but efficient in = mBuffer.i16; - // LOGW("New buffer: offset=%p, frames=%d\n", mBuffer.raw, mBuffer.frameCount); + // ALOGW("New buffer: offset=%p, frames=%d\n", mBuffer.raw, mBuffer.frameCount); } // advance sample state @@ -109,7 +109,7 @@ void AudioResamplerCubic::resampleStereo16(int32_t* out, size_t outFrameCount, } save_state: - // LOGW("Done: index=%d, fraction=%u", inputIndex, phaseFraction); + // ALOGW("Done: index=%d, fraction=%u", inputIndex, phaseFraction); mInputIndex = inputIndex; mPhaseFraction = phaseFraction; } @@ -133,7 +133,7 @@ void AudioResamplerCubic::resampleMono16(int32_t* out, size_t outFrameCount, provider->getNextBuffer(&mBuffer); if (mBuffer.raw == NULL) return; - // LOGW("New buffer: offset=%p, frames=%d\n", mBuffer.raw, mBuffer.frameCount); + // ALOGW("New buffer: offset=%p, frames=%d\n", mBuffer.raw, mBuffer.frameCount); } int16_t *in = mBuffer.i16; @@ -163,7 +163,7 @@ void AudioResamplerCubic::resampleMono16(int32_t* out, size_t outFrameCount, provider->getNextBuffer(&mBuffer); if (mBuffer.raw == NULL) goto save_state; // ugly, but efficient - // LOGW("New buffer: offset=%p, frames=%dn", mBuffer.raw, mBuffer.frameCount); + // ALOGW("New buffer: offset=%p, frames=%dn", mBuffer.raw, mBuffer.frameCount); in = mBuffer.i16; } @@ -173,7 +173,7 @@ void AudioResamplerCubic::resampleMono16(int32_t* out, size_t outFrameCount, } save_state: - // LOGW("Done: index=%d, fraction=%u", inputIndex, phaseFraction); + // ALOGW("Done: index=%d, fraction=%u", inputIndex, phaseFraction); mInputIndex = inputIndex; mPhaseFraction = phaseFraction; } diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp index 7b4b4ac..f841ec7 100644 --- a/services/camera/libcameraservice/CameraService.cpp +++ b/services/camera/libcameraservice/CameraService.cpp @@ -176,7 +176,7 @@ sp CameraService::connect( callingPid); return client; } else { - LOGW("CameraService::connect X (pid %d) rejected (existing client).", + ALOGW("CameraService::connect X (pid %d) rejected (existing client).", callingPid); return NULL; } @@ -185,7 +185,7 @@ sp CameraService::connect( } if (mBusy[cameraId]) { - LOGW("CameraService::connect X (pid %d) rejected" + ALOGW("CameraService::connect X (pid %d) rejected" " (camera %d is still busy).", callingPid, cameraId); return NULL; } @@ -390,7 +390,7 @@ status_t CameraService::Client::checkPid() const { int callingPid = getCallingPid(); if (callingPid == mClientPid) return NO_ERROR; - LOGW("attempt to use a locked camera from a different process" + ALOGW("attempt to use a locked camera from a different process" " (old pid %d, new pid %d)", mClientPid, callingPid); return EBUSY; } @@ -448,7 +448,7 @@ status_t CameraService::Client::connect(const sp& client) { Mutex::Autolock lock(mLock); if (mClientPid != 0 && checkPid() != NO_ERROR) { - LOGW("Tried to connect to a locked camera (old pid %d, new pid %d)", + ALOGW("Tried to connect to a locked camera (old pid %d, new pid %d)", mClientPid, callingPid); return EBUSY; } @@ -471,7 +471,7 @@ static void disconnectWindow(const sp& window) { status_t result = native_window_api_disconnect(window.get(), NATIVE_WINDOW_API_CAMERA); if (result != NO_ERROR) { - LOGW("native_window_api_disconnect failed: %s (%d)", strerror(-result), + ALOGW("native_window_api_disconnect failed: %s (%d)", strerror(-result), result); } } @@ -483,7 +483,7 @@ void CameraService::Client::disconnect() { Mutex::Autolock lock(mLock); if (checkPid() != NO_ERROR) { - LOGW("different client - don't disconnect"); + ALOGW("different client - don't disconnect"); return; } @@ -917,7 +917,7 @@ bool CameraService::Client::lockIfMessageWanted(int32_t msgType) { } usleep(CHECK_MESSAGE_INTERVAL * 1000); } - LOGW("lockIfMessageWanted(%d): dropped unwanted message", msgType); + ALOGW("lockIfMessageWanted(%d): dropped unwanted message", msgType); return false; } -- cgit v1.1