binder = sm->getService(String16("media.camera"));
if (binder != 0)
break;
- LOGW("CameraService not published, waiting...");
+ ALOGW("CameraService not published, waiting...");
usleep(500000); // 0.5 s
} while(true);
if (mDeathNotifier == NULL) {
if (listener != NULL) {
listener->postDataTimestamp(timestamp, msgType, dataPtr);
} else {
- LOGW("No listener was set. Drop a recording frame.");
+ ALOGW("No listener was set. Drop a recording frame.");
releaseRecordingFrame(dataPtr);
}
}
void Camera::binderDied(const wp<IBinder>& who) {
- LOGW("ICamera died");
+ ALOGW("ICamera died");
notifyCallback(CAMERA_MSG_ERROR, CAMERA_ERROR_SERVER_DIED, 0);
}
ALOGV("binderDied");
Mutex::Autolock _l(Camera::mLock);
Camera::mCameraService.clear();
- LOGW("Camera server died!");
+ ALOGW("Camera server died!");
}
sp<ICameraRecordingProxy> Camera::getRecordingProxy() {
if (binder != 0) {
break;
}
- LOGW("DrmManagerService not published, waiting...");
+ ALOGW("DrmManagerService not published, waiting...");
struct timespec reqt;
reqt.tv_sec = 0;
reqt.tv_nsec = 500000000; //0.5 sec
void DrmManagerClientImpl::DeathNotifier::binderDied(const wp<IBinder>& who) {
Mutex::Autolock lock(sMutex);
DrmManagerClientImpl::sDrmManagerService.clear();
- LOGW("DrmManager server died!");
+ ALOGW("DrmManager server died!");
}
ret = init();
if (ret < 0) {
- LOGW("EffectCreate() init error: %d", ret);
+ ALOGW("EffectCreate() init error: %d", ret);
return ret;
}
// 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;
}
// 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);
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;
}
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;
}
return -EINVAL;
}
if (stringToUuid(node->value, &uuid) != 0) {
- LOGW("loadEffect() invalid uuid %s", node->value);
+ ALOGW("loadEffect() invalid uuid %s", node->value);
return -EINVAL;
}
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;
}
#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;
}
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);
break;
default:
- LOGW("AgcGetParameter() unknown param %08x", param);
+ ALOGW("AgcGetParameter() unknown param %08x", param);
status = -EINVAL;
break;
}
pProperties->limiterEnabled = (bool)agc->is_limiter_enabled();
break;
default:
- LOGW("AgcGetParameter() unknown param %d", param);
+ ALOGW("AgcGetParameter() unknown param %d", param);
status = -EINVAL;
break;
}
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;
}
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);
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;
}
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;
}
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);
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);
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;
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);
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;
}
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;
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;
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;
}
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;
}
}
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;
}
ret = Equalizer_init(pContext);
if (ret < 0) {
- LOGW("EffectLibCreateEffect() init failed");
+ ALOGW("EffectLibCreateEffect() init failed");
delete pContext;
return ret;
}
case EFFECT_CMD_SET_AUDIO_MODE:
break;
default:
- LOGW("Equalizer_command invalid command %d",cmdCode);
+ ALOGW("Equalizer_command invalid command %d",cmdCode);
return -EINVAL;
}
}
ret = Reverb_Init(module, aux, preset);
if (ret < 0) {
- LOGW("EffectLibCreateEffect() init failed");
+ ALOGW("EffectLibCreateEffect() init failed");
free(module);
return ret;
}
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;
}
ret = Visualizer_init(pContext);
if (ret < 0) {
- LOGW("VisualizerLib_Create() init failed");
+ ALOGW("VisualizerLib_Create() init failed");
delete pContext;
return ret;
}
break;
default:
- LOGW("Visualizer_command invalid command %d",cmdCode);
+ ALOGW("Visualizer_command invalid command %d",cmdCode);
return -EINVAL;
}
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;
}
}
if (type == NULL && uuid == NULL) {
- LOGW("Must specify at least type or uuid");
+ ALOGW("Must specify at least type or uuid");
return BAD_VALUE;
}
void AudioEffect::binderDied()
{
- LOGW("IEffect died");
+ ALOGW("IEffect died");
mStatus = NO_INIT;
if (mCbf) {
status_t status = DEAD_OBJECT;
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();
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;
}
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();
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();
}
}
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;
}
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) {
if (gAudioErrorCallback) {
gAudioErrorCallback(DEAD_OBJECT);
}
- LOGW("AudioFlinger server died!");
+ ALOGW("AudioFlinger server died!");
}
void AudioSystem::AudioFlingerClient::ioConfigChanged(int event, int ioHandle, void *param2) {
} 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);
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;
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) {
Mutex::Autolock _l(AudioSystem::gLock);
AudioSystem::gAudioPolicyService.clear();
- LOGW("AudioPolicyService server died!");
+ ALOGW("AudioPolicyService server died!");
}
}; // namespace android
// 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();
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;
}
// 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();
}
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
}
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;
}
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
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) {
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();
}
}
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;
}
bufferTimeoutMs = MAX_RUN_TIMEOUT_MS;
}
} else if (u > server) {
- LOGW("stepServer occurred after track reset");
+ ALOGW("stepServer occurred after track reset");
u = server;
}
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;
}
// 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;
} 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;
if (status == NO_ERROR) {
status = reply.readInt32();
} else {
- LOGW("start() error: %s", strerror(-status));
+ ALOGW("start() error: %s", strerror(-status));
}
return status;
}
if (status == NO_ERROR) {
status = reply.readInt32();
} else {
- LOGW("start() error: %s", strerror(-status));
+ ALOGW("start() error: %s", strerror(-status));
}
return status;
}
if (status == NO_ERROR) {
status = reply.readInt32();
} else {
- LOGW("attachAuxEffect() error: %s", strerror(-status));
+ ALOGW("attachAuxEffect() error: %s", strerror(-status));
}
return status;
}
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);
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;
#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)
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.
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;
}
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;
}
// 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
if (binder != 0) {
break;
}
- LOGW("MediaPlayerService not published, waiting...");
+ ALOGW("MediaPlayerService not published, waiting...");
usleep(500000); // 0.5 s
} while(true);
if (sDeathNotifier == NULL) {
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()
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
// 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:
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);
}
}
} else if (params & kBatteryDataAudioFlingerStop) {
if (mBatteryAudio.refCount <= 0) {
- LOGW("Battery track warning: refCount is <= 0");
+ ALOGW("Battery track warning: refCount is <= 0");
return;
}
}
} 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");
// 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);
}
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;
// 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
}
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;
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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.
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.");
}
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;
}
&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);
}
}
}
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),
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]);
break;
}
case AudioRecord::EVENT_OVERRUN: {
- LOGW("AudioRecord reported overrun!");
+ ALOGW("AudioRecord reported overrun!");
break;
}
default:
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;
}
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;
}
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());
}
}
}
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);
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);
}
}
*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;
offset -= 2;
size += 2;
- LOGW("Found malformed 'esds' atom, ignoring missing OCR_ES_Id.");
+ ALOGW("Found malformed 'esds' atom, ignoring missing OCR_ES_Id.");
}
}
}
break;
default:
- LOGW("FLACParser::metadataCallback unexpected type %u", metadata->type);
+ ALOGW("FLACParser::metadataCallback unexpected type %u", metadata->type);
break;
}
}
} 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;
}
}
if (LegacySniffMPEG4(source, mimeType, confidence)) {
- LOGW("Identified supported mpeg4 through LegacySniffMPEG4.");
+ ALOGW("Identified supported mpeg4 through LegacySniffMPEG4.");
return true;
}
// 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;
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);
// 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);
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
}
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.
&roleParams, sizeof(roleParams));
if (err != OK) {
- LOGW("Failed to set standard component role '%s'.", role);
+ ALOGW("Failed to set standard component role '%s'.", role);
}
}
}
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;
}
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;
}
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);
}
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);
}
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 ////////////////////
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;
}
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
}
}
- 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;
}
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
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;
// 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;
}
}
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);
status_t AACEncoder::start(MetaData *params) {
if (mStarted) {
- LOGW("Call start() when encoder already started");
+ ALOGW("Call start() when encoder already started");
return OK;
}
}
if (!mStarted) {
- LOGW("Call stop() when encoder has not started");
+ ALOGW("Call stop() when encoder has not started");
return ERROR_END_OF_STREAM;
}
status_t AMRNBEncoder::start(MetaData *params) {
if (mStarted) {
- LOGW("Call start() when encoder already started");
+ ALOGW("Call start() when encoder already started");
return OK;
}
status_t AMRNBEncoder::stop() {
if (!mStarted) {
- LOGW("Call stop() when encoder has not started.");
+ ALOGW("Call stop() when encoder has not started.");
return OK;
}
status_t AMRWBEncoder::start(MetaData *params) {
if (mStarted) {
- LOGW("Call start() when encoder already started");
+ ALOGW("Call start() when encoder already started");
return OK;
}
status_t AMRWBEncoder::stop() {
if (!mStarted) {
- LOGW("Call stop() when encoder has not started");
+ ALOGW("Call stop() when encoder has not started");
return OK;
}
}
if (mStarted) {
- LOGW("Call start() when encoder already started");
+ ALOGW("Call start() when encoder already started");
return OK;
}
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;
}
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;
LOGE("Unsupported level (%d) for H263", omxLevel);
return BAD_VALUE;
} else {
- LOGW("PV does not support level configuration for H263");
+ ALOGW("PV does not support level configuration for H263");
profileLevel = CORE_PROFILE_LEVEL2;
break;
}
}
if (mStarted) {
- LOGW("Call start() when encoder already started");
+ ALOGW("Call start() when encoder already started");
return OK;
}
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;
}
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,
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;
}
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;
}
return;
}
- LOGW("Warning message %s unhandled in root state.",
+ ALOGW("Warning message %s unhandled in root state.",
msg->debugString().c_str());
}
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;
}
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());
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;
}
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());
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;
}
if (!found) {
- LOGW("Attempt to remove an active buffer we know nothing about...");
+ ALOGW("Attempt to remove an active buffer we know nothing about...");
}
}
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;
}
} 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);
default:
{
- LOGW("Unknown RTCP packet type %u of size %d",
+ ALOGW("Unknown RTCP packet type %u of size %d",
(unsigned)data[1], headerLength);
break;
}
}
if (it != mQueue.end() && (uint32_t)(*it)->int32Data() == seqNum) {
- LOGW("Discarding duplicate buffer");
+ ALOGW("Discarding duplicate buffer");
return false;
}
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;
}
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;
}
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;
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 (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.");
}
// 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...");
// 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 {
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);
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);
{
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;
fakeTimestamps();
} else if (!mReceivedFirstRTPPacket && !mTryTCPInterleaving) {
- LOGW("Never received any data, switching transports.");
+ ALOGW("Never received any data, switching transports.");
mTryTCPInterleaving = true;
msg->setInt32("reconnect", true);
msg->post();
} else {
- LOGW("Never received any data, disconnecting.");
+ ALOGW("Never received any data, disconnecting.");
(new AMessage('abor', id()))->post();
}
}
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);
defaultServiceManager()->getService(String16("media.player"));
sp<IMediaPlayerService> service = interface_cast<IMediaPlayerService>(binder);
if (service.get() == NULL) {
- LOGW("Cannot connect to the MediaPlayerService for battery tracking");
+ ALOGW("Cannot connect to the MediaPlayerService for battery tracking");
return;
}
Mutex::Autolock _l(mLock);
PlaybackThread *thread = checkPlaybackThread_l(output);
if (thread == NULL) {
- LOGW("sampleRate() unknown thread %d", output);
+ ALOGW("sampleRate() unknown thread %d", output);
return 0;
}
return thread->sampleRate();
Mutex::Autolock _l(mLock);
PlaybackThread *thread = checkPlaybackThread_l(output);
if (thread == NULL) {
- LOGW("channelCount() unknown thread %d", output);
+ ALOGW("channelCount() unknown thread %d", output);
return 0;
}
return thread->channelCount();
Mutex::Autolock _l(mLock);
PlaybackThread *thread = checkPlaybackThread_l(output);
if (thread == NULL) {
- LOGW("format() unknown thread %d", output);
+ ALOGW("format() unknown thread %d", output);
return 0;
}
return thread->format();
Mutex::Autolock _l(mLock);
PlaybackThread *thread = checkPlaybackThread_l(output);
if (thread == NULL) {
- LOGW("frameCount() unknown thread %d", output);
+ ALOGW("frameCount() unknown thread %d", output);
return 0;
}
return thread->frameCount();
Mutex::Autolock _l(mLock);
PlaybackThread *thread = checkPlaybackThread_l(output);
if (thread == NULL) {
- LOGW("latency() unknown thread %d", output);
+ ALOGW("latency() unknown thread %d", output);
return 0;
}
return thread->latency();
return PERMISSION_DENIED;
}
if ((mode < 0) || (mode >= AUDIO_MODE_CNT)) {
- LOGW("Illegal value: setMode(%d)", mode);
+ ALOGW("Illegal value: setMode(%d)", mode);
return BAD_VALUE;
}
sp<IBinder> binder =
defaultServiceManager()->checkService(String16("power"));
if (binder == 0) {
- LOGW("Thread %s cannot connect to the power manager service", mName);
+ ALOGW("Thread %s cannot connect to the power manager service", mName);
} else {
mPowerManager = interface_cast<IPowerManager>(binder);
binder->linkToDeath(mDeathRecipient);
if (thread != 0) {
thread->clearPowerManager();
}
- LOGW("power manager service died !!!");
+ ALOGW("power manager service died !!!");
}
void AudioFlinger::ThreadBase::setEffectSuspended(
// invalidate track immediately if the stream type was moved to another thread since
// createTrack() was called by the client process.
if (!mStreamTypes[streamType].valid) {
- LOGW("createTrack_l() on thread %p: invalidating track on stream %d",
+ ALOGW("createTrack_l() on thread %p: invalidating track on stream %d",
this, streamType);
android_atomic_or(CBLK_INVALID_ON, &track->mCblk->flags);
}
if (!mStandby && delta > maxPeriod) {
mNumDelayedWrites++;
if ((now - lastWarning) > kWarningThrottleNs) {
- LOGW("write blocked for %llu msecs, %d delayed writes, thread %p",
+ ALOGW("write blocked for %llu msecs, %d delayed writes, thread %p",
ns2ms(delta), mNumDelayedWrites, this);
lastWarning = now;
}
if (chain != 0) {
tracksWithEffect++;
} else {
- LOGW("prepareTracks_l(): track %d attached to effect but no chain found on session %d",
+ ALOGW("prepareTracks_l(): track %d attached to effect but no chain found on session %d",
name, track->sessionId());
}
}
for (size_t i = 0; i < outputTracks.size(); i++) {
sp <ThreadBase> thread = outputTracks[i]->thread().promote();
if (thread == 0) {
- LOGW("DuplicatingThread::outputsReady() could not promote thread on output track %p", outputTracks[i].get());
+ ALOGW("DuplicatingThread::outputsReady() could not promote thread on output track %p", outputTracks[i].get());
return false;
}
PlaybackThread *playbackThread = (PlaybackThread *)thread.get();
mCblk, mBuffer, mCblk->buffers,
mCblk->frameCount, mCblk->sampleRate, mChannelMask, mBufferEnd);
} else {
- LOGW("Error creating output track on thread %p", playbackThread);
+ ALOGW("Error creating output track on thread %p", playbackThread);
}
}
memset(pInBuffer->raw, 0, startFrames * channelCount * sizeof(int16_t));
mBufferQueue.add(pInBuffer);
} else {
- LOGW ("OutputTrack::write() %p no more buffers in queue", this);
+ ALOGW ("OutputTrack::write() %p no more buffers in queue", this);
}
}
}
mBufferQueue.add(pInBuffer);
ALOGV("OutputTrack::write() %p thread %p adding overflow buffer %d", this, mThread.unsafe_get(), mBufferQueue.size());
} else {
- LOGW("OutputTrack::write() %p thread %p no more overflow buffers", mThread.unsafe_get(), this);
+ ALOGW("OutputTrack::write() %p thread %p no more overflow buffers", mThread.unsafe_get(), this);
}
}
}
status_t AudioFlinger::RecordThread::readyToRun()
{
status_t status = initCheck();
- LOGW_IF(status != NO_ERROR,"RecordThread %p could not initialize", this);
+ ALOGW_IF(status != NO_ERROR,"RecordThread %p could not initialize", this);
return status;
}
if (!mActiveTrack->setOverflow()) {
nsecs_t now = systemTime();
if ((now - lastWarning) > kWarningThrottleNs) {
- LOGW("RecordThread: buffer overflow");
+ ALOGW("RecordThread: buffer overflow");
lastWarning = now;
}
}
MixerThread *thread2 = checkMixerThread_l(output2);
if (thread1 == NULL || thread2 == NULL) {
- LOGW("openDuplicateOutput() wrong output mixer type for output %d or %d", output1, output2);
+ ALOGW("openDuplicateOutput() wrong output mixer type for output %d or %d", output1, output2);
return 0;
}
Mutex::Autolock _l(mLock);
MixerThread *dstThread = checkMixerThread_l(output);
if (dstThread == NULL) {
- LOGW("setStreamOutput() bad output id %d", output);
+ ALOGW("setStreamOutput() bad output id %d", output);
return BAD_VALUE;
}
return;
}
}
- LOGW("session id %d not found for pid %d", audioSession, caller);
+ ALOGW("session id %d not found for pid %d", audioSession, caller);
}
void AudioFlinger::purgeStaleEffects_l() {
// if uuid is specified, request effect descriptor
lStatus = EffectGetDescriptor(&pDesc->uuid, &desc);
if (lStatus < 0) {
- LOGW("createEffect() error %d from EffectGetDescriptor", lStatus);
+ ALOGW("createEffect() error %d from EffectGetDescriptor", lStatus);
goto Exit;
}
} else {
// if uuid is not specified, look for an available implementation
// of the required type in effect factory
if (EffectIsNullUuid(&pDesc->type)) {
- LOGW("createEffect() no effect type");
+ ALOGW("createEffect() no effect type");
lStatus = BAD_VALUE;
goto Exit;
}
lStatus = EffectQueryNumberEffects(&numEffects);
if (lStatus < 0) {
- LOGW("createEffect() error %d from EffectQueryNumberEffects", lStatus);
+ ALOGW("createEffect() error %d from EffectQueryNumberEffects", lStatus);
goto Exit;
}
for (uint32_t i = 0; i < numEffects; i++) {
lStatus = EffectQueryEffect(i, &desc);
if (lStatus < 0) {
- LOGW("createEffect() error %d from EffectQueryEffect", lStatus);
+ ALOGW("createEffect() error %d from EffectQueryEffect", lStatus);
continue;
}
if (memcmp(&desc.type, &pDesc->type, sizeof(effect_uuid_t)) == 0) {
}
if (!found) {
lStatus = BAD_VALUE;
- LOGW("createEffect() effect not found");
+ ALOGW("createEffect() effect not found");
goto Exit;
}
// For same effect type, chose auxiliary version over insert version if
sessionId, srcOutput, dstOutput);
Mutex::Autolock _l(mLock);
if (srcOutput == dstOutput) {
- LOGW("moveEffects() same dst and src outputs %d", dstOutput);
+ ALOGW("moveEffects() same dst and src outputs %d", dstOutput);
return NO_ERROR;
}
PlaybackThread *srcThread = checkPlaybackThread_l(srcOutput);
if (srcThread == NULL) {
- LOGW("moveEffects() bad srcOutput %d", srcOutput);
+ ALOGW("moveEffects() bad srcOutput %d", srcOutput);
return BAD_VALUE;
}
PlaybackThread *dstThread = checkPlaybackThread_l(dstOutput);
if (dstThread == NULL) {
- LOGW("moveEffects() bad dstOutput %d", dstOutput);
+ ALOGW("moveEffects() bad dstOutput %d", dstOutput);
return BAD_VALUE;
}
sp<EffectChain> chain = srcThread->getEffectChain_l(sessionId);
if (chain == 0) {
- LOGW("moveEffectChain_l() effect chain for session %d not on source thread %p",
+ ALOGW("moveEffectChain_l() effect chain for session %d not on source thread %p",
sessionId, srcThread);
return INVALID_OPERATION;
}
if (dstChain == 0) {
dstChain = effect->chain().promote();
if (dstChain == 0) {
- LOGW("moveEffectChain_l() cannot get chain from effect %p", effect.get());
+ ALOGW("moveEffectChain_l() cannot get chain from effect %p", effect.get());
srcThread->addEffect_l(effect);
return NO_INIT;
}
lStatus = initCheck();
if (lStatus != NO_ERROR) {
- LOGW("createEffect_l() Audio driver not initialized.");
+ ALOGW("createEffect_l() Audio driver not initialized.");
goto Exit;
}
// Do not allow effects with session ID 0 on direct output or duplicating threads
// TODO: add rule for hw accelerated effects on direct outputs with non PCM format
if (sessionId == AUDIO_SESSION_OUTPUT_MIX && mType != MIXER) {
- LOGW("createEffect_l() Cannot add auxiliary effect %s to session %d",
+ ALOGW("createEffect_l() Cannot add auxiliary effect %s to session %d",
desc->name, sessionId);
lStatus = BAD_VALUE;
goto Exit;
(desc->flags & EFFECT_FLAG_TYPE_MASK) != EFFECT_FLAG_TYPE_PRE_PROC) ||
(mType != RECORD &&
(desc->flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_PRE_PROC)) {
- LOGW("createEffect_l() effect %s (flags %08x) created on wrong thread type %d",
+ ALOGW("createEffect_l() effect %s (flags %08x) created on wrong thread type %d",
desc->name, desc->flags, mType);
lStatus = BAD_VALUE;
goto Exit;
ALOGV("addEffect_l() %p chain %p effect %p", this, chain.get(), effect.get());
if (chain->getEffectFromId_l(effect->id()) != 0) {
- LOGW("addEffect_l() %p effect %s already present in chain %p",
+ ALOGW("addEffect_l() %p effect %s already present in chain %p",
this, effect->desc().name, chain.get());
return BAD_VALUE;
}
removeEffectChain_l(chain);
}
} else {
- LOGW("removeEffect_l() %p cannot promote chain for effect %p", this, effect.get());
+ ALOGW("removeEffect_l() %p cannot promote chain for effect %p", this, effect.get());
}
}
size_t AudioFlinger::RecordThread::removeEffectChain_l(const sp<EffectChain>& chain)
{
ALOGV("removeEffectChain_l() %p from thread %p", chain.get(), this);
- LOGW_IF(mEffectChains.size() != 1,
+ ALOGW_IF(mEffectChains.size() != 1,
"removeEffectChain_l() %p invalid chain size %d on thread %p",
chain.get(), mEffectChains.size(), this);
if (mEffectChains.size() == 1) {
int *p = (int *)(mBuffer + mCblk->serverIndex);
int size = *p++;
if (((uint8_t *)p + size) > mBuffer + mCblk->clientIndex) {
- LOGW("command(): invalid parameter block size");
+ ALOGW("command(): invalid parameter block size");
break;
}
effect_param_t *param = (effect_param_t *)p;
if (param->psize == 0 || param->vsize == 0) {
- LOGW("command(): null parameter or value size");
+ ALOGW("command(): null parameter or value size");
mCblk->serverIndex += size;
continue;
}
{
sp<ThreadBase> thread = mThread.promote();
if (thread == 0) {
- LOGW("process_l(): cannot promote mixer thread");
+ ALOGW("process_l(): cannot promote mixer thread");
return;
}
bool isGlobalSession = (mSessionId == AUDIO_SESSION_OUTPUT_MIX) ||
// check invalid effect chaining combinations
if (insertPref == EFFECT_FLAG_INSERT_EXCLUSIVE ||
iPref == EFFECT_FLAG_INSERT_EXCLUSIVE) {
- LOGW("addEffect_l() could not insert effect %s: exclusive conflict with %s", desc.name, d.name);
+ ALOGW("addEffect_l() could not insert effect %s: exclusive conflict with %s", desc.name, d.name);
return INVALID_OPERATION;
}
// remember position of first insert effect and by default
}
desc = mSuspendedEffects.valueAt(index);
if (desc->mRefCount <= 0) {
- LOGW("setEffectSuspended_l() restore refcount should not be 0 %d", desc->mRefCount);
+ ALOGW("setEffectSuspended_l() restore refcount should not be 0 %d", desc->mRefCount);
desc->mRefCount = 1;
}
if (--desc->mRefCount == 0) {
}
desc = mSuspendedEffects.valueAt(index);
if (desc->mRefCount <= 0) {
- LOGW("setEffectSuspendedAll_l() restore refcount should not be 0 %d", desc->mRefCount);
+ ALOGW("setEffectSuspendedAll_l() restore refcount should not be 0 %d", desc->mRefCount);
desc->mRefCount = 1;
}
if (--desc->mRefCount == 0) {
setEffectSuspended_l(&effect->desc().type, enabled);
index = mSuspendedEffects.indexOfKey(effect->desc().type.timeLow);
if (index < 0) {
- LOGW("checkSuspendOnEffectEnabled() Fx should be suspended here!");
+ ALOGW("checkSuspendOnEffectEnabled() Fx should be suspended here!");
return;
}
}
void AudioMixer::process__validate(state_t* state)
{
- LOGW_IF(!state->needsChanged,
+ ALOGW_IF(!state->needsChanged,
"in process__validate() but nothing's invalid");
uint32_t changed = state->needsChanged;
sp<AudioEffect> fx = new AudioEffect(NULL, &effect->mUuid, -1, 0, 0, audioSession, input);
status_t status = fx->initCheck();
if (status != NO_ERROR && status != ALREADY_EXISTS) {
- LOGW("Failed to create Fx %s on input %d", effect->mName, input);
+ ALOGW("Failed to create Fx %s on input %d", effect->mName, input);
// fx goes out of scope and strong ref on AudioEffect is released
continue;
}
}
void AudioPolicyService::binderDied(const wp<IBinder>& who) {
- LOGW("binderDied() %p, tid %d, calling tid %d", who.unsafe_get(), gettid(),
+ ALOGW("binderDied() %p, tid %d, calling tid %d", who.unsafe_get(), gettid(),
IPCThreadState::self()->getCallingPid());
}
delete data;
}break;
default:
- LOGW("AudioCommandThread() unknown command %d", command->mCommand);
+ ALOGW("AudioCommandThread() unknown command %d", command->mCommand);
}
delete command;
waitTime = INT64_MAX;
ALOGV("readParamValue() reading string %s", param + *curSize - len);
return len;
}
- LOGW("readParamValue() unknown param type %s", node->name);
+ ALOGW("readParamValue() unknown param type %s", node->name);
return 0;
}
// Note: that a pair of random strings is read as 0 0
int *ptr = (int *)fx_param->data;
int *ptr2 = (int *)((char *)param + sizeof(effect_param_t));
- LOGW("loadEffectParameter() ptr %p ptr2 %p", ptr, ptr2);
+ ALOGW("loadEffectParameter() ptr %p ptr2 %p", ptr, ptr2);
*ptr++ = atoi(param->name);
*ptr = atoi(param->value);
fx_param->psize = sizeof(int);
}
}
if (param == NULL || value == NULL) {
- LOGW("loadEffectParameter() invalid parameter description %s", root->name);
+ ALOGW("loadEffectParameter() invalid parameter description %s", root->name);
goto error;
}
{
cnode *node = root->first_child;
if (node == NULL) {
- LOGW("loadInputSource() empty element %s", root->name);
+ ALOGW("loadInputSource() empty element %s", root->name);
return NULL;
}
InputSourceDesc *source = new InputSourceDesc();
node = node->next;
}
if (source->mEffects.size() == 0) {
- LOGW("loadInputSource() no valid effects found in source %s", root->name);
+ ALOGW("loadInputSource() no valid effects found in source %s", root->name);
delete source;
return NULL;
}
while (node) {
audio_source_t source = inputSourceNameToEnum(node->name);
if (source == AUDIO_SOURCE_CNT) {
- LOGW("loadInputSources() invalid input source %s", node->name);
+ ALOGW("loadInputSources() invalid input source %s", node->name);
node = node->next;
continue;
}
}
effect_uuid_t uuid;
if (AudioEffect::stringToGuid(node->value, &uuid) != NO_ERROR) {
- LOGW("loadEffect() invalid uuid %s", node->value);
+ ALOGW("loadEffect() invalid uuid %s", node->value);
return NULL;
}
EffectDesc *effect = new EffectDesc();
{
sp<IAudioFlinger> af = AudioSystem::get_audio_flinger();
if (af == NULL) {
- LOGW("%s: could not get AudioFlinger", __func__);
+ ALOGW("%s: could not get AudioFlinger", __func__);
return 0;
}
{
sp<IAudioFlinger> af = AudioSystem::get_audio_flinger();
if (af == NULL) {
- LOGW("%s: could not get AudioFlinger", __func__);
+ ALOGW("%s: could not get AudioFlinger", __func__);
return 0;
}
return af->openDuplicateOutput(output1, output2);
{
sp<IAudioFlinger> af = AudioSystem::get_audio_flinger();
if (af == NULL) {
- LOGW("%s: could not get AudioFlinger", __func__);
+ ALOGW("%s: could not get AudioFlinger", __func__);
return PERMISSION_DENIED;
}
{
sp<IAudioFlinger> af = AudioSystem::get_audio_flinger();
if (af == NULL) {
- LOGW("%s: could not get AudioFlinger", __func__);
+ ALOGW("%s: could not get AudioFlinger", __func__);
return PERMISSION_DENIED;
}
{
sp<IAudioFlinger> af = AudioSystem::get_audio_flinger();
if (af == NULL) {
- LOGW("%s: could not get AudioFlinger", __func__);
+ ALOGW("%s: could not get AudioFlinger", __func__);
return 0;
}
provider->getNextBuffer(&mBuffer);
if (mBuffer.raw == NULL)
return;
- // LOGW("New buffer: offset=%p, frames=%dn", mBuffer.raw, mBuffer.frameCount);
+ // ALOGW("New buffer: offset=%p, frames=%dn", mBuffer.raw, mBuffer.frameCount);
}
int16_t *in = mBuffer.i16;
if (mBuffer.raw == NULL)
goto save_state; // ugly, but efficient
in = mBuffer.i16;
- // LOGW("New buffer: offset=%p, frames=%d\n", mBuffer.raw, mBuffer.frameCount);
+ // ALOGW("New buffer: offset=%p, frames=%d\n", mBuffer.raw, mBuffer.frameCount);
}
// advance sample state
}
save_state:
- // LOGW("Done: index=%d, fraction=%u", inputIndex, phaseFraction);
+ // ALOGW("Done: index=%d, fraction=%u", inputIndex, phaseFraction);
mInputIndex = inputIndex;
mPhaseFraction = phaseFraction;
}
provider->getNextBuffer(&mBuffer);
if (mBuffer.raw == NULL)
return;
- // LOGW("New buffer: offset=%p, frames=%d\n", mBuffer.raw, mBuffer.frameCount);
+ // ALOGW("New buffer: offset=%p, frames=%d\n", mBuffer.raw, mBuffer.frameCount);
}
int16_t *in = mBuffer.i16;
provider->getNextBuffer(&mBuffer);
if (mBuffer.raw == NULL)
goto save_state; // ugly, but efficient
- // LOGW("New buffer: offset=%p, frames=%dn", mBuffer.raw, mBuffer.frameCount);
+ // ALOGW("New buffer: offset=%p, frames=%dn", mBuffer.raw, mBuffer.frameCount);
in = mBuffer.i16;
}
}
save_state:
- // LOGW("Done: index=%d, fraction=%u", inputIndex, phaseFraction);
+ // ALOGW("Done: index=%d, fraction=%u", inputIndex, phaseFraction);
mInputIndex = inputIndex;
mPhaseFraction = phaseFraction;
}
callingPid);
return client;
} else {
- LOGW("CameraService::connect X (pid %d) rejected (existing client).",
+ ALOGW("CameraService::connect X (pid %d) rejected (existing client).",
callingPid);
return NULL;
}
}
if (mBusy[cameraId]) {
- LOGW("CameraService::connect X (pid %d) rejected"
+ ALOGW("CameraService::connect X (pid %d) rejected"
" (camera %d is still busy).", callingPid, cameraId);
return NULL;
}
int callingPid = getCallingPid();
if (callingPid == mClientPid) return NO_ERROR;
- LOGW("attempt to use a locked camera from a different process"
+ ALOGW("attempt to use a locked camera from a different process"
" (old pid %d, new pid %d)", mClientPid, callingPid);
return EBUSY;
}
Mutex::Autolock lock(mLock);
if (mClientPid != 0 && checkPid() != NO_ERROR) {
- LOGW("Tried to connect to a locked camera (old pid %d, new pid %d)",
+ ALOGW("Tried to connect to a locked camera (old pid %d, new pid %d)",
mClientPid, callingPid);
return EBUSY;
}
status_t result = native_window_api_disconnect(window.get(),
NATIVE_WINDOW_API_CAMERA);
if (result != NO_ERROR) {
- LOGW("native_window_api_disconnect failed: %s (%d)", strerror(-result),
+ ALOGW("native_window_api_disconnect failed: %s (%d)", strerror(-result),
result);
}
}
Mutex::Autolock lock(mLock);
if (checkPid() != NO_ERROR) {
- LOGW("different client - don't disconnect");
+ ALOGW("different client - don't disconnect");
return;
}
}
usleep(CHECK_MESSAGE_INTERVAL * 1000);
}
- LOGW("lockIfMessageWanted(%d): dropped unwanted message", msgType);
+ ALOGW("lockIfMessageWanted(%d): dropped unwanted message", msgType);
return false;
}