diff options
Diffstat (limited to 'media/libmedia')
-rw-r--r-- | media/libmedia/AudioEffect.cpp | 6 | ||||
-rw-r--r-- | media/libmedia/AudioRecord.cpp | 18 | ||||
-rw-r--r-- | media/libmedia/AudioSystem.cpp | 2 | ||||
-rw-r--r-- | media/libmedia/AudioTrack.cpp | 30 | ||||
-rw-r--r-- | media/libmedia/IAudioFlinger.cpp | 6 | ||||
-rw-r--r-- | media/libmedia/IMediaDeathNotifier.cpp | 2 | ||||
-rw-r--r-- | media/libmedia/JetPlayer.cpp | 20 | ||||
-rw-r--r-- | media/libmedia/MediaProfiles.cpp | 26 | ||||
-rw-r--r-- | media/libmedia/MediaScannerClient.cpp | 6 | ||||
-rw-r--r-- | media/libmedia/Metadata.cpp | 4 | ||||
-rw-r--r-- | media/libmedia/ToneGenerator.cpp | 14 | ||||
-rw-r--r-- | media/libmedia/Visualizer.cpp | 4 | ||||
-rw-r--r-- | media/libmedia/mediametadataretriever.cpp | 20 | ||||
-rw-r--r-- | media/libmedia/mediaplayer.cpp | 36 | ||||
-rw-r--r-- | media/libmedia/mediarecorder.cpp | 130 |
15 files changed, 162 insertions, 162 deletions
diff --git a/media/libmedia/AudioEffect.cpp b/media/libmedia/AudioEffect.cpp index d74389d8..6639d063 100644 --- a/media/libmedia/AudioEffect.cpp +++ b/media/libmedia/AudioEffect.cpp @@ -107,7 +107,7 @@ status_t AudioEffect::set(const effect_uuid_t *type, const sp<IAudioFlinger>& audioFlinger = AudioSystem::get_audio_flinger(); if (audioFlinger == 0) { - LOGE("set(): Could not get audioflinger"); + ALOGE("set(): Could not get audioflinger"); return NO_INIT; } @@ -138,7 +138,7 @@ status_t AudioEffect::set(const effect_uuid_t *type, mIEffectClient, priority, io, mSessionId, &mStatus, &mId, &enabled); if (iEffect == 0 || (mStatus != NO_ERROR && mStatus != ALREADY_EXISTS)) { - LOGE("set(): AudioFlinger could not create effect, status: %d", mStatus); + ALOGE("set(): AudioFlinger could not create effect, status: %d", mStatus); return mStatus; } @@ -148,7 +148,7 @@ status_t AudioEffect::set(const effect_uuid_t *type, cblk = iEffect->getCblk(); if (cblk == 0) { mStatus = NO_INIT; - LOGE("Could not get control block"); + ALOGE("Could not get control block"); return mStatus; } diff --git a/media/libmedia/AudioRecord.cpp b/media/libmedia/AudioRecord.cpp index c1591a46..26740707 100644 --- a/media/libmedia/AudioRecord.cpp +++ b/media/libmedia/AudioRecord.cpp @@ -54,12 +54,12 @@ status_t AudioRecord::getMinFrameCount( size_t size = 0; if (AudioSystem::getInputBufferSize(sampleRate, format, channelCount, &size) != NO_ERROR) { - LOGE("AudioSystem could not query the input buffer size."); + ALOGE("AudioSystem could not query the input buffer size."); return NO_INIT; } if (size == 0) { - LOGE("Unsupported configuration: sampleRate %d, format %d, channelCount %d", + ALOGE("Unsupported configuration: sampleRate %d, format %d, channelCount %d", sampleRate, format, channelCount); return BAD_VALUE; } @@ -153,7 +153,7 @@ status_t AudioRecord::set( } // validate parameters if (!audio_is_valid_format(format)) { - LOGE("Invalid format"); + ALOGE("Invalid format"); return BAD_VALUE; } @@ -177,7 +177,7 @@ status_t AudioRecord::set( (audio_in_acoustics_t)flags, mSessionId); if (input == 0) { - LOGE("Could not get audio input for record source %d", inputSource); + ALOGE("Could not get audio input for record source %d", inputSource); return BAD_VALUE; } @@ -292,7 +292,7 @@ status_t AudioRecord::start() if (t != 0) { if (t->exitPending()) { if (t->requestExitAndWait() == WOULD_BLOCK) { - LOGE("AudioRecord::start called from thread"); + ALOGE("AudioRecord::start called from thread"); return WOULD_BLOCK; } } @@ -472,12 +472,12 @@ status_t AudioRecord::openRecord_l( &status); if (record == 0) { - LOGE("AudioFlinger could not create record track, status: %d", status); + ALOGE("AudioFlinger could not create record track, status: %d", status); return status; } sp<IMemory> cblk = record->getCblk(); if (cblk == 0) { - LOGE("Could not get control block"); + ALOGE("Could not get control block"); return NO_INIT; } mAudioRecord.clear(); @@ -626,7 +626,7 @@ ssize_t AudioRecord::read(void* buffer, size_t userSize) if (ssize_t(userSize) < 0) { // sanity-check. user is most-likely passing an error code. - LOGE("AudioRecord::read(buffer=%p, size=%u (%d)", + ALOGE("AudioRecord::read(buffer=%p, size=%u (%d)", buffer, userSize, userSize); return BAD_VALUE; } @@ -709,7 +709,7 @@ bool AudioRecord::processAudioBuffer(const sp<ClientRecordThread>& thread) status_t err = obtainBuffer(&audioBuffer, 1); if (err < NO_ERROR) { if (err != TIMED_OUT) { - LOGE_IF(err != status_t(NO_MORE_BUFFERS), "Error obtaining an audio buffer, giving up."); + ALOGE_IF(err != status_t(NO_MORE_BUFFERS), "Error obtaining an audio buffer, giving up."); return false; } break; diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp index 0ef1885b..f7f129c3 100644 --- a/media/libmedia/AudioSystem.cpp +++ b/media/libmedia/AudioSystem.cpp @@ -70,7 +70,7 @@ const sp<IAudioFlinger>& AudioSystem::get_audio_flinger() gAudioFlinger = interface_cast<IAudioFlinger>(binder); gAudioFlinger->registerClient(gAudioFlingerClient); } - LOGE_IF(gAudioFlinger==0, "no AudioFlinger!?"); + ALOGE_IF(gAudioFlinger==0, "no AudioFlinger!?"); return gAudioFlinger; } diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp index 891e3319..d290cd13 100644 --- a/media/libmedia/AudioTrack.cpp +++ b/media/libmedia/AudioTrack.cpp @@ -158,7 +158,7 @@ status_t AudioTrack::set( AutoMutex lock(mLock); if (mAudioTrack != 0) { - LOGE("Track already in use"); + ALOGE("Track already in use"); return INVALID_OPERATION; } @@ -188,7 +188,7 @@ status_t AudioTrack::set( // validate parameters if (!audio_is_valid_format(format)) { - LOGE("Invalid format"); + ALOGE("Invalid format"); return BAD_VALUE; } @@ -198,7 +198,7 @@ status_t AudioTrack::set( } if (!audio_is_output_channel(channelMask)) { - LOGE("Invalid channel mask"); + ALOGE("Invalid channel mask"); return BAD_VALUE; } uint32_t channelCount = popcount(channelMask); @@ -209,7 +209,7 @@ status_t AudioTrack::set( (audio_policy_output_flags_t)flags); if (output == 0) { - LOGE("Could not get audio output for stream type %d", streamType); + ALOGE("Could not get audio output for stream type %d", streamType); return BAD_VALUE; } @@ -239,7 +239,7 @@ status_t AudioTrack::set( if (cbf != 0) { mAudioTrackThread = new AudioTrackThread(*this, threadCanCallJava); if (mAudioTrackThread == 0) { - LOGE("Could not create callback thread"); + ALOGE("Could not create callback thread"); return NO_INIT; } } @@ -324,7 +324,7 @@ void AudioTrack::start() if (t != 0) { if (t->exitPending()) { if (t->requestExitAndWait() == WOULD_BLOCK) { - LOGE("AudioTrack::start called from thread"); + ALOGE("AudioTrack::start called from thread"); return; } } @@ -566,12 +566,12 @@ status_t AudioTrack::setLoop_l(uint32_t loopStart, uint32_t loopEnd, int loopCou if (loopStart >= loopEnd || loopEnd - loopStart > cblk->frameCount || cblk->server > loopStart) { - LOGE("setLoop invalid value: loopStart %d, loopEnd %d, loopCount %d, framecount %d, user %d", loopStart, loopEnd, loopCount, cblk->frameCount, cblk->user); + ALOGE("setLoop invalid value: loopStart %d, loopEnd %d, loopCount %d, framecount %d, user %d", loopStart, loopEnd, loopCount, cblk->frameCount, cblk->user); return BAD_VALUE; } if ((mSharedBuffer != 0) && (loopEnd > cblk->frameCount)) { - LOGE("setLoop invalid value: loop markers beyond data: loopStart %d, loopEnd %d, framecount %d", + ALOGE("setLoop invalid value: loop markers beyond data: loopStart %d, loopEnd %d, framecount %d", loopStart, loopEnd, cblk->frameCount); return BAD_VALUE; } @@ -726,7 +726,7 @@ status_t AudioTrack::createTrack_l( status_t status; const sp<IAudioFlinger>& audioFlinger = AudioSystem::get_audio_flinger(); if (audioFlinger == 0) { - LOGE("Could not get audioflinger"); + ALOGE("Could not get audioflinger"); return NO_INIT; } @@ -769,7 +769,7 @@ status_t AudioTrack::createTrack_l( } if (frameCount < minFrameCount) { if (enforceFrameCount) { - LOGE("Invalid buffer size: minFrameCount %d, frameCount %d", minFrameCount, frameCount); + ALOGE("Invalid buffer size: minFrameCount %d, frameCount %d", minFrameCount, frameCount); return BAD_VALUE; } else { frameCount = minFrameCount; @@ -779,7 +779,7 @@ status_t AudioTrack::createTrack_l( // Ensure that buffer alignment matches channelcount int channelCount = popcount(channelMask); if (((uint32_t)sharedBuffer->pointer() & (channelCount | 1)) != 0) { - LOGE("Invalid buffer alignement: address %p, channelCount %d", sharedBuffer->pointer(), channelCount); + ALOGE("Invalid buffer alignement: address %p, channelCount %d", sharedBuffer->pointer(), channelCount); return BAD_VALUE; } frameCount = sharedBuffer->size()/channelCount/sizeof(int16_t); @@ -799,12 +799,12 @@ status_t AudioTrack::createTrack_l( &status); if (track == 0) { - LOGE("AudioFlinger could not create track, status: %d", status); + ALOGE("AudioFlinger could not create track, status: %d", status); return status; } sp<IMemory> cblk = track->getCblk(); if (cblk == 0) { - LOGE("Could not get control block"); + ALOGE("Could not get control block"); return NO_INIT; } mAudioTrack = track; @@ -964,7 +964,7 @@ ssize_t AudioTrack::write(const void* buffer, size_t userSize) if (ssize_t(userSize) < 0) { // sanity-check. user is most-likely passing an error code. - LOGE("AudioTrack::write(buffer=%p, size=%u (%d)", + ALOGE("AudioTrack::write(buffer=%p, size=%u (%d)", buffer, userSize, userSize); return BAD_VALUE; } @@ -1096,7 +1096,7 @@ bool AudioTrack::processAudioBuffer(const sp<AudioTrackThread>& thread) status_t err = obtainBuffer(&audioBuffer, waitCount); if (err < NO_ERROR) { if (err != TIMED_OUT) { - LOGE_IF(err != status_t(NO_MORE_BUFFERS), "Error obtaining an audio buffer, giving up."); + ALOGE_IF(err != status_t(NO_MORE_BUFFERS), "Error obtaining an audio buffer, giving up."); return false; } break; diff --git a/media/libmedia/IAudioFlinger.cpp b/media/libmedia/IAudioFlinger.cpp index bedf8d3c..abd491f6 100644 --- a/media/libmedia/IAudioFlinger.cpp +++ b/media/libmedia/IAudioFlinger.cpp @@ -112,7 +112,7 @@ public: data.writeInt32(lSessionId); status_t lStatus = remote()->transact(CREATE_TRACK, data, &reply); if (lStatus != NO_ERROR) { - LOGE("createTrack error: %s", strerror(-lStatus)); + ALOGE("createTrack error: %s", strerror(-lStatus)); } else { lSessionId = reply.readInt32(); if (sessionId != NULL) { @@ -155,7 +155,7 @@ public: data.writeInt32(lSessionId); status_t lStatus = remote()->transact(OPEN_RECORD, data, &reply); if (lStatus != NO_ERROR) { - LOGE("openRecord error: %s", strerror(-lStatus)); + ALOGE("openRecord error: %s", strerror(-lStatus)); } else { lSessionId = reply.readInt32(); if (sessionId != NULL) { @@ -632,7 +632,7 @@ public: status_t lStatus = remote()->transact(CREATE_EFFECT, data, &reply); if (lStatus != NO_ERROR) { - LOGE("createEffect error: %s", strerror(-lStatus)); + ALOGE("createEffect error: %s", strerror(-lStatus)); } else { lStatus = reply.readInt32(); int tmp = reply.readInt32(); diff --git a/media/libmedia/IMediaDeathNotifier.cpp b/media/libmedia/IMediaDeathNotifier.cpp index 08b2286c..85254822 100644 --- a/media/libmedia/IMediaDeathNotifier.cpp +++ b/media/libmedia/IMediaDeathNotifier.cpp @@ -54,7 +54,7 @@ IMediaDeathNotifier::getMediaPlayerService() binder->linkToDeath(sDeathNotifier); sMediaPlayerService = interface_cast<IMediaPlayerService>(binder); } - LOGE_IF(sMediaPlayerService == 0, "no media player service!?"); + ALOGE_IF(sMediaPlayerService == 0, "no media player service!?"); return sMediaPlayerService; } diff --git a/media/libmedia/JetPlayer.cpp b/media/libmedia/JetPlayer.cpp index afa84b79..188e5829 100644 --- a/media/libmedia/JetPlayer.cpp +++ b/media/libmedia/JetPlayer.cpp @@ -68,21 +68,21 @@ int JetPlayer::init() if (pLibConfig == NULL) pLibConfig = EAS_Config(); if (pLibConfig == NULL) { - LOGE("JetPlayer::init(): EAS library configuration could not be retrieved, aborting."); + ALOGE("JetPlayer::init(): EAS library configuration could not be retrieved, aborting."); return EAS_FAILURE; } // init the EAS library result = EAS_Init(&mEasData); if( result != EAS_SUCCESS) { - LOGE("JetPlayer::init(): Error initializing Sonivox EAS library, aborting."); + ALOGE("JetPlayer::init(): Error initializing Sonivox EAS library, aborting."); mState = EAS_STATE_ERROR; return result; } // init the JET library with the default app event controller range result = JET_Init(mEasData, NULL, sizeof(S_JET_CONFIG)); if( result != EAS_SUCCESS) { - LOGE("JetPlayer::init(): Error initializing JET library, aborting."); + ALOGE("JetPlayer::init(): Error initializing JET library, aborting."); mState = EAS_STATE_ERROR; return result; } @@ -109,7 +109,7 @@ int JetPlayer::init() ALOGV("JetPlayer::init(): render thread(%d) successfully started.", mTid); mState = EAS_STATE_READY; } else { - LOGE("JetPlayer::init(): failed to start render thread."); + ALOGE("JetPlayer::init(): failed to start render thread."); mState = EAS_STATE_ERROR; return EAS_FAILURE; } @@ -169,7 +169,7 @@ int JetPlayer::render() { mAudioBuffer = new EAS_PCM[pLibConfig->mixBufferSize * pLibConfig->numChannels * MIX_NUM_BUFFERS]; if (!mAudioBuffer) { - LOGE("JetPlayer::render(): mAudioBuffer allocate failed"); + ALOGE("JetPlayer::render(): mAudioBuffer allocate failed"); goto threadExit; } @@ -210,7 +210,7 @@ int JetPlayer::render() { for (int i = 0; i < MIX_NUM_BUFFERS; i++) { result = EAS_Render(mEasData, p, pLibConfig->mixBufferSize, &count); if (result != EAS_SUCCESS) { - LOGE("JetPlayer::render(): EAS_Render returned error %ld", result); + ALOGE("JetPlayer::render(): EAS_Render returned error %ld", result); } p += count * pLibConfig->numChannels; num_output += count * pLibConfig->numChannels * sizeof(EAS_PCM); @@ -229,14 +229,14 @@ int JetPlayer::render() { // check audio output track if (mAudioTrack == NULL) { - LOGE("JetPlayer::render(): output AudioTrack was not created"); + ALOGE("JetPlayer::render(): output AudioTrack was not created"); goto threadExit; } // Write data to the audio hardware //ALOGV("JetPlayer::render(): writing to audio output"); if ((temp = mAudioTrack->write(mAudioBuffer, num_output)) < 0) { - LOGE("JetPlayer::render(): Error in writing:%d",temp); + ALOGE("JetPlayer::render(): Error in writing:%d",temp); return temp; } @@ -469,7 +469,7 @@ int JetPlayer::clearQueue() //------------------------------------------------------------------------------------------------- void JetPlayer::dump() { - LOGE("JetPlayer dump: JET file=%s", mEasJetFileLoc->path); + ALOGE("JetPlayer dump: JET file=%s", mEasJetFileLoc->path); } void JetPlayer::dumpJetStatus(S_JET_STATUS* pJetStatus) @@ -479,7 +479,7 @@ void JetPlayer::dumpJetStatus(S_JET_STATUS* pJetStatus) pJetStatus->currentUserID, pJetStatus->segmentRepeatCount, pJetStatus->numQueuedSegments, pJetStatus->paused); else - LOGE(">> JET player status is NULL"); + ALOGE(">> JET player status is NULL"); } diff --git a/media/libmedia/MediaProfiles.cpp b/media/libmedia/MediaProfiles.cpp index c9e8bc2c..c9057627 100644 --- a/media/libmedia/MediaProfiles.cpp +++ b/media/libmedia/MediaProfiles.cpp @@ -903,7 +903,7 @@ MediaProfiles::createInstanceFromXmlFile(const char *xml) expat is not compiled with -DXML_DTD. We don't have DTD parsing support. if (!::XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS)) { - LOGE("failed to enable DTD support in the xml file"); + ALOGE("failed to enable DTD support in the xml file"); return UNKNOWN_ERROR; } @@ -913,7 +913,7 @@ MediaProfiles::createInstanceFromXmlFile(const char *xml) for (;;) { void *buff = ::XML_GetBuffer(parser, BUFF_SIZE); if (buff == NULL) { - LOGE("failed to in call to XML_GetBuffer()"); + ALOGE("failed to in call to XML_GetBuffer()"); delete profiles; profiles = NULL; goto exit; @@ -921,7 +921,7 @@ MediaProfiles::createInstanceFromXmlFile(const char *xml) int bytes_read = ::fread(buff, 1, BUFF_SIZE, fp); if (bytes_read < 0) { - LOGE("failed in call to read"); + ALOGE("failed in call to read"); delete profiles; profiles = NULL; goto exit; @@ -963,7 +963,7 @@ int MediaProfiles::getVideoEncoderParamByName(const char *name, video_encoder co } } if (index == -1) { - LOGE("The given video encoder %d is not found", codec); + ALOGE("The given video encoder %d is not found", codec); return -1; } @@ -976,7 +976,7 @@ int MediaProfiles::getVideoEncoderParamByName(const char *name, video_encoder co if (!strcmp("enc.vid.fps.min", name)) return mVideoEncoders[index]->mMinFrameRate; if (!strcmp("enc.vid.fps.max", name)) return mVideoEncoders[index]->mMaxFrameRate; - LOGE("The given video encoder param name %s is not found", name); + ALOGE("The given video encoder param name %s is not found", name); return -1; } int MediaProfiles::getVideoEditorExportParamByName( @@ -993,7 +993,7 @@ int MediaProfiles::getVideoEditorExportParamByName( } } if (index == -1) { - LOGE("The given video decoder %d is not found", codec); + ALOGE("The given video decoder %d is not found", codec); return -1; } if (!strcmp("videoeditor.export.profile", name)) @@ -1001,7 +1001,7 @@ int MediaProfiles::getVideoEditorExportParamByName( if (!strcmp("videoeditor.export.level", name)) return exportProfile->mLevel; - LOGE("The given video editor export param name %s is not found", name); + ALOGE("The given video editor export param name %s is not found", name); return -1; } int MediaProfiles::getVideoEditorCapParamByName(const char *name) const @@ -1009,7 +1009,7 @@ int MediaProfiles::getVideoEditorCapParamByName(const char *name) const ALOGV("getVideoEditorCapParamByName: %s", name); if (mVideoEditorCap == NULL) { - LOGE("The mVideoEditorCap is not created, then create default cap."); + ALOGE("The mVideoEditorCap is not created, then create default cap."); createDefaultVideoEditorCap(sInstance); } @@ -1024,7 +1024,7 @@ int MediaProfiles::getVideoEditorCapParamByName(const char *name) const if (!strcmp("maxPrefetchYUVFrames", name)) return mVideoEditorCap->mMaxPrefetchYUVFrames; - LOGE("The given video editor param name %s is not found", name); + ALOGE("The given video editor param name %s is not found", name); return -1; } @@ -1048,7 +1048,7 @@ int MediaProfiles::getAudioEncoderParamByName(const char *name, audio_encoder co } } if (index == -1) { - LOGE("The given audio encoder %d is not found", codec); + ALOGE("The given audio encoder %d is not found", codec); return -1; } @@ -1059,7 +1059,7 @@ int MediaProfiles::getAudioEncoderParamByName(const char *name, audio_encoder co if (!strcmp("enc.aud.hz.min", name)) return mAudioEncoders[index]->mMinSampleRate; if (!strcmp("enc.aud.hz.max", name)) return mAudioEncoders[index]->mMaxSampleRate; - LOGE("The given audio encoder param name %s is not found", name); + ALOGE("The given audio encoder param name %s is not found", name); return -1; } @@ -1103,7 +1103,7 @@ int MediaProfiles::getCamcorderProfileParamByName(const char *name, int index = getCamcorderProfileIndex(cameraId, quality); if (index == -1) { - LOGE("The given camcorder profile camera %d quality %d is not found", + ALOGE("The given camcorder profile camera %d quality %d is not found", cameraId, quality); return -1; } @@ -1120,7 +1120,7 @@ int MediaProfiles::getCamcorderProfileParamByName(const char *name, if (!strcmp("aud.ch", name)) return mCamcorderProfiles[index]->mAudioCodec->mChannels; if (!strcmp("aud.hz", name)) return mCamcorderProfiles[index]->mAudioCodec->mSampleRate; - LOGE("The given camcorder profile param id %d name %s is not found", cameraId, name); + ALOGE("The given camcorder profile param id %d name %s is not found", cameraId, name); return -1; } diff --git a/media/libmedia/MediaScannerClient.cpp b/media/libmedia/MediaScannerClient.cpp index 629b165d..40b81880 100644 --- a/media/libmedia/MediaScannerClient.cpp +++ b/media/libmedia/MediaScannerClient.cpp @@ -142,12 +142,12 @@ void MediaScannerClient::convertValues(uint32_t encoding) UConverter *conv = ucnv_open(enc, &status); if (U_FAILURE(status)) { - LOGE("could not create UConverter for %s\n", enc); + ALOGE("could not create UConverter for %s\n", enc); return; } UConverter *utf8Conv = ucnv_open("UTF-8", &status); if (U_FAILURE(status)) { - LOGE("could not create UConverter for UTF-8\n"); + ALOGE("could not create UConverter for UTF-8\n"); ucnv_close(conv); return; } @@ -180,7 +180,7 @@ void MediaScannerClient::convertValues(uint32_t encoding) ucnv_convertEx(utf8Conv, conv, &target, target + targetLength, &source, (const char *)dest, NULL, NULL, NULL, NULL, TRUE, TRUE, &status); if (U_FAILURE(status)) { - LOGE("ucnv_convertEx failed: %d\n", status); + ALOGE("ucnv_convertEx failed: %d\n", status); mValues->setEntry(i, "???"); } else { // zero terminate diff --git a/media/libmedia/Metadata.cpp b/media/libmedia/Metadata.cpp index 8eeebbb5..546a9b05 100644 --- a/media/libmedia/Metadata.cpp +++ b/media/libmedia/Metadata.cpp @@ -135,7 +135,7 @@ bool Metadata::checkKey(int key) { if (key < FIRST_SYSTEM_ID || (LAST_SYSTEM_ID < key && key < FIRST_CUSTOM_ID)) { - LOGE("Bad key %d", key); + ALOGE("Bad key %d", key); return false; } size_t curr = mData->dataPosition(); @@ -152,7 +152,7 @@ bool Metadata::checkKey(int key) break; } if (mData->readInt32() == key) { - LOGE("Key exists already %d", key); + ALOGE("Key exists already %d", key); error = true; break; } diff --git a/media/libmedia/ToneGenerator.cpp b/media/libmedia/ToneGenerator.cpp index 6a38ff11..35dfbb8e 100644 --- a/media/libmedia/ToneGenerator.cpp +++ b/media/libmedia/ToneGenerator.cpp @@ -805,7 +805,7 @@ ToneGenerator::ToneGenerator(int streamType, float volume, bool threadCanCallJav mState = TONE_IDLE; if (AudioSystem::getOutputSamplingRate(&mSamplingRate, streamType) != NO_ERROR) { - LOGE("Unable to marshal AudioFlinger"); + ALOGE("Unable to marshal AudioFlinger"); return; } mThreadCanCallJava = threadCanCallJava; @@ -906,7 +906,7 @@ bool ToneGenerator::startTone(int toneType, int durationMs) { ALOGV("Start waiting for previous tone to stop"); lStatus = mWaitCbkCond.waitRelative(mLock, seconds(3)); if (lStatus != NO_ERROR) { - LOGE("--- start wait for stop timed out, status %d", lStatus); + ALOGE("--- start wait for stop timed out, status %d", lStatus); mState = TONE_IDLE; mLock.unlock(); return lResult; @@ -925,7 +925,7 @@ bool ToneGenerator::startTone(int toneType, int durationMs) { ALOGV("Wait for start callback"); lStatus = mWaitCbkCond.waitRelative(mLock, seconds(3)); if (lStatus != NO_ERROR) { - LOGE("--- Immediate start timed out, status %d", lStatus); + ALOGE("--- Immediate start timed out, status %d", lStatus); mState = TONE_IDLE; lResult = false; } @@ -943,7 +943,7 @@ bool ToneGenerator::startTone(int toneType, int durationMs) { } ALOGV("cond received"); } else { - LOGE("--- Delayed start timed out, status %d", lStatus); + ALOGE("--- Delayed start timed out, status %d", lStatus); mState = TONE_IDLE; } } @@ -979,7 +979,7 @@ void ToneGenerator::stopTone() { if (lStatus == NO_ERROR) { ALOGV("track stop complete, time %d", (unsigned int)(systemTime()/1000000)); } else { - LOGE("--- Stop timed out"); + ALOGE("--- Stop timed out"); mState = TONE_IDLE; mpAudioTrack->stop(); } @@ -1018,7 +1018,7 @@ bool ToneGenerator::initAudioTrack() { // Open audio track in mono, PCM 16bit, default sampling rate, default buffer size mpAudioTrack = new AudioTrack(); if (mpAudioTrack == 0) { - LOGE("AudioTrack allocation failed"); + ALOGE("AudioTrack allocation failed"); goto initAudioTrack_exit; } ALOGV("Create Track: %p\n", mpAudioTrack); @@ -1036,7 +1036,7 @@ bool ToneGenerator::initAudioTrack() { mThreadCanCallJava); if (mpAudioTrack->initCheck() != NO_ERROR) { - LOGE("AudioTrack->initCheck failed"); + ALOGE("AudioTrack->initCheck failed"); goto initAudioTrack_exit; } diff --git a/media/libmedia/Visualizer.cpp b/media/libmedia/Visualizer.cpp index de40f983..d08ffa5e 100644 --- a/media/libmedia/Visualizer.cpp +++ b/media/libmedia/Visualizer.cpp @@ -61,7 +61,7 @@ status_t Visualizer::setEnabled(bool enabled) if (enabled) { if (t->exitPending()) { if (t->requestExitAndWait() == WOULD_BLOCK) { - LOGE("Visualizer::enable() called from thread"); + ALOGE("Visualizer::enable() called from thread"); return INVALID_OPERATION; } } @@ -116,7 +116,7 @@ status_t Visualizer::setCaptureCallBack(capture_cbk_t cbk, void* user, uint32_t if (cbk != NULL) { mCaptureThread = new CaptureThread(*this, rate, ((flags & CAPTURE_CALL_JAVA) != 0)); if (mCaptureThread == 0) { - LOGE("Could not create callback thread"); + ALOGE("Could not create callback thread"); return NO_INIT; } } diff --git a/media/libmedia/mediametadataretriever.cpp b/media/libmedia/mediametadataretriever.cpp index 1658f41b..88e269fd 100644 --- a/media/libmedia/mediametadataretriever.cpp +++ b/media/libmedia/mediametadataretriever.cpp @@ -52,7 +52,7 @@ const sp<IMediaPlayerService>& MediaMetadataRetriever::getService() binder->linkToDeath(sDeathNotifier); sService = interface_cast<IMediaPlayerService>(binder); } - LOGE_IF(sService == 0, "no MediaPlayerService!?"); + ALOGE_IF(sService == 0, "no MediaPlayerService!?"); return sService; } @@ -61,12 +61,12 @@ MediaMetadataRetriever::MediaMetadataRetriever() ALOGV("constructor"); const sp<IMediaPlayerService>& service(getService()); if (service == 0) { - LOGE("failed to obtain MediaMetadataRetrieverService"); + ALOGE("failed to obtain MediaMetadataRetrieverService"); return; } sp<IMediaMetadataRetriever> retriever(service->createMetadataRetriever(getpid())); if (retriever == 0) { - LOGE("failed to create IMediaMetadataRetriever object from server"); + ALOGE("failed to create IMediaMetadataRetriever object from server"); } mRetriever = retriever; } @@ -98,11 +98,11 @@ status_t MediaMetadataRetriever::setDataSource( ALOGV("setDataSource"); Mutex::Autolock _l(mLock); if (mRetriever == 0) { - LOGE("retriever is not initialized"); + ALOGE("retriever is not initialized"); return INVALID_OPERATION; } if (srcUrl == NULL) { - LOGE("data source is a null pointer"); + ALOGE("data source is a null pointer"); return UNKNOWN_ERROR; } ALOGV("data source (%s)", srcUrl); @@ -114,11 +114,11 @@ status_t MediaMetadataRetriever::setDataSource(int fd, int64_t offset, int64_t l ALOGV("setDataSource(%d, %lld, %lld)", fd, offset, length); Mutex::Autolock _l(mLock); if (mRetriever == 0) { - LOGE("retriever is not initialized"); + ALOGE("retriever is not initialized"); return INVALID_OPERATION; } if (fd < 0 || offset < 0 || length < 0) { - LOGE("Invalid negative argument"); + ALOGE("Invalid negative argument"); return UNKNOWN_ERROR; } return mRetriever->setDataSource(fd, offset, length); @@ -129,7 +129,7 @@ sp<IMemory> MediaMetadataRetriever::getFrameAtTime(int64_t timeUs, int option) ALOGV("getFrameAtTime: time(%lld us) option(%d)", timeUs, option); Mutex::Autolock _l(mLock); if (mRetriever == 0) { - LOGE("retriever is not initialized"); + ALOGE("retriever is not initialized"); return NULL; } return mRetriever->getFrameAtTime(timeUs, option); @@ -140,7 +140,7 @@ const char* MediaMetadataRetriever::extractMetadata(int keyCode) ALOGV("extractMetadata(%d)", keyCode); Mutex::Autolock _l(mLock); if (mRetriever == 0) { - LOGE("retriever is not initialized"); + ALOGE("retriever is not initialized"); return NULL; } return mRetriever->extractMetadata(keyCode); @@ -151,7 +151,7 @@ sp<IMemory> MediaMetadataRetriever::extractAlbumArt() ALOGV("extractAlbumArt"); Mutex::Autolock _l(mLock); if (mRetriever == 0) { - LOGE("retriever is not initialized"); + ALOGE("retriever is not initialized"); return NULL; } return mRetriever->extractAlbumArt(); diff --git a/media/libmedia/mediaplayer.cpp b/media/libmedia/mediaplayer.cpp index 6054749c..22849272 100644 --- a/media/libmedia/mediaplayer.cpp +++ b/media/libmedia/mediaplayer.cpp @@ -115,7 +115,7 @@ status_t MediaPlayer::attachNewPlayer(const sp<IMediaPlayer>& player) if ( !( (mCurrentState & MEDIA_PLAYER_IDLE) || (mCurrentState == MEDIA_PLAYER_STATE_ERROR ) ) ) { - LOGE("attachNewPlayer called in state %d", mCurrentState); + ALOGE("attachNewPlayer called in state %d", mCurrentState); return INVALID_OPERATION; } @@ -126,7 +126,7 @@ status_t MediaPlayer::attachNewPlayer(const sp<IMediaPlayer>& player) mCurrentState = MEDIA_PLAYER_INITIALIZED; err = NO_ERROR; } else { - LOGE("Unable to to create media player"); + ALOGE("Unable to to create media player"); } } @@ -195,7 +195,7 @@ status_t MediaPlayer::invoke(const Parcel& request, Parcel *reply) ALOGV("invoke %d", request.dataSize()); return mPlayer->invoke(request, reply); } - LOGE("invoke failed: wrong state %X", mCurrentState); + ALOGE("invoke failed: wrong state %X", mCurrentState); return INVALID_OPERATION; } @@ -236,7 +236,7 @@ status_t MediaPlayer::prepareAsync_l() mCurrentState = MEDIA_PLAYER_PREPARING; return mPlayer->prepareAsync(); } - LOGE("prepareAsync called in state %d", mCurrentState); + ALOGE("prepareAsync called in state %d", mCurrentState); return INVALID_OPERATION; } @@ -298,7 +298,7 @@ status_t MediaPlayer::start() } return ret; } - LOGE("start called in state %d", mCurrentState); + ALOGE("start called in state %d", mCurrentState); return INVALID_OPERATION; } @@ -317,7 +317,7 @@ status_t MediaPlayer::stop() } return ret; } - LOGE("stop called in state %d", mCurrentState); + ALOGE("stop called in state %d", mCurrentState); return INVALID_OPERATION; } @@ -336,7 +336,7 @@ status_t MediaPlayer::pause() } return ret; } - LOGE("pause called in state %d", mCurrentState); + ALOGE("pause called in state %d", mCurrentState); return INVALID_OPERATION; } @@ -348,7 +348,7 @@ bool MediaPlayer::isPlaying() mPlayer->isPlaying(&temp); ALOGV("isPlaying: %d", temp); if ((mCurrentState & MEDIA_PLAYER_STARTED) && ! temp) { - LOGE("internal/external state mismatch corrected"); + ALOGE("internal/external state mismatch corrected"); mCurrentState = MEDIA_PLAYER_PAUSED; } return temp; @@ -402,7 +402,7 @@ status_t MediaPlayer::getDuration_l(int *msec) *msec = mDuration; return ret; } - LOGE("Attempt to call getDuration without a valid mediaplayer"); + ALOGE("Attempt to call getDuration without a valid mediaplayer"); return INVALID_OPERATION; } @@ -435,7 +435,7 @@ status_t MediaPlayer::seekTo_l(int msec) return NO_ERROR; } } - LOGE("Attempt to perform seekTo in wrong state: mPlayer=%p, mCurrentState=%u", mPlayer.get(), mCurrentState); + ALOGE("Attempt to perform seekTo in wrong state: mPlayer=%p, mCurrentState=%u", mPlayer.get(), mCurrentState); return INVALID_OPERATION; } @@ -457,7 +457,7 @@ status_t MediaPlayer::reset_l() if (mPlayer != 0) { status_t ret = mPlayer->reset(); if (ret != NO_ERROR) { - LOGE("reset() failed with return code (%d)", ret); + ALOGE("reset() failed with return code (%d)", ret); mCurrentState = MEDIA_PLAYER_STATE_ERROR; } else { mCurrentState = MEDIA_PLAYER_IDLE; @@ -486,7 +486,7 @@ status_t MediaPlayer::setAudioStreamType(int type) if (mCurrentState & ( MEDIA_PLAYER_PREPARED | MEDIA_PLAYER_STARTED | MEDIA_PLAYER_PAUSED | MEDIA_PLAYER_PLAYBACK_COMPLETE ) ) { // Can't change the stream type after prepare - LOGE("setAudioStream called in state %d", mCurrentState); + ALOGE("setAudioStream called in state %d", mCurrentState); return INVALID_OPERATION; } // cache @@ -532,7 +532,7 @@ status_t MediaPlayer::setAudioSessionId(int sessionId) ALOGV("MediaPlayer::setAudioSessionId(%d)", sessionId); Mutex::Autolock _l(mLock); if (!(mCurrentState & MEDIA_PLAYER_IDLE)) { - LOGE("setAudioSessionId called in state %d", mCurrentState); + ALOGE("setAudioSessionId called in state %d", mCurrentState); return INVALID_OPERATION; } if (sessionId < 0) { @@ -570,7 +570,7 @@ status_t MediaPlayer::attachAuxEffect(int effectId) if (mPlayer == 0 || (mCurrentState & MEDIA_PLAYER_IDLE) || (mCurrentState == MEDIA_PLAYER_STATE_ERROR )) { - LOGE("attachAuxEffect called in state %d", mCurrentState); + ALOGE("attachAuxEffect called in state %d", mCurrentState); return INVALID_OPERATION; } @@ -641,7 +641,7 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj) case MEDIA_PLAYBACK_COMPLETE: ALOGV("playback complete"); if (mCurrentState == MEDIA_PLAYER_IDLE) { - LOGE("playback complete in idle state"); + ALOGE("playback complete in idle state"); } if (!mLoop) { mCurrentState = MEDIA_PLAYER_PLAYBACK_COMPLETE; @@ -651,7 +651,7 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj) // Always log errors. // ext1: Media framework error code. // ext2: Implementation dependant error code. - LOGE("error (%d, %d)", ext1, ext2); + ALOGE("error (%d, %d)", ext1, ext2); mCurrentState = MEDIA_PLAYER_STATE_ERROR; if (mPrepareSync) { @@ -717,7 +717,7 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj) if (service != 0) { p = service->decode(url, pSampleRate, pNumChannels, pFormat); } else { - LOGE("Unable to locate media service"); + ALOGE("Unable to locate media service"); } return p; @@ -737,7 +737,7 @@ void MediaPlayer::died() if (service != 0) { p = service->decode(fd, offset, length, pSampleRate, pNumChannels, pFormat); } else { - LOGE("Unable to locate media service"); + ALOGE("Unable to locate media service"); } return p; diff --git a/media/libmedia/mediarecorder.cpp b/media/libmedia/mediarecorder.cpp index ec629780..8d947d86 100644 --- a/media/libmedia/mediarecorder.cpp +++ b/media/libmedia/mediarecorder.cpp @@ -33,11 +33,11 @@ status_t MediaRecorder::setCamera(const sp<ICamera>& camera, const sp<ICameraRec { ALOGV("setCamera(%p,%p)", camera.get(), proxy.get()); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_IDLE)) { - LOGE("setCamera called in an invalid state(%d)", mCurrentState); + ALOGE("setCamera called in an invalid state(%d)", mCurrentState); return INVALID_OPERATION; } @@ -54,15 +54,15 @@ status_t MediaRecorder::setPreviewSurface(const sp<Surface>& surface) { ALOGV("setPreviewSurface(%p)", surface.get()); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) { - LOGE("setPreviewSurface called in an invalid state(%d)", mCurrentState); + ALOGE("setPreviewSurface called in an invalid state(%d)", mCurrentState); return INVALID_OPERATION; } if (!mIsVideoSourceSet) { - LOGE("try to set preview surface without setting the video source first"); + ALOGE("try to set preview surface without setting the video source first"); return INVALID_OPERATION; } @@ -79,11 +79,11 @@ status_t MediaRecorder::init() { ALOGV("init"); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_IDLE)) { - LOGE("init called in an invalid state(%d)", mCurrentState); + ALOGE("init called in an invalid state(%d)", mCurrentState); return INVALID_OPERATION; } @@ -109,11 +109,11 @@ status_t MediaRecorder::setVideoSource(int vs) { ALOGV("setVideoSource(%d)", vs); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (mIsVideoSourceSet) { - LOGE("video source has already been set"); + ALOGE("video source has already been set"); return INVALID_OPERATION; } if (mCurrentState & MEDIA_RECORDER_IDLE) { @@ -124,7 +124,7 @@ status_t MediaRecorder::setVideoSource(int vs) } } if (!(mCurrentState & MEDIA_RECORDER_INITIALIZED)) { - LOGE("setVideoSource called in an invalid state(%d)", mCurrentState); + ALOGE("setVideoSource called in an invalid state(%d)", mCurrentState); return INVALID_OPERATION; } @@ -144,7 +144,7 @@ status_t MediaRecorder::setAudioSource(int as) { ALOGV("setAudioSource(%d)", as); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (mCurrentState & MEDIA_RECORDER_IDLE) { @@ -155,11 +155,11 @@ status_t MediaRecorder::setAudioSource(int as) } } if (mIsAudioSourceSet) { - LOGE("audio source has already been set"); + ALOGE("audio source has already been set"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_INITIALIZED)) { - LOGE("setAudioSource called in an invalid state(%d)", mCurrentState); + ALOGE("setAudioSource called in an invalid state(%d)", mCurrentState); return INVALID_OPERATION; } @@ -177,21 +177,21 @@ status_t MediaRecorder::setOutputFormat(int of) { ALOGV("setOutputFormat(%d)", of); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_INITIALIZED)) { - LOGE("setOutputFormat called in an invalid state: %d", mCurrentState); + ALOGE("setOutputFormat called in an invalid state: %d", mCurrentState); return INVALID_OPERATION; } if (mIsVideoSourceSet && of >= OUTPUT_FORMAT_AUDIO_ONLY_START && of != OUTPUT_FORMAT_RTP_AVP && of != OUTPUT_FORMAT_MPEG2TS) { //first non-video output format - LOGE("output format (%d) is meant for audio recording only and incompatible with video recording", of); + ALOGE("output format (%d) is meant for audio recording only and incompatible with video recording", of); return INVALID_OPERATION; } status_t ret = mMediaRecorder->setOutputFormat(of); if (OK != ret) { - LOGE("setOutputFormat failed: %d", ret); + ALOGE("setOutputFormat failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -203,19 +203,19 @@ status_t MediaRecorder::setVideoEncoder(int ve) { ALOGV("setVideoEncoder(%d)", ve); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (!mIsVideoSourceSet) { - LOGE("try to set the video encoder without setting the video source first"); + ALOGE("try to set the video encoder without setting the video source first"); return INVALID_OPERATION; } if (mIsVideoEncoderSet) { - LOGE("video encoder has already been set"); + ALOGE("video encoder has already been set"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) { - LOGE("setVideoEncoder called in an invalid state(%d)", mCurrentState); + ALOGE("setVideoEncoder called in an invalid state(%d)", mCurrentState); return INVALID_OPERATION; } @@ -233,19 +233,19 @@ status_t MediaRecorder::setAudioEncoder(int ae) { ALOGV("setAudioEncoder(%d)", ae); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (!mIsAudioSourceSet) { - LOGE("try to set the audio encoder without setting the audio source first"); + ALOGE("try to set the audio encoder without setting the audio source first"); return INVALID_OPERATION; } if (mIsAudioEncoderSet) { - LOGE("audio encoder has already been set"); + ALOGE("audio encoder has already been set"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) { - LOGE("setAudioEncoder called in an invalid state(%d)", mCurrentState); + ALOGE("setAudioEncoder called in an invalid state(%d)", mCurrentState); return INVALID_OPERATION; } @@ -263,15 +263,15 @@ status_t MediaRecorder::setOutputFile(const char* path) { ALOGV("setOutputFile(%s)", path); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (mIsOutputFileSet) { - LOGE("output file has already been set"); + ALOGE("output file has already been set"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) { - LOGE("setOutputFile called in an invalid state(%d)", mCurrentState); + ALOGE("setOutputFile called in an invalid state(%d)", mCurrentState); return INVALID_OPERATION; } @@ -289,15 +289,15 @@ status_t MediaRecorder::setOutputFile(int fd, int64_t offset, int64_t length) { ALOGV("setOutputFile(%d, %lld, %lld)", fd, offset, length); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (mIsOutputFileSet) { - LOGE("output file has already been set"); + ALOGE("output file has already been set"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) { - LOGE("setOutputFile called in an invalid state(%d)", mCurrentState); + ALOGE("setOutputFile called in an invalid state(%d)", mCurrentState); return INVALID_OPERATION; } @@ -308,7 +308,7 @@ status_t MediaRecorder::setOutputFile(int fd, int64_t offset, int64_t length) // this issue by checking the file descriptor first before passing // it through binder call. if (fd < 0) { - LOGE("Invalid file descriptor: %d", fd); + ALOGE("Invalid file descriptor: %d", fd); return BAD_VALUE; } @@ -326,21 +326,21 @@ status_t MediaRecorder::setVideoSize(int width, int height) { ALOGV("setVideoSize(%d, %d)", width, height); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) { - LOGE("setVideoSize called in an invalid state: %d", mCurrentState); + ALOGE("setVideoSize called in an invalid state: %d", mCurrentState); return INVALID_OPERATION; } if (!mIsVideoSourceSet) { - LOGE("Cannot set video size without setting video source first"); + ALOGE("Cannot set video size without setting video source first"); return INVALID_OPERATION; } status_t ret = mMediaRecorder->setVideoSize(width, height); if (OK != ret) { - LOGE("setVideoSize failed: %d", ret); + ALOGE("setVideoSize failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -358,7 +358,7 @@ sp<ISurfaceTexture> MediaRecorder:: mSurfaceMediaSource = mMediaRecorder->querySurfaceMediaSource(); if (mSurfaceMediaSource == NULL) { - LOGE("SurfaceMediaSource could not be initialized!"); + ALOGE("SurfaceMediaSource could not be initialized!"); } return mSurfaceMediaSource; } @@ -369,21 +369,21 @@ status_t MediaRecorder::setVideoFrameRate(int frames_per_second) { ALOGV("setVideoFrameRate(%d)", frames_per_second); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) { - LOGE("setVideoFrameRate called in an invalid state: %d", mCurrentState); + ALOGE("setVideoFrameRate called in an invalid state: %d", mCurrentState); return INVALID_OPERATION; } if (!mIsVideoSourceSet) { - LOGE("Cannot set video frame rate without setting video source first"); + ALOGE("Cannot set video frame rate without setting video source first"); return INVALID_OPERATION; } status_t ret = mMediaRecorder->setVideoFrameRate(frames_per_second); if (OK != ret) { - LOGE("setVideoFrameRate failed: %d", ret); + ALOGE("setVideoFrameRate failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -393,7 +393,7 @@ status_t MediaRecorder::setVideoFrameRate(int frames_per_second) status_t MediaRecorder::setParameters(const String8& params) { ALOGV("setParameters(%s)", params.string()); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } @@ -402,13 +402,13 @@ status_t MediaRecorder::setParameters(const String8& params) { MEDIA_RECORDER_RECORDING | MEDIA_RECORDER_ERROR)); if (isInvalidState) { - LOGE("setParameters is called in an invalid state: %d", mCurrentState); + ALOGE("setParameters is called in an invalid state: %d", mCurrentState); return INVALID_OPERATION; } status_t ret = mMediaRecorder->setParameters(params); if (OK != ret) { - LOGE("setParameters(%s) failed: %d", params.string(), ret); + ALOGE("setParameters(%s) failed: %d", params.string(), ret); // Do not change our current state to MEDIA_RECORDER_ERROR, failures // of the only currently supported parameters, "max-duration" and // "max-filesize" are _not_ fatal. @@ -421,34 +421,34 @@ status_t MediaRecorder::prepare() { ALOGV("prepare"); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) { - LOGE("prepare called in an invalid state: %d", mCurrentState); + ALOGE("prepare called in an invalid state: %d", mCurrentState); return INVALID_OPERATION; } if (mIsAudioSourceSet != mIsAudioEncoderSet) { if (mIsAudioSourceSet) { - LOGE("audio source is set, but audio encoder is not set"); + ALOGE("audio source is set, but audio encoder is not set"); } else { // must not happen, since setAudioEncoder checks this already - LOGE("audio encoder is set, but audio source is not set"); + ALOGE("audio encoder is set, but audio source is not set"); } return INVALID_OPERATION; } if (mIsVideoSourceSet != mIsVideoEncoderSet) { if (mIsVideoSourceSet) { - LOGE("video source is set, but video encoder is not set"); + ALOGE("video source is set, but video encoder is not set"); } else { // must not happen, since setVideoEncoder checks this already - LOGE("video encoder is set, but video source is not set"); + ALOGE("video encoder is set, but video source is not set"); } return INVALID_OPERATION; } status_t ret = mMediaRecorder->prepare(); if (OK != ret) { - LOGE("prepare failed: %d", ret); + ALOGE("prepare failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -460,17 +460,17 @@ status_t MediaRecorder::getMaxAmplitude(int* max) { ALOGV("getMaxAmplitude"); if(mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (mCurrentState & MEDIA_RECORDER_ERROR) { - LOGE("getMaxAmplitude called in an invalid state: %d", mCurrentState); + ALOGE("getMaxAmplitude called in an invalid state: %d", mCurrentState); return INVALID_OPERATION; } status_t ret = mMediaRecorder->getMaxAmplitude(max); if (OK != ret) { - LOGE("getMaxAmplitude failed: %d", ret); + ALOGE("getMaxAmplitude failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -481,17 +481,17 @@ status_t MediaRecorder::start() { ALOGV("start"); if (mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_PREPARED)) { - LOGE("start called in an invalid state: %d", mCurrentState); + ALOGE("start called in an invalid state: %d", mCurrentState); return INVALID_OPERATION; } status_t ret = mMediaRecorder->start(); if (OK != ret) { - LOGE("start failed: %d", ret); + ALOGE("start failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -503,17 +503,17 @@ status_t MediaRecorder::stop() { ALOGV("stop"); if (mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (!(mCurrentState & MEDIA_RECORDER_RECORDING)) { - LOGE("stop called in an invalid state: %d", mCurrentState); + ALOGE("stop called in an invalid state: %d", mCurrentState); return INVALID_OPERATION; } status_t ret = mMediaRecorder->stop(); if (OK != ret) { - LOGE("stop failed: %d", ret); + ALOGE("stop failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -531,7 +531,7 @@ status_t MediaRecorder::reset() { ALOGV("reset"); if (mMediaRecorder == NULL) { - LOGE("media recorder is not initialized yet"); + ALOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } @@ -556,7 +556,7 @@ status_t MediaRecorder::reset() break; default: { - LOGE("Unexpected non-existing state: %d", mCurrentState); + ALOGE("Unexpected non-existing state: %d", mCurrentState); break; } } @@ -567,12 +567,12 @@ status_t MediaRecorder::close() { ALOGV("close"); if (!(mCurrentState & MEDIA_RECORDER_INITIALIZED)) { - LOGE("close called in an invalid state: %d", mCurrentState); + ALOGE("close called in an invalid state: %d", mCurrentState); return INVALID_OPERATION; } status_t ret = mMediaRecorder->close(); if (OK != ret) { - LOGE("close failed: %d", ret); + ALOGE("close failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return UNKNOWN_ERROR; } else { @@ -586,7 +586,7 @@ status_t MediaRecorder::doReset() ALOGV("doReset"); status_t ret = mMediaRecorder->reset(); if (OK != ret) { - LOGE("doReset failed: %d", ret); + ALOGE("doReset failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } else { |