From 3856b090cd04ba5dd4a59a12430ed724d5995909 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Thu, 20 Oct 2011 11:56:00 +0100 Subject: Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGE See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a --- media/libstagefright/AACWriter.cpp | 8 +-- media/libstagefright/ACodec.cpp | 64 +++++++++--------- media/libstagefright/AMRWriter.cpp | 2 +- media/libstagefright/AVIExtractor.cpp | 8 +-- media/libstagefright/AudioPlayer.cpp | 12 ++-- media/libstagefright/AudioSource.cpp | 14 ++-- media/libstagefright/AwesomePlayer.cpp | 50 +++++++------- media/libstagefright/CameraSource.cpp | 42 ++++++------ media/libstagefright/CameraSourceTimeLapse.cpp | 32 ++++----- media/libstagefright/ESDS.cpp | 2 +- media/libstagefright/FLACExtractor.cpp | 22 +++--- media/libstagefright/MP3Extractor.cpp | 14 ++-- media/libstagefright/MPEG2TSWriter.cpp | 6 +- media/libstagefright/MPEG4Extractor.cpp | 8 +-- media/libstagefright/MPEG4Writer.cpp | 58 ++++++++-------- media/libstagefright/MediaExtractor.cpp | 4 +- media/libstagefright/MediaSourceSplitter.cpp | 12 ++-- media/libstagefright/NuCachedSource2.cpp | 24 +++---- media/libstagefright/OMXCodec.cpp | 26 ++++---- media/libstagefright/OggExtractor.cpp | 40 +++++------ media/libstagefright/SampleIterator.cpp | 2 +- media/libstagefright/SampleTable.cpp | 2 +- media/libstagefright/StagefrightMediaScanner.cpp | 4 +- .../StagefrightMetadataRetriever.cpp | 34 +++++----- media/libstagefright/SurfaceMediaSource.cpp | 62 ++++++++--------- media/libstagefright/TimedEventQueue.cpp | 2 +- media/libstagefright/VBRISeeker.cpp | 8 +-- media/libstagefright/VideoSourceDownSampler.cpp | 12 ++-- media/libstagefright/WAVExtractor.cpp | 6 +- media/libstagefright/avc_utils.cpp | 2 +- media/libstagefright/codecs/aacdec/SoftAAC.cpp | 4 +- media/libstagefright/codecs/aacenc/AACEncoder.cpp | 2 +- media/libstagefright/codecs/avc/enc/AVCEncoder.cpp | 20 +++--- .../codecs/m4v_h263/dec/SoftMPEG4.cpp | 2 +- .../codecs/m4v_h263/enc/M4vH263Encoder.cpp | 16 ++--- media/libstagefright/codecs/mp3dec/SoftMP3.cpp | 2 +- media/libstagefright/codecs/on2/dec/SoftVPX.cpp | 2 +- .../codecs/vorbis/dec/SoftVorbis.cpp | 2 +- media/libstagefright/httplive/LiveSession.cpp | 10 +-- media/libstagefright/httplive/M3UParser.cpp | 8 +-- media/libstagefright/id3/ID3.cpp | 12 ++-- .../libstagefright/matroska/MatroskaExtractor.cpp | 14 ++-- media/libstagefright/mpeg2ts/ATSParser.cpp | 78 +++++++++++----------- .../libstagefright/mpeg2ts/AnotherPacketSource.cpp | 2 +- media/libstagefright/mpeg2ts/ESQueue.cpp | 10 +-- media/libstagefright/mpeg2ts/MPEG2PSExtractor.cpp | 26 ++++---- media/libstagefright/omx/OMX.cpp | 10 +-- media/libstagefright/omx/OMXNodeInstance.cpp | 12 ++-- .../libstagefright/omx/SimpleSoftOMXComponent.cpp | 4 +- media/libstagefright/omx/SoftOMXPlugin.cpp | 2 +- media/libstagefright/rtsp/AAMRAssembler.cpp | 10 +-- media/libstagefright/rtsp/AAVCAssembler.cpp | 34 +++++----- .../rtsp/AMPEG4ElementaryAssembler.cpp | 6 +- media/libstagefright/rtsp/ARTPConnection.cpp | 4 +- media/libstagefright/rtsp/ARTPSource.cpp | 2 +- media/libstagefright/rtsp/ARTPWriter.cpp | 2 +- media/libstagefright/rtsp/ARTSPConnection.cpp | 6 +- media/libstagefright/rtsp/ARawAudioAssembler.cpp | 4 +- media/libstagefright/rtsp/ASessionDescription.cpp | 6 +- media/libstagefright/rtsp/MyHandler.h | 28 ++++---- media/libstagefright/tests/DummyRecorder.cpp | 12 ++-- .../tests/SurfaceMediaSource_test.cpp | 72 ++++++++++---------- 62 files changed, 503 insertions(+), 503 deletions(-) (limited to 'media/libstagefright') diff --git a/media/libstagefright/AACWriter.cpp b/media/libstagefright/AACWriter.cpp index d133e91..03fb33b 100644 --- a/media/libstagefright/AACWriter.cpp +++ b/media/libstagefright/AACWriter.cpp @@ -40,7 +40,7 @@ AACWriter::AACWriter(const char *filename) mChannelCount(-1), mSampleRate(-1) { - LOGV("AACWriter Constructor"); + ALOGV("AACWriter Constructor"); mFd = open(filename, O_CREAT | O_LARGEFILE | O_TRUNC | O_RDWR); if (mFd >= 0) { @@ -209,7 +209,7 @@ static bool getSampleRateTableIndex(int sampleRate, uint8_t* tableIndex) { *tableIndex = 0; for (int index = 0; index < tableSize; ++index) { if (sampleRate == kSampleRateTable[index]) { - LOGV("Sample rate: %d and index: %d", + ALOGV("Sample rate: %d and index: %d", sampleRate, index); *tableIndex = index; return true; @@ -322,7 +322,7 @@ status_t AACWriter::threadFunc() { int32_t isCodecSpecific = 0; if (buffer->meta_data()->findInt32(kKeyIsCodecConfig, &isCodecSpecific) && isCodecSpecific) { - LOGV("Drop codec specific info buffer"); + ALOGV("Drop codec specific info buffer"); buffer->release(); buffer = NULL; continue; @@ -338,7 +338,7 @@ status_t AACWriter::threadFunc() { mResumed = false; } timestampUs -= previousPausedDurationUs; - LOGV("time stamp: %lld, previous paused duration: %lld", + ALOGV("time stamp: %lld, previous paused duration: %lld", timestampUs, previousPausedDurationUs); if (timestampUs > maxTimestampUs) { maxTimestampUs = timestampUs; diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp index d947760..0e8c874 100644 --- a/media/libstagefright/ACodec.cpp +++ b/media/libstagefright/ACodec.cpp @@ -374,7 +374,7 @@ status_t ACodec::allocateBuffersOnPort(OMX_U32 portIndex) { return err; } - LOGV("[%s] Allocating %lu buffers of size %lu on %s port", + ALOGV("[%s] Allocating %lu buffers of size %lu on %s port", mComponentName.c_str(), def.nBufferCountActual, def.nBufferSize, portIndex == kPortIndexInput ? "input" : "output"); @@ -503,7 +503,7 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() { return err; } - LOGV("[%s] Allocating %lu buffers from a native window of size %lu on " + ALOGV("[%s] Allocating %lu buffers from a native window of size %lu on " "output port", mComponentName.c_str(), def.nBufferCountActual, def.nBufferSize); @@ -534,7 +534,7 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() { mBuffers[kPortIndexOutput].editItemAt(i).mBufferID = bufferId; - LOGV("[%s] Registered graphic buffer with ID %p (pointer = %p)", + ALOGV("[%s] Registered graphic buffer with ID %p (pointer = %p)", mComponentName.c_str(), bufferId, graphicBuffer.get()); } @@ -564,7 +564,7 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() { status_t ACodec::cancelBufferToNativeWindow(BufferInfo *info) { CHECK_EQ((int)info->mStatus, (int)BufferInfo::OWNED_BY_US); - LOGV("[%s] Calling cancelBuffer on buffer %p", + ALOGV("[%s] Calling cancelBuffer on buffer %p", mComponentName.c_str(), info->mBufferID); int err = mNativeWindow->cancelBuffer( @@ -1099,7 +1099,7 @@ bool ACodec::allYourBuffersAreBelongToUs( if (info->mStatus != BufferInfo::OWNED_BY_US && info->mStatus != BufferInfo::OWNED_BY_NATIVE_WINDOW) { - LOGV("[%s] Buffer %p on port %ld still has status %d", + ALOGV("[%s] Buffer %p on port %ld still has status %d", mComponentName.c_str(), info->mBufferID, portIndex, info->mStatus); return false; @@ -1346,7 +1346,7 @@ bool ACodec::BaseState::onOMXMessage(const sp &msg) { bool ACodec::BaseState::onOMXEvent( OMX_EVENTTYPE event, OMX_U32 data1, OMX_U32 data2) { if (event != OMX_EventError) { - LOGV("[%s] EVENT(%d, 0x%08lx, 0x%08lx)", + ALOGV("[%s] EVENT(%d, 0x%08lx, 0x%08lx)", mCodec->mComponentName.c_str(), event, data1, data2); return false; @@ -1360,7 +1360,7 @@ bool ACodec::BaseState::onOMXEvent( } bool ACodec::BaseState::onOMXEmptyBufferDone(IOMX::buffer_id bufferID) { - LOGV("[%s] onOMXEmptyBufferDone %p", + ALOGV("[%s] onOMXEmptyBufferDone %p", mCodec->mComponentName.c_str(), bufferID); BufferInfo *info = @@ -1423,7 +1423,7 @@ void ACodec::BaseState::onInputBufferFilled(const sp &msg) { if (!msg->findObject("buffer", &obj)) { CHECK(msg->findInt32("err", &err)); - LOGV("[%s] saw error %d instead of an input buffer", + ALOGV("[%s] saw error %d instead of an input buffer", mCodec->mComponentName.c_str(), err); obj.clear(); @@ -1467,7 +1467,7 @@ void ACodec::BaseState::onInputBufferFilled(const sp &msg) { if (buffer != info->mData) { if (0 && !(flags & OMX_BUFFERFLAG_CODECCONFIG)) { - LOGV("[%s] Needs to copy input data.", + ALOGV("[%s] Needs to copy input data.", mCodec->mComponentName.c_str()); } @@ -1476,10 +1476,10 @@ void ACodec::BaseState::onInputBufferFilled(const sp &msg) { } if (flags & OMX_BUFFERFLAG_CODECCONFIG) { - LOGV("[%s] calling emptyBuffer %p w/ codec specific data", + ALOGV("[%s] calling emptyBuffer %p w/ codec specific data", mCodec->mComponentName.c_str(), bufferID); } else { - LOGV("[%s] calling emptyBuffer %p w/ time %lld us", + ALOGV("[%s] calling emptyBuffer %p w/ time %lld us", mCodec->mComponentName.c_str(), bufferID, timeUs); } @@ -1497,15 +1497,15 @@ void ACodec::BaseState::onInputBufferFilled(const sp &msg) { getMoreInputDataIfPossible(); } else if (!mCodec->mPortEOS[kPortIndexInput]) { if (err != ERROR_END_OF_STREAM) { - LOGV("[%s] Signalling EOS on the input port " + ALOGV("[%s] Signalling EOS on the input port " "due to error %d", mCodec->mComponentName.c_str(), err); } else { - LOGV("[%s] Signalling EOS on the input port", + ALOGV("[%s] Signalling EOS on the input port", mCodec->mComponentName.c_str()); } - LOGV("[%s] calling emptyBuffer %p signalling EOS", + ALOGV("[%s] calling emptyBuffer %p signalling EOS", mCodec->mComponentName.c_str(), bufferID); CHECK_EQ(mCodec->mOMX->emptyBuffer( @@ -1567,7 +1567,7 @@ bool ACodec::BaseState::onOMXFillBufferDone( int64_t timeUs, void *platformPrivate, void *dataPtr) { - LOGV("[%s] onOMXFillBufferDone %p time %lld us", + ALOGV("[%s] onOMXFillBufferDone %p time %lld us", mCodec->mComponentName.c_str(), bufferID, timeUs); ssize_t index; @@ -1588,7 +1588,7 @@ bool ACodec::BaseState::onOMXFillBufferDone( { if (rangeLength == 0) { if (!(flags & OMX_BUFFERFLAG_EOS)) { - LOGV("[%s] calling fillBuffer %p", + ALOGV("[%s] calling fillBuffer %p", mCodec->mComponentName.c_str(), info->mBufferID); CHECK_EQ(mCodec->mOMX->fillBuffer( @@ -1702,7 +1702,7 @@ void ACodec::BaseState::onOutputBufferDrained(const sp &msg) { } if (info != NULL) { - LOGV("[%s] calling fillBuffer %p", + ALOGV("[%s] calling fillBuffer %p", mCodec->mComponentName.c_str(), info->mBufferID); CHECK_EQ(mCodec->mOMX->fillBuffer(mCodec->mNode, info->mBufferID), @@ -1855,7 +1855,7 @@ ACodec::LoadedToIdleState::LoadedToIdleState(ACodec *codec) } void ACodec::LoadedToIdleState::stateEntered() { - LOGV("[%s] Now Loaded->Idle", mCodec->mComponentName.c_str()); + ALOGV("[%s] Now Loaded->Idle", mCodec->mComponentName.c_str()); status_t err; if ((err = allocateBuffers()) != OK) { @@ -1919,7 +1919,7 @@ ACodec::IdleToExecutingState::IdleToExecutingState(ACodec *codec) } void ACodec::IdleToExecutingState::stateEntered() { - LOGV("[%s] Now Idle->Executing", mCodec->mComponentName.c_str()); + ALOGV("[%s] Now Idle->Executing", mCodec->mComponentName.c_str()); } bool ACodec::IdleToExecutingState::onMessageReceived(const sp &msg) { @@ -1986,7 +1986,7 @@ void ACodec::ExecutingState::submitOutputBuffers() { CHECK_EQ((int)info->mStatus, (int)BufferInfo::OWNED_BY_US); } - LOGV("[%s] calling fillBuffer %p", + ALOGV("[%s] calling fillBuffer %p", mCodec->mComponentName.c_str(), info->mBufferID); CHECK_EQ(mCodec->mOMX->fillBuffer(mCodec->mNode, info->mBufferID), @@ -1998,7 +1998,7 @@ void ACodec::ExecutingState::submitOutputBuffers() { void ACodec::ExecutingState::resume() { if (mActive) { - LOGV("[%s] We're already active, no need to resume.", + ALOGV("[%s] We're already active, no need to resume.", mCodec->mComponentName.c_str()); return; @@ -2016,7 +2016,7 @@ void ACodec::ExecutingState::resume() { } void ACodec::ExecutingState::stateEntered() { - LOGV("[%s] Now Executing", mCodec->mComponentName.c_str()); + ALOGV("[%s] Now Executing", mCodec->mComponentName.c_str()); mCodec->processDeferredMessages(); } @@ -2088,7 +2088,7 @@ bool ACodec::ExecutingState::onOMXEvent( } else if (data2 == OMX_IndexConfigCommonOutputCrop) { mCodec->mSentFormat = false; } else { - LOGV("[%s] OMX_EventPortSettingsChanged 0x%08lx", + ALOGV("[%s] OMX_EventPortSettingsChanged 0x%08lx", mCodec->mComponentName.c_str(), data2); } @@ -2133,7 +2133,7 @@ bool ACodec::OutputPortSettingsChangedState::onMessageReceived( case kWhatResume: { if (msg->what() == kWhatResume) { - LOGV("[%s] Deferring resume", mCodec->mComponentName.c_str()); + ALOGV("[%s] Deferring resume", mCodec->mComponentName.c_str()); } mCodec->deferMessage(msg); @@ -2150,7 +2150,7 @@ bool ACodec::OutputPortSettingsChangedState::onMessageReceived( } void ACodec::OutputPortSettingsChangedState::stateEntered() { - LOGV("[%s] Now handling output port settings change", + ALOGV("[%s] Now handling output port settings change", mCodec->mComponentName.c_str()); } @@ -2162,7 +2162,7 @@ bool ACodec::OutputPortSettingsChangedState::onOMXEvent( if (data1 == (OMX_U32)OMX_CommandPortDisable) { CHECK_EQ(data2, (OMX_U32)kPortIndexOutput); - LOGV("[%s] Output port now disabled.", + ALOGV("[%s] Output port now disabled.", mCodec->mComponentName.c_str()); CHECK(mCodec->mBuffers[kPortIndexOutput].isEmpty()); @@ -2188,7 +2188,7 @@ bool ACodec::OutputPortSettingsChangedState::onOMXEvent( mCodec->mSentFormat = false; - LOGV("[%s] Output port now reenabled.", + ALOGV("[%s] Output port now reenabled.", mCodec->mComponentName.c_str()); if (mCodec->mExecutingState->active()) { @@ -2243,7 +2243,7 @@ bool ACodec::ExecutingToIdleState::onMessageReceived(const sp &msg) { } void ACodec::ExecutingToIdleState::stateEntered() { - LOGV("[%s] Now Executing->Idle", mCodec->mComponentName.c_str()); + ALOGV("[%s] Now Executing->Idle", mCodec->mComponentName.c_str()); mCodec->mSentFormat = false; } @@ -2335,7 +2335,7 @@ bool ACodec::IdleToLoadedState::onMessageReceived(const sp &msg) { } void ACodec::IdleToLoadedState::stateEntered() { - LOGV("[%s] Now Idle->Loaded", mCodec->mComponentName.c_str()); + ALOGV("[%s] Now Idle->Loaded", mCodec->mComponentName.c_str()); } bool ACodec::IdleToLoadedState::onOMXEvent( @@ -2346,7 +2346,7 @@ bool ACodec::IdleToLoadedState::onOMXEvent( CHECK_EQ(data1, (OMX_U32)OMX_CommandStateSet); CHECK_EQ(data2, (OMX_U32)OMX_StateLoaded); - LOGV("[%s] Now Loaded", mCodec->mComponentName.c_str()); + ALOGV("[%s] Now Loaded", mCodec->mComponentName.c_str()); CHECK_EQ(mCodec->mOMX->freeNode(mCodec->mNode), (status_t)OK); @@ -2376,7 +2376,7 @@ ACodec::FlushingState::FlushingState(ACodec *codec) } void ACodec::FlushingState::stateEntered() { - LOGV("[%s] Now Flushing", mCodec->mComponentName.c_str()); + ALOGV("[%s] Now Flushing", mCodec->mComponentName.c_str()); mFlushComplete[kPortIndexInput] = mFlushComplete[kPortIndexOutput] = false; } @@ -2441,7 +2441,7 @@ bool ACodec::FlushingState::onOMXEvent( msg->setInt32("data1", data1); msg->setInt32("data2", data2); - LOGV("[%s] Deferring OMX_EventPortSettingsChanged", + ALOGV("[%s] Deferring OMX_EventPortSettingsChanged", mCodec->mComponentName.c_str()); mCodec->deferMessage(msg); diff --git a/media/libstagefright/AMRWriter.cpp b/media/libstagefright/AMRWriter.cpp index 6436071..6c4e307 100644 --- a/media/libstagefright/AMRWriter.cpp +++ b/media/libstagefright/AMRWriter.cpp @@ -235,7 +235,7 @@ status_t AMRWriter::threadFunc() { mResumed = false; } timestampUs -= previousPausedDurationUs; - LOGV("time stamp: %lld, previous paused duration: %lld", + ALOGV("time stamp: %lld, previous paused duration: %lld", timestampUs, previousPausedDurationUs); if (timestampUs > maxTimestampUs) { maxTimestampUs = timestampUs; diff --git a/media/libstagefright/AVIExtractor.cpp b/media/libstagefright/AVIExtractor.cpp index 0be2ca4..058d10c 100644 --- a/media/libstagefright/AVIExtractor.cpp +++ b/media/libstagefright/AVIExtractor.cpp @@ -457,7 +457,7 @@ ssize_t AVIExtractor::parseChunk(off64_t offset, off64_t size, int depth) { uint32_t subFourcc = U32_AT(&tmp[8]); - LOGV("%s offset 0x%08llx LIST of '%c%c%c%c', size %d", + ALOGV("%s offset 0x%08llx LIST of '%c%c%c%c', size %d", prefix, offset, (char)(subFourcc >> 24), @@ -486,7 +486,7 @@ ssize_t AVIExtractor::parseChunk(off64_t offset, off64_t size, int depth) { } } } else { - LOGV("%s offset 0x%08llx CHUNK '%c%c%c%c'", + ALOGV("%s offset 0x%08llx CHUNK '%c%c%c%c'", prefix, offset, (char)(fourcc >> 24), @@ -856,7 +856,7 @@ status_t AVIExtractor::parseIndex(off64_t offset, size_t size) { } } - LOGV("Chunk offsets are %s", + ALOGV("Chunk offsets are %s", mOffsetsAreAbsolute ? "absolute" : "movie-chunk relative"); } @@ -908,7 +908,7 @@ status_t AVIExtractor::parseIndex(off64_t offset, size_t size) { CHECK_EQ((status_t)OK, getSampleTime(i, track->mSamples.size() - 1, &durationUs)); - LOGV("track %d duration = %.2f secs", i, durationUs / 1E6); + ALOGV("track %d duration = %.2f secs", i, durationUs / 1E6); track->mMeta->setInt64(kKeyDuration, durationUs); track->mMeta->setInt32(kKeyMaxInputSize, track->mMaxSampleSize); diff --git a/media/libstagefright/AudioPlayer.cpp b/media/libstagefright/AudioPlayer.cpp index 2581a62..9a9c3ef 100644 --- a/media/libstagefright/AudioPlayer.cpp +++ b/media/libstagefright/AudioPlayer.cpp @@ -92,7 +92,7 @@ status_t AudioPlayer::start(bool sourceAlreadyStarted) { mFirstBufferResult = mSource->read(&mFirstBuffer, &options); if (mFirstBufferResult == INFO_FORMAT_CHANGED) { - LOGV("INFO_FORMAT_CHANGED!!!"); + ALOGV("INFO_FORMAT_CHANGED!!!"); CHECK(mFirstBuffer == NULL); mFirstBufferResult = OK; @@ -223,7 +223,7 @@ void AudioPlayer::reset() { } if (mInputBuffer != NULL) { - LOGV("AudioPlayer releasing input buffer."); + ALOGV("AudioPlayer releasing input buffer."); mInputBuffer->release(); mInputBuffer = NULL; @@ -310,7 +310,7 @@ uint32_t AudioPlayer::getNumFramesPendingPlayout() const { size_t AudioPlayer::fillBuffer(void *data, size_t size) { if (mNumFramesPlayed == 0) { - LOGV("AudioCallback"); + ALOGV("AudioCallback"); } if (mReachedEOS) { @@ -390,12 +390,12 @@ size_t AudioPlayer::fillBuffer(void *data, size_t size) { int64_t timeToCompletionUs = (1000000ll * numFramesPendingPlayout) / mSampleRate; - LOGV("total number of frames played: %lld (%lld us)", + ALOGV("total number of frames played: %lld (%lld us)", (mNumFramesPlayed + numAdditionalFrames), 1000000ll * (mNumFramesPlayed + numAdditionalFrames) / mSampleRate); - LOGV("%d frames left to play, %lld us (%.2f secs)", + ALOGV("%d frames left to play, %lld us (%.2f secs)", numFramesPendingPlayout, timeToCompletionUs, timeToCompletionUs / 1E6); @@ -415,7 +415,7 @@ size_t AudioPlayer::fillBuffer(void *data, size_t size) { ((mNumFramesPlayed + size_done / mFrameSize) * 1000000) / mSampleRate; - LOGV("buffer->size() = %d, " + ALOGV("buffer->size() = %d, " "mPositionTimeMediaUs=%.2f mPositionTimeRealUs=%.2f", mInputBuffer->range_length(), mPositionTimeMediaUs / 1E6, mPositionTimeRealUs / 1E6); diff --git a/media/libstagefright/AudioSource.cpp b/media/libstagefright/AudioSource.cpp index 99c3682..3fae957 100644 --- a/media/libstagefright/AudioSource.cpp +++ b/media/libstagefright/AudioSource.cpp @@ -54,7 +54,7 @@ AudioSource::AudioSource( mNumFramesReceived(0), mNumClientOwnedBuffers(0) { - LOGV("sampleRate: %d, channels: %d", sampleRate, channels); + ALOGV("sampleRate: %d, channels: %d", sampleRate, channels); CHECK(channels == 1 || channels == 2); uint32_t flags = AudioRecord::RECORD_AGC_ENABLE | AudioRecord::RECORD_NS_ENABLE | @@ -114,7 +114,7 @@ status_t AudioSource::start(MetaData *params) { } void AudioSource::releaseQueuedFrames_l() { - LOGV("releaseQueuedFrames_l"); + ALOGV("releaseQueuedFrames_l"); List::iterator it; while (!mBuffersReceived.empty()) { it = mBuffersReceived.begin(); @@ -124,7 +124,7 @@ void AudioSource::releaseQueuedFrames_l() { } void AudioSource::waitOutstandingEncodingFrames_l() { - LOGV("waitOutstandingEncodingFrames_l: %lld", mNumClientOwnedBuffers); + ALOGV("waitOutstandingEncodingFrames_l: %lld", mNumClientOwnedBuffers); while (mNumClientOwnedBuffers > 0) { mFrameEncodingCompletionCondition.wait(mLock); } @@ -245,7 +245,7 @@ status_t AudioSource::read( } void AudioSource::signalBufferReturned(MediaBuffer *buffer) { - LOGV("signalBufferReturned: %p", buffer->data()); + ALOGV("signalBufferReturned: %p", buffer->data()); Mutex::Autolock autoLock(mLock); --mNumClientOwnedBuffers; buffer->setObserver(0); @@ -256,7 +256,7 @@ void AudioSource::signalBufferReturned(MediaBuffer *buffer) { status_t AudioSource::dataCallbackTimestamp( const AudioRecord::Buffer& audioBuffer, int64_t timeUs) { - LOGV("dataCallbackTimestamp: %lld us", timeUs); + ALOGV("dataCallbackTimestamp: %lld us", timeUs); Mutex::Autolock autoLock(mLock); if (!mStarted) { LOGW("Spurious callback from AudioRecord. Drop the audio data."); @@ -266,7 +266,7 @@ status_t AudioSource::dataCallbackTimestamp( // Drop retrieved and previously lost audio data. if (mNumFramesReceived == 0 && timeUs < mStartTimeUs) { mRecord->getInputFramesLost(); - LOGV("Drop audio data at %lld/%lld us", timeUs, mStartTimeUs); + ALOGV("Drop audio data at %lld/%lld us", timeUs, mStartTimeUs); return OK; } @@ -345,7 +345,7 @@ int16_t AudioSource::getMaxAmplitude() { } int16_t value = mMaxAmplitude; mMaxAmplitude = 0; - LOGV("max amplitude since last call: %d", value); + ALOGV("max amplitude since last call: %d", value); return value; } diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp index 1c7e58d..0e24eef 100644 --- a/media/libstagefright/AwesomePlayer.cpp +++ b/media/libstagefright/AwesomePlayer.cpp @@ -246,7 +246,7 @@ void AwesomePlayer::setListener(const wp &listener) { } void AwesomePlayer::setUID(uid_t uid) { - LOGV("AwesomePlayer running on behalf of uid %d", uid); + ALOGV("AwesomePlayer running on behalf of uid %d", uid); mUID = uid; mUIDValid = true; @@ -359,7 +359,7 @@ status_t AwesomePlayer::setDataSource_l(const sp &extractor) { if (!meta->findInt32(kKeyBitRate, &bitrate)) { const char *mime; CHECK(meta->findCString(kKeyMIMEType, &mime)); - LOGV("track of type '%s' does not publish bitrate", mime); + ALOGV("track of type '%s' does not publish bitrate", mime); totalBitRate = -1; break; @@ -370,7 +370,7 @@ status_t AwesomePlayer::setDataSource_l(const sp &extractor) { mBitrate = totalBitRate; - LOGV("mBitrate = %lld bits/sec", mBitrate); + ALOGV("mBitrate = %lld bits/sec", mBitrate); { Mutex::Autolock autoLock(mStatsLock); @@ -634,7 +634,7 @@ void AwesomePlayer::onVideoLagUpdate() { int64_t videoLateByUs = audioTimeUs - mVideoTimeUs; if (!(mFlags & VIDEO_AT_EOS) && videoLateByUs > 300000ll) { - LOGV("video late by %lld ms.", videoLateByUs / 1000ll); + ALOGV("video late by %lld ms.", videoLateByUs / 1000ll); notifyListener_l( MEDIA_INFO, @@ -662,7 +662,7 @@ void AwesomePlayer::onBufferingUpdate() { notifyListener_l(MEDIA_BUFFERING_UPDATE, 100); } if (mFlags & PREPARING) { - LOGV("cache has reached EOS, prepare is done."); + ALOGV("cache has reached EOS, prepare is done."); finishAsyncPrepare_l(); } } else { @@ -698,7 +698,7 @@ void AwesomePlayer::onBufferingUpdate() { play_l(); notifyListener_l(MEDIA_INFO, MEDIA_INFO_BUFFERING_END); } else if (mFlags & PREPARING) { - LOGV("cache has filled up (> %d), prepare is done", + ALOGV("cache has filled up (> %d), prepare is done", kHighWaterMarkBytes); finishAsyncPrepare_l(); } @@ -718,7 +718,7 @@ void AwesomePlayer::onBufferingUpdate() { notifyListener_l(MEDIA_BUFFERING_UPDATE, 100); } if (mFlags & PREPARING) { - LOGV("cache has reached EOS, prepare is done."); + ALOGV("cache has reached EOS, prepare is done."); finishAsyncPrepare_l(); } } else { @@ -734,7 +734,7 @@ void AwesomePlayer::onBufferingUpdate() { int64_t cachedDurationUs; bool eos; if (getCachedDuration_l(&cachedDurationUs, &eos)) { - LOGV("cachedDurationUs = %.2f secs, eos=%d", + ALOGV("cachedDurationUs = %.2f secs, eos=%d", cachedDurationUs / 1E6, eos); if ((mFlags & PLAYING) && !eos @@ -754,7 +754,7 @@ void AwesomePlayer::onBufferingUpdate() { play_l(); notifyListener_l(MEDIA_INFO, MEDIA_INFO_BUFFERING_END); } else if (mFlags & PREPARING) { - LOGV("cache has filled up (%.2f secs), prepare is done", + ALOGV("cache has filled up (%.2f secs), prepare is done", cachedDurationUs / 1E6); finishAsyncPrepare_l(); } @@ -786,7 +786,7 @@ void AwesomePlayer::onStreamDone() { mStreamDoneEventPending = false; if (mStreamDoneStatus != ERROR_END_OF_STREAM) { - LOGV("MEDIA_ERROR %d", mStreamDoneStatus); + ALOGV("MEDIA_ERROR %d", mStreamDoneStatus); notifyListener_l( MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, mStreamDoneStatus); @@ -817,7 +817,7 @@ void AwesomePlayer::onStreamDone() { postVideoEvent_l(); } } else { - LOGV("MEDIA_PLAYBACK_COMPLETE"); + ALOGV("MEDIA_PLAYBACK_COMPLETE"); notifyListener_l(MEDIA_PLAYBACK_COMPLETE); pause_l(true /* at eos */); @@ -988,20 +988,20 @@ void AwesomePlayer::notifyVideoSize_l() { cropRight = width - 1; cropBottom = height - 1; - LOGV("got dimensions only %d x %d", width, height); + ALOGV("got dimensions only %d x %d", width, height); } else { - LOGV("got crop rect %d, %d, %d, %d", + ALOGV("got crop rect %d, %d, %d, %d", cropLeft, cropTop, cropRight, cropBottom); } int32_t displayWidth; if (meta->findInt32(kKeyDisplayWidth, &displayWidth)) { - LOGV("Display width changed (%d=>%d)", mDisplayWidth, displayWidth); + ALOGV("Display width changed (%d=>%d)", mDisplayWidth, displayWidth); mDisplayWidth = displayWidth; } int32_t displayHeight; if (meta->findInt32(kKeyDisplayHeight, &displayHeight)) { - LOGV("Display height changed (%d=>%d)", mDisplayHeight, displayHeight); + ALOGV("Display height changed (%d=>%d)", mDisplayHeight, displayHeight); mDisplayHeight = displayHeight; } @@ -1176,7 +1176,7 @@ void AwesomePlayer::shutdownVideoDecoder_l() { usleep(1000); } IPCThreadState::self()->flushCommands(); - LOGV("video decoder shutdown completed"); + ALOGV("video decoder shutdown completed"); } status_t AwesomePlayer::setNativeWindow_l(const sp &native) { @@ -1186,7 +1186,7 @@ status_t AwesomePlayer::setNativeWindow_l(const sp &native) { return OK; } - LOGV("attempting to reconfigure to use new surface"); + ALOGV("attempting to reconfigure to use new surface"); bool wasPlaying = (mFlags & PLAYING) != 0; @@ -1323,7 +1323,7 @@ status_t AwesomePlayer::seekTo_l(int64_t timeUs) { } if (!(mFlags & PLAYING)) { - LOGV("seeking while paused, sending SEEK_COMPLETE notification" + ALOGV("seeking while paused, sending SEEK_COMPLETE notification" " immediately."); notifyListener_l(MEDIA_SEEK_COMPLETE); @@ -1476,7 +1476,7 @@ status_t AwesomePlayer::initVideoDecoder(uint32_t flags) { flags |= OMXCodec::kEnableGrallocUsageProtected; } #endif - LOGV("initVideoDecoder flags=0x%x", flags); + ALOGV("initVideoDecoder flags=0x%x", flags); mVideoSource = OMXCodec::Create( mClient.interface(), mVideoTrack->getFormat(), false, // createEncoder @@ -1540,7 +1540,7 @@ void AwesomePlayer::finishSeekIfNecessary(int64_t videoTimeUs) { } if (mAudioPlayer != NULL) { - LOGV("seeking audio to %lld us (%.2f secs).", videoTimeUs, videoTimeUs / 1E6); + ALOGV("seeking audio to %lld us (%.2f secs).", videoTimeUs, videoTimeUs / 1E6); // If we don't have a video time, seek audio to the originally // requested seek time instead. @@ -1603,7 +1603,7 @@ void AwesomePlayer::onVideoEvent() { if (!mVideoBuffer) { MediaSource::ReadOptions options; if (mSeeking != NO_SEEK) { - LOGV("seeking to %lld us (%.2f secs)", mSeekTimeUs, mSeekTimeUs / 1E6); + ALOGV("seeking to %lld us (%.2f secs)", mSeekTimeUs, mSeekTimeUs / 1E6); options.setSeekTo( mSeekTimeUs, @@ -1619,7 +1619,7 @@ void AwesomePlayer::onVideoEvent() { CHECK(mVideoBuffer == NULL); if (err == INFO_FORMAT_CHANGED) { - LOGV("VideoSource signalled format change."); + ALOGV("VideoSource signalled format change."); notifyVideoSize_l(); @@ -1634,7 +1634,7 @@ void AwesomePlayer::onVideoEvent() { // a seek request pending that needs to be applied // to the audio track. if (mSeeking != NO_SEEK) { - LOGV("video stream ended while seeking!"); + ALOGV("video stream ended while seeking!"); } finishSeekIfNecessary(-1); @@ -1751,13 +1751,13 @@ void AwesomePlayer::onVideoEvent() { if (latenessUs > 40000) { // We're more than 40ms late. - LOGV("we're late by %lld us (%.2f secs)", + ALOGV("we're late by %lld us (%.2f secs)", latenessUs, latenessUs / 1E6); if (!(mFlags & SLOW_DECODER_HACK) || mSinceLastDropped > FRAME_DROP_FREQ) { - LOGV("we're late by %lld us (%.2f secs) dropping " + ALOGV("we're late by %lld us (%.2f secs) dropping " "one after %d frames", latenessUs, latenessUs / 1E6, mSinceLastDropped); diff --git a/media/libstagefright/CameraSource.cpp b/media/libstagefright/CameraSource.cpp index 256f3ba..092ae23 100755 --- a/media/libstagefright/CameraSource.cpp +++ b/media/libstagefright/CameraSource.cpp @@ -61,12 +61,12 @@ CameraSourceListener::~CameraSourceListener() { } void CameraSourceListener::notify(int32_t msgType, int32_t ext1, int32_t ext2) { - LOGV("notify(%d, %d, %d)", msgType, ext1, ext2); + ALOGV("notify(%d, %d, %d)", msgType, ext1, ext2); } void CameraSourceListener::postData(int32_t msgType, const sp &dataPtr, camera_frame_metadata_t *metadata) { - LOGV("postData(%d, ptr:%p, size:%d)", + ALOGV("postData(%d, ptr:%p, size:%d)", msgType, dataPtr->pointer(), dataPtr->size()); sp source = mSource.promote(); @@ -214,7 +214,7 @@ static bool isVideoSizeSupported( int32_t width, int32_t height, const Vector& supportedSizes) { - LOGV("isVideoSizeSupported"); + ALOGV("isVideoSizeSupported"); for (size_t i = 0; i < supportedSizes.size(); ++i) { if (width == supportedSizes[i].width && height == supportedSizes[i].height) { @@ -291,7 +291,7 @@ status_t CameraSource::configureCamera( CameraParameters* params, int32_t width, int32_t height, int32_t frameRate) { - LOGV("configureCamera"); + ALOGV("configureCamera"); Vector sizes; bool isSetVideoSizeSupportedByCamera = true; getSupportedVideoSizes(*params, &isSetVideoSizeSupportedByCamera, sizes); @@ -323,7 +323,7 @@ status_t CameraSource::configureCamera( const char* supportedFrameRates = params->get(CameraParameters::KEY_SUPPORTED_PREVIEW_FRAME_RATES); CHECK(supportedFrameRates != NULL); - LOGV("Supported frame rates: %s", supportedFrameRates); + ALOGV("Supported frame rates: %s", supportedFrameRates); char buf[4]; snprintf(buf, 4, "%d", frameRate); if (strstr(supportedFrameRates, buf) == NULL) { @@ -367,7 +367,7 @@ status_t CameraSource::checkVideoSize( const CameraParameters& params, int32_t width, int32_t height) { - LOGV("checkVideoSize"); + ALOGV("checkVideoSize"); // The actual video size is the same as the preview size // if the camera hal does not support separate video and // preview output. In this case, we retrieve the video @@ -419,7 +419,7 @@ status_t CameraSource::checkFrameRate( const CameraParameters& params, int32_t frameRate) { - LOGV("checkFrameRate"); + ALOGV("checkFrameRate"); int32_t frameRateActual = params.getPreviewFrameRate(); if (frameRateActual < 0) { LOGE("Failed to retrieve preview frame rate (%d)", frameRateActual); @@ -465,7 +465,7 @@ status_t CameraSource::init( int32_t frameRate, bool storeMetaDataInVideoBuffers) { - LOGV("init"); + ALOGV("init"); status_t err = OK; int64_t token = IPCThreadState::self()->clearCallingIdentity(); err = initWithCameraAccess(camera, proxy, cameraId, @@ -482,7 +482,7 @@ status_t CameraSource::initWithCameraAccess( Size videoSize, int32_t frameRate, bool storeMetaDataInVideoBuffers) { - LOGV("initWithCameraAccess"); + ALOGV("initWithCameraAccess"); status_t err = OK; if ((err = isCameraAvailable(camera, proxy, cameraId)) != OK) { @@ -555,7 +555,7 @@ CameraSource::~CameraSource() { } void CameraSource::startCameraRecording() { - LOGV("startCameraRecording"); + ALOGV("startCameraRecording"); // Reset the identity to the current thread because media server owns the // camera and recording is started by the applications. The applications // will connect to the camera in ICameraRecordingProxy::startRecording. @@ -573,7 +573,7 @@ void CameraSource::startCameraRecording() { } status_t CameraSource::start(MetaData *meta) { - LOGV("start"); + ALOGV("start"); CHECK(!mStarted); if (mInitCheck != OK) { LOGE("CameraSource is not initialized yet"); @@ -599,7 +599,7 @@ status_t CameraSource::start(MetaData *meta) { } void CameraSource::stopCameraRecording() { - LOGV("stopCameraRecording"); + ALOGV("stopCameraRecording"); if (mCameraFlags & FLAGS_HOT_CAMERA) { mCameraRecordingProxy->stopRecording(); } else { @@ -609,11 +609,11 @@ void CameraSource::stopCameraRecording() { } void CameraSource::releaseCamera() { - LOGV("releaseCamera"); + ALOGV("releaseCamera"); if (mCamera != 0) { int64_t token = IPCThreadState::self()->clearCallingIdentity(); if ((mCameraFlags & FLAGS_HOT_CAMERA) == 0) { - LOGV("Camera was cold when we started, stopping preview"); + ALOGV("Camera was cold when we started, stopping preview"); mCamera->stopPreview(); mCamera->disconnect(); } @@ -671,7 +671,7 @@ status_t CameraSource::stop() { } void CameraSource::releaseRecordingFrame(const sp& frame) { - LOGV("releaseRecordingFrame"); + ALOGV("releaseRecordingFrame"); if (mCameraRecordingProxy != NULL) { mCameraRecordingProxy->releaseRecordingFrame(frame); } else if (mCamera != NULL) { @@ -700,7 +700,7 @@ void CameraSource::releaseOneRecordingFrame(const sp& frame) { } void CameraSource::signalBufferReturned(MediaBuffer *buffer) { - LOGV("signalBufferReturned: %p", buffer->data()); + ALOGV("signalBufferReturned: %p", buffer->data()); Mutex::Autolock autoLock(mLock); for (List >::iterator it = mFramesBeingEncoded.begin(); it != mFramesBeingEncoded.end(); ++it) { @@ -719,7 +719,7 @@ void CameraSource::signalBufferReturned(MediaBuffer *buffer) { status_t CameraSource::read( MediaBuffer **buffer, const ReadOptions *options) { - LOGV("read"); + ALOGV("read"); *buffer = NULL; @@ -765,10 +765,10 @@ status_t CameraSource::read( void CameraSource::dataCallbackTimestamp(int64_t timestampUs, int32_t msgType, const sp &data) { - LOGV("dataCallbackTimestamp: timestamp %lld us", timestampUs); + ALOGV("dataCallbackTimestamp: timestamp %lld us", timestampUs); Mutex::Autolock autoLock(mLock); if (!mStarted || (mNumFramesReceived == 0 && timestampUs < mStartTimeUs)) { - LOGV("Drop frame at %lld/%lld us", timestampUs, mStartTimeUs); + ALOGV("Drop frame at %lld/%lld us", timestampUs, mStartTimeUs); releaseOneRecordingFrame(data); return; } @@ -807,13 +807,13 @@ void CameraSource::dataCallbackTimestamp(int64_t timestampUs, mFramesReceived.push_back(data); int64_t timeUs = mStartTimeUs + (timestampUs - mFirstFrameTimeUs); mFrameTimes.push_back(timeUs); - LOGV("initial delay: %lld, current time stamp: %lld", + ALOGV("initial delay: %lld, current time stamp: %lld", mStartTimeUs, timeUs); mFrameAvailableCondition.signal(); } bool CameraSource::isMetaDataStoredInVideoBuffers() const { - LOGV("isMetaDataStoredInVideoBuffers"); + ALOGV("isMetaDataStoredInVideoBuffers"); return mIsMetaDataStoredInVideoBuffers; } diff --git a/media/libstagefright/CameraSourceTimeLapse.cpp b/media/libstagefright/CameraSourceTimeLapse.cpp index 1ba79e5..3c4885a 100644 --- a/media/libstagefright/CameraSourceTimeLapse.cpp +++ b/media/libstagefright/CameraSourceTimeLapse.cpp @@ -90,7 +90,7 @@ CameraSourceTimeLapse::~CameraSourceTimeLapse() { } void CameraSourceTimeLapse::startQuickReadReturns() { - LOGV("startQuickReadReturns"); + ALOGV("startQuickReadReturns"); Mutex::Autolock autoLock(mQuickStopLock); // Enable quick stop mode. @@ -105,7 +105,7 @@ void CameraSourceTimeLapse::startQuickReadReturns() { bool CameraSourceTimeLapse::trySettingVideoSize( int32_t width, int32_t height) { - LOGV("trySettingVideoSize"); + ALOGV("trySettingVideoSize"); int64_t token = IPCThreadState::self()->clearCallingIdentity(); String8 s = mCamera->getParameters(); @@ -131,7 +131,7 @@ bool CameraSourceTimeLapse::trySettingVideoSize( bool isSuccessful = false; if (videoSizeSupported) { - LOGV("Video size (%d, %d) is supported", width, height); + ALOGV("Video size (%d, %d) is supported", width, height); if (videoOutputSupported) { params.setVideoSize(width, height); } else { @@ -150,7 +150,7 @@ bool CameraSourceTimeLapse::trySettingVideoSize( } void CameraSourceTimeLapse::signalBufferReturned(MediaBuffer* buffer) { - LOGV("signalBufferReturned"); + ALOGV("signalBufferReturned"); Mutex::Autolock autoLock(mQuickStopLock); if (mQuickStop && (buffer == mLastReadBufferCopy)) { buffer->setObserver(NULL); @@ -165,7 +165,7 @@ void createMediaBufferCopy( int64_t frameTime, MediaBuffer **newBuffer) { - LOGV("createMediaBufferCopy"); + ALOGV("createMediaBufferCopy"); size_t sourceSize = sourceBuffer.size(); void* sourcePointer = sourceBuffer.data(); @@ -176,7 +176,7 @@ void createMediaBufferCopy( } void CameraSourceTimeLapse::fillLastReadBufferCopy(MediaBuffer& sourceBuffer) { - LOGV("fillLastReadBufferCopy"); + ALOGV("fillLastReadBufferCopy"); int64_t frameTime; CHECK(sourceBuffer.meta_data()->findInt64(kKeyTime, &frameTime)); createMediaBufferCopy(sourceBuffer, frameTime, &mLastReadBufferCopy); @@ -186,7 +186,7 @@ void CameraSourceTimeLapse::fillLastReadBufferCopy(MediaBuffer& sourceBuffer) { status_t CameraSourceTimeLapse::read( MediaBuffer **buffer, const ReadOptions *options) { - LOGV("read"); + ALOGV("read"); if (mLastReadBufferCopy == NULL) { mLastReadStatus = CameraSource::read(buffer, options); @@ -205,7 +205,7 @@ status_t CameraSourceTimeLapse::read( } void CameraSourceTimeLapse::stopCameraRecording() { - LOGV("stopCameraRecording"); + ALOGV("stopCameraRecording"); CameraSource::stopCameraRecording(); if (mLastReadBufferCopy) { mLastReadBufferCopy->release(); @@ -216,7 +216,7 @@ void CameraSourceTimeLapse::stopCameraRecording() { sp CameraSourceTimeLapse::createIMemoryCopy( const sp &source_data) { - LOGV("createIMemoryCopy"); + ALOGV("createIMemoryCopy"); size_t source_size = source_data->size(); void* source_pointer = source_data->pointer(); @@ -227,7 +227,7 @@ sp CameraSourceTimeLapse::createIMemoryCopy( } bool CameraSourceTimeLapse::skipCurrentFrame(int64_t timestampUs) { - LOGV("skipCurrentFrame"); + ALOGV("skipCurrentFrame"); if (mSkipCurrentFrame) { mSkipCurrentFrame = false; return true; @@ -237,11 +237,11 @@ bool CameraSourceTimeLapse::skipCurrentFrame(int64_t timestampUs) { } bool CameraSourceTimeLapse::skipFrameAndModifyTimeStamp(int64_t *timestampUs) { - LOGV("skipFrameAndModifyTimeStamp"); + ALOGV("skipFrameAndModifyTimeStamp"); if (mLastTimeLapseFrameRealTimestampUs == 0) { // First time lapse frame. Initialize mLastTimeLapseFrameRealTimestampUs // to current time (timestampUs) and save frame data. - LOGV("dataCallbackTimestamp timelapse: initial frame"); + ALOGV("dataCallbackTimestamp timelapse: initial frame"); mLastTimeLapseFrameRealTimestampUs = *timestampUs; return false; @@ -253,7 +253,7 @@ bool CameraSourceTimeLapse::skipFrameAndModifyTimeStamp(int64_t *timestampUs) { // mForceRead may be set to true by startQuickReadReturns(). In that // case don't skip this frame. if (mForceRead) { - LOGV("dataCallbackTimestamp timelapse: forced read"); + ALOGV("dataCallbackTimestamp timelapse: forced read"); mForceRead = false; *timestampUs = mLastFrameTimestampUs + mTimeBetweenTimeLapseVideoFramesUs; @@ -269,14 +269,14 @@ bool CameraSourceTimeLapse::skipFrameAndModifyTimeStamp(int64_t *timestampUs) { // Skip all frames from last encoded frame until // sufficient time (mTimeBetweenTimeLapseFrameCaptureUs) has passed. // Tell the camera to release its recording frame and return. - LOGV("dataCallbackTimestamp timelapse: skipping intermediate frame"); + ALOGV("dataCallbackTimestamp timelapse: skipping intermediate frame"); return true; } else { // Desired frame has arrived after mTimeBetweenTimeLapseFrameCaptureUs time: // - Reset mLastTimeLapseFrameRealTimestampUs to current time. // - Artificially modify timestampUs to be one frame time (1/framerate) ahead // of the last encoded frame's time stamp. - LOGV("dataCallbackTimestamp timelapse: got timelapse frame"); + ALOGV("dataCallbackTimestamp timelapse: got timelapse frame"); mLastTimeLapseFrameRealTimestampUs = *timestampUs; *timestampUs = mLastFrameTimestampUs + mTimeBetweenTimeLapseVideoFramesUs; @@ -287,7 +287,7 @@ bool CameraSourceTimeLapse::skipFrameAndModifyTimeStamp(int64_t *timestampUs) { void CameraSourceTimeLapse::dataCallbackTimestamp(int64_t timestampUs, int32_t msgType, const sp &data) { - LOGV("dataCallbackTimestamp"); + ALOGV("dataCallbackTimestamp"); mSkipCurrentFrame = skipFrameAndModifyTimeStamp(×tampUs); CameraSource::dataCallbackTimestamp(timestampUs, msgType, data); } diff --git a/media/libstagefright/ESDS.cpp b/media/libstagefright/ESDS.cpp index 1f7ee25..1b225fa 100644 --- a/media/libstagefright/ESDS.cpp +++ b/media/libstagefright/ESDS.cpp @@ -91,7 +91,7 @@ status_t ESDS::skipDescriptorHeader( } while (more); - LOGV("tag=0x%02x data_size=%d", *tag, *data_size); + ALOGV("tag=0x%02x data_size=%d", *tag, *data_size); if (*data_size > size) { return ERROR_MALFORMED; diff --git a/media/libstagefright/FLACExtractor.cpp b/media/libstagefright/FLACExtractor.cpp index 8ba5a2d..a0c08e2 100644 --- a/media/libstagefright/FLACExtractor.cpp +++ b/media/libstagefright/FLACExtractor.cpp @@ -454,7 +454,7 @@ FLACParser::FLACParser( mWriteBuffer(NULL), mErrorStatus((FLAC__StreamDecoderErrorStatus) -1) { - LOGV("FLACParser::FLACParser"); + ALOGV("FLACParser::FLACParser"); memset(&mStreamInfo, 0, sizeof(mStreamInfo)); memset(&mWriteHeader, 0, sizeof(mWriteHeader)); mInitCheck = init(); @@ -462,7 +462,7 @@ FLACParser::FLACParser( FLACParser::~FLACParser() { - LOGV("FLACParser::~FLACParser"); + ALOGV("FLACParser::~FLACParser"); if (mDecoder != NULL) { FLAC__stream_decoder_delete(mDecoder); mDecoder = NULL; @@ -606,7 +606,7 @@ MediaBuffer *FLACParser::readBuffer(bool doSeek, FLAC__uint64 sample) LOGE("FLACParser::readBuffer seek to sample %llu failed", sample); return NULL; } - LOGV("FLACParser::readBuffer seek to sample %llu succeeded", sample); + ALOGV("FLACParser::readBuffer seek to sample %llu succeeded", sample); } else { if (!FLAC__stream_decoder_process_single(mDecoder)) { LOGE("FLACParser::readBuffer process_single failed"); @@ -614,7 +614,7 @@ MediaBuffer *FLACParser::readBuffer(bool doSeek, FLAC__uint64 sample) } } if (!mWriteCompleted) { - LOGV("FLACParser::readBuffer write did not complete"); + ALOGV("FLACParser::readBuffer write did not complete"); return NULL; } // verify that block header keeps the promises made by STREAMINFO @@ -661,13 +661,13 @@ FLACSource::FLACSource( mInitCheck(false), mStarted(false) { - LOGV("FLACSource::FLACSource"); + ALOGV("FLACSource::FLACSource"); mInitCheck = init(); } FLACSource::~FLACSource() { - LOGV("~FLACSource::FLACSource"); + ALOGV("~FLACSource::FLACSource"); if (mStarted) { stop(); } @@ -675,7 +675,7 @@ FLACSource::~FLACSource() status_t FLACSource::start(MetaData *params) { - LOGV("FLACSource::start"); + ALOGV("FLACSource::start"); CHECK(!mStarted); mParser->allocateBuffers(); @@ -686,7 +686,7 @@ status_t FLACSource::start(MetaData *params) status_t FLACSource::stop() { - LOGV("FLACSource::stop"); + ALOGV("FLACSource::stop"); CHECK(mStarted); mParser->releaseBuffers(); @@ -729,7 +729,7 @@ status_t FLACSource::read( status_t FLACSource::init() { - LOGV("FLACSource::init"); + ALOGV("FLACSource::init"); // re-use the same track metadata passed into constructor from FLACExtractor mParser = new FLACParser(mDataSource); return mParser->initCheck(); @@ -742,13 +742,13 @@ FLACExtractor::FLACExtractor( : mDataSource(dataSource), mInitCheck(false) { - LOGV("FLACExtractor::FLACExtractor"); + ALOGV("FLACExtractor::FLACExtractor"); mInitCheck = init(); } FLACExtractor::~FLACExtractor() { - LOGV("~FLACExtractor::FLACExtractor"); + ALOGV("~FLACExtractor::FLACExtractor"); } size_t FLACExtractor::countTracks() diff --git a/media/libstagefright/MP3Extractor.cpp b/media/libstagefright/MP3Extractor.cpp index 34e9cd7..ab1dc5c 100644 --- a/media/libstagefright/MP3Extractor.cpp +++ b/media/libstagefright/MP3Extractor.cpp @@ -81,7 +81,7 @@ static bool Resync( *inout_pos += len; - LOGV("skipped ID3 tag, new starting offset is %lld (0x%016llx)", + ALOGV("skipped ID3 tag, new starting offset is %lld (0x%016llx)", *inout_pos, *inout_pos); } @@ -105,7 +105,7 @@ static bool Resync( do { if (pos >= *inout_pos + kMaxBytesChecked) { // Don't scan forever. - LOGV("giving up at offset %lld", pos); + ALOGV("giving up at offset %lld", pos); break; } @@ -155,7 +155,7 @@ static bool Resync( continue; } - LOGV("found possible 1st frame at %lld (header = 0x%08x)", pos, header); + ALOGV("found possible 1st frame at %lld (header = 0x%08x)", pos, header); // We found what looks like a valid frame, // now find its successors. @@ -172,7 +172,7 @@ static bool Resync( uint32_t test_header = U32_AT(tmp); - LOGV("subsequent header is %08x", test_header); + ALOGV("subsequent header is %08x", test_header); if ((test_header & kMask) != (header & kMask)) { valid = false; @@ -186,7 +186,7 @@ static bool Resync( break; } - LOGV("found subsequent frame #%d at %lld", j + 2, test_pos); + ALOGV("found subsequent frame #%d at %lld", j + 2, test_pos); test_pos += test_frame_size; } @@ -198,7 +198,7 @@ static bool Resync( *out_header = header; } } else { - LOGV("no dice, no valid sequence of frames found."); + ALOGV("no dice, no valid sequence of frames found."); } ++pos; @@ -483,7 +483,7 @@ status_t MP3Source::read( } // Lost sync. - LOGV("lost sync! header = 0x%08x, old header = 0x%08x\n", header, mFixedHeader); + ALOGV("lost sync! header = 0x%08x, old header = 0x%08x\n", header, mFixedHeader); off64_t pos = mCurrentPos; if (!Resync(mDataSource, mFixedHeader, &pos, NULL, NULL)) { diff --git a/media/libstagefright/MPEG2TSWriter.cpp b/media/libstagefright/MPEG2TSWriter.cpp index 02eeb40..36009ab 100644 --- a/media/libstagefright/MPEG2TSWriter.cpp +++ b/media/libstagefright/MPEG2TSWriter.cpp @@ -644,7 +644,7 @@ void MPEG2TSWriter::onMessageReceived(const sp &msg) { CHECK(source->lastAccessUnit() == NULL); source->setLastAccessUnit(buffer); - LOGV("lastAccessUnitTimeUs[%d] = %.2f secs", + ALOGV("lastAccessUnitTimeUs[%d] = %.2f secs", sourceIndex, source->lastAccessUnitTimeUs() / 1E6); int64_t minTimeUs = -1; @@ -668,11 +668,11 @@ void MPEG2TSWriter::onMessageReceived(const sp &msg) { } if (minTimeUs < 0) { - LOGV("not a all tracks have valid data."); + ALOGV("not a all tracks have valid data."); break; } - LOGV("writing access unit at time %.2f secs (index %d)", + ALOGV("writing access unit at time %.2f secs (index %d)", minTimeUs / 1E6, minIndex); source = mSources.editItemAt(minIndex); diff --git a/media/libstagefright/MPEG4Extractor.cpp b/media/libstagefright/MPEG4Extractor.cpp index 1e24599..adec997 100644 --- a/media/libstagefright/MPEG4Extractor.cpp +++ b/media/libstagefright/MPEG4Extractor.cpp @@ -682,7 +682,7 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) { case FOURCC('i', 'l', 's', 't'): { if (chunk_type == FOURCC('s', 't', 'b', 'l')) { - LOGV("sampleTable chunk is %d bytes long.", (size_t)chunk_size); + ALOGV("sampleTable chunk is %d bytes long.", (size_t)chunk_size); if (mDataSource->flags() & (DataSource::kWantsPrefetching @@ -1381,7 +1381,7 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) { case FOURCC('c', 'o', 'v', 'r'): { if (mFileMetaData != NULL) { - LOGV("chunk_data_size = %lld and data_offset = %lld", + ALOGV("chunk_data_size = %lld and data_offset = %lld", chunk_data_size, data_offset); uint8_t *buffer = new uint8_t[chunk_data_size + 1]; if (mDataSource->readAt( @@ -1784,7 +1784,7 @@ status_t MPEG4Extractor::updateAudioTrackInfoFromESDS_MPEG4Audio( CHECK(mLastTrack->meta->findInt32(kKeySampleRate, &prevSampleRate)); if (prevSampleRate != sampleRate) { - LOGV("mpeg4 audio sample rate different from previous setting. " + ALOGV("mpeg4 audio sample rate different from previous setting. " "was: %d, now: %d", prevSampleRate, sampleRate); } @@ -1794,7 +1794,7 @@ status_t MPEG4Extractor::updateAudioTrackInfoFromESDS_MPEG4Audio( CHECK(mLastTrack->meta->findInt32(kKeyChannelCount, &prevChannelCount)); if (prevChannelCount != numChannels) { - LOGV("mpeg4 audio channel count different from previous setting. " + ALOGV("mpeg4 audio channel count different from previous setting. " "was: %d, now: %d", prevChannelCount, numChannels); } diff --git a/media/libstagefright/MPEG4Writer.cpp b/media/libstagefright/MPEG4Writer.cpp index 46d87df..dfee281 100755 --- a/media/libstagefright/MPEG4Writer.cpp +++ b/media/libstagefright/MPEG4Writer.cpp @@ -472,7 +472,7 @@ status_t MPEG4Writer::start(MetaData *param) { mTimeScale = 1000; } CHECK(mTimeScale > 0); - LOGV("movie time scale: %d", mTimeScale); + ALOGV("movie time scale: %d", mTimeScale); mStreamableFile = true; mWriteMoovBoxToMemory = false; @@ -569,7 +569,7 @@ void MPEG4Writer::stopWriterThread() { * u, v and w is in 2.30 format. */ void MPEG4Writer::writeCompositionMatrix(int degrees) { - LOGV("writeCompositionMatrix"); + ALOGV("writeCompositionMatrix"); uint32_t a = 0x00010000; uint32_t b = 0; uint32_t c = 0; @@ -1200,7 +1200,7 @@ void MPEG4Writer::Track::addChunkOffset(off64_t offset) { } void MPEG4Writer::Track::setTimeScale() { - LOGV("setTimeScale"); + ALOGV("setTimeScale"); // Default time scale mTimeScale = 90000; @@ -1262,14 +1262,14 @@ MPEG4Writer::Track::~Track() { } void MPEG4Writer::Track::initTrackingProgressStatus(MetaData *params) { - LOGV("initTrackingProgressStatus"); + ALOGV("initTrackingProgressStatus"); mPreviousTrackTimeUs = -1; mTrackingProgressStatus = false; mTrackEveryTimeDurationUs = 0; { int64_t timeUs; if (params && params->findInt64(kKeyTrackTimeStatus, &timeUs)) { - LOGV("Receive request to track progress status for every %lld us", timeUs); + ALOGV("Receive request to track progress status for every %lld us", timeUs); mTrackEveryTimeDurationUs = timeUs; mTrackingProgressStatus = true; } @@ -1278,14 +1278,14 @@ void MPEG4Writer::Track::initTrackingProgressStatus(MetaData *params) { // static void *MPEG4Writer::ThreadWrapper(void *me) { - LOGV("ThreadWrapper: %p", me); + ALOGV("ThreadWrapper: %p", me); MPEG4Writer *writer = static_cast(me); writer->threadFunc(); return NULL; } void MPEG4Writer::bufferChunk(const Chunk& chunk) { - LOGV("bufferChunk: %p", chunk.mTrack); + ALOGV("bufferChunk: %p", chunk.mTrack); Mutex::Autolock autolock(mLock); CHECK_EQ(mDone, false); @@ -1303,7 +1303,7 @@ void MPEG4Writer::bufferChunk(const Chunk& chunk) { } void MPEG4Writer::writeChunkToFile(Chunk* chunk) { - LOGV("writeChunkToFile: %lld from %s track", + ALOGV("writeChunkToFile: %lld from %s track", chunk->mTimeStampUs, chunk->mTrack->isAudio()? "audio": "video"); int32_t isFirstSample = true; @@ -1327,7 +1327,7 @@ void MPEG4Writer::writeChunkToFile(Chunk* chunk) { } void MPEG4Writer::writeAllChunks() { - LOGV("writeAllChunks"); + ALOGV("writeAllChunks"); size_t outstandingChunks = 0; Chunk chunk; while (findChunkToWrite(&chunk)) { @@ -1342,7 +1342,7 @@ void MPEG4Writer::writeAllChunks() { } bool MPEG4Writer::findChunkToWrite(Chunk *chunk) { - LOGV("findChunkToWrite"); + ALOGV("findChunkToWrite"); int64_t minTimestampUs = 0x7FFFFFFFFFFFFFFFLL; Track *track = NULL; @@ -1358,7 +1358,7 @@ bool MPEG4Writer::findChunkToWrite(Chunk *chunk) { } if (track == NULL) { - LOGV("Nothing to be written after all"); + ALOGV("Nothing to be written after all"); return false; } @@ -1387,7 +1387,7 @@ bool MPEG4Writer::findChunkToWrite(Chunk *chunk) { } void MPEG4Writer::threadFunc() { - LOGV("threadFunc"); + ALOGV("threadFunc"); prctl(PR_SET_NAME, (unsigned long)"MPEG4Writer", 0, 0, 0); @@ -1413,7 +1413,7 @@ void MPEG4Writer::threadFunc() { } status_t MPEG4Writer::startWriterThread() { - LOGV("startWriterThread"); + ALOGV("startWriterThread"); mDone = false; mIsFirstChunk = true; @@ -1564,7 +1564,7 @@ void *MPEG4Writer::Track::ThreadWrapper(void *me) { } static void getNalUnitType(uint8_t byte, uint8_t* type) { - LOGV("getNalUnitType: %d", byte); + ALOGV("getNalUnitType: %d", byte); // nal_unit_type: 5-bit unsigned integer *type = (byte & 0x1F); @@ -1573,7 +1573,7 @@ static void getNalUnitType(uint8_t byte, uint8_t* type) { static const uint8_t *findNextStartCode( const uint8_t *data, size_t length) { - LOGV("findNextStartCode: %p %d", data, length); + ALOGV("findNextStartCode: %p %d", data, length); size_t bytesLeft = length; while (bytesLeft > 4 && @@ -1589,7 +1589,7 @@ static const uint8_t *findNextStartCode( const uint8_t *MPEG4Writer::Track::parseParamSet( const uint8_t *data, size_t length, int type, size_t *paramSetLen) { - LOGV("parseParamSet"); + ALOGV("parseParamSet"); CHECK(type == kNalUnitTypeSeqParamSet || type == kNalUnitTypePicParamSet); @@ -1627,7 +1627,7 @@ const uint8_t *MPEG4Writer::Track::parseParamSet( status_t MPEG4Writer::Track::copyAVCCodecSpecificData( const uint8_t *data, size_t size) { - LOGV("copyAVCCodecSpecificData"); + ALOGV("copyAVCCodecSpecificData"); // 2 bytes for each of the parameter set length field // plus the 7 bytes for the header @@ -1645,7 +1645,7 @@ status_t MPEG4Writer::Track::copyAVCCodecSpecificData( status_t MPEG4Writer::Track::parseAVCCodecSpecificData( const uint8_t *data, size_t size) { - LOGV("parseAVCCodecSpecificData"); + ALOGV("parseAVCCodecSpecificData"); // Data starts with a start code. // SPS and PPS are separated with start codes. // Also, SPS must come before PPS @@ -1987,7 +1987,7 @@ status_t MPEG4Writer::Track::threadEntry() { int64_t timeUs = decodingTimeUs; cttsDeltaTimeUs = timestampUs - decodingTimeUs; timestampUs = decodingTimeUs; - LOGV("decoding time: %lld and ctts delta time: %lld", + ALOGV("decoding time: %lld and ctts delta time: %lld", timestampUs, cttsDeltaTimeUs); } @@ -1998,7 +1998,7 @@ status_t MPEG4Writer::Track::threadEntry() { } CHECK(timestampUs >= 0); - LOGV("%s media time stamp: %lld and previous paused duration %lld", + ALOGV("%s media time stamp: %lld and previous paused duration %lld", mIsAudio? "Audio": "Video", timestampUs, previousPausedDurationUs); if (timestampUs > mTrackDurationUs) { mTrackDurationUs = timestampUs; @@ -2020,7 +2020,7 @@ status_t MPEG4Writer::Track::threadEntry() { // Force the first sample to have its own stts entry so that // we can adjust its value later to maintain the A/V sync. if (mNumSamples == 3 || currDurationTicks != lastDurationTicks) { - LOGV("%s lastDurationUs: %lld us, currDurationTicks: %lld us", + ALOGV("%s lastDurationUs: %lld us, currDurationTicks: %lld us", mIsAudio? "Audio": "Video", lastDurationUs, currDurationTicks); addOneSttsTableEntry(sampleCount, lastDurationTicks); sampleCount = 1; @@ -2046,7 +2046,7 @@ status_t MPEG4Writer::Track::threadEntry() { } previousSampleSize = sampleSize; } - LOGV("%s timestampUs/lastTimestampUs: %lld/%lld", + ALOGV("%s timestampUs/lastTimestampUs: %lld/%lld", mIsAudio? "Audio": "Video", timestampUs, lastTimestampUs); lastDurationUs = timestampUs - lastTimestampUs; lastDurationTicks = currDurationTicks; @@ -2232,10 +2232,10 @@ void MPEG4Writer::Track::sendTrackSummary(bool hasMultipleTracks) { } void MPEG4Writer::Track::trackProgressStatus(int64_t timeUs, status_t err) { - LOGV("trackProgressStatus: %lld us", timeUs); + ALOGV("trackProgressStatus: %lld us", timeUs); if (mTrackEveryTimeDurationUs > 0 && timeUs - mPreviousTrackTimeUs >= mTrackEveryTimeDurationUs) { - LOGV("Fire time tracking progress status at %lld us", timeUs); + ALOGV("Fire time tracking progress status at %lld us", timeUs); mOwner->trackProgressStatus(mTrackId, timeUs - mPreviousTrackTimeUs, err); mPreviousTrackTimeUs = timeUs; } @@ -2269,13 +2269,13 @@ void MPEG4Writer::trackProgressStatus( } void MPEG4Writer::setDriftTimeUs(int64_t driftTimeUs) { - LOGV("setDriftTimeUs: %lld us", driftTimeUs); + ALOGV("setDriftTimeUs: %lld us", driftTimeUs); Mutex::Autolock autolock(mLock); mDriftTimeUs = driftTimeUs; } int64_t MPEG4Writer::getDriftTimeUs() { - LOGV("getDriftTimeUs: %lld us", mDriftTimeUs); + ALOGV("getDriftTimeUs: %lld us", mDriftTimeUs); Mutex::Autolock autolock(mLock); return mDriftTimeUs; } @@ -2285,7 +2285,7 @@ bool MPEG4Writer::useNalLengthFour() { } void MPEG4Writer::Track::bufferChunk(int64_t timestampUs) { - LOGV("bufferChunk"); + ALOGV("bufferChunk"); Chunk chunk(this, timestampUs, mChunkSamples); mOwner->bufferChunk(chunk); @@ -2323,7 +2323,7 @@ status_t MPEG4Writer::Track::checkCodecSpecificData() const { void MPEG4Writer::Track::writeTrackHeader(bool use32BitOffset) { - LOGV("%s track time scale: %d", + ALOGV("%s track time scale: %d", mIsAudio? "Audio": "Video", mTimeScale); time_t now = time(NULL); @@ -2730,7 +2730,7 @@ void MPEG4Writer::Track::writeCttsBox() { return; } - LOGV("ctts box has %d entries", mNumCttsTableEntries); + ALOGV("ctts box has %d entries", mNumCttsTableEntries); mOwner->beginBox("ctts"); if (mHasNegativeCttsDeltaDuration) { diff --git a/media/libstagefright/MediaExtractor.cpp b/media/libstagefright/MediaExtractor.cpp index 2221268..f54185b 100644 --- a/media/libstagefright/MediaExtractor.cpp +++ b/media/libstagefright/MediaExtractor.cpp @@ -59,13 +59,13 @@ sp MediaExtractor::Create( if (mime == NULL) { float confidence; if (!source->sniff(&tmp, &confidence, &meta)) { - LOGV("FAILED to autodetect media content."); + ALOGV("FAILED to autodetect media content."); return NULL; } mime = tmp.string(); - LOGV("Autodetected media content as '%s' with confidence %.2f", + ALOGV("Autodetected media content as '%s' with confidence %.2f", mime, confidence); } diff --git a/media/libstagefright/MediaSourceSplitter.cpp b/media/libstagefright/MediaSourceSplitter.cpp index abc7012..8af0694 100644 --- a/media/libstagefright/MediaSourceSplitter.cpp +++ b/media/libstagefright/MediaSourceSplitter.cpp @@ -51,7 +51,7 @@ sp MediaSourceSplitter::createClient() { status_t MediaSourceSplitter::start(int clientId, MetaData *params) { Mutex::Autolock autoLock(mLock); - LOGV("start client (%d)", clientId); + ALOGV("start client (%d)", clientId); if (mClientsStarted[clientId]) { return OK; } @@ -59,7 +59,7 @@ status_t MediaSourceSplitter::start(int clientId, MetaData *params) { mNumberOfClientsStarted++; if (!mSourceStarted) { - LOGV("Starting real source from client (%d)", clientId); + ALOGV("Starting real source from client (%d)", clientId); status_t err = mSource->start(params); if (err == OK) { @@ -85,12 +85,12 @@ status_t MediaSourceSplitter::start(int clientId, MetaData *params) { status_t MediaSourceSplitter::stop(int clientId) { Mutex::Autolock autoLock(mLock); - LOGV("stop client (%d)", clientId); + ALOGV("stop client (%d)", clientId); CHECK(clientId >= 0 && clientId < mNumberOfClients); CHECK(mClientsStarted[clientId]); if (--mNumberOfClientsStarted == 0) { - LOGV("Stopping real source from client (%d)", clientId); + ALOGV("Stopping real source from client (%d)", clientId); status_t err = mSource->stop(); mSourceStarted = false; mClientsStarted.editItemAt(clientId) = false; @@ -114,7 +114,7 @@ status_t MediaSourceSplitter::stop(int clientId) { sp MediaSourceSplitter::getFormat(int clientId) { Mutex::Autolock autoLock(mLock); - LOGV("getFormat client (%d)", clientId); + ALOGV("getFormat client (%d)", clientId); return mSource->getFormat(); } @@ -124,7 +124,7 @@ status_t MediaSourceSplitter::read(int clientId, CHECK(clientId >= 0 && clientId < mNumberOfClients); - LOGV("read client (%d)", clientId); + ALOGV("read client (%d)", clientId); *buffer = NULL; if (!mClientsStarted[clientId]) { diff --git a/media/libstagefright/NuCachedSource2.cpp b/media/libstagefright/NuCachedSource2.cpp index 1e1de04..20d0632 100644 --- a/media/libstagefright/NuCachedSource2.cpp +++ b/media/libstagefright/NuCachedSource2.cpp @@ -135,7 +135,7 @@ size_t PageCache::releaseFromStart(size_t maxBytes) { } void PageCache::copy(size_t from, void *data, size_t size) { - LOGV("copy from %d size %d", from, size); + ALOGV("copy from %d size %d", from, size); if (size == 0) { return; @@ -277,7 +277,7 @@ void NuCachedSource2::onMessageReceived(const sp &msg) { } void NuCachedSource2::fetchInternal() { - LOGV("fetchInternal"); + ALOGV("fetchInternal"); bool reconnect = false; @@ -340,10 +340,10 @@ void NuCachedSource2::fetchInternal() { } void NuCachedSource2::onFetch() { - LOGV("onFetch"); + ALOGV("onFetch"); if (mFinalStatus != OK && mNumRetriesLeft == 0) { - LOGV("EOS reached, done prefetching for now"); + ALOGV("EOS reached, done prefetching for now"); mFetching = false; } @@ -368,7 +368,7 @@ void NuCachedSource2::onFetch() { if (mDisconnectAtHighwatermark && (mSource->flags() & DataSource::kIsHTTPBasedSource)) { - LOGV("Disconnecting at high watermark"); + ALOGV("Disconnecting at high watermark"); static_cast(mSource.get())->disconnect(); } } @@ -393,7 +393,7 @@ void NuCachedSource2::onFetch() { } void NuCachedSource2::onRead(const sp &msg) { - LOGV("onRead"); + ALOGV("onRead"); int64_t offset; CHECK(msg->findInt64("offset", &offset)); @@ -455,7 +455,7 @@ void NuCachedSource2::restartPrefetcherIfNecessary_l( ssize_t NuCachedSource2::readAt(off64_t offset, void *data, size_t size) { Mutex::Autolock autoSerializer(mSerializer); - LOGV("readAt offset %lld, size %d", offset, size); + ALOGV("readAt offset %lld, size %d", offset, size); Mutex::Autolock autoLock(mLock); @@ -523,7 +523,7 @@ size_t NuCachedSource2::approxDataRemaining_l(status_t *finalStatus) { ssize_t NuCachedSource2::readInternal(off64_t offset, void *data, size_t size) { CHECK_LE(size, (size_t)mHighwaterThresholdBytes); - LOGV("readInternal offset %lld size %d", offset, size); + ALOGV("readInternal offset %lld size %d", offset, size); Mutex::Autolock autoLock(mLock); @@ -571,7 +571,7 @@ ssize_t NuCachedSource2::readInternal(off64_t offset, void *data, size_t size) { return size; } - LOGV("deferring read"); + ALOGV("deferring read"); return -EAGAIN; } @@ -663,7 +663,7 @@ void NuCachedSource2::updateCacheParamsFromString(const char *s) { mKeepAliveIntervalUs = kDefaultKeepAliveIntervalUs; } - LOGV("lowwater = %d bytes, highwater = %d bytes, keepalive = %lld us", + ALOGV("lowwater = %d bytes, highwater = %d bytes, keepalive = %lld us", mLowwaterThresholdBytes, mHighwaterThresholdBytes, mKeepAliveIntervalUs); @@ -687,7 +687,7 @@ void NuCachedSource2::RemoveCacheSpecificHeaders( headers->removeItemsAt(index); - LOGV("Using special cache config '%s'", cacheConfig->string()); + ALOGV("Using special cache config '%s'", cacheConfig->string()); } if ((index = headers->indexOfKey( @@ -695,7 +695,7 @@ void NuCachedSource2::RemoveCacheSpecificHeaders( *disconnectAtHighwatermark = true; headers->removeItemsAt(index); - LOGV("Client requested disconnection at highwater mark"); + ALOGV("Client requested disconnection at highwater mark"); } } diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp index 7e55790..2608ecf 100755 --- a/media/libstagefright/OMXCodec.cpp +++ b/media/libstagefright/OMXCodec.cpp @@ -180,7 +180,7 @@ static const CodecInfo kEncoderInfo[] = { #undef OPTIONAL #define CODEC_LOGI(x, ...) LOGI("[%s] "x, mComponentName, ##__VA_ARGS__) -#define CODEC_LOGV(x, ...) LOGV("[%s] "x, mComponentName, ##__VA_ARGS__) +#define CODEC_LOGV(x, ...) ALOGV("[%s] "x, mComponentName, ##__VA_ARGS__) #define CODEC_LOGE(x, ...) LOGE("[%s] "x, mComponentName, ##__VA_ARGS__) struct OMXCodecObserver : public BnOMXObserver { @@ -467,13 +467,13 @@ sp OMXCodec::Create( InstantiateSoftwareEncoder(componentName, source, meta); if (softwareCodec != NULL) { - LOGV("Successfully allocated software codec '%s'", componentName); + ALOGV("Successfully allocated software codec '%s'", componentName); return softwareCodec; } } - LOGV("Attempting to allocate OMX node '%s'", componentName); + ALOGV("Attempting to allocate OMX node '%s'", componentName); uint32_t quirks = getComponentQuirks(componentNameBase, createEncoder); @@ -494,7 +494,7 @@ sp OMXCodec::Create( status_t err = omx->allocateNode(componentName, observer, &node); if (err == OK) { - LOGV("Successfully allocated OMX node '%s'", componentName); + ALOGV("Successfully allocated OMX node '%s'", componentName); sp codec = new OMXCodec( omx, node, quirks, flags, @@ -513,7 +513,7 @@ sp OMXCodec::Create( return codec; } - LOGV("Failed to configure codec '%s'", componentName); + ALOGV("Failed to configure codec '%s'", componentName); } } @@ -521,7 +521,7 @@ sp OMXCodec::Create( } status_t OMXCodec::configureCodec(const sp &meta) { - LOGV("configureCodec protected=%d", + ALOGV("configureCodec protected=%d", (mFlags & kEnableGrallocUsageProtected) ? 1 : 0); if (!(mFlags & kIgnoreCodecSpecificData)) { @@ -874,7 +874,7 @@ static size_t getFrameSize( status_t OMXCodec::findTargetColorFormat( const sp& meta, OMX_COLOR_FORMATTYPE *colorFormat) { - LOGV("findTargetColorFormat"); + ALOGV("findTargetColorFormat"); CHECK(mIsEncoder); *colorFormat = OMX_COLOR_FormatYUV420SemiPlanar; @@ -894,7 +894,7 @@ status_t OMXCodec::findTargetColorFormat( status_t OMXCodec::isColorFormatSupported( OMX_COLOR_FORMATTYPE colorFormat, int portIndex) { - LOGV("isColorFormatSupported: %d", static_cast(colorFormat)); + ALOGV("isColorFormatSupported: %d", static_cast(colorFormat)); // Enumerate all the color formats supported by // the omx component to see whether the given @@ -1860,7 +1860,7 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() { } } - LOGV("native_window_set_usage usage=0x%lx", usage); + ALOGV("native_window_set_usage usage=0x%lx", usage); err = native_window_set_usage( mNativeWindow.get(), usage | GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_EXTERNAL_DISP); if (err != 0) { @@ -2387,7 +2387,7 @@ void OMXCodec::onEvent(OMX_EVENTTYPE event, OMX_U32 data1, OMX_U32 data2) { // The scale is in 16.16 format. // scale 1.0 = 0x010000. When there is no // need to change the display, skip it. - LOGV("Get OMX_IndexConfigScale: 0x%lx/0x%lx", + ALOGV("Get OMX_IndexConfigScale: 0x%lx/0x%lx", scale.xWidth, scale.xHeight); if (scale.xWidth != 0x010000) { @@ -3106,7 +3106,7 @@ bool OMXCodec::drainInputBuffer(BufferInfo *info) { } if (n > 1) { - LOGV("coalesced %d frames into one input buffer", n); + ALOGV("coalesced %d frames into one input buffer", n); } OMX_U32 flags = OMX_BUFFERFLAG_ENDOFFRAME; @@ -4276,14 +4276,14 @@ void OMXCodec::initOutputFormat(const sp &inputFormat) { inputFormat->findInt32(kKeySampleRate, &sampleRate); if ((OMX_U32)numChannels != params.nChannels) { - LOGV("Codec outputs a different number of channels than " + ALOGV("Codec outputs a different number of channels than " "the input stream contains (contains %d channels, " "codec outputs %ld channels).", numChannels, params.nChannels); } if (sampleRate != (int32_t)params.nSamplingRate) { - LOGV("Codec outputs at different sampling rate than " + ALOGV("Codec outputs at different sampling rate than " "what the input stream contains (contains data at " "%d Hz, codec outputs %lu Hz)", sampleRate, params.nSamplingRate); diff --git a/media/libstagefright/OggExtractor.cpp b/media/libstagefright/OggExtractor.cpp index 29e6907..5a68d79 100644 --- a/media/libstagefright/OggExtractor.cpp +++ b/media/libstagefright/OggExtractor.cpp @@ -244,7 +244,7 @@ status_t MyVorbisExtractor::findNextPage( if (!memcmp(signature, "OggS", 4)) { if (*pageOffset > startOffset) { - LOGV("skipped %lld bytes of junk to reach next frame", + ALOGV("skipped %lld bytes of junk to reach next frame", *pageOffset - startOffset); } @@ -272,7 +272,7 @@ status_t MyVorbisExtractor::findPrevGranulePosition( prevGuess = 0; } - LOGV("backing up %lld bytes", pageOffset - prevGuess); + ALOGV("backing up %lld bytes", pageOffset - prevGuess); status_t err = findNextPage(prevGuess, &prevPageOffset); if (err != OK) { @@ -289,7 +289,7 @@ status_t MyVorbisExtractor::findPrevGranulePosition( return UNKNOWN_ERROR; } - LOGV("prevPageOffset at %lld, pageOffset at %lld", + ALOGV("prevPageOffset at %lld, pageOffset at %lld", prevPageOffset, pageOffset); for (;;) { @@ -315,7 +315,7 @@ status_t MyVorbisExtractor::seekToTime(int64_t timeUs) { off64_t pos = timeUs * approxBitrate() / 8000000ll; - LOGV("seeking to offset %lld", pos); + ALOGV("seeking to offset %lld", pos); return seekToOffset(pos); } @@ -338,7 +338,7 @@ status_t MyVorbisExtractor::seekToTime(int64_t timeUs) { const TOCEntry &entry = mTableOfContents.itemAt(left); - LOGV("seeking to entry %d / %d at offset %lld", + ALOGV("seeking to entry %d / %d at offset %lld", left, mTableOfContents.size(), entry.mPageOffset); return seekToOffset(entry.mPageOffset); @@ -381,7 +381,7 @@ ssize_t MyVorbisExtractor::readPage(off64_t offset, Page *page) { ssize_t n; if ((n = mSource->readAt(offset, header, sizeof(header))) < (ssize_t)sizeof(header)) { - LOGV("failed to read %d bytes at offset 0x%016llx, got %ld bytes", + ALOGV("failed to read %d bytes at offset 0x%016llx, got %ld bytes", sizeof(header), offset, n); if (n < 0) { @@ -441,7 +441,7 @@ ssize_t MyVorbisExtractor::readPage(off64_t offset, Page *page) { tmp.append(x); } - LOGV("%c %s", page->mFlags & 1 ? '+' : ' ', tmp.string()); + ALOGV("%c %s", page->mFlags & 1 ? '+' : ' ', tmp.string()); #endif return sizeof(header) + page->mNumSegments + totalSize; @@ -505,7 +505,7 @@ status_t MyVorbisExtractor::readNextPacket(MediaBuffer **out) { packetSize); if (n < (ssize_t)packetSize) { - LOGV("failed to read %d bytes at 0x%016llx, got %ld bytes", + ALOGV("failed to read %d bytes at 0x%016llx, got %ld bytes", packetSize, dataOffset, n); return ERROR_IO; } @@ -546,7 +546,7 @@ status_t MyVorbisExtractor::readNextPacket(MediaBuffer **out) { buffer = NULL; } - LOGV("readPage returned %ld", n); + ALOGV("readPage returned %ld", n); return n < 0 ? n : (status_t)ERROR_END_OF_STREAM; } @@ -590,7 +590,7 @@ status_t MyVorbisExtractor::init() { if ((err = readNextPacket(&packet)) != OK) { return err; } - LOGV("read packet of size %d\n", packet->range_length()); + ALOGV("read packet of size %d\n", packet->range_length()); err = verifyHeader(packet, 1); packet->release(); packet = NULL; @@ -601,7 +601,7 @@ status_t MyVorbisExtractor::init() { if ((err = readNextPacket(&packet)) != OK) { return err; } - LOGV("read packet of size %d\n", packet->range_length()); + ALOGV("read packet of size %d\n", packet->range_length()); err = verifyHeader(packet, 3); packet->release(); packet = NULL; @@ -612,7 +612,7 @@ status_t MyVorbisExtractor::init() { if ((err = readNextPacket(&packet)) != OK) { return err; } - LOGV("read packet of size %d\n", packet->range_length()); + ALOGV("read packet of size %d\n", packet->range_length()); err = verifyHeader(packet, 5); packet->release(); packet = NULL; @@ -722,10 +722,10 @@ status_t MyVorbisExtractor::verifyHeader( mMeta->setInt32(kKeySampleRate, mVi.rate); mMeta->setInt32(kKeyChannelCount, mVi.channels); - LOGV("lower-bitrate = %ld", mVi.bitrate_lower); - LOGV("upper-bitrate = %ld", mVi.bitrate_upper); - LOGV("nominal-bitrate = %ld", mVi.bitrate_nominal); - LOGV("window-bitrate = %ld", mVi.bitrate_window); + ALOGV("lower-bitrate = %ld", mVi.bitrate_lower); + ALOGV("upper-bitrate = %ld", mVi.bitrate_upper); + ALOGV("nominal-bitrate = %ld", mVi.bitrate_nominal); + ALOGV("window-bitrate = %ld", mVi.bitrate_window); off64_t size; if (mSource->getSize(&size) == OK) { @@ -893,7 +893,7 @@ static uint8_t *DecodeBase64(const char *s, size_t size, size_t *outSize) { static void extractAlbumArt( const sp &fileMeta, const void *data, size_t size) { - LOGV("extractAlbumArt from '%s'", (const char *)data); + ALOGV("extractAlbumArt from '%s'", (const char *)data); size_t flacSize; uint8_t *flac = DecodeBase64((const char *)data, size, &flacSize); @@ -903,7 +903,7 @@ static void extractAlbumArt( return; } - LOGV("got flac of size %d", flacSize); + ALOGV("got flac of size %d", flacSize); uint32_t picType; uint32_t typeLen; @@ -934,7 +934,7 @@ static void extractAlbumArt( memcpy(type, &flac[8], typeLen); type[typeLen] = '\0'; - LOGV("picType = %d, type = '%s'", picType, type); + ALOGV("picType = %d, type = '%s'", picType, type); if (!strcmp(type, "-->")) { // This is not inline cover art, but an external url instead. @@ -953,7 +953,7 @@ static void extractAlbumArt( goto exit; } - LOGV("got image data, %d trailing bytes", + ALOGV("got image data, %d trailing bytes", flacSize - 32 - typeLen - descLen - dataLen); fileMeta->setData( diff --git a/media/libstagefright/SampleIterator.cpp b/media/libstagefright/SampleIterator.cpp index c7b00b1..7b8e008 100644 --- a/media/libstagefright/SampleIterator.cpp +++ b/media/libstagefright/SampleIterator.cpp @@ -52,7 +52,7 @@ void SampleIterator::reset() { } status_t SampleIterator::seekTo(uint32_t sampleIndex) { - LOGV("seekTo(%d)", sampleIndex); + ALOGV("seekTo(%d)", sampleIndex); if (sampleIndex >= mTable->mNumSampleSizes) { return ERROR_END_OF_STREAM; diff --git a/media/libstagefright/SampleTable.cpp b/media/libstagefright/SampleTable.cpp index ebad321..1451c16 100644 --- a/media/libstagefright/SampleTable.cpp +++ b/media/libstagefright/SampleTable.cpp @@ -414,7 +414,7 @@ status_t SampleTable::setSyncSampleParams(off64_t data_offset, size_t data_size) mNumSyncSamples = U32_AT(&header[4]); if (mNumSyncSamples < 2) { - LOGV("Table of sync samples is empty or has only a single entry!"); + ALOGV("Table of sync samples is empty or has only a single entry!"); } mSyncSamples = new uint32_t[mNumSyncSamples]; diff --git a/media/libstagefright/StagefrightMediaScanner.cpp b/media/libstagefright/StagefrightMediaScanner.cpp index bb6e4cd..df363c9 100644 --- a/media/libstagefright/StagefrightMediaScanner.cpp +++ b/media/libstagefright/StagefrightMediaScanner.cpp @@ -103,7 +103,7 @@ static MediaScanResult HandleMIDI( MediaScanResult StagefrightMediaScanner::processFile( const char *path, const char *mimeType, MediaScannerClient &client) { - LOGV("processFile '%s'.", path); + ALOGV("processFile '%s'.", path); client.setLocale(locale()); client.beginFile(); @@ -188,7 +188,7 @@ MediaScanResult StagefrightMediaScanner::processFileInternal( } char *StagefrightMediaScanner::extractAlbumArt(int fd) { - LOGV("extractAlbumArt %d", fd); + ALOGV("extractAlbumArt %d", fd); off64_t size = lseek64(fd, 0, SEEK_END); if (size < 0) { diff --git a/media/libstagefright/StagefrightMetadataRetriever.cpp b/media/libstagefright/StagefrightMetadataRetriever.cpp index c74cb5a..022b169 100644 --- a/media/libstagefright/StagefrightMetadataRetriever.cpp +++ b/media/libstagefright/StagefrightMetadataRetriever.cpp @@ -34,14 +34,14 @@ namespace android { StagefrightMetadataRetriever::StagefrightMetadataRetriever() : mParsedMetaData(false), mAlbumArt(NULL) { - LOGV("StagefrightMetadataRetriever()"); + ALOGV("StagefrightMetadataRetriever()"); DataSource::RegisterDefaultSniffers(); CHECK_EQ(mClient.connect(), OK); } StagefrightMetadataRetriever::~StagefrightMetadataRetriever() { - LOGV("~StagefrightMetadataRetriever()"); + ALOGV("~StagefrightMetadataRetriever()"); delete mAlbumArt; mAlbumArt = NULL; @@ -51,7 +51,7 @@ StagefrightMetadataRetriever::~StagefrightMetadataRetriever() { status_t StagefrightMetadataRetriever::setDataSource( const char *uri, const KeyedVector *headers) { - LOGV("setDataSource(%s)", uri); + ALOGV("setDataSource(%s)", uri); mParsedMetaData = false; mMetaData.clear(); @@ -80,7 +80,7 @@ status_t StagefrightMetadataRetriever::setDataSource( int fd, int64_t offset, int64_t length) { fd = dup(fd); - LOGV("setDataSource(%d, %lld, %lld)", fd, offset, length); + ALOGV("setDataSource(%d, %lld, %lld)", fd, offset, length); mParsedMetaData = false; mMetaData.clear(); @@ -120,7 +120,7 @@ static VideoFrame *extractVideoFrameWithCodecFlags( NULL, flags | OMXCodec::kClientNeedsFramebuffer); if (decoder.get() == NULL) { - LOGV("unable to instantiate video decoder."); + ALOGV("unable to instantiate video decoder."); return NULL; } @@ -171,18 +171,18 @@ static VideoFrame *extractVideoFrameWithCodecFlags( if (err != OK) { CHECK_EQ(buffer, NULL); - LOGV("decoding frame failed."); + ALOGV("decoding frame failed."); decoder->stop(); return NULL; } - LOGV("successfully decoded video frame."); + ALOGV("successfully decoded video frame."); int32_t unreadable; if (buffer->meta_data()->findInt32(kKeyIsUnreadable, &unreadable) && unreadable != 0) { - LOGV("video frame is unreadable, decoder does not give us access " + ALOGV("video frame is unreadable, decoder does not give us access " "to the video data."); buffer->release(); @@ -200,7 +200,7 @@ static VideoFrame *extractVideoFrameWithCodecFlags( const char *mime; CHECK(trackMeta->findCString(kKeyMIMEType, &mime)); - LOGV("thumbNailTime = %lld us, timeUs = %lld us, mime = %s", + ALOGV("thumbNailTime = %lld us, timeUs = %lld us, mime = %s", thumbNailTime, timeUs, mime); } } @@ -276,17 +276,17 @@ static VideoFrame *extractVideoFrameWithCodecFlags( VideoFrame *StagefrightMetadataRetriever::getFrameAtTime( int64_t timeUs, int option) { - LOGV("getFrameAtTime: %lld us option: %d", timeUs, option); + ALOGV("getFrameAtTime: %lld us option: %d", timeUs, option); if (mExtractor.get() == NULL) { - LOGV("no extractor."); + ALOGV("no extractor."); return NULL; } sp fileMeta = mExtractor->getMetaData(); if (fileMeta == NULL) { - LOGV("extractor doesn't publish metadata, failed to initialize?"); + ALOGV("extractor doesn't publish metadata, failed to initialize?"); return NULL; } @@ -310,7 +310,7 @@ VideoFrame *StagefrightMetadataRetriever::getFrameAtTime( } if (i == n) { - LOGV("no video track found."); + ALOGV("no video track found."); return NULL; } @@ -320,7 +320,7 @@ VideoFrame *StagefrightMetadataRetriever::getFrameAtTime( sp source = mExtractor->getTrack(i); if (source.get() == NULL) { - LOGV("unable to instantiate video track."); + ALOGV("unable to instantiate video track."); return NULL; } @@ -341,7 +341,7 @@ VideoFrame *StagefrightMetadataRetriever::getFrameAtTime( timeUs, option); if (frame == NULL) { - LOGV("Software decoder failed to extract thumbnail, " + ALOGV("Software decoder failed to extract thumbnail, " "trying hardware decoder."); frame = extractVideoFrameWithCodecFlags(&mClient, trackMeta, source, 0, @@ -352,7 +352,7 @@ VideoFrame *StagefrightMetadataRetriever::getFrameAtTime( } MediaAlbumArt *StagefrightMetadataRetriever::extractAlbumArt() { - LOGV("extractAlbumArt (extractor: %s)", mExtractor.get() != NULL ? "YES" : "NO"); + ALOGV("extractAlbumArt (extractor: %s)", mExtractor.get() != NULL ? "YES" : "NO"); if (mExtractor == NULL) { return NULL; @@ -395,7 +395,7 @@ void StagefrightMetadataRetriever::parseMetaData() { sp meta = mExtractor->getMetaData(); if (meta == NULL) { - LOGV("extractor doesn't publish metadata, failed to initialize?"); + ALOGV("extractor doesn't publish metadata, failed to initialize?"); return; } diff --git a/media/libstagefright/SurfaceMediaSource.cpp b/media/libstagefright/SurfaceMediaSource.cpp index 2b27ee2..210635f 100644 --- a/media/libstagefright/SurfaceMediaSource.cpp +++ b/media/libstagefright/SurfaceMediaSource.cpp @@ -50,13 +50,13 @@ SurfaceMediaSource::SurfaceMediaSource(uint32_t bufW, uint32_t bufH) : mNumFramesReceived(0), mNumFramesEncoded(0), mFirstFrameTimestamp(0) { - LOGV("SurfaceMediaSource::SurfaceMediaSource"); + ALOGV("SurfaceMediaSource::SurfaceMediaSource"); sp composer(ComposerService::getComposerService()); mGraphicBufferAlloc = composer->createGraphicBufferAlloc(); } SurfaceMediaSource::~SurfaceMediaSource() { - LOGV("SurfaceMediaSource::~SurfaceMediaSource"); + ALOGV("SurfaceMediaSource::~SurfaceMediaSource"); if (!mStopped) { stop(); } @@ -108,7 +108,7 @@ status_t SurfaceMediaSource::setBufferCountServer(int bufferCount) { } status_t SurfaceMediaSource::setBufferCount(int bufferCount) { - LOGV("SurfaceMediaSource::setBufferCount"); + ALOGV("SurfaceMediaSource::setBufferCount"); if (bufferCount > NUM_BUFFER_SLOTS) { LOGE("setBufferCount: bufferCount is larger than the number of buffer slots"); return BAD_VALUE; @@ -150,7 +150,7 @@ status_t SurfaceMediaSource::setBufferCount(int bufferCount) { } status_t SurfaceMediaSource::requestBuffer(int slot, sp* buf) { - LOGV("SurfaceMediaSource::requestBuffer"); + ALOGV("SurfaceMediaSource::requestBuffer"); Mutex::Autolock lock(mMutex); if (slot < 0 || mBufferCount <= slot) { LOGE("requestBuffer: slot index out of range [0, %d]: %d", @@ -164,7 +164,7 @@ status_t SurfaceMediaSource::requestBuffer(int slot, sp* buf) { status_t SurfaceMediaSource::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h, uint32_t format, uint32_t usage) { - LOGV("dequeueBuffer"); + ALOGV("dequeueBuffer"); Mutex::Autolock lock(mMutex); // Check for the buffer size- the client should just use the @@ -215,7 +215,7 @@ status_t SurfaceMediaSource::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h, (mServerBufferCount < minBufferCountNeeded))) { // wait for the FIFO to drain while (!mQueue.isEmpty()) { - LOGV("Waiting for the FIFO to drain"); + ALOGV("Waiting for the FIFO to drain"); mDequeueCondition.wait(mMutex); } if (mStopped) { @@ -293,7 +293,7 @@ status_t SurfaceMediaSource::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h, // for for some buffers to be consumed tryAgain = mSynchronousMode && (foundSync == INVALID_BUFFER_SLOT); if (tryAgain) { - LOGV("Waiting..In synchronous mode and no buffer to dequeue"); + ALOGV("Waiting..In synchronous mode and no buffer to dequeue"); mDequeueCondition.wait(mMutex); } if (mStopped) { @@ -382,7 +382,7 @@ status_t SurfaceMediaSource::setSynchronousMode(bool enabled) { status_t SurfaceMediaSource::connect(int api, uint32_t* outWidth, uint32_t* outHeight, uint32_t* outTransform) { - LOGV("SurfaceMediaSource::connect"); + ALOGV("SurfaceMediaSource::connect"); Mutex::Autolock lock(mMutex); if (mStopped) { @@ -423,7 +423,7 @@ status_t SurfaceMediaSource::connect(int api, // that need not be required since the thread supplying the // frames is separate than the one calling stop. status_t SurfaceMediaSource::disconnect(int api) { - LOGV("SurfaceMediaSource::disconnect"); + ALOGV("SurfaceMediaSource::disconnect"); Mutex::Autolock lock(mMutex); if (mStopped) { @@ -455,7 +455,7 @@ status_t SurfaceMediaSource::disconnect(int api) { status_t SurfaceMediaSource::queueBuffer(int bufIndex, int64_t timestamp, uint32_t* outWidth, uint32_t* outHeight, uint32_t* outTransform) { - LOGV("queueBuffer"); + ALOGV("queueBuffer"); Mutex::Autolock lock(mMutex); *outWidth = mDefaultWidth; @@ -495,7 +495,7 @@ status_t SurfaceMediaSource::queueBuffer(int bufIndex, int64_t timestamp, if (mSynchronousMode) { // in synchronous mode we queue all buffers in a FIFO mQueue.push_back(bufIndex); - LOGV("Client queued buf# %d @slot: %d, Q size = %d, handle = %p, timestamp = %lld", + ALOGV("Client queued buf# %d @slot: %d, Q size = %d, handle = %p, timestamp = %lld", mNumFramesReceived, bufIndex, mQueue.size(), mSlots[bufIndex].mGraphicBuffer->handle, timestamp); } else { @@ -534,7 +534,7 @@ status_t SurfaceMediaSource::queueBuffer(int bufIndex, int64_t timestamp, // wait to hear from StageFrightRecorder to set the buffer FREE // Make sure this is called when the mutex is locked status_t SurfaceMediaSource::onFrameReceivedLocked() { - LOGV("On Frame Received locked"); + ALOGV("On Frame Received locked"); // Signal the encoder that a new frame has arrived mFrameAvailableCondition.signal(); @@ -554,7 +554,7 @@ status_t SurfaceMediaSource::onFrameReceivedLocked() { void SurfaceMediaSource::cancelBuffer(int bufIndex) { - LOGV("SurfaceMediaSource::cancelBuffer"); + ALOGV("SurfaceMediaSource::cancelBuffer"); Mutex::Autolock lock(mMutex); if (bufIndex < 0 || bufIndex >= mBufferCount) { LOGE("cancelBuffer: slot index out of range [0, %d]: %d", @@ -570,7 +570,7 @@ void SurfaceMediaSource::cancelBuffer(int bufIndex) { } nsecs_t SurfaceMediaSource::getTimestamp() { - LOGV("SurfaceMediaSource::getTimestamp"); + ALOGV("SurfaceMediaSource::getTimestamp"); Mutex::Autolock lock(mMutex); return mCurrentTimestamp; } @@ -578,13 +578,13 @@ nsecs_t SurfaceMediaSource::getTimestamp() { void SurfaceMediaSource::setFrameAvailableListener( const sp& listener) { - LOGV("SurfaceMediaSource::setFrameAvailableListener"); + ALOGV("SurfaceMediaSource::setFrameAvailableListener"); Mutex::Autolock lock(mMutex); mFrameAvailableListener = listener; } void SurfaceMediaSource::freeAllBuffersLocked() { - LOGV("freeAllBuffersLocked"); + ALOGV("freeAllBuffersLocked"); for (int i = 0; i < NUM_BUFFER_SLOTS; i++) { mSlots[i].mGraphicBuffer = 0; mSlots[i].mBufferState = BufferSlot::FREE; @@ -598,7 +598,7 @@ sp SurfaceMediaSource::getCurrentBuffer() const { int SurfaceMediaSource::query(int what, int* outValue) { - LOGV("query"); + ALOGV("query"); Mutex::Autolock lock(mMutex); int value; switch (what) { @@ -689,7 +689,7 @@ status_t SurfaceMediaSource::setFrameRate(int32_t fps) } bool SurfaceMediaSource::isMetaDataStoredInVideoBuffers() const { - LOGV("isMetaDataStoredInVideoBuffers"); + ALOGV("isMetaDataStoredInVideoBuffers"); return true; } @@ -700,7 +700,7 @@ int32_t SurfaceMediaSource::getFrameRate( ) const { status_t SurfaceMediaSource::start(MetaData *params) { - LOGV("started!"); + ALOGV("started!"); mStartTimeNs = 0; int64_t startTimeUs; @@ -714,7 +714,7 @@ status_t SurfaceMediaSource::start(MetaData *params) status_t SurfaceMediaSource::stop() { - LOGV("Stop"); + ALOGV("Stop"); Mutex::Autolock lock(mMutex); // TODO: Add waiting on mFrameCompletedCondition here? @@ -729,7 +729,7 @@ status_t SurfaceMediaSource::stop() sp SurfaceMediaSource::getFormat() { - LOGV("getFormat"); + ALOGV("getFormat"); Mutex::Autolock autoLock(mMutex); sp meta = new MetaData; @@ -751,20 +751,20 @@ status_t SurfaceMediaSource::read( MediaBuffer **buffer, { Mutex::Autolock autoLock(mMutex) ; - LOGV("Read. Size of queued buffer: %d", mQueue.size()); + ALOGV("Read. Size of queued buffer: %d", mQueue.size()); *buffer = NULL; // If the recording has started and the queue is empty, then just // wait here till the frames come in from the client side while (!mStopped && mQueue.empty()) { - LOGV("NO FRAMES! Recorder waiting for FrameAvailableCondition"); + ALOGV("NO FRAMES! Recorder waiting for FrameAvailableCondition"); mFrameAvailableCondition.wait(mMutex); } // If the loop was exited as a result of stopping the recording, // it is OK if (mStopped) { - LOGV("Read: SurfaceMediaSource is stopped. Returning ERROR_END_OF_STREAM."); + ALOGV("Read: SurfaceMediaSource is stopped. Returning ERROR_END_OF_STREAM."); return ERROR_END_OF_STREAM; } @@ -785,7 +785,7 @@ status_t SurfaceMediaSource::read( MediaBuffer **buffer, (*buffer)->setObserver(this); (*buffer)->add_ref(); (*buffer)->meta_data()->setInt64(kKeyTime, mCurrentTimestamp / 1000); - LOGV("Frames encoded = %d, timestamp = %lld, time diff = %lld", + ALOGV("Frames encoded = %d, timestamp = %lld, time diff = %lld", mNumFramesEncoded, mCurrentTimestamp / 1000, mCurrentTimestamp / 1000 - prevTimeStamp / 1000); @@ -804,7 +804,7 @@ status_t SurfaceMediaSource::read( MediaBuffer **buffer, // -------------------------------------------------------------- // Note: Call only when you have the lock void SurfaceMediaSource::passMetadataBufferLocked(MediaBuffer **buffer) { - LOGV("passMetadataBuffer"); + ALOGV("passMetadataBuffer"); // MediaBuffer allocates and owns this data MediaBuffer *tempBuffer = new MediaBuffer(4 + sizeof(buffer_handle_t)); @@ -818,18 +818,18 @@ void SurfaceMediaSource::passMetadataBufferLocked(MediaBuffer **buffer) { memcpy(data + 4, &(mCurrentBuf->handle), sizeof(buffer_handle_t)); *buffer = tempBuffer; - LOGV("handle = %p, , offset = %d, length = %d", + ALOGV("handle = %p, , offset = %d, length = %d", mCurrentBuf->handle, (*buffer)->range_length(), (*buffer)->range_offset()); } void SurfaceMediaSource::signalBufferReturned(MediaBuffer *buffer) { - LOGV("signalBufferReturned"); + ALOGV("signalBufferReturned"); bool foundBuffer = false; Mutex::Autolock autoLock(mMutex); if (mStopped) { - LOGV("signalBufferReturned: mStopped = true! Nothing to do!"); + ALOGV("signalBufferReturned: mStopped = true! Nothing to do!"); return; } @@ -838,7 +838,7 @@ void SurfaceMediaSource::signalBufferReturned(MediaBuffer *buffer) { continue; } if (checkBufferMatchesSlot(id, buffer)) { - LOGV("Slot %d returned, matches handle = %p", id, + ALOGV("Slot %d returned, matches handle = %p", id, mSlots[id].mGraphicBuffer->handle); mSlots[id].mBufferState = BufferSlot::FREE; buffer->setObserver(0); @@ -856,7 +856,7 @@ void SurfaceMediaSource::signalBufferReturned(MediaBuffer *buffer) { } bool SurfaceMediaSource::checkBufferMatchesSlot(int slot, MediaBuffer *buffer) { - LOGV("Check if Buffer matches slot"); + ALOGV("Check if Buffer matches slot"); // need to convert to char* for pointer arithmetic and then // copy the byte stream into our handle buffer_handle_t bufferHandle ; diff --git a/media/libstagefright/TimedEventQueue.cpp b/media/libstagefright/TimedEventQueue.cpp index 100d8a3..43511ec 100644 --- a/media/libstagefright/TimedEventQueue.cpp +++ b/media/libstagefright/TimedEventQueue.cpp @@ -173,7 +173,7 @@ void TimedEventQueue::cancelEvents( mQueueHeadChangedCondition.signal(); } - LOGV("cancelling event %d", (*it).event->eventID()); + ALOGV("cancelling event %d", (*it).event->eventID()); (*it).event->setEventID(0); it = mQueue.erase(it); diff --git a/media/libstagefright/VBRISeeker.cpp b/media/libstagefright/VBRISeeker.cpp index 6f968be..ecff538 100644 --- a/media/libstagefright/VBRISeeker.cpp +++ b/media/libstagefright/VBRISeeker.cpp @@ -69,13 +69,13 @@ sp VBRISeeker::CreateFromSource( int64_t durationUs = numFrames * 1000000ll * (sampleRate >= 32000 ? 1152 : 576) / sampleRate; - LOGV("duration = %.2f secs", durationUs / 1E6); + ALOGV("duration = %.2f secs", durationUs / 1E6); size_t numEntries = U16_AT(&vbriHeader[18]); size_t entrySize = U16_AT(&vbriHeader[22]); size_t scale = U16_AT(&vbriHeader[20]); - LOGV("%d entries, scale=%d, size_per_entry=%d", + ALOGV("%d entries, scale=%d, size_per_entry=%d", numEntries, scale, entrySize); @@ -113,7 +113,7 @@ sp VBRISeeker::CreateFromSource( seeker->mSegments.push(numBytes); - LOGV("entry #%d: %d offset 0x%08lx", i, numBytes, offset); + ALOGV("entry #%d: %d offset 0x%08lx", i, numBytes, offset); offset += numBytes; } @@ -154,7 +154,7 @@ bool VBRISeeker::getOffsetForTime(int64_t *timeUs, off64_t *pos) { *pos += mSegments.itemAt(segmentIndex++); } - LOGV("getOffsetForTime %lld us => 0x%08lx", *timeUs, *pos); + ALOGV("getOffsetForTime %lld us => 0x%08lx", *timeUs, *pos); *timeUs = nowUs; diff --git a/media/libstagefright/VideoSourceDownSampler.cpp b/media/libstagefright/VideoSourceDownSampler.cpp index ea7b09a..1b66990 100644 --- a/media/libstagefright/VideoSourceDownSampler.cpp +++ b/media/libstagefright/VideoSourceDownSampler.cpp @@ -29,7 +29,7 @@ namespace android { VideoSourceDownSampler::VideoSourceDownSampler(const sp &videoSource, int32_t width, int32_t height) { - LOGV("Construct VideoSourceDownSampler"); + ALOGV("Construct VideoSourceDownSampler"); CHECK(width > 0); CHECK(height > 0); @@ -94,23 +94,23 @@ void VideoSourceDownSampler::downSampleYUVImage( } status_t VideoSourceDownSampler::start(MetaData *params) { - LOGV("start"); + ALOGV("start"); return mRealVideoSource->start(); } status_t VideoSourceDownSampler::stop() { - LOGV("stop"); + ALOGV("stop"); return mRealVideoSource->stop(); } sp VideoSourceDownSampler::getFormat() { - LOGV("getFormat"); + ALOGV("getFormat"); return mMeta; } status_t VideoSourceDownSampler::read( MediaBuffer **buffer, const ReadOptions *options) { - LOGV("read"); + ALOGV("read"); MediaBuffer *realBuffer; status_t err = mRealVideoSource->read(&realBuffer, options); @@ -135,7 +135,7 @@ status_t VideoSourceDownSampler::read( } status_t VideoSourceDownSampler::pause() { - LOGV("pause"); + ALOGV("pause"); return mRealVideoSource->pause(); } diff --git a/media/libstagefright/WAVExtractor.cpp b/media/libstagefright/WAVExtractor.cpp index c406964..0bcaf08 100644 --- a/media/libstagefright/WAVExtractor.cpp +++ b/media/libstagefright/WAVExtractor.cpp @@ -275,7 +275,7 @@ WAVSource::~WAVSource() { } status_t WAVSource::start(MetaData *params) { - LOGV("WAVSource::start"); + ALOGV("WAVSource::start"); CHECK(!mStarted); @@ -295,7 +295,7 @@ status_t WAVSource::start(MetaData *params) { } status_t WAVSource::stop() { - LOGV("WAVSource::stop"); + ALOGV("WAVSource::stop"); CHECK(mStarted); @@ -308,7 +308,7 @@ status_t WAVSource::stop() { } sp WAVSource::getFormat() { - LOGV("WAVSource::getFormat"); + ALOGV("WAVSource::getFormat"); return mMeta; } diff --git a/media/libstagefright/avc_utils.cpp b/media/libstagefright/avc_utils.cpp index 153ee33..1ed9e57 100644 --- a/media/libstagefright/avc_utils.cpp +++ b/media/libstagefright/avc_utils.cpp @@ -119,7 +119,7 @@ void FindAVCDimensions( cropUnitY = subHeightC * (2 - frame_mbs_only_flag); } - LOGV("frame_crop = (%u, %u, %u, %u), cropUnitX = %u, cropUnitY = %u", + ALOGV("frame_crop = (%u, %u, %u, %u), cropUnitX = %u, cropUnitY = %u", frame_crop_left_offset, frame_crop_right_offset, frame_crop_top_offset, frame_crop_bottom_offset, cropUnitX, cropUnitY); diff --git a/media/libstagefright/codecs/aacdec/SoftAAC.cpp b/media/libstagefright/codecs/aacdec/SoftAAC.cpp index 2abdb56..c408b2c 100644 --- a/media/libstagefright/codecs/aacdec/SoftAAC.cpp +++ b/media/libstagefright/codecs/aacdec/SoftAAC.cpp @@ -317,9 +317,9 @@ void SoftAAC::onQueueFilled(OMX_U32 portIndex) { * AAC+/eAAC+ until the first data frame is decoded. */ if (decoderErr == MP4AUDEC_SUCCESS && mInputBufferCount <= 2) { - LOGV("audio/extended audio object type: %d + %d", + ALOGV("audio/extended audio object type: %d + %d", mConfig->audioObjectType, mConfig->extendedAudioObjectType); - LOGV("aac+ upsampling factor: %d desired channels: %d", + ALOGV("aac+ upsampling factor: %d desired channels: %d", mConfig->aacPlusUpsamplingFactor, mConfig->desiredChannels); if (mInputBufferCount == 1) { diff --git a/media/libstagefright/codecs/aacenc/AACEncoder.cpp b/media/libstagefright/codecs/aacenc/AACEncoder.cpp index 0bff52d..2b15b75 100644 --- a/media/libstagefright/codecs/aacenc/AACEncoder.cpp +++ b/media/libstagefright/codecs/aacenc/AACEncoder.cpp @@ -111,7 +111,7 @@ static status_t getSampleRateTableIndex(int32_t sampleRate, int32_t &index) { } status_t AACEncoder::setAudioSpecificConfigData() { - LOGV("setAudioSpecificConfigData: %d hz, %d bps, and %d channels", + ALOGV("setAudioSpecificConfigData: %d hz, %d bps, and %d channels", mSampleRate, mBitRate, mChannels); int32_t index; diff --git a/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp b/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp index 0096760..18c5550 100644 --- a/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp +++ b/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp @@ -35,7 +35,7 @@ namespace android { static status_t ConvertOmxAvcProfileToAvcSpecProfile( int32_t omxProfile, AVCProfile* pvProfile) { - LOGV("ConvertOmxAvcProfileToAvcSpecProfile: %d", omxProfile); + ALOGV("ConvertOmxAvcProfileToAvcSpecProfile: %d", omxProfile); switch (omxProfile) { case OMX_VIDEO_AVCProfileBaseline: *pvProfile = AVC_BASELINE; @@ -48,7 +48,7 @@ static status_t ConvertOmxAvcProfileToAvcSpecProfile( static status_t ConvertOmxAvcLevelToAvcSpecLevel( int32_t omxLevel, AVCLevel *pvLevel) { - LOGV("ConvertOmxAvcLevelToAvcSpecLevel: %d", omxLevel); + ALOGV("ConvertOmxAvcLevelToAvcSpecLevel: %d", omxLevel); AVCLevel level = AVC_LEVEL5_1; switch (omxLevel) { case OMX_VIDEO_AVCLevel1: @@ -194,7 +194,7 @@ AVCEncoder::AVCEncoder( } AVCEncoder::~AVCEncoder() { - LOGV("Destruct software AVCEncoder"); + ALOGV("Destruct software AVCEncoder"); if (mStarted) { stop(); } @@ -204,7 +204,7 @@ AVCEncoder::~AVCEncoder() { } status_t AVCEncoder::initCheck(const sp& meta) { - LOGV("initCheck"); + ALOGV("initCheck"); CHECK(meta->findInt32(kKeyWidth, &mVideoWidth)); CHECK(meta->findInt32(kKeyHeight, &mVideoHeight)); CHECK(meta->findInt32(kKeyFrameRate, &mVideoFrameRate)); @@ -295,7 +295,7 @@ status_t AVCEncoder::initCheck(const sp& meta) { mEncParams->idr_period = (iFramesIntervalSec * mVideoFrameRate); } - LOGV("idr_period: %d, I-frames interval: %d seconds, and frame rate: %d", + ALOGV("idr_period: %d, I-frames interval: %d seconds, and frame rate: %d", mEncParams->idr_period, iFramesIntervalSec, mVideoFrameRate); // Set profile and level @@ -330,7 +330,7 @@ status_t AVCEncoder::initCheck(const sp& meta) { } status_t AVCEncoder::start(MetaData *params) { - LOGV("start"); + ALOGV("start"); if (mInitCheck != OK) { return mInitCheck; } @@ -366,7 +366,7 @@ status_t AVCEncoder::start(MetaData *params) { } status_t AVCEncoder::stop() { - LOGV("stop"); + ALOGV("stop"); if (!mStarted) { LOGW("Call stop() when encoder has not started"); return OK; @@ -396,7 +396,7 @@ status_t AVCEncoder::stop() { } void AVCEncoder::releaseOutputBuffers() { - LOGV("releaseOutputBuffers"); + ALOGV("releaseOutputBuffers"); for (size_t i = 0; i < mOutputBuffers.size(); ++i) { MediaBuffer *buffer = mOutputBuffers.editItemAt(i); buffer->setObserver(NULL); @@ -406,7 +406,7 @@ void AVCEncoder::releaseOutputBuffers() { } sp AVCEncoder::getFormat() { - LOGV("getFormat"); + ALOGV("getFormat"); return mFormat; } @@ -563,7 +563,7 @@ status_t AVCEncoder::read( if (mIsIDRFrame) { outputBuffer->meta_data()->setInt32(kKeyIsSyncFrame, mIsIDRFrame); mIsIDRFrame = 0; - LOGV("Output an IDR frame"); + ALOGV("Output an IDR frame"); } mReadyForNextFrame = true; AVCFrameIO recon; diff --git a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp index ddced5f..7bbd07e 100644 --- a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp +++ b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp @@ -484,7 +484,7 @@ bool SoftMPEG4::portSettingsChanged() { CHECK_LE(disp_width, buf_width); CHECK_LE(disp_height, buf_height); - LOGV("disp_width = %d, disp_height = %d, buf_width = %d, buf_height = %d", + ALOGV("disp_width = %d, disp_height = %d, buf_width = %d, buf_height = %d", disp_width, disp_height, buf_width, buf_height); if (mCropRight != disp_width - 1 diff --git a/media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp b/media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp index d7249c1..2e3d12d 100644 --- a/media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp +++ b/media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp @@ -37,7 +37,7 @@ static status_t ConvertOmxProfileLevel( int32_t omxProfile, int32_t omxLevel, ProfileLevelType* pvProfileLevel) { - LOGV("ConvertOmxProfileLevel: %d/%d/%d", mode, omxProfile, omxLevel); + ALOGV("ConvertOmxProfileLevel: %d/%d/%d", mode, omxProfile, omxLevel); ProfileLevelType profileLevel; if (mode == H263_MODE) { switch (omxProfile) { @@ -187,7 +187,7 @@ M4vH263Encoder::M4vH263Encoder( } M4vH263Encoder::~M4vH263Encoder() { - LOGV("Destruct software M4vH263Encoder"); + ALOGV("Destruct software M4vH263Encoder"); if (mStarted) { stop(); } @@ -197,7 +197,7 @@ M4vH263Encoder::~M4vH263Encoder() { } status_t M4vH263Encoder::initCheck(const sp& meta) { - LOGV("initCheck"); + ALOGV("initCheck"); CHECK(meta->findInt32(kKeyWidth, &mVideoWidth)); CHECK(meta->findInt32(kKeyHeight, &mVideoHeight)); CHECK(meta->findInt32(kKeyFrameRate, &mVideoFrameRate)); @@ -308,7 +308,7 @@ status_t M4vH263Encoder::initCheck(const sp& meta) { } status_t M4vH263Encoder::start(MetaData *params) { - LOGV("start"); + ALOGV("start"); if (mInitCheck != OK) { return mInitCheck; } @@ -328,7 +328,7 @@ status_t M4vH263Encoder::start(MetaData *params) { if (!PVGetMaxVideoFrameSize(mHandle, &maxSize)) { maxSize = 256 * 1024; // Magic # } - LOGV("Max output buffer size: %d", maxSize); + ALOGV("Max output buffer size: %d", maxSize); mGroup->add_buffer(new MediaBuffer(maxSize)); mSource->start(params); @@ -339,7 +339,7 @@ status_t M4vH263Encoder::start(MetaData *params) { } status_t M4vH263Encoder::stop() { - LOGV("stop"); + ALOGV("stop"); if (!mStarted) { LOGW("Call stop() when encoder has not started"); return OK; @@ -369,7 +369,7 @@ status_t M4vH263Encoder::stop() { } sp M4vH263Encoder::getFormat() { - LOGV("getFormat"); + ALOGV("getFormat"); return mFormat; } @@ -389,7 +389,7 @@ status_t M4vH263Encoder::read( LOGE("Failed to get VOL header"); return UNKNOWN_ERROR; } - LOGV("Output VOL header: %d bytes", dataLength); + ALOGV("Output VOL header: %d bytes", dataLength); outputBuffer->meta_data()->setInt32(kKeyIsCodecConfig, 1); outputBuffer->set_range(0, dataLength); *out = outputBuffer; diff --git a/media/libstagefright/codecs/mp3dec/SoftMP3.cpp b/media/libstagefright/codecs/mp3dec/SoftMP3.cpp index 066c88e..43fb30a 100644 --- a/media/libstagefright/codecs/mp3dec/SoftMP3.cpp +++ b/media/libstagefright/codecs/mp3dec/SoftMP3.cpp @@ -219,7 +219,7 @@ void SoftMP3::onQueueFilled(OMX_U32 portIndex) { ERROR_CODE decoderErr; if ((decoderErr = pvmp3_framedecoder(mConfig, mDecoderBuf)) != NO_DECODING_ERROR) { - LOGV("mp3 decoder returned error %d", decoderErr); + ALOGV("mp3 decoder returned error %d", decoderErr); if (decoderErr != NO_ENOUGH_MAIN_DATA_ERROR || mConfig->outputFrameSize == 0) { diff --git a/media/libstagefright/codecs/on2/dec/SoftVPX.cpp b/media/libstagefright/codecs/on2/dec/SoftVPX.cpp index 61a02ac..c5fe199 100644 --- a/media/libstagefright/codecs/on2/dec/SoftVPX.cpp +++ b/media/libstagefright/codecs/on2/dec/SoftVPX.cpp @@ -126,7 +126,7 @@ static int GetCPUCoreCount() { cpuCoreCount = sysconf(_SC_NPROC_ONLN); #endif CHECK(cpuCoreCount >= 1); - LOGV("Number of CPU cores: %d", cpuCoreCount); + ALOGV("Number of CPU cores: %d", cpuCoreCount); return cpuCoreCount; } diff --git a/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp b/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp index 4091111..47dbd5c 100644 --- a/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp +++ b/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp @@ -367,7 +367,7 @@ void SoftVorbis::onQueueFilled(OMX_U32 portIndex) { if (mNumFramesLeftOnPage >= 0) { if (numFrames > mNumFramesLeftOnPage) { - LOGV("discarding %d frames at end of page", + ALOGV("discarding %d frames at end of page", numFrames - mNumFramesLeftOnPage); numFrames = mNumFramesLeftOnPage; } diff --git a/media/libstagefright/httplive/LiveSession.cpp b/media/libstagefright/httplive/LiveSession.cpp index f67cdac..422850d 100644 --- a/media/libstagefright/httplive/LiveSession.cpp +++ b/media/libstagefright/httplive/LiveSession.cpp @@ -260,7 +260,7 @@ status_t LiveSession::fetchFile(const char *url, sp *out) { if (bufferRemaining == 0) { bufferRemaining = 32768; - LOGV("increasing download buffer to %d bytes", + ALOGV("increasing download buffer to %d bytes", buffer->size() + bufferRemaining); sp copy = new ABuffer(buffer->size() + bufferRemaining); @@ -321,7 +321,7 @@ sp LiveSession::fetchPlaylist(const char *url, bool *unchanged) { *unchanged = true; - LOGV("Playlist unchanged, refresh state is now %d", + ALOGV("Playlist unchanged, refresh state is now %d", (int)mRefreshState); return NULL; @@ -357,9 +357,9 @@ size_t LiveSession::getBandwidthIndex() { int32_t bandwidthBps; if (mHTTPDataSource != NULL && mHTTPDataSource->estimateBandwidth(&bandwidthBps)) { - LOGV("bandwidth estimated at %.2f kbps", bandwidthBps / 1024.0f); + ALOGV("bandwidth estimated at %.2f kbps", bandwidthBps / 1024.0f); } else { - LOGV("no bandwidth estimate."); + ALOGV("no bandwidth estimate."); return 0; // Pick the lowest bandwidth stream by default. } @@ -369,7 +369,7 @@ size_t LiveSession::getBandwidthIndex() { long maxBw = strtoul(value, &end, 10); if (end > value && *end == '\0') { if (maxBw > 0 && bandwidthBps > maxBw) { - LOGV("bandwidth capped to %ld bps", maxBw); + ALOGV("bandwidth capped to %ld bps", maxBw); bandwidthBps = maxBw; } } diff --git a/media/libstagefright/httplive/M3UParser.cpp b/media/libstagefright/httplive/M3UParser.cpp index 9df9f59..0d84c83 100644 --- a/media/libstagefright/httplive/M3UParser.cpp +++ b/media/libstagefright/httplive/M3UParser.cpp @@ -101,7 +101,7 @@ static bool MakeURL(const char *baseURL, const char *url, AString *out) { // "url" is already an absolute URL, ignore base URL. out->setTo(url); - LOGV("base:'%s', url:'%s' => '%s'", baseURL, url, out->c_str()); + ALOGV("base:'%s', url:'%s' => '%s'", baseURL, url, out->c_str()); return true; } @@ -140,7 +140,7 @@ static bool MakeURL(const char *baseURL, const char *url, AString *out) { } } - LOGV("base:'%s', url:'%s' => '%s'", baseURL, url, out->c_str()); + ALOGV("base:'%s', url:'%s' => '%s'", baseURL, url, out->c_str()); return true; } @@ -332,7 +332,7 @@ status_t M3UParser::parseStreamInf( AString val(attr, equalPos + 1, attr.size() - equalPos - 1); val.trim(); - LOGV("key=%s value=%s", key.c_str(), val.c_str()); + ALOGV("key=%s value=%s", key.c_str(), val.c_str()); if (!strcasecmp("bandwidth", key.c_str())) { const char *s = val.c_str(); @@ -410,7 +410,7 @@ status_t M3UParser::parseCipherInfo( AString val(attr, equalPos + 1, attr.size() - equalPos - 1); val.trim(); - LOGV("key=%s value=%s", key.c_str(), val.c_str()); + ALOGV("key=%s value=%s", key.c_str(), val.c_str()); key.tolower(); diff --git a/media/libstagefright/id3/ID3.cpp b/media/libstagefright/id3/ID3.cpp index 45e018d..943a937 100644 --- a/media/libstagefright/id3/ID3.cpp +++ b/media/libstagefright/id3/ID3.cpp @@ -160,7 +160,7 @@ struct id3_header { success = removeUnsynchronizationV2_4(true /* iTunesHack */); if (success) { - LOGV("Had to apply the iTunes hack to parse this ID3 tag"); + ALOGV("Had to apply the iTunes hack to parse this ID3 tag"); } } @@ -174,7 +174,7 @@ struct id3_header { return false; } } else if (header.flags & 0x80) { - LOGV("removing unsynchronization"); + ALOGV("removing unsynchronization"); removeUnsynchronization(); } @@ -219,7 +219,7 @@ struct id3_header { } if (extendedFlags & 0x8000) { - LOGV("have crc"); + ALOGV("have crc"); } } } else if (header.version_major == 4 && (header.flags & 0x40)) { @@ -580,7 +580,7 @@ void ID3::Iterator::findFrame() { mFrameSize += 6; if (mOffset + mFrameSize > mParent.mSize) { - LOGV("partial frame at offset %d (size = %d, bytes-remaining = %d)", + ALOGV("partial frame at offset %d (size = %d, bytes-remaining = %d)", mOffset, mFrameSize, mParent.mSize - mOffset - 6); return; } @@ -621,7 +621,7 @@ void ID3::Iterator::findFrame() { mFrameSize = 10 + baseSize; if (mOffset + mFrameSize > mParent.mSize) { - LOGV("partial frame at offset %d (size = %d, bytes-remaining = %d)", + ALOGV("partial frame at offset %d (size = %d, bytes-remaining = %d)", mOffset, mFrameSize, mParent.mSize - mOffset - 10); return; } @@ -634,7 +634,7 @@ void ID3::Iterator::findFrame() { // Per-frame unsynchronization and data-length indicator // have already been taken care of. - LOGV("Skipping unsupported frame (compression, encryption " + ALOGV("Skipping unsupported frame (compression, encryption " "or per-frame unsynchronization flagged"); mOffset += mFrameSize; diff --git a/media/libstagefright/matroska/MatroskaExtractor.cpp b/media/libstagefright/matroska/MatroskaExtractor.cpp index 20a25d7d..474c794 100644 --- a/media/libstagefright/matroska/MatroskaExtractor.cpp +++ b/media/libstagefright/matroska/MatroskaExtractor.cpp @@ -180,7 +180,7 @@ MatroskaSource::MatroskaSource( CHECK_GE(avccSize, 5u); mNALSizeLen = 1 + (avcc[4] & 3); - LOGV("mNALSizeLen = %d", mNALSizeLen); + ALOGV("mNALSizeLen = %d", mNALSizeLen); } else if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_AAC)) { mType = AAC; } @@ -230,7 +230,7 @@ void BlockIterator::advance() { void BlockIterator::advance_l() { for (;;) { long res = mCluster->GetEntry(mBlockEntryIndex, mBlockEntry); - LOGV("GetEntry returned %ld", res); + ALOGV("GetEntry returned %ld", res); long long pos; long len; @@ -240,7 +240,7 @@ void BlockIterator::advance_l() { CHECK_EQ(res, mkvparser::E_BUFFER_NOT_FULL); res = mCluster->Parse(pos, len); - LOGV("Parse returned %ld", res); + ALOGV("Parse returned %ld", res); if (res < 0) { // I/O error @@ -258,7 +258,7 @@ void BlockIterator::advance_l() { const mkvparser::Cluster *nextCluster; res = mExtractor->mSegment->ParseNext( mCluster, nextCluster, pos, len); - LOGV("ParseNext returned %ld", res); + ALOGV("ParseNext returned %ld", res); if (res > 0) { // EOF @@ -274,7 +274,7 @@ void BlockIterator::advance_l() { mCluster = nextCluster; res = mCluster->Parse(pos, len); - LOGV("Parse (2) returned %ld", res); + ALOGV("Parse (2) returned %ld", res); CHECK_GE(res, 0); mBlockEntryIndex = 0; @@ -687,8 +687,8 @@ void MatroskaExtractor::addTracks() { } const char *const codecID = track->GetCodecId(); - LOGV("codec id = %s", codecID); - LOGV("codec name = %s", track->GetCodecNameAsUTF8()); + ALOGV("codec id = %s", codecID); + ALOGV("codec name = %s", track->GetCodecNameAsUTF8()); size_t codecPrivateSize; const unsigned char *codecPrivate = diff --git a/media/libstagefright/mpeg2ts/ATSParser.cpp b/media/libstagefright/mpeg2ts/ATSParser.cpp index 72f1282..e18071e 100644 --- a/media/libstagefright/mpeg2ts/ATSParser.cpp +++ b/media/libstagefright/mpeg2ts/ATSParser.cpp @@ -39,7 +39,7 @@ namespace android { // I want the expression "y" evaluated even if verbose logging is off. #define MY_LOGV(x, y) \ - do { unsigned tmp = y; LOGV(x, tmp); } while (0) + do { unsigned tmp = y; ALOGV(x, tmp); } while (0) static const size_t kTSPacketSize = 188; @@ -135,7 +135,7 @@ ATSParser::Program::Program( mProgramMapPID(programMapPID), mFirstPTSValid(false), mFirstPTS(0) { - LOGV("new program number %u", programNumber); + ALOGV("new program number %u", programNumber); } bool ATSParser::Program::parsePID( @@ -185,18 +185,18 @@ struct StreamInfo { status_t ATSParser::Program::parseProgramMap(ABitReader *br) { unsigned table_id = br->getBits(8); - LOGV(" table_id = %u", table_id); + ALOGV(" table_id = %u", table_id); CHECK_EQ(table_id, 0x02u); unsigned section_syntax_indicator = br->getBits(1); - LOGV(" section_syntax_indicator = %u", section_syntax_indicator); + ALOGV(" section_syntax_indicator = %u", section_syntax_indicator); CHECK_EQ(section_syntax_indicator, 1u); CHECK_EQ(br->getBits(1), 0u); MY_LOGV(" reserved = %u", br->getBits(2)); unsigned section_length = br->getBits(12); - LOGV(" section_length = %u", section_length); + ALOGV(" section_length = %u", section_length); CHECK_EQ(section_length & 0xc00, 0u); CHECK_LE(section_length, 1021u); @@ -211,7 +211,7 @@ status_t ATSParser::Program::parseProgramMap(ABitReader *br) { MY_LOGV(" reserved = %u", br->getBits(4)); unsigned program_info_length = br->getBits(12); - LOGV(" program_info_length = %u", program_info_length); + ALOGV(" program_info_length = %u", program_info_length); CHECK_EQ(program_info_length & 0xc00, 0u); br->skipBits(program_info_length * 8); // skip descriptors @@ -227,17 +227,17 @@ status_t ATSParser::Program::parseProgramMap(ABitReader *br) { CHECK_GE(infoBytesRemaining, 5u); unsigned streamType = br->getBits(8); - LOGV(" stream_type = 0x%02x", streamType); + ALOGV(" stream_type = 0x%02x", streamType); MY_LOGV(" reserved = %u", br->getBits(3)); unsigned elementaryPID = br->getBits(13); - LOGV(" elementary_PID = 0x%04x", elementaryPID); + ALOGV(" elementary_PID = 0x%04x", elementaryPID); MY_LOGV(" reserved = %u", br->getBits(4)); unsigned ES_info_length = br->getBits(12); - LOGV(" ES_info_length = %u", ES_info_length); + ALOGV(" ES_info_length = %u", ES_info_length); CHECK_EQ(ES_info_length & 0xc00, 0u); CHECK_GE(infoBytesRemaining - 5, ES_info_length); @@ -250,7 +250,7 @@ status_t ATSParser::Program::parseProgramMap(ABitReader *br) { MY_LOGV(" tag = 0x%02x", br->getBits(8)); unsigned descLength = br->getBits(8); - LOGV(" len = %u", descLength); + ALOGV(" len = %u", descLength); CHECK_GE(info_bytes_remaining, 2 + descLength); @@ -425,7 +425,7 @@ ATSParser::Stream::Stream( break; } - LOGV("new stream PID 0x%02x, type 0x%02x", elementaryPID, streamType); + ALOGV("new stream PID 0x%02x, type 0x%02x", elementaryPID, streamType); if (mQueue != NULL) { mBuffer = new ABuffer(192 * 1024); @@ -535,10 +535,10 @@ void ATSParser::Stream::signalEOS(status_t finalResult) { status_t ATSParser::Stream::parsePES(ABitReader *br) { unsigned packet_startcode_prefix = br->getBits(24); - LOGV("packet_startcode_prefix = 0x%08x", packet_startcode_prefix); + ALOGV("packet_startcode_prefix = 0x%08x", packet_startcode_prefix); if (packet_startcode_prefix != 1) { - LOGV("Supposedly payload_unit_start=1 unit does not start " + ALOGV("Supposedly payload_unit_start=1 unit does not start " "with startcode."); return ERROR_MALFORMED; @@ -547,10 +547,10 @@ status_t ATSParser::Stream::parsePES(ABitReader *br) { CHECK_EQ(packet_startcode_prefix, 0x000001u); unsigned stream_id = br->getBits(8); - LOGV("stream_id = 0x%02x", stream_id); + ALOGV("stream_id = 0x%02x", stream_id); unsigned PES_packet_length = br->getBits(16); - LOGV("PES_packet_length = %u", PES_packet_length); + ALOGV("PES_packet_length = %u", PES_packet_length); if (stream_id != 0xbc // program_stream_map && stream_id != 0xbe // padding_stream @@ -569,25 +569,25 @@ status_t ATSParser::Stream::parsePES(ABitReader *br) { MY_LOGV("original_or_copy = %u", br->getBits(1)); unsigned PTS_DTS_flags = br->getBits(2); - LOGV("PTS_DTS_flags = %u", PTS_DTS_flags); + ALOGV("PTS_DTS_flags = %u", PTS_DTS_flags); unsigned ESCR_flag = br->getBits(1); - LOGV("ESCR_flag = %u", ESCR_flag); + ALOGV("ESCR_flag = %u", ESCR_flag); unsigned ES_rate_flag = br->getBits(1); - LOGV("ES_rate_flag = %u", ES_rate_flag); + ALOGV("ES_rate_flag = %u", ES_rate_flag); unsigned DSM_trick_mode_flag = br->getBits(1); - LOGV("DSM_trick_mode_flag = %u", DSM_trick_mode_flag); + ALOGV("DSM_trick_mode_flag = %u", DSM_trick_mode_flag); unsigned additional_copy_info_flag = br->getBits(1); - LOGV("additional_copy_info_flag = %u", additional_copy_info_flag); + ALOGV("additional_copy_info_flag = %u", additional_copy_info_flag); MY_LOGV("PES_CRC_flag = %u", br->getBits(1)); MY_LOGV("PES_extension_flag = %u", br->getBits(1)); unsigned PES_header_data_length = br->getBits(8); - LOGV("PES_header_data_length = %u", PES_header_data_length); + ALOGV("PES_header_data_length = %u", PES_header_data_length); unsigned optional_bytes_remaining = PES_header_data_length; @@ -605,7 +605,7 @@ status_t ATSParser::Stream::parsePES(ABitReader *br) { PTS |= br->getBits(15); CHECK_EQ(br->getBits(1), 1u); - LOGV("PTS = %llu", PTS); + ALOGV("PTS = %llu", PTS); // LOGI("PTS = %.2f secs", PTS / 90000.0f); optional_bytes_remaining -= 5; @@ -622,7 +622,7 @@ status_t ATSParser::Stream::parsePES(ABitReader *br) { DTS |= br->getBits(15); CHECK_EQ(br->getBits(1), 1u); - LOGV("DTS = %llu", DTS); + ALOGV("DTS = %llu", DTS); optional_bytes_remaining -= 5; } @@ -640,7 +640,7 @@ status_t ATSParser::Stream::parsePES(ABitReader *br) { ESCR |= br->getBits(15); CHECK_EQ(br->getBits(1), 1u); - LOGV("ESCR = %llu", ESCR); + ALOGV("ESCR = %llu", ESCR); MY_LOGV("ESCR_extension = %u", br->getBits(9)); CHECK_EQ(br->getBits(1), 1u); @@ -690,7 +690,7 @@ status_t ATSParser::Stream::parsePES(ABitReader *br) { size_t payloadSizeBits = br->numBitsLeft(); CHECK_EQ(payloadSizeBits % 8, 0u); - LOGV("There's %d bytes of payload.", payloadSizeBits / 8); + ALOGV("There's %d bytes of payload.", payloadSizeBits / 8); } } else if (stream_id == 0xbe) { // padding_stream CHECK_NE(PES_packet_length, 0u); @@ -708,7 +708,7 @@ status_t ATSParser::Stream::flush() { return OK; } - LOGV("flushing stream 0x%04x size = %d", mElementaryPID, mBuffer->size()); + ALOGV("flushing stream 0x%04x size = %d", mElementaryPID, mBuffer->size()); ABitReader br(mBuffer->data(), mBuffer->size()); @@ -722,7 +722,7 @@ status_t ATSParser::Stream::flush() { void ATSParser::Stream::onPayloadData( unsigned PTS_DTS_flags, uint64_t PTS, uint64_t DTS, const uint8_t *data, size_t size) { - LOGV("onPayloadData mStreamType=0x%02x", mStreamType); + ALOGV("onPayloadData mStreamType=0x%02x", mStreamType); int64_t timeUs = 0ll; // no presentation timestamp available. if (PTS_DTS_flags == 2 || PTS_DTS_flags == 3) { @@ -741,7 +741,7 @@ void ATSParser::Stream::onPayloadData( sp meta = mQueue->getFormat(); if (meta != NULL) { - LOGV("Stream PID 0x%08x of type 0x%02x now has data.", + ALOGV("Stream PID 0x%08x of type 0x%02x now has data.", mElementaryPID, mStreamType); mSource = new AnotherPacketSource(meta); @@ -823,18 +823,18 @@ void ATSParser::signalEOS(status_t finalResult) { void ATSParser::parseProgramAssociationTable(ABitReader *br) { unsigned table_id = br->getBits(8); - LOGV(" table_id = %u", table_id); + ALOGV(" table_id = %u", table_id); CHECK_EQ(table_id, 0x00u); unsigned section_syntax_indictor = br->getBits(1); - LOGV(" section_syntax_indictor = %u", section_syntax_indictor); + ALOGV(" section_syntax_indictor = %u", section_syntax_indictor); CHECK_EQ(section_syntax_indictor, 1u); CHECK_EQ(br->getBits(1), 0u); MY_LOGV(" reserved = %u", br->getBits(2)); unsigned section_length = br->getBits(12); - LOGV(" section_length = %u", section_length); + ALOGV(" section_length = %u", section_length); CHECK_EQ(section_length & 0xc00, 0u); MY_LOGV(" transport_stream_id = %u", br->getBits(16)); @@ -849,7 +849,7 @@ void ATSParser::parseProgramAssociationTable(ABitReader *br) { for (size_t i = 0; i < numProgramBytes / 4; ++i) { unsigned program_number = br->getBits(16); - LOGV(" program_number = %u", program_number); + ALOGV(" program_number = %u", program_number); MY_LOGV(" reserved = %u", br->getBits(3)); @@ -858,7 +858,7 @@ void ATSParser::parseProgramAssociationTable(ABitReader *br) { } else { unsigned programMapPID = br->getBits(13); - LOGV(" program_map_PID = 0x%04x", programMapPID); + ALOGV(" program_map_PID = 0x%04x", programMapPID); bool found = false; for (size_t index = 0; index < mPrograms.size(); ++index) { @@ -908,7 +908,7 @@ status_t ATSParser::parsePID( } if (!handled) { - LOGV("PID 0x%04x not handled.", PID); + ALOGV("PID 0x%04x not handled.", PID); } return OK; @@ -922,7 +922,7 @@ void ATSParser::parseAdaptationField(ABitReader *br) { } status_t ATSParser::parseTS(ABitReader *br) { - LOGV("---"); + ALOGV("---"); unsigned sync_byte = br->getBits(8); CHECK_EQ(sync_byte, 0x47u); @@ -930,20 +930,20 @@ status_t ATSParser::parseTS(ABitReader *br) { MY_LOGV("transport_error_indicator = %u", br->getBits(1)); unsigned payload_unit_start_indicator = br->getBits(1); - LOGV("payload_unit_start_indicator = %u", payload_unit_start_indicator); + ALOGV("payload_unit_start_indicator = %u", payload_unit_start_indicator); MY_LOGV("transport_priority = %u", br->getBits(1)); unsigned PID = br->getBits(13); - LOGV("PID = 0x%04x", PID); + ALOGV("PID = 0x%04x", PID); MY_LOGV("transport_scrambling_control = %u", br->getBits(2)); unsigned adaptation_field_control = br->getBits(2); - LOGV("adaptation_field_control = %u", adaptation_field_control); + ALOGV("adaptation_field_control = %u", adaptation_field_control); unsigned continuity_counter = br->getBits(4); - LOGV("continuity_counter = %u", continuity_counter); + ALOGV("continuity_counter = %u", continuity_counter); // LOGI("PID = 0x%04x, continuity_counter = %u", PID, continuity_counter); diff --git a/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp b/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp index ce07e32..0f614a2 100644 --- a/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp +++ b/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp @@ -126,7 +126,7 @@ void AnotherPacketSource::queueAccessUnit(const sp &buffer) { int64_t timeUs; CHECK(buffer->meta()->findInt64("timeUs", &timeUs)); - LOGV("queueAccessUnit timeUs=%lld us (%.2f secs)", timeUs, timeUs / 1E6); + ALOGV("queueAccessUnit timeUs=%lld us (%.2f secs)", timeUs, timeUs / 1E6); Mutex::Autolock autoLock(mLock); mBuffers.push_back(buffer); diff --git a/media/libstagefright/mpeg2ts/ESQueue.cpp b/media/libstagefright/mpeg2ts/ESQueue.cpp index b9a4826..edb4232 100644 --- a/media/libstagefright/mpeg2ts/ESQueue.cpp +++ b/media/libstagefright/mpeg2ts/ESQueue.cpp @@ -257,7 +257,7 @@ status_t ElementaryStreamQueue::appendData( if (mBuffer == NULL || neededSize > mBuffer->capacity()) { neededSize = (neededSize + 65535) & ~65535; - LOGV("resizing buffer to size %d", neededSize); + ALOGV("resizing buffer to size %d", neededSize); sp buffer = new ABuffer(neededSize); if (mBuffer != NULL) { @@ -445,7 +445,7 @@ int64_t ElementaryStreamQueue::fetchTimestamp(size_t size) { } if (timeUs == 0ll) { - LOGV("Returning 0 timestamp"); + ALOGV("Returning 0 timestamp"); } return timeUs; @@ -529,7 +529,7 @@ sp ElementaryStreamQueue::dequeueAccessUnitH264() { dstOffset += pos.nalSize + 4; } - LOGV("accessUnit contains nal types %s", out.c_str()); + ALOGV("accessUnit contains nal types %s", out.c_str()); const NALPosition &pos = nals.itemAt(nals.size() - 1); size_t nextScan = pos.nalOffset + pos.nalSize; @@ -760,7 +760,7 @@ sp ElementaryStreamQueue::dequeueAccessUnitMPEGVideo() { accessUnit->meta()->setInt64("timeUs", timeUs); - LOGV("returning MPEG video access unit at time %lld us", + ALOGV("returning MPEG video access unit at time %lld us", timeUs); // hexdump(accessUnit->data(), accessUnit->size()); @@ -919,7 +919,7 @@ sp ElementaryStreamQueue::dequeueAccessUnitMPEG4Video() { accessUnit->meta()->setInt64("timeUs", timeUs); - LOGV("returning MPEG4 video access unit at time %lld us", + ALOGV("returning MPEG4 video access unit at time %lld us", timeUs); // hexdump(accessUnit->data(), accessUnit->size()); diff --git a/media/libstagefright/mpeg2ts/MPEG2PSExtractor.cpp b/media/libstagefright/mpeg2ts/MPEG2PSExtractor.cpp index f55be6e..d68e45b 100644 --- a/media/libstagefright/mpeg2ts/MPEG2PSExtractor.cpp +++ b/media/libstagefright/mpeg2ts/MPEG2PSExtractor.cpp @@ -274,10 +274,10 @@ ssize_t MPEG2PSExtractor::dequeuePES() { unsigned packet_startcode_prefix = br.getBits(24); - LOGV("packet_startcode_prefix = 0x%08x", packet_startcode_prefix); + ALOGV("packet_startcode_prefix = 0x%08x", packet_startcode_prefix); if (packet_startcode_prefix != 1) { - LOGV("Supposedly payload_unit_start=1 unit does not start " + ALOGV("Supposedly payload_unit_start=1 unit does not start " "with startcode."); return ERROR_MALFORMED; @@ -286,7 +286,7 @@ ssize_t MPEG2PSExtractor::dequeuePES() { CHECK_EQ(packet_startcode_prefix, 0x000001u); unsigned stream_id = br.getBits(8); - LOGV("stream_id = 0x%02x", stream_id); + ALOGV("stream_id = 0x%02x", stream_id); /* unsigned PES_packet_length = */br.getBits(16); @@ -372,25 +372,25 @@ ssize_t MPEG2PSExtractor::dequeuePES() { /* unsigned original_or_copy = */br.getBits(1); unsigned PTS_DTS_flags = br.getBits(2); - LOGV("PTS_DTS_flags = %u", PTS_DTS_flags); + ALOGV("PTS_DTS_flags = %u", PTS_DTS_flags); unsigned ESCR_flag = br.getBits(1); - LOGV("ESCR_flag = %u", ESCR_flag); + ALOGV("ESCR_flag = %u", ESCR_flag); unsigned ES_rate_flag = br.getBits(1); - LOGV("ES_rate_flag = %u", ES_rate_flag); + ALOGV("ES_rate_flag = %u", ES_rate_flag); unsigned DSM_trick_mode_flag = br.getBits(1); - LOGV("DSM_trick_mode_flag = %u", DSM_trick_mode_flag); + ALOGV("DSM_trick_mode_flag = %u", DSM_trick_mode_flag); unsigned additional_copy_info_flag = br.getBits(1); - LOGV("additional_copy_info_flag = %u", additional_copy_info_flag); + ALOGV("additional_copy_info_flag = %u", additional_copy_info_flag); /* unsigned PES_CRC_flag = */br.getBits(1); /* PES_extension_flag = */br.getBits(1); unsigned PES_header_data_length = br.getBits(8); - LOGV("PES_header_data_length = %u", PES_header_data_length); + ALOGV("PES_header_data_length = %u", PES_header_data_length); unsigned optional_bytes_remaining = PES_header_data_length; @@ -408,7 +408,7 @@ ssize_t MPEG2PSExtractor::dequeuePES() { PTS |= br.getBits(15); CHECK_EQ(br.getBits(1), 1u); - LOGV("PTS = %llu", PTS); + ALOGV("PTS = %llu", PTS); // LOGI("PTS = %.2f secs", PTS / 90000.0f); optional_bytes_remaining -= 5; @@ -425,7 +425,7 @@ ssize_t MPEG2PSExtractor::dequeuePES() { DTS |= br.getBits(15); CHECK_EQ(br.getBits(1), 1u); - LOGV("DTS = %llu", DTS); + ALOGV("DTS = %llu", DTS); optional_bytes_remaining -= 5; } @@ -443,7 +443,7 @@ ssize_t MPEG2PSExtractor::dequeuePES() { ESCR |= br.getBits(15); CHECK_EQ(br.getBits(1), 1u); - LOGV("ESCR = %llu", ESCR); + ALOGV("ESCR = %llu", ESCR); /* unsigned ESCR_extension = */br.getBits(9); CHECK_EQ(br.getBits(1), 1u); @@ -650,7 +650,7 @@ status_t MPEG2PSExtractor::Track::appendPESData( sp meta = mQueue->getFormat(); if (meta != NULL) { - LOGV("Stream ID 0x%02x now has data.", mStreamID); + ALOGV("Stream ID 0x%02x now has data.", mStreamID); mSource = new AnotherPacketSource(meta); mSource->queueAccessUnit(accessUnit); diff --git a/media/libstagefright/omx/OMX.cpp b/media/libstagefright/omx/OMX.cpp index 3715fe9..694b12d 100644 --- a/media/libstagefright/omx/OMX.cpp +++ b/media/libstagefright/omx/OMX.cpp @@ -115,7 +115,7 @@ void OMX::CallbackDispatcher::post(const omx_message &msg) { void OMX::CallbackDispatcher::dispatch(const omx_message &msg) { if (mOwner == NULL) { - LOGV("Would have dispatched a message to a node that's already gone."); + ALOGV("Would have dispatched a message to a node that's already gone."); return; } mOwner->onMessage(msg); @@ -231,7 +231,7 @@ status_t OMX::allocateNode( instance, &handle); if (err != OMX_ErrorNone) { - LOGV("FAILED to allocate omx component '%s'", name); + ALOGV("FAILED to allocate omx component '%s'", name); instance->onGetHandleFailed(); @@ -384,7 +384,7 @@ OMX_ERRORTYPE OMX::OnEvent( OMX_IN OMX_U32 nData1, OMX_IN OMX_U32 nData2, OMX_IN OMX_PTR pEventData) { - LOGV("OnEvent(%d, %ld, %ld)", eEvent, nData1, nData2); + ALOGV("OnEvent(%d, %ld, %ld)", eEvent, nData1, nData2); omx_message msg; msg.type = omx_message::EVENT; @@ -400,7 +400,7 @@ OMX_ERRORTYPE OMX::OnEvent( OMX_ERRORTYPE OMX::OnEmptyBufferDone( node_id node, OMX_IN OMX_BUFFERHEADERTYPE *pBuffer) { - LOGV("OnEmptyBufferDone buffer=%p", pBuffer); + ALOGV("OnEmptyBufferDone buffer=%p", pBuffer); omx_message msg; msg.type = omx_message::EMPTY_BUFFER_DONE; @@ -414,7 +414,7 @@ OMX_ERRORTYPE OMX::OnEmptyBufferDone( OMX_ERRORTYPE OMX::OnFillBufferDone( node_id node, OMX_IN OMX_BUFFERHEADERTYPE *pBuffer) { - LOGV("OnFillBufferDone buffer=%p", pBuffer); + ALOGV("OnFillBufferDone buffer=%p", pBuffer); omx_message msg; msg.type = omx_message::FILL_BUFFER_DONE; diff --git a/media/libstagefright/omx/OMXNodeInstance.cpp b/media/libstagefright/omx/OMXNodeInstance.cpp index 0ff398a..802c429 100644 --- a/media/libstagefright/omx/OMXNodeInstance.cpp +++ b/media/libstagefright/omx/OMXNodeInstance.cpp @@ -142,7 +142,7 @@ status_t OMXNodeInstance::freeNode(OMXMaster *master) { switch (state) { case OMX_StateExecuting: { - LOGV("forcing Executing->Idle"); + ALOGV("forcing Executing->Idle"); sendCommand(OMX_CommandStateSet, OMX_StateIdle); OMX_ERRORTYPE err; int32_t iteration = 0; @@ -168,7 +168,7 @@ status_t OMXNodeInstance::freeNode(OMXMaster *master) { case OMX_StateIdle: { - LOGV("forcing Idle->Loaded"); + ALOGV("forcing Idle->Loaded"); sendCommand(OMX_CommandStateSet, OMX_StateLoaded); freeActiveBuffers(); @@ -184,7 +184,7 @@ status_t OMXNodeInstance::freeNode(OMXMaster *master) { break; } - LOGV("waiting for Loaded state..."); + ALOGV("waiting for Loaded state..."); usleep(100000); } CHECK_EQ(err, OMX_ErrorNone); @@ -201,10 +201,10 @@ status_t OMXNodeInstance::freeNode(OMXMaster *master) { break; } - LOGV("calling destroyComponentInstance"); + ALOGV("calling destroyComponentInstance"); OMX_ERRORTYPE err = master->destroyComponentInstance( static_cast(mHandle)); - LOGV("destroyComponentInstance returned err %d", err); + ALOGV("destroyComponentInstance returned err %d", err); mHandle = NULL; @@ -215,7 +215,7 @@ status_t OMXNodeInstance::freeNode(OMXMaster *master) { mOwner->invalidateNodeID(mNodeID); mNodeID = NULL; - LOGV("OMXNodeInstance going away."); + ALOGV("OMXNodeInstance going away."); delete this; return StatusFromOMXError(err); diff --git a/media/libstagefright/omx/SimpleSoftOMXComponent.cpp b/media/libstagefright/omx/SimpleSoftOMXComponent.cpp index b705d00..0914f32 100644 --- a/media/libstagefright/omx/SimpleSoftOMXComponent.cpp +++ b/media/libstagefright/omx/SimpleSoftOMXComponent.cpp @@ -589,7 +589,7 @@ void SimpleSoftOMXComponent::checkTransitions() { if (port->mTransition == PortInfo::DISABLING) { if (port->mBuffers.empty()) { - LOGV("Port %d now disabled.", i); + ALOGV("Port %d now disabled.", i); port->mTransition = PortInfo::NONE; notify(OMX_EventCmdComplete, OMX_CommandPortDisable, i, NULL); @@ -598,7 +598,7 @@ void SimpleSoftOMXComponent::checkTransitions() { } } else if (port->mTransition == PortInfo::ENABLING) { if (port->mDef.bPopulated == OMX_TRUE) { - LOGV("Port %d now enabled.", i); + ALOGV("Port %d now enabled.", i); port->mTransition = PortInfo::NONE; port->mDef.bEnabled = OMX_TRUE; diff --git a/media/libstagefright/omx/SoftOMXPlugin.cpp b/media/libstagefright/omx/SoftOMXPlugin.cpp index 1e33f05..8aeb763 100644 --- a/media/libstagefright/omx/SoftOMXPlugin.cpp +++ b/media/libstagefright/omx/SoftOMXPlugin.cpp @@ -58,7 +58,7 @@ OMX_ERRORTYPE SoftOMXPlugin::makeComponentInstance( const OMX_CALLBACKTYPE *callbacks, OMX_PTR appData, OMX_COMPONENTTYPE **component) { - LOGV("makeComponentInstance '%s'", name); + ALOGV("makeComponentInstance '%s'", name); for (size_t i = 0; i < kNumComponents; ++i) { if (strcmp(name, kComponents[i].mName)) { diff --git a/media/libstagefright/rtsp/AAMRAssembler.cpp b/media/libstagefright/rtsp/AAMRAssembler.cpp index b1f6e9a..547b202 100644 --- a/media/libstagefright/rtsp/AAMRAssembler.cpp +++ b/media/libstagefright/rtsp/AAMRAssembler.cpp @@ -123,7 +123,7 @@ ARTPAssembler::AssemblyStatus AAMRAssembler::addPacket( mNextExpectedSeqNoValid = true; mNextExpectedSeqNo = (uint32_t)buffer->int32Data(); } else if ((uint32_t)buffer->int32Data() != mNextExpectedSeqNo) { - LOGV("Not the sequence number I expected"); + ALOGV("Not the sequence number I expected"); return WRONG_SEQUENCE_NUMBER; } @@ -134,7 +134,7 @@ ARTPAssembler::AssemblyStatus AAMRAssembler::addPacket( queue->erase(queue->begin()); ++mNextExpectedSeqNo; - LOGV("AMR packet too short."); + ALOGV("AMR packet too short."); return MALFORMED_PACKET; } @@ -152,7 +152,7 @@ ARTPAssembler::AssemblyStatus AAMRAssembler::addPacket( queue->erase(queue->begin()); ++mNextExpectedSeqNo; - LOGV("Unable to parse TOC."); + ALOGV("Unable to parse TOC."); return MALFORMED_PACKET; } @@ -166,7 +166,7 @@ ARTPAssembler::AssemblyStatus AAMRAssembler::addPacket( queue->erase(queue->begin()); ++mNextExpectedSeqNo; - LOGV("Illegal TOC entry."); + ALOGV("Illegal TOC entry."); return MALFORMED_PACKET; } @@ -193,7 +193,7 @@ ARTPAssembler::AssemblyStatus AAMRAssembler::addPacket( queue->erase(queue->begin()); ++mNextExpectedSeqNo; - LOGV("AMR packet too short."); + ALOGV("AMR packet too short."); return MALFORMED_PACKET; } diff --git a/media/libstagefright/rtsp/AAVCAssembler.cpp b/media/libstagefright/rtsp/AAVCAssembler.cpp index 11c6ae7..ed8b1df 100644 --- a/media/libstagefright/rtsp/AAVCAssembler.cpp +++ b/media/libstagefright/rtsp/AAVCAssembler.cpp @@ -72,7 +72,7 @@ ARTPAssembler::AssemblyStatus AAVCAssembler::addNALUnit( mNextExpectedSeqNoValid = true; mNextExpectedSeqNo = (uint32_t)buffer->int32Data(); } else if ((uint32_t)buffer->int32Data() != mNextExpectedSeqNo) { - LOGV("Not the sequence number I expected"); + ALOGV("Not the sequence number I expected"); return WRONG_SEQUENCE_NUMBER; } @@ -83,7 +83,7 @@ ARTPAssembler::AssemblyStatus AAVCAssembler::addNALUnit( if (size < 1 || (data[0] & 0x80)) { // Corrupt. - LOGV("Ignoring corrupt buffer."); + ALOGV("Ignoring corrupt buffer."); queue->erase(queue->begin()); ++mNextExpectedSeqNo; @@ -107,7 +107,7 @@ ARTPAssembler::AssemblyStatus AAVCAssembler::addNALUnit( return success ? OK : MALFORMED_PACKET; } else { - LOGV("Ignoring unsupported buffer (nalType=%d)", nalType); + ALOGV("Ignoring unsupported buffer (nalType=%d)", nalType); queue->erase(queue->begin()); ++mNextExpectedSeqNo; @@ -117,7 +117,7 @@ ARTPAssembler::AssemblyStatus AAVCAssembler::addNALUnit( } void AAVCAssembler::addSingleNALUnit(const sp &buffer) { - LOGV("addSingleNALUnit of size %d", buffer->size()); + ALOGV("addSingleNALUnit of size %d", buffer->size()); #if !LOG_NDEBUG hexdump(buffer->data(), buffer->size()); #endif @@ -138,7 +138,7 @@ bool AAVCAssembler::addSingleTimeAggregationPacket(const sp &buffer) { size_t size = buffer->size(); if (size < 3) { - LOGV("Discarding too small STAP-A packet."); + ALOGV("Discarding too small STAP-A packet."); return false; } @@ -148,7 +148,7 @@ bool AAVCAssembler::addSingleTimeAggregationPacket(const sp &buffer) { size_t nalSize = (data[0] << 8) | data[1]; if (size < nalSize + 2) { - LOGV("Discarding malformed STAP-A packet."); + ALOGV("Discarding malformed STAP-A packet."); return false; } @@ -164,7 +164,7 @@ bool AAVCAssembler::addSingleTimeAggregationPacket(const sp &buffer) { } if (size != 0) { - LOGV("Unexpected padding at end of STAP-A packet."); + ALOGV("Unexpected padding at end of STAP-A packet."); } return true; @@ -184,7 +184,7 @@ ARTPAssembler::AssemblyStatus AAVCAssembler::addFragmentedNALUnit( CHECK((indicator & 0x1f) == 28); if (size < 2) { - LOGV("Ignoring malformed FU buffer (size = %d)", size); + ALOGV("Ignoring malformed FU buffer (size = %d)", size); queue->erase(queue->begin()); ++mNextExpectedSeqNo; @@ -194,7 +194,7 @@ ARTPAssembler::AssemblyStatus AAVCAssembler::addFragmentedNALUnit( if (!(data[1] & 0x80)) { // Start bit not set on the first buffer. - LOGV("Start bit not set on first buffer"); + ALOGV("Start bit not set on first buffer"); queue->erase(queue->begin()); ++mNextExpectedSeqNo; @@ -212,13 +212,13 @@ ARTPAssembler::AssemblyStatus AAVCAssembler::addFragmentedNALUnit( if (data[1] & 0x40) { // Huh? End bit also set on the first buffer. - LOGV("Grrr. This isn't fragmented at all."); + ALOGV("Grrr. This isn't fragmented at all."); complete = true; } else { List >::iterator it = ++queue->begin(); while (it != queue->end()) { - LOGV("sequence length %d", totalCount); + ALOGV("sequence length %d", totalCount); const sp &buffer = *it; @@ -226,7 +226,7 @@ ARTPAssembler::AssemblyStatus AAVCAssembler::addFragmentedNALUnit( size_t size = buffer->size(); if ((uint32_t)buffer->int32Data() != expectedSeqNo) { - LOGV("sequence not complete, expected seqNo %d, got %d", + ALOGV("sequence not complete, expected seqNo %d, got %d", expectedSeqNo, (uint32_t)buffer->int32Data()); return WRONG_SEQUENCE_NUMBER; @@ -236,7 +236,7 @@ ARTPAssembler::AssemblyStatus AAVCAssembler::addFragmentedNALUnit( || data[0] != indicator || (data[1] & 0x1f) != nalType || (data[1] & 0x80)) { - LOGV("Ignoring malformed FU buffer."); + ALOGV("Ignoring malformed FU buffer."); // Delete the whole start of the FU. @@ -287,7 +287,7 @@ ARTPAssembler::AssemblyStatus AAVCAssembler::addFragmentedNALUnit( for (size_t i = 0; i < totalCount; ++i) { const sp &buffer = *it; - LOGV("piece #%d/%d", i + 1, totalCount); + ALOGV("piece #%d/%d", i + 1, totalCount); #if !LOG_NDEBUG hexdump(buffer->data(), buffer->size()); #endif @@ -302,7 +302,7 @@ ARTPAssembler::AssemblyStatus AAVCAssembler::addFragmentedNALUnit( addSingleNALUnit(unit); - LOGV("successfully assembled a NAL unit from fragments."); + ALOGV("successfully assembled a NAL unit from fragments."); return OK; } @@ -310,7 +310,7 @@ ARTPAssembler::AssemblyStatus AAVCAssembler::addFragmentedNALUnit( void AAVCAssembler::submitAccessUnit() { CHECK(!mNALUnits.empty()); - LOGV("Access unit complete (%d nal units)", mNALUnits.size()); + ALOGV("Access unit complete (%d nal units)", mNALUnits.size()); size_t totalSize = 0; for (List >::iterator it = mNALUnits.begin(); @@ -360,7 +360,7 @@ ARTPAssembler::AssemblyStatus AAVCAssembler::assembleMore( void AAVCAssembler::packetLost() { CHECK(mNextExpectedSeqNoValid); - LOGV("packetLost (expected %d)", mNextExpectedSeqNo); + ALOGV("packetLost (expected %d)", mNextExpectedSeqNo); ++mNextExpectedSeqNo; diff --git a/media/libstagefright/rtsp/AMPEG4ElementaryAssembler.cpp b/media/libstagefright/rtsp/AMPEG4ElementaryAssembler.cpp index 9f6bd29..2f2e2c2 100644 --- a/media/libstagefright/rtsp/AMPEG4ElementaryAssembler.cpp +++ b/media/libstagefright/rtsp/AMPEG4ElementaryAssembler.cpp @@ -203,7 +203,7 @@ ARTPAssembler::AssemblyStatus AMPEG4ElementaryAssembler::addPacket( mNextExpectedSeqNoValid = true; mNextExpectedSeqNo = (uint32_t)buffer->int32Data(); } else if ((uint32_t)buffer->int32Data() != mNextExpectedSeqNo) { - LOGV("Not the sequence number I expected"); + ALOGV("Not the sequence number I expected"); return WRONG_SEQUENCE_NUMBER; } @@ -336,7 +336,7 @@ ARTPAssembler::AssemblyStatus AMPEG4ElementaryAssembler::addPacket( void AMPEG4ElementaryAssembler::submitAccessUnit() { CHECK(!mPackets.empty()); - LOGV("Access unit complete (%d nal units)", mPackets.size()); + ALOGV("Access unit complete (%d nal units)", mPackets.size()); size_t totalSize = 0; for (List >::iterator it = mPackets.begin(); @@ -383,7 +383,7 @@ ARTPAssembler::AssemblyStatus AMPEG4ElementaryAssembler::assembleMore( void AMPEG4ElementaryAssembler::packetLost() { CHECK(mNextExpectedSeqNoValid); - LOGV("packetLost (expected %d)", mNextExpectedSeqNo); + ALOGV("packetLost (expected %d)", mNextExpectedSeqNo); ++mNextExpectedSeqNo; diff --git a/media/libstagefright/rtsp/ARTPConnection.cpp b/media/libstagefright/rtsp/ARTPConnection.cpp index 47de4e0..2abdefc 100644 --- a/media/libstagefright/rtsp/ARTPConnection.cpp +++ b/media/libstagefright/rtsp/ARTPConnection.cpp @@ -325,7 +325,7 @@ void ARTPConnection::onPollStreams() { } if (buffer->size() > 0) { - LOGV("Sending RR..."); + ALOGV("Sending RR..."); ssize_t n = sendto( s->mRTCPSocket, buffer->data(), buffer->size(), 0, @@ -340,7 +340,7 @@ void ARTPConnection::onPollStreams() { } status_t ARTPConnection::receive(StreamInfo *s, bool receiveRTP) { - LOGV("receiving %s", receiveRTP ? "RTP" : "RTCP"); + ALOGV("receiving %s", receiveRTP ? "RTP" : "RTCP"); CHECK(!s->mIsInjected); diff --git a/media/libstagefright/rtsp/ARTPSource.cpp b/media/libstagefright/rtsp/ARTPSource.cpp index 3aa07ce..dc5f17e 100644 --- a/media/libstagefright/rtsp/ARTPSource.cpp +++ b/media/libstagefright/rtsp/ARTPSource.cpp @@ -207,7 +207,7 @@ void ARTPSource::addFIR(const sp &buffer) { buffer->setRange(buffer->offset(), buffer->size() + 20); - LOGV("Added FIR request."); + ALOGV("Added FIR request."); } void ARTPSource::addReceiverReport(const sp &buffer) { diff --git a/media/libstagefright/rtsp/ARTPWriter.cpp b/media/libstagefright/rtsp/ARTPWriter.cpp index 5a033e1..b602511 100644 --- a/media/libstagefright/rtsp/ARTPWriter.cpp +++ b/media/libstagefright/rtsp/ARTPWriter.cpp @@ -277,7 +277,7 @@ void ARTPWriter::onRead(const sp &msg) { } if (mediaBuf->range_length() > 0) { - LOGV("read buffer of size %d", mediaBuf->range_length()); + ALOGV("read buffer of size %d", mediaBuf->range_length()); if (mMode == H264) { StripStartcode(mediaBuf); diff --git a/media/libstagefright/rtsp/ARTSPConnection.cpp b/media/libstagefright/rtsp/ARTSPConnection.cpp index bd0e491..c450158 100644 --- a/media/libstagefright/rtsp/ARTSPConnection.cpp +++ b/media/libstagefright/rtsp/ARTSPConnection.cpp @@ -240,7 +240,7 @@ void ARTSPConnection::onConnect(const sp &msg) { } if (mUser.size() > 0) { - LOGV("user = '%s', pass = '%s'", mUser.c_str(), mPass.c_str()); + ALOGV("user = '%s', pass = '%s'", mUser.c_str(), mPass.c_str()); } struct hostent *ent = gethostbyname(host.c_str()); @@ -419,7 +419,7 @@ void ARTSPConnection::onSendRequest(const sp &msg) { request.insert(cseqHeader, i + 2); - LOGV("request: '%s'", request.c_str()); + ALOGV("request: '%s'", request.c_str()); size_t numBytesSent = 0; while (numBytesSent < request.size()) { @@ -649,7 +649,7 @@ bool ARTSPConnection::receiveRTSPReponse() { break; } - LOGV("line: %s", line.c_str()); + ALOGV("line: %s", line.c_str()); ssize_t colonPos = line.find(":"); if (colonPos < 0) { diff --git a/media/libstagefright/rtsp/ARawAudioAssembler.cpp b/media/libstagefright/rtsp/ARawAudioAssembler.cpp index dd47ea3..98bee82 100644 --- a/media/libstagefright/rtsp/ARawAudioAssembler.cpp +++ b/media/libstagefright/rtsp/ARawAudioAssembler.cpp @@ -77,7 +77,7 @@ ARTPAssembler::AssemblyStatus ARawAudioAssembler::addPacket( mNextExpectedSeqNoValid = true; mNextExpectedSeqNo = (uint32_t)buffer->int32Data(); } else if ((uint32_t)buffer->int32Data() != mNextExpectedSeqNo) { - LOGV("Not the sequence number I expected"); + ALOGV("Not the sequence number I expected"); return WRONG_SEQUENCE_NUMBER; } @@ -88,7 +88,7 @@ ARTPAssembler::AssemblyStatus ARawAudioAssembler::addPacket( queue->erase(queue->begin()); ++mNextExpectedSeqNo; - LOGV("raw audio packet too short."); + ALOGV("raw audio packet too short."); return MALFORMED_PACKET; } diff --git a/media/libstagefright/rtsp/ASessionDescription.cpp b/media/libstagefright/rtsp/ASessionDescription.cpp index f03f7a2..56fdd9d 100644 --- a/media/libstagefright/rtsp/ASessionDescription.cpp +++ b/media/libstagefright/rtsp/ASessionDescription.cpp @@ -120,7 +120,7 @@ bool ASessionDescription::parse(const void *data, size_t size) { key.trim(); value.trim(); - LOGV("adding '%s' => '%s'", key.c_str(), value.c_str()); + ALOGV("adding '%s' => '%s'", key.c_str(), value.c_str()); mTracks.editItemAt(mTracks.size() - 1).add(key, value); break; @@ -128,7 +128,7 @@ bool ASessionDescription::parse(const void *data, size_t size) { case 'm': { - LOGV("new section '%s'", + ALOGV("new section '%s'", AString(line, 2, line.size() - 2).c_str()); mTracks.push(Attribs()); @@ -148,7 +148,7 @@ bool ASessionDescription::parse(const void *data, size_t size) { key.trim(); value.trim(); - LOGV("adding '%s' => '%s'", key.c_str(), value.c_str()); + ALOGV("adding '%s' => '%s'", key.c_str(), value.c_str()); mTracks.editItemAt(mTracks.size() - 1).add(key, value); break; diff --git a/media/libstagefright/rtsp/MyHandler.h b/media/libstagefright/rtsp/MyHandler.h index af7dd23..8847878 100644 --- a/media/libstagefright/rtsp/MyHandler.h +++ b/media/libstagefright/rtsp/MyHandler.h @@ -338,7 +338,7 @@ struct MyHandler : public AHandler { return false; } - LOGV("successfully poked holes."); + ALOGV("successfully poked holes."); return true; } @@ -745,7 +745,7 @@ struct MyHandler : public AHandler { CHECK(msg->findSize("track-index", &trackIndex)); if (trackIndex >= mTracks.size()) { - LOGV("late packets ignored."); + ALOGV("late packets ignored."); break; } @@ -768,12 +768,12 @@ struct MyHandler : public AHandler { uint32_t seqNum = (uint32_t)accessUnit->int32Data(); if (mSeekPending) { - LOGV("we're seeking, dropping stale packet."); + ALOGV("we're seeking, dropping stale packet."); break; } if (seqNum < track->mFirstSeqNumInSegment) { - LOGV("dropping stale access-unit (%d < %d)", + ALOGV("dropping stale access-unit (%d < %d)", seqNum, track->mFirstSeqNumInSegment); break; } @@ -886,7 +886,7 @@ struct MyHandler : public AHandler { ssize_t i = response->mHeaders.indexOfKey("rtp-info"); CHECK_GE(i, 0); - LOGV("rtp-info: %s", response->mHeaders.valueAt(i).c_str()); + ALOGV("rtp-info: %s", response->mHeaders.valueAt(i).c_str()); LOGI("seek completed."); } @@ -991,7 +991,7 @@ struct MyHandler : public AHandler { } AString range = response->mHeaders.valueAt(i); - LOGV("Range: %s", range.c_str()); + ALOGV("Range: %s", range.c_str()); AString val; CHECK(GetAttribute(range.c_str(), "npt", &val)); @@ -1013,7 +1013,7 @@ struct MyHandler : public AHandler { for (List::iterator it = streamInfos.begin(); it != streamInfos.end(); ++it) { (*it).trim(); - LOGV("streamInfo[%d] = %s", n, (*it).c_str()); + ALOGV("streamInfo[%d] = %s", n, (*it).c_str()); CHECK(GetAttribute((*it).c_str(), "url", &val)); @@ -1037,7 +1037,7 @@ struct MyHandler : public AHandler { uint32_t rtpTime = strtoul(val.c_str(), &end, 10); - LOGV("track #%d: rtpTime=%u <=> npt=%.2f", n, rtpTime, npt1); + ALOGV("track #%d: rtpTime=%u <=> npt=%.2f", n, rtpTime, npt1); info->mNormalPlayTimeRTP = rtpTime; info->mNormalPlayTimeUs = (int64_t)(npt1 * 1E6); @@ -1167,7 +1167,7 @@ private: info->mTimeScale = timescale; - LOGV("track #%d URL=%s", mTracks.size(), trackURL.c_str()); + ALOGV("track #%d URL=%s", mTracks.size(), trackURL.c_str()); AString request = "SETUP "; request.append(trackURL); @@ -1258,7 +1258,7 @@ private: } void onTimeUpdate(int32_t trackIndex, uint32_t rtpTime, uint64_t ntpTime) { - LOGV("onTimeUpdate track %d, rtpTime = 0x%08x, ntpTime = 0x%016llx", + ALOGV("onTimeUpdate track %d, rtpTime = 0x%08x, ntpTime = 0x%016llx", trackIndex, rtpTime, ntpTime); int64_t ntpTimeUs = (int64_t)(ntpTime * 1E6 / (1ll << 32)); @@ -1276,7 +1276,7 @@ private: void onAccessUnitComplete( int32_t trackIndex, const sp &accessUnit) { - LOGV("onAccessUnitComplete track %d", trackIndex); + ALOGV("onAccessUnitComplete track %d", trackIndex); if (mFirstAccessUnit) { sp msg = mNotify->dup(); @@ -1297,7 +1297,7 @@ private: TrackInfo *track = &mTracks.editItemAt(trackIndex); if (mNTPAnchorUs < 0 || mMediaAnchorUs < 0 || track->mNTPAnchorUs < 0) { - LOGV("storing accessUnit, no time established yet"); + ALOGV("storing accessUnit, no time established yet"); track->mPackets.push_back(accessUnit); return; } @@ -1336,11 +1336,11 @@ private: } if (mediaTimeUs < 0) { - LOGV("dropping early accessUnit."); + ALOGV("dropping early accessUnit."); return false; } - LOGV("track %d rtpTime=%d mediaTimeUs = %lld us (%.2f secs)", + ALOGV("track %d rtpTime=%d mediaTimeUs = %lld us (%.2f secs)", trackIndex, rtpTime, mediaTimeUs, mediaTimeUs / 1E6); accessUnit->meta()->setInt64("timeUs", mediaTimeUs); diff --git a/media/libstagefright/tests/DummyRecorder.cpp b/media/libstagefright/tests/DummyRecorder.cpp index 8d75d6b..fbb606d 100644 --- a/media/libstagefright/tests/DummyRecorder.cpp +++ b/media/libstagefright/tests/DummyRecorder.cpp @@ -27,7 +27,7 @@ namespace android { // static void *DummyRecorder::threadWrapper(void *pthis) { - LOGV("ThreadWrapper: %p", pthis); + ALOGV("ThreadWrapper: %p", pthis); DummyRecorder *writer = static_cast(pthis); writer->readFromSource(); return NULL; @@ -35,7 +35,7 @@ void *DummyRecorder::threadWrapper(void *pthis) { status_t DummyRecorder::start() { - LOGV("Start"); + ALOGV("Start"); mStarted = true; mSource->start(); @@ -55,7 +55,7 @@ status_t DummyRecorder::start() { status_t DummyRecorder::stop() { - LOGV("Stop"); + ALOGV("Stop"); mStarted = false; mSource->stop(); @@ -63,20 +63,20 @@ status_t DummyRecorder::stop() { pthread_join(mThread, &dummy); status_t err = (status_t) dummy; - LOGV("Ending the reading thread"); + ALOGV("Ending the reading thread"); return err; } // pretend to read the source buffers void DummyRecorder::readFromSource() { - LOGV("ReadFromSource"); + ALOGV("ReadFromSource"); if (!mStarted) { return; } status_t err = OK; MediaBuffer *buffer; - LOGV("A fake writer accessing the frames"); + ALOGV("A fake writer accessing the frames"); while (mStarted && (err = mSource->read(&buffer)) == OK){ // if not getting a valid buffer from source, then exit if (buffer == NULL) { diff --git a/media/libstagefright/tests/SurfaceMediaSource_test.cpp b/media/libstagefright/tests/SurfaceMediaSource_test.cpp index d7bb703..6be5e9a 100644 --- a/media/libstagefright/tests/SurfaceMediaSource_test.cpp +++ b/media/libstagefright/tests/SurfaceMediaSource_test.cpp @@ -58,7 +58,7 @@ protected: } virtual void SetUp() { - LOGV("GLTest::SetUp()"); + ALOGV("GLTest::SetUp()"); mEglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY); ASSERT_EQ(EGL_SUCCESS, eglGetError()); ASSERT_NE(EGL_NO_DISPLAY, mEglDisplay); @@ -106,7 +106,7 @@ protected: mEglSurface = eglCreateWindowSurface(mEglDisplay, mGlConfig, window.get(), NULL); } else { - LOGV("No actual display. Choosing EGLSurface based on SurfaceMediaSource"); + ALOGV("No actual display. Choosing EGLSurface based on SurfaceMediaSource"); sp sms = new SurfaceMediaSource( getSurfaceWidth(), getSurfaceHeight()); sp stc = new SurfaceTextureClient(sms); @@ -162,7 +162,7 @@ protected: } virtual EGLint const* getConfigAttribs() { - LOGV("GLTest getConfigAttribs"); + ALOGV("GLTest getConfigAttribs"); static EGLint sDefaultConfigAttribs[] = { EGL_SURFACE_TYPE, EGL_PBUFFER_BIT, EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, @@ -392,7 +392,7 @@ public: protected: virtual void SetUp() { - LOGV("SMS-GLTest::SetUp()"); + ALOGV("SMS-GLTest::SetUp()"); android::ProcessState::self()->startThreadPool(); mSMS = new SurfaceMediaSource(mYuvTexWidth, mYuvTexHeight); mSTC = new SurfaceTextureClient(mSMS); @@ -423,7 +423,7 @@ protected: // Methods in SurfaceMediaSourceGLTest ///////////////////////////////////////////////////////////////////// EGLint const* SurfaceMediaSourceGLTest::getConfigAttribs() { - LOGV("SurfaceMediaSourceGLTest getConfigAttribs"); + ALOGV("SurfaceMediaSourceGLTest getConfigAttribs"); static EGLint sDefaultConfigAttribs[] = { EGL_SURFACE_TYPE, EGL_WINDOW_BIT, EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, @@ -474,7 +474,7 @@ sp SurfaceMediaSourceGLTest::setUpMediaRecorder(int fd, int video mr->setVideoSize(width, height); mr->setVideoFrameRate(fps); mr->prepare(); - LOGV("Starting MediaRecorder..."); + ALOGV("Starting MediaRecorder..."); CHECK_EQ(OK, mr->start()); return mr; } @@ -624,8 +624,8 @@ struct SimpleDummyRecorder { // Dummy Encoder static int testId = 1; TEST_F(SurfaceMediaSourceTest, DISABLED_DummyEncodingFromCpuFilledYV12BufferNpotOneBufferPass) { - LOGV("Test # %d", testId++); - LOGV("Testing OneBufferPass ******************************"); + ALOGV("Test # %d", testId++); + ALOGV("Testing OneBufferPass ******************************"); ASSERT_EQ(NO_ERROR, native_window_set_buffers_format(mANW.get(), HAL_PIXEL_FORMAT_YV12)); @@ -635,8 +635,8 @@ TEST_F(SurfaceMediaSourceTest, DISABLED_DummyEncodingFromCpuFilledYV12BufferNpot // Pass the buffer with the wrong height and weight and should not be accepted // Dummy Encoder TEST_F(SurfaceMediaSourceTest, DISABLED_DummyEncodingFromCpuFilledYV12BufferNpotWrongSizeBufferPass) { - LOGV("Test # %d", testId++); - LOGV("Testing Wrong size BufferPass ******************************"); + ALOGV("Test # %d", testId++); + ALOGV("Testing Wrong size BufferPass ******************************"); // setting the client side buffer size different than the server size ASSERT_EQ(NO_ERROR, native_window_set_buffers_dimensions(mANW.get(), @@ -653,8 +653,8 @@ TEST_F(SurfaceMediaSourceTest, DISABLED_DummyEncodingFromCpuFilledYV12BufferNpot // pass multiple buffers from the native_window the SurfaceMediaSource // Dummy Encoder TEST_F(SurfaceMediaSourceTest, DISABLED_DummyEncodingFromCpuFilledYV12BufferNpotMultiBufferPass) { - LOGV("Test # %d", testId++); - LOGV("Testing MultiBufferPass, Dummy Recorder *********************"); + ALOGV("Test # %d", testId++); + ALOGV("Testing MultiBufferPass, Dummy Recorder *********************"); ASSERT_EQ(NO_ERROR, native_window_set_buffers_format(mANW.get(), HAL_PIXEL_FORMAT_YV12)); @@ -675,8 +675,8 @@ TEST_F(SurfaceMediaSourceTest, DISABLED_DummyEncodingFromCpuFilledYV12BufferNpo // Delayed pass of multiple buffers from the native_window the SurfaceMediaSource // Dummy Encoder TEST_F(SurfaceMediaSourceTest, DISABLED_DummyLagEncodingFromCpuFilledYV12BufferNpotMultiBufferPass) { - LOGV("Test # %d", testId++); - LOGV("Testing MultiBufferPass, Dummy Recorder Lagging **************"); + ALOGV("Test # %d", testId++); + ALOGV("Testing MultiBufferPass, Dummy Recorder Lagging **************"); ASSERT_EQ(NO_ERROR, native_window_set_buffers_format(mANW.get(), HAL_PIXEL_FORMAT_YV12)); @@ -700,8 +700,8 @@ TEST_F(SurfaceMediaSourceTest, DISABLED_DummyLagEncodingFromCpuFilledYV12Buffer // pass multiple buffers from the native_window the SurfaceMediaSource // A dummy writer (MULTITHREADED) is used to simulate actual MPEG4Writer TEST_F(SurfaceMediaSourceTest, DISABLED_DummyThreadedEncodingFromCpuFilledYV12BufferNpotMultiBufferPass) { - LOGV("Test # %d", testId++); - LOGV("Testing MultiBufferPass, Dummy Recorder Multi-Threaded **********"); + ALOGV("Test # %d", testId++); + ALOGV("Testing MultiBufferPass, Dummy Recorder Multi-Threaded **********"); ASSERT_EQ(NO_ERROR, native_window_set_buffers_format(mANW.get(), HAL_PIXEL_FORMAT_YV12)); @@ -724,9 +724,9 @@ TEST_F(SurfaceMediaSourceTest, DISABLED_DummyThreadedEncodingFromCpuFilledYV12Bu // Very close to the actual camera, except that the // buffers are filled and queueud by the CPU instead of GL. TEST_F(SurfaceMediaSourceTest, DISABLED_EncodingFromCpuYV12BufferNpotWriteMediaServer) { - LOGV("Test # %d", testId++); - LOGV("************** Testing the whole pipeline with actual MediaRecorder ***********"); - LOGV("************** SurfaceMediaSource is same process as mediaserver ***********"); + ALOGV("Test # %d", testId++); + ALOGV("************** Testing the whole pipeline with actual MediaRecorder ***********"); + ALOGV("************** SurfaceMediaSource is same process as mediaserver ***********"); const char *fileName = "/sdcard/outputSurfEncMSource.mp4"; int fd = open(fileName, O_RDWR | O_CREAT, 0744); @@ -752,11 +752,11 @@ TEST_F(SurfaceMediaSourceTest, DISABLED_EncodingFromCpuYV12BufferNpotWriteMediaS while (nFramesCount <= 300) { oneBufferPassNoFill(mYuvTexWidth, mYuvTexHeight); nFramesCount++; - LOGV("framesCount = %d", nFramesCount); + ALOGV("framesCount = %d", nFramesCount); } ASSERT_EQ(NO_ERROR, native_window_api_disconnect(mANW.get(), NATIVE_WINDOW_API_CPU)); - LOGV("Stopping MediaRecorder..."); + ALOGV("Stopping MediaRecorder..."); CHECK_EQ(OK, mr->stop()); mr.clear(); close(fd); @@ -769,8 +769,8 @@ TEST_F(SurfaceMediaSourceTest, DISABLED_EncodingFromCpuYV12BufferNpotWriteMediaS // Test to examine whether we can choose the Recordable Android GLConfig // DummyRecorder used- no real encoding here TEST_F(SurfaceMediaSourceGLTest, ChooseAndroidRecordableEGLConfigDummyWriter) { - LOGV("Test # %d", testId++); - LOGV("Verify creating a surface w/ right config + dummy writer*********"); + ALOGV("Test # %d", testId++); + ALOGV("Verify creating a surface w/ right config + dummy writer*********"); mSMS = new SurfaceMediaSource(mYuvTexWidth, mYuvTexHeight); mSTC = new SurfaceTextureClient(mSMS); @@ -792,7 +792,7 @@ TEST_F(SurfaceMediaSourceGLTest, ChooseAndroidRecordableEGLConfigDummyWriter) { while (nFramesCount <= 300) { oneBufferPassGL(); nFramesCount++; - LOGV("framesCount = %d", nFramesCount); + ALOGV("framesCount = %d", nFramesCount); } EXPECT_TRUE(eglMakeCurrent(mEglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, @@ -806,8 +806,8 @@ TEST_F(SurfaceMediaSourceGLTest, ChooseAndroidRecordableEGLConfigDummyWriter) { // Test to examine whether we can render GL buffers in to the surface // created with the native window handle TEST_F(SurfaceMediaSourceGLTest, RenderingToRecordableEGLSurfaceWorks) { - LOGV("Test # %d", testId++); - LOGV("RenderingToRecordableEGLSurfaceWorks *********************"); + ALOGV("Test # %d", testId++); + ALOGV("RenderingToRecordableEGLSurfaceWorks *********************"); // Do the producer side of things glClearColor(0.6, 0.6, 0.6, 0.6); glClear(GL_COLOR_BUFFER_BIT); @@ -852,9 +852,9 @@ TEST_F(SurfaceMediaSourceGLTest, RenderingToRecordableEGLSurfaceWorks) { // Actual encoder, Actual GL Buffers Filled SurfaceMediaSource // The same pattern is rendered every frame TEST_F(SurfaceMediaSourceGLTest, EncodingFromGLRgbaSameImageEachBufNpotWrite) { - LOGV("Test # %d", testId++); - LOGV("************** Testing the whole pipeline with actual Recorder ***********"); - LOGV("************** GL Filling the buffers ***********"); + ALOGV("Test # %d", testId++); + ALOGV("************** Testing the whole pipeline with actual Recorder ***********"); + ALOGV("************** GL Filling the buffers ***********"); // Note: No need to set the colorformat for the buffers. The colorformat is // in the GRAlloc buffers itself. @@ -876,7 +876,7 @@ TEST_F(SurfaceMediaSourceGLTest, EncodingFromGLRgbaSameImageEachBufNpotWrite) { while (nFramesCount <= 300) { oneBufferPassGL(); nFramesCount++; - LOGV("framesCount = %d", nFramesCount); + ALOGV("framesCount = %d", nFramesCount); } EXPECT_TRUE(eglMakeCurrent(mEglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, @@ -885,7 +885,7 @@ TEST_F(SurfaceMediaSourceGLTest, EncodingFromGLRgbaSameImageEachBufNpotWrite) { eglDestroySurface(mEglDisplay, mEglSurface); mEglSurface = EGL_NO_SURFACE; - LOGV("Stopping MediaRecorder..."); + ALOGV("Stopping MediaRecorder..."); CHECK_EQ(OK, mr->stop()); mr.clear(); close(fd); @@ -895,9 +895,9 @@ TEST_F(SurfaceMediaSourceGLTest, EncodingFromGLRgbaSameImageEachBufNpotWrite) { // Actual encoder, Actual GL Buffers Filled SurfaceMediaSource // A different pattern is rendered every frame TEST_F(SurfaceMediaSourceGLTest, EncodingFromGLRgbaDiffImageEachBufNpotWrite) { - LOGV("Test # %d", testId++); - LOGV("************** Testing the whole pipeline with actual Recorder ***********"); - LOGV("************** Diff GL Filling the buffers ***********"); + ALOGV("Test # %d", testId++); + ALOGV("************** Testing the whole pipeline with actual Recorder ***********"); + ALOGV("************** Diff GL Filling the buffers ***********"); // Note: No need to set the colorformat for the buffers. The colorformat is // in the GRAlloc buffers itself. @@ -919,7 +919,7 @@ TEST_F(SurfaceMediaSourceGLTest, EncodingFromGLRgbaDiffImageEachBufNpotWrite) { while (nFramesCount <= 300) { oneBufferPassGL(nFramesCount); nFramesCount++; - LOGV("framesCount = %d", nFramesCount); + ALOGV("framesCount = %d", nFramesCount); } EXPECT_TRUE(eglMakeCurrent(mEglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, @@ -928,7 +928,7 @@ TEST_F(SurfaceMediaSourceGLTest, EncodingFromGLRgbaDiffImageEachBufNpotWrite) { eglDestroySurface(mEglDisplay, mEglSurface); mEglSurface = EGL_NO_SURFACE; - LOGV("Stopping MediaRecorder..."); + ALOGV("Stopping MediaRecorder..."); CHECK_EQ(OK, mr->stop()); mr.clear(); close(fd); -- cgit v1.1