diff options
Diffstat (limited to 'media')
117 files changed, 920 insertions, 917 deletions
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..e988e06 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<preproc_fx_handle_t>(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<preproc_fx_handle_t>(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<preproc_fx_handle_t>(ns); @@ -616,7 +616,7 @@ int Effect_SetState(preproc_effect_t *effect, uint32_t state) case PREPROC_EFFECT_STATE_CREATED: case PREPROC_EFFECT_STATE_ACTIVE: case PREPROC_EFFECT_STATE_CONFIG: - LOGE("Effect_SetState invalid transition"); + ALOGE("Effect_SetState invalid transition"); status = -ENOSYS; break; default: @@ -626,7 +626,7 @@ int Effect_SetState(preproc_effect_t *effect, uint32_t state) case PREPROC_EFFECT_STATE_CONFIG: switch(effect->state) { case PREPROC_EFFECT_STATE_INIT: - LOGE("Effect_SetState invalid transition"); + ALOGE("Effect_SetState invalid transition"); status = -ENOSYS; break; case PREPROC_EFFECT_STATE_ACTIVE: @@ -645,7 +645,7 @@ int Effect_SetState(preproc_effect_t *effect, uint32_t state) case PREPROC_EFFECT_STATE_INIT: case PREPROC_EFFECT_STATE_CREATED: case PREPROC_EFFECT_STATE_ACTIVE: - LOGE("Effect_SetState invalid transition"); + ALOGE("Effect_SetState invalid transition"); status = -ENOSYS; break; case PREPROC_EFFECT_STATE_CONFIG: @@ -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<<fx->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..6639d06 100644 --- a/media/libmedia/AudioEffect.cpp +++ b/media/libmedia/AudioEffect.cpp @@ -101,18 +101,18 @@ 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; } const sp<IAudioFlinger>& audioFlinger = AudioSystem::get_audio_flinger(); if (audioFlinger == 0) { - LOGE("set(): Could not get audioflinger"); + ALOGE("set(): Could not get audioflinger"); return NO_INIT; } if (type == NULL && uuid == NULL) { - LOGW("Must specify at least type or uuid"); + ALOGW("Must specify at least type or uuid"); return BAD_VALUE; } @@ -138,7 +138,7 @@ status_t AudioEffect::set(const effect_uuid_t *type, mIEffectClient, priority, io, mSessionId, &mStatus, &mId, &enabled); if (iEffect == 0 || (mStatus != NO_ERROR && mStatus != ALREADY_EXISTS)) { - LOGE("set(): AudioFlinger could not create effect, status: %d", mStatus); + ALOGE("set(): AudioFlinger could not create effect, status: %d", mStatus); return mStatus; } @@ -148,7 +148,7 @@ status_t AudioEffect::set(const effect_uuid_t *type, cblk = iEffect->getCblk(); if (cblk == 0) { mStatus = NO_INIT; - LOGE("Could not get control block"); + ALOGE("Could not get control block"); return mStatus; } @@ -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..2674070 100644 --- a/media/libmedia/AudioRecord.cpp +++ b/media/libmedia/AudioRecord.cpp @@ -54,12 +54,12 @@ status_t AudioRecord::getMinFrameCount( size_t size = 0; if (AudioSystem::getInputBufferSize(sampleRate, format, channelCount, &size) != NO_ERROR) { - LOGE("AudioSystem could not query the input buffer size."); + ALOGE("AudioSystem could not query the input buffer size."); return NO_INIT; } if (size == 0) { - LOGE("Unsupported configuration: sampleRate %d, format %d, channelCount %d", + ALOGE("Unsupported configuration: sampleRate %d, format %d, channelCount %d", sampleRate, format, channelCount); return BAD_VALUE; } @@ -153,7 +153,7 @@ status_t AudioRecord::set( } // validate parameters if (!audio_is_valid_format(format)) { - LOGE("Invalid format"); + ALOGE("Invalid format"); return BAD_VALUE; } @@ -177,7 +177,7 @@ status_t AudioRecord::set( (audio_in_acoustics_t)flags, mSessionId); if (input == 0) { - LOGE("Could not get audio input for record source %d", inputSource); + ALOGE("Could not get audio input for record source %d", inputSource); return BAD_VALUE; } @@ -292,7 +292,7 @@ status_t AudioRecord::start() if (t != 0) { if (t->exitPending()) { if (t->requestExitAndWait() == WOULD_BLOCK) { - LOGE("AudioRecord::start called from thread"); + ALOGE("AudioRecord::start called from thread"); return WOULD_BLOCK; } } @@ -472,12 +472,12 @@ status_t AudioRecord::openRecord_l( &status); if (record == 0) { - LOGE("AudioFlinger could not create record track, status: %d", status); + ALOGE("AudioFlinger could not create record track, status: %d", status); return status; } sp<IMemory> cblk = record->getCblk(); if (cblk == 0) { - LOGE("Could not get control block"); + ALOGE("Could not get control block"); return NO_INIT; } mAudioRecord.clear(); @@ -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; } @@ -626,7 +626,7 @@ ssize_t AudioRecord::read(void* buffer, size_t userSize) if (ssize_t(userSize) < 0) { // sanity-check. user is most-likely passing an error code. - LOGE("AudioRecord::read(buffer=%p, size=%u (%d)", + ALOGE("AudioRecord::read(buffer=%p, size=%u (%d)", buffer, userSize, userSize); return BAD_VALUE; } @@ -709,7 +709,7 @@ bool AudioRecord::processAudioBuffer(const sp<ClientRecordThread>& thread) status_t err = obtainBuffer(&audioBuffer, 1); if (err < NO_ERROR) { if (err != TIMED_OUT) { - LOGE_IF(err != status_t(NO_MORE_BUFFERS), "Error obtaining an audio buffer, giving up."); + ALOGE_IF(err != status_t(NO_MORE_BUFFERS), "Error obtaining an audio buffer, giving up."); return false; } break; @@ -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..f7f129c 100644 --- a/media/libmedia/AudioSystem.cpp +++ b/media/libmedia/AudioSystem.cpp @@ -56,7 +56,7 @@ const sp<IAudioFlinger>& 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) { @@ -70,7 +70,7 @@ const sp<IAudioFlinger>& AudioSystem::get_audio_flinger() gAudioFlinger = interface_cast<IAudioFlinger>(binder); gAudioFlinger->registerClient(gAudioFlingerClient); } - LOGE_IF(gAudioFlinger==0, "no AudioFlinger!?"); + ALOGE_IF(gAudioFlinger==0, "no AudioFlinger!?"); return gAudioFlinger; } @@ -383,7 +383,7 @@ void AudioSystem::AudioFlingerClient::binderDied(const wp<IBinder>& 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<IAudioPolicyService>& 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<IBinder>& 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..191fbaf 100644 --- a/media/libmedia/AudioTrack.cpp +++ b/media/libmedia/AudioTrack.cpp @@ -158,7 +158,7 @@ status_t AudioTrack::set( AutoMutex lock(mLock); if (mAudioTrack != 0) { - LOGE("Track already in use"); + ALOGE("Track already in use"); return INVALID_OPERATION; } @@ -188,7 +188,7 @@ status_t AudioTrack::set( // validate parameters if (!audio_is_valid_format(format)) { - LOGE("Invalid format"); + ALOGE("Invalid format"); return BAD_VALUE; } @@ -198,7 +198,7 @@ status_t AudioTrack::set( } if (!audio_is_output_channel(channelMask)) { - LOGE("Invalid channel mask"); + ALOGE("Invalid channel mask"); return BAD_VALUE; } uint32_t channelCount = popcount(channelMask); @@ -209,7 +209,7 @@ status_t AudioTrack::set( (audio_policy_output_flags_t)flags); if (output == 0) { - LOGE("Could not get audio output for stream type %d", streamType); + ALOGE("Could not get audio output for stream type %d", streamType); return BAD_VALUE; } @@ -239,7 +239,7 @@ status_t AudioTrack::set( if (cbf != 0) { mAudioTrackThread = new AudioTrackThread(*this, threadCanCallJava); if (mAudioTrackThread == 0) { - LOGE("Could not create callback thread"); + ALOGE("Could not create callback thread"); return NO_INIT; } } @@ -252,7 +252,7 @@ status_t AudioTrack::set( mChannelCount = channelCount; mSharedBuffer = sharedBuffer; mMuted = false; - mActive = 0; + mActive = false; mCbf = cbf; mUserData = user; mLoopCount = 0; @@ -324,7 +324,7 @@ void AudioTrack::start() if (t != 0) { if (t->exitPending()) { if (t->requestExitAndWait() == WOULD_BLOCK) { - LOGE("AudioTrack::start called from thread"); + ALOGE("AudioTrack::start called from thread"); return; } } @@ -338,9 +338,9 @@ void AudioTrack::start() sp <IMemory> iMem = mCblkMemory; audio_track_cblk_t* cblk = mCblk; - if (mActive == 0) { + if (!mActive) { mFlushed = false; - mActive = 1; + mActive = true; mNewPosition = cblk->server + mUpdatePeriod; cblk->lock.lock(); cblk->bufferTimeoutMs = MAX_STARTUP_TIMEOUT_MS; @@ -369,7 +369,7 @@ void AudioTrack::start() cblk->lock.unlock(); if (status != NO_ERROR) { ALOGV("start() failed"); - mActive = 0; + mActive = false; if (t != 0) { t->requestExit(); } else { @@ -394,8 +394,8 @@ void AudioTrack::stop() } AutoMutex lock(mLock); - if (mActive == 1) { - mActive = 0; + if (mActive) { + mActive = false; mCblk->cv.signal(); mAudioTrack->stop(); // Cancel loops (If we are in the middle of a loop, playback @@ -424,7 +424,8 @@ void AudioTrack::stop() bool AudioTrack::stopped() const { - return !mActive; + AutoMutex lock(mLock); + return stopped_l(); } void AudioTrack::flush() @@ -456,8 +457,8 @@ void AudioTrack::pause() { ALOGV("pause"); AutoMutex lock(mLock); - if (mActive == 1) { - mActive = 0; + if (mActive) { + mActive = false; mAudioTrack->pause(); } } @@ -566,12 +567,12 @@ status_t AudioTrack::setLoop_l(uint32_t loopStart, uint32_t loopEnd, int loopCou if (loopStart >= loopEnd || loopEnd - loopStart > cblk->frameCount || cblk->server > loopStart) { - LOGE("setLoop invalid value: loopStart %d, loopEnd %d, loopCount %d, framecount %d, user %d", loopStart, loopEnd, loopCount, cblk->frameCount, cblk->user); + ALOGE("setLoop invalid value: loopStart %d, loopEnd %d, loopCount %d, framecount %d, user %d", loopStart, loopEnd, loopCount, cblk->frameCount, cblk->user); return BAD_VALUE; } if ((mSharedBuffer != 0) && (loopEnd > cblk->frameCount)) { - LOGE("setLoop invalid value: loop markers beyond data: loopStart %d, loopEnd %d, framecount %d", + ALOGE("setLoop invalid value: loop markers beyond data: loopStart %d, loopEnd %d, framecount %d", loopStart, loopEnd, cblk->frameCount); return BAD_VALUE; } @@ -647,9 +648,10 @@ status_t AudioTrack::getPositionUpdatePeriod(uint32_t *updatePeriod) status_t AudioTrack::setPosition(uint32_t position) { AutoMutex lock(mLock); - Mutex::Autolock _l(mCblk->lock); - if (!stopped()) return INVALID_OPERATION; + if (!stopped_l()) return INVALID_OPERATION; + + Mutex::Autolock _l(mCblk->lock); if (position > mCblk->user) return BAD_VALUE; @@ -672,7 +674,7 @@ status_t AudioTrack::reload() { AutoMutex lock(mLock); - if (!stopped()) return INVALID_OPERATION; + if (!stopped_l()) return INVALID_OPERATION; flush_l(); @@ -726,7 +728,7 @@ status_t AudioTrack::createTrack_l( status_t status; const sp<IAudioFlinger>& audioFlinger = AudioSystem::get_audio_flinger(); if (audioFlinger == 0) { - LOGE("Could not get audioflinger"); + ALOGE("Could not get audioflinger"); return NO_INIT; } @@ -769,7 +771,7 @@ status_t AudioTrack::createTrack_l( } if (frameCount < minFrameCount) { if (enforceFrameCount) { - LOGE("Invalid buffer size: minFrameCount %d, frameCount %d", minFrameCount, frameCount); + ALOGE("Invalid buffer size: minFrameCount %d, frameCount %d", minFrameCount, frameCount); return BAD_VALUE; } else { frameCount = minFrameCount; @@ -779,7 +781,7 @@ status_t AudioTrack::createTrack_l( // Ensure that buffer alignment matches channelcount int channelCount = popcount(channelMask); if (((uint32_t)sharedBuffer->pointer() & (channelCount | 1)) != 0) { - LOGE("Invalid buffer alignement: address %p, channelCount %d", sharedBuffer->pointer(), channelCount); + ALOGE("Invalid buffer alignement: address %p, channelCount %d", sharedBuffer->pointer(), channelCount); return BAD_VALUE; } frameCount = sharedBuffer->size()/channelCount/sizeof(int16_t); @@ -799,12 +801,12 @@ status_t AudioTrack::createTrack_l( &status); if (track == 0) { - LOGE("AudioFlinger could not create track, status: %d", status); + ALOGE("AudioFlinger could not create track, status: %d", status); return status; } sp<IMemory> cblk = track->getCblk(); if (cblk == 0) { - LOGE("Could not get control block"); + ALOGE("Could not get control block"); return NO_INIT; } mAudioTrack = track; @@ -832,7 +834,7 @@ status_t AudioTrack::createTrack_l( status_t AudioTrack::obtainBuffer(Buffer* audioBuffer, int32_t waitCount) { AutoMutex lock(mLock); - int active; + bool active; status_t result = NO_ERROR; audio_track_cblk_t* cblk = mCblk; uint32_t framesReq = audioBuffer->frameCount; @@ -868,7 +870,7 @@ status_t AudioTrack::obtainBuffer(Buffer* audioBuffer, int32_t waitCount) result = cblk->cv.waitRelative(cblk->lock, milliseconds(waitTimeMs)); cblk->lock.unlock(); mLock.lock(); - if (mActive == 0) { + if (!mActive) { return status_t(STOPPED); } cblk->lock.lock(); @@ -883,7 +885,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 +897,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 +920,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(); } @@ -964,7 +966,7 @@ ssize_t AudioTrack::write(const void* buffer, size_t userSize) if (ssize_t(userSize) < 0) { // sanity-check. user is most-likely passing an error code. - LOGE("AudioTrack::write(buffer=%p, size=%u (%d)", + ALOGE("AudioTrack::write(buffer=%p, size=%u (%d)", buffer, userSize, userSize); return BAD_VALUE; } @@ -1035,10 +1037,11 @@ bool AudioTrack::processAudioBuffer(const sp<AudioTrackThread>& thread) sp <IAudioTrack> audioTrack = mAudioTrack; sp <IMemory> iMem = mCblkMemory; audio_track_cblk_t* cblk = mCblk; + bool active = mActive; mLock.unlock(); // Manage underrun callback - if (mActive && (cblk->framesAvailable() == cblk->frameCount)) { + if (active && (cblk->framesAvailable() == cblk->frameCount)) { ALOGV("Underrun user: %x, server: %x, flags %04x", cblk->user, cblk->server, cblk->flags); if (!(android_atomic_or(CBLK_UNDERRUN_ON, &cblk->flags) & CBLK_UNDERRUN_MSK)) { mCbf(EVENT_UNDERRUN, mUserData, 0); @@ -1096,7 +1099,7 @@ bool AudioTrack::processAudioBuffer(const sp<AudioTrackThread>& thread) status_t err = obtainBuffer(&audioBuffer, waitCount); if (err < NO_ERROR) { if (err != TIMED_OUT) { - LOGE_IF(err != status_t(NO_MORE_BUFFERS), "Error obtaining an audio buffer, giving up."); + ALOGE_IF(err != status_t(NO_MORE_BUFFERS), "Error obtaining an audio buffer, giving up."); return false; } break; @@ -1164,7 +1167,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 +1223,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 +1231,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 +1239,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 +1248,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 +1262,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 +1331,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 +1352,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 +1370,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 +1431,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/IAudioFlinger.cpp b/media/libmedia/IAudioFlinger.cpp index bedf8d3..abd491f 100644 --- a/media/libmedia/IAudioFlinger.cpp +++ b/media/libmedia/IAudioFlinger.cpp @@ -112,7 +112,7 @@ public: data.writeInt32(lSessionId); status_t lStatus = remote()->transact(CREATE_TRACK, data, &reply); if (lStatus != NO_ERROR) { - LOGE("createTrack error: %s", strerror(-lStatus)); + ALOGE("createTrack error: %s", strerror(-lStatus)); } else { lSessionId = reply.readInt32(); if (sessionId != NULL) { @@ -155,7 +155,7 @@ public: data.writeInt32(lSessionId); status_t lStatus = remote()->transact(OPEN_RECORD, data, &reply); if (lStatus != NO_ERROR) { - LOGE("openRecord error: %s", strerror(-lStatus)); + ALOGE("openRecord error: %s", strerror(-lStatus)); } else { lSessionId = reply.readInt32(); if (sessionId != NULL) { @@ -632,7 +632,7 @@ public: status_t lStatus = remote()->transact(CREATE_EFFECT, data, &reply); if (lStatus != NO_ERROR) { - LOGE("createEffect error: %s", strerror(-lStatus)); + ALOGE("createEffect error: %s", strerror(-lStatus)); } else { lStatus = reply.readInt32(); int tmp = reply.readInt32(); diff --git a/media/libmedia/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..8525482 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); @@ -54,7 +54,7 @@ IMediaDeathNotifier::getMediaPlayerService() binder->linkToDeath(sDeathNotifier); sMediaPlayerService = interface_cast<IMediaPlayerService>(binder); } - LOGE_IF(sMediaPlayerService == 0, "no media player service!?"); + ALOGE_IF(sMediaPlayerService == 0, "no media player service!?"); return sMediaPlayerService; } @@ -76,7 +76,7 @@ IMediaDeathNotifier::removeObitRecipient(const wp<IMediaDeathNotifier>& recipien void IMediaDeathNotifier::DeathNotifier::binderDied(const wp<IBinder>& who) { - LOGW("media server died"); + ALOGW("media server died"); // Need to do this with the lock held SortedVector< wp<IMediaDeathNotifier> > 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/JetPlayer.cpp b/media/libmedia/JetPlayer.cpp index afa84b7..188e582 100644 --- a/media/libmedia/JetPlayer.cpp +++ b/media/libmedia/JetPlayer.cpp @@ -68,21 +68,21 @@ int JetPlayer::init() if (pLibConfig == NULL) pLibConfig = EAS_Config(); if (pLibConfig == NULL) { - LOGE("JetPlayer::init(): EAS library configuration could not be retrieved, aborting."); + ALOGE("JetPlayer::init(): EAS library configuration could not be retrieved, aborting."); return EAS_FAILURE; } // init the EAS library result = EAS_Init(&mEasData); if( result != EAS_SUCCESS) { - LOGE("JetPlayer::init(): Error initializing Sonivox EAS library, aborting."); + ALOGE("JetPlayer::init(): Error initializing Sonivox EAS library, aborting."); mState = EAS_STATE_ERROR; return result; } // init the JET library with the default app event controller range result = JET_Init(mEasData, NULL, sizeof(S_JET_CONFIG)); if( result != EAS_SUCCESS) { - LOGE("JetPlayer::init(): Error initializing JET library, aborting."); + ALOGE("JetPlayer::init(): Error initializing JET library, aborting."); mState = EAS_STATE_ERROR; return result; } @@ -109,7 +109,7 @@ int JetPlayer::init() ALOGV("JetPlayer::init(): render thread(%d) successfully started.", mTid); mState = EAS_STATE_READY; } else { - LOGE("JetPlayer::init(): failed to start render thread."); + ALOGE("JetPlayer::init(): failed to start render thread."); mState = EAS_STATE_ERROR; return EAS_FAILURE; } @@ -169,7 +169,7 @@ int JetPlayer::render() { mAudioBuffer = new EAS_PCM[pLibConfig->mixBufferSize * pLibConfig->numChannels * MIX_NUM_BUFFERS]; if (!mAudioBuffer) { - LOGE("JetPlayer::render(): mAudioBuffer allocate failed"); + ALOGE("JetPlayer::render(): mAudioBuffer allocate failed"); goto threadExit; } @@ -210,7 +210,7 @@ int JetPlayer::render() { for (int i = 0; i < MIX_NUM_BUFFERS; i++) { result = EAS_Render(mEasData, p, pLibConfig->mixBufferSize, &count); if (result != EAS_SUCCESS) { - LOGE("JetPlayer::render(): EAS_Render returned error %ld", result); + ALOGE("JetPlayer::render(): EAS_Render returned error %ld", result); } p += count * pLibConfig->numChannels; num_output += count * pLibConfig->numChannels * sizeof(EAS_PCM); @@ -229,14 +229,14 @@ int JetPlayer::render() { // check audio output track if (mAudioTrack == NULL) { - LOGE("JetPlayer::render(): output AudioTrack was not created"); + ALOGE("JetPlayer::render(): output AudioTrack was not created"); goto threadExit; } // Write data to the audio hardware //ALOGV("JetPlayer::render(): writing to audio output"); if ((temp = mAudioTrack->write(mAudioBuffer, num_output)) < 0) { - LOGE("JetPlayer::render(): Error in writing:%d",temp); + ALOGE("JetPlayer::render(): Error in writing:%d",temp); return temp; } @@ -469,7 +469,7 @@ int JetPlayer::clearQueue() //------------------------------------------------------------------------------------------------- void JetPlayer::dump() { - LOGE("JetPlayer dump: JET file=%s", mEasJetFileLoc->path); + ALOGE("JetPlayer dump: JET file=%s", mEasJetFileLoc->path); } void JetPlayer::dumpJetStatus(S_JET_STATUS* pJetStatus) @@ -479,7 +479,7 @@ void JetPlayer::dumpJetStatus(S_JET_STATUS* pJetStatus) pJetStatus->currentUserID, pJetStatus->segmentRepeatCount, pJetStatus->numQueuedSegments, pJetStatus->paused); else - LOGE(">> JET player status is NULL"); + ALOGE(">> JET player status is NULL"); } diff --git a/media/libmedia/MediaProfiles.cpp b/media/libmedia/MediaProfiles.cpp index 109f294..c905762 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. @@ -903,7 +903,7 @@ MediaProfiles::createInstanceFromXmlFile(const char *xml) expat is not compiled with -DXML_DTD. We don't have DTD parsing support. if (!::XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS)) { - LOGE("failed to enable DTD support in the xml file"); + ALOGE("failed to enable DTD support in the xml file"); return UNKNOWN_ERROR; } @@ -913,7 +913,7 @@ MediaProfiles::createInstanceFromXmlFile(const char *xml) for (;;) { void *buff = ::XML_GetBuffer(parser, BUFF_SIZE); if (buff == NULL) { - LOGE("failed to in call to XML_GetBuffer()"); + ALOGE("failed to in call to XML_GetBuffer()"); delete profiles; profiles = NULL; goto exit; @@ -921,7 +921,7 @@ MediaProfiles::createInstanceFromXmlFile(const char *xml) int bytes_read = ::fread(buff, 1, BUFF_SIZE, fp); if (bytes_read < 0) { - LOGE("failed in call to read"); + ALOGE("failed in call to read"); delete profiles; profiles = NULL; goto exit; @@ -963,7 +963,7 @@ int MediaProfiles::getVideoEncoderParamByName(const char *name, video_encoder co } } if (index == -1) { - LOGE("The given video encoder %d is not found", codec); + ALOGE("The given video encoder %d is not found", codec); return -1; } @@ -976,7 +976,7 @@ int MediaProfiles::getVideoEncoderParamByName(const char *name, video_encoder co if (!strcmp("enc.vid.fps.min", name)) return mVideoEncoders[index]->mMinFrameRate; if (!strcmp("enc.vid.fps.max", name)) return mVideoEncoders[index]->mMaxFrameRate; - LOGE("The given video encoder param name %s is not found", name); + ALOGE("The given video encoder param name %s is not found", name); return -1; } int MediaProfiles::getVideoEditorExportParamByName( @@ -993,7 +993,7 @@ int MediaProfiles::getVideoEditorExportParamByName( } } if (index == -1) { - LOGE("The given video decoder %d is not found", codec); + ALOGE("The given video decoder %d is not found", codec); return -1; } if (!strcmp("videoeditor.export.profile", name)) @@ -1001,7 +1001,7 @@ int MediaProfiles::getVideoEditorExportParamByName( if (!strcmp("videoeditor.export.level", name)) return exportProfile->mLevel; - LOGE("The given video editor export param name %s is not found", name); + ALOGE("The given video editor export param name %s is not found", name); return -1; } int MediaProfiles::getVideoEditorCapParamByName(const char *name) const @@ -1009,7 +1009,7 @@ int MediaProfiles::getVideoEditorCapParamByName(const char *name) const ALOGV("getVideoEditorCapParamByName: %s", name); if (mVideoEditorCap == NULL) { - LOGE("The mVideoEditorCap is not created, then create default cap."); + ALOGE("The mVideoEditorCap is not created, then create default cap."); createDefaultVideoEditorCap(sInstance); } @@ -1024,7 +1024,7 @@ int MediaProfiles::getVideoEditorCapParamByName(const char *name) const if (!strcmp("maxPrefetchYUVFrames", name)) return mVideoEditorCap->mMaxPrefetchYUVFrames; - LOGE("The given video editor param name %s is not found", name); + ALOGE("The given video editor param name %s is not found", name); return -1; } @@ -1048,7 +1048,7 @@ int MediaProfiles::getAudioEncoderParamByName(const char *name, audio_encoder co } } if (index == -1) { - LOGE("The given audio encoder %d is not found", codec); + ALOGE("The given audio encoder %d is not found", codec); return -1; } @@ -1059,7 +1059,7 @@ int MediaProfiles::getAudioEncoderParamByName(const char *name, audio_encoder co if (!strcmp("enc.aud.hz.min", name)) return mAudioEncoders[index]->mMinSampleRate; if (!strcmp("enc.aud.hz.max", name)) return mAudioEncoders[index]->mMaxSampleRate; - LOGE("The given audio encoder param name %s is not found", name); + ALOGE("The given audio encoder param name %s is not found", name); return -1; } @@ -1103,7 +1103,7 @@ int MediaProfiles::getCamcorderProfileParamByName(const char *name, int index = getCamcorderProfileIndex(cameraId, quality); if (index == -1) { - LOGE("The given camcorder profile camera %d quality %d is not found", + ALOGE("The given camcorder profile camera %d quality %d is not found", cameraId, quality); return -1; } @@ -1120,7 +1120,7 @@ int MediaProfiles::getCamcorderProfileParamByName(const char *name, if (!strcmp("aud.ch", name)) return mCamcorderProfiles[index]->mAudioCodec->mChannels; if (!strcmp("aud.hz", name)) return mCamcorderProfiles[index]->mAudioCodec->mSampleRate; - LOGE("The given camcorder profile param id %d name %s is not found", cameraId, name); + ALOGE("The given camcorder profile param id %d name %s is not found", cameraId, name); return -1; } diff --git a/media/libmedia/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/MediaScannerClient.cpp b/media/libmedia/MediaScannerClient.cpp index 629b165..40b8188 100644 --- a/media/libmedia/MediaScannerClient.cpp +++ b/media/libmedia/MediaScannerClient.cpp @@ -142,12 +142,12 @@ void MediaScannerClient::convertValues(uint32_t encoding) UConverter *conv = ucnv_open(enc, &status); if (U_FAILURE(status)) { - LOGE("could not create UConverter for %s\n", enc); + ALOGE("could not create UConverter for %s\n", enc); return; } UConverter *utf8Conv = ucnv_open("UTF-8", &status); if (U_FAILURE(status)) { - LOGE("could not create UConverter for UTF-8\n"); + ALOGE("could not create UConverter for UTF-8\n"); ucnv_close(conv); return; } @@ -180,7 +180,7 @@ void MediaScannerClient::convertValues(uint32_t encoding) ucnv_convertEx(utf8Conv, conv, &target, target + targetLength, &source, (const char *)dest, NULL, NULL, NULL, NULL, TRUE, TRUE, &status); if (U_FAILURE(status)) { - LOGE("ucnv_convertEx failed: %d\n", status); + ALOGE("ucnv_convertEx failed: %d\n", status); mValues->setEntry(i, "???"); } else { // zero terminate diff --git a/media/libmedia/Metadata.cpp b/media/libmedia/Metadata.cpp index 8eeebbb..546a9b0 100644 --- a/media/libmedia/Metadata.cpp +++ b/media/libmedia/Metadata.cpp @@ -135,7 +135,7 @@ bool Metadata::checkKey(int key) { if (key < FIRST_SYSTEM_ID || (LAST_SYSTEM_ID < key && key < FIRST_CUSTOM_ID)) { - LOGE("Bad key %d", key); + ALOGE("Bad key %d", key); return false; } size_t curr = mData->dataPosition(); @@ -152,7 +152,7 @@ bool Metadata::checkKey(int key) break; } if (mData->readInt32() == key) { - LOGE("Key exists already %d", key); + ALOGE("Key exists already %d", key); error = true; break; } diff --git a/media/libmedia/ToneGenerator.cpp b/media/libmedia/ToneGenerator.cpp index 28b54b5..35dfbb8 100644 --- a/media/libmedia/ToneGenerator.cpp +++ b/media/libmedia/ToneGenerator.cpp @@ -805,7 +805,7 @@ ToneGenerator::ToneGenerator(int streamType, float volume, bool threadCanCallJav mState = TONE_IDLE; if (AudioSystem::getOutputSamplingRate(&mSamplingRate, streamType) != NO_ERROR) { - LOGE("Unable to marshal AudioFlinger"); + ALOGE("Unable to marshal AudioFlinger"); return; } mThreadCanCallJava = threadCanCallJava; @@ -906,7 +906,7 @@ bool ToneGenerator::startTone(int toneType, int durationMs) { ALOGV("Start waiting for previous tone to stop"); lStatus = mWaitCbkCond.waitRelative(mLock, seconds(3)); if (lStatus != NO_ERROR) { - LOGE("--- start wait for stop timed out, status %d", lStatus); + ALOGE("--- start wait for stop timed out, status %d", lStatus); mState = TONE_IDLE; mLock.unlock(); return lResult; @@ -925,7 +925,7 @@ bool ToneGenerator::startTone(int toneType, int durationMs) { ALOGV("Wait for start callback"); lStatus = mWaitCbkCond.waitRelative(mLock, seconds(3)); if (lStatus != NO_ERROR) { - LOGE("--- Immediate start timed out, status %d", lStatus); + ALOGE("--- Immediate start timed out, status %d", lStatus); mState = TONE_IDLE; lResult = false; } @@ -943,14 +943,14 @@ bool ToneGenerator::startTone(int toneType, int durationMs) { } ALOGV("cond received"); } else { - LOGE("--- Delayed start timed out, status %d", lStatus); + ALOGE("--- Delayed start timed out, status %d", lStatus); mState = TONE_IDLE; } } 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; } @@ -979,7 +979,7 @@ void ToneGenerator::stopTone() { if (lStatus == NO_ERROR) { ALOGV("track stop complete, time %d", (unsigned int)(systemTime()/1000000)); } else { - LOGE("--- Stop timed out"); + ALOGE("--- Stop timed out"); mState = TONE_IDLE; mpAudioTrack->stop(); } @@ -1018,7 +1018,7 @@ bool ToneGenerator::initAudioTrack() { // Open audio track in mono, PCM 16bit, default sampling rate, default buffer size mpAudioTrack = new AudioTrack(); if (mpAudioTrack == 0) { - LOGE("AudioTrack allocation failed"); + ALOGE("AudioTrack allocation failed"); goto initAudioTrack_exit; } ALOGV("Create Track: %p\n", mpAudioTrack); @@ -1036,7 +1036,7 @@ bool ToneGenerator::initAudioTrack() { mThreadCanCallJava); if (mpAudioTrack->initCheck() != NO_ERROR) { - LOGE("AudioTrack->initCheck failed"); + ALOGE("AudioTrack->initCheck failed"); goto initAudioTrack_exit; } @@ -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/Visualizer.cpp b/media/libmedia/Visualizer.cpp index de40f98..d08ffa5 100644 --- a/media/libmedia/Visualizer.cpp +++ b/media/libmedia/Visualizer.cpp @@ -61,7 +61,7 @@ status_t Visualizer::setEnabled(bool enabled) if (enabled) { if (t->exitPending()) { if (t->requestExitAndWait() == WOULD_BLOCK) { - LOGE("Visualizer::enable() called from thread"); + ALOGE("Visualizer::enable() called from thread"); return INVALID_OPERATION; } } @@ -116,7 +116,7 @@ status_t Visualizer::setCaptureCallBack(capture_cbk_t cbk, void* user, uint32_t if (cbk != NULL) { mCaptureThread = new CaptureThread(*this, rate, ((flags & CAPTURE_CALL_JAVA) != 0)); if (mCaptureThread == 0) { - LOGE("Could not create callback thread"); + ALOGE("Could not create callback thread"); return NO_INIT; } } diff --git a/media/libmedia/mediametadataretriever.cpp b/media/libmedia/mediametadataretriever.cpp index fd8c065..88e269f 100644 --- a/media/libmedia/mediametadataretriever.cpp +++ b/media/libmedia/mediametadataretriever.cpp @@ -43,7 +43,7 @@ const sp<IMediaPlayerService>& 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) { @@ -52,7 +52,7 @@ const sp<IMediaPlayerService>& MediaMetadataRetriever::getService() binder->linkToDeath(sDeathNotifier); sService = interface_cast<IMediaPlayerService>(binder); } - LOGE_IF(sService == 0, "no MediaPlayerService!?"); + ALOGE_IF(sService == 0, "no MediaPlayerService!?"); return sService; } @@ -61,12 +61,12 @@ MediaMetadataRetriever::MediaMetadataRetriever() ALOGV("constructor"); const sp<IMediaPlayerService>& service(getService()); if (service == 0) { - LOGE("failed to obtain MediaMetadataRetrieverService"); + ALOGE("failed to obtain MediaMetadataRetrieverService"); return; } sp<IMediaMetadataRetriever> retriever(service->createMetadataRetriever(getpid())); if (retriever == 0) { - LOGE("failed to create IMediaMetadataRetriever object from server"); + ALOGE("failed to create IMediaMetadataRetriever object from server"); } mRetriever = retriever; } @@ -98,11 +98,11 @@ status_t MediaMetadataRetriever::setDataSource( ALOGV("setDataSource"); Mutex::Autolock _l(mLock); if (mRetriever == 0) { - LOGE("retriever is not initialized"); + ALOGE("retriever is not initialized"); return INVALID_OPERATION; } if (srcUrl == NULL) { - LOGE("data source is a null pointer"); + ALOGE("data source is a null pointer"); return UNKNOWN_ERROR; } ALOGV("data source (%s)", srcUrl); @@ -114,11 +114,11 @@ status_t MediaMetadataRetriever::setDataSource(int fd, int64_t offset, int64_t l ALOGV("setDataSource(%d, %lld, %lld)", fd, offset, length); Mutex::Autolock _l(mLock); if (mRetriever == 0) { - LOGE("retriever is not initialized"); + ALOGE("retriever is not initialized"); return INVALID_OPERATION; } if (fd < 0 || offset < 0 || length < 0) { - LOGE("Invalid negative argument"); + ALOGE("Invalid negative argument"); return UNKNOWN_ERROR; } return mRetriever->setDataSource(fd, offset, length); @@ -129,7 +129,7 @@ sp<IMemory> MediaMetadataRetriever::getFrameAtTime(int64_t timeUs, int option) ALOGV("getFrameAtTime: time(%lld us) option(%d)", timeUs, option); Mutex::Autolock _l(mLock); if (mRetriever == 0) { - LOGE("retriever is not initialized"); + ALOGE("retriever is not initialized"); return NULL; } return mRetriever->getFrameAtTime(timeUs, option); @@ -140,7 +140,7 @@ const char* MediaMetadataRetriever::extractMetadata(int keyCode) ALOGV("extractMetadata(%d)", keyCode); Mutex::Autolock _l(mLock); if (mRetriever == 0) { - LOGE("retriever is not initialized"); + ALOGE("retriever is not initialized"); return NULL; } return mRetriever->extractMetadata(keyCode); @@ -151,7 +151,7 @@ sp<IMemory> MediaMetadataRetriever::extractAlbumArt() ALOGV("extractAlbumArt"); Mutex::Autolock _l(mLock); if (mRetriever == 0) { - LOGE("retriever is not initialized"); + ALOGE("retriever is not initialized"); return NULL; } return mRetriever->extractAlbumArt(); @@ -160,7 +160,7 @@ sp<IMemory> MediaMetadataRetriever::extractAlbumArt() void MediaMetadataRetriever::DeathNotifier::binderDied(const wp<IBinder>& 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..2284927 100644 --- a/media/libmedia/mediaplayer.cpp +++ b/media/libmedia/mediaplayer.cpp @@ -115,7 +115,7 @@ status_t MediaPlayer::attachNewPlayer(const sp<IMediaPlayer>& player) if ( !( (mCurrentState & MEDIA_PLAYER_IDLE) || (mCurrentState == MEDIA_PLAYER_STATE_ERROR ) ) ) { - LOGE("attachNewPlayer called in state %d", mCurrentState); + ALOGE("attachNewPlayer called in state %d", mCurrentState); return INVALID_OPERATION; } @@ -126,7 +126,7 @@ status_t MediaPlayer::attachNewPlayer(const sp<IMediaPlayer>& player) mCurrentState = MEDIA_PLAYER_INITIALIZED; err = NO_ERROR; } else { - LOGE("Unable to to create media player"); + ALOGE("Unable to to create media player"); } } @@ -195,7 +195,7 @@ status_t MediaPlayer::invoke(const Parcel& request, Parcel *reply) ALOGV("invoke %d", request.dataSize()); return mPlayer->invoke(request, reply); } - LOGE("invoke failed: wrong state %X", mCurrentState); + ALOGE("invoke failed: wrong state %X", mCurrentState); return INVALID_OPERATION; } @@ -236,7 +236,7 @@ status_t MediaPlayer::prepareAsync_l() mCurrentState = MEDIA_PLAYER_PREPARING; return mPlayer->prepareAsync(); } - LOGE("prepareAsync called in state %d", mCurrentState); + ALOGE("prepareAsync called in state %d", mCurrentState); return INVALID_OPERATION; } @@ -298,7 +298,7 @@ status_t MediaPlayer::start() } return ret; } - LOGE("start called in state %d", mCurrentState); + ALOGE("start called in state %d", mCurrentState); return INVALID_OPERATION; } @@ -317,7 +317,7 @@ status_t MediaPlayer::stop() } return ret; } - LOGE("stop called in state %d", mCurrentState); + ALOGE("stop called in state %d", mCurrentState); return INVALID_OPERATION; } @@ -336,7 +336,7 @@ status_t MediaPlayer::pause() } return ret; } - LOGE("pause called in state %d", mCurrentState); + ALOGE("pause called in state %d", mCurrentState); return INVALID_OPERATION; } @@ -348,7 +348,7 @@ bool MediaPlayer::isPlaying() mPlayer->isPlaying(&temp); ALOGV("isPlaying: %d", temp); if ((mCurrentState & MEDIA_PLAYER_STARTED) && ! temp) { - LOGE("internal/external state mismatch corrected"); + ALOGE("internal/external state mismatch corrected"); mCurrentState = MEDIA_PLAYER_PAUSED; } return temp; @@ -402,7 +402,7 @@ status_t MediaPlayer::getDuration_l(int *msec) *msec = mDuration; return ret; } - LOGE("Attempt to call getDuration without a valid mediaplayer"); + ALOGE("Attempt to call getDuration without a valid mediaplayer"); return INVALID_OPERATION; } @@ -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 @@ -435,7 +435,7 @@ status_t MediaPlayer::seekTo_l(int msec) return NO_ERROR; } } - LOGE("Attempt to perform seekTo in wrong state: mPlayer=%p, mCurrentState=%u", mPlayer.get(), mCurrentState); + ALOGE("Attempt to perform seekTo in wrong state: mPlayer=%p, mCurrentState=%u", mPlayer.get(), mCurrentState); return INVALID_OPERATION; } @@ -457,7 +457,7 @@ status_t MediaPlayer::reset_l() if (mPlayer != 0) { status_t ret = mPlayer->reset(); if (ret != NO_ERROR) { - LOGE("reset() failed with return code (%d)", ret); + ALOGE("reset() failed with return code (%d)", ret); mCurrentState = MEDIA_PLAYER_STATE_ERROR; } else { mCurrentState = MEDIA_PLAYER_IDLE; @@ -486,7 +486,7 @@ status_t MediaPlayer::setAudioStreamType(int type) if (mCurrentState & ( MEDIA_PLAYER_PREPARED | MEDIA_PLAYER_STARTED | MEDIA_PLAYER_PAUSED | MEDIA_PLAYER_PLAYBACK_COMPLETE ) ) { // Can't change the stream type after prepare - LOGE("setAudioStream called in state %d", mCurrentState); + ALOGE("setAudioStream called in state %d", mCurrentState); return INVALID_OPERATION; } // cache @@ -532,7 +532,7 @@ status_t MediaPlayer::setAudioSessionId(int sessionId) ALOGV("MediaPlayer::setAudioSessionId(%d)", sessionId); Mutex::Autolock _l(mLock); if (!(mCurrentState & MEDIA_PLAYER_IDLE)) { - LOGE("setAudioSessionId called in state %d", mCurrentState); + ALOGE("setAudioSessionId called in state %d", mCurrentState); return INVALID_OPERATION; } if (sessionId < 0) { @@ -570,7 +570,7 @@ status_t MediaPlayer::attachAuxEffect(int effectId) if (mPlayer == 0 || (mCurrentState & MEDIA_PLAYER_IDLE) || (mCurrentState == MEDIA_PLAYER_STATE_ERROR )) { - LOGE("attachAuxEffect called in state %d", mCurrentState); + ALOGE("attachAuxEffect called in state %d", mCurrentState); return INVALID_OPERATION; } @@ -641,7 +641,7 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj) case MEDIA_PLAYBACK_COMPLETE: ALOGV("playback complete"); if (mCurrentState == MEDIA_PLAYER_IDLE) { - LOGE("playback complete in idle state"); + ALOGE("playback complete in idle state"); } if (!mLoop) { mCurrentState = MEDIA_PLAYER_PLAYBACK_COMPLETE; @@ -651,7 +651,7 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj) // Always log errors. // ext1: Media framework error code. // ext2: Implementation dependant error code. - LOGE("error (%d, %d)", ext1, ext2); + ALOGE("error (%d, %d)", ext1, ext2); mCurrentState = MEDIA_PLAYER_STATE_ERROR; if (mPrepareSync) { @@ -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: @@ -717,7 +717,7 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj) if (service != 0) { p = service->decode(url, pSampleRate, pNumChannels, pFormat); } else { - LOGE("Unable to locate media service"); + ALOGE("Unable to locate media service"); } return p; @@ -737,7 +737,7 @@ void MediaPlayer::died() if (service != 0) { p = service->decode(fd, offset, length, pSampleRate, pNumChannels, pFormat); } else { - LOGE("Unable to locate media service"); + ALOGE("Unable to locate media service"); } return p; diff --git a/media/libmedia/mediarecorder.cpp b/media/libmedia/mediarecorder.cpp index ec62978..8d947d8 100644 --- a/media/libmedia/mediarecorder.cpp +++ b/media/libmedia/mediarecorder.cpp @@ -33,11 +33,11 @@ status_t MediaRecorder::setCamera(const sp<ICamera>& camera, const sp<ICameraRec { ALOGV("setCamera(%p,%p)", camera.get(), proxy.get()); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_IDLE)) { - LOGE("setCamera called in an invalid state(%d)", mCurrentState); + ALOGE("setCamera called in an invalid state(%d)", mCurrentState); return INVALID_OPERATION; } @@ -54,15 +54,15 @@ status_t MediaRecorder::setPreviewSurface(const sp<Surface>& surface) { ALOGV("setPreviewSurface(%p)", surface.get()); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) { - LOGE("setPreviewSurface called in an invalid state(%d)", mCurrentState); + ALOGE("setPreviewSurface called in an invalid state(%d)", mCurrentState); return INVALID_OPERATION; } if (!mIsVideoSourceSet) { - LOGE("try to set preview surface without setting the video source first"); + ALOGE("try to set preview surface without setting the video source first"); return INVALID_OPERATION; } @@ -79,11 +79,11 @@ status_t MediaRecorder::init() { ALOGV("init"); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_IDLE)) { - LOGE("init called in an invalid state(%d)", mCurrentState); + ALOGE("init called in an invalid state(%d)", mCurrentState); return INVALID_OPERATION; } @@ -109,11 +109,11 @@ status_t MediaRecorder::setVideoSource(int vs) { ALOGV("setVideoSource(%d)", vs); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (mIsVideoSourceSet) { - LOGE("video source has already been set"); + ALOGE("video source has already been set"); return INVALID_OPERATION; } if (mCurrentState & MEDIA_RECORDER_IDLE) { @@ -124,7 +124,7 @@ status_t MediaRecorder::setVideoSource(int vs) } } if (!(mCurrentState & MEDIA_RECORDER_INITIALIZED)) { - LOGE("setVideoSource called in an invalid state(%d)", mCurrentState); + ALOGE("setVideoSource called in an invalid state(%d)", mCurrentState); return INVALID_OPERATION; } @@ -144,7 +144,7 @@ status_t MediaRecorder::setAudioSource(int as) { ALOGV("setAudioSource(%d)", as); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (mCurrentState & MEDIA_RECORDER_IDLE) { @@ -155,11 +155,11 @@ status_t MediaRecorder::setAudioSource(int as) } } if (mIsAudioSourceSet) { - LOGE("audio source has already been set"); + ALOGE("audio source has already been set"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_INITIALIZED)) { - LOGE("setAudioSource called in an invalid state(%d)", mCurrentState); + ALOGE("setAudioSource called in an invalid state(%d)", mCurrentState); return INVALID_OPERATION; } @@ -177,21 +177,21 @@ status_t MediaRecorder::setOutputFormat(int of) { ALOGV("setOutputFormat(%d)", of); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_INITIALIZED)) { - LOGE("setOutputFormat called in an invalid state: %d", mCurrentState); + ALOGE("setOutputFormat called in an invalid state: %d", mCurrentState); return INVALID_OPERATION; } if (mIsVideoSourceSet && of >= OUTPUT_FORMAT_AUDIO_ONLY_START && of != OUTPUT_FORMAT_RTP_AVP && of != OUTPUT_FORMAT_MPEG2TS) { //first non-video output format - LOGE("output format (%d) is meant for audio recording only and incompatible with video recording", of); + ALOGE("output format (%d) is meant for audio recording only and incompatible with video recording", of); return INVALID_OPERATION; } status_t ret = mMediaRecorder->setOutputFormat(of); if (OK != ret) { - LOGE("setOutputFormat failed: %d", ret); + ALOGE("setOutputFormat failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -203,19 +203,19 @@ status_t MediaRecorder::setVideoEncoder(int ve) { ALOGV("setVideoEncoder(%d)", ve); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (!mIsVideoSourceSet) { - LOGE("try to set the video encoder without setting the video source first"); + ALOGE("try to set the video encoder without setting the video source first"); return INVALID_OPERATION; } if (mIsVideoEncoderSet) { - LOGE("video encoder has already been set"); + ALOGE("video encoder has already been set"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) { - LOGE("setVideoEncoder called in an invalid state(%d)", mCurrentState); + ALOGE("setVideoEncoder called in an invalid state(%d)", mCurrentState); return INVALID_OPERATION; } @@ -233,19 +233,19 @@ status_t MediaRecorder::setAudioEncoder(int ae) { ALOGV("setAudioEncoder(%d)", ae); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (!mIsAudioSourceSet) { - LOGE("try to set the audio encoder without setting the audio source first"); + ALOGE("try to set the audio encoder without setting the audio source first"); return INVALID_OPERATION; } if (mIsAudioEncoderSet) { - LOGE("audio encoder has already been set"); + ALOGE("audio encoder has already been set"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) { - LOGE("setAudioEncoder called in an invalid state(%d)", mCurrentState); + ALOGE("setAudioEncoder called in an invalid state(%d)", mCurrentState); return INVALID_OPERATION; } @@ -263,15 +263,15 @@ status_t MediaRecorder::setOutputFile(const char* path) { ALOGV("setOutputFile(%s)", path); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (mIsOutputFileSet) { - LOGE("output file has already been set"); + ALOGE("output file has already been set"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) { - LOGE("setOutputFile called in an invalid state(%d)", mCurrentState); + ALOGE("setOutputFile called in an invalid state(%d)", mCurrentState); return INVALID_OPERATION; } @@ -289,15 +289,15 @@ status_t MediaRecorder::setOutputFile(int fd, int64_t offset, int64_t length) { ALOGV("setOutputFile(%d, %lld, %lld)", fd, offset, length); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (mIsOutputFileSet) { - LOGE("output file has already been set"); + ALOGE("output file has already been set"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) { - LOGE("setOutputFile called in an invalid state(%d)", mCurrentState); + ALOGE("setOutputFile called in an invalid state(%d)", mCurrentState); return INVALID_OPERATION; } @@ -308,7 +308,7 @@ status_t MediaRecorder::setOutputFile(int fd, int64_t offset, int64_t length) // this issue by checking the file descriptor first before passing // it through binder call. if (fd < 0) { - LOGE("Invalid file descriptor: %d", fd); + ALOGE("Invalid file descriptor: %d", fd); return BAD_VALUE; } @@ -326,21 +326,21 @@ status_t MediaRecorder::setVideoSize(int width, int height) { ALOGV("setVideoSize(%d, %d)", width, height); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) { - LOGE("setVideoSize called in an invalid state: %d", mCurrentState); + ALOGE("setVideoSize called in an invalid state: %d", mCurrentState); return INVALID_OPERATION; } if (!mIsVideoSourceSet) { - LOGE("Cannot set video size without setting video source first"); + ALOGE("Cannot set video size without setting video source first"); return INVALID_OPERATION; } status_t ret = mMediaRecorder->setVideoSize(width, height); if (OK != ret) { - LOGE("setVideoSize failed: %d", ret); + ALOGE("setVideoSize failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -358,7 +358,7 @@ sp<ISurfaceTexture> MediaRecorder:: mSurfaceMediaSource = mMediaRecorder->querySurfaceMediaSource(); if (mSurfaceMediaSource == NULL) { - LOGE("SurfaceMediaSource could not be initialized!"); + ALOGE("SurfaceMediaSource could not be initialized!"); } return mSurfaceMediaSource; } @@ -369,21 +369,21 @@ status_t MediaRecorder::setVideoFrameRate(int frames_per_second) { ALOGV("setVideoFrameRate(%d)", frames_per_second); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) { - LOGE("setVideoFrameRate called in an invalid state: %d", mCurrentState); + ALOGE("setVideoFrameRate called in an invalid state: %d", mCurrentState); return INVALID_OPERATION; } if (!mIsVideoSourceSet) { - LOGE("Cannot set video frame rate without setting video source first"); + ALOGE("Cannot set video frame rate without setting video source first"); return INVALID_OPERATION; } status_t ret = mMediaRecorder->setVideoFrameRate(frames_per_second); if (OK != ret) { - LOGE("setVideoFrameRate failed: %d", ret); + ALOGE("setVideoFrameRate failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -393,7 +393,7 @@ status_t MediaRecorder::setVideoFrameRate(int frames_per_second) status_t MediaRecorder::setParameters(const String8& params) { ALOGV("setParameters(%s)", params.string()); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } @@ -402,13 +402,13 @@ status_t MediaRecorder::setParameters(const String8& params) { MEDIA_RECORDER_RECORDING | MEDIA_RECORDER_ERROR)); if (isInvalidState) { - LOGE("setParameters is called in an invalid state: %d", mCurrentState); + ALOGE("setParameters is called in an invalid state: %d", mCurrentState); return INVALID_OPERATION; } status_t ret = mMediaRecorder->setParameters(params); if (OK != ret) { - LOGE("setParameters(%s) failed: %d", params.string(), ret); + ALOGE("setParameters(%s) failed: %d", params.string(), ret); // Do not change our current state to MEDIA_RECORDER_ERROR, failures // of the only currently supported parameters, "max-duration" and // "max-filesize" are _not_ fatal. @@ -421,34 +421,34 @@ status_t MediaRecorder::prepare() { ALOGV("prepare"); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) { - LOGE("prepare called in an invalid state: %d", mCurrentState); + ALOGE("prepare called in an invalid state: %d", mCurrentState); return INVALID_OPERATION; } if (mIsAudioSourceSet != mIsAudioEncoderSet) { if (mIsAudioSourceSet) { - LOGE("audio source is set, but audio encoder is not set"); + ALOGE("audio source is set, but audio encoder is not set"); } else { // must not happen, since setAudioEncoder checks this already - LOGE("audio encoder is set, but audio source is not set"); + ALOGE("audio encoder is set, but audio source is not set"); } return INVALID_OPERATION; } if (mIsVideoSourceSet != mIsVideoEncoderSet) { if (mIsVideoSourceSet) { - LOGE("video source is set, but video encoder is not set"); + ALOGE("video source is set, but video encoder is not set"); } else { // must not happen, since setVideoEncoder checks this already - LOGE("video encoder is set, but video source is not set"); + ALOGE("video encoder is set, but video source is not set"); } return INVALID_OPERATION; } status_t ret = mMediaRecorder->prepare(); if (OK != ret) { - LOGE("prepare failed: %d", ret); + ALOGE("prepare failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -460,17 +460,17 @@ status_t MediaRecorder::getMaxAmplitude(int* max) { ALOGV("getMaxAmplitude"); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (mCurrentState & MEDIA_RECORDER_ERROR) { - LOGE("getMaxAmplitude called in an invalid state: %d", mCurrentState); + ALOGE("getMaxAmplitude called in an invalid state: %d", mCurrentState); return INVALID_OPERATION; } status_t ret = mMediaRecorder->getMaxAmplitude(max); if (OK != ret) { - LOGE("getMaxAmplitude failed: %d", ret); + ALOGE("getMaxAmplitude failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -481,17 +481,17 @@ status_t MediaRecorder::start() { ALOGV("start"); if (mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_PREPARED)) { - LOGE("start called in an invalid state: %d", mCurrentState); + ALOGE("start called in an invalid state: %d", mCurrentState); return INVALID_OPERATION; } status_t ret = mMediaRecorder->start(); if (OK != ret) { - LOGE("start failed: %d", ret); + ALOGE("start failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -503,17 +503,17 @@ status_t MediaRecorder::stop() { ALOGV("stop"); if (mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_RECORDING)) { - LOGE("stop called in an invalid state: %d", mCurrentState); + ALOGE("stop called in an invalid state: %d", mCurrentState); return INVALID_OPERATION; } status_t ret = mMediaRecorder->stop(); if (OK != ret) { - LOGE("stop failed: %d", ret); + ALOGE("stop failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -531,7 +531,7 @@ status_t MediaRecorder::reset() { ALOGV("reset"); if (mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } @@ -556,7 +556,7 @@ status_t MediaRecorder::reset() break; default: { - LOGE("Unexpected non-existing state: %d", mCurrentState); + ALOGE("Unexpected non-existing state: %d", mCurrentState); break; } } @@ -567,12 +567,12 @@ status_t MediaRecorder::close() { ALOGV("close"); if (!(mCurrentState & MEDIA_RECORDER_INITIALIZED)) { - LOGE("close called in an invalid state: %d", mCurrentState); + ALOGE("close called in an invalid state: %d", mCurrentState); return INVALID_OPERATION; } status_t ret = mMediaRecorder->close(); if (OK != ret) { - LOGE("close failed: %d", ret); + ALOGE("close failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return UNKNOWN_ERROR; } else { @@ -586,7 +586,7 @@ status_t MediaRecorder::doReset() ALOGV("doReset"); status_t ret = mMediaRecorder->reset(); if (OK != ret) { - LOGE("doReset failed: %d", ret); + ALOGE("doReset failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } else { diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp index 487c433..f5cb019 100644 --- a/media/libmediaplayerservice/MediaPlayerService.cpp +++ b/media/libmediaplayerservice/MediaPlayerService.cpp @@ -112,14 +112,14 @@ bool unmarshallFilter(const Parcel& p, int32_t val; if (p.readInt32(&val) != OK) { - LOGE("Failed to read filter's length"); + ALOGE("Failed to read filter's length"); *status = NOT_ENOUGH_DATA; return false; } if( val > kMaxFilterSize || val < 0) { - LOGE("Invalid filter len %d", val); + ALOGE("Invalid filter len %d", val); *status = BAD_VALUE; return false; } @@ -134,7 +134,7 @@ bool unmarshallFilter(const Parcel& p, if (p.dataAvail() < size) { - LOGE("Filter too short expected %d but got %d", size, p.dataAvail()); + ALOGE("Filter too short expected %d but got %d", size, p.dataAvail()); *status = NOT_ENOUGH_DATA; return false; } @@ -144,7 +144,7 @@ bool unmarshallFilter(const Parcel& p, if (NULL == data) { - LOGE("Filter had no data"); + ALOGE("Filter had no data"); *status = BAD_VALUE; return false; } @@ -184,7 +184,7 @@ static bool checkPermission(const char* permissionString) { #endif if (getpid() == IPCThreadState::self()->getCallingPid()) return true; bool ok = checkCallingPermission(String16(permissionString)); - if (!ok) LOGE("Request requires %s", permissionString); + if (!ok) ALOGE("Request requires %s", permissionString); return ok; } @@ -630,7 +630,7 @@ static sp<MediaPlayerBase> createPlayer(player_type playerType, void* cookie, p = new TestPlayerStub(); break; default: - LOGE("Unknown player type: %d", playerType); + ALOGE("Unknown player type: %d", playerType); return NULL; } if (p != NULL) { @@ -641,7 +641,7 @@ static sp<MediaPlayerBase> createPlayer(player_type playerType, void* cookie, } } if (p == NULL) { - LOGE("Failed to create player object"); + ALOGE("Failed to create player object"); } return p; } @@ -688,7 +688,7 @@ status_t MediaPlayerService::Client::setDataSource( int fd = android::openContentProviderFile(url16); if (fd < 0) { - LOGE("Couldn't open fd for %s", url); + ALOGE("Couldn't open fd for %s", url); return UNKNOWN_ERROR; } setDataSource(fd, 0, 0x7fffffffffLL); // this sets mStatus @@ -713,7 +713,7 @@ status_t MediaPlayerService::Client::setDataSource( if (mStatus == NO_ERROR) { mPlayer = p; } else { - LOGE(" error: %d", mStatus); + ALOGE(" error: %d", mStatus); } return mStatus; } @@ -725,7 +725,7 @@ status_t MediaPlayerService::Client::setDataSource(int fd, int64_t offset, int64 struct stat sb; int ret = fstat(fd, &sb); if (ret != 0) { - LOGE("fstat(%d) failed: %d, %s", fd, ret, strerror(errno)); + ALOGE("fstat(%d) failed: %d, %s", fd, ret, strerror(errno)); return UNKNOWN_ERROR; } @@ -736,7 +736,7 @@ status_t MediaPlayerService::Client::setDataSource(int fd, int64_t offset, int64 ALOGV("st_size = %llu", sb.st_size); if (offset >= sb.st_size) { - LOGE("offset error"); + ALOGE("offset error"); ::close(fd); return UNKNOWN_ERROR; } @@ -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); } } @@ -821,7 +821,7 @@ status_t MediaPlayerService::Client::setVideoSurfaceTexture( NATIVE_WINDOW_API_MEDIA); if (err != OK) { - LOGE("setVideoSurfaceTexture failed: %d", err); + ALOGE("setVideoSurfaceTexture failed: %d", err); // Note that we must do the reset before disconnecting from the ANW. // Otherwise queue/dequeue calls could be made on the disconnected // ANW, which may result in errors. @@ -905,7 +905,7 @@ status_t MediaPlayerService::Client::getMetadata( if (status != OK) { metadata.resetParcel(); - LOGE("getMetadata failed %d", status); + ALOGE("getMetadata failed %d", status); return status; } @@ -975,7 +975,7 @@ status_t MediaPlayerService::Client::getCurrentPosition(int *msec) if (ret == NO_ERROR) { ALOGV("[%d] getCurrentPosition = %d", mConnId, *msec); } else { - LOGE("getCurrentPosition returned %d", ret); + ALOGE("getCurrentPosition returned %d", ret); } return ret; } @@ -989,7 +989,7 @@ status_t MediaPlayerService::Client::getDuration(int *msec) if (ret == NO_ERROR) { ALOGV("[%d] getDuration = %d", mConnId, *msec); } else { - LOGE("getDuration returned %d", ret); + ALOGE("getDuration returned %d", ret); } return ret; } @@ -1394,7 +1394,7 @@ status_t MediaPlayerService::AudioOutput::open( } if ((t == 0) || (t->initCheck() != NO_ERROR)) { - LOGE("Unable to create audio track"); + ALOGE("Unable to create audio track"); delete t; return NO_INIT; } @@ -1652,7 +1652,7 @@ ssize_t MediaPlayerService::AudioCache::write(const void* buffer, size_t size) p += mSize; ALOGV("memcpy(%p, %p, %u)", p, buffer, size); if (mSize + size > mHeap->getSize()) { - LOGE("Heap size overflow! req size: %d, max size: %d", (mSize + size), mHeap->getSize()); + ALOGE("Heap size overflow! req size: %d, max size: %d", (mSize + size), mHeap->getSize()); size = mHeap->getSize() - mSize; } memcpy(p, buffer, size); @@ -1687,7 +1687,7 @@ void MediaPlayerService::AudioCache::notify( switch (msg) { case MEDIA_ERROR: - LOGE("Error %d, %d occurred", ext1, ext2); + ALOGE("Error %d, %d occurred", ext1, ext2); p->mError = ext1; break; case MEDIA_PREPARED: @@ -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; } @@ -1807,7 +1807,7 @@ void MediaPlayerService::addBatteryData(uint32_t params) info.refCount = 0; if (mBatteryData.add(uid, info) == NO_MEMORY) { - LOGE("Battery track error: no memory for new app"); + ALOGE("Battery track error: no memory for new app"); return; } } @@ -1825,10 +1825,10 @@ 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"); + ALOGE("Battery track error: refCount < 0"); mBatteryData.removeItem(uid); return; } diff --git a/media/libmediaplayerservice/MediaRecorderClient.cpp b/media/libmediaplayerservice/MediaRecorderClient.cpp index ca92c77..d219fc2 100644 --- a/media/libmediaplayerservice/MediaRecorderClient.cpp +++ b/media/libmediaplayerservice/MediaRecorderClient.cpp @@ -54,7 +54,7 @@ static bool checkPermission(const char* permissionString) { #endif if (getpid() == IPCThreadState::self()->getCallingPid()) return true; bool ok = checkCallingPermission(String16(permissionString)); - if (!ok) LOGE("Request requires %s", permissionString); + if (!ok) ALOGE("Request requires %s", permissionString); return ok; } @@ -64,7 +64,7 @@ sp<ISurfaceTexture> MediaRecorderClient::querySurfaceMediaSource() ALOGV("Query SurfaceMediaSource"); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NULL; } return mRecorder->querySurfaceMediaSource(); @@ -78,7 +78,7 @@ status_t MediaRecorderClient::setCamera(const sp<ICamera>& camera, ALOGV("setCamera"); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->setCamera(camera, proxy); @@ -89,7 +89,7 @@ status_t MediaRecorderClient::setPreviewSurface(const sp<Surface>& surface) ALOGV("setPreviewSurface"); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->setPreviewSurface(surface); @@ -103,7 +103,7 @@ status_t MediaRecorderClient::setVideoSource(int vs) } Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->setVideoSource((video_source)vs); @@ -117,7 +117,7 @@ status_t MediaRecorderClient::setAudioSource(int as) } Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->setAudioSource((audio_source_t)as); @@ -128,7 +128,7 @@ status_t MediaRecorderClient::setOutputFormat(int of) ALOGV("setOutputFormat(%d)", of); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->setOutputFormat((output_format)of); @@ -139,7 +139,7 @@ status_t MediaRecorderClient::setVideoEncoder(int ve) ALOGV("setVideoEncoder(%d)", ve); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->setVideoEncoder((video_encoder)ve); @@ -150,7 +150,7 @@ status_t MediaRecorderClient::setAudioEncoder(int ae) ALOGV("setAudioEncoder(%d)", ae); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->setAudioEncoder((audio_encoder)ae); @@ -161,7 +161,7 @@ status_t MediaRecorderClient::setOutputFile(const char* path) ALOGV("setOutputFile(%s)", path); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->setOutputFile(path); @@ -172,7 +172,7 @@ status_t MediaRecorderClient::setOutputFile(int fd, int64_t offset, int64_t leng ALOGV("setOutputFile(%d, %lld, %lld)", fd, offset, length); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->setOutputFile(fd, offset, length); @@ -183,7 +183,7 @@ status_t MediaRecorderClient::setVideoSize(int width, int height) ALOGV("setVideoSize(%dx%d)", width, height); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->setVideoSize(width, height); @@ -194,7 +194,7 @@ status_t MediaRecorderClient::setVideoFrameRate(int frames_per_second) ALOGV("setVideoFrameRate(%d)", frames_per_second); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->setVideoFrameRate(frames_per_second); @@ -204,7 +204,7 @@ status_t MediaRecorderClient::setParameters(const String8& params) { ALOGV("setParameters(%s)", params.string()); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->setParameters(params); @@ -215,7 +215,7 @@ status_t MediaRecorderClient::prepare() ALOGV("prepare"); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->prepare(); @@ -227,7 +227,7 @@ status_t MediaRecorderClient::getMaxAmplitude(int* max) ALOGV("getMaxAmplitude"); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->getMaxAmplitude(max); @@ -238,7 +238,7 @@ status_t MediaRecorderClient::start() ALOGV("start"); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->start(); @@ -250,7 +250,7 @@ status_t MediaRecorderClient::stop() ALOGV("stop"); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->stop(); @@ -261,7 +261,7 @@ status_t MediaRecorderClient::init() ALOGV("init"); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->init(); @@ -272,7 +272,7 @@ status_t MediaRecorderClient::close() ALOGV("close"); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->close(); @@ -284,7 +284,7 @@ status_t MediaRecorderClient::reset() ALOGV("reset"); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->reset(); @@ -322,7 +322,7 @@ status_t MediaRecorderClient::setListener(const sp<IMediaRecorderClient>& listen ALOGV("setListener"); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { - LOGE("recorder is not initialized"); + ALOGE("recorder is not initialized"); return NO_INIT; } return mRecorder->setListener(listener); diff --git a/media/libmediaplayerservice/MetadataRetrieverClient.cpp b/media/libmediaplayerservice/MetadataRetrieverClient.cpp index f945c6a..7dbb57f 100644 --- a/media/libmediaplayerservice/MetadataRetrieverClient.cpp +++ b/media/libmediaplayerservice/MetadataRetrieverClient.cpp @@ -98,11 +98,11 @@ static sp<MediaMetadataRetrieverBase> createRetriever(player_type playerType) default: // TODO: // support for TEST_PLAYER - LOGE("player type %d is not supported", playerType); + ALOGE("player type %d is not supported", playerType); break; } if (p == NULL) { - LOGE("failed to create a retriever object"); + ALOGE("failed to create a retriever object"); } return p; } @@ -131,7 +131,7 @@ status_t MetadataRetrieverClient::setDataSource(int fd, int64_t offset, int64_t struct stat sb; int ret = fstat(fd, &sb); if (ret != 0) { - LOGE("fstat(%d) failed: %d, %s", fd, ret, strerror(errno)); + ALOGE("fstat(%d) failed: %d, %s", fd, ret, strerror(errno)); return BAD_VALUE; } ALOGV("st_dev = %llu", sb.st_dev); @@ -141,7 +141,7 @@ status_t MetadataRetrieverClient::setDataSource(int fd, int64_t offset, int64_t ALOGV("st_size = %llu", sb.st_size); if (offset >= sb.st_size) { - LOGE("offset (%lld) bigger than file size (%llu)", offset, sb.st_size); + ALOGE("offset (%lld) bigger than file size (%llu)", offset, sb.st_size); ::close(fd); return BAD_VALUE; } @@ -169,24 +169,24 @@ sp<IMemory> MetadataRetrieverClient::getFrameAtTime(int64_t timeUs, int option) Mutex::Autolock lock(mLock); mThumbnail.clear(); if (mRetriever == NULL) { - LOGE("retriever is not initialized"); + ALOGE("retriever is not initialized"); return NULL; } VideoFrame *frame = mRetriever->getFrameAtTime(timeUs, option); if (frame == NULL) { - LOGE("failed to capture a video frame"); + ALOGE("failed to capture a video frame"); return NULL; } size_t size = sizeof(VideoFrame) + frame->mSize; sp<MemoryHeapBase> heap = new MemoryHeapBase(size, 0, "MetadataRetrieverClient"); if (heap == NULL) { - LOGE("failed to create MemoryDealer"); + ALOGE("failed to create MemoryDealer"); delete frame; return NULL; } mThumbnail = new MemoryBase(heap, 0, size); if (mThumbnail == NULL) { - LOGE("not enough memory for VideoFrame size=%u", size); + ALOGE("not enough memory for VideoFrame size=%u", size); delete frame; return NULL; } @@ -210,24 +210,24 @@ sp<IMemory> MetadataRetrieverClient::extractAlbumArt() Mutex::Autolock lock(mLock); mAlbumArt.clear(); if (mRetriever == NULL) { - LOGE("retriever is not initialized"); + ALOGE("retriever is not initialized"); return NULL; } MediaAlbumArt *albumArt = mRetriever->extractAlbumArt(); if (albumArt == NULL) { - LOGE("failed to extract an album art"); + ALOGE("failed to extract an album art"); return NULL; } size_t size = sizeof(MediaAlbumArt) + albumArt->mSize; sp<MemoryHeapBase> heap = new MemoryHeapBase(size, 0, "MetadataRetrieverClient"); if (heap == NULL) { - LOGE("failed to create MemoryDealer object"); + ALOGE("failed to create MemoryDealer object"); delete albumArt; return NULL; } mAlbumArt = new MemoryBase(heap, 0, size); if (mAlbumArt == NULL) { - LOGE("not enough memory for MediaAlbumArt size=%u", size); + ALOGE("not enough memory for MediaAlbumArt size=%u", size); delete albumArt; return NULL; } @@ -244,7 +244,7 @@ const char* MetadataRetrieverClient::extractMetadata(int keyCode) ALOGV("extractMetadata"); Mutex::Autolock lock(mLock); if (mRetriever == NULL) { - LOGE("retriever is not initialized"); + ALOGE("retriever is not initialized"); return NULL; } return mRetriever->extractMetadata(keyCode); diff --git a/media/libmediaplayerservice/MidiFile.cpp b/media/libmediaplayerservice/MidiFile.cpp index 4946956..7cb8c29 100644 --- a/media/libmediaplayerservice/MidiFile.cpp +++ b/media/libmediaplayerservice/MidiFile.cpp @@ -69,13 +69,13 @@ MidiFile::MidiFile() : if (pLibConfig == NULL) pLibConfig = EAS_Config(); if ((pLibConfig == NULL) || (LIB_VERSION != pLibConfig->libVersion)) { - LOGE("EAS library/header mismatch"); + ALOGE("EAS library/header mismatch"); goto Failed; } // initialize EAS library if (EAS_Init(&mEasData) != EAS_SUCCESS) { - LOGE("EAS_Init failed"); + ALOGE("EAS_Init failed"); goto Failed; } @@ -134,7 +134,7 @@ status_t MidiFile::setDataSource( } if (result != EAS_SUCCESS) { - LOGE("EAS_OpenFile failed: [%d]", (int)result); + ALOGE("EAS_OpenFile failed: [%d]", (int)result); mState = EAS_STATE_ERROR; return ERROR_OPEN_FAILED; } @@ -162,7 +162,7 @@ status_t MidiFile::setDataSource(int fd, int64_t offset, int64_t length) updateState(); if (result != EAS_SUCCESS) { - LOGE("EAS_OpenFile failed: [%d]", (int)result); + ALOGE("EAS_OpenFile failed: [%d]", (int)result); mState = EAS_STATE_ERROR; return ERROR_OPEN_FAILED; } @@ -181,7 +181,7 @@ status_t MidiFile::prepare() } EAS_RESULT result; if ((result = EAS_Prepare(mEasData, mEasHandle)) != EAS_SUCCESS) { - LOGE("EAS_Prepare failed: [%ld]", result); + ALOGE("EAS_Prepare failed: [%ld]", result); return ERROR_EAS_FAILURE; } updateState(); @@ -237,7 +237,7 @@ status_t MidiFile::stop() if (!mPaused && (mState != EAS_STATE_STOPPED)) { EAS_RESULT result = EAS_Pause(mEasData, mEasHandle); if (result != EAS_SUCCESS) { - LOGE("EAS_Pause returned error %ld", result); + ALOGE("EAS_Pause returned error %ld", result); return ERROR_EAS_FAILURE; } } @@ -258,7 +258,7 @@ status_t MidiFile::seekTo(int position) if ((result = EAS_Locate(mEasData, mEasHandle, position, false)) != EAS_SUCCESS) { - LOGE("EAS_Locate returned %ld", result); + ALOGE("EAS_Locate returned %ld", result); return ERROR_EAS_FAILURE; } EAS_GetLocation(mEasData, mEasHandle, &mPlayTime); @@ -293,11 +293,11 @@ status_t MidiFile::getCurrentPosition(int* position) { ALOGV("MidiFile::getCurrentPosition"); if (!mEasHandle) { - LOGE("getCurrentPosition(): file not open"); + ALOGE("getCurrentPosition(): file not open"); return ERROR_NOT_OPEN; } if (mPlayTime < 0) { - LOGE("getCurrentPosition(): mPlayTime = %ld", mPlayTime); + ALOGE("getCurrentPosition(): mPlayTime = %ld", mPlayTime); return ERROR_EAS_FAILURE; } *position = mPlayTime; @@ -422,7 +422,7 @@ status_t MidiFile::setLooping(int loop) status_t MidiFile::createOutputTrack() { if (mAudioSink->open(pLibConfig->sampleRate, pLibConfig->numChannels, AUDIO_FORMAT_PCM_16_BIT, 2) != NO_ERROR) { - LOGE("mAudioSink open failed"); + ALOGE("mAudioSink open failed"); return ERROR_OPEN_FAILED; } return NO_ERROR; @@ -439,7 +439,7 @@ int MidiFile::render() { // allocate render buffer mAudioBuffer = new EAS_PCM[pLibConfig->mixBufferSize * pLibConfig->numChannels * NUM_BUFFERS]; if (!mAudioBuffer) { - LOGE("mAudioBuffer allocate failed"); + ALOGE("mAudioBuffer allocate failed"); goto threadExit; } @@ -473,7 +473,7 @@ int MidiFile::render() { for (int i = 0; i < NUM_BUFFERS; i++) { result = EAS_Render(mEasData, p, pLibConfig->mixBufferSize, &count); if (result != EAS_SUCCESS) { - LOGE("EAS_Render returned %ld", result); + ALOGE("EAS_Render returned %ld", result); } p += count * pLibConfig->numChannels; num_output += count * pLibConfig->numChannels * sizeof(EAS_PCM); @@ -495,7 +495,7 @@ int MidiFile::render() { // Write data to the audio hardware // ALOGV("MidiFile::render - writing to audio output"); if ((temp = mAudioSink->write(mAudioBuffer, num_output)) < 0) { - LOGE("Error in writing:%d",temp); + ALOGE("Error in writing:%d",temp); return temp; } @@ -519,7 +519,7 @@ int MidiFile::render() { } case EAS_STATE_ERROR: { - LOGE("MidiFile::render - error"); + ALOGE("MidiFile::render - error"); sendEvent(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN); break; } diff --git a/media/libmediaplayerservice/MidiMetadataRetriever.cpp b/media/libmediaplayerservice/MidiMetadataRetriever.cpp index bb65ed4..465209f 100644 --- a/media/libmediaplayerservice/MidiMetadataRetriever.cpp +++ b/media/libmediaplayerservice/MidiMetadataRetriever.cpp @@ -63,7 +63,7 @@ const char* MidiMetadataRetriever::extractMetadata(int keyCode) ALOGV("extractMetdata: key(%d)", keyCode); Mutex::Autolock lock(mLock); if (mMidiPlayer == 0 || mMidiPlayer->initCheck() != NO_ERROR) { - LOGE("Midi player is not initialized yet"); + ALOGE("Midi player is not initialized yet"); return NULL; } switch (keyCode) { @@ -72,7 +72,7 @@ const char* MidiMetadataRetriever::extractMetadata(int keyCode) if (mMetadataValues[0][0] == '\0') { int duration = -1; if (mMidiPlayer->getDuration(&duration) != NO_ERROR) { - LOGE("failed to get duration"); + ALOGE("failed to get duration"); return NULL; } snprintf(mMetadataValues[0], MAX_METADATA_STRING_LENGTH, "%d", duration); @@ -82,7 +82,7 @@ const char* MidiMetadataRetriever::extractMetadata(int keyCode) return mMetadataValues[0]; } default: - LOGE("Unsupported key code (%d)", keyCode); + ALOGE("Unsupported key code (%d)", keyCode); return NULL; } return NULL; diff --git a/media/libmediaplayerservice/StagefrightRecorder.cpp b/media/libmediaplayerservice/StagefrightRecorder.cpp index c0ba091..4632016 100644 --- a/media/libmediaplayerservice/StagefrightRecorder.cpp +++ b/media/libmediaplayerservice/StagefrightRecorder.cpp @@ -97,7 +97,7 @@ status_t StagefrightRecorder::setAudioSource(audio_source_t as) { ALOGV("setAudioSource: %d", as); if (as < AUDIO_SOURCE_DEFAULT || as >= AUDIO_SOURCE_CNT) { - LOGE("Invalid audio source: %d", as); + ALOGE("Invalid audio source: %d", as); return BAD_VALUE; } @@ -114,7 +114,7 @@ status_t StagefrightRecorder::setVideoSource(video_source vs) { ALOGV("setVideoSource: %d", vs); if (vs < VIDEO_SOURCE_DEFAULT || vs >= VIDEO_SOURCE_LIST_END) { - LOGE("Invalid video source: %d", vs); + ALOGE("Invalid video source: %d", vs); return BAD_VALUE; } @@ -131,7 +131,7 @@ status_t StagefrightRecorder::setOutputFormat(output_format of) { ALOGV("setOutputFormat: %d", of); if (of < OUTPUT_FORMAT_DEFAULT || of >= OUTPUT_FORMAT_LIST_END) { - LOGE("Invalid output format: %d", of); + ALOGE("Invalid output format: %d", of); return BAD_VALUE; } @@ -148,7 +148,7 @@ status_t StagefrightRecorder::setAudioEncoder(audio_encoder ae) { ALOGV("setAudioEncoder: %d", ae); if (ae < AUDIO_ENCODER_DEFAULT || ae >= AUDIO_ENCODER_LIST_END) { - LOGE("Invalid audio encoder: %d", ae); + ALOGE("Invalid audio encoder: %d", ae); return BAD_VALUE; } @@ -165,7 +165,7 @@ status_t StagefrightRecorder::setVideoEncoder(video_encoder ve) { ALOGV("setVideoEncoder: %d", ve); if (ve < VIDEO_ENCODER_DEFAULT || ve >= VIDEO_ENCODER_LIST_END) { - LOGE("Invalid video encoder: %d", ve); + ALOGE("Invalid video encoder: %d", ve); return BAD_VALUE; } @@ -181,7 +181,7 @@ status_t StagefrightRecorder::setVideoEncoder(video_encoder ve) { status_t StagefrightRecorder::setVideoSize(int width, int height) { ALOGV("setVideoSize: %dx%d", width, height); if (width <= 0 || height <= 0) { - LOGE("Invalid video size: %dx%d", width, height); + ALOGE("Invalid video size: %dx%d", width, height); return BAD_VALUE; } @@ -196,7 +196,7 @@ status_t StagefrightRecorder::setVideoFrameRate(int frames_per_second) { ALOGV("setVideoFrameRate: %d", frames_per_second); if ((frames_per_second <= 0 && frames_per_second != -1) || frames_per_second > 120) { - LOGE("Invalid video frame rate: %d", frames_per_second); + ALOGE("Invalid video frame rate: %d", frames_per_second); return BAD_VALUE; } @@ -210,11 +210,11 @@ status_t StagefrightRecorder::setCamera(const sp<ICamera> &camera, const sp<ICameraRecordingProxy> &proxy) { ALOGV("setCamera"); if (camera == 0) { - LOGE("camera is NULL"); + ALOGE("camera is NULL"); return BAD_VALUE; } if (proxy == 0) { - LOGE("camera proxy is NULL"); + ALOGE("camera proxy is NULL"); return BAD_VALUE; } @@ -231,7 +231,7 @@ status_t StagefrightRecorder::setPreviewSurface(const sp<Surface> &surface) { } status_t StagefrightRecorder::setOutputFile(const char *path) { - LOGE("setOutputFile(const char*) must not be called"); + ALOGE("setOutputFile(const char*) must not be called"); // We don't actually support this at all, as the media_server process // no longer has permissions to create files. @@ -245,7 +245,7 @@ status_t StagefrightRecorder::setOutputFile(int fd, int64_t offset, int64_t leng CHECK_EQ(length, 0); if (fd < 0) { - LOGE("Invalid file descriptor: %d", fd); + ALOGE("Invalid file descriptor: %d", fd); return -EBADF; } @@ -315,7 +315,7 @@ static void TrimString(String8 *s) { status_t StagefrightRecorder::setParamAudioSamplingRate(int32_t sampleRate) { ALOGV("setParamAudioSamplingRate: %d", sampleRate); if (sampleRate <= 0) { - LOGE("Invalid audio sampling rate: %d", sampleRate); + ALOGE("Invalid audio sampling rate: %d", sampleRate); return BAD_VALUE; } @@ -327,7 +327,7 @@ status_t StagefrightRecorder::setParamAudioSamplingRate(int32_t sampleRate) { status_t StagefrightRecorder::setParamAudioNumberOfChannels(int32_t channels) { ALOGV("setParamAudioNumberOfChannels: %d", channels); if (channels <= 0 || channels >= 3) { - LOGE("Invalid number of audio channels: %d", channels); + ALOGE("Invalid number of audio channels: %d", channels); return BAD_VALUE; } @@ -339,7 +339,7 @@ status_t StagefrightRecorder::setParamAudioNumberOfChannels(int32_t channels) { status_t StagefrightRecorder::setParamAudioEncodingBitRate(int32_t bitRate) { ALOGV("setParamAudioEncodingBitRate: %d", bitRate); if (bitRate <= 0) { - LOGE("Invalid audio encoding bit rate: %d", bitRate); + ALOGE("Invalid audio encoding bit rate: %d", bitRate); return BAD_VALUE; } @@ -354,7 +354,7 @@ status_t StagefrightRecorder::setParamAudioEncodingBitRate(int32_t bitRate) { status_t StagefrightRecorder::setParamVideoEncodingBitRate(int32_t bitRate) { ALOGV("setParamVideoEncodingBitRate: %d", bitRate); if (bitRate <= 0) { - LOGE("Invalid video encoding bit rate: %d", bitRate); + ALOGE("Invalid video encoding bit rate: %d", bitRate); return BAD_VALUE; } @@ -370,7 +370,7 @@ status_t StagefrightRecorder::setParamVideoEncodingBitRate(int32_t bitRate) { status_t StagefrightRecorder::setParamVideoRotation(int32_t degrees) { ALOGV("setParamVideoRotation: %d", degrees); if (degrees < 0 || degrees % 90 != 0) { - LOGE("Unsupported video rotation angle: %d", degrees); + ALOGE("Unsupported video rotation angle: %d", degrees); return BAD_VALUE; } mRotationDegrees = degrees % 360; @@ -382,15 +382,15 @@ 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); + ALOGE("Max file duration is too short: %lld us", timeUs); return BAD_VALUE; } 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,16 +401,16 @@ 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 - LOGE("Max file size is too small: %lld bytes", bytes); + ALOGE("Max file size is too small: %lld bytes", bytes); return BAD_VALUE; } 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; @@ -423,13 +423,13 @@ status_t StagefrightRecorder::setParamInterleaveDuration(int32_t durationUs) { // If interleave duration is too small, it is very inefficient to do // interleaving since the metadata overhead will count for a significant // portion of the saved contents - LOGE("Audio/video interleave duration is too small: %d us", durationUs); + ALOGE("Audio/video interleave duration is too small: %d us", durationUs); return BAD_VALUE; } else if (durationUs >= 10000000) { // 10 seconds // If interleaving duration is too large, it can cause the recording // session to use too much memory since we have to save the output // data before we write them out - LOGE("Audio/video interleave duration is too large: %d us", durationUs); + ALOGE("Audio/video interleave duration is too large: %d us", durationUs); return BAD_VALUE; } mInterleaveDurationUs = durationUs; @@ -464,7 +464,7 @@ status_t StagefrightRecorder::setParamVideoCameraId(int32_t cameraId) { status_t StagefrightRecorder::setParamTrackTimeStatus(int64_t timeDurationUs) { ALOGV("setParamTrackTimeStatus: %lld", timeDurationUs); if (timeDurationUs < 20000) { // Infeasible if shorter than 20 ms? - LOGE("Tracking time duration too short: %lld us", timeDurationUs); + ALOGE("Tracking time duration too short: %lld us", timeDurationUs); return BAD_VALUE; } mTrackEveryTimeDurationUs = timeDurationUs; @@ -495,7 +495,7 @@ status_t StagefrightRecorder::setParamMovieTimeScale(int32_t timeScale) { // The range is set to be the same as the audio's time scale range // since audio's time scale has a wider range. if (timeScale < 600 || timeScale > 96000) { - LOGE("Time scale (%d) for movie is out of range [600, 96000]", timeScale); + ALOGE("Time scale (%d) for movie is out of range [600, 96000]", timeScale); return BAD_VALUE; } mMovieTimeScale = timeScale; @@ -508,7 +508,7 @@ status_t StagefrightRecorder::setParamVideoTimeScale(int32_t timeScale) { // 60000 is chosen to make sure that each video frame from a 60-fps // video has 1000 ticks. if (timeScale < 600 || timeScale > 60000) { - LOGE("Time scale (%d) for video is out of range [600, 60000]", timeScale); + ALOGE("Time scale (%d) for video is out of range [600, 60000]", timeScale); return BAD_VALUE; } mVideoTimeScale = timeScale; @@ -520,7 +520,7 @@ status_t StagefrightRecorder::setParamAudioTimeScale(int32_t timeScale) { // 96000 Hz is the highest sampling rate support in AAC. if (timeScale < 600 || timeScale > 96000) { - LOGE("Time scale (%d) for audio is out of range [600, 96000]", timeScale); + ALOGE("Time scale (%d) for audio is out of range [600, 96000]", timeScale); return BAD_VALUE; } mAudioTimeScale = timeScale; @@ -545,7 +545,7 @@ status_t StagefrightRecorder::setParamTimeBetweenTimeLapseFrameCapture(int64_t t // Not allowing time more than a day if (timeUs <= 0 || timeUs > 86400*1E6) { - LOGE("Time between time lapse frame capture (%lld) is out of range [0, 1 Day]", timeUs); + ALOGE("Time between time lapse frame capture (%lld) is out of range [0, 1 Day]", timeUs); return BAD_VALUE; } @@ -683,7 +683,7 @@ status_t StagefrightRecorder::setParameter( 1000LL * timeBetweenTimeLapseFrameCaptureMs); } } else { - LOGE("setParameter: failed to find key %s", key.string()); + ALOGE("setParameter: failed to find key %s", key.string()); } return BAD_VALUE; } @@ -695,13 +695,13 @@ status_t StagefrightRecorder::setParameters(const String8 ¶ms) { for (;;) { const char *equal_pos = strchr(key_start, '='); if (equal_pos == NULL) { - LOGE("Parameters %s miss a value", cparams); + ALOGE("Parameters %s miss a value", cparams); return BAD_VALUE; } String8 key(key_start, equal_pos - key_start); TrimString(&key); if (key.length() == 0) { - LOGE("Parameters %s contains an empty key", cparams); + ALOGE("Parameters %s contains an empty key", cparams); return BAD_VALUE; } const char *value_start = equal_pos + 1; @@ -737,7 +737,7 @@ status_t StagefrightRecorder::start() { CHECK(mOutputFd >= 0); if (mWriter != NULL) { - LOGE("File writer is not avaialble"); + ALOGE("File writer is not avaialble"); return UNKNOWN_ERROR; } @@ -769,7 +769,7 @@ status_t StagefrightRecorder::start() { break; default: - LOGE("Unsupported output file format: %d", mOutputFormat); + ALOGE("Unsupported output file format: %d", mOutputFormat); status = UNKNOWN_ERROR; break; } @@ -801,7 +801,7 @@ sp<MediaSource> StagefrightRecorder::createAudioSource() { status_t err = audioSource->initCheck(); if (err != OK) { - LOGE("audio source is not initialized"); + ALOGE("audio source is not initialized"); return NULL; } @@ -819,7 +819,7 @@ sp<MediaSource> StagefrightRecorder::createAudioSource() { mime = MEDIA_MIMETYPE_AUDIO_AAC; break; default: - LOGE("Unknown audio encoder: %d", mAudioEncoder); + ALOGE("Unknown audio encoder: %d", mAudioEncoder); return NULL; } encMeta->setCString(kKeyMIMEType, mime); @@ -872,13 +872,13 @@ status_t StagefrightRecorder::startAMRRecording() { if (mOutputFormat == OUTPUT_FORMAT_AMR_NB) { if (mAudioEncoder != AUDIO_ENCODER_DEFAULT && mAudioEncoder != AUDIO_ENCODER_AMR_NB) { - LOGE("Invalid encoder %d used for AMRNB recording", + ALOGE("Invalid encoder %d used for AMRNB recording", mAudioEncoder); return BAD_VALUE; } } else { // mOutputFormat must be OUTPUT_FORMAT_AMR_WB if (mAudioEncoder != AUDIO_ENCODER_AMR_WB) { - LOGE("Invlaid encoder %d used for AMRWB recording", + ALOGE("Invlaid encoder %d used for AMRWB recording", mAudioEncoder); return BAD_VALUE; } @@ -895,7 +895,7 @@ status_t StagefrightRecorder::startAMRRecording() { status_t StagefrightRecorder::startRawAudioRecording() { if (mAudioSource >= AUDIO_SOURCE_CNT) { - LOGE("Invalid audio source: %d", mAudioSource); + ALOGE("Invalid audio source: %d", mAudioSource); return BAD_VALUE; } @@ -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; } @@ -1131,7 +1131,7 @@ void StagefrightRecorder::setDefaultProfileIfNecessary() { audioSampleRate == mSampleRate && audioChannels == mAudioChannels) { if (videoCodec == VIDEO_ENCODER_H264) { - LOGI("Force to use AVC baseline profile"); + ALOGI("Force to use AVC baseline profile"); setParamVideoEncoderProfile(OMX_VIDEO_AVCProfileBaseline); } } @@ -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; } @@ -1268,7 +1268,7 @@ status_t StagefrightRecorder::setupSurfaceMediaSource() { int32_t frameRate = 0; CHECK (mSurfaceMediaSource->getFormat()->findInt32( kKeyFrameRate, &frameRate)); - LOGI("Frame rate is not explicitly set. Use the current frame " + ALOGI("Frame rate is not explicitly set. Use the current frame " "rate (%d fps)", frameRate); mFrameRate = frameRate; } else { @@ -1319,7 +1319,7 @@ status_t StagefrightRecorder::setupCameraSource( int32_t frameRate = 0; CHECK ((*cameraSource)->getFormat()->findInt32( kKeyFrameRate, &frameRate)); - LOGI("Frame rate is not explicitly set. Use the current frame " + ALOGI("Frame rate is not explicitly set. Use the current frame " "rate (%d fps)", frameRate); mFrameRate = frameRate; } @@ -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. @@ -1432,7 +1432,7 @@ status_t StagefrightRecorder::setupAudioEncoder(const sp<MediaWriter>& writer) { break; default: - LOGE("Unsupported audio encoder: %d", mAudioEncoder); + ALOGE("Unsupported audio encoder: %d", mAudioEncoder); return UNKNOWN_ERROR; } @@ -1667,7 +1667,7 @@ status_t StagefrightRecorder::getMaxAmplitude(int *max) { ALOGV("getMaxAmplitude"); if (max == NULL) { - LOGE("Null pointer argument"); + ALOGE("Null pointer argument"); return BAD_VALUE; } diff --git a/media/libmediaplayerservice/TestPlayerStub.cpp b/media/libmediaplayerservice/TestPlayerStub.cpp index 169e49a..5d9728a 100644 --- a/media/libmediaplayerservice/TestPlayerStub.cpp +++ b/media/libmediaplayerservice/TestPlayerStub.cpp @@ -134,7 +134,7 @@ status_t TestPlayerStub::setDataSource( // None of the entry points should be NULL. mHandle = ::dlopen(mFilename, RTLD_NOW | RTLD_GLOBAL); if (!mHandle) { - LOGE("dlopen failed: %s", ::dlerror()); + ALOGE("dlopen failed: %s", ::dlerror()); resetInternal(); return UNKNOWN_ERROR; } @@ -147,7 +147,7 @@ status_t TestPlayerStub::setDataSource( if (err || mNewPlayer == NULL) { // if err is NULL the string <null> is inserted in the logs => // mNewPlayer was NULL. - LOGE("dlsym for newPlayer failed %s", err); + ALOGE("dlsym for newPlayer failed %s", err); resetInternal(); return UNKNOWN_ERROR; } @@ -156,7 +156,7 @@ status_t TestPlayerStub::setDataSource( "deletePlayer")); err = ::dlerror(); if (err || mDeletePlayer == NULL) { - LOGE("dlsym for deletePlayer failed %s", err); + ALOGE("dlsym for deletePlayer failed %s", err); resetInternal(); return UNKNOWN_ERROR; } @@ -176,7 +176,7 @@ status_t TestPlayerStub::resetInternal() mContentUrl = NULL; if (mPlayer) { - LOG_ASSERT(mDeletePlayer != NULL, "mDeletePlayer is null"); + ALOG_ASSERT(mDeletePlayer != NULL, "mDeletePlayer is null"); (*mDeletePlayer)(mPlayer); mPlayer = NULL; } diff --git a/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp b/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp index 079f6fa..22b8847 100644 --- a/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp +++ b/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp @@ -111,9 +111,9 @@ status_t NuPlayer::HTTPLiveSource::feedMoreTSData() { break; } else if (n < 0) { if (n != ERROR_END_OF_STREAM) { - LOGI("input data EOS reached, error %ld", n); + ALOGI("input data EOS reached, error %ld", n); } else { - LOGI("input data EOS reached."); + ALOGI("input data EOS reached."); } mTSParser->signalEOS(n); mFinalResult = n; @@ -131,7 +131,7 @@ status_t NuPlayer::HTTPLiveSource::feedMoreTSData() { status_t err = mTSParser->feedTSPacket(buffer, sizeof(buffer)); if (err != OK) { - LOGE("TS Parser returned error %d", err); + ALOGE("TS Parser returned error %d", err); mTSParser->signalEOS(err); mFinalResult = err; break; diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp index 03aa42e..b731d0f 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp +++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp @@ -383,7 +383,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { finishFlushIfPossible(); } else if (what == ACodec::kWhatError) { - LOGE("Received error from %s decoder, aborting playback.", + ALOGE("Received error from %s decoder, aborting playback.", audio ? "audio" : "video"); mRenderer->queueEOS(audio, UNKNOWN_ERROR); @@ -417,7 +417,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { if (finalResult == ERROR_END_OF_STREAM) { ALOGV("reached %s EOS", audio ? "audio" : "video"); } else { - LOGE("%s track encountered an error (%d)", + ALOGE("%s track encountered an error (%d)", audio ? "audio" : "video", finalResult); notifyListener( @@ -689,7 +689,7 @@ status_t NuPlayer::feedDecoderInputData(bool audio, const sp<AMessage> &msg) { bool timeChange = (type & ATSParser::DISCONTINUITY_TIME) != 0; - LOGI("%s discontinuity (formatChange=%d, time=%d)", + ALOGI("%s discontinuity (formatChange=%d, time=%d)", audio ? "audio" : "video", formatChange, timeChange); if (audio) { @@ -705,7 +705,7 @@ status_t NuPlayer::feedDecoderInputData(bool audio, const sp<AMessage> &msg) { int64_t resumeAtMediaTimeUs; if (extra->findInt64( "resume-at-mediatimeUs", &resumeAtMediaTimeUs)) { - LOGI("suppressing rendering of %s until %lld us", + ALOGI("suppressing rendering of %s until %lld us", audio ? "audio" : "video", resumeAtMediaTimeUs); if (audio) { @@ -838,7 +838,7 @@ void NuPlayer::notifyListener(int msg, int ext1, int ext2) { void NuPlayer::flushDecoder(bool audio, bool needShutdown) { if ((audio && mAudioDecoder == NULL) || (!audio && mVideoDecoder == NULL)) { - LOGI("flushDecoder %s without decoder present", + ALOGI("flushDecoder %s without decoder present", audio ? "audio" : "video"); } diff --git a/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp index 3539e3f..15259cb 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp +++ b/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp @@ -228,7 +228,7 @@ bool NuPlayer::Renderer::onDrainAudioQueue() { #if 0 if (numFramesAvailableToWrite == mAudioSink->frameCount()) { - LOGI("audio sink underrun"); + ALOGI("audio sink underrun"); } else { ALOGV("audio queue has %d frames left to play", mAudioSink->frameCount() - numFramesAvailableToWrite); @@ -270,7 +270,7 @@ bool NuPlayer::Renderer::onDrainAudioQueue() { + numFramesPendingPlayout * mAudioSink->msecsPerFrame()) * 1000ll; - // LOGI("realTimeOffsetUs = %lld us", realTimeOffsetUs); + // ALOGI("realTimeOffsetUs = %lld us", realTimeOffsetUs); mAnchorTimeRealUs = ALooper::GetNowUs() + realTimeOffsetUs; diff --git a/media/libmediaplayerservice/nuplayer/RTSPSource.cpp b/media/libmediaplayerservice/nuplayer/RTSPSource.cpp index 6d28298..6eb0d07 100644 --- a/media/libmediaplayerservice/nuplayer/RTSPSource.cpp +++ b/media/libmediaplayerservice/nuplayer/RTSPSource.cpp @@ -226,7 +226,7 @@ void NuPlayer::RTSPSource::onMessageReceived(const sp<AMessage> &msg) { int32_t damaged; if (accessUnit->meta()->findInt32("damaged", &damaged) && damaged) { - LOGI("dropping damaged access unit."); + ALOGI("dropping damaged access unit."); break; } diff --git a/media/libmediaplayerservice/nuplayer/StreamingSource.cpp b/media/libmediaplayerservice/nuplayer/StreamingSource.cpp index 2e63b3b..7c9bc5e 100644 --- a/media/libmediaplayerservice/nuplayer/StreamingSource.cpp +++ b/media/libmediaplayerservice/nuplayer/StreamingSource.cpp @@ -58,7 +58,7 @@ status_t NuPlayer::StreamingSource::feedMoreTSData() { ssize_t n = mStreamListener->read(buffer, sizeof(buffer), &extra); if (n == 0) { - LOGI("input data EOS reached."); + ALOGI("input data EOS reached."); mTSParser->signalEOS(ERROR_END_OF_STREAM); mFinalResult = ERROR_END_OF_STREAM; break; @@ -70,7 +70,7 @@ status_t NuPlayer::StreamingSource::feedMoreTSData() { && extra->findInt32( IStreamListener::kKeyDiscontinuityMask, &mask)) { if (mask == 0) { - LOGE("Client specified an illegal discontinuity type."); + ALOGE("Client specified an illegal discontinuity type."); return ERROR_UNSUPPORTED; } @@ -94,7 +94,7 @@ status_t NuPlayer::StreamingSource::feedMoreTSData() { status_t err = mTSParser->feedTSPacket(buffer, sizeof(buffer)); if (err != OK) { - LOGE("TS Parser returned error %d", err); + ALOGE("TS Parser returned error %d", err); mTSParser->signalEOS(err); mFinalResult = err; diff --git a/media/libstagefright/AACWriter.cpp b/media/libstagefright/AACWriter.cpp index 03fb33b..1673ccd 100644 --- a/media/libstagefright/AACWriter.cpp +++ b/media/libstagefright/AACWriter.cpp @@ -84,7 +84,7 @@ status_t AACWriter::addSource(const sp<MediaSource> &source) { } if (mSource != NULL) { - LOGE("AAC files only support a single track of audio."); + ALOGE("AAC files only support a single track of audio."); return UNKNOWN_ERROR; } @@ -216,7 +216,7 @@ static bool getSampleRateTableIndex(int sampleRate, uint8_t* tableIndex) { } } - LOGE("Sampling rate %d bps is not supported", sampleRate); + ALOGE("Sampling rate %d bps is not supported", sampleRate); return false; } diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp index ebf5fab..ca44ea3 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."); } @@ -445,7 +445,7 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() { def.format.video.eColorFormat); if (err != 0) { - LOGE("native_window_set_buffers_geometry failed: %s (%d)", + ALOGE("native_window_set_buffers_geometry failed: %s (%d)", strerror(-err), -err); return err; } @@ -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; } @@ -464,7 +464,7 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() { usage | GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_EXTERNAL_DISP); if (err != 0) { - LOGE("native_window_set_usage failed: %s (%d)", strerror(-err), -err); + ALOGE("native_window_set_usage failed: %s (%d)", strerror(-err), -err); return err; } @@ -474,7 +474,7 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() { &minUndequeuedBufs); if (err != 0) { - LOGE("NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS query failed: %s (%d)", + ALOGE("NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS query failed: %s (%d)", strerror(-err), -err); return err; } @@ -489,7 +489,7 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() { mNode, OMX_IndexParamPortDefinition, &def, sizeof(def)); if (err != OK) { - LOGE("[%s] setting nBufferCountActual to %lu failed: %d", + ALOGE("[%s] setting nBufferCountActual to %lu failed: %d", mComponentName.c_str(), newBufferCount, err); return err; } @@ -499,7 +499,7 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() { mNativeWindow.get(), def.nBufferCountActual); if (err != 0) { - LOGE("native_window_set_buffer_count failed: %s (%d)", strerror(-err), + ALOGE("native_window_set_buffer_count failed: %s (%d)", strerror(-err), -err); return err; } @@ -513,7 +513,7 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() { ANativeWindowBuffer *buf; err = mNativeWindow->dequeueBuffer(mNativeWindow.get(), &buf); if (err != 0) { - LOGE("dequeueBuffer failed: %s (%d)", strerror(-err), -err); + ALOGE("dequeueBuffer failed: %s (%d)", strerror(-err), -err); break; } @@ -528,7 +528,7 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() { err = mOMX->useGraphicBuffer(mNode, kPortIndexOutput, graphicBuffer, &bufferId); if (err != 0) { - LOGE("registering GraphicBuffer %lu with OMX IL component failed: " + ALOGE("registering GraphicBuffer %lu with OMX IL component failed: " "%d", i, err); break; } @@ -581,7 +581,7 @@ status_t ACodec::cancelBufferToNativeWindow(BufferInfo *info) { ACodec::BufferInfo *ACodec::dequeueBufferFromNativeWindow() { ANativeWindowBuffer *buf; if (mNativeWindow->dequeueBuffer(mNativeWindow.get(), &buf) != 0) { - LOGE("dequeueBuffer failed."); + ALOGE("dequeueBuffer failed."); return NULL; } @@ -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); } } @@ -1367,7 +1367,7 @@ bool ACodec::BaseState::onOMXEvent( return false; } - LOGE("[%s] ERROR(0x%08lx)", mCodec->mComponentName.c_str(), data1); + ALOGE("[%s] ERROR(0x%08lx)", mCodec->mComponentName.c_str(), data1); mCodec->signalError((OMX_ERRORTYPE)data1); @@ -1826,7 +1826,7 @@ void ACodec::UninitializedState::onSetup( } if (node == NULL) { - LOGE("Unable to instantiate a decoder for type '%s'.", mime.c_str()); + ALOGE("Unable to instantiate a decoder for type '%s'.", mime.c_str()); mCodec->signalError(OMX_ErrorComponentNotFound); return; @@ -1874,7 +1874,7 @@ void ACodec::LoadedToIdleState::stateEntered() { status_t err; if ((err = allocateBuffers()) != OK) { - LOGE("Failed to allocate buffers after transitioning to IDLE state " + ALOGE("Failed to allocate buffers after transitioning to IDLE state " "(error 0x%08x)", err); @@ -2198,7 +2198,7 @@ bool ACodec::OutputPortSettingsChangedState::onOMXEvent( status_t err; if ((err = mCodec->allocateBuffersOnPort( kPortIndexOutput)) != OK) { - LOGE("Failed to allocate output port buffers after " + ALOGE("Failed to allocate output port buffers after " "port reconfiguration (error 0x%08x)", err); diff --git a/media/libstagefright/AMRExtractor.cpp b/media/libstagefright/AMRExtractor.cpp index 7eca5e4..5a28347 100644 --- a/media/libstagefright/AMRExtractor.cpp +++ b/media/libstagefright/AMRExtractor.cpp @@ -85,7 +85,7 @@ static size_t getFrameSize(bool isWide, unsigned FT) { }; if (FT > 15 || (isWide && FT > 9 && FT < 14) || (!isWide && FT > 11 && FT < 15)) { - LOGE("illegal AMR frame type %d", FT); + ALOGE("illegal AMR frame type %d", FT); return 0; } @@ -285,7 +285,7 @@ status_t AMRSource::read( if (header & 0x83) { // Padding bits must be 0. - LOGE("padding bits must be 0, header is 0x%02x", header); + ALOGE("padding bits must be 0, header is 0x%02x", header); return ERROR_MALFORMED; } diff --git a/media/libstagefright/AVIExtractor.cpp b/media/libstagefright/AVIExtractor.cpp index 142fa5b..a3187b7 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]); @@ -1080,7 +1080,7 @@ status_t AVIExtractor::addH264CodecSpecificData(size_t trackIndex) { sp<MetaData> meta = MakeAVCCodecSpecificData(buffer); if (meta == NULL) { - LOGE("Unable to extract AVC codec specific data"); + ALOGE("Unable to extract AVC codec specific data"); return ERROR_MALFORMED; } diff --git a/media/libstagefright/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/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp index 6fb16f5..7a2d7b3 100644 --- a/media/libstagefright/AwesomePlayer.cpp +++ b/media/libstagefright/AwesomePlayer.cpp @@ -132,7 +132,7 @@ struct AwesomeNativeWindowRenderer : public AwesomeRenderer { status_t err = mNativeWindow->queueBuffer( mNativeWindow.get(), buffer->graphicBuffer().get()); if (err != 0) { - LOGE("queueBuffer failed with error %s (%d)", strerror(-err), + ALOGE("queueBuffer failed with error %s (%d)", strerror(-err), -err); return; } @@ -280,9 +280,9 @@ status_t AwesomePlayer::setDataSource_l( } if (!(mFlags & INCOGNITO)) { - LOGI("setDataSource_l('%s')", mUri.string()); + ALOGI("setDataSource_l('%s')", mUri.string()); } else { - LOGI("setDataSource_l(URL suppressed)"); + ALOGI("setDataSource_l(URL suppressed)"); } // The actual work will be done during preparation in the call to @@ -483,7 +483,7 @@ void AwesomePlayer::reset_l() { if (mFlags & PREPARING) { modifyFlags(PREPARE_CANCELLED, SET); if (mConnectingDataSource != NULL) { - LOGI("interrupting the connection process"); + ALOGI("interrupting the connection process"); mConnectingDataSource->disconnect(); } @@ -686,7 +686,7 @@ void AwesomePlayer::onBufferingUpdate() { if ((mFlags & PLAYING) && !eos && (cachedDataRemaining < kLowWaterMarkBytes)) { - LOGI("cache is running low (< %d) , pausing.", + ALOGI("cache is running low (< %d) , pausing.", kLowWaterMarkBytes); modifyFlags(CACHE_UNDERRUN, SET); pause_l(); @@ -695,7 +695,7 @@ void AwesomePlayer::onBufferingUpdate() { notifyListener_l(MEDIA_INFO, MEDIA_INFO_BUFFERING_START); } else if (eos || cachedDataRemaining > kHighWaterMarkBytes) { if (mFlags & CACHE_UNDERRUN) { - LOGI("cache has filled up (> %d), resuming.", + ALOGI("cache has filled up (> %d), resuming.", kHighWaterMarkBytes); modifyFlags(CACHE_UNDERRUN, CLEAR); play_l(); @@ -742,7 +742,7 @@ void AwesomePlayer::onBufferingUpdate() { if ((mFlags & PLAYING) && !eos && (cachedDurationUs < kLowWaterMarkUs)) { - LOGI("cache is running low (%.2f secs) , pausing.", + ALOGI("cache is running low (%.2f secs) , pausing.", cachedDurationUs / 1E6); modifyFlags(CACHE_UNDERRUN, SET); pause_l(); @@ -751,7 +751,7 @@ void AwesomePlayer::onBufferingUpdate() { notifyListener_l(MEDIA_INFO, MEDIA_INFO_BUFFERING_START); } else if (eos || cachedDurationUs > kHighWaterMarkUs) { if (mFlags & CACHE_UNDERRUN) { - LOGI("cache has filled up (%.2f secs), resuming.", + ALOGI("cache has filled up (%.2f secs), resuming.", cachedDurationUs / 1E6); modifyFlags(CACHE_UNDERRUN, CLEAR); play_l(); @@ -1192,7 +1192,7 @@ status_t AwesomePlayer::setNativeWindow_l(const sp<ANativeWindow> &native) { status_t err = initVideoDecoder(); if (err != OK) { - LOGE("failed to reinstantiate video decoder after surface change."); + ALOGE("failed to reinstantiate video decoder after surface change."); return err; } @@ -1667,7 +1667,7 @@ void AwesomePlayer::onVideoEvent() { if (mSeeking == SEEK_VIDEO_ONLY) { if (mSeekTimeUs > timeUs) { - LOGI("XXX mSeekTimeUs = %lld us, timeUs = %lld us", + ALOGI("XXX mSeekTimeUs = %lld us, timeUs = %lld us", mSeekTimeUs, timeUs); } } @@ -1683,7 +1683,7 @@ void AwesomePlayer::onVideoEvent() { if (mAudioPlayer != NULL && !(mFlags & (AUDIO_RUNNING | SEEK_PREVIEW))) { status_t err = startAudioPlayer_l(); if (err != OK) { - LOGE("Starting the audio player failed w/ err %d", err); + ALOGE("Starting the audio player failed w/ err %d", err); return; } } @@ -1715,7 +1715,7 @@ void AwesomePlayer::onVideoEvent() { int64_t latenessUs = nowUs - timeUs; if (latenessUs > 0) { - LOGI("after SEEK_VIDEO_ONLY we're late by %.2f secs", latenessUs / 1E6); + ALOGI("after SEEK_VIDEO_ONLY we're late by %.2f secs", latenessUs / 1E6); } } @@ -1730,7 +1730,7 @@ void AwesomePlayer::onVideoEvent() { && mAudioPlayer != NULL && mAudioPlayer->getMediaTimeMapping( &realTimeUs, &mediaTimeUs)) { - LOGI("we're much too late (%.2f secs), video skipping ahead", + ALOGI("we're much too late (%.2f secs), video skipping ahead", latenessUs / 1E6); mVideoBuffer->release(); @@ -1975,7 +1975,7 @@ status_t AwesomePlayer::finishSetDataSource_l() { if (err != OK) { mConnectingDataSource.clear(); - LOGI("mConnectingDataSource->connect() returned %d", err); + ALOGI("mConnectingDataSource->connect() returned %d", err); return err; } @@ -2073,7 +2073,7 @@ status_t AwesomePlayer::finishSetDataSource_l() { } if (mFlags & PREPARE_CANCELLED) { - LOGI("Prepare cancelled while waiting for initial cache fill."); + ALOGI("Prepare cancelled while waiting for initial cache fill."); return UNKNOWN_ERROR; } } @@ -2155,7 +2155,7 @@ void AwesomePlayer::onPrepareAsyncEvent() { Mutex::Autolock autoLock(mLock); if (mFlags & PREPARE_CANCELLED) { - LOGI("prepare was cancelled before doing anything"); + ALOGI("prepare was cancelled before doing anything"); abortPrepare(UNKNOWN_ERROR); return; } diff --git a/media/libstagefright/CameraSource.cpp b/media/libstagefright/CameraSource.cpp index 080faa6..1850c9c 100755 --- a/media/libstagefright/CameraSource.cpp +++ b/media/libstagefright/CameraSource.cpp @@ -111,7 +111,7 @@ static int32_t getColorFormat(const char* colorFormat) { return OMX_TI_COLOR_FormatYUV420PackedSemiPlanar; } - LOGE("Uknown color format (%s), please add it to " + ALOGE("Uknown color format (%s), please add it to " "CameraSource::getColorFormat", colorFormat); CHECK_EQ(0, "Unknown color format"); @@ -301,7 +301,7 @@ status_t CameraSource::configureCamera( bool isCameraParamChanged = false; if (width != -1 && height != -1) { if (!isVideoSizeSupported(width, height, sizes)) { - LOGE("Video dimension (%dx%d) is unsupported", width, height); + ALOGE("Video dimension (%dx%d) is unsupported", width, height); return BAD_VALUE; } if (isSetVideoSizeSupportedByCamera) { @@ -314,7 +314,7 @@ status_t CameraSource::configureCamera( (width != -1 && height == -1)) { // If one and only one of the width and height is -1 // we reject such a request. - LOGE("Requested video size (%dx%d) is not supported", width, height); + ALOGE("Requested video size (%dx%d) is not supported", width, height); return BAD_VALUE; } else { // width == -1 && height == -1 // Do not configure the camera. @@ -330,7 +330,7 @@ status_t CameraSource::configureCamera( char buf[4]; snprintf(buf, 4, "%d", frameRate); if (strstr(supportedFrameRates, buf) == NULL) { - LOGE("Requested frame rate (%d) is not supported: %s", + ALOGE("Requested frame rate (%d) is not supported: %s", frameRate, supportedFrameRates); return BAD_VALUE; } @@ -347,7 +347,7 @@ status_t CameraSource::configureCamera( // Either frame rate or frame size needs to be changed. String8 s = params->flatten(); if (OK != mCamera->setParameters(s)) { - LOGE("Could not change settings." + ALOGE("Could not change settings." " Someone else is using camera %p?", mCamera.get()); return -EBUSY; } @@ -387,7 +387,7 @@ status_t CameraSource::checkVideoSize( params.getVideoSize(&frameWidthActual, &frameHeightActual); } if (frameWidthActual < 0 || frameHeightActual < 0) { - LOGE("Failed to retrieve video frame size (%dx%d)", + ALOGE("Failed to retrieve video frame size (%dx%d)", frameWidthActual, frameHeightActual); return UNKNOWN_ERROR; } @@ -396,7 +396,7 @@ status_t CameraSource::checkVideoSize( // video frame size. if (width != -1 && height != -1) { if (frameWidthActual != width || frameHeightActual != height) { - LOGE("Failed to set video frame size to %dx%d. " + ALOGE("Failed to set video frame size to %dx%d. " "The actual video size is %dx%d ", width, height, frameWidthActual, frameHeightActual); return UNKNOWN_ERROR; @@ -425,14 +425,14 @@ status_t CameraSource::checkFrameRate( ALOGV("checkFrameRate"); int32_t frameRateActual = params.getPreviewFrameRate(); if (frameRateActual < 0) { - LOGE("Failed to retrieve preview frame rate (%d)", frameRateActual); + ALOGE("Failed to retrieve preview frame rate (%d)", frameRateActual); return UNKNOWN_ERROR; } // Check the actual video frame rate against the target/requested // video frame rate. if (frameRate != -1 && (frameRateActual - frameRate) != 0) { - LOGE("Failed to set preview frame rate to %d fps. The actual " + ALOGE("Failed to set preview frame rate to %d fps. The actual " "frame rate is %d", frameRate, frameRateActual); return UNKNOWN_ERROR; } @@ -489,7 +489,7 @@ status_t CameraSource::initWithCameraAccess( status_t err = OK; if ((err = isCameraAvailable(camera, proxy, cameraId)) != OK) { - LOGE("Camera connection could not be established."); + ALOGE("Camera connection could not be established."); return err; } CameraParameters params(mCamera->getParameters()); @@ -579,7 +579,7 @@ status_t CameraSource::start(MetaData *meta) { ALOGV("start"); CHECK(!mStarted); if (mInitCheck != OK) { - LOGE("CameraSource is not initialized yet"); + ALOGE("CameraSource is not initialized yet"); return mInitCheck; } @@ -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()); } } @@ -660,13 +660,13 @@ status_t CameraSource::stop() { } if (mCollectStats) { - LOGI("Frames received/encoded/dropped: %d/%d/%d in %lld us", + ALOGI("Frames received/encoded/dropped: %d/%d/%d in %lld us", mNumFramesReceived, mNumFramesEncoded, mNumFramesDropped, mLastFrameTimestampUs - mFirstFrameTimeUs); } 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); } } @@ -832,7 +832,7 @@ void CameraSource::ProxyListener::dataCallbackTimestamp( } void CameraSource::DeathNotifier::binderDied(const wp<IBinder>& who) { - LOGI("Camera recording proxy died"); + ALOGI("Camera recording proxy died"); } } // namespace android diff --git a/media/libstagefright/CameraSourceTimeLapse.cpp b/media/libstagefright/CameraSourceTimeLapse.cpp index 22c3182..263ab50 100644 --- a/media/libstagefright/CameraSourceTimeLapse.cpp +++ b/media/libstagefright/CameraSourceTimeLapse.cpp @@ -140,7 +140,7 @@ bool CameraSourceTimeLapse::trySettingVideoSize( if (mCamera->setParameters(params.flatten()) == OK) { isSuccessful = true; } else { - LOGE("Failed to set preview size to %dx%d", width, height); + ALOGE("Failed to set preview size to %dx%d", width, height); isSuccessful = false; } } @@ -260,7 +260,7 @@ bool CameraSourceTimeLapse::skipFrameAndModifyTimeStamp(int64_t *timestampUs) { // Really make sure that this video recording frame will not be dropped. if (*timestampUs < mStartTimeUs) { - LOGI("set timestampUs to start time stamp %lld us", mStartTimeUs); + ALOGI("set timestampUs to start time stamp %lld us", mStartTimeUs); *timestampUs = mStartTimeUs; } return false; 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..668d7f7 100644 --- a/media/libstagefright/FLACExtractor.cpp +++ b/media/libstagefright/FLACExtractor.cpp @@ -327,7 +327,7 @@ FLAC__StreamDecoderWriteStatus FLACParser::writeCallback( mWriteCompleted = true; return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE; } else { - LOGE("FLACParser::writeCallback unexpected"); + ALOGE("FLACParser::writeCallback unexpected"); return FLAC__STREAM_DECODER_WRITE_STATUS_ABORT; } } @@ -340,7 +340,7 @@ void FLACParser::metadataCallback(const FLAC__StreamMetadata *metadata) mStreamInfo = metadata->data.stream_info; mStreamInfoValid = true; } else { - LOGE("FLACParser::metadataCallback unexpected STREAMINFO"); + ALOGE("FLACParser::metadataCallback unexpected STREAMINFO"); } break; case FLAC__METADATA_TYPE_VORBIS_COMMENT: @@ -366,14 +366,14 @@ 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; } } void FLACParser::errorCallback(FLAC__StreamDecoderErrorStatus status) { - LOGE("FLACParser::errorCallback status=%d", status); + ALOGE("FLACParser::errorCallback status=%d", status); mErrorStatus = status; } @@ -477,7 +477,7 @@ status_t FLACParser::init() // The new should succeed, since probably all it does is a malloc // that always succeeds in Android. But to avoid dependence on the // libFLAC internals, we check and log here. - LOGE("new failed"); + ALOGE("new failed"); return NO_INIT; } FLAC__stream_decoder_set_md5_checking(mDecoder, false); @@ -497,12 +497,12 @@ status_t FLACParser::init() if (initStatus != FLAC__STREAM_DECODER_INIT_STATUS_OK) { // A failure here probably indicates a programming error and so is // unlikely to happen. But we check and log here similarly to above. - LOGE("init_stream failed %d", initStatus); + ALOGE("init_stream failed %d", initStatus); return NO_INIT; } // parse all metadata if (!FLAC__stream_decoder_process_until_end_of_metadata(mDecoder)) { - LOGE("end_of_metadata failed"); + ALOGE("end_of_metadata failed"); return NO_INIT; } if (mStreamInfoValid) { @@ -512,7 +512,7 @@ status_t FLACParser::init() case 2: break; default: - LOGE("unsupported channel count %u", getChannels()); + ALOGE("unsupported channel count %u", getChannels()); return NO_INIT; } // check bit depth @@ -522,7 +522,7 @@ status_t FLACParser::init() case 24: break; default: - LOGE("unsupported bits per sample %u", getBitsPerSample()); + ALOGE("unsupported bits per sample %u", getBitsPerSample()); return NO_INIT; } // check sample rate @@ -539,7 +539,7 @@ status_t FLACParser::init() break; default: // 96000 would require a proper downsampler in AudioFlinger - LOGE("unsupported sample rate %u", getSampleRate()); + ALOGE("unsupported sample rate %u", getSampleRate()); return NO_INIT; } // configure the appropriate copy function, defaulting to trespass @@ -572,7 +572,7 @@ status_t FLACParser::init() (getTotalSamples() * 1000000LL) / getSampleRate()); } } else { - LOGE("missing STREAMINFO"); + ALOGE("missing STREAMINFO"); return NO_INIT; } if (mFileMetadata != 0) { @@ -603,13 +603,13 @@ MediaBuffer *FLACParser::readBuffer(bool doSeek, FLAC__uint64 sample) if (doSeek) { // We implement the seek callback, so this works without explicit flush if (!FLAC__stream_decoder_seek_absolute(mDecoder, sample)) { - LOGE("FLACParser::readBuffer seek to sample %llu failed", sample); + ALOGE("FLACParser::readBuffer seek to sample %llu failed", sample); return NULL; } ALOGV("FLACParser::readBuffer seek to sample %llu succeeded", sample); } else { if (!FLAC__stream_decoder_process_single(mDecoder)) { - LOGE("FLACParser::readBuffer process_single failed"); + ALOGE("FLACParser::readBuffer process_single failed"); return NULL; } } @@ -620,13 +620,13 @@ MediaBuffer *FLACParser::readBuffer(bool doSeek, FLAC__uint64 sample) // verify that block header keeps the promises made by STREAMINFO unsigned blocksize = mWriteHeader.blocksize; if (blocksize == 0 || blocksize > getMaxBlockSize()) { - LOGE("FLACParser::readBuffer write invalid blocksize %u", blocksize); + ALOGE("FLACParser::readBuffer write invalid blocksize %u", blocksize); return NULL; } if (mWriteHeader.sample_rate != getSampleRate() || mWriteHeader.channels != getChannels() || mWriteHeader.bits_per_sample != getBitsPerSample()) { - LOGE("FLACParser::readBuffer write changed parameters mid-stream"); + ALOGE("FLACParser::readBuffer write changed parameters mid-stream"); } // acquire a media buffer CHECK(mGroup != NULL); diff --git a/media/libstagefright/FileSource.cpp b/media/libstagefright/FileSource.cpp index 0794f57..73cb48c 100644 --- a/media/libstagefright/FileSource.cpp +++ b/media/libstagefright/FileSource.cpp @@ -101,7 +101,7 @@ ssize_t FileSource::readAt(off64_t offset, void *data, size_t size) { } else { off64_t result = lseek64(mFd, offset + mOffset, SEEK_SET); if (result == -1) { - LOGE("seek to %lld failed", offset + mOffset); + ALOGE("seek to %lld failed", offset + mOffset); return UNKNOWN_ERROR; } diff --git a/media/libstagefright/HTTPBase.cpp b/media/libstagefright/HTTPBase.cpp index 3c5a8a5..d7eea3f 100644 --- a/media/libstagefright/HTTPBase.cpp +++ b/media/libstagefright/HTTPBase.cpp @@ -111,11 +111,11 @@ status_t HTTPBase::setBandwidthStatCollectFreq(int32_t freqMs) { if (freqMs < kMinBandwidthCollectFreqMs || freqMs > kMaxBandwidthCollectFreqMs) { - LOGE("frequency (%d ms) is out of range [1000, 60000]", freqMs); + ALOGE("frequency (%d ms) is out of range [1000, 60000]", freqMs); return BAD_VALUE; } - LOGI("frequency set to %d ms", freqMs); + ALOGI("frequency set to %d ms", freqMs); mBandWidthCollectFreqMs = freqMs; return OK; } @@ -139,7 +139,7 @@ bool HTTPBase::getUID(uid_t *uid) const { void HTTPBase::RegisterSocketUserTag(int sockfd, uid_t uid, uint32_t kTag) { int res = qtaguid_tagSocket(sockfd, kTag, uid); if (res != 0) { - LOGE("Failed tagging socket %d for uid %d (My UID=%d)", sockfd, uid, geteuid()); + ALOGE("Failed tagging socket %d for uid %d (My UID=%d)", sockfd, uid, geteuid()); } } @@ -147,7 +147,7 @@ void HTTPBase::RegisterSocketUserTag(int sockfd, uid_t uid, uint32_t kTag) { void HTTPBase::UnRegisterSocketUserTag(int sockfd) { int res = qtaguid_untagSocket(sockfd); if (res != 0) { - LOGE("Failed untagging socket %d (My UID=%d)", sockfd, geteuid()); + ALOGE("Failed untagging socket %d (My UID=%d)", sockfd, geteuid()); } } diff --git a/media/libstagefright/MP3Extractor.cpp b/media/libstagefright/MP3Extractor.cpp index ab1dc5c..2215c07 100644 --- a/media/libstagefright/MP3Extractor.cpp +++ b/media/libstagefright/MP3Extractor.cpp @@ -431,7 +431,7 @@ status_t MP3Source::read( int32_t bitrate; if (!mMeta->findInt32(kKeyBitRate, &bitrate)) { // bitrate is in bits/sec. - LOGI("no bitrate"); + ALOGI("no bitrate"); return ERROR_UNSUPPORTED; } @@ -487,7 +487,7 @@ status_t MP3Source::read( off64_t pos = mCurrentPos; if (!Resync(mDataSource, mFixedHeader, &pos, NULL, NULL)) { - LOGE("Unable to resync. Signalling end of stream."); + ALOGE("Unable to resync. Signalling end of stream."); buffer->release(); buffer = NULL; diff --git a/media/libstagefright/MPEG4Extractor.cpp b/media/libstagefright/MPEG4Extractor.cpp index 0a69df4..bc88015 100644 --- a/media/libstagefright/MPEG4Extractor.cpp +++ b/media/libstagefright/MPEG4Extractor.cpp @@ -1250,7 +1250,7 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) { char buffer[23]; if (chunk_data_size != 7 && chunk_data_size != 23) { - LOGE("Incorrect D263 box size %lld", chunk_data_size); + ALOGE("Incorrect D263 box size %lld", chunk_data_size); return ERROR_MALFORMED; } @@ -1500,9 +1500,9 @@ status_t MPEG4Extractor::parseTrackHeader( int32_t dy = U32_AT(&buffer[matrixOffset + 20]); #if 0 - LOGI("x' = %.2f * x + %.2f * y + %.2f", + ALOGI("x' = %.2f * x + %.2f * y + %.2f", a00 / 65536.0f, a01 / 65536.0f, dx / 65536.0f); - LOGI("y' = %.2f * x + %.2f * y + %.2f", + ALOGI("y' = %.2f * x + %.2f * y + %.2f", a10 / 65536.0f, a11 / 65536.0f, dy / 65536.0f); #endif @@ -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; } @@ -1751,7 +1751,7 @@ status_t MPEG4Extractor::updateAudioTrackInfoFromESDS_MPEG4Audio( // The media subtype is MP3 audio // Our software MP3 audio decoder may not be able to handle // packetized MP3 audio; for now, lets just return ERROR_UNSUPPORTED - LOGE("MP3 track in MP4/3GPP file is not supported"); + ALOGE("MP3 track in MP4/3GPP file is not supported"); return ERROR_UNSUPPORTED; } @@ -2036,7 +2036,7 @@ status_t MPEG4Source::read( CHECK_EQ(OK, mSampleTable->getMetaDataForSample( syncSampleIndex, NULL, NULL, &syncSampleTime)); - LOGI("seek to time %lld us => sample at time %lld us, " + ALOGI("seek to time %lld us => sample at time %lld us, " "sync sample at time %lld us", seekTimeUs, sampleTime * 1000000ll / mTimescale, @@ -2123,7 +2123,7 @@ status_t MPEG4Source::read( size_t nal_size = parseNALSize(src); if (mBuffer->range_length() < mNALLengthSize + nal_size) { - LOGE("incomplete NAL unit."); + ALOGE("incomplete NAL unit."); mBuffer->release(); mBuffer = NULL; @@ -2187,7 +2187,7 @@ status_t MPEG4Source::read( } if (isMalFormed) { - LOGE("Video is malformed"); + ALOGE("Video is malformed"); mBuffer->release(); mBuffer = NULL; return ERROR_MALFORMED; @@ -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 a368e0a..06dd875 100755 --- a/media/libstagefright/MPEG4Writer.cpp +++ b/media/libstagefright/MPEG4Writer.cpp @@ -327,7 +327,7 @@ status_t MPEG4Writer::Track::dump( status_t MPEG4Writer::addSource(const sp<MediaSource> &source) { Mutex::Autolock l(mLock); if (mStarted) { - LOGE("Attempt to add source AFTER recording is started"); + ALOGE("Attempt to add source AFTER recording is started"); return UNKNOWN_ERROR; } Track *track = new Track(this, source, mTracks.size()); @@ -406,7 +406,7 @@ int64_t MPEG4Writer::estimateMoovBoxSize(int32_t bitRate) { size = MAX_MOOV_BOX_SIZE; } - LOGI("limits: %lld/%lld bytes/us, bit rate: %d bps and the estimated" + ALOGI("limits: %lld/%lld bytes/us, bit rate: %d bps and the estimated" " moov size %lld bytes", mMaxFileSizeLimitBytes, mMaxFileDurationLimitUs, bitRate, size); return factor * size; @@ -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; @@ -701,7 +701,7 @@ status_t MPEG4Writer::stop() { mMoovBoxBuffer = NULL; mMoovBoxBufferOffset = 0; } else { - LOGI("The mp4 file will not be streamable."); + ALOGI("The mp4 file will not be streamable."); } CHECK(mBoxes.empty()); @@ -1084,12 +1084,12 @@ bool MPEG4Writer::reachedEOS() { } void MPEG4Writer::setStartTimestampUs(int64_t timeUs) { - LOGI("setStartTimestampUs: %lld", timeUs); + ALOGI("setStartTimestampUs: %lld", timeUs); CHECK(timeUs >= 0); Mutex::Autolock autoLock(mLock); if (mStartTimestampUs < 0 || mStartTimestampUs > timeUs) { mStartTimestampUs = timeUs; - LOGI("Earliest track starting time: %lld", mStartTimestampUs); + ALOGI("Earliest track starting time: %lld", mStartTimestampUs); } } @@ -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); @@ -1481,7 +1481,7 @@ status_t MPEG4Writer::Track::start(MetaData *params) { startTimeOffsetUs = kInitialDelayTimeUs; } startTimeUs += startTimeOffsetUs; - LOGI("Start time offset: %lld us", startTimeOffsetUs); + ALOGI("Start time offset: %lld us", startTimeOffsetUs); } meta->setInt64(kKeyTime, startTimeUs); @@ -1525,7 +1525,7 @@ status_t MPEG4Writer::Track::pause() { status_t MPEG4Writer::Track::stop() { ALOGD("Stopping %s track", mIsAudio? "Audio": "Video"); if (!mStarted) { - LOGE("Stop() called but track is not started"); + ALOGE("Stop() called but track is not started"); return ERROR_END_OF_STREAM; } @@ -1596,14 +1596,14 @@ const uint8_t *MPEG4Writer::Track::parseParamSet( const uint8_t *nextStartCode = findNextStartCode(data, length); *paramSetLen = nextStartCode - data; if (*paramSetLen == 0) { - LOGE("Param set is malformed, since its length is 0"); + ALOGE("Param set is malformed, since its length is 0"); return NULL; } AVCParamSet paramSet(*paramSetLen, data); if (type == kNalUnitTypeSeqParamSet) { if (*paramSetLen < 4) { - LOGE("Seq parameter set malformed"); + ALOGE("Seq parameter set malformed"); return NULL; } if (mSeqParamSets.empty()) { @@ -1614,7 +1614,7 @@ const uint8_t *MPEG4Writer::Track::parseParamSet( if (mProfileIdc != data[1] || mProfileCompatible != data[2] || mLevelIdc != data[3]) { - LOGE("Inconsistent profile/level found in seq parameter sets"); + ALOGE("Inconsistent profile/level found in seq parameter sets"); return NULL; } } @@ -1632,7 +1632,7 @@ status_t MPEG4Writer::Track::copyAVCCodecSpecificData( // 2 bytes for each of the parameter set length field // plus the 7 bytes for the header if (size < 4 + 7) { - LOGE("Codec specific data length too short: %d", size); + ALOGE("Codec specific data length too short: %d", size); return ERROR_MALFORMED; } @@ -1661,7 +1661,7 @@ status_t MPEG4Writer::Track::parseAVCCodecSpecificData( getNalUnitType(*(tmp + 4), &type); if (type == kNalUnitTypeSeqParamSet) { if (gotPps) { - LOGE("SPS must come before PPS"); + ALOGE("SPS must come before PPS"); return ERROR_MALFORMED; } if (!gotSps) { @@ -1670,7 +1670,7 @@ status_t MPEG4Writer::Track::parseAVCCodecSpecificData( nextStartCode = parseParamSet(tmp + 4, bytesLeft - 4, type, ¶mSetLen); } else if (type == kNalUnitTypePicParamSet) { if (!gotSps) { - LOGE("SPS must come before PPS"); + ALOGE("SPS must come before PPS"); return ERROR_MALFORMED; } if (!gotPps) { @@ -1678,7 +1678,7 @@ status_t MPEG4Writer::Track::parseAVCCodecSpecificData( } nextStartCode = parseParamSet(tmp + 4, bytesLeft - 4, type, ¶mSetLen); } else { - LOGE("Only SPS and PPS Nal units are expected"); + ALOGE("Only SPS and PPS Nal units are expected"); return ERROR_MALFORMED; } @@ -1696,12 +1696,12 @@ status_t MPEG4Writer::Track::parseAVCCodecSpecificData( // Check on the number of seq parameter sets size_t nSeqParamSets = mSeqParamSets.size(); if (nSeqParamSets == 0) { - LOGE("Cound not find sequence parameter set"); + ALOGE("Cound not find sequence parameter set"); return ERROR_MALFORMED; } if (nSeqParamSets > 0x1F) { - LOGE("Too many seq parameter sets (%d) found", nSeqParamSets); + ALOGE("Too many seq parameter sets (%d) found", nSeqParamSets); return ERROR_MALFORMED; } } @@ -1710,11 +1710,11 @@ status_t MPEG4Writer::Track::parseAVCCodecSpecificData( // Check on the number of pic parameter sets size_t nPicParamSets = mPicParamSets.size(); if (nPicParamSets == 0) { - LOGE("Cound not find picture parameter set"); + ALOGE("Cound not find picture parameter set"); return ERROR_MALFORMED; } if (nPicParamSets > 0xFF) { - LOGE("Too many pic parameter sets (%d) found", nPicParamSets); + ALOGE("Too many pic parameter sets (%d) found", nPicParamSets); return ERROR_MALFORMED; } } @@ -1727,7 +1727,7 @@ status_t MPEG4Writer::Track::parseAVCCodecSpecificData( // These profiles requires additional parameter set extensions if (mProfileIdc == 100 || mProfileIdc == 110 || mProfileIdc == 122 || mProfileIdc == 144) { - LOGE("Sorry, no support for profile_idc: %d!", mProfileIdc); + ALOGE("Sorry, no support for profile_idc: %d!", mProfileIdc); return BAD_VALUE; } } @@ -1739,12 +1739,12 @@ status_t MPEG4Writer::Track::makeAVCCodecSpecificData( const uint8_t *data, size_t size) { if (mCodecSpecificData != NULL) { - LOGE("Already have codec specific data"); + ALOGE("Already have codec specific data"); return ERROR_MALFORMED; } if (size < 4) { - LOGE("Codec specific data length too short: %d", size); + ALOGE("Codec specific data length too short: %d", size); return ERROR_MALFORMED; } @@ -2146,10 +2146,10 @@ status_t MPEG4Writer::Track::threadEntry() { sendTrackSummary(hasMultipleTracks); - LOGI("Received total/0-length (%d/%d) buffers and encoded %d frames. - %s", + ALOGI("Received total/0-length (%d/%d) buffers and encoded %d frames. - %s", count, nZeroLengthFrames, mNumSamples, mIsAudio? "audio": "video"); if (mIsAudio) { - LOGI("Audio track drift time: %lld us", mOwner->getDriftTimeUs()); + ALOGI("Audio track drift time: %lld us", mOwner->getDriftTimeUs()); } if (err == ERROR_END_OF_STREAM) { @@ -2160,12 +2160,12 @@ status_t MPEG4Writer::Track::threadEntry() { bool MPEG4Writer::Track::isTrackMalFormed() const { if (mSampleSizes.empty()) { // no samples written - LOGE("The number of recorded samples is 0"); + ALOGE("The number of recorded samples is 0"); return true; } if (!mIsAudio && mNumStssTableEntries == 0) { // no sync frames for video - LOGE("There are no sync frames for video track"); + ALOGE("There are no sync frames for video track"); return true; } @@ -2308,13 +2308,13 @@ status_t MPEG4Writer::Track::checkCodecSpecificData() const { !strcasecmp(MEDIA_MIMETYPE_VIDEO_AVC, mime)) { if (!mCodecSpecificData || mCodecSpecificDataSize <= 0) { - LOGE("Missing codec specific data"); + ALOGE("Missing codec specific data"); return ERROR_MALFORMED; } } else { if (mCodecSpecificData || mCodecSpecificDataSize > 0) { - LOGE("Unexepected codec specific data found"); + ALOGE("Unexepected codec specific data found"); return ERROR_MALFORMED; } } @@ -2378,7 +2378,7 @@ void MPEG4Writer::Track::writeVideoFourCCBox() { } else if (!strcasecmp(MEDIA_MIMETYPE_VIDEO_AVC, mime)) { mOwner->beginBox("avc1"); } else { - LOGE("Unknown mime type '%s'.", mime); + ALOGE("Unknown mime type '%s'.", mime); CHECK(!"should not be here, unknown mime type."); } @@ -2432,7 +2432,7 @@ void MPEG4Writer::Track::writeAudioFourCCBox() { } else if (!strcasecmp(MEDIA_MIMETYPE_AUDIO_AAC, mime)) { fourcc = "mp4a"; } else { - LOGE("Unknown mime type '%s'.", mime); + ALOGE("Unknown mime type '%s'.", mime); CHECK(!"should not be here, unknown mime type."); } diff --git a/media/libstagefright/MediaBuffer.cpp b/media/libstagefright/MediaBuffer.cpp index 0b14f1e..96271e4 100644 --- a/media/libstagefright/MediaBuffer.cpp +++ b/media/libstagefright/MediaBuffer.cpp @@ -135,7 +135,7 @@ size_t MediaBuffer::range_length() const { void MediaBuffer::set_range(size_t offset, size_t length) { if ((mGraphicBuffer == NULL) && (offset + length > mSize)) { - LOGE("offset = %d, length = %d, mSize = %d", offset, length, mSize); + ALOGE("offset = %d, length = %d, mSize = %d", offset, length, mSize); } CHECK((mGraphicBuffer != NULL) || (offset + length <= mSize)); diff --git a/media/libstagefright/NuCachedSource2.cpp b/media/libstagefright/NuCachedSource2.cpp index 20d0632..249c298 100644 --- a/media/libstagefright/NuCachedSource2.cpp +++ b/media/libstagefright/NuCachedSource2.cpp @@ -302,7 +302,7 @@ void NuCachedSource2::fetchInternal() { mNumRetriesLeft = 0; return; } else if (err != OK) { - LOGI("The attempt to reconnect failed, %d retries remaining", + ALOGI("The attempt to reconnect failed, %d retries remaining", mNumRetriesLeft); return; @@ -317,11 +317,11 @@ void NuCachedSource2::fetchInternal() { Mutex::Autolock autoLock(mLock); if (n < 0) { - LOGE("source returned error %ld, %d retries left", n, mNumRetriesLeft); + ALOGE("source returned error %ld, %d retries left", n, mNumRetriesLeft); mFinalStatus = n; mCache->releasePage(page); } else if (n == 0) { - LOGI("ERROR_END_OF_STREAM"); + ALOGI("ERROR_END_OF_STREAM"); mNumRetriesLeft = 0; mFinalStatus = ERROR_END_OF_STREAM; @@ -329,7 +329,7 @@ void NuCachedSource2::fetchInternal() { mCache->releasePage(page); } else { if (mFinalStatus != OK) { - LOGI("retrying a previously failed read succeeded."); + ALOGI("retrying a previously failed read succeeded."); } mNumRetriesLeft = kMaxNumRetries; mFinalStatus = OK; @@ -355,7 +355,7 @@ void NuCachedSource2::onFetch() { if (mFetching || keepAlive) { if (keepAlive) { - LOGI("Keep alive"); + ALOGI("Keep alive"); } fetchInternal(); @@ -363,7 +363,7 @@ void NuCachedSource2::onFetch() { mLastFetchTimeUs = ALooper::GetNowUs(); if (mFetching && mCache->totalSize() >= mHighwaterThresholdBytes) { - LOGI("Cache full, done prefetching for now"); + ALOGI("Cache full, done prefetching for now"); mFetching = false; if (mDisconnectAtHighwatermark @@ -448,7 +448,7 @@ void NuCachedSource2::restartPrefetcherIfNecessary_l( size_t actualBytes = mCache->releaseFromStart(maxBytes); mCacheOffset += actualBytes; - LOGI("restarting prefetcher, totalSize = %d", mCache->totalSize()); + ALOGI("restarting prefetcher, totalSize = %d", mCache->totalSize()); mFetching = true; } @@ -584,7 +584,7 @@ status_t NuCachedSource2::seekInternal_l(off64_t offset) { return OK; } - LOGI("new range: offset= %lld", offset); + ALOGI("new range: offset= %lld", offset); mCacheOffset = offset; @@ -634,7 +634,7 @@ void NuCachedSource2::updateCacheParamsFromString(const char *s) { if (sscanf(s, "%ld/%ld/%d", &lowwaterMarkKb, &highwaterMarkKb, &keepAliveSecs) != 3) { - LOGE("Failed to parse cache parameters from '%s'.", s); + ALOGE("Failed to parse cache parameters from '%s'.", s); return; } @@ -651,7 +651,7 @@ void NuCachedSource2::updateCacheParamsFromString(const char *s) { } if (mLowwaterThresholdBytes >= mHighwaterThresholdBytes) { - LOGE("Illegal low/highwater marks specified, reverting to defaults."); + ALOGE("Illegal low/highwater marks specified, reverting to defaults."); mLowwaterThresholdBytes = kDefaultLowWaterThreshold; mHighwaterThresholdBytes = kDefaultHighWaterThreshold; diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp index f9f92d2..60d9bb7 100755 --- a/media/libstagefright/OMXCodec.cpp +++ b/media/libstagefright/OMXCodec.cpp @@ -179,9 +179,9 @@ static const CodecInfo kEncoderInfo[] = { #undef OPTIONAL -#define CODEC_LOGI(x, ...) LOGI("[%s] "x, mComponentName, ##__VA_ARGS__) +#define CODEC_LOGI(x, ...) ALOGI("[%s] "x, mComponentName, ##__VA_ARGS__) #define CODEC_LOGV(x, ...) ALOGV("[%s] "x, mComponentName, ##__VA_ARGS__) -#define CODEC_LOGE(x, ...) LOGE("[%s] "x, mComponentName, ##__VA_ARGS__) +#define CODEC_LOGE(x, ...) ALOGE("[%s] "x, mComponentName, ##__VA_ARGS__) struct OMXCodecObserver : public BnOMXObserver { OMXCodecObserver() { @@ -484,7 +484,7 @@ sp<MediaSource> 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); @@ -625,7 +625,7 @@ status_t OMXCodec::configureCodec(const sp<MetaData> &meta) { status_t err; if ((err = parseAVCCodecSpecificData( data, size, &profile, &level)) != OK) { - LOGE("Malformed AVC codec specific data."); + ALOGE("Malformed AVC codec specific data."); return err; } @@ -639,7 +639,7 @@ status_t OMXCodec::configureCodec(const sp<MetaData> &meta) { // does not handle this gracefully and would clobber the heap // and wreak havoc instead... - LOGE("Profile and/or level exceed the decoder's capabilities."); + ALOGE("Profile and/or level exceed the decoder's capabilities."); return ERROR_UNSUPPORTED; } } else if (meta->findData(kKeyVorbisInfo, &type, &data, &size)) { @@ -981,7 +981,7 @@ void OMXCodec::setVideoInputFormat( } else if (!strcasecmp(MEDIA_MIMETYPE_VIDEO_H263, mime)) { compressionFormat = OMX_VIDEO_CodingH263; } else { - LOGE("Not a supported video mime type: %s", mime); + ALOGE("Not a supported video mime type: %s", mime); CHECK(!"Should not be here. Not a supported video mime type."); } @@ -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. @@ -1375,7 +1375,7 @@ status_t OMXCodec::setVideoOutputFormat( } else if (!strcasecmp(MEDIA_MIMETYPE_VIDEO_MPEG2, mime)) { compressionFormat = OMX_VIDEO_CodingMPEG2; } else { - LOGE("Not a supported video mime type: %s", mime); + ALOGE("Not a supported video mime type: %s", mime); CHECK(!"Should not be here. Not a supported video mime type."); } @@ -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); } } } @@ -1664,7 +1664,7 @@ status_t OMXCodec::allocateBuffersOnPort(OMX_U32 portIndex) { } if ((mFlags & kEnableGrallocUsageProtected) && portIndex == kPortIndexOutput) { - LOGE("protected output buffers must be stent to an ANativeWindow"); + ALOGE("protected output buffers must be stent to an ANativeWindow"); return PERMISSION_DENIED; } @@ -1673,7 +1673,7 @@ status_t OMXCodec::allocateBuffersOnPort(OMX_U32 portIndex) { && portIndex == kPortIndexInput) { err = mOMX->storeMetaDataInBuffers(mNode, kPortIndexInput, OMX_TRUE); if (err != OK) { - LOGE("Storing meta data in video buffers is not supported"); + ALOGE("Storing meta data in video buffers is not supported"); return err; } } @@ -1735,7 +1735,7 @@ status_t OMXCodec::allocateBuffersOnPort(OMX_U32 portIndex) { } if (err != OK) { - LOGE("allocate_buffer_with_backup failed"); + ALOGE("allocate_buffer_with_backup failed"); return err; } @@ -1849,7 +1849,7 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() { def.format.video.eColorFormat); if (err != 0) { - LOGE("native_window_set_buffers_geometry failed: %s (%d)", + ALOGE("native_window_set_buffers_geometry failed: %s (%d)", strerror(-err), -err); return err; } @@ -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; } @@ -1881,11 +1881,11 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() { mNativeWindow.get(), NATIVE_WINDOW_QUEUES_TO_WINDOW_COMPOSER, &queuesToNativeWindow); if (err != 0) { - LOGE("error authenticating native window: %d", err); + ALOGE("error authenticating native window: %d", err); return err; } if (queuesToNativeWindow != 1) { - LOGE("native window could not be authenticated"); + ALOGE("native window could not be authenticated"); return PERMISSION_DENIED; } } @@ -1894,7 +1894,7 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() { err = native_window_set_usage( mNativeWindow.get(), usage | GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_EXTERNAL_DISP); if (err != 0) { - LOGE("native_window_set_usage failed: %s (%d)", strerror(-err), -err); + ALOGE("native_window_set_usage failed: %s (%d)", strerror(-err), -err); return err; } @@ -1902,7 +1902,7 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() { err = mNativeWindow->query(mNativeWindow.get(), NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS, &minUndequeuedBufs); if (err != 0) { - LOGE("NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS query failed: %s (%d)", + ALOGE("NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS query failed: %s (%d)", strerror(-err), -err); return err; } @@ -1925,7 +1925,7 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() { err = native_window_set_buffer_count( mNativeWindow.get(), def.nBufferCountActual); if (err != 0) { - LOGE("native_window_set_buffer_count failed: %s (%d)", strerror(-err), + ALOGE("native_window_set_buffer_count failed: %s (%d)", strerror(-err), -err); return err; } @@ -1938,7 +1938,7 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() { ANativeWindowBuffer* buf; err = mNativeWindow->dequeueBuffer(mNativeWindow.get(), &buf); if (err != 0) { - LOGE("dequeueBuffer failed: %s (%d)", strerror(-err), -err); + ALOGE("dequeueBuffer failed: %s (%d)", strerror(-err), -err); break; } @@ -2052,7 +2052,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() { err = native_window_api_disconnect(mNativeWindow.get(), NATIVE_WINDOW_API_MEDIA); if (err != NO_ERROR) { - LOGE("error pushing blank frames: api_disconnect failed: %s (%d)", + ALOGE("error pushing blank frames: api_disconnect failed: %s (%d)", strerror(-err), -err); return err; } @@ -2060,7 +2060,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() { err = native_window_api_connect(mNativeWindow.get(), NATIVE_WINDOW_API_CPU); if (err != NO_ERROR) { - LOGE("error pushing blank frames: api_connect failed: %s (%d)", + ALOGE("error pushing blank frames: api_connect failed: %s (%d)", strerror(-err), -err); return err; } @@ -2068,7 +2068,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() { err = native_window_set_scaling_mode(mNativeWindow.get(), NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW); if (err != NO_ERROR) { - LOGE("error pushing blank frames: set_buffers_geometry failed: %s (%d)", + ALOGE("error pushing blank frames: set_buffers_geometry failed: %s (%d)", strerror(-err), -err); goto error; } @@ -2076,7 +2076,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() { err = native_window_set_buffers_geometry(mNativeWindow.get(), 1, 1, HAL_PIXEL_FORMAT_RGBX_8888); if (err != NO_ERROR) { - LOGE("error pushing blank frames: set_buffers_geometry failed: %s (%d)", + ALOGE("error pushing blank frames: set_buffers_geometry failed: %s (%d)", strerror(-err), -err); goto error; } @@ -2084,7 +2084,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() { err = native_window_set_usage(mNativeWindow.get(), GRALLOC_USAGE_SW_WRITE_OFTEN); if (err != NO_ERROR) { - LOGE("error pushing blank frames: set_usage failed: %s (%d)", + ALOGE("error pushing blank frames: set_usage failed: %s (%d)", strerror(-err), -err); goto error; } @@ -2092,7 +2092,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() { err = mNativeWindow->query(mNativeWindow.get(), NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS, &minUndequeuedBufs); if (err != NO_ERROR) { - LOGE("error pushing blank frames: MIN_UNDEQUEUED_BUFFERS query " + ALOGE("error pushing blank frames: MIN_UNDEQUEUED_BUFFERS query " "failed: %s (%d)", strerror(-err), -err); goto error; } @@ -2100,7 +2100,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() { numBufs = minUndequeuedBufs + 1; err = native_window_set_buffer_count(mNativeWindow.get(), numBufs); if (err != NO_ERROR) { - LOGE("error pushing blank frames: set_buffer_count failed: %s (%d)", + ALOGE("error pushing blank frames: set_buffer_count failed: %s (%d)", strerror(-err), -err); goto error; } @@ -2112,7 +2112,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() { for (int i = 0; i < numBufs + 1; i++) { err = mNativeWindow->dequeueBuffer(mNativeWindow.get(), &anb); if (err != NO_ERROR) { - LOGE("error pushing blank frames: dequeueBuffer failed: %s (%d)", + ALOGE("error pushing blank frames: dequeueBuffer failed: %s (%d)", strerror(-err), -err); goto error; } @@ -2121,7 +2121,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() { err = mNativeWindow->lockBuffer(mNativeWindow.get(), buf->getNativeBuffer()); if (err != NO_ERROR) { - LOGE("error pushing blank frames: lockBuffer failed: %s (%d)", + ALOGE("error pushing blank frames: lockBuffer failed: %s (%d)", strerror(-err), -err); goto error; } @@ -2130,7 +2130,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() { uint32_t* img = NULL; err = buf->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)(&img)); if (err != NO_ERROR) { - LOGE("error pushing blank frames: lock failed: %s (%d)", + ALOGE("error pushing blank frames: lock failed: %s (%d)", strerror(-err), -err); goto error; } @@ -2139,7 +2139,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() { err = buf->unlock(); if (err != NO_ERROR) { - LOGE("error pushing blank frames: unlock failed: %s (%d)", + ALOGE("error pushing blank frames: unlock failed: %s (%d)", strerror(-err), -err); goto error; } @@ -2147,7 +2147,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() { err = mNativeWindow->queueBuffer(mNativeWindow.get(), buf->getNativeBuffer()); if (err != NO_ERROR) { - LOGE("error pushing blank frames: queueBuffer failed: %s (%d)", + ALOGE("error pushing blank frames: queueBuffer failed: %s (%d)", strerror(-err), -err); goto error; } @@ -2174,7 +2174,7 @@ error: err = native_window_api_disconnect(mNativeWindow.get(), NATIVE_WINDOW_API_CPU); if (err != NO_ERROR) { - LOGE("error pushing blank frames: api_disconnect failed: %s (%d)", + ALOGE("error pushing blank frames: api_disconnect failed: %s (%d)", strerror(-err), -err); return err; } @@ -2182,7 +2182,7 @@ error: err = native_window_api_connect(mNativeWindow.get(), NATIVE_WINDOW_API_MEDIA); if (err != NO_ERROR) { - LOGE("error pushing blank frames: api_connect failed: %s (%d)", + ALOGE("error pushing blank frames: api_connect failed: %s (%d)", strerror(-err), -err); return err; } @@ -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/OggExtractor.cpp b/media/libstagefright/OggExtractor.cpp index 5a68d79..73efc27 100644 --- a/media/libstagefright/OggExtractor.cpp +++ b/media/libstagefright/OggExtractor.cpp @@ -189,9 +189,9 @@ status_t OggSource::read( #if 0 int64_t timeUs; if (packet->meta_data()->findInt64(kKeyTime, &timeUs)) { - LOGI("found time = %lld us", timeUs); + ALOGI("found time = %lld us", timeUs); } else { - LOGI("NO time"); + ALOGI("NO time"); } #endif @@ -777,7 +777,7 @@ void MyVorbisExtractor::parseFileMetaData() { const char *comment = mVc.user_comments[i]; size_t commentLength = mVc.comment_lengths[i]; parseVorbisComment(mFileMeta, comment, commentLength); - //LOGI("comment #%d: '%s'", i + 1, mVc.user_comments[i]); + //ALOGI("comment #%d: '%s'", i + 1, mVc.user_comments[i]); } } @@ -899,7 +899,7 @@ static void extractAlbumArt( uint8_t *flac = DecodeBase64((const char *)data, size, &flacSize); if (flac == NULL) { - LOGE("malformed base64 encoded data."); + ALOGE("malformed base64 encoded data."); return; } diff --git a/media/libstagefright/SampleIterator.cpp b/media/libstagefright/SampleIterator.cpp index 7b8e008..81ec5c1 100644 --- a/media/libstagefright/SampleIterator.cpp +++ b/media/libstagefright/SampleIterator.cpp @@ -77,7 +77,7 @@ status_t SampleIterator::seekTo(uint32_t sampleIndex) { if (sampleIndex >= mStopChunkSampleIndex) { status_t err; if ((err = findChunkRange(sampleIndex)) != OK) { - LOGE("findChunkRange failed"); + ALOGE("findChunkRange failed"); return err; } } @@ -93,7 +93,7 @@ status_t SampleIterator::seekTo(uint32_t sampleIndex) { status_t err; if ((err = getChunkOffset(chunk, &mCurrentChunkOffset)) != OK) { - LOGE("getChunkOffset return error"); + ALOGE("getChunkOffset return error"); return err; } @@ -107,7 +107,7 @@ status_t SampleIterator::seekTo(uint32_t sampleIndex) { size_t sampleSize; if ((err = getSampleSizeDirect( firstChunkSampleIndex + i, &sampleSize)) != OK) { - LOGE("getSampleSizeDirect return error"); + ALOGE("getSampleSizeDirect return error"); return err; } @@ -134,7 +134,7 @@ status_t SampleIterator::seekTo(uint32_t sampleIndex) { status_t err; if ((err = findSampleTime(sampleIndex, &mCurrentSampleTime)) != OK) { - LOGE("findSampleTime return error"); + ALOGE("findSampleTime return error"); return err; } diff --git a/media/libstagefright/SampleTable.cpp b/media/libstagefright/SampleTable.cpp index 3e287fa..d9858d7 100644 --- a/media/libstagefright/SampleTable.cpp +++ b/media/libstagefright/SampleTable.cpp @@ -347,7 +347,7 @@ status_t SampleTable::setTimeToSampleParams( status_t SampleTable::setCompositionTimeToSampleParams( off64_t data_offset, size_t data_size) { - LOGI("There are reordered frames present."); + ALOGI("There are reordered frames present."); if (mCompositionTimeDeltaEntries != NULL || data_size < 8) { return ERROR_MALFORMED; @@ -634,7 +634,7 @@ status_t SampleTable::findSyncSampleNear( } if (left == mNumSyncSamples) { if (flags == kFlagAfter) { - LOGE("tried to find a sync frame after the last one: %d", left); + ALOGE("tried to find a sync frame after the last one: %d", left); return ERROR_OUT_OF_RANGE; } left = left - 1; diff --git a/media/libstagefright/StagefrightMediaScanner.cpp b/media/libstagefright/StagefrightMediaScanner.cpp index 4345184..bd7a226 100644 --- a/media/libstagefright/StagefrightMediaScanner.cpp +++ b/media/libstagefright/StagefrightMediaScanner.cpp @@ -57,7 +57,7 @@ static MediaScanResult HandleMIDI( // get the library configuration and do sanity check const S_EAS_LIB_CONFIG* pLibConfig = EAS_Config(); if ((pLibConfig == NULL) || (LIB_VERSION != pLibConfig->libVersion)) { - LOGE("EAS library/header mismatch\n"); + ALOGE("EAS library/header mismatch\n"); return MEDIA_SCAN_RESULT_ERROR; } EAS_I32 temp; diff --git a/media/libstagefright/StagefrightMetadataRetriever.cpp b/media/libstagefright/StagefrightMetadataRetriever.cpp index 2634da0..43bfd9e 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; } @@ -138,7 +138,7 @@ static VideoFrame *extractVideoFrameWithCodecFlags( if (seekMode < MediaSource::ReadOptions::SEEK_PREVIOUS_SYNC || seekMode > MediaSource::ReadOptions::SEEK_CLOSEST) { - LOGE("Unknown seek mode: %d", seekMode); + ALOGE("Unknown seek mode: %d", seekMode); return NULL; } @@ -264,7 +264,7 @@ static VideoFrame *extractVideoFrameWithCodecFlags( decoder->stop(); if (err != OK) { - LOGE("Colorconverter failed to convert frame."); + ALOGE("Colorconverter failed to convert frame."); delete frame; frame = NULL; @@ -292,7 +292,7 @@ VideoFrame *StagefrightMetadataRetriever::getFrameAtTime( int32_t drm = 0; if (fileMeta->findInt32(kKeyIsDRM, &drm) && drm != 0) { - LOGE("frame grab not allowed."); + ALOGE("frame grab not allowed."); return NULL; } diff --git a/media/libstagefright/SurfaceMediaSource.cpp b/media/libstagefright/SurfaceMediaSource.cpp index 2f807d0..2233d1b 100644 --- a/media/libstagefright/SurfaceMediaSource.cpp +++ b/media/libstagefright/SurfaceMediaSource.cpp @@ -112,7 +112,7 @@ status_t SurfaceMediaSource::setBufferCountServer(int bufferCount) { status_t SurfaceMediaSource::setBufferCount(int bufferCount) { ALOGV("SurfaceMediaSource::setBufferCount"); if (bufferCount > NUM_BUFFER_SLOTS) { - LOGE("setBufferCount: bufferCount is larger than the number of buffer slots"); + ALOGE("setBufferCount: bufferCount is larger than the number of buffer slots"); return BAD_VALUE; } @@ -120,7 +120,7 @@ status_t SurfaceMediaSource::setBufferCount(int bufferCount) { // Error out if the user has dequeued buffers for (int i = 0 ; i < mBufferCount ; i++) { if (mSlots[i].mBufferState == BufferSlot::DEQUEUED) { - LOGE("setBufferCount: client owns some buffers"); + ALOGE("setBufferCount: client owns some buffers"); return INVALID_OPERATION; } } @@ -155,7 +155,7 @@ status_t SurfaceMediaSource::requestBuffer(int slot, sp<GraphicBuffer>* buf) { ALOGV("SurfaceMediaSource::requestBuffer"); Mutex::Autolock lock(mMutex); if (slot < 0 || mBufferCount <= slot) { - LOGE("requestBuffer: slot index out of range [0, %d]: %d", + ALOGE("requestBuffer: slot index out of range [0, %d]: %d", mBufferCount, slot); return BAD_VALUE; } @@ -183,7 +183,7 @@ status_t SurfaceMediaSource::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h, // we might declare mHeight and mWidth and check against those here. if ((w != 0) || (h != 0)) { if ((w != mDefaultWidth) || (h != mDefaultHeight)) { - LOGE("dequeuebuffer: invalid buffer size! Req: %dx%d, Found: %dx%d", + ALOGE("dequeuebuffer: invalid buffer size! Req: %dx%d, Found: %dx%d", mDefaultWidth, mDefaultHeight, w, h); return BAD_VALUE; } @@ -284,7 +284,7 @@ status_t SurfaceMediaSource::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h, // than allowed. const int avail = mBufferCount - (dequeuedCount+1); if (avail < (MIN_UNDEQUEUED_BUFFERS-int(mSynchronousMode))) { - LOGE("dequeueBuffer: MIN_UNDEQUEUED_BUFFERS=%d exceeded (dequeued=%d)", + ALOGE("dequeueBuffer: MIN_UNDEQUEUED_BUFFERS=%d exceeded (dequeued=%d)", MIN_UNDEQUEUED_BUFFERS-int(mSynchronousMode), dequeuedCount); return -EBUSY; @@ -346,7 +346,7 @@ status_t SurfaceMediaSource::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h, mGraphicBufferAlloc->createGraphicBuffer( w, h, format, usage, &error)); if (graphicBuffer == 0) { - LOGE("dequeueBuffer: SurfaceComposer::createGraphicBuffer failed"); + ALOGE("dequeueBuffer: SurfaceComposer::createGraphicBuffer failed"); return error; } if (updateFormat) { @@ -363,13 +363,13 @@ status_t SurfaceMediaSource::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h, status_t SurfaceMediaSource::setSynchronousMode(bool enabled) { Mutex::Autolock lock(mMutex); if (mStopped) { - LOGE("setSynchronousMode: SurfaceMediaSource has been stopped!"); + ALOGE("setSynchronousMode: SurfaceMediaSource has been stopped!"); return NO_INIT; } if (!enabled) { // Async mode is not allowed - LOGE("SurfaceMediaSource can be used only synchronous mode!"); + ALOGE("SurfaceMediaSource can be used only synchronous mode!"); return INVALID_OPERATION; } @@ -390,7 +390,7 @@ status_t SurfaceMediaSource::connect(int api, Mutex::Autolock lock(mMutex); if (mStopped) { - LOGE("Connect: SurfaceMediaSource has been stopped!"); + ALOGE("Connect: SurfaceMediaSource has been stopped!"); return NO_INIT; } @@ -431,7 +431,7 @@ status_t SurfaceMediaSource::disconnect(int api) { Mutex::Autolock lock(mMutex); if (mStopped) { - LOGE("disconnect: SurfaceMediaSoource is already stopped!"); + ALOGE("disconnect: SurfaceMediaSoource is already stopped!"); return NO_INIT; } @@ -467,15 +467,15 @@ status_t SurfaceMediaSource::queueBuffer(int bufIndex, int64_t timestamp, *outTransform = 0; if (bufIndex < 0 || bufIndex >= mBufferCount) { - LOGE("queueBuffer: slot index out of range [0, %d]: %d", + ALOGE("queueBuffer: slot index out of range [0, %d]: %d", mBufferCount, bufIndex); return -EINVAL; } else if (mSlots[bufIndex].mBufferState != BufferSlot::DEQUEUED) { - LOGE("queueBuffer: slot %d is not owned by the client (state=%d)", + ALOGE("queueBuffer: slot %d is not owned by the client (state=%d)", bufIndex, mSlots[bufIndex].mBufferState); return -EINVAL; } else if (!mSlots[bufIndex].mRequestBufferCalled) { - LOGE("queueBuffer: slot %d was enqueued without requesting a " + ALOGE("queueBuffer: slot %d was enqueued without requesting a " "buffer", bufIndex); return -EINVAL; } @@ -561,11 +561,11 @@ void SurfaceMediaSource::cancelBuffer(int bufIndex) { ALOGV("SurfaceMediaSource::cancelBuffer"); Mutex::Autolock lock(mMutex); if (bufIndex < 0 || bufIndex >= mBufferCount) { - LOGE("cancelBuffer: slot index out of range [0, %d]: %d", + ALOGE("cancelBuffer: slot index out of range [0, %d]: %d", mBufferCount, bufIndex); return; } else if (mSlots[bufIndex].mBufferState != BufferSlot::DEQUEUED) { - LOGE("cancelBuffer: slot %d is not owned by the client (state=%d)", + ALOGE("cancelBuffer: slot %d is not owned by the client (state=%d)", bufIndex, mSlots[bufIndex].mBufferState); return; } @@ -814,7 +814,7 @@ void SurfaceMediaSource::passMetadataBufferLocked(MediaBuffer **buffer) { new MediaBuffer(4 + sizeof(buffer_handle_t)); char *data = (char *)tempBuffer->data(); if (data == NULL) { - LOGE("Cannot allocate memory for metadata buffer!"); + ALOGE("Cannot allocate memory for metadata buffer!"); return; } OMX_U32 type = kMetadataBufferTypeGrallocSource; diff --git a/media/libstagefright/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::Event> 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/VBRISeeker.cpp b/media/libstagefright/VBRISeeker.cpp index ecff538..6ac5a83 100644 --- a/media/libstagefright/VBRISeeker.cpp +++ b/media/libstagefright/VBRISeeker.cpp @@ -120,7 +120,7 @@ sp<VBRISeeker> VBRISeeker::CreateFromSource( delete[] buffer; buffer = NULL; - LOGI("Found VBRI header."); + ALOGI("Found VBRI header."); return seeker; } diff --git a/media/libstagefright/WVMExtractor.cpp b/media/libstagefright/WVMExtractor.cpp index 26eda0c..2092cb6 100644 --- a/media/libstagefright/WVMExtractor.cpp +++ b/media/libstagefright/WVMExtractor.cpp @@ -53,7 +53,7 @@ WVMExtractor::WVMExtractor(const sp<DataSource> &source) } if (gVendorLibHandle == NULL) { - LOGE("Failed to open libwvm.so"); + ALOGE("Failed to open libwvm.so"); return; } } @@ -67,7 +67,7 @@ WVMExtractor::WVMExtractor(const sp<DataSource> &source) mImpl = (*getInstanceFunc)(source); CHECK(mImpl != NULL); } else { - LOGE("Failed to locate GetInstance in libwvm.so"); + ALOGE("Failed to locate GetInstance in libwvm.so"); } } diff --git a/media/libstagefright/avc_utils.cpp b/media/libstagefright/avc_utils.cpp index 1ed9e57..65c1848 100644 --- a/media/libstagefright/avc_utils.cpp +++ b/media/libstagefright/avc_utils.cpp @@ -290,7 +290,7 @@ sp<MetaData> MakeAVCCodecSpecificData(const sp<ABuffer> &accessUnit) { memcpy(out, picParamSet->data(), picParamSet->size()); #if 0 - LOGI("AVC seq param set"); + ALOGI("AVC seq param set"); hexdump(seqParamSet->data(), seqParamSet->size()); #endif @@ -301,7 +301,7 @@ sp<MetaData> MakeAVCCodecSpecificData(const sp<ABuffer> &accessUnit) { meta->setInt32(kKeyWidth, width); meta->setInt32(kKeyHeight, height); - LOGI("found AVC codec config (%d x %d, %s-profile level %d.%d)", + ALOGI("found AVC codec config (%d x %d, %s-profile level %d.%d)", width, height, AVCProfileToString(profile), level / 10, level % 10); return meta; diff --git a/media/libstagefright/codecs/aacdec/SoftAAC.cpp b/media/libstagefright/codecs/aacdec/SoftAAC.cpp index c408b2c..da9d280 100644 --- a/media/libstagefright/codecs/aacdec/SoftAAC.cpp +++ b/media/libstagefright/codecs/aacdec/SoftAAC.cpp @@ -116,7 +116,7 @@ status_t SoftAAC::initDecoder() { Int err = PVMP4AudioDecoderInitLibrary(mConfig, mDecoderBuf); if (err != MP4AUDEC_SUCCESS) { - LOGE("Failed to initialize MP4 audio decoder"); + ALOGE("Failed to initialize MP4 audio decoder"); return UNKNOWN_ERROR; } @@ -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..2b8633d 100644 --- a/media/libstagefright/codecs/aacenc/AACEncoder.cpp +++ b/media/libstagefright/codecs/aacenc/AACEncoder.cpp @@ -53,7 +53,7 @@ status_t AACEncoder::initCheck() { CHECK(mApiHandle); if (VO_ERR_NONE != voGetAACEncAPI(mApiHandle)) { - LOGE("Failed to get api handle"); + ALOGE("Failed to get api handle"); return UNKNOWN_ERROR; } @@ -70,11 +70,11 @@ status_t AACEncoder::initCheck() { userData.memflag = VO_IMF_USERMEMOPERATOR; userData.memData = (VO_PTR) mMemOperator; if (VO_ERR_NONE != mApiHandle->Init(&mEncoderHandle, VO_AUDIO_CodingAAC, &userData)) { - LOGE("Failed to init AAC encoder"); + ALOGE("Failed to init AAC encoder"); return UNKNOWN_ERROR; } if (OK != setAudioSpecificConfigData()) { - LOGE("Failed to configure AAC encoder"); + ALOGE("Failed to configure AAC encoder"); return UNKNOWN_ERROR; } @@ -86,7 +86,7 @@ status_t AACEncoder::initCheck() { params.nChannels = mChannels; params.adtsUsed = 0; // We add adts header in the file writer if needed. if (VO_ERR_NONE != mApiHandle->SetParam(mEncoderHandle, VO_PID_AAC_ENCPARAM, ¶ms)) { - LOGE("Failed to set AAC encoder parameters"); + ALOGE("Failed to set AAC encoder parameters"); return UNKNOWN_ERROR; } @@ -106,7 +106,7 @@ static status_t getSampleRateTableIndex(int32_t sampleRate, int32_t &index) { } } - LOGE("Sampling rate %d bps is not supported", sampleRate); + ALOGE("Sampling rate %d bps is not supported", sampleRate); return UNKNOWN_ERROR; } @@ -117,7 +117,7 @@ status_t AACEncoder::setAudioSpecificConfigData() { int32_t index; CHECK_EQ(OK, getSampleRateTableIndex(mSampleRate, index)); if (mChannels > 2 || mChannels <= 0) { - LOGE("Unsupported number of channels(%d)", mChannels); + ALOGE("Unsupported number of channels(%d)", mChannels); return UNKNOWN_ERROR; } @@ -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; } @@ -153,7 +153,7 @@ status_t AACEncoder::start(MetaData *params) { status_t err = mSource->start(params); if (err != OK) { - LOGE("AudioSource is not available"); + ALOGE("AudioSource is not available"); return err; } @@ -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/dec/SoftAMR.cpp b/media/libstagefright/codecs/amrnb/dec/SoftAMR.cpp index c0a588f..7602f2d 100644 --- a/media/libstagefright/codecs/amrnb/dec/SoftAMR.cpp +++ b/media/libstagefright/codecs/amrnb/dec/SoftAMR.cpp @@ -304,7 +304,7 @@ void SoftAMR::onQueueFilled(OMX_U32 portIndex) { MIME_IETF); if (numBytesRead == -1) { - LOGE("PV AMR decoder AMRDecode() call failed"); + ALOGE("PV AMR decoder AMRDecode() call failed"); notify(OMX_EventError, OMX_ErrorUndefined, 0, NULL); mSignalledError = true; diff --git a/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp b/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp index d361ef4..3afbc4f 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; } @@ -84,7 +84,7 @@ status_t AMRNBEncoder::start(MetaData *params) { status_t err = mSource->start(params); if (err != OK) { - LOGE("AudioSource is not available"); + ALOGE("AudioSource is not available"); return err; } @@ -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..60b1163 100644 --- a/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp +++ b/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp @@ -80,7 +80,7 @@ status_t AMRWBEncoder::initCheck() { CHECK(mApiHandle); if (VO_ERR_NONE != voGetAMRWBEncAPI(mApiHandle)) { - LOGE("Failed to get api handle"); + ALOGE("Failed to get api handle"); return UNKNOWN_ERROR; } @@ -97,20 +97,20 @@ status_t AMRWBEncoder::initCheck() { userData.memflag = VO_IMF_USERMEMOPERATOR; userData.memData = (VO_PTR) mMemOperator; if (VO_ERR_NONE != mApiHandle->Init(&mEncoderHandle, VO_AUDIO_CodingAMRWB, &userData)) { - LOGE("Failed to init AMRWB encoder"); + ALOGE("Failed to init AMRWB encoder"); return UNKNOWN_ERROR; } // Configure AMRWB encoder$ VOAMRWBMODE mode = pickModeFromBitRate(mBitRate); if (VO_ERR_NONE != mApiHandle->SetParam(mEncoderHandle, VO_PID_AMRWB_MODE, &mode)) { - LOGE("Failed to set AMRWB encoder mode to %d", mode); + ALOGE("Failed to set AMRWB encoder mode to %d", mode); return UNKNOWN_ERROR; } VOAMRWBFRAMETYPE type = VOAMRWB_RFC3267; if (VO_ERR_NONE != mApiHandle->SetParam(mEncoderHandle, VO_PID_AMRWB_FRAMETYPE, &type)) { - LOGE("Failed to set AMRWB encoder frame type to %d", type); + ALOGE("Failed to set AMRWB encoder frame type to %d", type); return UNKNOWN_ERROR; } @@ -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; } @@ -140,7 +140,7 @@ status_t AMRWBEncoder::start(MetaData *params) { status_t err = mSource->start(params); if (err != OK) { - LOGE("AudioSource is not available"); + ALOGE("AudioSource is not available"); return err; } mStarted = true; @@ -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 18c5550..e202a2b 100644 --- a/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp +++ b/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp @@ -41,7 +41,7 @@ static status_t ConvertOmxAvcProfileToAvcSpecProfile( *pvProfile = AVC_BASELINE; return OK; default: - LOGE("Unsupported omx profile: %d", omxProfile); + ALOGE("Unsupported omx profile: %d", omxProfile); } return BAD_VALUE; } @@ -100,7 +100,7 @@ static status_t ConvertOmxAvcLevelToAvcSpecLevel( level = AVC_LEVEL5_1; break; default: - LOGE("Unknown omx level: %d", omxLevel); + ALOGE("Unknown omx level: %d", omxLevel); return BAD_VALUE; } *pvLevel = level; @@ -178,7 +178,7 @@ AVCEncoder::AVCEncoder( mInputFrameData(NULL), mGroup(NULL) { - LOGI("Construct software AVCEncoder"); + ALOGI("Construct software AVCEncoder"); mHandle = new tagAVCHandle; memset(mHandle, 0, sizeof(tagAVCHandle)); @@ -214,7 +214,7 @@ status_t AVCEncoder::initCheck(const sp<MetaData>& meta) { CHECK(meta->findInt32(kKeyColorFormat, &mVideoColorFormat)); if (mVideoColorFormat != OMX_COLOR_FormatYUV420Planar) { if (mVideoColorFormat != OMX_COLOR_FormatYUV420SemiPlanar) { - LOGE("Color format %d is not supported", mVideoColorFormat); + ALOGE("Color format %d is not supported", mVideoColorFormat); return BAD_VALUE; } // Allocate spare buffer only when color conversion is needed. @@ -226,7 +226,7 @@ status_t AVCEncoder::initCheck(const sp<MetaData>& meta) { // XXX: Remove this restriction if (mVideoWidth % 16 != 0 || mVideoHeight % 16 != 0) { - LOGE("Video frame size %dx%d must be a multiple of 16", + ALOGE("Video frame size %dx%d must be a multiple of 16", mVideoWidth, mVideoHeight); return BAD_VALUE; } @@ -336,14 +336,14 @@ status_t AVCEncoder::start(MetaData *params) { } if (mStarted) { - LOGW("Call start() when encoder already started"); + ALOGW("Call start() when encoder already started"); return OK; } AVCEnc_Status err; err = PVAVCEncInitialize(mHandle, mEncParams, NULL, NULL); if (err != AVCENC_SUCCESS) { - LOGE("Failed to initialize the encoder: %d", err); + ALOGE("Failed to initialize the encoder: %d", err); return UNKNOWN_ERROR; } @@ -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; } @@ -461,7 +461,7 @@ status_t AVCEncoder::read( *out = outputBuffer; return OK; default: - LOGE("Nal type (%d) other than SPS/PPS is unexpected", type); + ALOGE("Nal type (%d) other than SPS/PPS is unexpected", type); return UNKNOWN_ERROR; } } @@ -476,7 +476,7 @@ status_t AVCEncoder::read( status_t err = mSource->read(&mInputBuffer, options); if (err != OK) { if (err != ERROR_END_OF_STREAM) { - LOGE("Failed to read input video frame: %d", err); + ALOGE("Failed to read input video frame: %d", err); } outputBuffer->release(); return err; diff --git a/media/libstagefright/codecs/g711/dec/SoftG711.cpp b/media/libstagefright/codecs/g711/dec/SoftG711.cpp index 15e2c26..32ef003 100644 --- a/media/libstagefright/codecs/g711/dec/SoftG711.cpp +++ b/media/libstagefright/codecs/g711/dec/SoftG711.cpp @@ -210,7 +210,7 @@ void SoftG711::onQueueFilled(OMX_U32 portIndex) { } if (inHeader->nFilledLen > kMaxNumSamplesPerFrame) { - LOGE("input buffer too large (%ld).", inHeader->nFilledLen); + ALOGE("input buffer too large (%ld).", inHeader->nFilledLen); notify(OMX_EventError, OMX_ErrorUndefined, 0, NULL); mSignalledError = true; diff --git a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp index bedfc58..a34a0ca 100644 --- a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp +++ b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp @@ -207,7 +207,7 @@ OMX_ERRORTYPE SoftMPEG4::internalGetParameter( (OMX_VIDEO_PARAM_PROFILELEVELTYPE *) params; if (profileLevel->nPortIndex != 0) { // Input port only - LOGE("Invalid port index: %ld", profileLevel->nPortIndex); + ALOGE("Invalid port index: %ld", profileLevel->nPortIndex); return OMX_ErrorUnsupportedIndex; } @@ -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; @@ -430,7 +430,7 @@ void SoftMPEG4::onQueueFilled(OMX_U32 portIndex) { mHandle, &bitstream, ×tamp, &tmp, &useExtTimestamp, outHeader->pBuffer) != PV_TRUE) { - LOGE("failed to decode video frame."); + ALOGE("failed to decode video frame."); notify(OMX_EventError, OMX_ErrorUndefined, 0, NULL); mSignalledError = true; diff --git a/media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp b/media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp index 2e3d12d..d538603 100644 --- a/media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp +++ b/media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp @@ -43,16 +43,16 @@ static status_t ConvertOmxProfileLevel( switch (omxProfile) { case OMX_VIDEO_H263ProfileBaseline: if (omxLevel > OMX_VIDEO_H263Level45) { - LOGE("Unsupported level (%d) for H263", omxLevel); + ALOGE("Unsupported level (%d) for H263", omxLevel); return BAD_VALUE; } else { - LOGW("PV does not support level configuration for H263"); + ALOGW("PV does not support level configuration for H263"); profileLevel = CORE_PROFILE_LEVEL2; break; } break; default: - LOGE("Unsupported profile (%d) for H263", omxProfile); + ALOGE("Unsupported profile (%d) for H263", omxProfile); return BAD_VALUE; } } else { // MPEG4 @@ -72,7 +72,7 @@ static status_t ConvertOmxProfileLevel( profileLevel = SIMPLE_PROFILE_LEVEL3; break; default: - LOGE("Unsupported level (%d) for MPEG4 simple profile", + ALOGE("Unsupported level (%d) for MPEG4 simple profile", omxLevel); return BAD_VALUE; } @@ -89,7 +89,7 @@ static status_t ConvertOmxProfileLevel( profileLevel = SIMPLE_SCALABLE_PROFILE_LEVEL2; break; default: - LOGE("Unsupported level (%d) for MPEG4 simple " + ALOGE("Unsupported level (%d) for MPEG4 simple " "scalable profile", omxLevel); return BAD_VALUE; } @@ -103,7 +103,7 @@ static status_t ConvertOmxProfileLevel( profileLevel = CORE_PROFILE_LEVEL2; break; default: - LOGE("Unsupported level (%d) for MPEG4 core " + ALOGE("Unsupported level (%d) for MPEG4 core " "profile", omxLevel); return BAD_VALUE; } @@ -120,13 +120,13 @@ static status_t ConvertOmxProfileLevel( profileLevel = CORE_SCALABLE_PROFILE_LEVEL3; break; default: - LOGE("Unsupported level (%d) for MPEG4 core " + ALOGE("Unsupported level (%d) for MPEG4 core " "scalable profile", omxLevel); return BAD_VALUE; } break; default: - LOGE("Unsupported MPEG4 profile (%d)", omxProfile); + ALOGE("Unsupported MPEG4 profile (%d)", omxProfile); return BAD_VALUE; } } @@ -178,7 +178,7 @@ M4vH263Encoder::M4vH263Encoder( mInputFrameData(NULL), mGroup(NULL) { - LOGI("Construct software M4vH263Encoder"); + ALOGI("Construct software M4vH263Encoder"); mHandle = new tagvideoEncControls; memset(mHandle, 0, sizeof(tagvideoEncControls)); @@ -207,7 +207,7 @@ status_t M4vH263Encoder::initCheck(const sp<MetaData>& meta) { CHECK(meta->findInt32(kKeyColorFormat, &mVideoColorFormat)); if (mVideoColorFormat != OMX_COLOR_FormatYUV420Planar) { if (mVideoColorFormat != OMX_COLOR_FormatYUV420SemiPlanar) { - LOGE("Color format %d is not supported", mVideoColorFormat); + ALOGE("Color format %d is not supported", mVideoColorFormat); return BAD_VALUE; } // Allocate spare buffer only when color conversion is needed. @@ -219,7 +219,7 @@ status_t M4vH263Encoder::initCheck(const sp<MetaData>& meta) { // XXX: Remove this restriction if (mVideoWidth % 16 != 0 || mVideoHeight % 16 != 0) { - LOGE("Video frame size %dx%d must be a multiple of 16", + ALOGE("Video frame size %dx%d must be a multiple of 16", mVideoWidth, mVideoHeight); return BAD_VALUE; } @@ -227,7 +227,7 @@ status_t M4vH263Encoder::initCheck(const sp<MetaData>& meta) { mEncParams = new tagvideoEncOptions; memset(mEncParams, 0, sizeof(tagvideoEncOptions)); if (!PVGetDefaultEncOption(mEncParams, 0)) { - LOGE("Failed to get default encoding parameters"); + ALOGE("Failed to get default encoding parameters"); return BAD_VALUE; } @@ -314,12 +314,12 @@ status_t M4vH263Encoder::start(MetaData *params) { } if (mStarted) { - LOGW("Call start() when encoder already started"); + ALOGW("Call start() when encoder already started"); return OK; } if (!PVInitVideoEncoder(mHandle, mEncParams)) { - LOGE("Failed to initialize the encoder"); + ALOGE("Failed to initialize the encoder"); return UNKNOWN_ERROR; } @@ -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; } @@ -386,7 +386,7 @@ status_t M4vH263Encoder::read( // Output codec specific data if (mNumInputFrames < 0) { if (!PVGetVolHeader(mHandle, outPtr, &dataLength, 0)) { - LOGE("Failed to get VOL header"); + ALOGE("Failed to get VOL header"); return UNKNOWN_ERROR; } ALOGV("Output VOL header: %d bytes", dataLength); @@ -401,7 +401,7 @@ status_t M4vH263Encoder::read( status_t err = mSource->read(&mInputBuffer, options); if (OK != err) { if (err != ERROR_END_OF_STREAM) { - LOGE("Failed to read from data source"); + ALOGE("Failed to read from data source"); } outputBuffer->release(); return err; @@ -460,7 +460,7 @@ status_t M4vH263Encoder::read( if (!PVEncodeVideoFrame(mHandle, &vin, &vout, &modTimeMs, outPtr, &dataLength, &nLayer) || !PVGetHintTrack(mHandle, &hintTrack)) { - LOGE("Failed to encode frame or get hink track at frame %lld", + ALOGE("Failed to encode frame or get hink track at frame %lld", mNumInputFrames); outputBuffer->release(); mInputBuffer->release(); diff --git a/media/libstagefright/codecs/mp3dec/SoftMP3.cpp b/media/libstagefright/codecs/mp3dec/SoftMP3.cpp index 43fb30a..ad55295 100644 --- a/media/libstagefright/codecs/mp3dec/SoftMP3.cpp +++ b/media/libstagefright/codecs/mp3dec/SoftMP3.cpp @@ -223,10 +223,10 @@ void SoftMP3::onQueueFilled(OMX_U32 portIndex) { if (decoderErr != NO_ENOUGH_MAIN_DATA_ERROR || mConfig->outputFrameSize == 0) { - LOGE("mp3 decoder returned error %d", decoderErr); + ALOGE("mp3 decoder returned error %d", decoderErr); if (mConfig->outputFrameSize == 0) { - LOGE("Output frame size is 0"); + ALOGE("Output frame size is 0"); } notify(OMX_EventError, OMX_ErrorUndefined, decoderErr, NULL); diff --git a/media/libstagefright/codecs/on2/dec/SoftVPX.cpp b/media/libstagefright/codecs/on2/dec/SoftVPX.cpp index c5fe199..bf9ab3a 100644 --- a/media/libstagefright/codecs/on2/dec/SoftVPX.cpp +++ b/media/libstagefright/codecs/on2/dec/SoftVPX.cpp @@ -138,7 +138,7 @@ status_t SoftVPX::initDecoder() { cfg.threads = GetCPUCoreCount(); if ((vpx_err = vpx_codec_dec_init( (vpx_codec_ctx_t *)mCtx, &vpx_codec_vp8_dx_algo, &cfg, 0))) { - LOGE("on2 decoder failed to initialize. (%d)", vpx_err); + ALOGE("on2 decoder failed to initialize. (%d)", vpx_err); return UNKNOWN_ERROR; } @@ -254,7 +254,7 @@ void SoftVPX::onQueueFilled(OMX_U32 portIndex) { inHeader->nFilledLen, NULL, 0)) { - LOGE("on2 decoder failed to decode frame."); + ALOGE("on2 decoder failed to decode frame."); notify(OMX_EventError, OMX_ErrorUndefined, 0, NULL); return; diff --git a/media/libstagefright/codecs/on2/h264dec/SoftAVC.cpp b/media/libstagefright/codecs/on2/h264dec/SoftAVC.cpp index dede3ac..6c3f834 100644 --- a/media/libstagefright/codecs/on2/h264dec/SoftAVC.cpp +++ b/media/libstagefright/codecs/on2/h264dec/SoftAVC.cpp @@ -204,7 +204,7 @@ OMX_ERRORTYPE SoftAVC::internalGetParameter( (OMX_VIDEO_PARAM_PROFILELEVELTYPE *) params; if (profileLevel->nPortIndex != kInputPortIndex) { - LOGE("Invalid port index: %ld", profileLevel->nPortIndex); + ALOGE("Invalid port index: %ld", profileLevel->nPortIndex); return OMX_ErrorUnsupportedIndex; } @@ -371,7 +371,7 @@ void SoftAVC::onQueueFilled(OMX_U32 portIndex) { } inPicture.dataLen = 0; if (ret < 0) { - LOGE("Decoder failed: %d", ret); + ALOGE("Decoder failed: %d", ret); notify(OMX_EventError, OMX_ErrorUndefined, ERROR_MALFORMED, NULL); diff --git a/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp b/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp index 47dbd5c..ac88107 100644 --- a/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp +++ b/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp @@ -353,14 +353,14 @@ 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, kMaxNumSamplesPerBuffer); if (numFrames < 0) { - LOGE("vorbis_dsp_pcmout returned %d", numFrames); + ALOGE("vorbis_dsp_pcmout returned %d", numFrames); numFrames = 0; } } diff --git a/media/libstagefright/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<AMessage> &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<ALooper> 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<AMessage> &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<AMessage> &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/foundation/AMessage.cpp b/media/libstagefright/foundation/AMessage.cpp index f039bc1..0a6776e 100644 --- a/media/libstagefright/foundation/AMessage.cpp +++ b/media/libstagefright/foundation/AMessage.cpp @@ -471,7 +471,7 @@ sp<AMessage> AMessage::FromParcel(const Parcel &parcel) { default: { - LOGE("This type of object cannot cross process boundaries."); + ALOGE("This type of object cannot cross process boundaries."); TRESPASS(); } } @@ -535,7 +535,7 @@ void AMessage::writeToParcel(Parcel *parcel) const { default: { - LOGE("This type of object cannot cross process boundaries."); + ALOGE("This type of object cannot cross process boundaries."); TRESPASS(); } } diff --git a/media/libstagefright/foundation/hexdump.cpp b/media/libstagefright/foundation/hexdump.cpp index 9f6bf9e..16c1ca5 100644 --- a/media/libstagefright/foundation/hexdump.cpp +++ b/media/libstagefright/foundation/hexdump.cpp @@ -67,7 +67,7 @@ void hexdump(const void *_data, size_t size) { } } - LOGI("%s", line.c_str()); + ALOGI("%s", line.c_str()); offset += 16; } diff --git a/media/libstagefright/httplive/LiveDataSource.cpp b/media/libstagefright/httplive/LiveDataSource.cpp index 5f5c6d4..7560642 100644 --- a/media/libstagefright/httplive/LiveDataSource.cpp +++ b/media/libstagefright/httplive/LiveDataSource.cpp @@ -59,7 +59,7 @@ ssize_t LiveDataSource::readAtNonBlocking( Mutex::Autolock autoLock(mLock); if (offset != mOffset) { - LOGE("Attempt at reading non-sequentially from LiveDataSource."); + ALOGE("Attempt at reading non-sequentially from LiveDataSource."); return -EPIPE; } @@ -89,7 +89,7 @@ ssize_t LiveDataSource::readAt(off64_t offset, void *data, size_t size) { ssize_t LiveDataSource::readAt_l(off64_t offset, void *data, size_t size) { if (offset != mOffset) { - LOGE("Attempt at reading non-sequentially from LiveDataSource."); + ALOGE("Attempt at reading non-sequentially from LiveDataSource."); return -EPIPE; } diff --git a/media/libstagefright/httplive/LiveSession.cpp b/media/libstagefright/httplive/LiveSession.cpp index 6f4b875..0cddd2e 100644 --- a/media/libstagefright/httplive/LiveSession.cpp +++ b/media/libstagefright/httplive/LiveSession.cpp @@ -168,9 +168,9 @@ void LiveSession::onConnect(const sp<AMessage> &msg) { } if (!(mFlags & kFlagIncognito)) { - LOGI("onConnect '%s'", url.c_str()); + ALOGI("onConnect '%s'", url.c_str()); } else { - LOGI("onConnect <URL suppressed>"); + ALOGI("onConnect <URL suppressed>"); } mMasterURL = url; @@ -179,7 +179,7 @@ void LiveSession::onConnect(const sp<AMessage> &msg) { sp<M3UParser> playlist = fetchPlaylist(url.c_str(), &dummy); if (playlist == NULL) { - LOGE("unable to fetch master playlist '%s'.", url.c_str()); + ALOGE("unable to fetch master playlist '%s'.", url.c_str()); mDataSource->queueEOS(ERROR_IO); return; @@ -207,7 +207,7 @@ void LiveSession::onConnect(const sp<AMessage> &msg) { } void LiveSession::onDisconnect() { - LOGI("onDisconnect"); + ALOGI("onDisconnect"); mDataSource->queueEOS(ERROR_END_OF_STREAM); @@ -360,7 +360,7 @@ sp<M3UParser> LiveSession::fetchPlaylist(const char *url, bool *unchanged) { new M3UParser(url, buffer->data(), buffer->size()); if (playlist->initCheck() != OK) { - LOGE("failed to parse .m3u8 playlist"); + ALOGE("failed to parse .m3u8 playlist"); return NULL; } @@ -531,7 +531,7 @@ rinse_repeat: // We succeeded in fetching the playlist, but it was // unchanged from the last time we tried. } else { - LOGE("failed to load playlist at url '%s'", url.c_str()); + ALOGE("failed to load playlist at url '%s'", url.c_str()); mDataSource->queueEOS(ERROR_IO); return; } @@ -596,7 +596,7 @@ rinse_repeat: int32_t newSeqNumber = firstSeqNumberInPlaylist + index; if (newSeqNumber != mSeqNumber) { - LOGI("seeking to seq no %d", newSeqNumber); + ALOGI("seeking to seq no %d", newSeqNumber); mSeqNumber = newSeqNumber; @@ -633,7 +633,7 @@ rinse_repeat: if (mPrevBandwidthIndex != (ssize_t)bandwidthIndex) { // Go back to the previous bandwidth. - LOGI("new bandwidth does not have the sequence number " + ALOGI("new bandwidth does not have the sequence number " "we're looking for, switching back to previous bandwidth"); mLastPlaylistFetchTimeUs = -1; @@ -653,13 +653,13 @@ rinse_repeat: // we've missed the boat, let's start from the lowest sequence // number available and signal a discontinuity. - LOGI("We've missed the boat, restarting playback."); + ALOGI("We've missed the boat, restarting playback."); mSeqNumber = lastSeqNumberInPlaylist; explicitDiscontinuity = true; // fall through } else { - LOGE("Cannot find sequence number %d in playlist " + ALOGE("Cannot find sequence number %d in playlist " "(contains %d - %d)", mSeqNumber, firstSeqNumberInPlaylist, firstSeqNumberInPlaylist + mPlaylist->size() - 1); @@ -693,7 +693,7 @@ rinse_repeat: sp<ABuffer> buffer; status_t err = fetchFile(uri.c_str(), &buffer, range_offset, range_length); if (err != OK) { - LOGE("failed to fetch .ts segment at url '%s'", uri.c_str()); + ALOGE("failed to fetch .ts segment at url '%s'", uri.c_str()); mDataSource->queueEOS(err); return; } @@ -703,7 +703,7 @@ rinse_repeat: err = decryptBuffer(mSeqNumber - firstSeqNumberInPlaylist, buffer); if (err != OK) { - LOGE("decryptBuffer failed w/ error %d", err); + ALOGE("decryptBuffer failed w/ error %d", err); mDataSource->queueEOS(err); return; @@ -712,7 +712,7 @@ rinse_repeat: if (buffer->size() == 0 || buffer->data()[0] != 0x47) { // Not a transport stream??? - LOGE("This doesn't look like a transport stream..."); + ALOGE("This doesn't look like a transport stream..."); mBandwidthItems.removeAt(bandwidthIndex); @@ -721,7 +721,7 @@ rinse_repeat: return; } - LOGI("Retrying with a different bandwidth stream."); + ALOGI("Retrying with a different bandwidth stream."); mLastPlaylistFetchTimeUs = -1; bandwidthIndex = getBandwidthIndex(); @@ -744,7 +744,7 @@ rinse_repeat: if (seekDiscontinuity || explicitDiscontinuity || bandwidthChanged) { // Signal discontinuity. - LOGI("queueing discontinuity (seek=%d, explicit=%d, bandwidthChanged=%d)", + ALOGI("queueing discontinuity (seek=%d, explicit=%d, bandwidthChanged=%d)", seekDiscontinuity, explicitDiscontinuity, bandwidthChanged); sp<ABuffer> tmp = new ABuffer(188); @@ -796,13 +796,13 @@ status_t LiveSession::decryptBuffer( if (method == "NONE") { return OK; } else if (!(method == "AES-128")) { - LOGE("Unsupported cipher method '%s'", method.c_str()); + ALOGE("Unsupported cipher method '%s'", method.c_str()); return ERROR_UNSUPPORTED; } AString keyURI; if (!itemMeta->findString("cipher-uri", &keyURI)) { - LOGE("Missing key uri"); + ALOGE("Missing key uri"); return ERROR_MALFORMED; } @@ -844,7 +844,7 @@ status_t LiveSession::decryptBuffer( } if (err != OK) { - LOGE("failed to fetch cipher key from '%s'.", keyURI.c_str()); + ALOGE("failed to fetch cipher key from '%s'.", keyURI.c_str()); return ERROR_IO; } @@ -853,7 +853,7 @@ status_t LiveSession::decryptBuffer( AES_KEY aes_key; if (AES_set_decrypt_key(key->data(), 128, &aes_key) != 0) { - LOGE("failed to set AES decryption key."); + ALOGE("failed to set AES decryption key."); return UNKNOWN_ERROR; } @@ -863,7 +863,7 @@ status_t LiveSession::decryptBuffer( if (itemMeta->findString("cipher-iv", &iv)) { if ((!iv.startsWith("0x") && !iv.startsWith("0X")) || iv.size() != 16 * 2 + 2) { - LOGE("malformed cipher IV '%s'.", iv.c_str()); + ALOGE("malformed cipher IV '%s'.", iv.c_str()); return ERROR_MALFORMED; } @@ -872,7 +872,7 @@ status_t LiveSession::decryptBuffer( char c1 = tolower(iv.c_str()[2 + 2 * i]); char c2 = tolower(iv.c_str()[3 + 2 * i]); if (!isxdigit(c1) || !isxdigit(c2)) { - LOGE("malformed cipher IV '%s'.", iv.c_str()); + ALOGE("malformed cipher IV '%s'.", iv.c_str()); return ERROR_MALFORMED; } uint8_t nibble1 = isdigit(c1) ? c1 - '0' : c1 - 'a' + 10; diff --git a/media/libstagefright/httplive/M3UParser.cpp b/media/libstagefright/httplive/M3UParser.cpp index a50970e..7d3cf05 100644 --- a/media/libstagefright/httplive/M3UParser.cpp +++ b/media/libstagefright/httplive/M3UParser.cpp @@ -169,7 +169,7 @@ status_t M3UParser::parse(const void *_data, size_t size) { line.setTo(&data[offset], offsetLF - offset); } - // LOGI("#%s#", line.c_str()); + // ALOGI("#%s#", line.c_str()); if (line.empty()) { offset = offsetLF + 1; @@ -451,7 +451,7 @@ status_t M3UParser::parseCipherInfo( if (MakeURL(baseURI.c_str(), val.c_str(), &absURI)) { val = absURI; } else { - LOGE("failed to make absolute url for '%s'.", + ALOGE("failed to make absolute url for '%s'.", val.c_str()); } } diff --git a/media/libstagefright/id3/ID3.cpp b/media/libstagefright/id3/ID3.cpp index 943a937..6dde9d8 100644 --- a/media/libstagefright/id3/ID3.cpp +++ b/media/libstagefright/id3/ID3.cpp @@ -129,7 +129,7 @@ struct id3_header { } if (size > kMaxMetadataSize) { - LOGE("skipping huge ID3 metadata of size %d", size); + ALOGE("skipping huge ID3 metadata of size %d", size); return false; } diff --git a/media/libstagefright/matroska/MatroskaExtractor.cpp b/media/libstagefright/matroska/MatroskaExtractor.cpp index 474c794..4fbf47e 100644 --- a/media/libstagefright/matroska/MatroskaExtractor.cpp +++ b/media/libstagefright/matroska/MatroskaExtractor.cpp @@ -245,7 +245,7 @@ void BlockIterator::advance_l() { if (res < 0) { // I/O error - LOGE("Cluster::Parse returned result %ld", res); + ALOGE("Cluster::Parse returned result %ld", res); mCluster = NULL; break; @@ -563,7 +563,7 @@ MatroskaExtractor::MatroskaExtractor(const sp<DataSource> &source) #if 0 const mkvparser::SegmentInfo *info = mSegment->GetInfo(); - LOGI("muxing app: %s, writing app: %s", + ALOGI("muxing app: %s, writing app: %s", info->GetMuxingAppAsUTF8(), info->GetWritingAppAsUTF8()); #endif diff --git a/media/libstagefright/mpeg2ts/ATSParser.cpp b/media/libstagefright/mpeg2ts/ATSParser.cpp index da911e4..3f4de1f 100644 --- a/media/libstagefright/mpeg2ts/ATSParser.cpp +++ b/media/libstagefright/mpeg2ts/ATSParser.cpp @@ -282,7 +282,7 @@ status_t ATSParser::Program::parseProgramMap(ABitReader *br) { ssize_t index = mStreams.indexOfKey(info.mPID); if (index >= 0 && mStreams.editValueAt(index)->type() != info.mType) { - LOGI("uh oh. stream PIDs have changed."); + ALOGI("uh oh. stream PIDs have changed."); PIDsChanged = true; break; } @@ -290,18 +290,18 @@ status_t ATSParser::Program::parseProgramMap(ABitReader *br) { if (PIDsChanged) { #if 0 - LOGI("before:"); + ALOGI("before:"); for (size_t i = 0; i < mStreams.size(); ++i) { sp<Stream> stream = mStreams.editValueAt(i); - LOGI("PID 0x%08x => type 0x%02x", stream->pid(), stream->type()); + ALOGI("PID 0x%08x => type 0x%02x", stream->pid(), stream->type()); } - LOGI("after:"); + ALOGI("after:"); for (size_t i = 0; i < infos.size(); ++i) { StreamInfo &info = infos.editItemAt(i); - LOGI("PID 0x%08x => type 0x%02x", info.mPID, info.mType); + ALOGI("PID 0x%08x => type 0x%02x", info.mPID, info.mType); } #endif @@ -340,7 +340,7 @@ status_t ATSParser::Program::parseProgramMap(ABitReader *br) { } if (!success) { - LOGI("Stream PIDs changed and we cannot recover."); + ALOGI("Stream PIDs changed and we cannot recover."); return ERROR_MALFORMED; } } @@ -475,7 +475,7 @@ status_t ATSParser::Stream::parse( // Increment in multiples of 64K. neededSize = (neededSize + 65535) & ~65535; - LOGI("resizing buffer to %d bytes", neededSize); + ALOGI("resizing buffer to %d bytes", neededSize); sp<ABuffer> newBuffer = new ABuffer(neededSize); memcpy(newBuffer->data(), mBuffer->data(), mBuffer->size()); @@ -634,7 +634,7 @@ status_t ATSParser::Stream::parsePES(ABitReader *br) { CHECK_EQ(br->getBits(1), 1u); ALOGV("PTS = %llu", PTS); - // LOGI("PTS = %.2f secs", PTS / 90000.0f); + // ALOGI("PTS = %.2f secs", PTS / 90000.0f); optional_bytes_remaining -= 5; @@ -697,7 +697,7 @@ status_t ATSParser::Stream::parsePES(ABitReader *br) { PES_packet_length - 3 - PES_header_data_length; if (br->numBitsLeft() < dataLength * 8) { - LOGE("PES packet does not carry enough data to contain " + ALOGE("PES packet does not carry enough data to contain " "payload. (numBitsLeft = %d, required = %d)", br->numBitsLeft(), dataLength * 8); @@ -968,7 +968,7 @@ status_t ATSParser::parseTS(ABitReader *br) { unsigned continuity_counter = br->getBits(4); ALOGV("continuity_counter = %u", continuity_counter); - // LOGI("PID = 0x%04x, continuity_counter = %u", PID, continuity_counter); + // ALOGI("PID = 0x%04x, continuity_counter = %u", PID, continuity_counter); if (adaptation_field_control == 2 || adaptation_field_control == 3) { parseAdaptationField(br); diff --git a/media/libstagefright/mpeg2ts/ESQueue.cpp b/media/libstagefright/mpeg2ts/ESQueue.cpp index edb4232..7fd99a8 100644 --- a/media/libstagefright/mpeg2ts/ESQueue.cpp +++ b/media/libstagefright/mpeg2ts/ESQueue.cpp @@ -144,7 +144,7 @@ status_t ElementaryStreamQueue::appendData( } if (startOffset > 0) { - LOGI("found something resembling an H.264/MPEG syncword at " + ALOGI("found something resembling an H.264/MPEG syncword at " "offset %ld", startOffset); } @@ -177,7 +177,7 @@ status_t ElementaryStreamQueue::appendData( } if (startOffset > 0) { - LOGI("found something resembling an H.264/MPEG syncword at " + ALOGI("found something resembling an H.264/MPEG syncword at " "offset %ld", startOffset); } @@ -210,7 +210,7 @@ status_t ElementaryStreamQueue::appendData( } if (startOffset > 0) { - LOGI("found something resembling an AAC syncword at offset %ld", + ALOGI("found something resembling an AAC syncword at offset %ld", startOffset); } @@ -237,7 +237,7 @@ status_t ElementaryStreamQueue::appendData( } if (startOffset > 0) { - LOGI("found something resembling an MPEG audio " + ALOGI("found something resembling an MPEG audio " "syncword at offset %ld", startOffset); } @@ -280,7 +280,7 @@ status_t ElementaryStreamQueue::appendData( #if 0 if (mMode == AAC) { - LOGI("size = %d, timeUs = %.2f secs", size, timeUs / 1E6); + ALOGI("size = %d, timeUs = %.2f secs", size, timeUs / 1E6); hexdump(data, size); } #endif @@ -337,7 +337,7 @@ sp<ABuffer> ElementaryStreamQueue::dequeueAccessUnitAAC() { CHECK(mFormat->findInt32(kKeySampleRate, &sampleRate)); CHECK(mFormat->findInt32(kKeyChannelCount, &numChannels)); - LOGI("found AAC codec config (%d Hz, %d channels)", + ALOGI("found AAC codec config (%d Hz, %d channels)", sampleRate, numChannels); } else { // profile_ObjectType, sampling_frequency_index, private_bits, @@ -408,7 +408,7 @@ sp<ABuffer> 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; @@ -714,7 +714,7 @@ sp<ABuffer> ElementaryStreamQueue::dequeueAccessUnitMPEGVideo() { mFormat->setInt32(kKeyWidth, width); mFormat->setInt32(kKeyHeight, height); - LOGI("found MPEG2 video codec config (%d x %d)", width, height); + ALOGI("found MPEG2 video codec config (%d x %d)", width, height); sp<ABuffer> csd = new ABuffer(offset); memcpy(csd->data(), data, offset); @@ -880,7 +880,7 @@ sp<ABuffer> ElementaryStreamQueue::dequeueAccessUnitMPEG4Video() { mFormat->setInt32(kKeyWidth, width); mFormat->setInt32(kKeyHeight, height); - LOGI("found MPEG4 video codec config (%d x %d)", + ALOGI("found MPEG4 video codec config (%d x %d)", width, height); sp<ABuffer> csd = new ABuffer(offset); diff --git a/media/libstagefright/mpeg2ts/MPEG2PSExtractor.cpp b/media/libstagefright/mpeg2ts/MPEG2PSExtractor.cpp index df30a9c..dd714c9 100644 --- a/media/libstagefright/mpeg2ts/MPEG2PSExtractor.cpp +++ b/media/libstagefright/mpeg2ts/MPEG2PSExtractor.cpp @@ -315,7 +315,7 @@ ssize_t MPEG2PSExtractor::dequeuePES() { unsigned descriptor_tag = br.getBits(8); unsigned descriptor_length = br.getBits(8); - LOGI("found descriptor tag 0x%02x of length %u", + ALOGI("found descriptor tag 0x%02x of length %u", descriptor_tag, descriptor_length); if (offset + 2 + descriptor_length > program_stream_info_length) { @@ -338,7 +338,7 @@ ssize_t MPEG2PSExtractor::dequeuePES() { unsigned stream_type = br.getBits(8); unsigned elementary_stream_id = br.getBits(8); - LOGI("elementary stream id 0x%02x has stream type 0x%02x", + ALOGI("elementary stream id 0x%02x has stream type 0x%02x", elementary_stream_id, stream_type); mStreamTypeByESID.add(elementary_stream_id, stream_type); @@ -409,7 +409,7 @@ ssize_t MPEG2PSExtractor::dequeuePES() { CHECK_EQ(br.getBits(1), 1u); ALOGV("PTS = %llu", PTS); - // LOGI("PTS = %.2f secs", PTS / 90000.0f); + // ALOGI("PTS = %.2f secs", PTS / 90000.0f); optional_bytes_remaining -= 5; @@ -471,7 +471,7 @@ ssize_t MPEG2PSExtractor::dequeuePES() { PES_packet_length - 3 - PES_header_data_length; if (br.numBitsLeft() < dataLength * 8) { - LOGE("PES packet does not carry enough data to contain " + ALOGE("PES packet does not carry enough data to contain " "payload. (numBitsLeft = %d, required = %d)", br.numBitsLeft(), dataLength * 8); @@ -568,7 +568,7 @@ MPEG2PSExtractor::Track::Track( if (supported) { mQueue = new ElementaryStreamQueue(mode); } else { - LOGI("unsupported stream ID 0x%02x", stream_id); + ALOGI("unsupported stream ID 0x%02x", stream_id); } } diff --git a/media/libstagefright/mpeg2ts/MPEG2TSExtractor.cpp b/media/libstagefright/mpeg2ts/MPEG2TSExtractor.cpp index 17cf45a..03033f5 100644 --- a/media/libstagefright/mpeg2ts/MPEG2TSExtractor.cpp +++ b/media/libstagefright/mpeg2ts/MPEG2TSExtractor.cpp @@ -199,7 +199,7 @@ void MPEG2TSExtractor::init() { } } - LOGI("haveAudio=%d, haveVideo=%d", haveAudio, haveVideo); + ALOGI("haveAudio=%d, haveVideo=%d", haveAudio, haveVideo); } status_t MPEG2TSExtractor::feedMore() { diff --git a/media/libstagefright/omx/OMXMaster.cpp b/media/libstagefright/omx/OMXMaster.cpp index c8278ab..d698939 100644 --- a/media/libstagefright/omx/OMXMaster.cpp +++ b/media/libstagefright/omx/OMXMaster.cpp @@ -81,7 +81,7 @@ void OMXMaster::addPlugin(OMXPluginBase *plugin) { String8 name8(name); if (mPluginByComponentName.indexOfKey(name8) >= 0) { - LOGE("A component of name '%s' already exists, ignoring this one.", + ALOGE("A component of name '%s' already exists, ignoring this one.", name8.string()); continue; @@ -91,7 +91,7 @@ void OMXMaster::addPlugin(OMXPluginBase *plugin) { } if (err != OMX_ErrorNoMore) { - LOGE("OMX plugin failed w/ error 0x%08x after registering %d " + ALOGE("OMX plugin failed w/ error 0x%08x after registering %d " "components", err, mPluginByComponentName.size()); } } diff --git a/media/libstagefright/omx/OMXNodeInstance.cpp b/media/libstagefright/omx/OMXNodeInstance.cpp index 802c429..8938e33 100644 --- a/media/libstagefright/omx/OMXNodeInstance.cpp +++ b/media/libstagefright/omx/OMXNodeInstance.cpp @@ -150,7 +150,7 @@ status_t OMXNodeInstance::freeNode(OMXMaster *master) { && state != OMX_StateIdle && state != OMX_StateInvalid) { if (++iteration > kMaxNumIterations) { - LOGE("component failed to enter Idle state, aborting."); + ALOGE("component failed to enter Idle state, aborting."); state = OMX_StateInvalid; break; } @@ -179,7 +179,7 @@ status_t OMXNodeInstance::freeNode(OMXMaster *master) { && state != OMX_StateLoaded && state != OMX_StateInvalid) { if (++iteration > kMaxNumIterations) { - LOGE("component failed to enter Loaded state, aborting."); + ALOGE("component failed to enter Loaded state, aborting."); state = OMX_StateInvalid; break; } @@ -209,7 +209,7 @@ status_t OMXNodeInstance::freeNode(OMXMaster *master) { mHandle = NULL; if (err != OMX_ErrorNone) { - LOGE("FreeHandle FAILED with error 0x%08x.", err); + ALOGE("FreeHandle FAILED with error 0x%08x.", err); } mOwner->invalidateNodeID(mNodeID); @@ -285,7 +285,7 @@ status_t OMXNodeInstance::enableGraphicBuffers( &index); if (err != OMX_ErrorNone) { - LOGE("OMX_GetExtensionIndex failed"); + ALOGE("OMX_GetExtensionIndex failed"); return StatusFromOMXError(err); } @@ -302,7 +302,7 @@ status_t OMXNodeInstance::enableGraphicBuffers( err = OMX_SetParameter(mHandle, index, ¶ms); if (err != OMX_ErrorNone) { - LOGE("OMX_EnableAndroidNativeBuffers failed with error %d (0x%08x)", + ALOGE("OMX_EnableAndroidNativeBuffers failed with error %d (0x%08x)", err, err); return UNKNOWN_ERROR; @@ -323,7 +323,7 @@ status_t OMXNodeInstance::getGraphicBufferUsage( &index); if (err != OMX_ErrorNone) { - LOGE("OMX_GetExtensionIndex failed"); + ALOGE("OMX_GetExtensionIndex failed"); return StatusFromOMXError(err); } @@ -340,7 +340,7 @@ status_t OMXNodeInstance::getGraphicBufferUsage( err = OMX_GetParameter(mHandle, index, ¶ms); if (err != OMX_ErrorNone) { - LOGE("OMX_GetAndroidNativeBufferUsage failed with error %d (0x%08x)", + ALOGE("OMX_GetAndroidNativeBufferUsage failed with error %d (0x%08x)", err, err); return UNKNOWN_ERROR; } @@ -361,7 +361,7 @@ status_t OMXNodeInstance::storeMetaDataInBuffers( OMX_ERRORTYPE err = OMX_GetExtensionIndex(mHandle, name, &index); if (err != OMX_ErrorNone) { - LOGE("OMX_GetExtensionIndex %s failed", name); + ALOGE("OMX_GetExtensionIndex %s failed", name); return StatusFromOMXError(err); } @@ -375,7 +375,7 @@ status_t OMXNodeInstance::storeMetaDataInBuffers( params.nPortIndex = portIndex; params.bStoreMetaData = enable; if ((err = OMX_SetParameter(mHandle, index, ¶ms)) != OMX_ErrorNone) { - LOGE("OMX_SetParameter() failed for StoreMetaDataInBuffers: 0x%08x", err); + ALOGE("OMX_SetParameter() failed for StoreMetaDataInBuffers: 0x%08x", err); return UNKNOWN_ERROR; } return err; @@ -395,7 +395,7 @@ status_t OMXNodeInstance::useBuffer( params->size(), static_cast<OMX_U8 *>(params->pointer())); if (err != OMX_ErrorNone) { - LOGE("OMX_UseBuffer failed with error %d (0x%08x)", err, err); + ALOGE("OMX_UseBuffer failed with error %d (0x%08x)", err, err); delete buffer_meta; buffer_meta = NULL; @@ -429,7 +429,7 @@ status_t OMXNodeInstance::useGraphicBuffer2_l( OMX_ERRORTYPE err = OMX_GetParameter(mHandle, OMX_IndexParamPortDefinition, &def); if (err != OMX_ErrorNone) { - LOGE("%s::%d:Error getting OMX_IndexParamPortDefinition", __FUNCTION__, __LINE__); + ALOGE("%s::%d:Error getting OMX_IndexParamPortDefinition", __FUNCTION__, __LINE__); return err; } @@ -448,7 +448,7 @@ status_t OMXNodeInstance::useGraphicBuffer2_l( bufferHandle); if (err != OMX_ErrorNone) { - LOGE("OMX_UseBuffer failed with error %d (0x%08x)", err, err); + ALOGE("OMX_UseBuffer failed with error %d (0x%08x)", err, err); delete bufferMeta; bufferMeta = NULL; *buffer = 0; @@ -488,7 +488,7 @@ status_t OMXNodeInstance::useGraphicBuffer( &index); if (err != OMX_ErrorNone) { - LOGE("OMX_GetExtensionIndex failed"); + ALOGE("OMX_GetExtensionIndex failed"); return StatusFromOMXError(err); } @@ -510,7 +510,7 @@ status_t OMXNodeInstance::useGraphicBuffer( err = OMX_SetParameter(mHandle, index, ¶ms); if (err != OMX_ErrorNone) { - LOGE("OMX_UseAndroidNativeBuffer failed with error %d (0x%08x)", err, + ALOGE("OMX_UseAndroidNativeBuffer failed with error %d (0x%08x)", err, err); delete bufferMeta; @@ -543,7 +543,7 @@ status_t OMXNodeInstance::allocateBuffer( mHandle, &header, portIndex, buffer_meta, size); if (err != OMX_ErrorNone) { - LOGE("OMX_AllocateBuffer failed with error %d (0x%08x)", err, err); + ALOGE("OMX_AllocateBuffer failed with error %d (0x%08x)", err, err); delete buffer_meta; buffer_meta = NULL; @@ -576,7 +576,7 @@ status_t OMXNodeInstance::allocateBufferWithBackup( mHandle, &header, portIndex, buffer_meta, params->size()); if (err != OMX_ErrorNone) { - LOGE("OMX_AllocateBuffer failed with error %d (0x%08x)", err, err); + ALOGE("OMX_AllocateBuffer failed with error %d (0x%08x)", err, err); delete buffer_meta; buffer_meta = NULL; @@ -672,7 +672,7 @@ void OMXNodeInstance::onMessage(const omx_message &msg) { } void OMXNodeInstance::onObserverDied(OMXMaster *master) { - LOGE("!!! Observer died. Quickly, do something, ... anything..."); + ALOGE("!!! Observer died. Quickly, do something, ... anything..."); // Try to force shutdown of the node and hope for the best. freeNode(master); @@ -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/omx/SoftOMXPlugin.cpp b/media/libstagefright/omx/SoftOMXPlugin.cpp index 8aeb763..da3ae42 100644 --- a/media/libstagefright/omx/SoftOMXPlugin.cpp +++ b/media/libstagefright/omx/SoftOMXPlugin.cpp @@ -72,7 +72,7 @@ OMX_ERRORTYPE SoftOMXPlugin::makeComponentInstance( void *libHandle = dlopen(libName.c_str(), RTLD_NOW); if (libHandle == NULL) { - LOGE("unable to dlopen %s", libName.c_str()); + ALOGE("unable to dlopen %s", libName.c_str()); return OMX_ErrorComponentNotFound; } diff --git a/media/libstagefright/omx/tests/OMXHarness.cpp b/media/libstagefright/omx/tests/OMXHarness.cpp index d4354db..8faf544 100644 --- a/media/libstagefright/omx/tests/OMXHarness.cpp +++ b/media/libstagefright/omx/tests/OMXHarness.cpp @@ -174,7 +174,7 @@ status_t Harness::getPortDefinition( #define EXPECT(condition, info) \ if (!(condition)) { \ - LOGE(info); printf("\n * " info "\n"); return UNKNOWN_ERROR; \ + ALOGE(info); printf("\n * " info "\n"); return UNKNOWN_ERROR; \ } #define EXPECT_SUCCESS(err, info) \ @@ -571,7 +571,7 @@ status_t Harness::testSeek( const char *mime = GetMimeFromComponentRole(componentRole); if (!mime) { - LOGI("Cannot perform seek test with this componentRole (%s)", + ALOGI("Cannot perform seek test with this componentRole (%s)", componentRole); return OK; @@ -597,7 +597,7 @@ status_t Harness::testSeek( int64_t durationUs; CHECK(source->getFormat()->findInt64(kKeyDuration, &durationUs)); - LOGI("stream duration is %lld us (%.2f secs)", + ALOGI("stream duration is %lld us (%.2f secs)", durationUs, durationUs / 1E6); static const int32_t kNumIterations = 5000; @@ -617,19 +617,19 @@ status_t Harness::testSeek( requestedSeekTimeUs = -1; - LOGI("requesting linear read"); + ALOGI("requesting linear read"); } else { if (i == 0 || r < 0.55) { // 5% chance of seeking beyond end of stream. requestedSeekTimeUs = durationUs; - LOGI("requesting seek beyond EOF"); + ALOGI("requesting seek beyond EOF"); } else { requestedSeekTimeUs = (int64_t)(uniform_rand() * durationUs); - LOGI("requesting seek to %lld us (%.2f secs)", + ALOGI("requesting seek to %lld us (%.2f secs)", requestedSeekTimeUs, requestedSeekTimeUs / 1E6); } @@ -649,7 +649,7 @@ status_t Harness::testSeek( buffer = NULL; } - LOGI("nearest keyframe is at %lld us (%.2f secs)", + ALOGI("nearest keyframe is at %lld us (%.2f secs)", actualSeekTimeUs, actualSeekTimeUs / 1E6); } @@ -733,7 +733,7 @@ status_t Harness::testSeek( status_t Harness::test( const char *componentName, const char *componentRole) { printf("testing %s [%s] ... ", componentName, componentRole); - LOGI("testing %s [%s].", componentName, componentRole); + ALOGI("testing %s [%s].", componentName, componentRole); status_t err1 = testStateTransitions(componentName, componentRole); status_t err2 = testSeek(componentName, componentRole); diff --git a/media/libstagefright/rtsp/AMPEG4AudioAssembler.cpp b/media/libstagefright/rtsp/AMPEG4AudioAssembler.cpp index 11d9c22..b0c7007 100644 --- a/media/libstagefright/rtsp/AMPEG4AudioAssembler.cpp +++ b/media/libstagefright/rtsp/AMPEG4AudioAssembler.cpp @@ -196,7 +196,7 @@ static status_t parseAudioSpecificConfig(ABitReader *bits, sp<ABuffer> *asc) { unsigned syncExtensionType = bits->getBits(11); if (syncExtensionType == 0x2b7) { - LOGI("found syncExtension"); + ALOGI("found syncExtension"); CHECK_EQ(parseAudioObjectType(bits, &extensionAudioObjectType), (status_t)OK); @@ -217,7 +217,7 @@ static status_t parseAudioSpecificConfig(ABitReader *bits, sp<ABuffer> *asc) { // Apparently an extension is always considered an even // multiple of 8 bits long. - LOGI("Skipping %d bits after sync extension", + ALOGI("Skipping %d bits after sync extension", 8 - (numBitsInExtension & 7)); bits->skipBits(8 - (numBitsInExtension & 7)); @@ -424,7 +424,7 @@ sp<ABuffer> AMPEG4AudioAssembler::removeLATMFraming(const sp<ABuffer> &buffer) { } if (offset < buffer->size()) { - LOGI("ignoring %d bytes of trailing data", buffer->size() - offset); + ALOGI("ignoring %d bytes of trailing data", buffer->size() - offset); } CHECK_LE(offset, buffer->size()); diff --git a/media/libstagefright/rtsp/APacketSource.cpp b/media/libstagefright/rtsp/APacketSource.cpp index 3f4cdb5..6cf1301 100644 --- a/media/libstagefright/rtsp/APacketSource.cpp +++ b/media/libstagefright/rtsp/APacketSource.cpp @@ -193,7 +193,7 @@ static sp<ABuffer> MakeAVCCodecSpecificData( if (i == 0) { FindAVCDimensions(nal, width, height); - LOGI("dimensions %dx%d", *width, *height); + ALOGI("dimensions %dx%d", *width, *height); } } @@ -371,7 +371,7 @@ static sp<ABuffer> MakeMPEG4VideoCodecSpecificData( return NULL; } - LOGI("VOL dimensions = %dx%d", *width, *height); + ALOGI("VOL dimensions = %dx%d", *width, *height); size_t len1 = config->size() + GetSizeWidth(config->size()) + 1; size_t len2 = len1 + GetSizeWidth(len1) + 1 + 13; diff --git a/media/libstagefright/rtsp/ARTPConnection.cpp b/media/libstagefright/rtsp/ARTPConnection.cpp index c5d8740..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); @@ -396,7 +396,7 @@ status_t ARTPConnection::receive(StreamInfo *s, bool receiveRTP) { buffer->setRange(0, nbytes); - // LOGI("received %d bytes.", buffer->size()); + // ALOGI("received %d bytes.", buffer->size()); status_t err; if (receiveRTP) { @@ -561,7 +561,7 @@ status_t ARTPConnection::parseRTCP(StreamInfo *s, const sp<ABuffer> &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; } @@ -606,7 +606,7 @@ status_t ARTPConnection::parseSR( uint32_t rtpTime = u32at(&data[16]); #if 0 - LOGI("XXX timeUpdate: ssrc=0x%08x, rtpTime %u == ntpTime %.3f", + ALOGI("XXX timeUpdate: ssrc=0x%08x, rtpTime %u == ntpTime %.3f", id, rtpTime, (ntpTime >> 32) + (double)(ntpTime & 0xffffffff) / (1ll << 32)); diff --git a/media/libstagefright/rtsp/ARTPSession.cpp b/media/libstagefright/rtsp/ARTPSession.cpp index c6bcb12..7a05b88 100644 --- a/media/libstagefright/rtsp/ARTPSession.cpp +++ b/media/libstagefright/rtsp/ARTPSession.cpp @@ -53,24 +53,24 @@ status_t ARTPSession::setup(const sp<ASessionDescription> &desc) { if (!mDesc->findAttribute(i, "c=", &connection)) { // No per-stream connection information, try global fallback. if (!mDesc->findAttribute(0, "c=", &connection)) { - LOGE("Unable to find connection attribute."); + ALOGE("Unable to find connection attribute."); return mInitCheck; } } if (!(connection == "IN IP4 127.0.0.1")) { - LOGE("We only support localhost connections for now."); + ALOGE("We only support localhost connections for now."); return mInitCheck; } unsigned port; if (!validateMediaFormat(i, &port) || (port & 1) != 0) { - LOGE("Invalid media format."); + ALOGE("Invalid media format."); return mInitCheck; } sp<APacketSource> source = new APacketSource(mDesc, i); if (source->initCheck() != OK) { - LOGE("Unsupported format."); + ALOGE("Unsupported format."); return mInitCheck; } @@ -159,7 +159,7 @@ void ARTPSession::onMessageReceived(const sp<AMessage> &msg) { printf("access unit complete size=%d\tntp-time=0x%016llx\n", accessUnit->size(), ntpTime); #else - LOGI("access unit complete, size=%d, ntp-time=%llu", + ALOGI("access unit complete, size=%d, ntp-time=%llu", accessUnit->size(), ntpTime); hexdump(accessUnit->data(), accessUnit->size()); #endif @@ -170,7 +170,7 @@ void ARTPSession::onMessageReceived(const sp<AMessage> &msg) { CHECK(!memcmp("\x00\x00\x00\x01", accessUnit->data(), 4)); unsigned x = accessUnit->data()[4]; - LOGI("access unit complete: nalType=0x%02x, nalRefIdc=0x%02x", + ALOGI("access unit complete: nalType=0x%02x, nalRefIdc=0x%02x", x & 0x1f, (x & 0x60) >> 5); #endif @@ -181,7 +181,7 @@ void ARTPSession::onMessageReceived(const sp<AMessage> &msg) { int32_t damaged; if (accessUnit->meta()->findInt32("damaged", &damaged) && damaged != 0) { - LOGI("ignoring damaged AU"); + ALOGI("ignoring damaged AU"); } else #endif { 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<ABuffer> &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<ABuffer> &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<ABuffer> &buffer) { void ARTPSource::addReceiverReport(const sp<ABuffer> &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/ARTPWriter.cpp b/media/libstagefright/rtsp/ARTPWriter.cpp index b602511..0d07043 100644 --- a/media/libstagefright/rtsp/ARTPWriter.cpp +++ b/media/libstagefright/rtsp/ARTPWriter.cpp @@ -269,7 +269,7 @@ void ARTPWriter::onRead(const sp<AMessage> &msg) { status_t err = mSource->read(&mediaBuf); if (err != OK) { - LOGI("reached EOS."); + ALOGI("reached EOS."); Mutex::Autolock autoLock(mLock); mFlags |= kFlagEOS; @@ -520,7 +520,7 @@ void ARTPWriter::dumpSessionDesc() { sdp.append("a=fmtp:" PT_STR " octed-align\r\n"); } - LOGI("%s", sdp.c_str()); + ALOGI("%s", sdp.c_str()); } void ARTPWriter::makeH264SPropParamSets(MediaBuffer *buffer) { diff --git a/media/libstagefright/rtsp/ARTSPConnection.cpp b/media/libstagefright/rtsp/ARTSPConnection.cpp index d8107bc..80a010e 100644 --- a/media/libstagefright/rtsp/ARTSPConnection.cpp +++ b/media/libstagefright/rtsp/ARTSPConnection.cpp @@ -55,7 +55,7 @@ ARTSPConnection::ARTSPConnection(bool uidValid, uid_t uid) ARTSPConnection::~ARTSPConnection() { if (mSocket >= 0) { - LOGE("Connection is still open, closing the socket."); + ALOGE("Connection is still open, closing the socket."); if (mUIDValid) { HTTPBase::UnRegisterSocketUserTag(mSocket); } @@ -235,7 +235,7 @@ void ARTSPConnection::onConnect(const sp<AMessage> &msg) { // right here, since we currently have no way of asking the user // for this information. - LOGE("Malformed rtsp url %s", url.c_str()); + ALOGE("Malformed rtsp url %s", url.c_str()); reply->setInt32("result", ERROR_MALFORMED); reply->post(); @@ -250,7 +250,7 @@ void ARTSPConnection::onConnect(const sp<AMessage> &msg) { struct hostent *ent = gethostbyname(host.c_str()); if (ent == NULL) { - LOGE("Unknown host %s", host.c_str()); + ALOGE("Unknown host %s", host.c_str()); reply->setInt32("result", -ENOENT); reply->post(); @@ -376,7 +376,7 @@ void ARTSPConnection::onCompleteConnection(const sp<AMessage> &msg) { CHECK_EQ(optionLen, (socklen_t)sizeof(err)); if (err != 0) { - LOGE("err = %d (%s)", err, strerror(err)); + ALOGE("err = %d (%s)", err, strerror(err)); reply->setInt32("result", -err); @@ -446,12 +446,12 @@ void ARTSPConnection::onSendRequest(const sp<AMessage> &msg) { if (n == 0) { // Server closed the connection. - LOGE("Server unexpectedly closed the connection."); + ALOGE("Server unexpectedly closed the connection."); reply->setInt32("result", ERROR_IO); reply->post(); } else { - LOGE("Error sending rtsp request. (%s)", strerror(errno)); + ALOGE("Error sending rtsp request. (%s)", strerror(errno)); reply->setInt32("result", -errno); reply->post(); } @@ -536,10 +536,10 @@ status_t ARTSPConnection::receive(void *data, size_t size) { if (n == 0) { // Server closed the connection. - LOGE("Server unexpectedly closed the connection."); + ALOGE("Server unexpectedly closed the connection."); return ERROR_IO; } else { - LOGE("Error reading rtsp response. (%s)", strerror(errno)); + ALOGE("Error reading rtsp response. (%s)", strerror(errno)); return -errno; } } @@ -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; @@ -624,7 +624,7 @@ bool ARTSPConnection::receiveRTSPReponse() { sp<ARTSPResponse> response = new ARTSPResponse; response->mStatusLine = statusLine; - LOGI("status: %s", response->mStatusLine.c_str()); + ALOGI("status: %s", response->mStatusLine.c_str()); ssize_t space1 = response->mStatusLine.find(" "); if (space1 < 0) { @@ -740,7 +740,7 @@ bool ARTSPConnection::receiveRTSPReponse() { msg->setMessage("reply", reply); msg->setString("request", request.c_str(), request.size()); - LOGI("re-sending request with authentication headers..."); + ALOGI("re-sending request with authentication headers..."); onSendRequest(msg); return true; @@ -793,9 +793,9 @@ bool ARTSPConnection::handleServerRequest(const sp<ARTSPResponse> &request) { if (n <= 0) { if (n == 0) { // Server closed the connection. - LOGE("Server unexpectedly closed the connection."); + ALOGE("Server unexpectedly closed the connection."); } else { - LOGE("Error sending rtsp response (%s).", strerror(errno)); + ALOGE("Error sending rtsp response (%s).", strerror(errno)); } performDisconnect(); diff --git a/media/libstagefright/rtsp/ASessionDescription.cpp b/media/libstagefright/rtsp/ASessionDescription.cpp index 56fdd9d..a9b3330 100644 --- a/media/libstagefright/rtsp/ASessionDescription.cpp +++ b/media/libstagefright/rtsp/ASessionDescription.cpp @@ -80,7 +80,7 @@ bool ASessionDescription::parse(const void *data, size_t size) { return false; } - LOGI("%s", line.c_str()); + ALOGI("%s", line.c_str()); switch (line.c_str()[0]) { case 'v': diff --git a/media/libstagefright/rtsp/MyHandler.h b/media/libstagefright/rtsp/MyHandler.h index 21ef298..2391c5c 100644 --- a/media/libstagefright/rtsp/MyHandler.h +++ b/media/libstagefright/rtsp/MyHandler.h @@ -155,7 +155,7 @@ struct MyHandler : public AHandler { mSessionURL.append(StringPrintf("%u", port)); mSessionURL.append(path); - LOGI("rewritten session url: '%s'", mSessionURL.c_str()); + ALOGI("rewritten session url: '%s'", mSessionURL.c_str()); } mSessionHost = host; @@ -264,12 +264,12 @@ 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()); if (ent == NULL) { - LOGE("Failed to look up address of session host '%s'", + ALOGE("Failed to look up address of session host '%s'", mSessionHost.c_str()); return false; @@ -283,7 +283,7 @@ struct MyHandler : public AHandler { if (!GetAttribute(transport.c_str(), "server_port", &server_port)) { - LOGI("Missing 'server_port' field in Transport response."); + ALOGI("Missing 'server_port' field in Transport response."); return false; } @@ -292,7 +292,7 @@ struct MyHandler : public AHandler { || rtpPort <= 0 || rtpPort > 65535 || rtcpPort <=0 || rtcpPort > 65535 || rtcpPort != rtpPort + 1) { - LOGE("Server picked invalid RTP/RTCP port pair %s," + ALOGE("Server picked invalid RTP/RTCP port pair %s," " RTP port must be even, RTCP port must be one higher.", server_port.c_str()); @@ -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."); } @@ -327,7 +327,7 @@ struct MyHandler : public AHandler { (const sockaddr *)&addr, sizeof(addr)); if (n < (ssize_t)buf->size()) { - LOGE("failed to poke a hole for RTP packets"); + ALOGE("failed to poke a hole for RTP packets"); return false; } @@ -338,7 +338,7 @@ struct MyHandler : public AHandler { (const sockaddr *)&addr, sizeof(addr)); if (n < (ssize_t)buf->size()) { - LOGE("failed to poke a hole for RTCP packets"); + ALOGE("failed to poke a hole for RTCP packets"); return false; } @@ -354,7 +354,7 @@ struct MyHandler : public AHandler { int32_t result; CHECK(msg->findInt32("result", &result)); - LOGI("connection request completed with result %d (%s)", + ALOGI("connection request completed with result %d (%s)", result, strerror(-result)); if (result == OK) { @@ -392,7 +392,7 @@ struct MyHandler : public AHandler { int32_t result; CHECK(msg->findInt32("result", &result)); - LOGI("DESCRIBE completed with result %d (%s)", + ALOGI("DESCRIBE completed with result %d (%s)", result, strerror(-result)); if (result == OK) { @@ -429,7 +429,7 @@ struct MyHandler : public AHandler { response->mContent->size()); if (!mSessionDesc->isValid()) { - LOGE("Failed to parse session description."); + ALOGE("Failed to parse session description."); result = ERROR_MALFORMED; } else { ssize_t i = response->mHeaders.indexOfKey("content-base"); @@ -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 { @@ -499,7 +499,7 @@ struct MyHandler : public AHandler { int32_t result; CHECK(msg->findInt32("result", &result)); - LOGI("SETUP(%d) completed with result %d (%s)", + ALOGI("SETUP(%d) completed with result %d (%s)", index, result, strerror(-result)); if (result == OK) { @@ -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); @@ -540,7 +540,7 @@ struct MyHandler : public AHandler { } else { mKeepAliveTimeoutUs = timeoutSecs * 1000000ll; - LOGI("server specified timeout of %lu secs.", + ALOGI("server specified timeout of %lu secs.", timeoutSecs); } } @@ -625,7 +625,7 @@ struct MyHandler : public AHandler { int32_t result; CHECK(msg->findInt32("result", &result)); - LOGI("PLAY completed with result %d (%s)", + ALOGI("PLAY completed with result %d (%s)", result, strerror(-result)); if (result == OK) { @@ -682,7 +682,7 @@ struct MyHandler : public AHandler { int32_t result; CHECK(msg->findInt32("result", &result)); - LOGI("OPTIONS completed with result %d (%s)", + ALOGI("OPTIONS completed with result %d (%s)", result, strerror(-result)); int32_t generation; @@ -759,7 +759,7 @@ struct MyHandler : public AHandler { int32_t result; CHECK(msg->findInt32("result", &result)); - LOGI("TEARDOWN completed with result %d (%s)", + ALOGI("TEARDOWN completed with result %d (%s)", result, strerror(-result)); sp<AMessage> reply = new AMessage('disc', id()); @@ -793,11 +793,11 @@ struct MyHandler : public AHandler { if (mNumAccessUnitsReceived == 0) { #if 1 - LOGI("stream ended? aborting."); + ALOGI("stream ended? aborting."); (new AMessage('abor', id()))->post(); break; #else - LOGI("haven't seen an AU in a looong time."); + ALOGI("haven't seen an AU in a looong time."); #endif } @@ -848,7 +848,7 @@ struct MyHandler : public AHandler { int32_t eos; if (msg->findInt32("eos", &eos)) { - LOGI("received BYE on track index %d", trackIndex); + ALOGI("received BYE on track index %d", trackIndex); #if 0 track->mPacketSource->signalEOS(ERROR_END_OF_STREAM); #endif @@ -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<AMessage> msg = mNotify->dup(); msg->setInt32("what", kWhatSeekDone); @@ -961,7 +961,7 @@ struct MyHandler : public AHandler { int32_t result; CHECK(msg->findInt32("result", &result)); - LOGI("PLAY completed with result %d (%s)", + ALOGI("PLAY completed with result %d (%s)", result, strerror(-result)); mCheckPending = false; @@ -983,12 +983,12 @@ struct MyHandler : public AHandler { ALOGV("rtp-info: %s", response->mHeaders.valueAt(i).c_str()); - LOGI("seek completed."); + ALOGI("seek completed."); } } if (result != OK) { - LOGE("seek failed, aborting."); + ALOGE("seek failed, aborting."); (new AMessage('abor', id()))->post(); } @@ -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(); } } @@ -1101,7 +1101,7 @@ struct MyHandler : public AHandler { if (!ASessionDescription::parseNTPRange(val.c_str(), &npt1, &npt2)) { // This is a live stream and therefore not seekable. - LOGI("This is a live stream"); + ALOGI("This is a live stream"); return; } @@ -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<AMessage> reply = new AMessage('setu', id()); reply->setSize("index", index); diff --git a/media/libstagefright/rtsp/UDPPusher.cpp b/media/libstagefright/rtsp/UDPPusher.cpp index 576b3ca..47ea6f1 100644 --- a/media/libstagefright/rtsp/UDPPusher.cpp +++ b/media/libstagefright/rtsp/UDPPusher.cpp @@ -71,7 +71,7 @@ void UDPPusher::start() { bool UDPPusher::onPush() { uint32_t length; if (fread(&length, 1, sizeof(length), mFile) < sizeof(length)) { - LOGI("No more data to push."); + ALOGI("No more data to push."); return false; } @@ -81,7 +81,7 @@ bool UDPPusher::onPush() { sp<ABuffer> buffer = new ABuffer(length); if (fread(buffer->data(), 1, length, mFile) < length) { - LOGE("File truncated?."); + ALOGE("File truncated?."); return false; } @@ -93,7 +93,7 @@ bool UDPPusher::onPush() { uint32_t timeMs; if (fread(&timeMs, 1, sizeof(timeMs), mFile) < sizeof(timeMs)) { - LOGI("No more data to push."); + ALOGI("No more data to push."); return false; } @@ -113,7 +113,7 @@ void UDPPusher::onMessageReceived(const sp<AMessage> &msg) { case kWhatPush: { if (!onPush() && !(ntohs(mRemoteAddr.sin_port) & 1)) { - LOGI("emulating BYE packet"); + ALOGI("emulating BYE packet"); sp<ABuffer> buffer = new ABuffer(8); uint8_t *data = buffer->data(); diff --git a/media/libstagefright/rtsp/rtp_test.cpp b/media/libstagefright/rtsp/rtp_test.cpp index f0cb5a5..d43cd2a 100644 --- a/media/libstagefright/rtsp/rtp_test.cpp +++ b/media/libstagefright/rtsp/rtp_test.cpp @@ -204,7 +204,7 @@ int main(int argc, char **argv) { continue; } - LOGE("decoder returned error 0x%08x", err); + ALOGE("decoder returned error 0x%08x", err); break; } diff --git a/media/libstagefright/tests/DummyRecorder.cpp b/media/libstagefright/tests/DummyRecorder.cpp index fbb606d..ac37b28 100644 --- a/media/libstagefright/tests/DummyRecorder.cpp +++ b/media/libstagefright/tests/DummyRecorder.cpp @@ -47,7 +47,7 @@ status_t DummyRecorder::start() { pthread_attr_destroy(&attr); if (err) { - LOGE("Error creating thread!"); + ALOGE("Error creating thread!"); return -ENODEV; } return OK; diff --git a/media/libstagefright/tests/SurfaceMediaSource_test.cpp b/media/libstagefright/tests/SurfaceMediaSource_test.cpp index 6be5e9a..76b507f 100644 --- a/media/libstagefright/tests/SurfaceMediaSource_test.cpp +++ b/media/libstagefright/tests/SurfaceMediaSource_test.cpp @@ -731,7 +731,7 @@ TEST_F(SurfaceMediaSourceTest, DISABLED_EncodingFromCpuYV12BufferNpotWriteMediaS const char *fileName = "/sdcard/outputSurfEncMSource.mp4"; int fd = open(fileName, O_RDWR | O_CREAT, 0744); if (fd < 0) { - LOGE("ERROR: Could not open the the file %s, fd = %d !!", fileName, fd); + ALOGE("ERROR: Could not open the the file %s, fd = %d !!", fileName, fd); } CHECK(fd >= 0); @@ -861,7 +861,7 @@ TEST_F(SurfaceMediaSourceGLTest, EncodingFromGLRgbaSameImageEachBufNpotWrite) { const char *fileName = "/sdcard/outputSurfEncMSourceGL.mp4"; int fd = open(fileName, O_RDWR | O_CREAT, 0744); if (fd < 0) { - LOGE("ERROR: Could not open the the file %s, fd = %d !!", fileName, fd); + ALOGE("ERROR: Could not open the the file %s, fd = %d !!", fileName, fd); } CHECK(fd >= 0); @@ -904,7 +904,7 @@ TEST_F(SurfaceMediaSourceGLTest, EncodingFromGLRgbaDiffImageEachBufNpotWrite) { const char *fileName = "/sdcard/outputSurfEncMSourceGLDiff.mp4"; int fd = open(fileName, O_RDWR | O_CREAT, 0744); if (fd < 0) { - LOGE("ERROR: Could not open the the file %s, fd = %d !!", fileName, fd); + ALOGE("ERROR: Could not open the the file %s, fd = %d !!", fileName, fd); } CHECK(fd >= 0); diff --git a/media/libstagefright/timedtext/TimedTextPlayer.cpp b/media/libstagefright/timedtext/TimedTextPlayer.cpp index 7c8a747..3014b0b 100644 --- a/media/libstagefright/timedtext/TimedTextPlayer.cpp +++ b/media/libstagefright/timedtext/TimedTextPlayer.cpp @@ -91,7 +91,7 @@ status_t TimedTextPlayer::start(uint8_t index) { if (index >= mTextTrackVector.size() + mTextOutOfBandVector.size()) { - LOGE("Incorrect text track index: %d", index); + ALOGE("Incorrect text track index: %d", index); return BAD_VALUE; } diff --git a/media/libstagefright/yuv/YUVImage.cpp b/media/libstagefright/yuv/YUVImage.cpp index b712062..0d67c96 100644 --- a/media/libstagefright/yuv/YUVImage.cpp +++ b/media/libstagefright/yuv/YUVImage.cpp @@ -54,7 +54,7 @@ size_t YUVImage::bufferSize(YUVFormat yuvFormat, int32_t width, int32_t height) // Y takes numberOfPixels bytes and U/V take numberOfPixels/4 bytes each. numberOfBytes = (size_t)(numberOfPixels + (numberOfPixels >> 1)); } else { - LOGE("Format not supported"); + ALOGE("Format not supported"); } return numberOfBytes; } @@ -74,7 +74,7 @@ bool YUVImage::initializeYUVPointers() { mVdata = mYdata + numberOfPixels; mUdata = mVdata + 1; } else { - LOGE("Format not supported"); + ALOGE("Format not supported"); return false; } return true; @@ -98,7 +98,7 @@ bool YUVImage::getOffsets(int32_t x, int32_t y, *uOffset = 2*uvOffset; *vOffset = 2*uvOffset; } else { - LOGE("Format not supported"); + ALOGE("Format not supported"); return false; } @@ -122,7 +122,7 @@ bool YUVImage::getOffsetIncrementsPerDataRow( *uDataOffsetIncrement = 2*uvDataOffsetIncrement; *vDataOffsetIncrement = 2*uvDataOffsetIncrement; } else { - LOGE("Format not supported"); + ALOGE("Format not supported"); return false; } diff --git a/media/mediaserver/main_mediaserver.cpp b/media/mediaserver/main_mediaserver.cpp index 54e77ef..1520c01 100644 --- a/media/mediaserver/main_mediaserver.cpp +++ b/media/mediaserver/main_mediaserver.cpp @@ -33,7 +33,7 @@ int main(int argc, char** argv) { sp<ProcessState> proc(ProcessState::self()); sp<IServiceManager> sm = defaultServiceManager(); - LOGI("ServiceManager: %p", sm.get()); + ALOGI("ServiceManager: %p", sm.get()); AudioFlinger::instantiate(); MediaPlayerService::instantiate(); CameraService::instantiate(); diff --git a/media/mtp/MtpDataPacket.cpp b/media/mtp/MtpDataPacket.cpp index cfea7e8..930f0b0 100644 --- a/media/mtp/MtpDataPacket.cpp +++ b/media/mtp/MtpDataPacket.cpp @@ -418,7 +418,7 @@ int MtpDataPacket::readData(struct usb_request *request, void* buffer, int lengt // Queue a read request. Call readDataWait to wait for result int MtpDataPacket::readDataAsync(struct usb_request *req) { if (usb_request_queue(req)) { - LOGE("usb_endpoint_queue failed, errno: %d", errno); + ALOGE("usb_endpoint_queue failed, errno: %d", errno); return -1; } return 0; diff --git a/media/mtp/MtpDevice.cpp b/media/mtp/MtpDevice.cpp index b370225..bf7795c 100644 --- a/media/mtp/MtpDevice.cpp +++ b/media/mtp/MtpDevice.cpp @@ -53,7 +53,7 @@ static bool isMtpDevice(uint16_t vendor, uint16_t product) { MtpDevice* MtpDevice::open(const char* deviceName, int fd) { struct usb_device *device = usb_device_new(deviceName, fd); if (!device) { - LOGE("usb_device_new failed for %s", deviceName); + ALOGE("usb_device_new failed for %s", deviceName); return NULL; } @@ -134,7 +134,7 @@ MtpDevice* MtpDevice::open(const char* deviceName, int fd) { for (int i = 0; i < 3; i++) { ep = (struct usb_endpoint_descriptor *)usb_descriptor_iter_next(&iter); if (!ep || ep->bDescriptorType != USB_DT_ENDPOINT) { - LOGE("endpoints not found\n"); + ALOGE("endpoints not found\n"); usb_device_close(device); return NULL; } @@ -149,13 +149,13 @@ MtpDevice* MtpDevice::open(const char* deviceName, int fd) { } } if (!ep_in_desc || !ep_out_desc || !ep_intr_desc) { - LOGE("endpoints not found\n"); + ALOGE("endpoints not found\n"); usb_device_close(device); return NULL; } if (usb_device_claim_interface(device, interface->bInterfaceNumber)) { - LOGE("usb_device_claim_interface failed errno: %d\n", errno); + ALOGE("usb_device_claim_interface failed errno: %d\n", errno); usb_device_close(device); return NULL; } @@ -168,7 +168,7 @@ MtpDevice* MtpDevice::open(const char* deviceName, int fd) { } usb_device_close(device); - LOGE("device not found"); + ALOGE("device not found"); return NULL; } @@ -232,7 +232,7 @@ void MtpDevice::print() { mDeviceInfo->print(); if (mDeviceInfo->mDeviceProperties) { - LOGI("***** DEVICE PROPERTIES *****\n"); + ALOGI("***** DEVICE PROPERTIES *****\n"); int count = mDeviceInfo->mDeviceProperties->size(); for (int i = 0; i < count; i++) { MtpDeviceProperty propCode = (*mDeviceInfo->mDeviceProperties)[i]; @@ -246,11 +246,11 @@ void MtpDevice::print() { } if (mDeviceInfo->mPlaybackFormats) { - LOGI("***** OBJECT PROPERTIES *****\n"); + ALOGI("***** OBJECT PROPERTIES *****\n"); int count = mDeviceInfo->mPlaybackFormats->size(); for (int i = 0; i < count; i++) { MtpObjectFormat format = (*mDeviceInfo->mPlaybackFormats)[i]; - LOGI("*** FORMAT: %s\n", MtpDebug::getFormatCodeName(format)); + ALOGI("*** FORMAT: %s\n", MtpDebug::getFormatCodeName(format)); MtpObjectPropertyList* props = getObjectPropsSupported(format); if (props) { for (int j = 0; j < props->size(); j++) { @@ -260,7 +260,7 @@ void MtpDevice::print() { property->print(); delete property; } else { - LOGE("could not fetch property: %s", + ALOGE("could not fetch property: %s", MtpDebug::getObjectPropCodeName(prop)); } } @@ -584,7 +584,7 @@ bool MtpDevice::readObject(MtpObjectHandle handle, && mData.readDataHeader(mRequestIn1)) { uint32_t length = mData.getContainerLength(); if (length - MTP_CONTAINER_HEADER_SIZE != objectSize) { - LOGE("readObject error objectSize: %d, length: %d", + ALOGE("readObject error objectSize: %d, length: %d", objectSize, length); goto fail; } @@ -617,7 +617,7 @@ bool MtpDevice::readObject(MtpObjectHandle handle, // queue up a read request req->buffer_length = (remaining > sizeof(buffer1) ? sizeof(buffer1) : remaining); if (mData.readDataAsync(req)) { - LOGE("readDataAsync failed"); + ALOGE("readDataAsync failed"); goto fail; } } else { @@ -627,7 +627,7 @@ bool MtpDevice::readObject(MtpObjectHandle handle, if (writeBuffer) { // write previous buffer if (!callback(writeBuffer, offset, writeLength, clientData)) { - LOGE("write failed"); + ALOGE("write failed"); // wait for pending read before failing if (req) mData.readDataWait(mDevice); @@ -669,7 +669,7 @@ bool MtpDevice::readObject(MtpObjectHandle handle, const char* destPath, int gro ALOGD("readObject: %s", destPath); int fd = ::open(destPath, O_RDWR | O_CREAT | O_TRUNC); if (fd < 0) { - LOGE("open failed for %s", destPath); + ALOGE("open failed for %s", destPath); return false; } @@ -718,7 +718,7 @@ bool MtpDevice::readObject(MtpObjectHandle handle, const char* destPath, int gro // queue up a read request req->buffer_length = (remaining > sizeof(buffer1) ? sizeof(buffer1) : remaining); if (mData.readDataAsync(req)) { - LOGE("readDataAsync failed"); + ALOGE("readDataAsync failed"); goto fail; } } else { @@ -728,7 +728,7 @@ bool MtpDevice::readObject(MtpObjectHandle handle, const char* destPath, int gro if (writeBuffer) { // write previous buffer if (write(fd, writeBuffer, writeLength) != writeLength) { - LOGE("write failed"); + ALOGE("write failed"); // wait for pending read before failing if (req) mData.readDataWait(mDevice); diff --git a/media/mtp/MtpPacket.cpp b/media/mtp/MtpPacket.cpp index 39815d4..dd07843 100644 --- a/media/mtp/MtpPacket.cpp +++ b/media/mtp/MtpPacket.cpp @@ -36,7 +36,7 @@ MtpPacket::MtpPacket(int bufferSize) { mBuffer = (uint8_t *)malloc(bufferSize); if (!mBuffer) { - LOGE("out of memory!"); + ALOGE("out of memory!"); abort(); } } @@ -57,7 +57,7 @@ void MtpPacket::allocate(int length) { int newLength = length + mAllocationIncrement; mBuffer = (uint8_t *)realloc(mBuffer, newLength); if (!mBuffer) { - LOGE("out of memory!"); + ALOGE("out of memory!"); abort(); } mBufferSize = newLength; @@ -134,7 +134,7 @@ void MtpPacket::setTransactionID(MtpTransactionID id) { uint32_t MtpPacket::getParameter(int index) const { if (index < 1 || index > 5) { - LOGE("index %d out of range in MtpPacket::getParameter", index); + ALOGE("index %d out of range in MtpPacket::getParameter", index); return 0; } return getUInt32(MTP_CONTAINER_PARAMETER_OFFSET + (index - 1) * sizeof(uint32_t)); @@ -142,7 +142,7 @@ uint32_t MtpPacket::getParameter(int index) const { void MtpPacket::setParameter(int index, uint32_t value) { if (index < 1 || index > 5) { - LOGE("index %d out of range in MtpPacket::setParameter", index); + ALOGE("index %d out of range in MtpPacket::setParameter", index); return; } int offset = MTP_CONTAINER_PARAMETER_OFFSET + (index - 1) * sizeof(uint32_t); diff --git a/media/mtp/MtpProperty.cpp b/media/mtp/MtpProperty.cpp index 8016c35..64dd45b 100644 --- a/media/mtp/MtpProperty.cpp +++ b/media/mtp/MtpProperty.cpp @@ -91,7 +91,7 @@ MtpProperty::MtpProperty(MtpPropertyCode propCode, mDefaultValue.u.u64 = defaultValue; break; default: - LOGE("unknown type %04X in MtpProperty::MtpProperty", type); + ALOGE("unknown type %04X in MtpProperty::MtpProperty", type); } } } @@ -267,7 +267,7 @@ void MtpProperty::setFormRange(int min, int max, int step) { mStepSize.u.u64 = step; break; default: - LOGE("unsupported type for MtpProperty::setRange"); + ALOGE("unsupported type for MtpProperty::setRange"); break; } } @@ -306,7 +306,7 @@ void MtpProperty::setFormEnum(const int* values, int count) { mEnumValues[i].u.u64 = value; break; default: - LOGE("unsupported type for MtpProperty::setEnum"); + ALOGE("unsupported type for MtpProperty::setEnum"); break; } } @@ -320,18 +320,18 @@ void MtpProperty::print() { MtpString buffer; bool deviceProp = isDeviceProperty(); if (deviceProp) - LOGI(" %s (%04X)", MtpDebug::getDevicePropCodeName(mCode), mCode); + ALOGI(" %s (%04X)", MtpDebug::getDevicePropCodeName(mCode), mCode); else - LOGI(" %s (%04X)", MtpDebug::getObjectPropCodeName(mCode), mCode); - LOGI(" type %04X", mType); - LOGI(" writeable %s", (mWriteable ? "true" : "false")); + ALOGI(" %s (%04X)", MtpDebug::getObjectPropCodeName(mCode), mCode); + ALOGI(" type %04X", mType); + ALOGI(" writeable %s", (mWriteable ? "true" : "false")); buffer = " default value: "; print(mDefaultValue, buffer); - LOGI("%s", (const char *)buffer); + ALOGI("%s", (const char *)buffer); if (deviceProp) { buffer = " current value: "; print(mCurrentValue, buffer); - LOGI("%s", (const char *)buffer); + ALOGI("%s", (const char *)buffer); } switch (mFormFlag) { case kFormNone: @@ -344,7 +344,7 @@ void MtpProperty::print() { buffer += ", "; print(mStepSize, buffer); buffer += ")"; - LOGI("%s", (const char *)buffer); + ALOGI("%s", (const char *)buffer); break; case kFormEnum: buffer = " Enum { "; @@ -353,13 +353,13 @@ void MtpProperty::print() { buffer += " "; } buffer += "}"; - LOGI("%s", (const char *)buffer); + ALOGI("%s", (const char *)buffer); break; case kFormDateTime: - LOGI(" DateTime\n"); + ALOGI(" DateTime\n"); break; default: - LOGI(" form %d\n", mFormFlag); + ALOGI(" form %d\n", mFormFlag); break; } } @@ -402,7 +402,7 @@ void MtpProperty::print(MtpPropertyValue& value, MtpString& buffer) { buffer.appendFormat("%s", value.str); break; default: - LOGE("unsupported type for MtpProperty::print\n"); + ALOGE("unsupported type for MtpProperty::print\n"); break; } } @@ -456,7 +456,7 @@ void MtpProperty::readValue(MtpDataPacket& packet, MtpPropertyValue& value) { value.str = strdup(stringBuffer); break; default: - LOGE("unknown type %04X in MtpProperty::readValue", mType); + ALOGE("unknown type %04X in MtpProperty::readValue", mType); } } @@ -511,7 +511,7 @@ void MtpProperty::writeValue(MtpDataPacket& packet, MtpPropertyValue& value) { packet.putEmptyString(); break; default: - LOGE("unknown type %04X in MtpProperty::writeValue", mType); + ALOGE("unknown type %04X in MtpProperty::writeValue", mType); } } diff --git a/media/mtp/MtpServer.cpp b/media/mtp/MtpServer.cpp index 838c13e..5606187 100644 --- a/media/mtp/MtpServer.cpp +++ b/media/mtp/MtpServer.cpp @@ -179,7 +179,7 @@ void MtpServer::run() { if (dataIn) { int ret = mData.read(fd); if (ret < 0) { - LOGE("data read returned %d, errno: %d", ret, errno); + ALOGE("data read returned %d, errno: %d", ret, errno); if (errno == ECANCELED) { // return to top of loop and wait for next command continue; @@ -200,7 +200,7 @@ void MtpServer::run() { mData.dump(); ret = mData.write(fd); if (ret < 0) { - LOGE("request write returned %d, errno: %d", ret, errno); + ALOGE("request write returned %d, errno: %d", ret, errno); if (errno == ECANCELED) { // return to top of loop and wait for next command continue; @@ -214,7 +214,7 @@ void MtpServer::run() { ret = mResponse.write(fd); mResponse.dump(); if (ret < 0) { - LOGE("request write returned %d, errno: %d", ret, errno); + ALOGE("request write returned %d, errno: %d", ret, errno); if (errno == ECANCELED) { // return to top of loop and wait for next command continue; @@ -296,7 +296,7 @@ void MtpServer::removeEditObject(MtpObjectHandle handle) { return; } } - LOGE("ObjectEdit not found in removeEditObject"); + ALOGE("ObjectEdit not found in removeEditObject"); } void MtpServer::commitEdit(ObjectEdit* edit) { @@ -314,7 +314,7 @@ bool MtpServer::handleRequest() { if (mSendObjectHandle != kInvalidObjectHandle && operation != MTP_OPERATION_SEND_OBJECT) { // FIXME - need to delete mSendObjectHandle from the database - LOGE("expected SendObject after SendObjectInfo"); + ALOGE("expected SendObject after SendObjectInfo"); mSendObjectHandle = kInvalidObjectHandle; } @@ -408,7 +408,7 @@ bool MtpServer::handleRequest() { response = doEndEditObject(); break; default: - LOGE("got unsupported command %s", MtpDebug::getOperationCodeName(operation)); + ALOGE("got unsupported command %s", MtpDebug::getOperationCodeName(operation)); response = MTP_RESPONSE_OPERATION_NOT_SUPPORTED; break; } @@ -917,7 +917,7 @@ MtpResponseCode MtpServer::doSendObject() { int ret, initialData; if (mSendObjectHandle == kInvalidObjectHandle) { - LOGE("Expected SendObjectInfo before SendObject"); + ALOGE("Expected SendObjectInfo before SendObject"); result = MTP_RESPONSE_NO_VALID_OBJECT_INFO; goto done; } @@ -984,7 +984,7 @@ static void deleteRecursive(const char* path) { char pathbuf[PATH_MAX]; int pathLength = strlen(path); if (pathLength >= sizeof(pathbuf) - 1) { - LOGE("path too long: %s\n", path); + ALOGE("path too long: %s\n", path); } strcpy(pathbuf, path); if (pathbuf[pathLength - 1] != '/') { @@ -995,7 +995,7 @@ static void deleteRecursive(const char* path) { DIR* dir = opendir(path); if (!dir) { - LOGE("opendir %s failed: %s", path, strerror(errno)); + ALOGE("opendir %s failed: %s", path, strerror(errno)); return; } @@ -1010,7 +1010,7 @@ static void deleteRecursive(const char* path) { int nameLength = strlen(name); if (nameLength > pathRemaining) { - LOGE("path %s/%s too long\n", path, name); + ALOGE("path %s/%s too long\n", path, name); continue; } strcpy(fileSpot, name); @@ -1036,7 +1036,7 @@ static void deletePath(const char* path) { unlink(path); } } else { - LOGE("deletePath stat failed for %s: %s", path, strerror(errno)); + ALOGE("deletePath stat failed for %s: %s", path, strerror(errno)); } } @@ -1098,7 +1098,7 @@ MtpResponseCode MtpServer::doSendPartialObject() { ObjectEdit* edit = getEditObject(handle); if (!edit) { - LOGE("object not open for edit in doSendPartialObject"); + ALOGE("object not open for edit in doSendPartialObject"); return MTP_RESPONSE_GENERAL_ERROR; } @@ -1155,7 +1155,7 @@ MtpResponseCode MtpServer::doTruncateObject() { MtpObjectHandle handle = mRequest.getParameter(1); ObjectEdit* edit = getEditObject(handle); if (!edit) { - LOGE("object not open for edit in doTruncateObject"); + ALOGE("object not open for edit in doTruncateObject"); return MTP_RESPONSE_GENERAL_ERROR; } @@ -1173,7 +1173,7 @@ MtpResponseCode MtpServer::doTruncateObject() { MtpResponseCode MtpServer::doBeginEditObject() { MtpObjectHandle handle = mRequest.getParameter(1); if (getEditObject(handle)) { - LOGE("object already open for edit in doBeginEditObject"); + ALOGE("object already open for edit in doBeginEditObject"); return MTP_RESPONSE_GENERAL_ERROR; } @@ -1186,7 +1186,7 @@ MtpResponseCode MtpServer::doBeginEditObject() { int fd = open((const char *)path, O_RDWR | O_EXCL); if (fd < 0) { - LOGE("open failed for %s in doBeginEditObject (%d)", (const char *)path, errno); + ALOGE("open failed for %s in doBeginEditObject (%d)", (const char *)path, errno); return MTP_RESPONSE_GENERAL_ERROR; } @@ -1198,7 +1198,7 @@ MtpResponseCode MtpServer::doEndEditObject() { MtpObjectHandle handle = mRequest.getParameter(1); ObjectEdit* edit = getEditObject(handle); if (!edit) { - LOGE("object not open for edit in doEndEditObject"); + ALOGE("object not open for edit in doEndEditObject"); return MTP_RESPONSE_GENERAL_ERROR; } |