diff options
author | Steve Block <steveblock@google.com> | 2011-10-20 11:56:00 +0100 |
---|---|---|
committer | Jean-Baptiste Queru <jbq@google.com> | 2012-01-19 14:44:31 -0800 |
commit | 06ade6ae1bd015e8b8ad0685847911213c93cc5b (patch) | |
tree | 0fb687dcbdf125a30cdb645605b57bb847d0c7b5 /media/libmedia | |
parent | c318bbb05e02a0080e129623ec8029d31be0d60e (diff) | |
download | frameworks_base-06ade6ae1bd015e8b8ad0685847911213c93cc5b.zip frameworks_base-06ade6ae1bd015e8b8ad0685847911213c93cc5b.tar.gz frameworks_base-06ade6ae1bd015e8b8ad0685847911213c93cc5b.tar.bz2 |
Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF)
Change-Id: I5321ebd12e9c6248a108529e82c4e1af2a4405e3
Diffstat (limited to 'media/libmedia')
-rw-r--r-- | media/libmedia/AudioEffect.cpp | 22 | ||||
-rw-r--r-- | media/libmedia/AudioParameter.cpp | 2 | ||||
-rw-r--r-- | media/libmedia/AudioRecord.cpp | 14 | ||||
-rw-r--r-- | media/libmedia/AudioSystem.cpp | 26 | ||||
-rw-r--r-- | media/libmedia/AudioTrack.cpp | 28 | ||||
-rw-r--r-- | media/libmedia/IAudioFlinger.cpp | 4 | ||||
-rw-r--r-- | media/libmedia/IAudioFlingerClient.cpp | 4 | ||||
-rw-r--r-- | media/libmedia/IEffect.cpp | 16 | ||||
-rw-r--r-- | media/libmedia/IEffectClient.cpp | 12 | ||||
-rw-r--r-- | media/libmedia/IMediaDeathNotifier.cpp | 8 | ||||
-rw-r--r-- | media/libmedia/IMediaMetadataRetriever.cpp | 4 | ||||
-rw-r--r-- | media/libmedia/IMediaRecorder.cpp | 88 | ||||
-rw-r--r-- | media/libmedia/JetPlayer.cpp | 42 | ||||
-rw-r--r-- | media/libmedia/MediaProfiles.cpp | 86 | ||||
-rw-r--r-- | media/libmedia/MediaScanner.cpp | 2 | ||||
-rw-r--r-- | media/libmedia/ToneGenerator.cpp | 82 | ||||
-rw-r--r-- | media/libmedia/Visualizer.cpp | 18 | ||||
-rw-r--r-- | media/libmedia/mediametadataretriever.cpp | 18 | ||||
-rw-r--r-- | media/libmedia/mediaplayer.cpp | 112 | ||||
-rw-r--r-- | media/libmedia/mediarecorder.cpp | 82 |
20 files changed, 335 insertions, 335 deletions
diff --git a/media/libmedia/AudioEffect.cpp b/media/libmedia/AudioEffect.cpp index 0633744..6e53a15 100644 --- a/media/libmedia/AudioEffect.cpp +++ b/media/libmedia/AudioEffect.cpp @@ -69,7 +69,7 @@ AudioEffect::AudioEffect(const char *typeStr, effect_uuid_t uuid; effect_uuid_t *pUuid = NULL; - LOGV("Constructor string\n - type: %s\n - uuid: %s", typeStr, uuidStr); + ALOGV("Constructor string\n - type: %s\n - uuid: %s", typeStr, uuidStr); if (typeStr != NULL) { if (stringToGuid(typeStr, &type) == NO_ERROR) { @@ -98,7 +98,7 @@ status_t AudioEffect::set(const effect_uuid_t *type, sp<IMemory> cblk; int enabled; - LOGV("set %p mUserData: %p uuid: %p timeLow %08x", this, user, type, type ? type->timeLow : 0); + ALOGV("set %p mUserData: %p uuid: %p timeLow %08x", this, user, type, type ? type->timeLow : 0); if (mIEffect != 0) { LOGW("Effect already in use"); @@ -159,7 +159,7 @@ status_t AudioEffect::set(const effect_uuid_t *type, mCblk->buffer = (uint8_t *)mCblk + bufOffset; iEffect->asBinder()->linkToDeath(mIEffectClient); - LOGV("set() %p OK effect: %s id: %d status %d enabled %d, ", this, mDescriptor.name, mId, mStatus, mEnabled); + ALOGV("set() %p OK effect: %s id: %d status %d enabled %d, ", this, mDescriptor.name, mId, mStatus, mEnabled); return mStatus; } @@ -167,7 +167,7 @@ status_t AudioEffect::set(const effect_uuid_t *type, AudioEffect::~AudioEffect() { - LOGV("Destructor %p", this); + ALOGV("Destructor %p", this); if (mStatus == NO_ERROR || mStatus == ALREADY_EXISTS) { if (mIEffect != NULL) { @@ -210,10 +210,10 @@ status_t AudioEffect::setEnabled(bool enabled) AutoMutex lock(mLock); if (enabled != mEnabled) { if (enabled) { - LOGV("enable %p", this); + ALOGV("enable %p", this); status = mIEffect->enable(); } else { - LOGV("disable %p", this); + ALOGV("disable %p", this); status = mIEffect->disable(); } if (status == NO_ERROR) { @@ -230,7 +230,7 @@ status_t AudioEffect::command(uint32_t cmdCode, void *replyData) { if (mStatus != NO_ERROR && mStatus != ALREADY_EXISTS) { - LOGV("command() bad status %d", mStatus); + ALOGV("command() bad status %d", mStatus); return INVALID_OPERATION; } @@ -273,7 +273,7 @@ status_t AudioEffect::setParameter(effect_param_t *param) uint32_t size = sizeof(int); uint32_t psize = ((param->psize - 1) / sizeof(int) + 1) * sizeof(int) + param->vsize; - LOGV("setParameter: param: %d, param2: %d", *(int *)param->data, (param->psize == 8) ? *((int *)param->data + 1): -1); + ALOGV("setParameter: param: %d, param2: %d", *(int *)param->data, (param->psize == 8) ? *((int *)param->data + 1): -1); return mIEffect->command(EFFECT_CMD_SET_PARAM, sizeof (effect_param_t) + psize, param, &size, ¶m->status); } @@ -328,7 +328,7 @@ status_t AudioEffect::getParameter(effect_param_t *param) return BAD_VALUE; } - LOGV("getParameter: param: %d, param2: %d", *(int *)param->data, (param->psize == 8) ? *((int *)param->data + 1): -1); + ALOGV("getParameter: param: %d, param2: %d", *(int *)param->data, (param->psize == 8) ? *((int *)param->data + 1): -1); uint32_t psize = sizeof(effect_param_t) + ((param->psize - 1) / sizeof(int) + 1) * sizeof(int) + param->vsize; @@ -353,7 +353,7 @@ void AudioEffect::binderDied() void AudioEffect::controlStatusChanged(bool controlGranted) { - LOGV("controlStatusChanged %p control %d callback %p mUserData %p", this, controlGranted, mCbf, mUserData); + ALOGV("controlStatusChanged %p control %d callback %p mUserData %p", this, controlGranted, mCbf, mUserData); if (controlGranted) { if (mStatus == ALREADY_EXISTS) { mStatus = NO_ERROR; @@ -370,7 +370,7 @@ void AudioEffect::controlStatusChanged(bool controlGranted) void AudioEffect::enableStatusChanged(bool enabled) { - LOGV("enableStatusChanged %p enabled %d mCbf %p", this, enabled, mCbf); + ALOGV("enableStatusChanged %p enabled %d mCbf %p", this, enabled, mCbf); if (mStatus == ALREADY_EXISTS) { mEnabled = enabled; if (mCbf) { diff --git a/media/libmedia/AudioParameter.cpp b/media/libmedia/AudioParameter.cpp index 59ccfd0..abc7b3f 100644 --- a/media/libmedia/AudioParameter.cpp +++ b/media/libmedia/AudioParameter.cpp @@ -53,7 +53,7 @@ AudioParameter::AudioParameter(const String8& keyValuePairs) mParameters.replaceValueFor(key, value); } } else { - LOGV("AudioParameter() cstor empty key value pair"); + ALOGV("AudioParameter() cstor empty key value pair"); } pair = strtok(NULL, ";"); } diff --git a/media/libmedia/AudioRecord.cpp b/media/libmedia/AudioRecord.cpp index e5062ab..f32929e 100644 --- a/media/libmedia/AudioRecord.cpp +++ b/media/libmedia/AudioRecord.cpp @@ -132,7 +132,7 @@ status_t AudioRecord::set( int sessionId) { - LOGV("set(): sampleRate %d, channelMask %d, frameCount %d",sampleRate, channelMask, frameCount); + ALOGV("set(): sampleRate %d, channelMask %d, frameCount %d",sampleRate, channelMask, frameCount); AutoMutex lock(mLock); @@ -168,7 +168,7 @@ status_t AudioRecord::set( } else { mSessionId = sessionId; } - LOGV("set(): mSessionId %d", mSessionId); + ALOGV("set(): mSessionId %d", mSessionId); audio_io_handle_t input = AudioSystem::getInput(inputSource, sampleRate, @@ -187,7 +187,7 @@ status_t AudioRecord::set( if (status != NO_ERROR) { return status; } - LOGV("AudioRecord::set() minFrameCount = %d", minFrameCount); + ALOGV("AudioRecord::set() minFrameCount = %d", minFrameCount); if (frameCount == 0) { frameCount = minFrameCount; @@ -287,7 +287,7 @@ status_t AudioRecord::start() status_t ret = NO_ERROR; sp<ClientRecordThread> t = mClientRecordThread; - LOGV("start"); + ALOGV("start"); if (t != 0) { if (t->exitPending()) { @@ -346,7 +346,7 @@ status_t AudioRecord::stop() { sp<ClientRecordThread> t = mClientRecordThread; - LOGV("stop"); + ALOGV("stop"); if (t != 0) { t->mLock.lock(); @@ -739,7 +739,7 @@ bool AudioRecord::processAudioBuffer(const sp<ClientRecordThread>& thread) // Manage overrun callback if (mActive && (cblk->framesAvailable() == 0)) { - LOGV("Overrun user: %x, server: %x, flags %04x", cblk->user, cblk->server, cblk->flags); + ALOGV("Overrun 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_OVERRUN, mUserData, 0); } @@ -798,7 +798,7 @@ status_t AudioRecord::restoreRecord_l(audio_track_cblk_t*& cblk) result = status_t(STOPPED); } } - LOGV("restoreRecord_l() status %d mActive %d cblk %p, old cblk %p flags %08x old flags %08x", + ALOGV("restoreRecord_l() status %d mActive %d cblk %p, old cblk %p flags %08x old flags %08x", result, mActive, mCblk, cblk, mCblk->flags, cblk->flags); if (result == NO_ERROR) { diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp index 7b14c18..b9a5bc5 100644 --- a/media/libmedia/AudioSystem.cpp +++ b/media/libmedia/AudioSystem.cpp @@ -220,18 +220,18 @@ status_t AudioSystem::getOutputSamplingRate(int* samplingRate, int streamType) gLock.lock(); outputDesc = AudioSystem::gOutputs.valueFor(output); if (outputDesc == 0) { - LOGV("getOutputSamplingRate() no output descriptor for output %d in gOutputs", output); + ALOGV("getOutputSamplingRate() no output descriptor for output %d in gOutputs", output); gLock.unlock(); const sp<IAudioFlinger>& af = AudioSystem::get_audio_flinger(); if (af == 0) return PERMISSION_DENIED; *samplingRate = af->sampleRate(output); } else { - LOGV("getOutputSamplingRate() reading from output desc"); + ALOGV("getOutputSamplingRate() reading from output desc"); *samplingRate = outputDesc->samplingRate; gLock.unlock(); } - LOGV("getOutputSamplingRate() streamType %d, output %d, sampling rate %d", streamType, output, *samplingRate); + ALOGV("getOutputSamplingRate() streamType %d, output %d, sampling rate %d", streamType, output, *samplingRate); return NO_ERROR; } @@ -262,7 +262,7 @@ status_t AudioSystem::getOutputFrameCount(int* frameCount, int streamType) gLock.unlock(); } - LOGV("getOutputFrameCount() streamType %d, output %d, frameCount %d", streamType, output, *frameCount); + ALOGV("getOutputFrameCount() streamType %d, output %d, frameCount %d", streamType, output, *frameCount); return NO_ERROR; } @@ -293,7 +293,7 @@ status_t AudioSystem::getOutputLatency(uint32_t* latency, int streamType) gLock.unlock(); } - LOGV("getOutputLatency() streamType %d, output %d, latency %d", streamType, output, *latency); + ALOGV("getOutputLatency() streamType %d, output %d, latency %d", streamType, output, *latency); return NO_ERROR; } @@ -387,7 +387,7 @@ void AudioSystem::AudioFlingerClient::binderDied(const wp<IBinder>& who) { } void AudioSystem::AudioFlingerClient::ioConfigChanged(int event, int ioHandle, void *param2) { - LOGV("ioConfigChanged() event %d", event); + ALOGV("ioConfigChanged() event %d", event); OutputDescriptor *desc; uint32_t stream; @@ -399,14 +399,14 @@ void AudioSystem::AudioFlingerClient::ioConfigChanged(int event, int ioHandle, v case STREAM_CONFIG_CHANGED: if (param2 == 0) break; stream = *(uint32_t *)param2; - LOGV("ioConfigChanged() STREAM_CONFIG_CHANGED stream %d, output %d", stream, ioHandle); + ALOGV("ioConfigChanged() STREAM_CONFIG_CHANGED stream %d, output %d", stream, ioHandle); if (gStreamOutputMap.indexOfKey(stream) >= 0) { gStreamOutputMap.replaceValueFor(stream, ioHandle); } break; case OUTPUT_OPENED: { if (gOutputs.indexOfKey(ioHandle) >= 0) { - LOGV("ioConfigChanged() opening already existing output! %d", ioHandle); + ALOGV("ioConfigChanged() opening already existing output! %d", ioHandle); break; } if (param2 == 0) break; @@ -414,7 +414,7 @@ void AudioSystem::AudioFlingerClient::ioConfigChanged(int event, int ioHandle, v OutputDescriptor *outputDesc = new OutputDescriptor(*desc); gOutputs.add(ioHandle, outputDesc); - LOGV("ioConfigChanged() new output samplingRate %d, format %d channels %d frameCount %d latency %d", + ALOGV("ioConfigChanged() new output samplingRate %d, format %d channels %d frameCount %d latency %d", outputDesc->samplingRate, outputDesc->format, outputDesc->channels, outputDesc->frameCount, outputDesc->latency); } break; case OUTPUT_CLOSED: { @@ -422,7 +422,7 @@ void AudioSystem::AudioFlingerClient::ioConfigChanged(int event, int ioHandle, v LOGW("ioConfigChanged() closing unknow output! %d", ioHandle); break; } - LOGV("ioConfigChanged() output %d closed", ioHandle); + ALOGV("ioConfigChanged() output %d closed", ioHandle); gOutputs.removeItem(ioHandle); for (int i = gStreamOutputMap.size() - 1; i >= 0 ; i--) { @@ -441,7 +441,7 @@ void AudioSystem::AudioFlingerClient::ioConfigChanged(int event, int ioHandle, v if (param2 == 0) break; desc = (OutputDescriptor *)param2; - LOGV("ioConfigChanged() new config for output %d samplingRate %d, format %d channels %d frameCount %d latency %d", + ALOGV("ioConfigChanged() new config for output %d samplingRate %d, format %d channels %d frameCount %d latency %d", ioHandle, desc->samplingRate, desc->format, desc->channels, desc->frameCount, desc->latency); OutputDescriptor *outputDesc = gOutputs.valueAt(index); @@ -582,7 +582,7 @@ audio_io_handle_t AudioSystem::getOutput(audio_stream_type_t stream, (samplingRate != 8000 && samplingRate != 16000))) { Mutex::Autolock _l(gLock); output = AudioSystem::gStreamOutputMap.valueFor(stream); - LOGV_IF((output != 0), "getOutput() read %d from cache for stream %d", output, stream); + ALOGV_IF((output != 0), "getOutput() read %d from cache for stream %d", output, stream); } if (output == 0) { const sp<IAudioPolicyService>& aps = AudioSystem::get_audio_policy_service(); @@ -736,7 +736,7 @@ status_t AudioSystem::isStreamActive(int stream, bool* state, uint32_t inPastMs) void AudioSystem::clearAudioConfigCache() { Mutex::Autolock _l(gLock); - LOGV("clearAudioConfigCache()"); + ALOGV("clearAudioConfigCache()"); gStreamOutputMap.clear(); gOutputs.clear(); } diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp index 8ebb652..8ccba80 100644 --- a/media/libmedia/AudioTrack.cpp +++ b/media/libmedia/AudioTrack.cpp @@ -121,7 +121,7 @@ AudioTrack::AudioTrack( AudioTrack::~AudioTrack() { - LOGV_IF(mSharedBuffer != 0, "Destructor sharedBuffer: %p", mSharedBuffer->pointer()); + ALOGV_IF(mSharedBuffer != 0, "Destructor sharedBuffer: %p", mSharedBuffer->pointer()); if (mStatus == NO_ERROR) { // Make sure that callback function exits in the case where @@ -153,7 +153,7 @@ status_t AudioTrack::set( int sessionId) { - LOGV_IF(sharedBuffer != 0, "sharedBuffer: %p, size: %d", sharedBuffer->pointer(), sharedBuffer->size()); + ALOGV_IF(sharedBuffer != 0, "sharedBuffer: %p, size: %d", sharedBuffer->pointer(), sharedBuffer->size()); AutoMutex lock(mLock); if (mAudioTrack != 0) { @@ -319,7 +319,7 @@ void AudioTrack::start() sp<AudioTrackThread> t = mAudioTrackThread; status_t status = NO_ERROR; - LOGV("start %p", this); + ALOGV("start %p", this); if (t != 0) { if (t->exitPending()) { if (t->requestExitAndWait() == WOULD_BLOCK) { @@ -351,7 +351,7 @@ void AudioTrack::start() setpriority(PRIO_PROCESS, 0, ANDROID_PRIORITY_AUDIO); } - LOGV("start %p before lock cblk %p", this, mCblk); + ALOGV("start %p before lock cblk %p", this, mCblk); if (!(cblk->flags & CBLK_INVALID_MSK)) { cblk->lock.unlock(); status = mAudioTrack->start(); @@ -365,7 +365,7 @@ void AudioTrack::start() } cblk->lock.unlock(); if (status != NO_ERROR) { - LOGV("start() failed"); + ALOGV("start() failed"); mActive = 0; if (t != 0) { t->requestExit(); @@ -384,7 +384,7 @@ void AudioTrack::stop() { sp<AudioTrackThread> t = mAudioTrackThread; - LOGV("stop %p", this); + ALOGV("stop %p", this); if (t != 0) { t->mLock.lock(); } @@ -431,7 +431,7 @@ void AudioTrack::flush() // must be called with mLock held void AudioTrack::flush_l() { - LOGV("flush"); + ALOGV("flush"); // clear playback marker and periodic update counter mMarkerPosition = 0; @@ -449,7 +449,7 @@ void AudioTrack::flush_l() void AudioTrack::pause() { - LOGV("pause"); + ALOGV("pause"); AutoMutex lock(mLock); if (mActive == 1) { mActive = 0; @@ -496,7 +496,7 @@ void AudioTrack::getVolume(float* left, float* right) status_t AudioTrack::setAuxEffectSendLevel(float level) { - LOGV("setAuxEffectSendLevel(%f)", level); + ALOGV("setAuxEffectSendLevel(%f)", level); if (level > 1.0f) { return BAD_VALUE; } @@ -696,7 +696,7 @@ int AudioTrack::getSessionId() status_t AudioTrack::attachAuxEffect(int effectId) { - LOGV("attachAuxEffect(%d)", effectId); + ALOGV("attachAuxEffect(%d)", effectId); status_t status = mAudioTrack->attachAuxEffect(effectId); if (status == NO_ERROR) { mAuxEffectId = effectId; @@ -852,7 +852,7 @@ status_t AudioTrack::obtainBuffer(Buffer* audioBuffer, int32_t waitCount) while (framesAvail == 0) { active = mActive; if (UNLIKELY(!active)) { - LOGV("Not active and NO_MORE_BUFFERS"); + ALOGV("Not active and NO_MORE_BUFFERS"); cblk->lock.unlock(); return NO_MORE_BUFFERS; } @@ -966,7 +966,7 @@ ssize_t AudioTrack::write(const void* buffer, size_t userSize) return BAD_VALUE; } - LOGV("write %p: %d bytes, mActive=%d", this, userSize, mActive); + ALOGV("write %p: %d bytes, mActive=%d", this, userSize, mActive); // acquire a strong reference on the IMemory and IAudioTrack so that they cannot be destroyed // while we are accessing the cblk @@ -1036,7 +1036,7 @@ bool AudioTrack::processAudioBuffer(const sp<AudioTrackThread>& thread) // Manage underrun callback if (mActive && (cblk->framesAvailable() == cblk->frameCount)) { - LOGV("Underrun user: %x, server: %x, flags %04x", cblk->user, cblk->server, cblk->flags); + 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); if (cblk->server == cblk->frameCount) { @@ -1247,7 +1247,7 @@ status_t AudioTrack::restoreTrack_l(audio_track_cblk_t*& cblk, bool fromStart) cblk->lock.unlock(); } } - LOGV("restoreTrack_l() status %d mActive %d cblk %p, old cblk %p flags %08x old flags %08x", + ALOGV("restoreTrack_l() status %d mActive %d cblk %p, old cblk %p flags %08x old flags %08x", result, mActive, mCblk, cblk, mCblk->flags, cblk->flags); if (result == NO_ERROR) { diff --git a/media/libmedia/IAudioFlinger.cpp b/media/libmedia/IAudioFlinger.cpp index d58834b..bedf8d3 100644 --- a/media/libmedia/IAudioFlinger.cpp +++ b/media/libmedia/IAudioFlinger.cpp @@ -377,7 +377,7 @@ public: data.writeInt32(flags); remote()->transact(OPEN_OUTPUT, data, &reply); int output = reply.readInt32(); - LOGV("openOutput() returned output, %p", output); + ALOGV("openOutput() returned output, %p", output); devices = reply.readInt32(); if (pDevices) *pDevices = devices; samplingRate = reply.readInt32(); @@ -844,7 +844,7 @@ status_t BnAudioFlinger::onTransact( &channels, &latency, flags); - LOGV("OPEN_OUTPUT output, %p", output); + ALOGV("OPEN_OUTPUT output, %p", output); reply->writeInt32(output); reply->writeInt32(devices); reply->writeInt32(samplingRate); diff --git a/media/libmedia/IAudioFlingerClient.cpp b/media/libmedia/IAudioFlingerClient.cpp index 3900de4..5a3f250 100644 --- a/media/libmedia/IAudioFlingerClient.cpp +++ b/media/libmedia/IAudioFlingerClient.cpp @@ -47,7 +47,7 @@ public: data.writeInt32(ioHandle); if (event == AudioSystem::STREAM_CONFIG_CHANGED) { uint32_t stream = *(uint32_t *)param2; - LOGV("ioConfigChanged stream %d", stream); + ALOGV("ioConfigChanged stream %d", stream); data.writeInt32(stream); } else if (event != AudioSystem::OUTPUT_CLOSED && event != AudioSystem::INPUT_CLOSED) { AudioSystem::OutputDescriptor *desc = (AudioSystem::OutputDescriptor *)param2; @@ -79,7 +79,7 @@ status_t BnAudioFlingerClient::onTransact( if (event == AudioSystem::STREAM_CONFIG_CHANGED) { stream = data.readInt32(); param2 = &stream; - LOGV("STREAM_CONFIG_CHANGED stream %d", stream); + ALOGV("STREAM_CONFIG_CHANGED stream %d", stream); } else if (event != AudioSystem::OUTPUT_CLOSED && event != AudioSystem::INPUT_CLOSED) { desc.samplingRate = data.readInt32(); desc.format = data.readInt32(); diff --git a/media/libmedia/IEffect.cpp b/media/libmedia/IEffect.cpp index a945b97..d469e28 100644 --- a/media/libmedia/IEffect.cpp +++ b/media/libmedia/IEffect.cpp @@ -43,7 +43,7 @@ public: status_t enable() { - LOGV("enable"); + ALOGV("enable"); Parcel data, reply; data.writeInterfaceToken(IEffect::getInterfaceDescriptor()); remote()->transact(ENABLE, data, &reply); @@ -52,7 +52,7 @@ public: status_t disable() { - LOGV("disable"); + ALOGV("disable"); Parcel data, reply; data.writeInterfaceToken(IEffect::getInterfaceDescriptor()); remote()->transact(DISABLE, data, &reply); @@ -65,7 +65,7 @@ public: uint32_t *pReplySize, void *pReplyData) { - LOGV("command"); + ALOGV("command"); Parcel data, reply; data.writeInterfaceToken(IEffect::getInterfaceDescriptor()); data.writeInt32(cmdCode); @@ -95,7 +95,7 @@ public: void disconnect() { - LOGV("disconnect"); + ALOGV("disconnect"); Parcel data, reply; data.writeInterfaceToken(IEffect::getInterfaceDescriptor()); remote()->transact(DISCONNECT, data, &reply); @@ -124,21 +124,21 @@ status_t BnEffect::onTransact( { switch(code) { case ENABLE: { - LOGV("ENABLE"); + ALOGV("ENABLE"); CHECK_INTERFACE(IEffect, data, reply); reply->writeInt32(enable()); return NO_ERROR; } break; case DISABLE: { - LOGV("DISABLE"); + ALOGV("DISABLE"); CHECK_INTERFACE(IEffect, data, reply); reply->writeInt32(disable()); return NO_ERROR; } break; case COMMAND: { - LOGV("COMMAND"); + ALOGV("COMMAND"); CHECK_INTERFACE(IEffect, data, reply); uint32_t cmdCode = data.readInt32(); uint32_t cmdSize = data.readInt32(); @@ -172,7 +172,7 @@ status_t BnEffect::onTransact( } break; case DISCONNECT: { - LOGV("DISCONNECT"); + ALOGV("DISCONNECT"); CHECK_INTERFACE(IEffect, data, reply); disconnect(); return NO_ERROR; diff --git a/media/libmedia/IEffectClient.cpp b/media/libmedia/IEffectClient.cpp index 1fa9cbe..4693b45 100644 --- a/media/libmedia/IEffectClient.cpp +++ b/media/libmedia/IEffectClient.cpp @@ -40,7 +40,7 @@ public: void controlStatusChanged(bool controlGranted) { - LOGV("controlStatusChanged"); + ALOGV("controlStatusChanged"); Parcel data, reply; data.writeInterfaceToken(IEffectClient::getInterfaceDescriptor()); data.writeInt32((uint32_t)controlGranted); @@ -49,7 +49,7 @@ public: void enableStatusChanged(bool enabled) { - LOGV("enableStatusChanged"); + ALOGV("enableStatusChanged"); Parcel data, reply; data.writeInterfaceToken(IEffectClient::getInterfaceDescriptor()); data.writeInt32((uint32_t)enabled); @@ -62,7 +62,7 @@ public: uint32_t replySize, void *pReplyData) { - LOGV("commandExecuted"); + ALOGV("commandExecuted"); Parcel data, reply; data.writeInterfaceToken(IEffectClient::getInterfaceDescriptor()); data.writeInt32(cmdCode); @@ -96,21 +96,21 @@ status_t BnEffectClient::onTransact( { switch(code) { case CONTROL_STATUS_CHANGED: { - LOGV("CONTROL_STATUS_CHANGED"); + ALOGV("CONTROL_STATUS_CHANGED"); CHECK_INTERFACE(IEffectClient, data, reply); bool hasControl = (bool)data.readInt32(); controlStatusChanged(hasControl); return NO_ERROR; } break; case ENABLE_STATUS_CHANGED: { - LOGV("ENABLE_STATUS_CHANGED"); + ALOGV("ENABLE_STATUS_CHANGED"); CHECK_INTERFACE(IEffectClient, data, reply); bool enabled = (bool)data.readInt32(); enableStatusChanged(enabled); return NO_ERROR; } break; case COMMAND_EXECUTED: { - LOGV("COMMAND_EXECUTED"); + ALOGV("COMMAND_EXECUTED"); CHECK_INTERFACE(IEffectClient, data, reply); uint32_t cmdCode = data.readInt32(); uint32_t cmdSize = data.readInt32(); diff --git a/media/libmedia/IMediaDeathNotifier.cpp b/media/libmedia/IMediaDeathNotifier.cpp index 39ac076..da33edb 100644 --- a/media/libmedia/IMediaDeathNotifier.cpp +++ b/media/libmedia/IMediaDeathNotifier.cpp @@ -34,7 +34,7 @@ SortedVector< wp<IMediaDeathNotifier> > IMediaDeathNotifier::sObitRecipients; /*static*/const sp<IMediaPlayerService>& IMediaDeathNotifier::getMediaPlayerService() { - LOGV("getMediaPlayerService"); + ALOGV("getMediaPlayerService"); Mutex::Autolock _l(sServiceLock); if (sMediaPlayerService.get() == 0) { sp<IServiceManager> sm = defaultServiceManager(); @@ -61,7 +61,7 @@ IMediaDeathNotifier::getMediaPlayerService() /*static*/ void IMediaDeathNotifier::addObitRecipient(const wp<IMediaDeathNotifier>& recipient) { - LOGV("addObitRecipient"); + ALOGV("addObitRecipient"); Mutex::Autolock _l(sServiceLock); sObitRecipients.add(recipient); } @@ -69,7 +69,7 @@ IMediaDeathNotifier::addObitRecipient(const wp<IMediaDeathNotifier>& recipient) /*static*/ void IMediaDeathNotifier::removeObitRecipient(const wp<IMediaDeathNotifier>& recipient) { - LOGV("removeObitRecipient"); + ALOGV("removeObitRecipient"); Mutex::Autolock _l(sServiceLock); sObitRecipients.remove(recipient); } @@ -100,7 +100,7 @@ IMediaDeathNotifier::DeathNotifier::binderDied(const wp<IBinder>& who) { IMediaDeathNotifier::DeathNotifier::~DeathNotifier() { - LOGV("DeathNotifier::~DeathNotifier"); + ALOGV("DeathNotifier::~DeathNotifier"); Mutex::Autolock _l(sServiceLock); sObitRecipients.clear(); if (sMediaPlayerService != 0) { diff --git a/media/libmedia/IMediaMetadataRetriever.cpp b/media/libmedia/IMediaMetadataRetriever.cpp index 07152d8..9b8d7c3 100644 --- a/media/libmedia/IMediaMetadataRetriever.cpp +++ b/media/libmedia/IMediaMetadataRetriever.cpp @@ -118,7 +118,7 @@ public: sp<IMemory> getFrameAtTime(int64_t timeUs, int option) { - LOGV("getTimeAtTime: time(%lld us) and option(%d)", timeUs, option); + ALOGV("getTimeAtTime: time(%lld us) and option(%d)", timeUs, option); Parcel data, reply; data.writeInterfaceToken(IMediaMetadataRetriever::getInterfaceDescriptor()); data.writeInt64(timeUs); @@ -208,7 +208,7 @@ status_t BnMediaMetadataRetriever::onTransact( CHECK_INTERFACE(IMediaMetadataRetriever, data, reply); int64_t timeUs = data.readInt64(); int option = data.readInt32(); - LOGV("getTimeAtTime: time(%lld us) and option(%d)", timeUs, option); + ALOGV("getTimeAtTime: time(%lld us) and option(%d)", timeUs, option); #ifndef DISABLE_GROUP_SCHEDULE_HACK setSchedPolicy(data); #endif diff --git a/media/libmedia/IMediaRecorder.cpp b/media/libmedia/IMediaRecorder.cpp index 38e111e..42f55c2 100644 --- a/media/libmedia/IMediaRecorder.cpp +++ b/media/libmedia/IMediaRecorder.cpp @@ -64,7 +64,7 @@ public: status_t setCamera(const sp<ICamera>& camera, const sp<ICameraRecordingProxy>& proxy) { - LOGV("setCamera(%p,%p)", camera.get(), proxy.get()); + ALOGV("setCamera(%p,%p)", camera.get(), proxy.get()); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); data.writeStrongBinder(camera->asBinder()); @@ -75,7 +75,7 @@ public: sp<ISurfaceTexture> querySurfaceMediaSource() { - LOGV("Query SurfaceMediaSource"); + ALOGV("Query SurfaceMediaSource"); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); remote()->transact(QUERY_SURFACE_MEDIASOURCE, data, &reply); @@ -88,7 +88,7 @@ public: status_t setPreviewSurface(const sp<Surface>& surface) { - LOGV("setPreviewSurface(%p)", surface.get()); + ALOGV("setPreviewSurface(%p)", surface.get()); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); Surface::writeToParcel(surface, &data); @@ -98,7 +98,7 @@ public: status_t init() { - LOGV("init"); + ALOGV("init"); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); remote()->transact(INIT, data, &reply); @@ -107,7 +107,7 @@ public: status_t setVideoSource(int vs) { - LOGV("setVideoSource(%d)", vs); + ALOGV("setVideoSource(%d)", vs); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); data.writeInt32(vs); @@ -117,7 +117,7 @@ public: status_t setAudioSource(int as) { - LOGV("setAudioSource(%d)", as); + ALOGV("setAudioSource(%d)", as); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); data.writeInt32(as); @@ -127,7 +127,7 @@ public: status_t setOutputFormat(int of) { - LOGV("setOutputFormat(%d)", of); + ALOGV("setOutputFormat(%d)", of); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); data.writeInt32(of); @@ -137,7 +137,7 @@ public: status_t setVideoEncoder(int ve) { - LOGV("setVideoEncoder(%d)", ve); + ALOGV("setVideoEncoder(%d)", ve); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); data.writeInt32(ve); @@ -147,7 +147,7 @@ public: status_t setAudioEncoder(int ae) { - LOGV("setAudioEncoder(%d)", ae); + ALOGV("setAudioEncoder(%d)", ae); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); data.writeInt32(ae); @@ -157,7 +157,7 @@ public: status_t setOutputFile(const char* path) { - LOGV("setOutputFile(%s)", path); + ALOGV("setOutputFile(%s)", path); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); data.writeCString(path); @@ -166,7 +166,7 @@ public: } status_t setOutputFile(int fd, int64_t offset, int64_t length) { - LOGV("setOutputFile(%d, %lld, %lld)", fd, offset, length); + ALOGV("setOutputFile(%d, %lld, %lld)", fd, offset, length); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); data.writeFileDescriptor(fd); @@ -178,7 +178,7 @@ public: status_t setVideoSize(int width, int height) { - LOGV("setVideoSize(%dx%d)", width, height); + ALOGV("setVideoSize(%dx%d)", width, height); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); data.writeInt32(width); @@ -189,7 +189,7 @@ public: status_t setVideoFrameRate(int frames_per_second) { - LOGV("setVideoFrameRate(%d)", frames_per_second); + ALOGV("setVideoFrameRate(%d)", frames_per_second); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); data.writeInt32(frames_per_second); @@ -199,7 +199,7 @@ public: status_t setParameters(const String8& params) { - LOGV("setParameter(%s)", params.string()); + ALOGV("setParameter(%s)", params.string()); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); data.writeString8(params); @@ -209,7 +209,7 @@ public: status_t setListener(const sp<IMediaRecorderClient>& listener) { - LOGV("setListener(%p)", listener.get()); + ALOGV("setListener(%p)", listener.get()); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); data.writeStrongBinder(listener->asBinder()); @@ -219,7 +219,7 @@ public: status_t prepare() { - LOGV("prepare"); + ALOGV("prepare"); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); remote()->transact(PREPARE, data, &reply); @@ -228,7 +228,7 @@ public: status_t getMaxAmplitude(int* max) { - LOGV("getMaxAmplitude"); + ALOGV("getMaxAmplitude"); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); remote()->transact(GET_MAX_AMPLITUDE, data, &reply); @@ -238,7 +238,7 @@ public: status_t start() { - LOGV("start"); + ALOGV("start"); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); remote()->transact(START, data, &reply); @@ -247,7 +247,7 @@ public: status_t stop() { - LOGV("stop"); + ALOGV("stop"); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); remote()->transact(STOP, data, &reply); @@ -256,7 +256,7 @@ public: status_t reset() { - LOGV("reset"); + ALOGV("reset"); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); remote()->transact(RESET, data, &reply); @@ -265,7 +265,7 @@ public: status_t close() { - LOGV("close"); + ALOGV("close"); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); remote()->transact(CLOSE, data, &reply); @@ -274,7 +274,7 @@ public: status_t release() { - LOGV("release"); + ALOGV("release"); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); remote()->transact(RELEASE, data, &reply); @@ -291,49 +291,49 @@ status_t BnMediaRecorder::onTransact( { switch(code) { case RELEASE: { - LOGV("RELEASE"); + ALOGV("RELEASE"); CHECK_INTERFACE(IMediaRecorder, data, reply); reply->writeInt32(release()); return NO_ERROR; } break; case INIT: { - LOGV("INIT"); + ALOGV("INIT"); CHECK_INTERFACE(IMediaRecorder, data, reply); reply->writeInt32(init()); return NO_ERROR; } break; case CLOSE: { - LOGV("CLOSE"); + ALOGV("CLOSE"); CHECK_INTERFACE(IMediaRecorder, data, reply); reply->writeInt32(close()); return NO_ERROR; } break; case RESET: { - LOGV("RESET"); + ALOGV("RESET"); CHECK_INTERFACE(IMediaRecorder, data, reply); reply->writeInt32(reset()); return NO_ERROR; } break; case STOP: { - LOGV("STOP"); + ALOGV("STOP"); CHECK_INTERFACE(IMediaRecorder, data, reply); reply->writeInt32(stop()); return NO_ERROR; } break; case START: { - LOGV("START"); + ALOGV("START"); CHECK_INTERFACE(IMediaRecorder, data, reply); reply->writeInt32(start()); return NO_ERROR; } break; case PREPARE: { - LOGV("PREPARE"); + ALOGV("PREPARE"); CHECK_INTERFACE(IMediaRecorder, data, reply); reply->writeInt32(prepare()); return NO_ERROR; } break; case GET_MAX_AMPLITUDE: { - LOGV("GET_MAX_AMPLITUDE"); + ALOGV("GET_MAX_AMPLITUDE"); CHECK_INTERFACE(IMediaRecorder, data, reply); int max = 0; status_t ret = getMaxAmplitude(&max); @@ -342,35 +342,35 @@ status_t BnMediaRecorder::onTransact( return NO_ERROR; } break; case SET_VIDEO_SOURCE: { - LOGV("SET_VIDEO_SOURCE"); + ALOGV("SET_VIDEO_SOURCE"); CHECK_INTERFACE(IMediaRecorder, data, reply); int vs = data.readInt32(); reply->writeInt32(setVideoSource(vs)); return NO_ERROR; } break; case SET_AUDIO_SOURCE: { - LOGV("SET_AUDIO_SOURCE"); + ALOGV("SET_AUDIO_SOURCE"); CHECK_INTERFACE(IMediaRecorder, data, reply); int as = data.readInt32(); reply->writeInt32(setAudioSource(as)); return NO_ERROR; } break; case SET_OUTPUT_FORMAT: { - LOGV("SET_OUTPUT_FORMAT"); + ALOGV("SET_OUTPUT_FORMAT"); CHECK_INTERFACE(IMediaRecorder, data, reply); int of = data.readInt32(); reply->writeInt32(setOutputFormat(of)); return NO_ERROR; } break; case SET_VIDEO_ENCODER: { - LOGV("SET_VIDEO_ENCODER"); + ALOGV("SET_VIDEO_ENCODER"); CHECK_INTERFACE(IMediaRecorder, data, reply); int ve = data.readInt32(); reply->writeInt32(setVideoEncoder(ve)); return NO_ERROR; } break; case SET_AUDIO_ENCODER: { - LOGV("SET_AUDIO_ENCODER"); + ALOGV("SET_AUDIO_ENCODER"); CHECK_INTERFACE(IMediaRecorder, data, reply); int ae = data.readInt32(); reply->writeInt32(setAudioEncoder(ae)); @@ -378,14 +378,14 @@ status_t BnMediaRecorder::onTransact( } break; case SET_OUTPUT_FILE_PATH: { - LOGV("SET_OUTPUT_FILE_PATH"); + ALOGV("SET_OUTPUT_FILE_PATH"); CHECK_INTERFACE(IMediaRecorder, data, reply); const char* path = data.readCString(); reply->writeInt32(setOutputFile(path)); return NO_ERROR; } break; case SET_OUTPUT_FILE_FD: { - LOGV("SET_OUTPUT_FILE_FD"); + ALOGV("SET_OUTPUT_FILE_FD"); CHECK_INTERFACE(IMediaRecorder, data, reply); int fd = dup(data.readFileDescriptor()); int64_t offset = data.readInt64(); @@ -395,7 +395,7 @@ status_t BnMediaRecorder::onTransact( return NO_ERROR; } break; case SET_VIDEO_SIZE: { - LOGV("SET_VIDEO_SIZE"); + ALOGV("SET_VIDEO_SIZE"); CHECK_INTERFACE(IMediaRecorder, data, reply); int width = data.readInt32(); int height = data.readInt32(); @@ -403,20 +403,20 @@ status_t BnMediaRecorder::onTransact( return NO_ERROR; } break; case SET_VIDEO_FRAMERATE: { - LOGV("SET_VIDEO_FRAMERATE"); + ALOGV("SET_VIDEO_FRAMERATE"); CHECK_INTERFACE(IMediaRecorder, data, reply); int frames_per_second = data.readInt32(); reply->writeInt32(setVideoFrameRate(frames_per_second)); return NO_ERROR; } break; case SET_PARAMETERS: { - LOGV("SET_PARAMETER"); + ALOGV("SET_PARAMETER"); CHECK_INTERFACE(IMediaRecorder, data, reply); reply->writeInt32(setParameters(data.readString8())); return NO_ERROR; } break; case SET_LISTENER: { - LOGV("SET_LISTENER"); + ALOGV("SET_LISTENER"); CHECK_INTERFACE(IMediaRecorder, data, reply); sp<IMediaRecorderClient> listener = interface_cast<IMediaRecorderClient>(data.readStrongBinder()); @@ -424,14 +424,14 @@ status_t BnMediaRecorder::onTransact( return NO_ERROR; } break; case SET_PREVIEW_SURFACE: { - LOGV("SET_PREVIEW_SURFACE"); + ALOGV("SET_PREVIEW_SURFACE"); CHECK_INTERFACE(IMediaRecorder, data, reply); sp<Surface> surface = Surface::readFromParcel(data); reply->writeInt32(setPreviewSurface(surface)); return NO_ERROR; } break; case SET_CAMERA: { - LOGV("SET_CAMERA"); + ALOGV("SET_CAMERA"); CHECK_INTERFACE(IMediaRecorder, data, reply); sp<ICamera> camera = interface_cast<ICamera>(data.readStrongBinder()); sp<ICameraRecordingProxy> proxy = @@ -440,7 +440,7 @@ status_t BnMediaRecorder::onTransact( return NO_ERROR; } break; case QUERY_SURFACE_MEDIASOURCE: { - LOGV("QUERY_SURFACE_MEDIASOURCE"); + ALOGV("QUERY_SURFACE_MEDIASOURCE"); CHECK_INTERFACE(IMediaRecorder, data, reply); // call the mediaserver side to create // a surfacemediasource diff --git a/media/libmedia/JetPlayer.cpp b/media/libmedia/JetPlayer.cpp index 8b953e0..3d94b49 100644 --- a/media/libmedia/JetPlayer.cpp +++ b/media/libmedia/JetPlayer.cpp @@ -42,7 +42,7 @@ JetPlayer::JetPlayer(jobject javaJetPlayer, int maxTracks, int trackBufferSize) mAudioTrack(NULL), mTrackBufferSize(trackBufferSize) { - LOGV("JetPlayer constructor"); + ALOGV("JetPlayer constructor"); mPreviousJetStatus.currentUserID = -1; mPreviousJetStatus.segmentRepeatCount = -1; mPreviousJetStatus.numQueuedSegments = -1; @@ -52,7 +52,7 @@ JetPlayer::JetPlayer(jobject javaJetPlayer, int maxTracks, int trackBufferSize) //------------------------------------------------------------------------------------------------- JetPlayer::~JetPlayer() { - LOGV("~JetPlayer"); + ALOGV("~JetPlayer"); release(); } @@ -99,13 +99,13 @@ int JetPlayer::init() // create render and playback thread { Mutex::Autolock l(mMutex); - LOGV("JetPlayer::init(): trying to start render thread"); + ALOGV("JetPlayer::init(): trying to start render thread"); createThreadEtc(renderThread, this, "jetRenderThread", ANDROID_PRIORITY_AUDIO); mCondition.wait(mMutex); } if (mTid > 0) { // render thread started, we're ready - LOGV("JetPlayer::init(): render thread(%d) successfully started.", mTid); + ALOGV("JetPlayer::init(): render thread(%d) successfully started.", mTid); mState = EAS_STATE_READY; } else { LOGE("JetPlayer::init(): failed to start render thread."); @@ -125,7 +125,7 @@ void JetPlayer::setEventCallback(jetevent_callback eventCallback) //------------------------------------------------------------------------------------------------- int JetPlayer::release() { - LOGV("JetPlayer::release()"); + ALOGV("JetPlayer::release()"); Mutex::Autolock lock(mMutex); mPaused = true; mRender = false; @@ -168,7 +168,7 @@ int JetPlayer::render() { int temp; bool audioStarted = false; - LOGV("JetPlayer::render(): entering"); + ALOGV("JetPlayer::render(): entering"); // allocate render buffer mAudioBuffer = @@ -182,7 +182,7 @@ int JetPlayer::render() { { Mutex::Autolock l(mMutex); mTid = gettid(); - LOGV("JetPlayer::render(): render thread(%d) signal", mTid); + ALOGV("JetPlayer::render(): render thread(%d) signal", mTid); mCondition.signal(); } @@ -192,21 +192,21 @@ int JetPlayer::render() { if (mEasData == NULL) { mMutex.unlock(); - LOGV("JetPlayer::render(): NULL EAS data, exiting render."); + ALOGV("JetPlayer::render(): NULL EAS data, exiting render."); goto threadExit; } // nothing to render, wait for client thread to wake us up while (!mRender) { - LOGV("JetPlayer::render(): signal wait"); + ALOGV("JetPlayer::render(): signal wait"); if (audioStarted) { mAudioTrack->pause(); // we have to restart the playback once we start rendering again audioStarted = false; } mCondition.wait(mMutex); - LOGV("JetPlayer::render(): signal rx'd"); + ALOGV("JetPlayer::render(): signal rx'd"); } // render midi data into the input buffer @@ -225,7 +225,7 @@ int JetPlayer::render() { } // update playback state - //LOGV("JetPlayer::render(): updating state"); + //ALOGV("JetPlayer::render(): updating state"); JET_Status(mEasData, &mJetStatus); fireUpdateOnStatusChange(); mPaused = mJetStatus.paused; @@ -239,7 +239,7 @@ int JetPlayer::render() { } // Write data to the audio hardware - //LOGV("JetPlayer::render(): writing to audio output"); + //ALOGV("JetPlayer::render(): writing to audio output"); if ((temp = mAudioTrack->write(mAudioBuffer, num_output)) < 0) { LOGE("JetPlayer::render(): Error in writing:%d",temp); return temp; @@ -247,7 +247,7 @@ int JetPlayer::render() { // start audio output if necessary if (!audioStarted) { - LOGV("JetPlayer::render(): starting audio playback"); + ALOGV("JetPlayer::render(): starting audio playback"); mAudioTrack->start(); audioStarted = true; } @@ -338,7 +338,7 @@ void JetPlayer::fireEventsFromJetQueue() //------------------------------------------------------------------------------------------------- int JetPlayer::loadFromFile(const char* path) { - LOGV("JetPlayer::loadFromFile(): path=%s", path); + ALOGV("JetPlayer::loadFromFile(): path=%s", path); Mutex::Autolock lock(mMutex); @@ -363,7 +363,7 @@ int JetPlayer::loadFromFile(const char* path) //------------------------------------------------------------------------------------------------- int JetPlayer::loadFromFD(const int fd, const long long offset, const long long length) { - LOGV("JetPlayer::loadFromFD(): fd=%d offset=%lld length=%lld", fd, offset, length); + ALOGV("JetPlayer::loadFromFD(): fd=%d offset=%lld length=%lld", fd, offset, length); Mutex::Autolock lock(mMutex); @@ -393,7 +393,7 @@ int JetPlayer::closeFile() //------------------------------------------------------------------------------------------------- int JetPlayer::play() { - LOGV("JetPlayer::play(): entering"); + ALOGV("JetPlayer::play(): entering"); Mutex::Autolock lock(mMutex); EAS_RESULT result = JET_Play(mEasData); @@ -407,7 +407,7 @@ int JetPlayer::play() fireUpdateOnStatusChange(); // wake up render thread - LOGV("JetPlayer::play(): wakeup render thread"); + ALOGV("JetPlayer::play(): wakeup render thread"); mCondition.signal(); return result; @@ -435,7 +435,7 @@ int JetPlayer::pause() int JetPlayer::queueSegment(int segmentNum, int libNum, int repeatCount, int transpose, EAS_U32 muteFlags, EAS_U8 userID) { - LOGV("JetPlayer::queueSegment segmentNum=%d, libNum=%d, repeatCount=%d, transpose=%d", + ALOGV("JetPlayer::queueSegment segmentNum=%d, libNum=%d, repeatCount=%d, transpose=%d", segmentNum, libNum, repeatCount, transpose); Mutex::Autolock lock(mMutex); return JET_QueueSegment(mEasData, segmentNum, libNum, repeatCount, transpose, muteFlags, userID); @@ -458,7 +458,7 @@ int JetPlayer::setMuteFlag(int trackNum, bool muteFlag, bool sync) //------------------------------------------------------------------------------------------------- int JetPlayer::triggerClip(int clipId) { - LOGV("JetPlayer::triggerClip clipId=%d", clipId); + ALOGV("JetPlayer::triggerClip clipId=%d", clipId); Mutex::Autolock lock(mMutex); return JET_TriggerClip(mEasData, clipId); } @@ -466,7 +466,7 @@ int JetPlayer::triggerClip(int clipId) //------------------------------------------------------------------------------------------------- int JetPlayer::clearQueue() { - LOGV("JetPlayer::clearQueue"); + ALOGV("JetPlayer::clearQueue"); Mutex::Autolock lock(mMutex); return JET_Clear_Queue(mEasData); } @@ -480,7 +480,7 @@ void JetPlayer::dump() void JetPlayer::dumpJetStatus(S_JET_STATUS* pJetStatus) { if(pJetStatus!=NULL) - LOGV(">> current JET player status: userID=%d segmentRepeatCount=%d numQueuedSegments=%d paused=%d", + ALOGV(">> current JET player status: userID=%d segmentRepeatCount=%d numQueuedSegments=%d paused=%d", pJetStatus->currentUserID, pJetStatus->segmentRepeatCount, pJetStatus->numQueuedSegments, pJetStatus->paused); else diff --git a/media/libmedia/MediaProfiles.cpp b/media/libmedia/MediaProfiles.cpp index 6096b72..109f294 100644 --- a/media/libmedia/MediaProfiles.cpp +++ b/media/libmedia/MediaProfiles.cpp @@ -82,67 +82,67 @@ const MediaProfiles::NameToTagMap MediaProfiles::sCamcorderQualityNameMap[] = { /*static*/ void MediaProfiles::logVideoCodec(const MediaProfiles::VideoCodec& codec) { - LOGV("video codec:"); - LOGV("codec = %d", codec.mCodec); - LOGV("bit rate: %d", codec.mBitRate); - LOGV("frame width: %d", codec.mFrameWidth); - LOGV("frame height: %d", codec.mFrameHeight); - LOGV("frame rate: %d", codec.mFrameRate); + ALOGV("video codec:"); + ALOGV("codec = %d", codec.mCodec); + ALOGV("bit rate: %d", codec.mBitRate); + ALOGV("frame width: %d", codec.mFrameWidth); + ALOGV("frame height: %d", codec.mFrameHeight); + ALOGV("frame rate: %d", codec.mFrameRate); } /*static*/ void MediaProfiles::logAudioCodec(const MediaProfiles::AudioCodec& codec) { - LOGV("audio codec:"); - LOGV("codec = %d", codec.mCodec); - LOGV("bit rate: %d", codec.mBitRate); - LOGV("sample rate: %d", codec.mSampleRate); - LOGV("number of channels: %d", codec.mChannels); + ALOGV("audio codec:"); + ALOGV("codec = %d", codec.mCodec); + ALOGV("bit rate: %d", codec.mBitRate); + ALOGV("sample rate: %d", codec.mSampleRate); + ALOGV("number of channels: %d", codec.mChannels); } /*static*/ void MediaProfiles::logVideoEncoderCap(const MediaProfiles::VideoEncoderCap& cap) { - LOGV("video encoder cap:"); - LOGV("codec = %d", cap.mCodec); - LOGV("bit rate: min = %d and max = %d", cap.mMinBitRate, cap.mMaxBitRate); - LOGV("frame width: min = %d and max = %d", cap.mMinFrameWidth, cap.mMaxFrameWidth); - LOGV("frame height: min = %d and max = %d", cap.mMinFrameHeight, cap.mMaxFrameHeight); - LOGV("frame rate: min = %d and max = %d", cap.mMinFrameRate, cap.mMaxFrameRate); + ALOGV("video encoder cap:"); + ALOGV("codec = %d", cap.mCodec); + ALOGV("bit rate: min = %d and max = %d", cap.mMinBitRate, cap.mMaxBitRate); + ALOGV("frame width: min = %d and max = %d", cap.mMinFrameWidth, cap.mMaxFrameWidth); + ALOGV("frame height: min = %d and max = %d", cap.mMinFrameHeight, cap.mMaxFrameHeight); + ALOGV("frame rate: min = %d and max = %d", cap.mMinFrameRate, cap.mMaxFrameRate); } /*static*/ void MediaProfiles::logAudioEncoderCap(const MediaProfiles::AudioEncoderCap& cap) { - LOGV("audio encoder cap:"); - LOGV("codec = %d", cap.mCodec); - LOGV("bit rate: min = %d and max = %d", cap.mMinBitRate, cap.mMaxBitRate); - LOGV("sample rate: min = %d and max = %d", cap.mMinSampleRate, cap.mMaxSampleRate); - LOGV("number of channels: min = %d and max = %d", cap.mMinChannels, cap.mMaxChannels); + ALOGV("audio encoder cap:"); + ALOGV("codec = %d", cap.mCodec); + ALOGV("bit rate: min = %d and max = %d", cap.mMinBitRate, cap.mMaxBitRate); + ALOGV("sample rate: min = %d and max = %d", cap.mMinSampleRate, cap.mMaxSampleRate); + ALOGV("number of channels: min = %d and max = %d", cap.mMinChannels, cap.mMaxChannels); } /*static*/ void MediaProfiles::logVideoDecoderCap(const MediaProfiles::VideoDecoderCap& cap) { - LOGV("video decoder cap:"); - LOGV("codec = %d", cap.mCodec); + ALOGV("video decoder cap:"); + ALOGV("codec = %d", cap.mCodec); } /*static*/ void MediaProfiles::logAudioDecoderCap(const MediaProfiles::AudioDecoderCap& cap) { - LOGV("audio codec cap:"); - LOGV("codec = %d", cap.mCodec); + ALOGV("audio codec cap:"); + ALOGV("codec = %d", cap.mCodec); } /*static*/ void MediaProfiles::logVideoEditorCap(const MediaProfiles::VideoEditorCap& cap) { - LOGV("videoeditor cap:"); - LOGV("mMaxInputFrameWidth = %d", cap.mMaxInputFrameWidth); - LOGV("mMaxInputFrameHeight = %d", cap.mMaxInputFrameHeight); - LOGV("mMaxOutputFrameWidth = %d", cap.mMaxOutputFrameWidth); - LOGV("mMaxOutputFrameHeight = %d", cap.mMaxOutputFrameHeight); + ALOGV("videoeditor cap:"); + ALOGV("mMaxInputFrameWidth = %d", cap.mMaxInputFrameWidth); + ALOGV("mMaxInputFrameHeight = %d", cap.mMaxInputFrameHeight); + ALOGV("mMaxOutputFrameWidth = %d", cap.mMaxOutputFrameWidth); + ALOGV("mMaxOutputFrameHeight = %d", cap.mMaxOutputFrameHeight); } /*static*/ int @@ -349,7 +349,7 @@ void MediaProfiles::addImageEncodingQualityLevel(int cameraId, const char** atts { CHECK(!strcmp("quality", atts[0])); int quality = atoi(atts[1]); - LOGV("%s: cameraId=%d, quality=%d\n", __func__, cameraId, quality); + ALOGV("%s: cameraId=%d, quality=%d\n", __func__, cameraId, quality); ImageEncodingQualityLevels *levels = findImageEncodingQualityLevels(cameraId); if (levels == NULL) { @@ -377,7 +377,7 @@ void MediaProfiles::addStartTimeOffset(int cameraId, const char** atts) offsetTimeMs = atoi(atts[3]); } - LOGV("%s: cameraId=%d, offset=%d ms", __func__, cameraId, offsetTimeMs); + ALOGV("%s: cameraId=%d, offset=%d ms", __func__, cameraId, offsetTimeMs); mStartTimeOffsets.replaceValueFor(cameraId, offsetTimeMs); } /*static*/ MediaProfiles::ExportVideoProfile* @@ -465,7 +465,7 @@ static bool isTimelapseProfile(camcorder_quality quality) { } void MediaProfiles::initRequiredProfileRefs(const Vector<int>& cameraIds) { - LOGV("Number of camera ids: %d", cameraIds.size()); + ALOGV("Number of camera ids: %d", cameraIds.size()); CHECK(cameraIds.size() > 0); mRequiredProfileRefs = new RequiredProfiles[cameraIds.size()]; for (size_t i = 0, n = cameraIds.size(); i < n; ++i) { @@ -592,14 +592,14 @@ void MediaProfiles::checkAndAddRequiredProfilesIfNecessary() { int index = getCamcorderProfileIndex(cameraId, profile->mQuality); if (index != -1) { - LOGV("Profile quality %d for camera %d already exists", + ALOGV("Profile quality %d for camera %d already exists", profile->mQuality, cameraId); CHECK(index == refIndex); continue; } // Insert the new profile - LOGV("Add a profile: quality %d=>%d for camera %d", + ALOGV("Add a profile: quality %d=>%d for camera %d", mCamcorderProfiles[info->mRefProfileIndex]->mQuality, profile->mQuality, cameraId); @@ -612,7 +612,7 @@ void MediaProfiles::checkAndAddRequiredProfilesIfNecessary() { /*static*/ MediaProfiles* MediaProfiles::getInstance() { - LOGV("getInstance"); + ALOGV("getInstance"); Mutex::Autolock lock(sLock); if (!sIsInitialized) { char value[PROPERTY_VALUE_MAX]; @@ -954,7 +954,7 @@ Vector<video_encoder> MediaProfiles::getVideoEncoders() const int MediaProfiles::getVideoEncoderParamByName(const char *name, video_encoder codec) const { - LOGV("getVideoEncoderParamByName: %s for codec %d", name, codec); + ALOGV("getVideoEncoderParamByName: %s for codec %d", name, codec); int index = -1; for (size_t i = 0, n = mVideoEncoders.size(); i < n; ++i) { if (mVideoEncoders[i]->mCodec == codec) { @@ -982,7 +982,7 @@ int MediaProfiles::getVideoEncoderParamByName(const char *name, video_encoder co int MediaProfiles::getVideoEditorExportParamByName( const char *name, int codec) const { - LOGV("getVideoEditorExportParamByName: name %s codec %d", name, codec); + ALOGV("getVideoEditorExportParamByName: name %s codec %d", name, codec); ExportVideoProfile *exportProfile = NULL; int index = -1; for (size_t i =0; i < mVideoEditorExportProfiles.size(); i++) { @@ -1006,7 +1006,7 @@ int MediaProfiles::getVideoEditorExportParamByName( } int MediaProfiles::getVideoEditorCapParamByName(const char *name) const { - LOGV("getVideoEditorCapParamByName: %s", name); + ALOGV("getVideoEditorCapParamByName: %s", name); if (mVideoEditorCap == NULL) { LOGE("The mVideoEditorCap is not created, then create default cap."); @@ -1039,7 +1039,7 @@ Vector<audio_encoder> MediaProfiles::getAudioEncoders() const int MediaProfiles::getAudioEncoderParamByName(const char *name, audio_encoder codec) const { - LOGV("getAudioEncoderParamByName: %s for codec %d", name, codec); + ALOGV("getAudioEncoderParamByName: %s for codec %d", name, codec); int index = -1; for (size_t i = 0, n = mAudioEncoders.size(); i < n; ++i) { if (mAudioEncoders[i]->mCodec == codec) { @@ -1098,7 +1098,7 @@ int MediaProfiles::getCamcorderProfileParamByName(const char *name, int cameraId, camcorder_quality quality) const { - LOGV("getCamcorderProfileParamByName: %s for camera %d, quality %d", + ALOGV("getCamcorderProfileParamByName: %s for camera %d, quality %d", name, cameraId, quality); int index = getCamcorderProfileIndex(cameraId, quality); @@ -1145,7 +1145,7 @@ int MediaProfiles::getStartTimeOffsetMs(int cameraId) const { if (index >= 0) { offsetTimeMs = mStartTimeOffsets.valueFor(cameraId); } - LOGV("offsetTime=%d ms and cameraId=%d", offsetTimeMs, cameraId); + ALOGV("offsetTime=%d ms and cameraId=%d", offsetTimeMs, cameraId); return offsetTimeMs; } diff --git a/media/libmedia/MediaScanner.cpp b/media/libmedia/MediaScanner.cpp index 19dedfc..b304f8c 100644 --- a/media/libmedia/MediaScanner.cpp +++ b/media/libmedia/MediaScanner.cpp @@ -143,7 +143,7 @@ MediaScanResult MediaScanner::doProcessDirectory( if (pathRemaining >= 8 /* strlen(".nomedia") */ ) { strcpy(fileSpot, ".nomedia"); if (access(path, F_OK) == 0) { - LOGV("found .nomedia, setting noMedia flag\n"); + ALOGV("found .nomedia, setting noMedia flag\n"); noMedia = true; } diff --git a/media/libmedia/ToneGenerator.cpp b/media/libmedia/ToneGenerator.cpp index 7c2200e..28b54b5 100644 --- a/media/libmedia/ToneGenerator.cpp +++ b/media/libmedia/ToneGenerator.cpp @@ -800,7 +800,7 @@ const unsigned char ToneGenerator::sToneMappingTable[NUM_REGIONS-1][NUM_SUP_TONE //////////////////////////////////////////////////////////////////////////////// ToneGenerator::ToneGenerator(int streamType, float volume, bool threadCanCallJava) { - LOGV("ToneGenerator constructor: streamType=%d, volume=%f\n", streamType, volume); + ALOGV("ToneGenerator constructor: streamType=%d, volume=%f\n", streamType, volume); mState = TONE_IDLE; @@ -829,9 +829,9 @@ ToneGenerator::ToneGenerator(int streamType, float volume, bool threadCanCallJav } if (initAudioTrack()) { - LOGV("ToneGenerator INIT OK, time: %d\n", (unsigned int)(systemTime()/1000000)); + ALOGV("ToneGenerator INIT OK, time: %d\n", (unsigned int)(systemTime()/1000000)); } else { - LOGV("!!!ToneGenerator INIT FAILED!!!\n"); + ALOGV("!!!ToneGenerator INIT FAILED!!!\n"); } } @@ -853,11 +853,11 @@ ToneGenerator::ToneGenerator(int streamType, float volume, bool threadCanCallJav // //////////////////////////////////////////////////////////////////////////////// ToneGenerator::~ToneGenerator() { - LOGV("ToneGenerator destructor\n"); + ALOGV("ToneGenerator destructor\n"); if (mpAudioTrack) { stopTone(); - LOGV("Delete Track: %p\n", mpAudioTrack); + ALOGV("Delete Track: %p\n", mpAudioTrack); delete mpAudioTrack; } } @@ -886,13 +886,13 @@ bool ToneGenerator::startTone(int toneType, int durationMs) { return lResult; if (mState == TONE_IDLE) { - LOGV("startTone: try to re-init AudioTrack"); + ALOGV("startTone: try to re-init AudioTrack"); if (!initAudioTrack()) { return lResult; } } - LOGV("startTone\n"); + ALOGV("startTone\n"); mLock.lock(); @@ -903,7 +903,7 @@ bool ToneGenerator::startTone(int toneType, int durationMs) { mDurationMs = durationMs; if (mState == TONE_STOPPED) { - LOGV("Start waiting for previous tone to stop"); + 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); @@ -915,14 +915,14 @@ bool ToneGenerator::startTone(int toneType, int durationMs) { if (mState == TONE_INIT) { if (prepareWave()) { - LOGV("Immediate start, time %d\n", (unsigned int)(systemTime()/1000000)); + ALOGV("Immediate start, time %d\n", (unsigned int)(systemTime()/1000000)); lResult = true; mState = TONE_STARTING; mLock.unlock(); mpAudioTrack->start(); mLock.lock(); if (mState == TONE_STARTING) { - LOGV("Wait for start callback"); + ALOGV("Wait for start callback"); lStatus = mWaitCbkCond.waitRelative(mLock, seconds(3)); if (lStatus != NO_ERROR) { LOGE("--- Immediate start timed out, status %d", lStatus); @@ -934,14 +934,14 @@ bool ToneGenerator::startTone(int toneType, int durationMs) { mState = TONE_IDLE; } } else { - LOGV("Delayed start\n"); + ALOGV("Delayed start\n"); mState = TONE_RESTARTING; lStatus = mWaitCbkCond.waitRelative(mLock, seconds(3)); if (lStatus == NO_ERROR) { if (mState != TONE_IDLE) { lResult = true; } - LOGV("cond received"); + ALOGV("cond received"); } else { LOGE("--- Delayed start timed out, status %d", lStatus); mState = TONE_IDLE; @@ -949,7 +949,7 @@ bool ToneGenerator::startTone(int toneType, int durationMs) { } mLock.unlock(); - LOGV_IF(lResult, "Tone started, time %d\n", (unsigned int)(systemTime()/1000000)); + 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)); return lResult; @@ -969,15 +969,15 @@ bool ToneGenerator::startTone(int toneType, int durationMs) { // //////////////////////////////////////////////////////////////////////////////// void ToneGenerator::stopTone() { - LOGV("stopTone"); + ALOGV("stopTone"); mLock.lock(); if (mState == TONE_PLAYING || mState == TONE_STARTING || mState == TONE_RESTARTING) { mState = TONE_STOPPING; - LOGV("waiting cond"); + ALOGV("waiting cond"); status_t lStatus = mWaitCbkCond.waitRelative(mLock, seconds(3)); if (lStatus == NO_ERROR) { - LOGV("track stop complete, time %d", (unsigned int)(systemTime()/1000000)); + ALOGV("track stop complete, time %d", (unsigned int)(systemTime()/1000000)); } else { LOGE("--- Stop timed out"); mState = TONE_IDLE; @@ -1021,7 +1021,7 @@ bool ToneGenerator::initAudioTrack() { LOGE("AudioTrack allocation failed"); goto initAudioTrack_exit; } - LOGV("Create Track: %p\n", mpAudioTrack); + ALOGV("Create Track: %p\n", mpAudioTrack); mpAudioTrack->set(mStreamType, 0, @@ -1050,7 +1050,7 @@ initAudioTrack_exit: // Cleanup if (mpAudioTrack) { - LOGV("Delete Track I: %p\n", mpAudioTrack); + ALOGV("Delete Track I: %p\n", mpAudioTrack); delete mpAudioTrack; mpAudioTrack = 0; } @@ -1109,22 +1109,22 @@ void ToneGenerator::audioCallback(int event, void* user, void *info) { lWaveCmd = WaveGenerator::WAVEGEN_CONT; break; case TONE_STARTING: - LOGV("Starting Cbk"); + ALOGV("Starting Cbk"); lWaveCmd = WaveGenerator::WAVEGEN_START; break; case TONE_STOPPING: case TONE_RESTARTING: - LOGV("Stop/restart Cbk"); + ALOGV("Stop/restart Cbk"); lWaveCmd = WaveGenerator::WAVEGEN_STOP; lpToneGen->mNextSegSmp = TONEGEN_INF; // forced to skip state machine management below break; case TONE_STOPPED: - LOGV("Stopped Cbk"); + ALOGV("Stopped Cbk"); goto audioCallback_EndLoop; default: - LOGV("Extra Cbk"); + ALOGV("Extra Cbk"); goto audioCallback_EndLoop; } @@ -1145,7 +1145,7 @@ void ToneGenerator::audioCallback(int event, void* user, void *info) { if (lpToneGen->mTotalSmp > lpToneGen->mNextSegSmp) { // Time to go to next sequence segment - LOGV("End Segment, time: %d\n", (unsigned int)(systemTime()/1000000)); + ALOGV("End Segment, time: %d\n", (unsigned int)(systemTime()/1000000)); lGenSmp = lReqSmp; @@ -1160,13 +1160,13 @@ void ToneGenerator::audioCallback(int event, void* user, void *info) { lpWaveGen->getSamples(lpOut, lGenSmp, lWaveCmd); lFrequency = lpToneDesc->segments[lpToneGen->mCurSegment].waveFreq[++lFreqIdx]; } - LOGV("ON->OFF, lGenSmp: %d, lReqSmp: %d\n", lGenSmp, lReqSmp); + ALOGV("ON->OFF, lGenSmp: %d, lReqSmp: %d\n", lGenSmp, lReqSmp); } // check if we need to loop and loop for the reqd times if (lpToneDesc->segments[lpToneGen->mCurSegment].loopCnt) { if (lpToneGen->mLoopCounter < lpToneDesc->segments[lpToneGen->mCurSegment].loopCnt) { - LOGV ("in if loop loopCnt(%d) loopctr(%d), CurSeg(%d) \n", + ALOGV ("in if loop loopCnt(%d) loopctr(%d), CurSeg(%d) \n", lpToneDesc->segments[lpToneGen->mCurSegment].loopCnt, lpToneGen->mLoopCounter, lpToneGen->mCurSegment); @@ -1176,14 +1176,14 @@ void ToneGenerator::audioCallback(int event, void* user, void *info) { // completed loop. go to next segment lpToneGen->mLoopCounter = 0; lpToneGen->mCurSegment++; - LOGV ("in else loop loopCnt(%d) loopctr(%d), CurSeg(%d) \n", + ALOGV ("in else loop loopCnt(%d) loopctr(%d), CurSeg(%d) \n", lpToneDesc->segments[lpToneGen->mCurSegment].loopCnt, lpToneGen->mLoopCounter, lpToneGen->mCurSegment); } } else { lpToneGen->mCurSegment++; - LOGV ("Goto next seg loopCnt(%d) loopctr(%d), CurSeg(%d) \n", + ALOGV ("Goto next seg loopCnt(%d) loopctr(%d), CurSeg(%d) \n", lpToneDesc->segments[lpToneGen->mCurSegment].loopCnt, lpToneGen->mLoopCounter, lpToneGen->mCurSegment); @@ -1192,32 +1192,32 @@ void ToneGenerator::audioCallback(int event, void* user, void *info) { // Handle loop if last segment reached if (lpToneDesc->segments[lpToneGen->mCurSegment].duration == 0) { - LOGV("Last Seg: %d\n", lpToneGen->mCurSegment); + ALOGV("Last Seg: %d\n", lpToneGen->mCurSegment); // Pre increment loop count and restart if total count not reached. Stop sequence otherwise if (++lpToneGen->mCurCount <= lpToneDesc->repeatCnt) { - LOGV("Repeating Count: %d\n", lpToneGen->mCurCount); + ALOGV("Repeating Count: %d\n", lpToneGen->mCurCount); lpToneGen->mCurSegment = lpToneDesc->repeatSegment; if (lpToneDesc->segments[lpToneDesc->repeatSegment].waveFreq[0] != 0) { lWaveCmd = WaveGenerator::WAVEGEN_START; } - LOGV("New segment %d, Next Time: %d\n", lpToneGen->mCurSegment, + ALOGV("New segment %d, Next Time: %d\n", lpToneGen->mCurSegment, (lpToneGen->mNextSegSmp*1000)/lpToneGen->mSamplingRate); } else { lGenSmp = 0; - LOGV("End repeat, time: %d\n", (unsigned int)(systemTime()/1000000)); + ALOGV("End repeat, time: %d\n", (unsigned int)(systemTime()/1000000)); } } else { - LOGV("New segment %d, Next Time: %d\n", lpToneGen->mCurSegment, + ALOGV("New segment %d, Next Time: %d\n", lpToneGen->mCurSegment, (lpToneGen->mNextSegSmp*1000)/lpToneGen->mSamplingRate); if (lpToneDesc->segments[lpToneGen->mCurSegment].waveFreq[0] != 0) { // If next segment is not silent, OFF -> ON transition : reset wave generator lWaveCmd = WaveGenerator::WAVEGEN_START; - LOGV("OFF->ON, lGenSmp: %d, lReqSmp: %d\n", lGenSmp, lReqSmp); + ALOGV("OFF->ON, lGenSmp: %d, lReqSmp: %d\n", lGenSmp, lReqSmp); } else { lGenSmp = 0; } @@ -1255,7 +1255,7 @@ audioCallback_EndLoop: switch (lpToneGen->mState) { case TONE_RESTARTING: - LOGV("Cbk restarting track\n"); + ALOGV("Cbk restarting track\n"); if (lpToneGen->prepareWave()) { lpToneGen->mState = TONE_STARTING; // must reload lpToneDesc as prepareWave() may change mpToneDesc @@ -1270,14 +1270,14 @@ audioCallback_EndLoop: lSignal = true; break; case TONE_STOPPING: - LOGV("Cbk Stopping\n"); + ALOGV("Cbk Stopping\n"); lpToneGen->mState = TONE_STOPPED; // Force loop exit lNumSmp = 0; break; case TONE_STOPPED: lpToneGen->mState = TONE_INIT; - LOGV("Cbk Stopped track\n"); + ALOGV("Cbk Stopped track\n"); lpToneGen->mpAudioTrack->stop(); // Force loop exit lNumSmp = 0; @@ -1285,7 +1285,7 @@ audioCallback_EndLoop: lSignal = true; break; case TONE_STARTING: - LOGV("Cbk starting track\n"); + ALOGV("Cbk starting track\n"); lpToneGen->mState = TONE_PLAYING; lSignal = true; break; @@ -1338,7 +1338,7 @@ bool ToneGenerator::prepareWave() { } else { mMaxSmp = (mDurationMs * mSamplingRate) / 1000; } - LOGV("prepareWave, duration limited to %d ms", mDurationMs); + ALOGV("prepareWave, duration limited to %d ms", mDurationMs); } while (mpToneDesc->segments[segmentIdx].duration) { @@ -1425,7 +1425,7 @@ unsigned int ToneGenerator::numWaves(unsigned int segmentIdx) { // //////////////////////////////////////////////////////////////////////////////// void ToneGenerator::clearWaveGens() { - LOGV("Clearing mWaveGens:"); + ALOGV("Clearing mWaveGens:"); for (size_t lIdx = 0; lIdx < mWaveGens.size(); lIdx++) { delete mWaveGens.valueAt(lIdx); @@ -1456,7 +1456,7 @@ int ToneGenerator::getToneForRegion(int toneType) { regionTone = sToneMappingTable[mRegion][toneType - FIRST_SUP_TONE]; } - LOGV("getToneForRegion, tone %d, region %d, regionTone %d", toneType, mRegion, regionTone); + ALOGV("getToneForRegion, tone %d, region %d, regionTone %d", toneType, mRegion, regionTone); return regionTone; } @@ -1504,7 +1504,7 @@ ToneGenerator::WaveGenerator::WaveGenerator(unsigned short samplingRate, d0 = 32767; mA1_Q14 = (short) d0; - LOGV("WaveGenerator init, mA1_Q14: %d, mS2_0: %d, mAmplitude_Q15: %d\n", + ALOGV("WaveGenerator init, mA1_Q14: %d, mS2_0: %d, mAmplitude_Q15: %d\n", mA1_Q14, mS2_0, mAmplitude_Q15); } diff --git a/media/libmedia/Visualizer.cpp b/media/libmedia/Visualizer.cpp index bf40481..de40f98 100644 --- a/media/libmedia/Visualizer.cpp +++ b/media/libmedia/Visualizer.cpp @@ -120,7 +120,7 @@ status_t Visualizer::setCaptureCallBack(capture_cbk_t cbk, void* user, uint32_t return NO_INIT; } } - LOGV("setCaptureCallBack() rate: %d thread %p flags 0x%08x", + ALOGV("setCaptureCallBack() rate: %d thread %p flags 0x%08x", rate, mCaptureThread.get(), mCaptureFlags); return NO_ERROR; } @@ -147,7 +147,7 @@ status_t Visualizer::setCaptureSize(uint32_t size) *((int32_t *)p->data + 1)= size; status_t status = setParameter(p); - LOGV("setCaptureSize size %d status %d p->status %d", size, status, p->status); + ALOGV("setCaptureSize size %d status %d p->status %d", size, status, p->status); if (status == NO_ERROR) { status = p->status; @@ -172,12 +172,12 @@ status_t Visualizer::getWaveForm(uint8_t *waveform) if (mEnabled) { uint32_t replySize = mCaptureSize; status = command(VISUALIZER_CMD_CAPTURE, 0, NULL, &replySize, waveform); - LOGV("getWaveForm() command returned %d", status); + ALOGV("getWaveForm() command returned %d", status); if (replySize == 0) { status = NOT_ENOUGH_DATA; } } else { - LOGV("getWaveForm() disabled"); + ALOGV("getWaveForm() disabled"); memset(waveform, 0x80, mCaptureSize); } return status; @@ -236,7 +236,7 @@ status_t Visualizer::doFft(uint8_t *fft, uint8_t *waveform) void Visualizer::periodicCapture() { Mutex::Autolock _l(mLock); - LOGV("periodicCapture() %p mCaptureCallBack %p mCaptureFlags 0x%08x", + ALOGV("periodicCapture() %p mCaptureCallBack %p mCaptureFlags 0x%08x", this, mCaptureCallBack, mCaptureFlags); if (mCaptureCallBack != NULL && (mCaptureFlags & (CAPTURE_WAVEFORM|CAPTURE_FFT)) && @@ -289,7 +289,7 @@ uint32_t Visualizer::initCaptureSize() } mCaptureSize = size; - LOGV("initCaptureSize size %d status %d", mCaptureSize, status); + ALOGV("initCaptureSize size %d status %d", mCaptureSize, status); return size; } @@ -300,18 +300,18 @@ Visualizer::CaptureThread::CaptureThread(Visualizer& receiver, uint32_t captureR : Thread(bCanCallJava), mReceiver(receiver) { mSleepTimeUs = 1000000000 / captureRate; - LOGV("CaptureThread cstor %p captureRate %d mSleepTimeUs %d", this, captureRate, mSleepTimeUs); + ALOGV("CaptureThread cstor %p captureRate %d mSleepTimeUs %d", this, captureRate, mSleepTimeUs); } bool Visualizer::CaptureThread::threadLoop() { - LOGV("CaptureThread %p enter", this); + ALOGV("CaptureThread %p enter", this); while (!exitPending()) { usleep(mSleepTimeUs); mReceiver.periodicCapture(); } - LOGV("CaptureThread %p exiting", this); + ALOGV("CaptureThread %p exiting", this); return false; } diff --git a/media/libmedia/mediametadataretriever.cpp b/media/libmedia/mediametadataretriever.cpp index cee06ab..fd8c065 100644 --- a/media/libmedia/mediametadataretriever.cpp +++ b/media/libmedia/mediametadataretriever.cpp @@ -58,7 +58,7 @@ const sp<IMediaPlayerService>& MediaMetadataRetriever::getService() MediaMetadataRetriever::MediaMetadataRetriever() { - LOGV("constructor"); + ALOGV("constructor"); const sp<IMediaPlayerService>& service(getService()); if (service == 0) { LOGE("failed to obtain MediaMetadataRetrieverService"); @@ -73,14 +73,14 @@ MediaMetadataRetriever::MediaMetadataRetriever() MediaMetadataRetriever::~MediaMetadataRetriever() { - LOGV("destructor"); + ALOGV("destructor"); disconnect(); IPCThreadState::self()->flushCommands(); } void MediaMetadataRetriever::disconnect() { - LOGV("disconnect"); + ALOGV("disconnect"); sp<IMediaMetadataRetriever> retriever; { Mutex::Autolock _l(mLock); @@ -95,7 +95,7 @@ void MediaMetadataRetriever::disconnect() status_t MediaMetadataRetriever::setDataSource( const char *srcUrl, const KeyedVector<String8, String8> *headers) { - LOGV("setDataSource"); + ALOGV("setDataSource"); Mutex::Autolock _l(mLock); if (mRetriever == 0) { LOGE("retriever is not initialized"); @@ -105,13 +105,13 @@ status_t MediaMetadataRetriever::setDataSource( LOGE("data source is a null pointer"); return UNKNOWN_ERROR; } - LOGV("data source (%s)", srcUrl); + ALOGV("data source (%s)", srcUrl); return mRetriever->setDataSource(srcUrl, headers); } status_t MediaMetadataRetriever::setDataSource(int fd, int64_t offset, int64_t length) { - LOGV("setDataSource(%d, %lld, %lld)", fd, offset, length); + ALOGV("setDataSource(%d, %lld, %lld)", fd, offset, length); Mutex::Autolock _l(mLock); if (mRetriever == 0) { LOGE("retriever is not initialized"); @@ -126,7 +126,7 @@ status_t MediaMetadataRetriever::setDataSource(int fd, int64_t offset, int64_t l sp<IMemory> MediaMetadataRetriever::getFrameAtTime(int64_t timeUs, int option) { - LOGV("getFrameAtTime: time(%lld us) option(%d)", timeUs, option); + ALOGV("getFrameAtTime: time(%lld us) option(%d)", timeUs, option); Mutex::Autolock _l(mLock); if (mRetriever == 0) { LOGE("retriever is not initialized"); @@ -137,7 +137,7 @@ sp<IMemory> MediaMetadataRetriever::getFrameAtTime(int64_t timeUs, int option) const char* MediaMetadataRetriever::extractMetadata(int keyCode) { - LOGV("extractMetadata(%d)", keyCode); + ALOGV("extractMetadata(%d)", keyCode); Mutex::Autolock _l(mLock); if (mRetriever == 0) { LOGE("retriever is not initialized"); @@ -148,7 +148,7 @@ const char* MediaMetadataRetriever::extractMetadata(int keyCode) sp<IMemory> MediaMetadataRetriever::extractAlbumArt() { - LOGV("extractAlbumArt"); + ALOGV("extractAlbumArt"); Mutex::Autolock _l(mLock); if (mRetriever == 0) { LOGE("retriever is not initialized"); diff --git a/media/libmedia/mediaplayer.cpp b/media/libmedia/mediaplayer.cpp index c2e1ddf..5853144 100644 --- a/media/libmedia/mediaplayer.cpp +++ b/media/libmedia/mediaplayer.cpp @@ -46,7 +46,7 @@ namespace android { MediaPlayer::MediaPlayer() { - LOGV("constructor"); + ALOGV("constructor"); mListener = NULL; mCookie = NULL; mDuration = -1; @@ -67,7 +67,7 @@ MediaPlayer::MediaPlayer() MediaPlayer::~MediaPlayer() { - LOGV("destructor"); + ALOGV("destructor"); AudioSystem::releaseAudioSessionId(mAudioSessionId); disconnect(); IPCThreadState::self()->flushCommands(); @@ -75,7 +75,7 @@ MediaPlayer::~MediaPlayer() void MediaPlayer::disconnect() { - LOGV("disconnect"); + ALOGV("disconnect"); sp<IMediaPlayer> p; { Mutex::Autolock _l(mLock); @@ -99,7 +99,7 @@ void MediaPlayer::clear_l() status_t MediaPlayer::setListener(const sp<MediaPlayerListener>& listener) { - LOGV("setListener"); + ALOGV("setListener"); Mutex::Autolock _l(mLock); mListener = listener; return NO_ERROR; @@ -140,7 +140,7 @@ status_t MediaPlayer::attachNewPlayer(const sp<IMediaPlayer>& player) status_t MediaPlayer::setDataSource( const char *url, const KeyedVector<String8, String8> *headers) { - LOGV("setDataSource(%s)", url); + ALOGV("setDataSource(%s)", url); status_t err = BAD_VALUE; if (url != NULL) { const sp<IMediaPlayerService>& service(getMediaPlayerService()); @@ -157,7 +157,7 @@ status_t MediaPlayer::setDataSource( status_t MediaPlayer::setDataSource(int fd, int64_t offset, int64_t length) { - LOGV("setDataSource(%d, %lld, %lld)", fd, offset, length); + ALOGV("setDataSource(%d, %lld, %lld)", fd, offset, length); status_t err = UNKNOWN_ERROR; const sp<IMediaPlayerService>& service(getMediaPlayerService()); if (service != 0) { @@ -172,7 +172,7 @@ status_t MediaPlayer::setDataSource(int fd, int64_t offset, int64_t length) status_t MediaPlayer::setDataSource(const sp<IStreamSource> &source) { - LOGV("setDataSource"); + ALOGV("setDataSource"); status_t err = UNKNOWN_ERROR; const sp<IMediaPlayerService>& service(getMediaPlayerService()); if (service != 0) { @@ -192,7 +192,7 @@ status_t MediaPlayer::invoke(const Parcel& request, Parcel *reply) (mCurrentState != MEDIA_PLAYER_STATE_ERROR) && ((mCurrentState & MEDIA_PLAYER_IDLE) != MEDIA_PLAYER_IDLE); if ((mPlayer != NULL) && hasBeenInitialized) { - LOGV("invoke %d", request.dataSize()); + ALOGV("invoke %d", request.dataSize()); return mPlayer->invoke(request, reply); } LOGE("invoke failed: wrong state %X", mCurrentState); @@ -222,7 +222,7 @@ status_t MediaPlayer::getMetadata(bool update_only, bool apply_filter, Parcel *m status_t MediaPlayer::setVideoSurfaceTexture( const sp<ISurfaceTexture>& surfaceTexture) { - LOGV("setVideoSurfaceTexture"); + ALOGV("setVideoSurfaceTexture"); Mutex::Autolock _l(mLock); if (mPlayer == 0) return NO_INIT; return mPlayer->setVideoSurfaceTexture(surfaceTexture); @@ -246,7 +246,7 @@ status_t MediaPlayer::prepareAsync_l() // code. status_t MediaPlayer::prepare() { - LOGV("prepare"); + ALOGV("prepare"); Mutex::Autolock _l(mLock); mLockThreadId = getThreadId(); if (mPrepareSync) { @@ -264,21 +264,21 @@ status_t MediaPlayer::prepare() mSignal.wait(mLock); // wait for prepare done mPrepareSync = false; } - LOGV("prepare complete - status=%d", mPrepareStatus); + ALOGV("prepare complete - status=%d", mPrepareStatus); mLockThreadId = 0; return mPrepareStatus; } status_t MediaPlayer::prepareAsync() { - LOGV("prepareAsync"); + ALOGV("prepareAsync"); Mutex::Autolock _l(mLock); return prepareAsync_l(); } status_t MediaPlayer::start() { - LOGV("start"); + ALOGV("start"); Mutex::Autolock _l(mLock); if (mCurrentState & MEDIA_PLAYER_STARTED) return NO_ERROR; @@ -293,7 +293,7 @@ status_t MediaPlayer::start() mCurrentState = MEDIA_PLAYER_STATE_ERROR; } else { if (mCurrentState == MEDIA_PLAYER_PLAYBACK_COMPLETE) { - LOGV("playback completed immediately following start()"); + ALOGV("playback completed immediately following start()"); } } return ret; @@ -304,7 +304,7 @@ status_t MediaPlayer::start() status_t MediaPlayer::stop() { - LOGV("stop"); + ALOGV("stop"); Mutex::Autolock _l(mLock); if (mCurrentState & MEDIA_PLAYER_STOPPED) return NO_ERROR; if ( (mPlayer != 0) && ( mCurrentState & ( MEDIA_PLAYER_STARTED | MEDIA_PLAYER_PREPARED | @@ -323,7 +323,7 @@ status_t MediaPlayer::stop() status_t MediaPlayer::pause() { - LOGV("pause"); + ALOGV("pause"); Mutex::Autolock _l(mLock); if (mCurrentState & (MEDIA_PLAYER_PAUSED|MEDIA_PLAYER_PLAYBACK_COMPLETE)) return NO_ERROR; @@ -346,20 +346,20 @@ bool MediaPlayer::isPlaying() if (mPlayer != 0) { bool temp = false; mPlayer->isPlaying(&temp); - LOGV("isPlaying: %d", temp); + ALOGV("isPlaying: %d", temp); if ((mCurrentState & MEDIA_PLAYER_STARTED) && ! temp) { LOGE("internal/external state mismatch corrected"); mCurrentState = MEDIA_PLAYER_PAUSED; } return temp; } - LOGV("isPlaying: no active player"); + ALOGV("isPlaying: no active player"); return false; } status_t MediaPlayer::getVideoWidth(int *w) { - LOGV("getVideoWidth"); + ALOGV("getVideoWidth"); Mutex::Autolock _l(mLock); if (mPlayer == 0) return INVALID_OPERATION; *w = mVideoWidth; @@ -368,7 +368,7 @@ status_t MediaPlayer::getVideoWidth(int *w) status_t MediaPlayer::getVideoHeight(int *h) { - LOGV("getVideoHeight"); + ALOGV("getVideoHeight"); Mutex::Autolock _l(mLock); if (mPlayer == 0) return INVALID_OPERATION; *h = mVideoHeight; @@ -377,11 +377,11 @@ status_t MediaPlayer::getVideoHeight(int *h) status_t MediaPlayer::getCurrentPosition(int *msec) { - LOGV("getCurrentPosition"); + ALOGV("getCurrentPosition"); Mutex::Autolock _l(mLock); if (mPlayer != 0) { if (mCurrentPosition >= 0) { - LOGV("Using cached seek position: %d", mCurrentPosition); + ALOGV("Using cached seek position: %d", mCurrentPosition); *msec = mCurrentPosition; return NO_ERROR; } @@ -392,7 +392,7 @@ status_t MediaPlayer::getCurrentPosition(int *msec) status_t MediaPlayer::getDuration_l(int *msec) { - LOGV("getDuration"); + ALOGV("getDuration"); bool isValidState = (mCurrentState & (MEDIA_PLAYER_PREPARED | MEDIA_PLAYER_STARTED | MEDIA_PLAYER_PAUSED | MEDIA_PLAYER_STOPPED | MEDIA_PLAYER_PLAYBACK_COMPLETE)); if (mPlayer != 0 && isValidState) { status_t ret = NO_ERROR; @@ -414,7 +414,7 @@ status_t MediaPlayer::getDuration(int *msec) status_t MediaPlayer::seekTo_l(int msec) { - LOGV("seekTo %d", 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); @@ -431,7 +431,7 @@ status_t MediaPlayer::seekTo_l(int msec) return mPlayer->seekTo(msec); } else { - LOGV("Seek in progress - queue up seekTo[%d]", msec); + ALOGV("Seek in progress - queue up seekTo[%d]", msec); return NO_ERROR; } } @@ -473,14 +473,14 @@ status_t MediaPlayer::reset_l() status_t MediaPlayer::reset() { - LOGV("reset"); + ALOGV("reset"); Mutex::Autolock _l(mLock); return reset_l(); } status_t MediaPlayer::setAudioStreamType(int type) { - LOGV("MediaPlayer::setAudioStreamType"); + ALOGV("MediaPlayer::setAudioStreamType"); Mutex::Autolock _l(mLock); if (mStreamType == type) return NO_ERROR; if (mCurrentState & ( MEDIA_PLAYER_PREPARED | MEDIA_PLAYER_STARTED | @@ -496,7 +496,7 @@ status_t MediaPlayer::setAudioStreamType(int type) status_t MediaPlayer::setLooping(int loop) { - LOGV("MediaPlayer::setLooping"); + ALOGV("MediaPlayer::setLooping"); Mutex::Autolock _l(mLock); mLoop = (loop != 0); if (mPlayer != 0) { @@ -506,18 +506,18 @@ status_t MediaPlayer::setLooping(int loop) } bool MediaPlayer::isLooping() { - LOGV("isLooping"); + ALOGV("isLooping"); Mutex::Autolock _l(mLock); if (mPlayer != 0) { return mLoop; } - LOGV("isLooping: no active player"); + ALOGV("isLooping: no active player"); return false; } status_t MediaPlayer::setVolume(float leftVolume, float rightVolume) { - LOGV("MediaPlayer::setVolume(%f, %f)", leftVolume, rightVolume); + ALOGV("MediaPlayer::setVolume(%f, %f)", leftVolume, rightVolume); Mutex::Autolock _l(mLock); mLeftVolume = leftVolume; mRightVolume = rightVolume; @@ -529,7 +529,7 @@ status_t MediaPlayer::setVolume(float leftVolume, float rightVolume) status_t MediaPlayer::setAudioSessionId(int sessionId) { - LOGV("MediaPlayer::setAudioSessionId(%d)", sessionId); + ALOGV("MediaPlayer::setAudioSessionId(%d)", sessionId); Mutex::Autolock _l(mLock); if (!(mCurrentState & MEDIA_PLAYER_IDLE)) { LOGE("setAudioSessionId called in state %d", mCurrentState); @@ -554,7 +554,7 @@ int MediaPlayer::getAudioSessionId() status_t MediaPlayer::setAuxEffectSendLevel(float level) { - LOGV("MediaPlayer::setAuxEffectSendLevel(%f)", level); + ALOGV("MediaPlayer::setAuxEffectSendLevel(%f)", level); Mutex::Autolock _l(mLock); mSendLevel = level; if (mPlayer != 0) { @@ -565,7 +565,7 @@ status_t MediaPlayer::setAuxEffectSendLevel(float level) status_t MediaPlayer::attachAuxEffect(int effectId) { - LOGV("MediaPlayer::attachAuxEffect(%d)", effectId); + ALOGV("MediaPlayer::attachAuxEffect(%d)", effectId); Mutex::Autolock _l(mLock); if (mPlayer == 0 || (mCurrentState & MEDIA_PLAYER_IDLE) || @@ -579,29 +579,29 @@ status_t MediaPlayer::attachAuxEffect(int effectId) status_t MediaPlayer::setParameter(int key, const Parcel& request) { - LOGV("MediaPlayer::setParameter(%d)", key); + ALOGV("MediaPlayer::setParameter(%d)", key); Mutex::Autolock _l(mLock); if (mPlayer != NULL) { return mPlayer->setParameter(key, request); } - LOGV("setParameter: no active player"); + ALOGV("setParameter: no active player"); return INVALID_OPERATION; } status_t MediaPlayer::getParameter(int key, Parcel *reply) { - LOGV("MediaPlayer::getParameter(%d)", key); + ALOGV("MediaPlayer::getParameter(%d)", key); Mutex::Autolock _l(mLock); if (mPlayer != NULL) { return mPlayer->getParameter(key, reply); } - LOGV("getParameter: no active player"); + ALOGV("getParameter: no active player"); return INVALID_OPERATION; } void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj) { - LOGV("message received msg=%d, ext1=%d, ext2=%d", msg, ext1, ext2); + ALOGV("message received msg=%d, ext1=%d, ext2=%d", msg, ext1, ext2); bool send = true; bool locked = false; @@ -620,7 +620,7 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj) // Allows calls from JNI in idle state to notify errors if (!(msg == MEDIA_ERROR && mCurrentState == MEDIA_PLAYER_IDLE) && mPlayer == 0) { - LOGV("notify(%d, %d, %d) callback on disconnected mediaplayer", msg, ext1, ext2); + ALOGV("notify(%d, %d, %d) callback on disconnected mediaplayer", msg, ext1, ext2); if (locked) mLock.unlock(); // release the lock when done. return; } @@ -629,17 +629,17 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj) case MEDIA_NOP: // interface test message break; case MEDIA_PREPARED: - LOGV("prepared"); + ALOGV("prepared"); mCurrentState = MEDIA_PLAYER_PREPARED; if (mPrepareSync) { - LOGV("signal application thread"); + ALOGV("signal application thread"); mPrepareSync = false; mPrepareStatus = NO_ERROR; mSignal.signal(); } break; case MEDIA_PLAYBACK_COMPLETE: - LOGV("playback complete"); + ALOGV("playback complete"); if (mCurrentState == MEDIA_PLAYER_IDLE) { LOGE("playback complete in idle state"); } @@ -655,7 +655,7 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj) mCurrentState = MEDIA_PLAYER_STATE_ERROR; if (mPrepareSync) { - LOGV("signal application thread"); + ALOGV("signal application thread"); mPrepareSync = false; mPrepareStatus = ext1; mSignal.signal(); @@ -670,30 +670,30 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj) } break; case MEDIA_SEEK_COMPLETE: - LOGV("Received seek complete"); + ALOGV("Received seek complete"); if (mSeekPosition != mCurrentPosition) { - LOGV("Executing queued seekTo(%d)", mSeekPosition); + ALOGV("Executing queued seekTo(%d)", mSeekPosition); mSeekPosition = -1; seekTo_l(mCurrentPosition); } else { - LOGV("All seeks complete - return to regularly scheduled program"); + ALOGV("All seeks complete - return to regularly scheduled program"); mCurrentPosition = mSeekPosition = -1; } break; case MEDIA_BUFFERING_UPDATE: - LOGV("buffering %d", ext1); + ALOGV("buffering %d", ext1); break; case MEDIA_SET_VIDEO_SIZE: - LOGV("New video size %d x %d", ext1, ext2); + ALOGV("New video size %d x %d", ext1, ext2); mVideoWidth = ext1; mVideoHeight = ext2; break; case MEDIA_TIMED_TEXT: - LOGV("Received timed text message"); + ALOGV("Received timed text message"); break; default: - LOGV("unrecognized message: (%d, %d, %d)", msg, ext1, ext2); + ALOGV("unrecognized message: (%d, %d, %d)", msg, ext1, ext2); break; } @@ -703,15 +703,15 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj) // this prevents re-entrant calls into client code if ((listener != 0) && send) { Mutex::Autolock _l(mNotifyLock); - LOGV("callback application"); + ALOGV("callback application"); listener->notify(msg, ext1, ext2, obj); - LOGV("back from callback"); + ALOGV("back from callback"); } } /*static*/ sp<IMemory> MediaPlayer::decode(const char* url, uint32_t *pSampleRate, int* pNumChannels, int* pFormat) { - LOGV("decode(%s)", url); + ALOGV("decode(%s)", url); sp<IMemory> p; const sp<IMediaPlayerService>& service = getMediaPlayerService(); if (service != 0) { @@ -725,13 +725,13 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj) void MediaPlayer::died() { - LOGV("died"); + ALOGV("died"); notify(MEDIA_ERROR, MEDIA_ERROR_SERVER_DIED, 0); } /*static*/ sp<IMemory> MediaPlayer::decode(int fd, int64_t offset, int64_t length, uint32_t *pSampleRate, int* pNumChannels, int* pFormat) { - LOGV("decode(%d, %lld, %lld)", fd, offset, length); + ALOGV("decode(%d, %lld, %lld)", fd, offset, length); sp<IMemory> p; const sp<IMediaPlayerService>& service = getMediaPlayerService(); if (service != 0) { diff --git a/media/libmedia/mediarecorder.cpp b/media/libmedia/mediarecorder.cpp index 11d281f..ec62978 100644 --- a/media/libmedia/mediarecorder.cpp +++ b/media/libmedia/mediarecorder.cpp @@ -31,7 +31,7 @@ namespace android { status_t MediaRecorder::setCamera(const sp<ICamera>& camera, const sp<ICameraRecordingProxy>& proxy) { - LOGV("setCamera(%p,%p)", camera.get(), proxy.get()); + ALOGV("setCamera(%p,%p)", camera.get(), proxy.get()); if(mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -43,7 +43,7 @@ status_t MediaRecorder::setCamera(const sp<ICamera>& camera, const sp<ICameraRec status_t ret = mMediaRecorder->setCamera(camera, proxy); if (OK != ret) { - LOGV("setCamera failed: %d", ret); + ALOGV("setCamera failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -52,7 +52,7 @@ status_t MediaRecorder::setCamera(const sp<ICamera>& camera, const sp<ICameraRec status_t MediaRecorder::setPreviewSurface(const sp<Surface>& surface) { - LOGV("setPreviewSurface(%p)", surface.get()); + ALOGV("setPreviewSurface(%p)", surface.get()); if(mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -68,7 +68,7 @@ status_t MediaRecorder::setPreviewSurface(const sp<Surface>& surface) status_t ret = mMediaRecorder->setPreviewSurface(surface); if (OK != ret) { - LOGV("setPreviewSurface failed: %d", ret); + ALOGV("setPreviewSurface failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -77,7 +77,7 @@ status_t MediaRecorder::setPreviewSurface(const sp<Surface>& surface) status_t MediaRecorder::init() { - LOGV("init"); + ALOGV("init"); if(mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -89,14 +89,14 @@ status_t MediaRecorder::init() status_t ret = mMediaRecorder->init(); if (OK != ret) { - LOGV("init failed: %d", ret); + ALOGV("init failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } ret = mMediaRecorder->setListener(this); if (OK != ret) { - LOGV("setListener failed: %d", ret); + ALOGV("setListener failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -107,7 +107,7 @@ status_t MediaRecorder::init() status_t MediaRecorder::setVideoSource(int vs) { - LOGV("setVideoSource(%d)", vs); + ALOGV("setVideoSource(%d)", vs); if(mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -117,7 +117,7 @@ status_t MediaRecorder::setVideoSource(int vs) return INVALID_OPERATION; } if (mCurrentState & MEDIA_RECORDER_IDLE) { - LOGV("Call init() since the media recorder is not initialized yet"); + ALOGV("Call init() since the media recorder is not initialized yet"); status_t ret = init(); if (OK != ret) { return ret; @@ -132,7 +132,7 @@ status_t MediaRecorder::setVideoSource(int vs) status_t ret = mMediaRecorder->setVideoSource(vs); if (OK != ret) { - LOGV("setVideoSource failed: %d", ret); + ALOGV("setVideoSource failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -142,13 +142,13 @@ status_t MediaRecorder::setVideoSource(int vs) status_t MediaRecorder::setAudioSource(int as) { - LOGV("setAudioSource(%d)", as); + ALOGV("setAudioSource(%d)", as); if(mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (mCurrentState & MEDIA_RECORDER_IDLE) { - LOGV("Call init() since the media recorder is not initialized yet"); + ALOGV("Call init() since the media recorder is not initialized yet"); status_t ret = init(); if (OK != ret) { return ret; @@ -165,7 +165,7 @@ status_t MediaRecorder::setAudioSource(int as) status_t ret = mMediaRecorder->setAudioSource(as); if (OK != ret) { - LOGV("setAudioSource failed: %d", ret); + ALOGV("setAudioSource failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -175,7 +175,7 @@ status_t MediaRecorder::setAudioSource(int as) status_t MediaRecorder::setOutputFormat(int of) { - LOGV("setOutputFormat(%d)", of); + ALOGV("setOutputFormat(%d)", of); if(mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -201,7 +201,7 @@ status_t MediaRecorder::setOutputFormat(int of) status_t MediaRecorder::setVideoEncoder(int ve) { - LOGV("setVideoEncoder(%d)", ve); + ALOGV("setVideoEncoder(%d)", ve); if(mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -221,7 +221,7 @@ status_t MediaRecorder::setVideoEncoder(int ve) status_t ret = mMediaRecorder->setVideoEncoder(ve); if (OK != ret) { - LOGV("setVideoEncoder failed: %d", ret); + ALOGV("setVideoEncoder failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -231,7 +231,7 @@ status_t MediaRecorder::setVideoEncoder(int ve) status_t MediaRecorder::setAudioEncoder(int ae) { - LOGV("setAudioEncoder(%d)", ae); + ALOGV("setAudioEncoder(%d)", ae); if(mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -251,7 +251,7 @@ status_t MediaRecorder::setAudioEncoder(int ae) status_t ret = mMediaRecorder->setAudioEncoder(ae); if (OK != ret) { - LOGV("setAudioEncoder failed: %d", ret); + ALOGV("setAudioEncoder failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -261,7 +261,7 @@ status_t MediaRecorder::setAudioEncoder(int ae) status_t MediaRecorder::setOutputFile(const char* path) { - LOGV("setOutputFile(%s)", path); + ALOGV("setOutputFile(%s)", path); if(mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -277,7 +277,7 @@ status_t MediaRecorder::setOutputFile(const char* path) status_t ret = mMediaRecorder->setOutputFile(path); if (OK != ret) { - LOGV("setOutputFile failed: %d", ret); + ALOGV("setOutputFile failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -287,7 +287,7 @@ status_t MediaRecorder::setOutputFile(const char* path) status_t MediaRecorder::setOutputFile(int fd, int64_t offset, int64_t length) { - LOGV("setOutputFile(%d, %lld, %lld)", fd, offset, length); + ALOGV("setOutputFile(%d, %lld, %lld)", fd, offset, length); if(mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -314,7 +314,7 @@ status_t MediaRecorder::setOutputFile(int fd, int64_t offset, int64_t length) status_t ret = mMediaRecorder->setOutputFile(fd, offset, length); if (OK != ret) { - LOGV("setOutputFile failed: %d", ret); + ALOGV("setOutputFile failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -324,7 +324,7 @@ status_t MediaRecorder::setOutputFile(int fd, int64_t offset, int64_t length) status_t MediaRecorder::setVideoSize(int width, int height) { - LOGV("setVideoSize(%d, %d)", width, height); + ALOGV("setVideoSize(%d, %d)", width, height); if(mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -367,7 +367,7 @@ sp<ISurfaceTexture> MediaRecorder:: status_t MediaRecorder::setVideoFrameRate(int frames_per_second) { - LOGV("setVideoFrameRate(%d)", frames_per_second); + ALOGV("setVideoFrameRate(%d)", frames_per_second); if(mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -391,7 +391,7 @@ status_t MediaRecorder::setVideoFrameRate(int frames_per_second) } status_t MediaRecorder::setParameters(const String8& params) { - LOGV("setParameters(%s)", params.string()); + ALOGV("setParameters(%s)", params.string()); if(mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -419,7 +419,7 @@ status_t MediaRecorder::setParameters(const String8& params) { status_t MediaRecorder::prepare() { - LOGV("prepare"); + ALOGV("prepare"); if(mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -458,7 +458,7 @@ status_t MediaRecorder::prepare() status_t MediaRecorder::getMaxAmplitude(int* max) { - LOGV("getMaxAmplitude"); + ALOGV("getMaxAmplitude"); if(mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -479,7 +479,7 @@ status_t MediaRecorder::getMaxAmplitude(int* max) status_t MediaRecorder::start() { - LOGV("start"); + ALOGV("start"); if (mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -501,7 +501,7 @@ status_t MediaRecorder::start() status_t MediaRecorder::stop() { - LOGV("stop"); + ALOGV("stop"); if (mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -529,7 +529,7 @@ status_t MediaRecorder::stop() // Reset should be OK in any state status_t MediaRecorder::reset() { - LOGV("reset"); + ALOGV("reset"); if (mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -565,7 +565,7 @@ status_t MediaRecorder::reset() status_t MediaRecorder::close() { - LOGV("close"); + ALOGV("close"); if (!(mCurrentState & MEDIA_RECORDER_INITIALIZED)) { LOGE("close called in an invalid state: %d", mCurrentState); return INVALID_OPERATION; @@ -583,7 +583,7 @@ status_t MediaRecorder::close() status_t MediaRecorder::doReset() { - LOGV("doReset"); + ALOGV("doReset"); status_t ret = mMediaRecorder->reset(); if (OK != ret) { LOGE("doReset failed: %d", ret); @@ -597,7 +597,7 @@ status_t MediaRecorder::doReset() void MediaRecorder::doCleanUp() { - LOGV("doCleanUp"); + ALOGV("doCleanUp"); mIsAudioSourceSet = false; mIsVideoSourceSet = false; mIsAudioEncoderSet = false; @@ -608,7 +608,7 @@ void MediaRecorder::doCleanUp() // Release should be OK in any state status_t MediaRecorder::release() { - LOGV("release"); + ALOGV("release"); if (mMediaRecorder != NULL) { return mMediaRecorder->release(); } @@ -617,7 +617,7 @@ status_t MediaRecorder::release() MediaRecorder::MediaRecorder() : mSurfaceMediaSource(NULL) { - LOGV("constructor"); + ALOGV("constructor"); const sp<IMediaPlayerService>& service(getMediaPlayerService()); if (service != NULL) { @@ -638,7 +638,7 @@ status_t MediaRecorder::initCheck() MediaRecorder::~MediaRecorder() { - LOGV("destructor"); + ALOGV("destructor"); if (mMediaRecorder != NULL) { mMediaRecorder.clear(); } @@ -650,7 +650,7 @@ MediaRecorder::~MediaRecorder() status_t MediaRecorder::setListener(const sp<MediaRecorderListener>& listener) { - LOGV("setListener"); + ALOGV("setListener"); Mutex::Autolock _l(mLock); mListener = listener; @@ -659,7 +659,7 @@ status_t MediaRecorder::setListener(const sp<MediaRecorderListener>& listener) void MediaRecorder::notify(int msg, int ext1, int ext2) { - LOGV("message received msg=%d, ext1=%d, ext2=%d", msg, ext1, ext2); + ALOGV("message received msg=%d, ext1=%d, ext2=%d", msg, ext1, ext2); sp<MediaRecorderListener> listener; mLock.lock(); @@ -668,15 +668,15 @@ void MediaRecorder::notify(int msg, int ext1, int ext2) if (listener != NULL) { Mutex::Autolock _l(mNotifyLock); - LOGV("callback application"); + ALOGV("callback application"); listener->notify(msg, ext1, ext2); - LOGV("back from callback"); + ALOGV("back from callback"); } } void MediaRecorder::died() { - LOGV("died"); + ALOGV("died"); notify(MEDIA_RECORDER_EVENT_ERROR, MEDIA_ERROR_SERVER_DIED, 0); } |