diff options
author | Steve Block <steveblock@google.com> | 2011-10-20 11:56:09 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2011-10-25 18:16:03 +0100 |
commit | 2703f23af496c13cfa39cc7e157fa12d1cb4c169 (patch) | |
tree | e6ef5f3d8965bcbb43ea303bf422b53be2e86cf5 /libvideoeditor/vss/stagefrightshells/src/VideoEditorVideoDecoder.cpp | |
parent | e20c2c1775349da6d4a5700f0c7faaa07d62f409 (diff) | |
download | frameworks_av-2703f23af496c13cfa39cc7e157fa12d1cb4c169.zip frameworks_av-2703f23af496c13cfa39cc7e157fa12d1cb4c169.tar.gz frameworks_av-2703f23af496c13cfa39cc7e157fa12d1cb4c169.tar.bz2 |
Rename LOGV(_IF) to ALOGV(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/#/c/143865
Bug: 5449033
Change-Id: I366680b6e614b8983d1def28cc2fdbfa98f39531
Diffstat (limited to 'libvideoeditor/vss/stagefrightshells/src/VideoEditorVideoDecoder.cpp')
-rwxr-xr-x | libvideoeditor/vss/stagefrightshells/src/VideoEditorVideoDecoder.cpp | 116 |
1 files changed, 58 insertions, 58 deletions
diff --git a/libvideoeditor/vss/stagefrightshells/src/VideoEditorVideoDecoder.cpp b/libvideoeditor/vss/stagefrightshells/src/VideoEditorVideoDecoder.cpp index 0d5ea64..6a9c2da 100755 --- a/libvideoeditor/vss/stagefrightshells/src/VideoEditorVideoDecoder.cpp +++ b/libvideoeditor/vss/stagefrightshells/src/VideoEditorVideoDecoder.cpp @@ -124,7 +124,7 @@ status_t VideoEditorVideoDecoderSource::stop() { // FIXME: // Why do we need to check on the ref count? int ref_count = mBuffer->refcount(); - LOGV("MediaBuffer refcount is %d",ref_count); + ALOGV("MediaBuffer refcount is %d",ref_count); for (int i = 0; i < ref_count; ++i) { mBuffer->release(); } @@ -642,13 +642,13 @@ void logSupportDecodersAndCapabilities(M4DECODER_VideoDecoders* decoders) { VideoProfileLevel *pProfileLevel = NULL; pDecoder = decoders->decoder; for (size_t i = 0; i< decoders->decoderNumber; i++) { - LOGV("Supported Codec[%d] :%d", i, pDecoder->codec); + ALOGV("Supported Codec[%d] :%d", i, pDecoder->codec); pOmxComponents = pDecoder->component; for(size_t j = 0; j < pDecoder->componentNumber; j++) { pProfileLevel = pOmxComponents->profileLevel; - LOGV("-->component %d", j); + ALOGV("-->component %d", j); for(size_t k = 0; k < pOmxComponents->profileNumber; k++) { - LOGV("-->profile:%ld maxLevel:%ld", pProfileLevel->mProfile, + ALOGV("-->profile:%ld maxLevel:%ld", pProfileLevel->mProfile, pProfileLevel->mLevel); pProfileLevel++; } @@ -691,17 +691,17 @@ M4OSA_ERR queryVideoDecoderCapabilities if (results.size()) { SAFE_MALLOC(pOmxComponents, VideoComponentCapabilities, results.size(), "VideoComponentCapabilities"); - LOGV("K=%d",k); + ALOGV("K=%d",k); pDecoder->component = pOmxComponents; pDecoder->componentNumber = results.size(); } for (size_t i = 0; i < results.size(); ++i) { - LOGV(" decoder '%s' supports ", + ALOGV(" decoder '%s' supports ", results[i].mComponentName.string()); if (results[i].mProfileLevels.size() == 0) { - LOGV("NOTHING.\n"); + ALOGV("NOTHING.\n"); continue; } @@ -710,7 +710,7 @@ M4OSA_ERR queryVideoDecoderCapabilities // We should ignore the software codecs and make IsSoftwareCodec() // part of pubic API from OMXCodec.cpp if (IsSoftwareCodec(results[i].mComponentName.string())) { - LOGV("Ignore software codec %s", results[i].mComponentName.string()); + ALOGV("Ignore software codec %s", results[i].mComponentName.string()); continue; } #endif @@ -744,7 +744,7 @@ M4OSA_ERR queryVideoDecoderCapabilities maxLevel = profileLevel.mLevel; pProfileLevel->mProfile = profile; pProfileLevel->mLevel = maxLevel; - LOGV("%d profile: %ld, max level: %ld", + ALOGV("%d profile: %ld, max level: %ld", __LINE__, pProfileLevel->mProfile, pProfileLevel->mLevel); } if (profileLevel.mProfile != profile) { @@ -754,12 +754,12 @@ M4OSA_ERR queryVideoDecoderCapabilities pProfileLevel++; pProfileLevel->mProfile = profile; pProfileLevel->mLevel = maxLevel; - LOGV("%d profile: %ld, max level: %ld", + ALOGV("%d profile: %ld, max level: %ld", __LINE__, pProfileLevel->mProfile, pProfileLevel->mLevel); } else if (profileLevel.mLevel > maxLevel) { maxLevel = profileLevel.mLevel; pProfileLevel->mLevel = maxLevel; - LOGV("%d profile: %ld, max level: %ld", + ALOGV("%d profile: %ld, max level: %ld", __LINE__, pProfileLevel->mProfile, pProfileLevel->mLevel); } @@ -798,7 +798,7 @@ M4OSA_ERR VideoEditorVideoDecoder_configureFromMetadata(M4OSA_Context pContext, VIDEOEDITOR_CHECK(M4OSA_NULL != pContext, M4ERR_PARAMETER); VIDEOEDITOR_CHECK(M4OSA_NULL != meta, M4ERR_PARAMETER); - LOGV("VideoEditorVideoDecoder_configureFromMetadata begin"); + ALOGV("VideoEditorVideoDecoder_configureFromMetadata begin"); pDecShellContext = (VideoEditorVideoDecoder_Context*)pContext; @@ -807,7 +807,7 @@ M4OSA_ERR VideoEditorVideoDecoder_configureFromMetadata(M4OSA_Context pContext, success = meta->findInt32(kKeyHeight, &vHeight); VIDEOEDITOR_CHECK(TRUE == success, M4ERR_PARAMETER); - LOGV("vWidth = %d, vHeight = %d", vWidth, vHeight); + ALOGV("vWidth = %d, vHeight = %d", vWidth, vHeight); pDecShellContext->mGivenWidth = vWidth; pDecShellContext->mGivenHeight = vHeight; @@ -819,9 +819,9 @@ M4OSA_ERR VideoEditorVideoDecoder_configureFromMetadata(M4OSA_Context pContext, cropRight = vWidth - 1; cropBottom = vHeight - 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); } @@ -833,7 +833,7 @@ M4OSA_ERR VideoEditorVideoDecoder_configureFromMetadata(M4OSA_Context pContext, width = cropRight - cropLeft + 1; height = cropBottom - cropTop + 1; - LOGV("VideoDecoder_configureFromMetadata : W=%d H=%d", width, height); + ALOGV("VideoDecoder_configureFromMetadata : W=%d H=%d", width, height); VIDEOEDITOR_CHECK((0 != width) && (0 != height), M4ERR_PARAMETER); if( (M4OSA_NULL != pDecShellContext->m_pDecBufferPool) && @@ -844,7 +844,7 @@ M4OSA_ERR VideoEditorVideoDecoder_configureFromMetadata(M4OSA_Context pContext, // No need to reconfigure goto cleanUp; } - LOGV("VideoDecoder_configureFromMetadata reset: W=%d H=%d", width, height); + ALOGV("VideoDecoder_configureFromMetadata reset: W=%d H=%d", width, height); // Update the stream handler parameters pDecShellContext->m_pVideoStreamhandler->m_videoWidth = width; pDecShellContext->m_pVideoStreamhandler->m_videoHeight = height; @@ -852,7 +852,7 @@ M4OSA_ERR VideoEditorVideoDecoder_configureFromMetadata(M4OSA_Context pContext, // Configure the buffer pool if( M4OSA_NULL != pDecShellContext->m_pDecBufferPool ) { - LOGV("VideoDecoder_configureFromMetadata : reset the buffer pool"); + ALOGV("VideoDecoder_configureFromMetadata : reset the buffer pool"); VIDEOEDITOR_BUFFER_freePool(pDecShellContext->m_pDecBufferPool); pDecShellContext->m_pDecBufferPool = M4OSA_NULL; } @@ -866,15 +866,15 @@ M4OSA_ERR VideoEditorVideoDecoder_configureFromMetadata(M4OSA_Context pContext, cleanUp: if( M4NO_ERROR == err ) { - LOGV("VideoEditorVideoDecoder_configureFromMetadata no error"); + ALOGV("VideoEditorVideoDecoder_configureFromMetadata no error"); } else { if( M4OSA_NULL != pDecShellContext->m_pDecBufferPool ) { VIDEOEDITOR_BUFFER_freePool(pDecShellContext->m_pDecBufferPool); pDecShellContext->m_pDecBufferPool = M4OSA_NULL; } - LOGV("VideoEditorVideoDecoder_configureFromMetadata ERROR 0x%X", err); + ALOGV("VideoEditorVideoDecoder_configureFromMetadata ERROR 0x%X", err); } - LOGV("VideoEditorVideoDecoder_configureFromMetadata end"); + ALOGV("VideoEditorVideoDecoder_configureFromMetadata end"); return err; } @@ -884,7 +884,7 @@ M4OSA_ERR VideoEditorVideoDecoder_destroy(M4OSA_Context pContext) { (VideoEditorVideoDecoder_Context*)pContext; // Input parameters check - LOGV("VideoEditorVideoDecoder_destroy begin"); + ALOGV("VideoEditorVideoDecoder_destroy begin"); VIDEOEDITOR_CHECK(M4OSA_NULL != pContext, M4ERR_PARAMETER); // Release the color converter @@ -892,7 +892,7 @@ M4OSA_ERR VideoEditorVideoDecoder_destroy(M4OSA_Context pContext) { // Destroy the graph if( pDecShellContext->mVideoDecoder != NULL ) { - LOGV("### VideoEditorVideoDecoder_destroy : releasing decoder"); + ALOGV("### VideoEditorVideoDecoder_destroy : releasing decoder"); pDecShellContext->mVideoDecoder->stop(); pDecShellContext->mVideoDecoder.clear(); } @@ -909,11 +909,11 @@ M4OSA_ERR VideoEditorVideoDecoder_destroy(M4OSA_Context pContext) { cleanUp: if( M4NO_ERROR == err ) { - LOGV("VideoEditorVideoDecoder_destroy no error"); + ALOGV("VideoEditorVideoDecoder_destroy no error"); } else { - LOGV("VideoEditorVideoDecoder_destroy ERROR 0x%X", err); + ALOGV("VideoEditorVideoDecoder_destroy ERROR 0x%X", err); } - LOGV("VideoEditorVideoDecoder_destroy end"); + ALOGV("VideoEditorVideoDecoder_destroy end"); return err; } @@ -931,7 +931,7 @@ M4OSA_ERR VideoEditorVideoDecoder_create(M4OSA_Context *pContext, sp<MetaData> decoderMetadata = NULL; int decoderOutput = OMX_COLOR_FormatYUV420Planar; - LOGV("VideoEditorVideoDecoder_create begin"); + ALOGV("VideoEditorVideoDecoder_create begin"); // Input parameters check VIDEOEDITOR_CHECK(M4OSA_NULL != pContext, M4ERR_PARAMETER); VIDEOEDITOR_CHECK(M4OSA_NULL != pStreamHandler, M4ERR_PARAMETER); @@ -1070,13 +1070,13 @@ M4OSA_ERR VideoEditorVideoDecoder_create(M4OSA_Context *pContext, cleanUp: if( M4NO_ERROR == err ) { - LOGV("VideoEditorVideoDecoder_create no error"); + ALOGV("VideoEditorVideoDecoder_create no error"); } else { VideoEditorVideoDecoder_destroy(pDecShellContext); *pContext = M4OSA_NULL; - LOGV("VideoEditorVideoDecoder_create ERROR 0x%X", err); + ALOGV("VideoEditorVideoDecoder_create ERROR 0x%X", err); } - LOGV("VideoEditorVideoDecoder_create : DONE"); + ALOGV("VideoEditorVideoDecoder_create : DONE"); return err; } @@ -1093,7 +1093,7 @@ M4OSA_ERR VideoEditorVideoSoftwareDecoder_create(M4OSA_Context *pContext, M4OSA_UInt32 size = 0; sp<MetaData> decoderMetadata = NULL; - LOGV("VideoEditorVideoDecoder_create begin"); + ALOGV("VideoEditorVideoDecoder_create begin"); // Input parameters check VIDEOEDITOR_CHECK(M4OSA_NULL != pContext, M4ERR_PARAMETER); VIDEOEDITOR_CHECK(M4OSA_NULL != pStreamHandler, M4ERR_PARAMETER); @@ -1219,13 +1219,13 @@ M4OSA_ERR VideoEditorVideoSoftwareDecoder_create(M4OSA_Context *pContext, cleanUp: if( M4NO_ERROR == err ) { - LOGV("VideoEditorVideoDecoder_create no error"); + ALOGV("VideoEditorVideoDecoder_create no error"); } else { VideoEditorVideoDecoder_destroy(pDecShellContext); *pContext = M4OSA_NULL; - LOGV("VideoEditorVideoDecoder_create ERROR 0x%X", err); + ALOGV("VideoEditorVideoDecoder_create ERROR 0x%X", err); } - LOGV("VideoEditorVideoDecoder_create : DONE"); + ALOGV("VideoEditorVideoDecoder_create : DONE"); return err; } @@ -1242,7 +1242,7 @@ M4OSA_ERR VideoEditorVideoDecoder_getOption(M4OSA_Context context, M4DECODER_AVCProfileLevel* profile; M4DECODER_MPEG4_DecoderConfigInfo* pDecConfInfo; - LOGV("VideoEditorVideoDecoder_getOption begin"); + ALOGV("VideoEditorVideoDecoder_getOption begin"); switch (optionId) { case M4DECODER_kOptionID_AVCLastDecodedFrameCTS: @@ -1266,7 +1266,7 @@ M4OSA_ERR VideoEditorVideoDecoder_getOption(M4OSA_Context context, (int32_t*)(&pVideoSize->m_uiWidth)); pDecShellContext->mVideoDecoder->getFormat()->findInt32(kKeyHeight, (int32_t*)(&pVideoSize->m_uiHeight)); - LOGV("VideoEditorVideoDecoder_getOption : W=%d H=%d", + ALOGV("VideoEditorVideoDecoder_getOption : W=%d H=%d", pVideoSize->m_uiWidth, pVideoSize->m_uiHeight); break; @@ -1289,7 +1289,7 @@ M4OSA_ERR VideoEditorVideoDecoder_getOption(M4OSA_Context context, } - LOGV("VideoEditorVideoDecoder_getOption: end with err = 0x%x", lerr); + ALOGV("VideoEditorVideoDecoder_getOption: end with err = 0x%x", lerr); return lerr; } @@ -1299,7 +1299,7 @@ M4OSA_ERR VideoEditorVideoDecoder_setOption(M4OSA_Context context, VideoEditorVideoDecoder_Context *pDecShellContext = (VideoEditorVideoDecoder_Context*) context; - LOGV("VideoEditorVideoDecoder_setOption begin"); + ALOGV("VideoEditorVideoDecoder_setOption begin"); switch (optionId) { case M4DECODER_kOptionID_OutputFilter: { @@ -1319,7 +1319,7 @@ M4OSA_ERR VideoEditorVideoDecoder_setOption(M4OSA_Context context, break; } - LOGV("VideoEditorVideoDecoder_setOption: end with err = 0x%x", lerr); + ALOGV("VideoEditorVideoDecoder_setOption: end with err = 0x%x", lerr); return lerr; } @@ -1334,21 +1334,21 @@ M4OSA_ERR VideoEditorVideoDecoder_decode(M4OSA_Context context, status_t errStatus; bool needSeek = bJump; - LOGV("VideoEditorVideoDecoder_decode begin"); + ALOGV("VideoEditorVideoDecoder_decode begin"); if( M4OSA_TRUE == pDecShellContext->mReachedEOS ) { // Do not call read(), it could lead to a freeze - LOGV("VideoEditorVideoDecoder_decode : EOS already reached"); + ALOGV("VideoEditorVideoDecoder_decode : EOS already reached"); lerr = M4WAR_NO_MORE_AU; goto VIDEOEDITOR_VideoDecode_cleanUP; } if(pDecShellContext->m_lastDecodedCTS >= *pTime) { - LOGV("VideoDecoder_decode: Already decoded up to this time CTS = %lf.", + ALOGV("VideoDecoder_decode: Already decoded up to this time CTS = %lf.", pDecShellContext->m_lastDecodedCTS); goto VIDEOEDITOR_VideoDecode_cleanUP; } if(M4OSA_TRUE == bJump) { - LOGV("VideoEditorVideoDecoder_decode: Jump called"); + ALOGV("VideoEditorVideoDecoder_decode: Jump called"); pDecShellContext->m_lastDecodedCTS = -1; pDecShellContext->m_lastRenderCts = -1; } @@ -1360,7 +1360,7 @@ M4OSA_ERR VideoEditorVideoDecoder_decode(M4OSA_Context context, pDecShellContext->mLastInputCts = *pTime; while (pDecoderBuffer == NULL || pDecShellContext->m_lastDecodedCTS + tolerance < *pTime) { - LOGV("VideoEditorVideoDecoder_decode, frameCTS = %lf, DecodeUpTo = %lf", + ALOGV("VideoEditorVideoDecoder_decode, frameCTS = %lf, DecodeUpTo = %lf", pDecShellContext->m_lastDecodedCTS, *pTime); // Read the buffer from the stagefright decoder @@ -1376,7 +1376,7 @@ M4OSA_ERR VideoEditorVideoDecoder_decode(M4OSA_Context context, // Handle EOS and format change if (errStatus == ERROR_END_OF_STREAM) { - LOGV("End of stream reached, returning M4WAR_NO_MORE_AU "); + ALOGV("End of stream reached, returning M4WAR_NO_MORE_AU "); pDecShellContext->mReachedEOS = M4OSA_TRUE; lerr = M4WAR_NO_MORE_AU; // If we decoded a buffer before EOS, we still need to put it @@ -1386,12 +1386,12 @@ M4OSA_ERR VideoEditorVideoDecoder_decode(M4OSA_Context context, } goto VIDEOEDITOR_VideoDecode_cleanUP; } else if (INFO_FORMAT_CHANGED == errStatus) { - LOGV("VideoDecoder_decode : source returns INFO_FORMAT_CHANGED"); + ALOGV("VideoDecoder_decode : source returns INFO_FORMAT_CHANGED"); lerr = VideoEditorVideoDecoder_configureFromMetadata( pDecShellContext, pDecShellContext->mVideoDecoder->getFormat().get()); if( M4NO_ERROR != lerr ) { - LOGV("!!! VideoEditorVideoDecoder_decode ERROR : " + ALOGV("!!! VideoEditorVideoDecoder_decode ERROR : " "VideoDecoder_configureFromMetadata returns 0x%X", lerr); break; } @@ -1415,7 +1415,7 @@ M4OSA_ERR VideoEditorVideoDecoder_decode(M4OSA_Context context, // Record the timestamp of last decoded buffer pDecoderBuffer->meta_data()->findInt64(kKeyTime, &lFrameTime); pDecShellContext->m_lastDecodedCTS = (M4_MediaTime)(lFrameTime/1000); - LOGV("VideoEditorVideoDecoder_decode,decoded frametime = %lf,size = %d", + ALOGV("VideoEditorVideoDecoder_decode,decoded frametime = %lf,size = %d", (M4_MediaTime)lFrameTime, pDecoderBuffer->size() ); // If bJump is false, we need to save every decoded buffer @@ -1448,7 +1448,7 @@ VIDEOEDITOR_VideoDecode_cleanUP: pDecoderBuffer = NULL; } - LOGV("VideoEditorVideoDecoder_decode: end with 0x%x", lerr); + ALOGV("VideoEditorVideoDecoder_decode: end with 0x%x", lerr); return lerr; } @@ -1561,7 +1561,7 @@ M4OSA_ERR VideoEditorVideoDecoder_render(M4OSA_Context context, M4_MediaTime candidateTimeStamp = -1; M4OSA_Bool bFound = M4OSA_FALSE; - LOGV("VideoEditorVideoDecoder_render begin"); + ALOGV("VideoEditorVideoDecoder_render begin"); // Input parameters check VIDEOEDITOR_CHECK(M4OSA_NULL != context, M4ERR_PARAMETER); VIDEOEDITOR_CHECK(M4OSA_NULL != pTime, M4ERR_PARAMETER); @@ -1570,11 +1570,11 @@ M4OSA_ERR VideoEditorVideoDecoder_render(M4OSA_Context context, // The output buffer is already allocated, just copy the data if ( (*pTime <= pDecShellContext->m_lastRenderCts) && (M4OSA_FALSE == bForceRender) ) { - LOGV("VIDEOEDITOR_VIDEO_render Frame in the past"); + ALOGV("VIDEOEDITOR_VIDEO_render Frame in the past"); err = M4WAR_VIDEORENDERER_NO_NEW_FRAME; goto cleanUp; } - LOGV("VideoDecoder_render: lastRendered time = %lf,requested render time = " + ALOGV("VideoDecoder_render: lastRendered time = %lf,requested render time = " "%lf", pDecShellContext->m_lastRenderCts, *pTime); /** @@ -1597,7 +1597,7 @@ M4OSA_ERR VideoEditorVideoDecoder_render(M4OSA_Context context, bFound = M4OSA_TRUE; pRenderVIDEOEDITORBuffer = pTmpVIDEOEDITORBuffer; candidateTimeStamp = pTmpVIDEOEDITORBuffer->buffCTS; - LOGV("VideoDecoder_render: found a buffer with timestamp = %lf", + ALOGV("VideoDecoder_render: found a buffer with timestamp = %lf", candidateTimeStamp); } } @@ -1607,7 +1607,7 @@ M4OSA_ERR VideoEditorVideoDecoder_render(M4OSA_Context context, goto cleanUp; } - LOGV("VideoEditorVideoDecoder_render 3 ouput %d %d %d %d", + ALOGV("VideoEditorVideoDecoder_render 3 ouput %d %d %d %d", pOutputPlane[0].u_width, pOutputPlane[0].u_height, pOutputPlane[0].u_topleft, pOutputPlane[0].u_stride); @@ -1637,7 +1637,7 @@ M4OSA_ERR VideoEditorVideoDecoder_render(M4OSA_Context context, tmpPlane[2].pac_data = tmpPlane[1].pac_data + (tmpPlane[1].u_stride * tmpPlane[1].u_height); - LOGV("VideoEditorVideoDecoder_render w = %d H = %d", + ALOGV("VideoEditorVideoDecoder_render w = %d H = %d", tmpPlane[0].u_width,tmpPlane[0].u_height); pDecShellContext->m_pFilter(M4OSA_NULL, &tmpPlane[0], pOutputPlane); } else { @@ -1668,11 +1668,11 @@ M4OSA_ERR VideoEditorVideoDecoder_render(M4OSA_Context context, cleanUp: if( M4NO_ERROR == err ) { *pTime = pDecShellContext->m_lastRenderCts; - LOGV("VideoEditorVideoDecoder_render no error"); + ALOGV("VideoEditorVideoDecoder_render no error"); } else { - LOGV("VideoEditorVideoDecoder_render ERROR 0x%X", err); + ALOGV("VideoEditorVideoDecoder_render ERROR 0x%X", err); } - LOGV("VideoEditorVideoDecoder_render end"); + ALOGV("VideoEditorVideoDecoder_render end"); return err; } |