diff options
Diffstat (limited to 'media')
105 files changed, 1867 insertions, 1867 deletions
diff --git a/media/libeffects/factory/EffectsFactory.c b/media/libeffects/factory/EffectsFactory.c index d333510..ee2279a 100644 --- a/media/libeffects/factory/EffectsFactory.c +++ b/media/libeffects/factory/EffectsFactory.c @@ -188,7 +188,7 @@ int EffectQueryNumberEffects(uint32_t *pNumEffects) *pNumEffects = gNumEffects; gCanQueryEffect = 1; pthread_mutex_unlock(&gLibLock); - LOGV("EffectQueryNumberEffects(): %d", *pNumEffects); + ALOGV("EffectQueryNumberEffects(): %d", *pNumEffects); return ret; } @@ -230,7 +230,7 @@ int EffectQueryEffect(uint32_t index, effect_descriptor_t *pDescriptor) #if (LOG_NDEBUG == 0) char str[256]; dumpEffectDescriptor(pDescriptor, str, 256); - LOGV("EffectQueryEffect() desc:%s", str); + ALOGV("EffectQueryEffect() desc:%s", str); #endif pthread_mutex_unlock(&gLibLock); return ret; @@ -271,7 +271,7 @@ int EffectCreate(effect_uuid_t *uuid, int32_t sessionId, int32_t ioId, effect_ha return -EINVAL; } - LOGV("EffectCreate() UUID: %08X-%04X-%04X-%04X-%02X%02X%02X%02X%02X%02X\n", + ALOGV("EffectCreate() UUID: %08X-%04X-%04X-%04X-%02X%02X%02X%02X%02X%02X\n", uuid->timeLow, uuid->timeMid, uuid->timeHiAndVersion, uuid->clockSeq, uuid->node[0], uuid->node[1],uuid->node[2], uuid->node[3],uuid->node[4],uuid->node[5]); @@ -302,10 +302,10 @@ int EffectCreate(effect_uuid_t *uuid, int32_t sessionId, int32_t ioId, effect_ha fx->subItfe = itfe; if ((*itfe)->process_reverse != NULL) { fx->itfe = (struct effect_interface_s *)&gInterfaceWithReverse; - LOGV("EffectCreate() gInterfaceWithReverse"); + ALOGV("EffectCreate() gInterfaceWithReverse"); } else { fx->itfe = (struct effect_interface_s *)&gInterface; - LOGV("EffectCreate() gInterface"); + ALOGV("EffectCreate() gInterface"); } fx->lib = l; @@ -316,7 +316,7 @@ int EffectCreate(effect_uuid_t *uuid, int32_t sessionId, int32_t ioId, effect_ha *pHandle = (effect_handle_t)fx; - LOGV("EffectCreate() created entry %p with sub itfe %p in library %s", *pHandle, itfe, l->name); + ALOGV("EffectCreate() created entry %p with sub itfe %p in library %s", *pHandle, itfe, l->name); exit: pthread_mutex_unlock(&gLibLock); @@ -401,7 +401,7 @@ int init() { updateNumEffects(); gInitDone = 1; - LOGV("init() done"); + ALOGV("init() done"); return 0; } @@ -492,7 +492,7 @@ int loadLibrary(cnode *root, const char *name) e->next = gLibraryList; gLibraryList = e; pthread_mutex_unlock(&gLibLock); - LOGV("getLibrary() linked library %p for path %s", l, node->value); + ALOGV("getLibrary() linked library %p for path %s", l, node->value); return 0; @@ -558,7 +558,7 @@ int loadEffect(cnode *root) #if (LOG_NDEBUG==0) char s[256]; dumpEffectDescriptor(d, s, 256); - LOGV("loadEffect() read descriptor %p:%s",d, s); + ALOGV("loadEffect() read descriptor %p:%s",d, s); #endif if (EFFECT_API_VERSION_MAJOR(d->apiVersion) != EFFECT_API_VERSION_MAJOR(EFFECT_CONTROL_API_VERSION)) { @@ -657,10 +657,10 @@ int findEffect(effect_uuid_t *type, e = e->next; } if (!found) { - LOGV("findEffect() effect not found"); + ALOGV("findEffect() effect not found"); ret = -ENOENT; } else { - LOGV("findEffect() found effect: %s in lib %s", d->name, l->name); + ALOGV("findEffect() found effect: %s in lib %s", d->name, l->name); *lib = l; if (desc) { *desc = d; diff --git a/media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp b/media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp index 5a1e93a..62be78c 100644 --- a/media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp +++ b/media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp @@ -32,19 +32,19 @@ extern "C" const struct effect_interface_s gLvmEffectInterface; #define LVM_ERROR_CHECK(LvmStatus, callingFunc, calledFunc){\ if (LvmStatus == LVM_NULLADDRESS){\ - LOGV("\tLVM_ERROR : Parameter error - "\ + ALOGV("\tLVM_ERROR : Parameter error - "\ "null pointer returned by %s in %s\n\n\n\n", callingFunc, calledFunc);\ }\ if (LvmStatus == LVM_ALIGNMENTERROR){\ - LOGV("\tLVM_ERROR : Parameter error - "\ + ALOGV("\tLVM_ERROR : Parameter error - "\ "bad alignment returned by %s in %s\n\n\n\n", callingFunc, calledFunc);\ }\ if (LvmStatus == LVM_INVALIDNUMSAMPLES){\ - LOGV("\tLVM_ERROR : Parameter error - "\ + ALOGV("\tLVM_ERROR : Parameter error - "\ "bad number of samples returned by %s in %s\n\n\n\n", callingFunc, calledFunc);\ }\ if (LvmStatus == LVM_OUTOFRANGE){\ - LOGV("\tLVM_ERROR : Parameter error - "\ + ALOGV("\tLVM_ERROR : Parameter error - "\ "out of range returned by %s in %s\n", callingFunc, calledFunc);\ }\ } @@ -71,7 +71,7 @@ int SessionIndex[LVM_MAX_SESSIONS]; /* local functions */ #define CHECK_ARG(cond) { \ if (!(cond)) { \ - LOGV("\tLVM_ERROR : Invalid argument: "#cond); \ + ALOGV("\tLVM_ERROR : Invalid argument: "#cond); \ return -EINVAL; \ } \ } @@ -158,39 +158,39 @@ int Effect_setEnabled(EffectContext *pContext, bool enabled); /* Effect Library Interface Implementation */ extern "C" int EffectQueryNumberEffects(uint32_t *pNumEffects){ - LOGV("\n\tEffectQueryNumberEffects start"); + ALOGV("\n\tEffectQueryNumberEffects start"); *pNumEffects = 4; - LOGV("\tEffectQueryNumberEffects creating %d effects", *pNumEffects); - LOGV("\tEffectQueryNumberEffects end\n"); + ALOGV("\tEffectQueryNumberEffects creating %d effects", *pNumEffects); + ALOGV("\tEffectQueryNumberEffects end\n"); return 0; } /* end EffectQueryNumberEffects */ extern "C" int EffectQueryEffect(uint32_t index, effect_descriptor_t *pDescriptor){ - LOGV("\n\tEffectQueryEffect start"); - LOGV("\tEffectQueryEffect processing index %d", index); + ALOGV("\n\tEffectQueryEffect start"); + ALOGV("\tEffectQueryEffect processing index %d", index); if (pDescriptor == NULL){ - LOGV("\tLVM_ERROR : EffectQueryEffect was passed NULL pointer"); + ALOGV("\tLVM_ERROR : EffectQueryEffect was passed NULL pointer"); return -EINVAL; } if (index > 3){ - LOGV("\tLVM_ERROR : EffectQueryEffect index out of range %d", index); + ALOGV("\tLVM_ERROR : EffectQueryEffect index out of range %d", index); return -ENOENT; } if(index == LVM_BASS_BOOST){ - LOGV("\tEffectQueryEffect processing LVM_BASS_BOOST"); + ALOGV("\tEffectQueryEffect processing LVM_BASS_BOOST"); memcpy(pDescriptor, &gBassBoostDescriptor, sizeof(effect_descriptor_t)); }else if(index == LVM_VIRTUALIZER){ - LOGV("\tEffectQueryEffect processing LVM_VIRTUALIZER"); + ALOGV("\tEffectQueryEffect processing LVM_VIRTUALIZER"); memcpy(pDescriptor, &gVirtualizerDescriptor, sizeof(effect_descriptor_t)); } else if(index == LVM_EQUALIZER){ - LOGV("\tEffectQueryEffect processing LVM_EQUALIZER"); + ALOGV("\tEffectQueryEffect processing LVM_EQUALIZER"); memcpy(pDescriptor, &gEqualizerDescriptor, sizeof(effect_descriptor_t)); } else if(index == LVM_VOLUME){ - LOGV("\tEffectQueryEffect processing LVM_VOLUME"); + ALOGV("\tEffectQueryEffect processing LVM_VOLUME"); memcpy(pDescriptor, &gVolumeDescriptor, sizeof(effect_descriptor_t)); } - LOGV("\tEffectQueryEffect end\n"); + ALOGV("\tEffectQueryEffect end\n"); return 0; } /* end EffectQueryEffect */ @@ -205,17 +205,17 @@ extern "C" int EffectCreate(effect_uuid_t *uuid, bool newBundle = false; SessionContext *pSessionContext; - LOGV("\n\tEffectCreate start session %d", sessionId); + ALOGV("\n\tEffectCreate start session %d", sessionId); if (pHandle == NULL || uuid == NULL){ - LOGV("\tLVM_ERROR : EffectCreate() called with NULL pointer"); + ALOGV("\tLVM_ERROR : EffectCreate() called with NULL pointer"); ret = -EINVAL; goto exit; } if(LvmInitFlag == LVM_FALSE){ LvmInitFlag = LVM_TRUE; - LOGV("\tEffectCreate - Initializing all global memory"); + ALOGV("\tEffectCreate - Initializing all global memory"); LvmGlobalBundle_init(); } @@ -224,13 +224,13 @@ extern "C" int EffectCreate(effect_uuid_t *uuid, if((SessionIndex[i] == LVM_UNUSED_SESSION)||(SessionIndex[i] == sessionId)){ sessionNo = i; SessionIndex[i] = sessionId; - LOGV("\tEffectCreate: Allocating SessionNo %d for SessionId %d\n", sessionNo,sessionId); + ALOGV("\tEffectCreate: Allocating SessionNo %d for SessionId %d\n", sessionNo,sessionId); break; } } if(i==LVM_MAX_SESSIONS){ - LOGV("\tLVM_ERROR : Cannot find memory to allocate for current session"); + ALOGV("\tLVM_ERROR : Cannot find memory to allocate for current session"); ret = -EINVAL; goto exit; } @@ -239,7 +239,7 @@ extern "C" int EffectCreate(effect_uuid_t *uuid, // If this is the first create in this session if(GlobalSessionMemory[sessionNo].bBundledEffectsEnabled == LVM_FALSE){ - LOGV("\tEffectCreate - This is the first effect in current sessionId %d sessionNo %d", + ALOGV("\tEffectCreate - This is the first effect in current sessionId %d sessionNo %d", sessionId, sessionNo); GlobalSessionMemory[sessionNo].bBundledEffectsEnabled = LVM_TRUE; @@ -265,7 +265,7 @@ extern "C" int EffectCreate(effect_uuid_t *uuid, snprintf(fileName, 256, "/data/tmp/bundle_%p_pcm_in.pcm", pContext->pBundledContext); pContext->pBundledContext->PcmInPtr = fopen(fileName, "w"); if (pContext->pBundledContext->PcmInPtr == NULL) { - LOGV("cannot open %s", fileName); + ALOGV("cannot open %s", fileName); ret = -EINVAL; goto exit; } @@ -273,7 +273,7 @@ extern "C" int EffectCreate(effect_uuid_t *uuid, snprintf(fileName, 256, "/data/tmp/bundle_%p_pcm_out.pcm", pContext->pBundledContext); pContext->pBundledContext->PcmOutPtr = fopen(fileName, "w"); if (pContext->pBundledContext->PcmOutPtr == NULL) { - LOGV("cannot open %s", fileName); + ALOGV("cannot open %s", fileName); fclose(pContext->pBundledContext->PcmInPtr); pContext->pBundledContext->PcmInPtr = NULL; ret = -EINVAL; @@ -298,28 +298,28 @@ extern "C" int EffectCreate(effect_uuid_t *uuid, pContext->pBundledContext->SamplesToExitCountBb = 0; pContext->pBundledContext->SamplesToExitCountEq = 0; - LOGV("\tEffectCreate - Calling LvmBundle_init"); + ALOGV("\tEffectCreate - Calling LvmBundle_init"); ret = LvmBundle_init(pContext); if (ret < 0){ - LOGV("\tLVM_ERROR : EffectCreate() Bundle init failed"); + ALOGV("\tLVM_ERROR : EffectCreate() Bundle init failed"); goto exit; } } else{ - LOGV("\tEffectCreate - Assigning memory for previously created effect on sessionNo %d", + ALOGV("\tEffectCreate - Assigning memory for previously created effect on sessionNo %d", sessionNo); pContext->pBundledContext = GlobalSessionMemory[sessionNo].pBundledContext; } - LOGV("\tEffectCreate - pBundledContext is %p", pContext->pBundledContext); + ALOGV("\tEffectCreate - pBundledContext is %p", pContext->pBundledContext); pSessionContext = &GlobalSessionMemory[pContext->pBundledContext->SessionNo]; // Create each Effect if (memcmp(uuid, &gBassBoostDescriptor.uuid, sizeof(effect_uuid_t)) == 0){ // Create Bass Boost - LOGV("\tEffectCreate - Effect to be created is LVM_BASS_BOOST"); + ALOGV("\tEffectCreate - Effect to be created is LVM_BASS_BOOST"); pSessionContext->bBassInstantiated = LVM_TRUE; pContext->pBundledContext->SamplesToExitCountBb = 0; @@ -327,7 +327,7 @@ extern "C" int EffectCreate(effect_uuid_t *uuid, pContext->EffectType = LVM_BASS_BOOST; } else if (memcmp(uuid, &gVirtualizerDescriptor.uuid, sizeof(effect_uuid_t)) == 0){ // Create Virtualizer - LOGV("\tEffectCreate - Effect to be created is LVM_VIRTUALIZER"); + ALOGV("\tEffectCreate - Effect to be created is LVM_VIRTUALIZER"); pSessionContext->bVirtualizerInstantiated=LVM_TRUE; pContext->pBundledContext->SamplesToExitCountVirt = 0; @@ -335,7 +335,7 @@ extern "C" int EffectCreate(effect_uuid_t *uuid, pContext->EffectType = LVM_VIRTUALIZER; } else if (memcmp(uuid, &gEqualizerDescriptor.uuid, sizeof(effect_uuid_t)) == 0){ // Create Equalizer - LOGV("\tEffectCreate - Effect to be created is LVM_EQUALIZER"); + ALOGV("\tEffectCreate - Effect to be created is LVM_EQUALIZER"); pSessionContext->bEqualizerInstantiated = LVM_TRUE; pContext->pBundledContext->SamplesToExitCountEq = 0; @@ -343,14 +343,14 @@ extern "C" int EffectCreate(effect_uuid_t *uuid, pContext->EffectType = LVM_EQUALIZER; } else if (memcmp(uuid, &gVolumeDescriptor.uuid, sizeof(effect_uuid_t)) == 0){ // Create Volume - LOGV("\tEffectCreate - Effect to be created is LVM_VOLUME"); + ALOGV("\tEffectCreate - Effect to be created is LVM_VOLUME"); pSessionContext->bVolumeInstantiated = LVM_TRUE; pContext->itfe = &gLvmEffectInterface; pContext->EffectType = LVM_VOLUME; } else{ - LOGV("\tLVM_ERROR : EffectCreate() invalid UUID"); + ALOGV("\tLVM_ERROR : EffectCreate() invalid UUID"); ret = -EINVAL; goto exit; } @@ -369,17 +369,17 @@ exit: } else { *pHandle = (effect_handle_t)pContext; } - LOGV("\tEffectCreate end..\n\n"); + ALOGV("\tEffectCreate end..\n\n"); return ret; } /* end EffectCreate */ extern "C" int EffectRelease(effect_handle_t handle){ - LOGV("\n\tEffectRelease start %p", handle); + ALOGV("\n\tEffectRelease start %p", handle); EffectContext * pContext = (EffectContext *)handle; - LOGV("\tEffectRelease start handle: %p, context %p", handle, pContext->pBundledContext); + ALOGV("\tEffectRelease start handle: %p, context %p", handle, pContext->pBundledContext); if (pContext == NULL){ - LOGV("\tLVM_ERROR : EffectRelease called with NULL pointer"); + ALOGV("\tLVM_ERROR : EffectRelease called with NULL pointer"); return -EINVAL; } @@ -388,34 +388,34 @@ extern "C" int EffectRelease(effect_handle_t handle){ // Clear the instantiated flag for the effect // protect agains the case where an effect is un-instantiated without being disabled if(pContext->EffectType == LVM_BASS_BOOST) { - LOGV("\tEffectRelease LVM_BASS_BOOST Clearing global intstantiated flag"); + ALOGV("\tEffectRelease LVM_BASS_BOOST Clearing global intstantiated flag"); pSessionContext->bBassInstantiated = LVM_FALSE; if(pContext->pBundledContext->SamplesToExitCountBb > 0){ pContext->pBundledContext->NumberEffectsEnabled--; } pContext->pBundledContext->SamplesToExitCountBb = 0; } else if(pContext->EffectType == LVM_VIRTUALIZER) { - LOGV("\tEffectRelease LVM_VIRTUALIZER Clearing global intstantiated flag"); + ALOGV("\tEffectRelease LVM_VIRTUALIZER Clearing global intstantiated flag"); pSessionContext->bVirtualizerInstantiated = LVM_FALSE; if(pContext->pBundledContext->SamplesToExitCountVirt > 0){ pContext->pBundledContext->NumberEffectsEnabled--; } pContext->pBundledContext->SamplesToExitCountVirt = 0; } else if(pContext->EffectType == LVM_EQUALIZER) { - LOGV("\tEffectRelease LVM_EQUALIZER Clearing global intstantiated flag"); + ALOGV("\tEffectRelease LVM_EQUALIZER Clearing global intstantiated flag"); pSessionContext->bEqualizerInstantiated =LVM_FALSE; if(pContext->pBundledContext->SamplesToExitCountEq > 0){ pContext->pBundledContext->NumberEffectsEnabled--; } pContext->pBundledContext->SamplesToExitCountEq = 0; } else if(pContext->EffectType == LVM_VOLUME) { - LOGV("\tEffectRelease LVM_VOLUME Clearing global intstantiated flag"); + ALOGV("\tEffectRelease LVM_VOLUME Clearing global intstantiated flag"); pSessionContext->bVolumeInstantiated = LVM_FALSE; if (pContext->pBundledContext->bVolumeEnabled == LVM_TRUE){ pContext->pBundledContext->NumberEffectsEnabled--; } } else { - LOGV("\tLVM_ERROR : EffectRelease : Unsupported effect\n\n\n\n\n\n\n"); + ALOGV("\tLVM_ERROR : EffectRelease : Unsupported effect\n\n\n\n\n\n\n"); } // Disable effect, in this case ignore errors (return codes) @@ -444,18 +444,18 @@ extern "C" int EffectRelease(effect_handle_t handle){ for(int i=0; i<LVM_MAX_SESSIONS; i++){ if(SessionIndex[i] == pContext->pBundledContext->SessionId){ SessionIndex[i] = LVM_UNUSED_SESSION; - LOGV("\tEffectRelease: Clearing SessionIndex SessionNo %d for SessionId %d\n", + ALOGV("\tEffectRelease: Clearing SessionIndex SessionNo %d for SessionId %d\n", i, pContext->pBundledContext->SessionId); break; } } - LOGV("\tEffectRelease: All effects are no longer instantiated\n"); + ALOGV("\tEffectRelease: All effects are no longer instantiated\n"); pSessionContext->bBundledEffectsEnabled = LVM_FALSE; pSessionContext->pBundledContext = LVM_NULL; - LOGV("\tEffectRelease: Freeing LVM Bundle memory\n"); + ALOGV("\tEffectRelease: Freeing LVM Bundle memory\n"); LvmEffect_free(pContext); - LOGV("\tEffectRelease: Deleting LVM Bundle context %p\n", pContext->pBundledContext); + ALOGV("\tEffectRelease: Deleting LVM Bundle context %p\n", pContext->pBundledContext); if (pContext->pBundledContext->workBuffer != NULL) { free(pContext->pBundledContext->workBuffer); } @@ -465,7 +465,7 @@ extern "C" int EffectRelease(effect_handle_t handle){ // free the effect context for current effect delete pContext; - LOGV("\tEffectRelease end\n"); + ALOGV("\tEffectRelease end\n"); return 0; } /* end EffectRelease */ @@ -475,7 +475,7 @@ extern "C" int EffectGetDescriptor(effect_uuid_t *uuid, const effect_descriptor_t *desc = NULL; if (pDescriptor == NULL || uuid == NULL){ - LOGV("EffectGetDescriptor() called with NULL pointer"); + ALOGV("EffectGetDescriptor() called with NULL pointer"); return -EINVAL; } @@ -499,7 +499,7 @@ extern "C" int EffectGetDescriptor(effect_uuid_t *uuid, } /* end EffectGetDescriptor */ void LvmGlobalBundle_init(){ - LOGV("\tLvmGlobalBundle_init start"); + ALOGV("\tLvmGlobalBundle_init start"); for(int i=0; i<LVM_MAX_SESSIONS; i++){ GlobalSessionMemory[i].bBundledEffectsEnabled = LVM_FALSE; GlobalSessionMemory[i].bVolumeInstantiated = LVM_FALSE; @@ -528,7 +528,7 @@ void LvmGlobalBundle_init(){ int LvmBundle_init(EffectContext *pContext){ int status; - LOGV("\tLvmBundle_init start"); + ALOGV("\tLvmBundle_init start"); pContext->config.inputCfg.accessMode = EFFECT_BUFFER_ACCESS_READ; pContext->config.inputCfg.channels = AUDIO_CHANNEL_OUT_STEREO; @@ -550,12 +550,12 @@ int LvmBundle_init(EffectContext *pContext){ CHECK_ARG(pContext != NULL); if (pContext->pBundledContext->hInstance != NULL){ - LOGV("\tLvmBundle_init pContext->pBassBoost != NULL " + ALOGV("\tLvmBundle_init pContext->pBassBoost != NULL " "-> Calling pContext->pBassBoost->free()"); LvmEffect_free(pContext); - LOGV("\tLvmBundle_init pContext->pBassBoost != NULL " + ALOGV("\tLvmBundle_init pContext->pBassBoost != NULL " "-> Called pContext->pBassBoost->free()"); } @@ -582,7 +582,7 @@ int LvmBundle_init(EffectContext *pContext){ LVM_ERROR_CHECK(LvmStatus, "LVM_GetMemoryTable", "LvmBundle_init") if(LvmStatus != LVM_SUCCESS) return -EINVAL; - LOGV("\tCreateInstance Succesfully called LVM_GetMemoryTable\n"); + ALOGV("\tCreateInstance Succesfully called LVM_GetMemoryTable\n"); /* Allocate memory */ for (int i=0; i<LVM_NR_MEMORY_REGIONS; i++){ @@ -590,11 +590,11 @@ int LvmBundle_init(EffectContext *pContext){ MemTab.Region[i].pBaseAddress = malloc(MemTab.Region[i].Size); if (MemTab.Region[i].pBaseAddress == LVM_NULL){ - LOGV("\tLVM_ERROR :LvmBundle_init CreateInstance Failed to allocate %ld bytes " + ALOGV("\tLVM_ERROR :LvmBundle_init CreateInstance Failed to allocate %ld bytes " "for region %u\n", MemTab.Region[i].Size, i ); bMallocFailure = LVM_TRUE; }else{ - LOGV("\tLvmBundle_init CreateInstance allocated %ld bytes for region %u at %p\n", + ALOGV("\tLvmBundle_init CreateInstance allocated %ld bytes for region %u at %p\n", MemTab.Region[i].Size, i, MemTab.Region[i].pBaseAddress); } } @@ -606,10 +606,10 @@ int LvmBundle_init(EffectContext *pContext){ if(bMallocFailure == LVM_TRUE){ for (int i=0; i<LVM_NR_MEMORY_REGIONS; i++){ if (MemTab.Region[i].pBaseAddress == LVM_NULL){ - LOGV("\tLVM_ERROR :LvmBundle_init CreateInstance Failed to allocate %ld bytes " + ALOGV("\tLVM_ERROR :LvmBundle_init CreateInstance Failed to allocate %ld bytes " "for region %u Not freeing\n", MemTab.Region[i].Size, i ); }else{ - LOGV("\tLVM_ERROR :LvmBundle_init CreateInstance Failed: but allocated %ld bytes " + ALOGV("\tLVM_ERROR :LvmBundle_init CreateInstance Failed: but allocated %ld bytes " "for region %u at %p- free\n", MemTab.Region[i].Size, i, MemTab.Region[i].pBaseAddress); free(MemTab.Region[i].pBaseAddress); @@ -617,7 +617,7 @@ int LvmBundle_init(EffectContext *pContext){ } return -EINVAL; } - LOGV("\tLvmBundle_init CreateInstance Succesfully malloc'd memory\n"); + ALOGV("\tLvmBundle_init CreateInstance Succesfully malloc'd memory\n"); /* Initialise */ pContext->pBundledContext->hInstance = LVM_NULL; @@ -630,7 +630,7 @@ int LvmBundle_init(EffectContext *pContext){ LVM_ERROR_CHECK(LvmStatus, "LVM_GetInstanceHandle", "LvmBundle_init") if(LvmStatus != LVM_SUCCESS) return -EINVAL; - LOGV("\tLvmBundle_init CreateInstance Succesfully called LVM_GetInstanceHandle\n"); + ALOGV("\tLvmBundle_init CreateInstance Succesfully called LVM_GetInstanceHandle\n"); /* Set the initial process parameters */ /* General parameters */ @@ -692,7 +692,7 @@ int LvmBundle_init(EffectContext *pContext){ LVM_ERROR_CHECK(LvmStatus, "LVM_SetControlParameters", "LvmBundle_init") if(LvmStatus != LVM_SUCCESS) return -EINVAL; - LOGV("\tLvmBundle_init CreateInstance Succesfully called LVM_SetControlParameters\n"); + ALOGV("\tLvmBundle_init CreateInstance Succesfully called LVM_SetControlParameters\n"); /* Set the headroom parameters */ HeadroomBandDef[0].Limit_Low = 20; @@ -711,8 +711,8 @@ int LvmBundle_init(EffectContext *pContext){ LVM_ERROR_CHECK(LvmStatus, "LVM_SetHeadroomParams", "LvmBundle_init") if(LvmStatus != LVM_SUCCESS) return -EINVAL; - LOGV("\tLvmBundle_init CreateInstance Succesfully called LVM_SetHeadroomParams\n"); - LOGV("\tLvmBundle_init End"); + ALOGV("\tLvmBundle_init CreateInstance Succesfully called LVM_SetHeadroomParams\n"); + ALOGV("\tLvmBundle_init End"); return 0; } /* end LvmBundle_init */ @@ -757,7 +757,7 @@ int LvmBundle_process(LVM_INT16 *pIn, } pOutTmp = pContext->pBundledContext->workBuffer; }else{ - LOGV("LVM_ERROR : LvmBundle_process invalid access mode"); + ALOGV("LVM_ERROR : LvmBundle_process invalid access mode"); return -EINVAL; } @@ -766,7 +766,7 @@ int LvmBundle_process(LVM_INT16 *pIn, fflush(pContext->pBundledContext->PcmInPtr); #endif - //LOGV("Calling LVM_Process"); + //ALOGV("Calling LVM_Process"); /* Process the samples */ LvmStatus = LVM_Process(pContext->pBundledContext->hInstance, /* Instance handle */ @@ -804,7 +804,7 @@ int LvmBundle_process(LVM_INT16 *pIn, //---------------------------------------------------------------------------- int LvmEffect_enable(EffectContext *pContext){ - //LOGV("\tLvmEffect_enable start"); + //ALOGV("\tLvmEffect_enable start"); LVM_ControlParams_t ActiveParams; /* Current control Parameters */ LVM_ReturnStatus_en LvmStatus = LVM_SUCCESS; /* Function call status */ @@ -815,30 +815,30 @@ int LvmEffect_enable(EffectContext *pContext){ LVM_ERROR_CHECK(LvmStatus, "LVM_GetControlParameters", "LvmEffect_enable") if(LvmStatus != LVM_SUCCESS) return -EINVAL; - //LOGV("\tLvmEffect_enable Succesfully called LVM_GetControlParameters\n"); + //ALOGV("\tLvmEffect_enable Succesfully called LVM_GetControlParameters\n"); if(pContext->EffectType == LVM_BASS_BOOST) { - LOGV("\tLvmEffect_enable : Enabling LVM_BASS_BOOST"); + ALOGV("\tLvmEffect_enable : Enabling LVM_BASS_BOOST"); ActiveParams.BE_OperatingMode = LVM_BE_ON; } if(pContext->EffectType == LVM_VIRTUALIZER) { - LOGV("\tLvmEffect_enable : Enabling LVM_VIRTUALIZER"); + ALOGV("\tLvmEffect_enable : Enabling LVM_VIRTUALIZER"); ActiveParams.VirtualizerOperatingMode = LVM_MODE_ON; } if(pContext->EffectType == LVM_EQUALIZER) { - LOGV("\tLvmEffect_enable : Enabling LVM_EQUALIZER"); + ALOGV("\tLvmEffect_enable : Enabling LVM_EQUALIZER"); ActiveParams.EQNB_OperatingMode = LVM_EQNB_ON; } if(pContext->EffectType == LVM_VOLUME) { - LOGV("\tLvmEffect_enable : Enabling LVM_VOLUME"); + ALOGV("\tLvmEffect_enable : Enabling LVM_VOLUME"); } LvmStatus = LVM_SetControlParameters(pContext->pBundledContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVM_SetControlParameters", "LvmEffect_enable") if(LvmStatus != LVM_SUCCESS) return -EINVAL; - //LOGV("\tLvmEffect_enable Succesfully called LVM_SetControlParameters\n"); - //LOGV("\tLvmEffect_enable end"); + //ALOGV("\tLvmEffect_enable Succesfully called LVM_SetControlParameters\n"); + //ALOGV("\tLvmEffect_enable end"); return 0; } @@ -855,7 +855,7 @@ int LvmEffect_enable(EffectContext *pContext){ //---------------------------------------------------------------------------- int LvmEffect_disable(EffectContext *pContext){ - //LOGV("\tLvmEffect_disable start"); + //ALOGV("\tLvmEffect_disable start"); LVM_ControlParams_t ActiveParams; /* Current control Parameters */ LVM_ReturnStatus_en LvmStatus = LVM_SUCCESS; /* Function call status */ @@ -865,30 +865,30 @@ int LvmEffect_disable(EffectContext *pContext){ LVM_ERROR_CHECK(LvmStatus, "LVM_GetControlParameters", "LvmEffect_disable") if(LvmStatus != LVM_SUCCESS) return -EINVAL; - //LOGV("\tLvmEffect_disable Succesfully called LVM_GetControlParameters\n"); + //ALOGV("\tLvmEffect_disable Succesfully called LVM_GetControlParameters\n"); if(pContext->EffectType == LVM_BASS_BOOST) { - LOGV("\tLvmEffect_disable : Disabling LVM_BASS_BOOST"); + ALOGV("\tLvmEffect_disable : Disabling LVM_BASS_BOOST"); ActiveParams.BE_OperatingMode = LVM_BE_OFF; } if(pContext->EffectType == LVM_VIRTUALIZER) { - LOGV("\tLvmEffect_disable : Disabling LVM_VIRTUALIZER"); + ALOGV("\tLvmEffect_disable : Disabling LVM_VIRTUALIZER"); ActiveParams.VirtualizerOperatingMode = LVM_MODE_OFF; } if(pContext->EffectType == LVM_EQUALIZER) { - LOGV("\tLvmEffect_disable : Disabling LVM_EQUALIZER"); + ALOGV("\tLvmEffect_disable : Disabling LVM_EQUALIZER"); ActiveParams.EQNB_OperatingMode = LVM_EQNB_OFF; } if(pContext->EffectType == LVM_VOLUME) { - LOGV("\tLvmEffect_disable : Disabling LVM_VOLUME"); + ALOGV("\tLvmEffect_disable : Disabling LVM_VOLUME"); } LvmStatus = LVM_SetControlParameters(pContext->pBundledContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVM_SetControlParameters", "LvmEffect_disable") if(LvmStatus != LVM_SUCCESS) return -EINVAL; - //LOGV("\tLvmEffect_disable Succesfully called LVM_SetControlParameters\n"); - //LOGV("\tLvmEffect_disable end"); + //ALOGV("\tLvmEffect_disable Succesfully called LVM_SetControlParameters\n"); + //ALOGV("\tLvmEffect_disable end"); return 0; } @@ -919,15 +919,15 @@ void LvmEffect_free(EffectContext *pContext){ for (int i=0; i<LVM_NR_MEMORY_REGIONS; i++){ if (MemTab.Region[i].Size != 0){ if (MemTab.Region[i].pBaseAddress != NULL){ - LOGV("\tLvmEffect_free - START freeing %ld bytes for region %u at %p\n", + ALOGV("\tLvmEffect_free - START freeing %ld bytes for region %u at %p\n", MemTab.Region[i].Size, i, MemTab.Region[i].pBaseAddress); free(MemTab.Region[i].pBaseAddress); - LOGV("\tLvmEffect_free - END freeing %ld bytes for region %u at %p\n", + ALOGV("\tLvmEffect_free - END freeing %ld bytes for region %u at %p\n", MemTab.Region[i].Size, i, MemTab.Region[i].pBaseAddress); }else{ - LOGV("\tLVM_ERROR : LvmEffect_free - trying to free with NULL pointer %ld bytes " + ALOGV("\tLVM_ERROR : LvmEffect_free - trying to free with NULL pointer %ld bytes " "for region %u at %p ERROR\n", MemTab.Region[i].Size, i, MemTab.Region[i].pBaseAddress); } @@ -951,7 +951,7 @@ void LvmEffect_free(EffectContext *pContext){ int Effect_configure(EffectContext *pContext, effect_config_t *pConfig){ LVM_Fs_en SampleRate; - //LOGV("\tEffect_configure start"); + //ALOGV("\tEffect_configure start"); CHECK_ARG(pContext != NULL); CHECK_ARG(pConfig != NULL); @@ -992,7 +992,7 @@ int Effect_configure(EffectContext *pContext, effect_config_t *pConfig){ pContext->pBundledContext->SamplesPerSecond = 48000*2; // 2 secs Stereo break; default: - LOGV("\tEffect_Configure invalid sampling rate %d", pConfig->inputCfg.samplingRate); + ALOGV("\tEffect_Configure invalid sampling rate %d", pConfig->inputCfg.samplingRate); return -EINVAL; } @@ -1001,7 +1001,7 @@ int Effect_configure(EffectContext *pContext, effect_config_t *pConfig){ LVM_ControlParams_t ActiveParams; LVM_ReturnStatus_en LvmStatus = LVM_SUCCESS; - LOGV("\tEffect_configure change sampling rate to %d", SampleRate); + ALOGV("\tEffect_configure change sampling rate to %d", SampleRate); /* Get the current settings */ LvmStatus = LVM_GetControlParameters(pContext->pBundledContext->hInstance, @@ -1013,14 +1013,14 @@ int Effect_configure(EffectContext *pContext, effect_config_t *pConfig){ LvmStatus = LVM_SetControlParameters(pContext->pBundledContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVM_SetControlParameters", "Effect_configure") - LOGV("\tEffect_configure Succesfully called LVM_SetControlParameters\n"); + ALOGV("\tEffect_configure Succesfully called LVM_SetControlParameters\n"); pContext->pBundledContext->SampleRate = SampleRate; }else{ - //LOGV("\tEffect_configure keep sampling rate at %d", SampleRate); + //ALOGV("\tEffect_configure keep sampling rate at %d", SampleRate); } - //LOGV("\tEffect_configure End...."); + //ALOGV("\tEffect_configure End...."); return 0; } /* end Effect_configure */ @@ -1039,7 +1039,7 @@ int Effect_configure(EffectContext *pContext, effect_config_t *pConfig){ //---------------------------------------------------------------------------- uint32_t BassGetStrength(EffectContext *pContext){ - //LOGV("\tBassGetStrength() (0-1000) -> %d\n", pContext->pBundledContext->BassStrengthSaved); + //ALOGV("\tBassGetStrength() (0-1000) -> %d\n", pContext->pBundledContext->BassStrengthSaved); LVM_ControlParams_t ActiveParams; /* Current control Parameters */ LVM_ReturnStatus_en LvmStatus = LVM_SUCCESS; /* Function call status */ @@ -1050,18 +1050,18 @@ uint32_t BassGetStrength(EffectContext *pContext){ LVM_ERROR_CHECK(LvmStatus, "LVM_GetControlParameters", "BassGetStrength") if(LvmStatus != LVM_SUCCESS) return -EINVAL; - //LOGV("\tBassGetStrength Succesfully returned from LVM_GetControlParameters\n"); + //ALOGV("\tBassGetStrength Succesfully returned from LVM_GetControlParameters\n"); /* Check that the strength returned matches the strength that was set earlier */ if(ActiveParams.BE_EffectLevel != (LVM_INT16)((15*pContext->pBundledContext->BassStrengthSaved)/1000)){ - LOGV("\tLVM_ERROR : BassGetStrength module strength does not match savedStrength %d %d\n", + ALOGV("\tLVM_ERROR : BassGetStrength module strength does not match savedStrength %d %d\n", ActiveParams.BE_EffectLevel, pContext->pBundledContext->BassStrengthSaved); return -EINVAL; } - //LOGV("\tBassGetStrength() (0-15) -> %d\n", ActiveParams.BE_EffectLevel ); - //LOGV("\tBassGetStrength() (saved) -> %d\n", pContext->pBundledContext->BassStrengthSaved ); + //ALOGV("\tBassGetStrength() (0-15) -> %d\n", ActiveParams.BE_EffectLevel ); + //ALOGV("\tBassGetStrength() (saved) -> %d\n", pContext->pBundledContext->BassStrengthSaved ); return pContext->pBundledContext->BassStrengthSaved; } /* end BassGetStrength */ @@ -1078,7 +1078,7 @@ uint32_t BassGetStrength(EffectContext *pContext){ //---------------------------------------------------------------------------- void BassSetStrength(EffectContext *pContext, uint32_t strength){ - //LOGV("\tBassSetStrength(%d)", strength); + //ALOGV("\tBassSetStrength(%d)", strength); pContext->pBundledContext->BassStrengthSaved = (int)strength; @@ -1090,19 +1090,19 @@ void BassSetStrength(EffectContext *pContext, uint32_t strength){ &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVM_GetControlParameters", "BassSetStrength") - //LOGV("\tBassSetStrength Succesfully returned from LVM_GetControlParameters\n"); + //ALOGV("\tBassSetStrength Succesfully returned from LVM_GetControlParameters\n"); /* Bass Enhancement parameters */ ActiveParams.BE_EffectLevel = (LVM_INT16)((15*strength)/1000); ActiveParams.BE_CentreFreq = LVM_BE_CENTRE_90Hz; - //LOGV("\tBassSetStrength() (0-15) -> %d\n", ActiveParams.BE_EffectLevel ); + //ALOGV("\tBassSetStrength() (0-15) -> %d\n", ActiveParams.BE_EffectLevel ); /* Activate the initial settings */ LvmStatus = LVM_SetControlParameters(pContext->pBundledContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVM_SetControlParameters", "BassSetStrength") - //LOGV("\tBassSetStrength Succesfully called LVM_SetControlParameters\n"); + //ALOGV("\tBassSetStrength Succesfully called LVM_SetControlParameters\n"); } /* end BassSetStrength */ //---------------------------------------------------------------------------- @@ -1120,7 +1120,7 @@ void BassSetStrength(EffectContext *pContext, uint32_t strength){ //---------------------------------------------------------------------------- uint32_t VirtualizerGetStrength(EffectContext *pContext){ - //LOGV("\tVirtualizerGetStrength (0-1000) -> %d\n",pContext->pBundledContext->VirtStrengthSaved); + //ALOGV("\tVirtualizerGetStrength (0-1000) -> %d\n",pContext->pBundledContext->VirtStrengthSaved); LVM_ControlParams_t ActiveParams; /* Current control Parameters */ LVM_ReturnStatus_en LvmStatus = LVM_SUCCESS; /* Function call status */ @@ -1130,8 +1130,8 @@ uint32_t VirtualizerGetStrength(EffectContext *pContext){ LVM_ERROR_CHECK(LvmStatus, "LVM_GetControlParameters", "VirtualizerGetStrength") if(LvmStatus != LVM_SUCCESS) return -EINVAL; - //LOGV("\tVirtualizerGetStrength Succesfully returned from LVM_GetControlParameters\n"); - //LOGV("\tVirtualizerGetStrength() (0-100) -> %d\n", ActiveParams.VirtualizerReverbLevel*10); + //ALOGV("\tVirtualizerGetStrength Succesfully returned from LVM_GetControlParameters\n"); + //ALOGV("\tVirtualizerGetStrength() (0-100) -> %d\n", ActiveParams.VirtualizerReverbLevel*10); return pContext->pBundledContext->VirtStrengthSaved; } /* end getStrength */ @@ -1148,7 +1148,7 @@ uint32_t VirtualizerGetStrength(EffectContext *pContext){ //---------------------------------------------------------------------------- void VirtualizerSetStrength(EffectContext *pContext, uint32_t strength){ - //LOGV("\tVirtualizerSetStrength(%d)", strength); + //ALOGV("\tVirtualizerSetStrength(%d)", strength); LVM_ControlParams_t ActiveParams; /* Current control Parameters */ LVM_ReturnStatus_en LvmStatus=LVM_SUCCESS; /* Function call status */ @@ -1158,18 +1158,18 @@ void VirtualizerSetStrength(EffectContext *pContext, uint32_t strength){ LvmStatus = LVM_GetControlParameters(pContext->pBundledContext->hInstance,&ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVM_GetControlParameters", "VirtualizerSetStrength") - //LOGV("\tVirtualizerSetStrength Succesfully returned from LVM_GetControlParameters\n"); + //ALOGV("\tVirtualizerSetStrength Succesfully returned from LVM_GetControlParameters\n"); /* Virtualizer parameters */ ActiveParams.CS_EffectLevel = (int)((strength*32767)/1000); - //LOGV("\tVirtualizerSetStrength() (0-1000) -> %d\n", strength ); - //LOGV("\tVirtualizerSetStrength() (0- 100) -> %d\n", ActiveParams.CS_EffectLevel ); + //ALOGV("\tVirtualizerSetStrength() (0-1000) -> %d\n", strength ); + //ALOGV("\tVirtualizerSetStrength() (0- 100) -> %d\n", ActiveParams.CS_EffectLevel ); /* Activate the initial settings */ LvmStatus = LVM_SetControlParameters(pContext->pBundledContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVM_SetControlParameters", "VirtualizerSetStrength") - //LOGV("\tVirtualizerSetStrength Succesfully called LVM_SetControlParameters\n\n"); + //ALOGV("\tVirtualizerSetStrength Succesfully called LVM_SetControlParameters\n\n"); } /* end setStrength */ //---------------------------------------------------------------------------- @@ -1199,8 +1199,8 @@ int32_t EqualizerGetBandLevel(EffectContext *pContext, int32_t band){ BandDef = ActiveParams.pEQNB_BandDefinition; Gain = (int32_t)BandDef[band].Gain*100; // Convert to millibels - //LOGV("\tEqualizerGetBandLevel -> %d\n", Gain ); - //LOGV("\tEqualizerGetBandLevel Succesfully returned from LVM_GetControlParameters\n"); + //ALOGV("\tEqualizerGetBandLevel -> %d\n", Gain ); + //ALOGV("\tEqualizerGetBandLevel Succesfully returned from LVM_GetControlParameters\n"); return Gain; } @@ -1225,7 +1225,7 @@ void EqualizerSetBandLevel(EffectContext *pContext, int band, short Gain){ }else{ gainRounded = (int)((Gain-50)/100); } - //LOGV("\tEqualizerSetBandLevel(%d)->(%d)", Gain, gainRounded); + //ALOGV("\tEqualizerSetBandLevel(%d)->(%d)", Gain, gainRounded); LVM_ControlParams_t ActiveParams; /* Current control Parameters */ @@ -1235,8 +1235,8 @@ void EqualizerSetBandLevel(EffectContext *pContext, int band, short Gain){ /* Get the current settings */ LvmStatus = LVM_GetControlParameters(pContext->pBundledContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVM_GetControlParameters", "EqualizerSetBandLevel") - //LOGV("\tEqualizerSetBandLevel Succesfully returned from LVM_GetControlParameters\n"); - //LOGV("\tEqualizerSetBandLevel just Got -> %d\n",ActiveParams.pEQNB_BandDefinition[band].Gain); + //ALOGV("\tEqualizerSetBandLevel Succesfully returned from LVM_GetControlParameters\n"); + //ALOGV("\tEqualizerSetBandLevel just Got -> %d\n",ActiveParams.pEQNB_BandDefinition[band].Gain); /* Set local EQ parameters */ BandDef = ActiveParams.pEQNB_BandDefinition; @@ -1245,7 +1245,7 @@ void EqualizerSetBandLevel(EffectContext *pContext, int band, short Gain){ /* Activate the initial settings */ LvmStatus = LVM_SetControlParameters(pContext->pBundledContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVM_SetControlParameters", "EqualizerSetBandLevel") - //LOGV("\tEqualizerSetBandLevel just Set -> %d\n",ActiveParams.pEQNB_BandDefinition[band].Gain); + //ALOGV("\tEqualizerSetBandLevel just Set -> %d\n",ActiveParams.pEQNB_BandDefinition[band].Gain); pContext->pBundledContext->CurPreset = PRESET_CUSTOM; return; @@ -1277,8 +1277,8 @@ int32_t EqualizerGetCentreFrequency(EffectContext *pContext, int32_t band){ BandDef = ActiveParams.pEQNB_BandDefinition; Frequency = (int32_t)BandDef[band].Frequency*1000; // Convert to millibels - //LOGV("\tEqualizerGetCentreFrequency -> %d\n", Frequency ); - //LOGV("\tEqualizerGetCentreFrequency Succesfully returned from LVM_GetControlParameters\n"); + //ALOGV("\tEqualizerGetCentreFrequency -> %d\n", Frequency ); + //ALOGV("\tEqualizerGetCentreFrequency Succesfully returned from LVM_GetControlParameters\n"); return Frequency; } @@ -1372,7 +1372,7 @@ int32_t EqualizerGetPreset(EffectContext *pContext){ //---------------------------------------------------------------------------- void EqualizerSetPreset(EffectContext *pContext, int preset){ - //LOGV("\tEqualizerSetPreset(%d)", preset); + //ALOGV("\tEqualizerSetPreset(%d)", preset); pContext->pBundledContext->CurPreset = preset; LVM_ControlParams_t ActiveParams; /* Current control Parameters */ @@ -1381,7 +1381,7 @@ void EqualizerSetPreset(EffectContext *pContext, int preset){ /* Get the current settings */ LvmStatus = LVM_GetControlParameters(pContext->pBundledContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVM_GetControlParameters", "EqualizerSetPreset") - //LOGV("\tEqualizerSetPreset Succesfully returned from LVM_GetControlParameters\n"); + //ALOGV("\tEqualizerSetPreset Succesfully returned from LVM_GetControlParameters\n"); //ActiveParams.pEQNB_BandDefinition = &BandDefs[0]; for (int i=0; i<FIVEBAND_NUMBANDS; i++) @@ -1395,7 +1395,7 @@ void EqualizerSetPreset(EffectContext *pContext, int preset){ LvmStatus = LVM_SetControlParameters(pContext->pBundledContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVM_SetControlParameters", "EqualizerSetPreset") - //LOGV("\tEqualizerSetPreset Succesfully called LVM_SetControlParameters\n"); + //ALOGV("\tEqualizerSetPreset Succesfully called LVM_SetControlParameters\n"); return; } @@ -1415,13 +1415,13 @@ int32_t EqualizerGetNumPresets(){ // //------------------------------------------------------------------------- const char * EqualizerGetPresetName(int32_t preset){ - //LOGV("\tEqualizerGetPresetName start(%d)", preset); + //ALOGV("\tEqualizerGetPresetName start(%d)", preset); if (preset == PRESET_CUSTOM) { return "Custom"; } else { return gEqualizerPresets[preset].name; } - //LOGV("\tEqualizerGetPresetName end(%d)", preset); + //ALOGV("\tEqualizerGetPresetName end(%d)", preset); return 0; } @@ -1441,35 +1441,35 @@ int VolumeSetVolumeLevel(EffectContext *pContext, int16_t level){ LVM_ControlParams_t ActiveParams; /* Current control Parameters */ LVM_ReturnStatus_en LvmStatus=LVM_SUCCESS; /* Function call status */ - //LOGV("\tVolumeSetVolumeLevel Level to be set is %d %d\n", level, (LVM_INT16)(level/100)); + //ALOGV("\tVolumeSetVolumeLevel Level to be set is %d %d\n", level, (LVM_INT16)(level/100)); /* Get the current settings */ LvmStatus = LVM_GetControlParameters(pContext->pBundledContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVM_GetControlParameters", "VolumeSetVolumeLevel") if(LvmStatus != LVM_SUCCESS) return -EINVAL; - //LOGV("\tVolumeSetVolumeLevel Succesfully returned from LVM_GetControlParameters got: %d\n", + //ALOGV("\tVolumeSetVolumeLevel Succesfully returned from LVM_GetControlParameters got: %d\n", //ActiveParams.VC_EffectLevel); /* Volume parameters */ ActiveParams.VC_EffectLevel = (LVM_INT16)(level/100); - //LOGV("\tVolumeSetVolumeLevel() (-96dB -> 0dB) -> %d\n", ActiveParams.VC_EffectLevel ); + //ALOGV("\tVolumeSetVolumeLevel() (-96dB -> 0dB) -> %d\n", ActiveParams.VC_EffectLevel ); /* Activate the initial settings */ LvmStatus = LVM_SetControlParameters(pContext->pBundledContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVM_SetControlParameters", "VolumeSetVolumeLevel") if(LvmStatus != LVM_SUCCESS) return -EINVAL; - //LOGV("\tVolumeSetVolumeLevel Succesfully called LVM_SetControlParameters\n"); + //ALOGV("\tVolumeSetVolumeLevel Succesfully called LVM_SetControlParameters\n"); /* Get the current settings */ LvmStatus = LVM_GetControlParameters(pContext->pBundledContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVM_GetControlParameters", "VolumeSetVolumeLevel") if(LvmStatus != LVM_SUCCESS) return -EINVAL; - //LOGV("\tVolumeSetVolumeLevel just set (-96dB -> 0dB) -> %d\n",ActiveParams.VC_EffectLevel ); + //ALOGV("\tVolumeSetVolumeLevel just set (-96dB -> 0dB) -> %d\n",ActiveParams.VC_EffectLevel ); if(pContext->pBundledContext->firstVolume == LVM_TRUE){ LvmStatus = LVM_SetVolumeNoSmoothing(pContext->pBundledContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVM_SetVolumeNoSmoothing", "LvmBundle_process") - LOGV("\tLVM_VOLUME: Disabling Smoothing for first volume change to remove spikes/clicks"); + ALOGV("\tLVM_VOLUME: Disabling Smoothing for first volume change to remove spikes/clicks"); pContext->pBundledContext->firstVolume = LVM_FALSE; } return 0; @@ -1487,7 +1487,7 @@ int VolumeSetVolumeLevel(EffectContext *pContext, int16_t level){ int VolumeGetVolumeLevel(EffectContext *pContext, int16_t *level){ - //LOGV("\tVolumeGetVolumeLevel start"); + //ALOGV("\tVolumeGetVolumeLevel start"); LVM_ControlParams_t ActiveParams; /* Current control Parameters */ LVM_ReturnStatus_en LvmStatus = LVM_SUCCESS; /* Function call status */ @@ -1496,11 +1496,11 @@ int VolumeGetVolumeLevel(EffectContext *pContext, int16_t *level){ LVM_ERROR_CHECK(LvmStatus, "LVM_GetControlParameters", "VolumeGetVolumeLevel") if(LvmStatus != LVM_SUCCESS) return -EINVAL; - //LOGV("\tVolumeGetVolumeLevel() (-96dB -> 0dB) -> %d\n", ActiveParams.VC_EffectLevel ); - //LOGV("\tVolumeGetVolumeLevel Succesfully returned from LVM_GetControlParameters\n"); + //ALOGV("\tVolumeGetVolumeLevel() (-96dB -> 0dB) -> %d\n", ActiveParams.VC_EffectLevel ); + //ALOGV("\tVolumeGetVolumeLevel Succesfully returned from LVM_GetControlParameters\n"); *level = ActiveParams.VC_EffectLevel*100; // Convert dB to millibels - //LOGV("\tVolumeGetVolumeLevel end"); + //ALOGV("\tVolumeGetVolumeLevel end"); return 0; } /* end VolumeGetVolumeLevel */ @@ -1516,7 +1516,7 @@ int VolumeGetVolumeLevel(EffectContext *pContext, int16_t *level){ //---------------------------------------------------------------------------- int32_t VolumeSetMute(EffectContext *pContext, uint32_t mute){ - //LOGV("\tVolumeSetMute start(%d)", mute); + //ALOGV("\tVolumeSetMute start(%d)", mute); pContext->pBundledContext->bMuteEnabled = mute; @@ -1528,8 +1528,8 @@ int32_t VolumeSetMute(EffectContext *pContext, uint32_t mute){ LVM_ERROR_CHECK(LvmStatus, "LVM_GetControlParameters", "VolumeSetMute") if(LvmStatus != LVM_SUCCESS) return -EINVAL; - //LOGV("\tVolumeSetMute Succesfully returned from LVM_GetControlParameters\n"); - //LOGV("\tVolumeSetMute to %d, level was %d\n", mute, ActiveParams.VC_EffectLevel ); + //ALOGV("\tVolumeSetMute Succesfully returned from LVM_GetControlParameters\n"); + //ALOGV("\tVolumeSetMute to %d, level was %d\n", mute, ActiveParams.VC_EffectLevel ); /* Set appropriate volume level */ if(pContext->pBundledContext->bMuteEnabled == LVM_TRUE){ @@ -1544,8 +1544,8 @@ int32_t VolumeSetMute(EffectContext *pContext, uint32_t mute){ LVM_ERROR_CHECK(LvmStatus, "LVM_SetControlParameters", "VolumeSetMute") if(LvmStatus != LVM_SUCCESS) return -EINVAL; - //LOGV("\tVolumeSetMute Succesfully called LVM_SetControlParameters\n"); - //LOGV("\tVolumeSetMute end"); + //ALOGV("\tVolumeSetMute Succesfully called LVM_SetControlParameters\n"); + //ALOGV("\tVolumeSetMute end"); return 0; } /* end setMute */ @@ -1562,17 +1562,17 @@ int32_t VolumeSetMute(EffectContext *pContext, uint32_t mute){ //---------------------------------------------------------------------------- int32_t VolumeGetMute(EffectContext *pContext, uint32_t *mute){ - //LOGV("\tVolumeGetMute start"); + //ALOGV("\tVolumeGetMute start"); if((pContext->pBundledContext->bMuteEnabled == LVM_FALSE)|| (pContext->pBundledContext->bMuteEnabled == LVM_TRUE)){ *mute = pContext->pBundledContext->bMuteEnabled; return 0; }else{ - LOGV("\tLVM_ERROR : VolumeGetMute read an invalid value from context %d", + ALOGV("\tLVM_ERROR : VolumeGetMute read an invalid value from context %d", pContext->pBundledContext->bMuteEnabled); return -EINVAL; } - //LOGV("\tVolumeGetMute end"); + //ALOGV("\tVolumeGetMute end"); } /* end getMute */ int16_t VolumeConvertStereoPosition(int16_t position){ @@ -1606,43 +1606,43 @@ int VolumeSetStereoPosition(EffectContext *pContext, int16_t position){ pContext->pBundledContext->positionSaved = position; Balance = VolumeConvertStereoPosition(pContext->pBundledContext->positionSaved); - //LOGV("\tVolumeSetStereoPosition start pContext->pBundledContext->positionSaved = %d", + //ALOGV("\tVolumeSetStereoPosition start pContext->pBundledContext->positionSaved = %d", //pContext->pBundledContext->positionSaved); if(pContext->pBundledContext->bStereoPositionEnabled == LVM_TRUE){ - //LOGV("\tVolumeSetStereoPosition Position to be set is %d %d\n", position, Balance); + //ALOGV("\tVolumeSetStereoPosition Position to be set is %d %d\n", position, Balance); pContext->pBundledContext->positionSaved = position; /* Get the current settings */ LvmStatus = LVM_GetControlParameters(pContext->pBundledContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVM_GetControlParameters", "VolumeSetStereoPosition") if(LvmStatus != LVM_SUCCESS) return -EINVAL; - //LOGV("\tVolumeSetStereoPosition Succesfully returned from LVM_GetControlParameters got:" + //ALOGV("\tVolumeSetStereoPosition Succesfully returned from LVM_GetControlParameters got:" // " %d\n", ActiveParams.VC_Balance); /* Volume parameters */ ActiveParams.VC_Balance = Balance; - //LOGV("\tVolumeSetStereoPosition() (-96dB -> +96dB) -> %d\n", ActiveParams.VC_Balance ); + //ALOGV("\tVolumeSetStereoPosition() (-96dB -> +96dB) -> %d\n", ActiveParams.VC_Balance ); /* Activate the initial settings */ LvmStatus = LVM_SetControlParameters(pContext->pBundledContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVM_SetControlParameters", "VolumeSetStereoPosition") if(LvmStatus != LVM_SUCCESS) return -EINVAL; - //LOGV("\tVolumeSetStereoPosition Succesfully called LVM_SetControlParameters\n"); + //ALOGV("\tVolumeSetStereoPosition Succesfully called LVM_SetControlParameters\n"); /* Get the current settings */ LvmStatus = LVM_GetControlParameters(pContext->pBundledContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVM_GetControlParameters", "VolumeSetStereoPosition") if(LvmStatus != LVM_SUCCESS) return -EINVAL; - //LOGV("\tVolumeSetStereoPosition Succesfully returned from LVM_GetControlParameters got: " + //ALOGV("\tVolumeSetStereoPosition Succesfully returned from LVM_GetControlParameters got: " // "%d\n", ActiveParams.VC_Balance); } else{ - //LOGV("\tVolumeSetStereoPosition Position attempting to set, but not enabled %d %d\n", + //ALOGV("\tVolumeSetStereoPosition Position attempting to set, but not enabled %d %d\n", //position, Balance); } - //LOGV("\tVolumeSetStereoPosition end pContext->pBundledContext->positionSaved = %d\n", + //ALOGV("\tVolumeSetStereoPosition end pContext->pBundledContext->positionSaved = %d\n", //pContext->pBundledContext->positionSaved); return 0; } /* end VolumeSetStereoPosition */ @@ -1661,21 +1661,21 @@ int VolumeSetStereoPosition(EffectContext *pContext, int16_t position){ //---------------------------------------------------------------------------- int32_t VolumeGetStereoPosition(EffectContext *pContext, int16_t *position){ - //LOGV("\tVolumeGetStereoPosition start"); + //ALOGV("\tVolumeGetStereoPosition start"); LVM_ControlParams_t ActiveParams; /* Current control Parameters */ LVM_ReturnStatus_en LvmStatus = LVM_SUCCESS; /* Function call status */ LVM_INT16 balance; - //LOGV("\tVolumeGetStereoPosition start pContext->pBundledContext->positionSaved = %d", + //ALOGV("\tVolumeGetStereoPosition start pContext->pBundledContext->positionSaved = %d", //pContext->pBundledContext->positionSaved); LvmStatus = LVM_GetControlParameters(pContext->pBundledContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVM_GetControlParameters", "VolumeGetStereoPosition") if(LvmStatus != LVM_SUCCESS) return -EINVAL; - //LOGV("\tVolumeGetStereoPosition -> %d\n", ActiveParams.VC_Balance); - //LOGV("\tVolumeGetStereoPosition Succesfully returned from LVM_GetControlParameters\n"); + //ALOGV("\tVolumeGetStereoPosition -> %d\n", ActiveParams.VC_Balance); + //ALOGV("\tVolumeGetStereoPosition Succesfully returned from LVM_GetControlParameters\n"); balance = VolumeConvertStereoPosition(pContext->pBundledContext->positionSaved); @@ -1685,7 +1685,7 @@ int32_t VolumeGetStereoPosition(EffectContext *pContext, int16_t *position){ } } *position = (LVM_INT16)pContext->pBundledContext->positionSaved; // Convert dB to millibels - //LOGV("\tVolumeGetStereoPosition end returning pContext->pBundledContext->positionSaved =%d\n", + //ALOGV("\tVolumeGetStereoPosition end returning pContext->pBundledContext->positionSaved =%d\n", //pContext->pBundledContext->positionSaved); return 0; } /* end VolumeGetStereoPosition */ @@ -1702,7 +1702,7 @@ int32_t VolumeGetStereoPosition(EffectContext *pContext, int16_t *position){ //---------------------------------------------------------------------------- int32_t VolumeEnableStereoPosition(EffectContext *pContext, uint32_t enabled){ - //LOGV("\tVolumeEnableStereoPosition start()"); + //ALOGV("\tVolumeEnableStereoPosition start()"); pContext->pBundledContext->bStereoPositionEnabled = enabled; @@ -1714,8 +1714,8 @@ int32_t VolumeEnableStereoPosition(EffectContext *pContext, uint32_t enabled){ LVM_ERROR_CHECK(LvmStatus, "LVM_GetControlParameters", "VolumeEnableStereoPosition") if(LvmStatus != LVM_SUCCESS) return -EINVAL; - //LOGV("\tVolumeEnableStereoPosition Succesfully returned from LVM_GetControlParameters\n"); - //LOGV("\tVolumeEnableStereoPosition to %d, position was %d\n", + //ALOGV("\tVolumeEnableStereoPosition Succesfully returned from LVM_GetControlParameters\n"); + //ALOGV("\tVolumeEnableStereoPosition to %d, position was %d\n", // enabled, ActiveParams.VC_Balance ); /* Set appropriate stereo position */ @@ -1731,8 +1731,8 @@ int32_t VolumeEnableStereoPosition(EffectContext *pContext, uint32_t enabled){ LVM_ERROR_CHECK(LvmStatus, "LVM_SetControlParameters", "VolumeEnableStereoPosition") if(LvmStatus != LVM_SUCCESS) return -EINVAL; - //LOGV("\tVolumeEnableStereoPosition Succesfully called LVM_SetControlParameters\n"); - //LOGV("\tVolumeEnableStereoPosition end()\n"); + //ALOGV("\tVolumeEnableStereoPosition Succesfully called LVM_SetControlParameters\n"); + //ALOGV("\tVolumeEnableStereoPosition end()\n"); return 0; } /* end VolumeEnableStereoPosition */ @@ -1767,26 +1767,26 @@ int BassBoost_getParameter(EffectContext *pContext, int32_t param2; char *name; - //LOGV("\tBassBoost_getParameter start"); + //ALOGV("\tBassBoost_getParameter start"); switch (param){ case BASSBOOST_PARAM_STRENGTH_SUPPORTED: if (*pValueSize != sizeof(uint32_t)){ - LOGV("\tLVM_ERROR : BassBoost_getParameter() invalid pValueSize1 %d", *pValueSize); + ALOGV("\tLVM_ERROR : BassBoost_getParameter() invalid pValueSize1 %d", *pValueSize); return -EINVAL; } *pValueSize = sizeof(uint32_t); break; case BASSBOOST_PARAM_STRENGTH: if (*pValueSize != sizeof(int16_t)){ - LOGV("\tLVM_ERROR : BassBoost_getParameter() invalid pValueSize2 %d", *pValueSize); + ALOGV("\tLVM_ERROR : BassBoost_getParameter() invalid pValueSize2 %d", *pValueSize); return -EINVAL; } *pValueSize = sizeof(int16_t); break; default: - LOGV("\tLVM_ERROR : BassBoost_getParameter() invalid param %d", param); + ALOGV("\tLVM_ERROR : BassBoost_getParameter() invalid param %d", param); return -EINVAL; } @@ -1794,24 +1794,24 @@ int BassBoost_getParameter(EffectContext *pContext, case BASSBOOST_PARAM_STRENGTH_SUPPORTED: *(uint32_t *)pValue = 1; - //LOGV("\tBassBoost_getParameter() BASSBOOST_PARAM_STRENGTH_SUPPORTED Value is %d", + //ALOGV("\tBassBoost_getParameter() BASSBOOST_PARAM_STRENGTH_SUPPORTED Value is %d", // *(uint32_t *)pValue); break; case BASSBOOST_PARAM_STRENGTH: *(int16_t *)pValue = BassGetStrength(pContext); - //LOGV("\tBassBoost_getParameter() BASSBOOST_PARAM_STRENGTH Value is %d", + //ALOGV("\tBassBoost_getParameter() BASSBOOST_PARAM_STRENGTH Value is %d", // *(int16_t *)pValue); break; default: - LOGV("\tLVM_ERROR : BassBoost_getParameter() invalid param %d", param); + ALOGV("\tLVM_ERROR : BassBoost_getParameter() invalid param %d", param); status = -EINVAL; break; } - //LOGV("\tBassBoost_getParameter end"); + //ALOGV("\tBassBoost_getParameter end"); return status; } /* end BassBoost_getParameter */ @@ -1835,22 +1835,22 @@ int BassBoost_setParameter (EffectContext *pContext, void *pParam, void *pValue) int16_t strength; int32_t *pParamTemp = (int32_t *)pParam; - //LOGV("\tBassBoost_setParameter start"); + //ALOGV("\tBassBoost_setParameter start"); switch (*pParamTemp){ case BASSBOOST_PARAM_STRENGTH: strength = *(int16_t *)pValue; - //LOGV("\tBassBoost_setParameter() BASSBOOST_PARAM_STRENGTH value is %d", strength); - //LOGV("\tBassBoost_setParameter() Calling pBassBoost->BassSetStrength"); + //ALOGV("\tBassBoost_setParameter() BASSBOOST_PARAM_STRENGTH value is %d", strength); + //ALOGV("\tBassBoost_setParameter() Calling pBassBoost->BassSetStrength"); BassSetStrength(pContext, (int32_t)strength); - //LOGV("\tBassBoost_setParameter() Called pBassBoost->BassSetStrength"); + //ALOGV("\tBassBoost_setParameter() Called pBassBoost->BassSetStrength"); break; default: - LOGV("\tLVM_ERROR : BassBoost_setParameter() invalid param %d", *pParamTemp); + ALOGV("\tLVM_ERROR : BassBoost_setParameter() invalid param %d", *pParamTemp); break; } - //LOGV("\tBassBoost_setParameter end"); + //ALOGV("\tBassBoost_setParameter end"); return status; } /* end BassBoost_setParameter */ @@ -1885,26 +1885,26 @@ int Virtualizer_getParameter(EffectContext *pContext, int32_t param2; char *name; - //LOGV("\tVirtualizer_getParameter start"); + //ALOGV("\tVirtualizer_getParameter start"); switch (param){ case VIRTUALIZER_PARAM_STRENGTH_SUPPORTED: if (*pValueSize != sizeof(uint32_t)){ - LOGV("\tLVM_ERROR : Virtualizer_getParameter() invalid pValueSize %d",*pValueSize); + ALOGV("\tLVM_ERROR : Virtualizer_getParameter() invalid pValueSize %d",*pValueSize); return -EINVAL; } *pValueSize = sizeof(uint32_t); break; case VIRTUALIZER_PARAM_STRENGTH: if (*pValueSize != sizeof(int16_t)){ - LOGV("\tLVM_ERROR : Virtualizer_getParameter() invalid pValueSize2 %d",*pValueSize); + ALOGV("\tLVM_ERROR : Virtualizer_getParameter() invalid pValueSize2 %d",*pValueSize); return -EINVAL; } *pValueSize = sizeof(int16_t); break; default: - LOGV("\tLVM_ERROR : Virtualizer_getParameter() invalid param %d", param); + ALOGV("\tLVM_ERROR : Virtualizer_getParameter() invalid param %d", param); return -EINVAL; } @@ -1912,24 +1912,24 @@ int Virtualizer_getParameter(EffectContext *pContext, case VIRTUALIZER_PARAM_STRENGTH_SUPPORTED: *(uint32_t *)pValue = 1; - //LOGV("\tVirtualizer_getParameter() VIRTUALIZER_PARAM_STRENGTH_SUPPORTED Value is %d", + //ALOGV("\tVirtualizer_getParameter() VIRTUALIZER_PARAM_STRENGTH_SUPPORTED Value is %d", // *(uint32_t *)pValue); break; case VIRTUALIZER_PARAM_STRENGTH: *(int16_t *)pValue = VirtualizerGetStrength(pContext); - //LOGV("\tVirtualizer_getParameter() VIRTUALIZER_PARAM_STRENGTH Value is %d", + //ALOGV("\tVirtualizer_getParameter() VIRTUALIZER_PARAM_STRENGTH Value is %d", // *(int16_t *)pValue); break; default: - LOGV("\tLVM_ERROR : Virtualizer_getParameter() invalid param %d", param); + ALOGV("\tLVM_ERROR : Virtualizer_getParameter() invalid param %d", param); status = -EINVAL; break; } - //LOGV("\tVirtualizer_getParameter end"); + //ALOGV("\tVirtualizer_getParameter end"); return status; } /* end Virtualizer_getParameter */ @@ -1954,22 +1954,22 @@ int Virtualizer_setParameter (EffectContext *pContext, void *pParam, void *pValu int32_t *pParamTemp = (int32_t *)pParam; int32_t param = *pParamTemp++; - //LOGV("\tVirtualizer_setParameter start"); + //ALOGV("\tVirtualizer_setParameter start"); switch (param){ case VIRTUALIZER_PARAM_STRENGTH: strength = *(int16_t *)pValue; - //LOGV("\tVirtualizer_setParameter() VIRTUALIZER_PARAM_STRENGTH value is %d", strength); - //LOGV("\tVirtualizer_setParameter() Calling pVirtualizer->setStrength"); + //ALOGV("\tVirtualizer_setParameter() VIRTUALIZER_PARAM_STRENGTH value is %d", strength); + //ALOGV("\tVirtualizer_setParameter() Calling pVirtualizer->setStrength"); VirtualizerSetStrength(pContext, (int32_t)strength); - //LOGV("\tVirtualizer_setParameter() Called pVirtualizer->setStrength"); + //ALOGV("\tVirtualizer_setParameter() Called pVirtualizer->setStrength"); break; default: - LOGV("\tLVM_ERROR : Virtualizer_setParameter() invalid param %d", param); + ALOGV("\tLVM_ERROR : Virtualizer_setParameter() invalid param %d", param); break; } - //LOGV("\tVirtualizer_setParameter end"); + //ALOGV("\tVirtualizer_setParameter end"); return status; } /* end Virtualizer_setParameter */ @@ -2004,7 +2004,7 @@ int Equalizer_getParameter(EffectContext *pContext, int32_t param2; char *name; - //LOGV("\tEqualizer_getParameter start"); + //ALOGV("\tEqualizer_getParameter start"); switch (param) { case EQ_PARAM_NUM_BANDS: @@ -2013,7 +2013,7 @@ int Equalizer_getParameter(EffectContext *pContext, case EQ_PARAM_BAND_LEVEL: case EQ_PARAM_GET_BAND: if (*pValueSize < sizeof(int16_t)) { - LOGV("\tLVM_ERROR : Equalizer_getParameter() invalid pValueSize 1 %d", *pValueSize); + ALOGV("\tLVM_ERROR : Equalizer_getParameter() invalid pValueSize 1 %d", *pValueSize); return -EINVAL; } *pValueSize = sizeof(int16_t); @@ -2021,14 +2021,14 @@ int Equalizer_getParameter(EffectContext *pContext, case EQ_PARAM_LEVEL_RANGE: if (*pValueSize < 2 * sizeof(int16_t)) { - LOGV("\tLVM_ERROR : Equalizer_getParameter() invalid pValueSize 2 %d", *pValueSize); + ALOGV("\tLVM_ERROR : Equalizer_getParameter() invalid pValueSize 2 %d", *pValueSize); return -EINVAL; } *pValueSize = 2 * sizeof(int16_t); break; case EQ_PARAM_BAND_FREQ_RANGE: if (*pValueSize < 2 * sizeof(int32_t)) { - LOGV("\tLVM_ERROR : Equalizer_getParameter() invalid pValueSize 3 %d", *pValueSize); + ALOGV("\tLVM_ERROR : Equalizer_getParameter() invalid pValueSize 3 %d", *pValueSize); return -EINVAL; } *pValueSize = 2 * sizeof(int32_t); @@ -2036,7 +2036,7 @@ int Equalizer_getParameter(EffectContext *pContext, case EQ_PARAM_CENTER_FREQ: if (*pValueSize < sizeof(int32_t)) { - LOGV("\tLVM_ERROR : Equalizer_getParameter() invalid pValueSize 5 %d", *pValueSize); + ALOGV("\tLVM_ERROR : Equalizer_getParameter() invalid pValueSize 5 %d", *pValueSize); return -EINVAL; } *pValueSize = sizeof(int32_t); @@ -2047,27 +2047,27 @@ int Equalizer_getParameter(EffectContext *pContext, case EQ_PARAM_PROPERTIES: if (*pValueSize < (2 + FIVEBAND_NUMBANDS) * sizeof(uint16_t)) { - LOGV("\tLVM_ERROR : Equalizer_getParameter() invalid pValueSize 1 %d", *pValueSize); + ALOGV("\tLVM_ERROR : Equalizer_getParameter() invalid pValueSize 1 %d", *pValueSize); return -EINVAL; } *pValueSize = (2 + FIVEBAND_NUMBANDS) * sizeof(uint16_t); break; default: - LOGV("\tLVM_ERROR : Equalizer_getParameter unknown param %d", param); + ALOGV("\tLVM_ERROR : Equalizer_getParameter unknown param %d", param); return -EINVAL; } switch (param) { case EQ_PARAM_NUM_BANDS: *(uint16_t *)pValue = (uint16_t)FIVEBAND_NUMBANDS; - //LOGV("\tEqualizer_getParameter() EQ_PARAM_NUM_BANDS %d", *(int16_t *)pValue); + //ALOGV("\tEqualizer_getParameter() EQ_PARAM_NUM_BANDS %d", *(int16_t *)pValue); break; case EQ_PARAM_LEVEL_RANGE: *(int16_t *)pValue = -1500; *((int16_t *)pValue + 1) = 1500; - //LOGV("\tEqualizer_getParameter() EQ_PARAM_LEVEL_RANGE min %d, max %d", + //ALOGV("\tEqualizer_getParameter() EQ_PARAM_LEVEL_RANGE min %d, max %d", // *(int16_t *)pValue, *((int16_t *)pValue + 1)); break; @@ -2078,7 +2078,7 @@ int Equalizer_getParameter(EffectContext *pContext, break; } *(int16_t *)pValue = (int16_t)EqualizerGetBandLevel(pContext, param2); - //LOGV("\tEqualizer_getParameter() EQ_PARAM_BAND_LEVEL band %d, level %d", + //ALOGV("\tEqualizer_getParameter() EQ_PARAM_BAND_LEVEL band %d, level %d", // param2, *(int32_t *)pValue); break; @@ -2089,7 +2089,7 @@ int Equalizer_getParameter(EffectContext *pContext, break; } *(int32_t *)pValue = EqualizerGetCentreFrequency(pContext, param2); - //LOGV("\tEqualizer_getParameter() EQ_PARAM_CENTER_FREQ band %d, frequency %d", + //ALOGV("\tEqualizer_getParameter() EQ_PARAM_CENTER_FREQ band %d, frequency %d", // param2, *(int32_t *)pValue); break; @@ -2100,25 +2100,25 @@ int Equalizer_getParameter(EffectContext *pContext, break; } EqualizerGetBandFreqRange(pContext, param2, (uint32_t *)pValue, ((uint32_t *)pValue + 1)); - //LOGV("\tEqualizer_getParameter() EQ_PARAM_BAND_FREQ_RANGE band %d, min %d, max %d", + //ALOGV("\tEqualizer_getParameter() EQ_PARAM_BAND_FREQ_RANGE band %d, min %d, max %d", // param2, *(int32_t *)pValue, *((int32_t *)pValue + 1)); break; case EQ_PARAM_GET_BAND: param2 = *pParamTemp; *(uint16_t *)pValue = (uint16_t)EqualizerGetBand(pContext, param2); - //LOGV("\tEqualizer_getParameter() EQ_PARAM_GET_BAND frequency %d, band %d", + //ALOGV("\tEqualizer_getParameter() EQ_PARAM_GET_BAND frequency %d, band %d", // param2, *(uint16_t *)pValue); break; case EQ_PARAM_CUR_PRESET: *(uint16_t *)pValue = (uint16_t)EqualizerGetPreset(pContext); - //LOGV("\tEqualizer_getParameter() EQ_PARAM_CUR_PRESET %d", *(int32_t *)pValue); + //ALOGV("\tEqualizer_getParameter() EQ_PARAM_CUR_PRESET %d", *(int32_t *)pValue); break; case EQ_PARAM_GET_NUM_OF_PRESETS: *(uint16_t *)pValue = (uint16_t)EqualizerGetNumPresets(); - //LOGV("\tEqualizer_getParameter() EQ_PARAM_GET_NUM_OF_PRESETS %d", *(int16_t *)pValue); + //ALOGV("\tEqualizer_getParameter() EQ_PARAM_GET_NUM_OF_PRESETS %d", *(int16_t *)pValue); break; case EQ_PARAM_GET_PRESET_NAME: @@ -2132,13 +2132,13 @@ int Equalizer_getParameter(EffectContext *pContext, strncpy(name, EqualizerGetPresetName(param2), *pValueSize - 1); name[*pValueSize - 1] = 0; *pValueSize = strlen(name) + 1; - //LOGV("\tEqualizer_getParameter() EQ_PARAM_GET_PRESET_NAME preset %d, name %s len %d", + //ALOGV("\tEqualizer_getParameter() EQ_PARAM_GET_PRESET_NAME preset %d, name %s len %d", // param2, gEqualizerPresets[param2].name, *pValueSize); break; case EQ_PARAM_PROPERTIES: { int16_t *p = (int16_t *)pValue; - LOGV("\tEqualizer_getParameter() EQ_PARAM_PROPERTIES"); + ALOGV("\tEqualizer_getParameter() EQ_PARAM_PROPERTIES"); p[0] = (int16_t)EqualizerGetPreset(pContext); p[1] = (int16_t)FIVEBAND_NUMBANDS; for (int i = 0; i < FIVEBAND_NUMBANDS; i++) { @@ -2147,7 +2147,7 @@ int Equalizer_getParameter(EffectContext *pContext, } break; default: - LOGV("\tLVM_ERROR : Equalizer_getParameter() invalid param %d", param); + ALOGV("\tLVM_ERROR : Equalizer_getParameter() invalid param %d", param); status = -EINVAL; break; } @@ -2179,12 +2179,12 @@ int Equalizer_setParameter (EffectContext *pContext, void *pParam, void *pValue) int32_t param = *pParamTemp++; - //LOGV("\tEqualizer_setParameter start"); + //ALOGV("\tEqualizer_setParameter start"); switch (param) { case EQ_PARAM_CUR_PRESET: preset = (int32_t)(*(uint16_t *)pValue); - //LOGV("\tEqualizer_setParameter() EQ_PARAM_CUR_PRESET %d", preset); + //ALOGV("\tEqualizer_setParameter() EQ_PARAM_CUR_PRESET %d", preset); if ((preset >= EqualizerGetNumPresets())||(preset < 0)) { status = -EINVAL; break; @@ -2194,7 +2194,7 @@ int Equalizer_setParameter (EffectContext *pContext, void *pParam, void *pValue) case EQ_PARAM_BAND_LEVEL: band = *pParamTemp; level = (int32_t)(*(int16_t *)pValue); - //LOGV("\tEqualizer_setParameter() EQ_PARAM_BAND_LEVEL band %d, level %d", band, level); + //ALOGV("\tEqualizer_setParameter() EQ_PARAM_BAND_LEVEL band %d, level %d", band, level); if (band >= FIVEBAND_NUMBANDS) { status = -EINVAL; break; @@ -2202,7 +2202,7 @@ int Equalizer_setParameter (EffectContext *pContext, void *pParam, void *pValue) EqualizerSetBandLevel(pContext, band, level); break; case EQ_PARAM_PROPERTIES: { - //LOGV("\tEqualizer_setParameter() EQ_PARAM_PROPERTIES"); + //ALOGV("\tEqualizer_setParameter() EQ_PARAM_PROPERTIES"); int16_t *p = (int16_t *)pValue; if ((int)p[0] >= EqualizerGetNumPresets()) { status = -EINVAL; @@ -2221,12 +2221,12 @@ int Equalizer_setParameter (EffectContext *pContext, void *pParam, void *pValue) } } break; default: - LOGV("\tLVM_ERROR : Equalizer_setParameter() invalid param %d", param); + ALOGV("\tLVM_ERROR : Equalizer_setParameter() invalid param %d", param); status = -EINVAL; break; } - //LOGV("\tEqualizer_setParameter end"); + //ALOGV("\tEqualizer_setParameter end"); return status; } /* end Equalizer_setParameter */ @@ -2261,14 +2261,14 @@ int Volume_getParameter(EffectContext *pContext, int32_t param = *pParamTemp++;; char *name; - //LOGV("\tVolume_getParameter start"); + //ALOGV("\tVolume_getParameter start"); switch (param){ case VOLUME_PARAM_LEVEL: case VOLUME_PARAM_MAXLEVEL: case VOLUME_PARAM_STEREOPOSITION: if (*pValueSize != sizeof(int16_t)){ - LOGV("\tLVM_ERROR : Volume_getParameter() invalid pValueSize 1 %d", *pValueSize); + ALOGV("\tLVM_ERROR : Volume_getParameter() invalid pValueSize 1 %d", *pValueSize); return -EINVAL; } *pValueSize = sizeof(int16_t); @@ -2277,55 +2277,55 @@ int Volume_getParameter(EffectContext *pContext, case VOLUME_PARAM_MUTE: case VOLUME_PARAM_ENABLESTEREOPOSITION: if (*pValueSize < sizeof(int32_t)){ - LOGV("\tLVM_ERROR : Volume_getParameter() invalid pValueSize 2 %d", *pValueSize); + ALOGV("\tLVM_ERROR : Volume_getParameter() invalid pValueSize 2 %d", *pValueSize); return -EINVAL; } *pValueSize = sizeof(int32_t); break; default: - LOGV("\tLVM_ERROR : Volume_getParameter unknown param %d", param); + ALOGV("\tLVM_ERROR : Volume_getParameter unknown param %d", param); return -EINVAL; } switch (param){ case VOLUME_PARAM_LEVEL: status = VolumeGetVolumeLevel(pContext, (int16_t *)(pValue)); - //LOGV("\tVolume_getParameter() VOLUME_PARAM_LEVEL Value is %d", + //ALOGV("\tVolume_getParameter() VOLUME_PARAM_LEVEL Value is %d", // *(int16_t *)pValue); break; case VOLUME_PARAM_MAXLEVEL: *(int16_t *)pValue = 0; - //LOGV("\tVolume_getParameter() VOLUME_PARAM_MAXLEVEL Value is %d", + //ALOGV("\tVolume_getParameter() VOLUME_PARAM_MAXLEVEL Value is %d", // *(int16_t *)pValue); break; case VOLUME_PARAM_STEREOPOSITION: VolumeGetStereoPosition(pContext, (int16_t *)pValue); - //LOGV("\tVolume_getParameter() VOLUME_PARAM_STEREOPOSITION Value is %d", + //ALOGV("\tVolume_getParameter() VOLUME_PARAM_STEREOPOSITION Value is %d", // *(int16_t *)pValue); break; case VOLUME_PARAM_MUTE: status = VolumeGetMute(pContext, (uint32_t *)pValue); - LOGV("\tVolume_getParameter() VOLUME_PARAM_MUTE Value is %d", + ALOGV("\tVolume_getParameter() VOLUME_PARAM_MUTE Value is %d", *(uint32_t *)pValue); break; case VOLUME_PARAM_ENABLESTEREOPOSITION: *(int32_t *)pValue = pContext->pBundledContext->bStereoPositionEnabled; - //LOGV("\tVolume_getParameter() VOLUME_PARAM_ENABLESTEREOPOSITION Value is %d", + //ALOGV("\tVolume_getParameter() VOLUME_PARAM_ENABLESTEREOPOSITION Value is %d", // *(uint32_t *)pValue); break; default: - LOGV("\tLVM_ERROR : Volume_getParameter() invalid param %d", param); + ALOGV("\tLVM_ERROR : Volume_getParameter() invalid param %d", param); status = -EINVAL; break; } - //LOGV("\tVolume_getParameter end"); + //ALOGV("\tVolume_getParameter end"); return status; } /* end Volume_getParameter */ @@ -2354,46 +2354,46 @@ int Volume_setParameter (EffectContext *pContext, void *pParam, void *pValue){ int32_t *pParamTemp = (int32_t *)pParam; int32_t param = *pParamTemp++; - //LOGV("\tVolume_setParameter start"); + //ALOGV("\tVolume_setParameter start"); switch (param){ case VOLUME_PARAM_LEVEL: level = *(int16_t *)pValue; - //LOGV("\tVolume_setParameter() VOLUME_PARAM_LEVEL value is %d", level); - //LOGV("\tVolume_setParameter() Calling pVolume->setVolumeLevel"); + //ALOGV("\tVolume_setParameter() VOLUME_PARAM_LEVEL value is %d", level); + //ALOGV("\tVolume_setParameter() Calling pVolume->setVolumeLevel"); status = VolumeSetVolumeLevel(pContext, (int16_t)level); - //LOGV("\tVolume_setParameter() Called pVolume->setVolumeLevel"); + //ALOGV("\tVolume_setParameter() Called pVolume->setVolumeLevel"); break; case VOLUME_PARAM_MUTE: mute = *(uint32_t *)pValue; - //LOGV("\tVolume_setParameter() Calling pVolume->setMute, mute is %d", mute); - //LOGV("\tVolume_setParameter() Calling pVolume->setMute"); + //ALOGV("\tVolume_setParameter() Calling pVolume->setMute, mute is %d", mute); + //ALOGV("\tVolume_setParameter() Calling pVolume->setMute"); status = VolumeSetMute(pContext, mute); - //LOGV("\tVolume_setParameter() Called pVolume->setMute"); + //ALOGV("\tVolume_setParameter() Called pVolume->setMute"); break; case VOLUME_PARAM_ENABLESTEREOPOSITION: positionEnabled = *(uint32_t *)pValue; status = VolumeEnableStereoPosition(pContext, positionEnabled); status = VolumeSetStereoPosition(pContext, pContext->pBundledContext->positionSaved); - //LOGV("\tVolume_setParameter() VOLUME_PARAM_ENABLESTEREOPOSITION called"); + //ALOGV("\tVolume_setParameter() VOLUME_PARAM_ENABLESTEREOPOSITION called"); break; case VOLUME_PARAM_STEREOPOSITION: position = *(int16_t *)pValue; - //LOGV("\tVolume_setParameter() VOLUME_PARAM_STEREOPOSITION value is %d", position); - //LOGV("\tVolume_setParameter() Calling pVolume->VolumeSetStereoPosition"); + //ALOGV("\tVolume_setParameter() VOLUME_PARAM_STEREOPOSITION value is %d", position); + //ALOGV("\tVolume_setParameter() Calling pVolume->VolumeSetStereoPosition"); status = VolumeSetStereoPosition(pContext, (int16_t)position); - //LOGV("\tVolume_setParameter() Called pVolume->VolumeSetStereoPosition"); + //ALOGV("\tVolume_setParameter() Called pVolume->VolumeSetStereoPosition"); break; default: - LOGV("\tLVM_ERROR : Volume_setParameter() invalid param %d", param); + ALOGV("\tLVM_ERROR : Volume_setParameter() invalid param %d", param); break; } - //LOGV("\tVolume_setParameter end"); + //ALOGV("\tVolume_setParameter end"); return status; } /* end Volume_setParameter */ @@ -2459,7 +2459,7 @@ LVM_INT16 LVC_ToDB_s32Tos16(LVM_INT32 Lin_fix) int Effect_setEnabled(EffectContext *pContext, bool enabled) { - LOGV("\tEffect_setEnabled() type %d, enabled %d", pContext->EffectType, enabled); + ALOGV("\tEffect_setEnabled() type %d, enabled %d", pContext->EffectType, enabled); if (enabled) { // Bass boost or Virtualizer can be temporarily disabled if playing over device speaker due @@ -2468,7 +2468,7 @@ int Effect_setEnabled(EffectContext *pContext, bool enabled) switch (pContext->EffectType) { case LVM_BASS_BOOST: if (pContext->pBundledContext->bBassEnabled == LVM_TRUE) { - LOGV("\tEffect_setEnabled() LVM_BASS_BOOST is already enabled"); + ALOGV("\tEffect_setEnabled() LVM_BASS_BOOST is already enabled"); return -EINVAL; } if(pContext->pBundledContext->SamplesToExitCountBb <= 0){ @@ -2481,7 +2481,7 @@ int Effect_setEnabled(EffectContext *pContext, bool enabled) break; case LVM_EQUALIZER: if (pContext->pBundledContext->bEqualizerEnabled == LVM_TRUE) { - LOGV("\tEffect_setEnabled() LVM_EQUALIZER is already enabled"); + ALOGV("\tEffect_setEnabled() LVM_EQUALIZER is already enabled"); return -EINVAL; } if(pContext->pBundledContext->SamplesToExitCountEq <= 0){ @@ -2493,7 +2493,7 @@ int Effect_setEnabled(EffectContext *pContext, bool enabled) break; case LVM_VIRTUALIZER: if (pContext->pBundledContext->bVirtualizerEnabled == LVM_TRUE) { - LOGV("\tEffect_setEnabled() LVM_VIRTUALIZER is already enabled"); + ALOGV("\tEffect_setEnabled() LVM_VIRTUALIZER is already enabled"); return -EINVAL; } if(pContext->pBundledContext->SamplesToExitCountVirt <= 0){ @@ -2506,14 +2506,14 @@ int Effect_setEnabled(EffectContext *pContext, bool enabled) break; case LVM_VOLUME: if (pContext->pBundledContext->bVolumeEnabled == LVM_TRUE) { - LOGV("\tEffect_setEnabled() LVM_VOLUME is already enabled"); + ALOGV("\tEffect_setEnabled() LVM_VOLUME is already enabled"); return -EINVAL; } pContext->pBundledContext->NumberEffectsEnabled++; pContext->pBundledContext->bVolumeEnabled = LVM_TRUE; break; default: - LOGV("\tEffect_setEnabled() invalid effect type"); + ALOGV("\tEffect_setEnabled() invalid effect type"); return -EINVAL; } if (!tempDisabled) { @@ -2523,34 +2523,34 @@ int Effect_setEnabled(EffectContext *pContext, bool enabled) switch (pContext->EffectType) { case LVM_BASS_BOOST: if (pContext->pBundledContext->bBassEnabled == LVM_FALSE) { - LOGV("\tEffect_setEnabled() LVM_BASS_BOOST is already disabled"); + ALOGV("\tEffect_setEnabled() LVM_BASS_BOOST is already disabled"); return -EINVAL; } pContext->pBundledContext->bBassEnabled = LVM_FALSE; break; case LVM_EQUALIZER: if (pContext->pBundledContext->bEqualizerEnabled == LVM_FALSE) { - LOGV("\tEffect_setEnabled() LVM_EQUALIZER is already disabled"); + ALOGV("\tEffect_setEnabled() LVM_EQUALIZER is already disabled"); return -EINVAL; } pContext->pBundledContext->bEqualizerEnabled = LVM_FALSE; break; case LVM_VIRTUALIZER: if (pContext->pBundledContext->bVirtualizerEnabled == LVM_FALSE) { - LOGV("\tEffect_setEnabled() LVM_VIRTUALIZER is already disabled"); + ALOGV("\tEffect_setEnabled() LVM_VIRTUALIZER is already disabled"); return -EINVAL; } pContext->pBundledContext->bVirtualizerEnabled = LVM_FALSE; break; case LVM_VOLUME: if (pContext->pBundledContext->bVolumeEnabled == LVM_FALSE) { - LOGV("\tEffect_setEnabled() LVM_VOLUME is already disabled"); + ALOGV("\tEffect_setEnabled() LVM_VOLUME is already disabled"); return -EINVAL; } pContext->pBundledContext->bVolumeEnabled = LVM_FALSE; break; default: - LOGV("\tEffect_setEnabled() invalid effect type"); + ALOGV("\tEffect_setEnabled() invalid effect type"); return -EINVAL; } LvmEffect_disable(pContext); @@ -2595,77 +2595,77 @@ int Effect_process(effect_handle_t self, LVM_INT16 *in = (LVM_INT16 *)inBuffer->raw; LVM_INT16 *out = (LVM_INT16 *)outBuffer->raw; -//LOGV("\tEffect_process Start : Enabled = %d Called = %d (%8d %8d %8d)", +//ALOGV("\tEffect_process Start : Enabled = %d Called = %d (%8d %8d %8d)", //pContext->pBundledContext->NumberEffectsEnabled,pContext->pBundledContext->NumberEffectsCalled, // pContext->pBundledContext->SamplesToExitCountBb, // pContext->pBundledContext->SamplesToExitCountVirt, // pContext->pBundledContext->SamplesToExitCountEq); if (pContext == NULL){ - LOGV("\tLVM_ERROR : Effect_process() ERROR pContext == NULL"); + ALOGV("\tLVM_ERROR : Effect_process() ERROR pContext == NULL"); return -EINVAL; } //if(pContext->EffectType == LVM_BASS_BOOST){ - // LOGV("\tEffect_process: Effect type is BASS_BOOST"); + // ALOGV("\tEffect_process: Effect type is BASS_BOOST"); //}else if(pContext->EffectType == LVM_EQUALIZER){ - // LOGV("\tEffect_process: Effect type is LVM_EQUALIZER"); + // ALOGV("\tEffect_process: Effect type is LVM_EQUALIZER"); //}else if(pContext->EffectType == LVM_VIRTUALIZER){ - // LOGV("\tEffect_process: Effect type is LVM_VIRTUALIZER"); + // ALOGV("\tEffect_process: Effect type is LVM_VIRTUALIZER"); //} if (inBuffer == NULL || inBuffer->raw == NULL || outBuffer == NULL || outBuffer->raw == NULL || inBuffer->frameCount != outBuffer->frameCount){ - LOGV("\tLVM_ERROR : Effect_process() ERROR NULL INPUT POINTER OR FRAME COUNT IS WRONG"); + ALOGV("\tLVM_ERROR : Effect_process() ERROR NULL INPUT POINTER OR FRAME COUNT IS WRONG"); return -EINVAL; } if ((pContext->pBundledContext->bBassEnabled == LVM_FALSE)&& (pContext->EffectType == LVM_BASS_BOOST)){ - //LOGV("\tEffect_process() LVM_BASS_BOOST Effect is not enabled"); + //ALOGV("\tEffect_process() LVM_BASS_BOOST Effect is not enabled"); if(pContext->pBundledContext->SamplesToExitCountBb > 0){ pContext->pBundledContext->SamplesToExitCountBb -= outBuffer->frameCount * 2; // STEREO - //LOGV("\tEffect_process: Waiting to turn off BASS_BOOST, %d samples left", + //ALOGV("\tEffect_process: Waiting to turn off BASS_BOOST, %d samples left", // pContext->pBundledContext->SamplesToExitCountBb); } if(pContext->pBundledContext->SamplesToExitCountBb <= 0) { status = -ENODATA; pContext->pBundledContext->NumberEffectsEnabled--; - LOGV("\tEffect_process() this is the last frame for LVM_BASS_BOOST"); + ALOGV("\tEffect_process() this is the last frame for LVM_BASS_BOOST"); } } if ((pContext->pBundledContext->bVolumeEnabled == LVM_FALSE)&& (pContext->EffectType == LVM_VOLUME)){ - //LOGV("\tEffect_process() LVM_VOLUME Effect is not enabled"); + //ALOGV("\tEffect_process() LVM_VOLUME Effect is not enabled"); status = -ENODATA; pContext->pBundledContext->NumberEffectsEnabled--; } if ((pContext->pBundledContext->bEqualizerEnabled == LVM_FALSE)&& (pContext->EffectType == LVM_EQUALIZER)){ - //LOGV("\tEffect_process() LVM_EQUALIZER Effect is not enabled"); + //ALOGV("\tEffect_process() LVM_EQUALIZER Effect is not enabled"); if(pContext->pBundledContext->SamplesToExitCountEq > 0){ pContext->pBundledContext->SamplesToExitCountEq -= outBuffer->frameCount * 2; // STEREO - //LOGV("\tEffect_process: Waiting to turn off EQUALIZER, %d samples left", + //ALOGV("\tEffect_process: Waiting to turn off EQUALIZER, %d samples left", // pContext->pBundledContext->SamplesToExitCountEq); } if(pContext->pBundledContext->SamplesToExitCountEq <= 0) { status = -ENODATA; pContext->pBundledContext->NumberEffectsEnabled--; - LOGV("\tEffect_process() this is the last frame for LVM_EQUALIZER"); + ALOGV("\tEffect_process() this is the last frame for LVM_EQUALIZER"); } } if ((pContext->pBundledContext->bVirtualizerEnabled == LVM_FALSE)&& (pContext->EffectType == LVM_VIRTUALIZER)){ - //LOGV("\tEffect_process() LVM_VIRTUALIZER Effect is not enabled"); + //ALOGV("\tEffect_process() LVM_VIRTUALIZER Effect is not enabled"); if(pContext->pBundledContext->SamplesToExitCountVirt > 0){ pContext->pBundledContext->SamplesToExitCountVirt -= outBuffer->frameCount * 2;// STEREO - //LOGV("\tEffect_process: Waiting for to turn off VIRTUALIZER, %d samples left", + //ALOGV("\tEffect_process: Waiting for to turn off VIRTUALIZER, %d samples left", // pContext->pBundledContext->SamplesToExitCountVirt); } if(pContext->pBundledContext->SamplesToExitCountVirt <= 0) { status = -ENODATA; pContext->pBundledContext->NumberEffectsEnabled--; - LOGV("\tEffect_process() this is the last frame for LVM_VIRTUALIZER"); + ALOGV("\tEffect_process() this is the last frame for LVM_VIRTUALIZER"); } } @@ -2675,12 +2675,12 @@ int Effect_process(effect_handle_t self, if(pContext->pBundledContext->NumberEffectsCalled == pContext->pBundledContext->NumberEffectsEnabled){ - //LOGV("\tEffect_process Calling process with %d effects enabled, %d called: Effect %d", + //ALOGV("\tEffect_process Calling process with %d effects enabled, %d called: Effect %d", //pContext->pBundledContext->NumberEffectsEnabled, //pContext->pBundledContext->NumberEffectsCalled, pContext->EffectType); if(status == -ENODATA){ - LOGV("\tEffect_process() processing last frame"); + ALOGV("\tEffect_process() processing last frame"); } pContext->pBundledContext->NumberEffectsCalled = 0; /* Process all the available frames, block processing is @@ -2690,11 +2690,11 @@ int Effect_process(effect_handle_t self, outBuffer->frameCount, pContext); if(lvmStatus != LVM_SUCCESS){ - LOGV("\tLVM_ERROR : LvmBundle_process returned error %d", lvmStatus); + ALOGV("\tLVM_ERROR : LvmBundle_process returned error %d", lvmStatus); return lvmStatus; } } else { - //LOGV("\tEffect_process Not Calling process with %d effects enabled, %d called: Effect %d", + //ALOGV("\tEffect_process Not Calling process with %d effects enabled, %d called: Effect %d", //pContext->pBundledContext->NumberEffectsEnabled, //pContext->pBundledContext->NumberEffectsCalled, pContext->EffectType); // 2 is for stereo input @@ -2721,92 +2721,92 @@ int Effect_command(effect_handle_t self, EffectContext * pContext = (EffectContext *) self; int retsize; - //LOGV("\t\nEffect_command start"); + //ALOGV("\t\nEffect_command start"); if(pContext->EffectType == LVM_BASS_BOOST){ - //LOGV("\tEffect_command setting command for LVM_BASS_BOOST"); + //ALOGV("\tEffect_command setting command for LVM_BASS_BOOST"); } if(pContext->EffectType == LVM_VIRTUALIZER){ - //LOGV("\tEffect_command setting command for LVM_VIRTUALIZER"); + //ALOGV("\tEffect_command setting command for LVM_VIRTUALIZER"); } if(pContext->EffectType == LVM_EQUALIZER){ - //LOGV("\tEffect_command setting command for LVM_EQUALIZER"); + //ALOGV("\tEffect_command setting command for LVM_EQUALIZER"); } if(pContext->EffectType == LVM_VOLUME){ - //LOGV("\tEffect_command setting command for LVM_VOLUME"); + //ALOGV("\tEffect_command setting command for LVM_VOLUME"); } if (pContext == NULL){ - LOGV("\tLVM_ERROR : Effect_command ERROR pContext == NULL"); + ALOGV("\tLVM_ERROR : Effect_command ERROR pContext == NULL"); return -EINVAL; } - //LOGV("\tEffect_command INPUTS are: command %d cmdSize %d",cmdCode, cmdSize); + //ALOGV("\tEffect_command INPUTS are: command %d cmdSize %d",cmdCode, cmdSize); // Incase we disable an effect, next time process is // called the number of effect called could be greater // pContext->pBundledContext->NumberEffectsCalled = 0; - //LOGV("\tEffect_command NumberEffectsCalled = %d, NumberEffectsEnabled = %d", + //ALOGV("\tEffect_command NumberEffectsCalled = %d, NumberEffectsEnabled = %d", // pContext->pBundledContext->NumberEffectsCalled, // pContext->pBundledContext->NumberEffectsEnabled); switch (cmdCode){ case EFFECT_CMD_INIT: if (pReplyData == NULL || *replySize != sizeof(int)){ - LOGV("\tLVM_ERROR, EFFECT_CMD_INIT: ERROR for effect type %d", + ALOGV("\tLVM_ERROR, EFFECT_CMD_INIT: ERROR for effect type %d", pContext->EffectType); return -EINVAL; } *(int *) pReplyData = 0; - //LOGV("\tEffect_command cmdCode Case: EFFECT_CMD_INIT start"); + //ALOGV("\tEffect_command cmdCode Case: EFFECT_CMD_INIT start"); if(pContext->EffectType == LVM_BASS_BOOST){ - //LOGV("\tEffect_command cmdCode Case: EFFECT_CMD_INIT for LVM_BASS_BOOST"); + //ALOGV("\tEffect_command cmdCode Case: EFFECT_CMD_INIT for LVM_BASS_BOOST"); android::BassSetStrength(pContext, 0); } if(pContext->EffectType == LVM_VIRTUALIZER){ - //LOGV("\tEffect_command cmdCode Case: EFFECT_CMD_INIT for LVM_VIRTUALIZER"); + //ALOGV("\tEffect_command cmdCode Case: EFFECT_CMD_INIT for LVM_VIRTUALIZER"); android::VirtualizerSetStrength(pContext, 0); } if(pContext->EffectType == LVM_EQUALIZER){ - //LOGV("\tEffect_command cmdCode Case: EFFECT_CMD_INIT for LVM_EQUALIZER"); + //ALOGV("\tEffect_command cmdCode Case: EFFECT_CMD_INIT for LVM_EQUALIZER"); android::EqualizerSetPreset(pContext, 0); } if(pContext->EffectType == LVM_VOLUME){ - //LOGV("\tEffect_command cmdCode Case: EFFECT_CMD_INIT for LVM_VOLUME"); + //ALOGV("\tEffect_command cmdCode Case: EFFECT_CMD_INIT for LVM_VOLUME"); *(int *) pReplyData = android::VolumeSetVolumeLevel(pContext, 0); } break; case EFFECT_CMD_CONFIGURE: - //LOGV("\tEffect_command cmdCode Case: EFFECT_CMD_CONFIGURE start"); + //ALOGV("\tEffect_command cmdCode Case: EFFECT_CMD_CONFIGURE start"); if (pCmdData == NULL|| cmdSize != sizeof(effect_config_t)|| pReplyData == NULL|| *replySize != sizeof(int)){ - LOGV("\tLVM_ERROR : Effect_command cmdCode Case: " + ALOGV("\tLVM_ERROR : Effect_command cmdCode Case: " "EFFECT_CMD_CONFIGURE: ERROR"); return -EINVAL; } *(int *) pReplyData = android::Effect_configure(pContext, (effect_config_t *) pCmdData); - //LOGV("\tEffect_command cmdCode Case: EFFECT_CMD_CONFIGURE end"); + //ALOGV("\tEffect_command cmdCode Case: EFFECT_CMD_CONFIGURE end"); break; case EFFECT_CMD_RESET: - //LOGV("\tEffect_command cmdCode Case: EFFECT_CMD_RESET start"); + //ALOGV("\tEffect_command cmdCode Case: EFFECT_CMD_RESET start"); android::Effect_configure(pContext, &pContext->config); - //LOGV("\tEffect_command cmdCode Case: EFFECT_CMD_RESET end"); + //ALOGV("\tEffect_command cmdCode Case: EFFECT_CMD_RESET end"); break; case EFFECT_CMD_GET_PARAM:{ - //LOGV("\tEffect_command cmdCode Case: EFFECT_CMD_GET_PARAM start"); + //ALOGV("\tEffect_command cmdCode Case: EFFECT_CMD_GET_PARAM start"); if(pContext->EffectType == LVM_BASS_BOOST){ if (pCmdData == NULL || cmdSize < (int)(sizeof(effect_param_t) + sizeof(int32_t)) || pReplyData == NULL || *replySize < (int) (sizeof(effect_param_t) + sizeof(int32_t))){ - LOGV("\tLVM_ERROR : BassBoost_command cmdCode Case: " + ALOGV("\tLVM_ERROR : BassBoost_command cmdCode Case: " "EFFECT_CMD_GET_PARAM: ERROR"); return -EINVAL; } @@ -2825,7 +2825,7 @@ int Effect_command(effect_handle_t self, *replySize = sizeof(effect_param_t) + voffset + p->vsize; - //LOGV("\tBassBoost_command EFFECT_CMD_GET_PARAM " + //ALOGV("\tBassBoost_command EFFECT_CMD_GET_PARAM " // "*pCmdData %d, *replySize %d, *pReplyData %d ", // *(int32_t *)((char *)pCmdData + sizeof(effect_param_t)), // *replySize, @@ -2837,7 +2837,7 @@ int Effect_command(effect_handle_t self, cmdSize < (int)(sizeof(effect_param_t) + sizeof(int32_t)) || pReplyData == NULL || *replySize < (int) (sizeof(effect_param_t) + sizeof(int32_t))){ - LOGV("\tLVM_ERROR : Virtualizer_command cmdCode Case: " + ALOGV("\tLVM_ERROR : Virtualizer_command cmdCode Case: " "EFFECT_CMD_GET_PARAM: ERROR"); return -EINVAL; } @@ -2856,20 +2856,20 @@ int Effect_command(effect_handle_t self, *replySize = sizeof(effect_param_t) + voffset + p->vsize; - //LOGV("\tVirtualizer_command EFFECT_CMD_GET_PARAM " + //ALOGV("\tVirtualizer_command EFFECT_CMD_GET_PARAM " // "*pCmdData %d, *replySize %d, *pReplyData %d ", // *(int32_t *)((char *)pCmdData + sizeof(effect_param_t)), // *replySize, // *(int16_t *)((char *)pReplyData + sizeof(effect_param_t) + voffset)); } if(pContext->EffectType == LVM_EQUALIZER){ - //LOGV("\tEqualizer_command cmdCode Case: " + //ALOGV("\tEqualizer_command cmdCode Case: " // "EFFECT_CMD_GET_PARAM start"); if (pCmdData == NULL || cmdSize < (int)(sizeof(effect_param_t) + sizeof(int32_t)) || pReplyData == NULL || *replySize < (int) (sizeof(effect_param_t) + sizeof(int32_t))) { - LOGV("\tLVM_ERROR : Equalizer_command cmdCode Case: " + ALOGV("\tLVM_ERROR : Equalizer_command cmdCode Case: " "EFFECT_CMD_GET_PARAM"); return -EINVAL; } @@ -2888,7 +2888,7 @@ int Effect_command(effect_handle_t self, *replySize = sizeof(effect_param_t) + voffset + p->vsize; - //LOGV("\tEqualizer_command EFFECT_CMD_GET_PARAM *pCmdData %d, *replySize %d, " + //ALOGV("\tEqualizer_command EFFECT_CMD_GET_PARAM *pCmdData %d, *replySize %d, " // "*pReplyData %08x %08x", // *(int32_t *)((char *)pCmdData + sizeof(effect_param_t)), *replySize, // *(int32_t *)((char *)pReplyData + sizeof(effect_param_t) + voffset), @@ -2896,12 +2896,12 @@ int Effect_command(effect_handle_t self, // sizeof(int32_t))); } if(pContext->EffectType == LVM_VOLUME){ - //LOGV("\tVolume_command cmdCode Case: EFFECT_CMD_GET_PARAM start"); + //ALOGV("\tVolume_command cmdCode Case: EFFECT_CMD_GET_PARAM start"); if (pCmdData == NULL || cmdSize < (int)(sizeof(effect_param_t) + sizeof(int32_t)) || pReplyData == NULL || *replySize < (int) (sizeof(effect_param_t) + sizeof(int32_t))){ - LOGV("\tLVM_ERROR : Volume_command cmdCode Case: " + ALOGV("\tLVM_ERROR : Volume_command cmdCode Case: " "EFFECT_CMD_GET_PARAM: ERROR"); return -EINVAL; } @@ -2920,18 +2920,18 @@ int Effect_command(effect_handle_t self, *replySize = sizeof(effect_param_t) + voffset + p->vsize; - //LOGV("\tVolume_command EFFECT_CMD_GET_PARAM " + //ALOGV("\tVolume_command EFFECT_CMD_GET_PARAM " // "*pCmdData %d, *replySize %d, *pReplyData %d ", // *(int32_t *)((char *)pCmdData + sizeof(effect_param_t)), // *replySize, // *(int16_t *)((char *)pReplyData + sizeof(effect_param_t) + voffset)); } - //LOGV("\tEffect_command cmdCode Case: EFFECT_CMD_GET_PARAM end"); + //ALOGV("\tEffect_command cmdCode Case: EFFECT_CMD_GET_PARAM end"); } break; case EFFECT_CMD_SET_PARAM:{ - //LOGV("\tEffect_command cmdCode Case: EFFECT_CMD_SET_PARAM start"); + //ALOGV("\tEffect_command cmdCode Case: EFFECT_CMD_SET_PARAM start"); if(pContext->EffectType == LVM_BASS_BOOST){ - //LOGV("\tBassBoost_command EFFECT_CMD_SET_PARAM param %d, *replySize %d, value %d", + //ALOGV("\tBassBoost_command EFFECT_CMD_SET_PARAM param %d, *replySize %d, value %d", // *(int32_t *)((char *)pCmdData + sizeof(effect_param_t)), // *replySize, // *(int16_t *)((char *)pCmdData + sizeof(effect_param_t) + sizeof(int32_t))); @@ -2940,19 +2940,19 @@ int Effect_command(effect_handle_t self, cmdSize != (int)(sizeof(effect_param_t) + sizeof(int32_t) +sizeof(int16_t))|| pReplyData == NULL|| *replySize != sizeof(int32_t)){ - LOGV("\tLVM_ERROR : BassBoost_command cmdCode Case: " + ALOGV("\tLVM_ERROR : BassBoost_command cmdCode Case: " "EFFECT_CMD_SET_PARAM: ERROR"); return -EINVAL; } effect_param_t *p = (effect_param_t *) pCmdData; if (p->psize != sizeof(int32_t)){ - LOGV("\tLVM_ERROR : BassBoost_command cmdCode Case: " + ALOGV("\tLVM_ERROR : BassBoost_command cmdCode Case: " "EFFECT_CMD_SET_PARAM: ERROR, psize is not sizeof(int32_t)"); return -EINVAL; } - //LOGV("\tnBassBoost_command cmdSize is %d\n" + //ALOGV("\tnBassBoost_command cmdSize is %d\n" // "\tsizeof(effect_param_t) is %d\n" // "\tp->psize is %d\n" // "\tp->vsize is %d" @@ -2964,7 +2964,7 @@ int Effect_command(effect_handle_t self, p->data + p->psize); } if(pContext->EffectType == LVM_VIRTUALIZER){ - //LOGV("\tVirtualizer_command EFFECT_CMD_SET_PARAM param %d, *replySize %d, value %d", + //ALOGV("\tVirtualizer_command EFFECT_CMD_SET_PARAM param %d, *replySize %d, value %d", // *(int32_t *)((char *)pCmdData + sizeof(effect_param_t)), // *replySize, // *(int16_t *)((char *)pCmdData + sizeof(effect_param_t) + sizeof(int32_t))); @@ -2973,19 +2973,19 @@ int Effect_command(effect_handle_t self, cmdSize != (int)(sizeof(effect_param_t) + sizeof(int32_t) +sizeof(int16_t))|| pReplyData == NULL|| *replySize != sizeof(int32_t)){ - LOGV("\tLVM_ERROR : Virtualizer_command cmdCode Case: " + ALOGV("\tLVM_ERROR : Virtualizer_command cmdCode Case: " "EFFECT_CMD_SET_PARAM: ERROR"); return -EINVAL; } effect_param_t *p = (effect_param_t *) pCmdData; if (p->psize != sizeof(int32_t)){ - LOGV("\tLVM_ERROR : Virtualizer_command cmdCode Case: " + ALOGV("\tLVM_ERROR : Virtualizer_command cmdCode Case: " "EFFECT_CMD_SET_PARAM: ERROR, psize is not sizeof(int32_t)"); return -EINVAL; } - //LOGV("\tnVirtualizer_command cmdSize is %d\n" + //ALOGV("\tnVirtualizer_command cmdSize is %d\n" // "\tsizeof(effect_param_t) is %d\n" // "\tp->psize is %d\n" // "\tp->vsize is %d" @@ -2997,16 +2997,16 @@ int Effect_command(effect_handle_t self, p->data + p->psize); } if(pContext->EffectType == LVM_EQUALIZER){ - //LOGV("\tEqualizer_command cmdCode Case: " + //ALOGV("\tEqualizer_command cmdCode Case: " // "EFFECT_CMD_SET_PARAM start"); - //LOGV("\tEqualizer_command EFFECT_CMD_SET_PARAM param %d, *replySize %d, value %d ", + //ALOGV("\tEqualizer_command EFFECT_CMD_SET_PARAM param %d, *replySize %d, value %d ", // *(int32_t *)((char *)pCmdData + sizeof(effect_param_t)), // *replySize, // *(int16_t *)((char *)pCmdData + sizeof(effect_param_t) + sizeof(int32_t))); if (pCmdData == NULL || cmdSize < (int)(sizeof(effect_param_t) + sizeof(int32_t)) || pReplyData == NULL || *replySize != sizeof(int32_t)) { - LOGV("\tLVM_ERROR : Equalizer_command cmdCode Case: " + ALOGV("\tLVM_ERROR : Equalizer_command cmdCode Case: " "EFFECT_CMD_SET_PARAM: ERROR"); return -EINVAL; } @@ -3017,8 +3017,8 @@ int Effect_command(effect_handle_t self, p->data + p->psize); } if(pContext->EffectType == LVM_VOLUME){ - //LOGV("\tVolume_command cmdCode Case: EFFECT_CMD_SET_PARAM start"); - //LOGV("\tVolume_command EFFECT_CMD_SET_PARAM param %d, *replySize %d, value %d ", + //ALOGV("\tVolume_command cmdCode Case: EFFECT_CMD_SET_PARAM start"); + //ALOGV("\tVolume_command EFFECT_CMD_SET_PARAM param %d, *replySize %d, value %d ", // *(int32_t *)((char *)pCmdData + sizeof(effect_param_t)), // *replySize, // *(int16_t *)((char *)pCmdData + sizeof(effect_param_t) +sizeof(int32_t))); @@ -3027,7 +3027,7 @@ int Effect_command(effect_handle_t self, cmdSize < (int)(sizeof(effect_param_t) + sizeof(int32_t))|| pReplyData == NULL|| *replySize != sizeof(int32_t)){ - LOGV("\tLVM_ERROR : Volume_command cmdCode Case: " + ALOGV("\tLVM_ERROR : Volume_command cmdCode Case: " "EFFECT_CMD_SET_PARAM: ERROR"); return -EINVAL; } @@ -3037,13 +3037,13 @@ int Effect_command(effect_handle_t self, (void *)p->data, p->data + p->psize); } - //LOGV("\tEffect_command cmdCode Case: EFFECT_CMD_SET_PARAM end"); + //ALOGV("\tEffect_command cmdCode Case: EFFECT_CMD_SET_PARAM end"); } break; case EFFECT_CMD_ENABLE: - LOGV("\tEffect_command cmdCode Case: EFFECT_CMD_ENABLE start"); + ALOGV("\tEffect_command cmdCode Case: EFFECT_CMD_ENABLE start"); if (pReplyData == NULL || *replySize != sizeof(int)){ - LOGV("\tLVM_ERROR : Effect_command cmdCode Case: EFFECT_CMD_ENABLE: ERROR"); + ALOGV("\tLVM_ERROR : Effect_command cmdCode Case: EFFECT_CMD_ENABLE: ERROR"); return -EINVAL; } @@ -3051,9 +3051,9 @@ int Effect_command(effect_handle_t self, break; case EFFECT_CMD_DISABLE: - //LOGV("\tEffect_command cmdCode Case: EFFECT_CMD_DISABLE start"); + //ALOGV("\tEffect_command cmdCode Case: EFFECT_CMD_DISABLE start"); if (pReplyData == NULL || *replySize != sizeof(int)){ - LOGV("\tLVM_ERROR : Effect_command cmdCode Case: EFFECT_CMD_DISABLE: ERROR"); + ALOGV("\tLVM_ERROR : Effect_command cmdCode Case: EFFECT_CMD_DISABLE: ERROR"); return -EINVAL; } *(int *)pReplyData = android::Effect_setEnabled(pContext, LVM_FALSE); @@ -3061,37 +3061,37 @@ int Effect_command(effect_handle_t self, case EFFECT_CMD_SET_DEVICE: { - LOGV("\tEffect_command cmdCode Case: EFFECT_CMD_SET_DEVICE start"); + ALOGV("\tEffect_command cmdCode Case: EFFECT_CMD_SET_DEVICE start"); uint32_t device = *(uint32_t *)pCmdData; if (pContext->EffectType == LVM_BASS_BOOST) { if((device == AUDIO_DEVICE_OUT_SPEAKER) || (device == AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT) || (device == AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER)){ - LOGV("\tEFFECT_CMD_SET_DEVICE device is invalid for LVM_BASS_BOOST %d", + ALOGV("\tEFFECT_CMD_SET_DEVICE device is invalid for LVM_BASS_BOOST %d", *(int32_t *)pCmdData); - LOGV("\tEFFECT_CMD_SET_DEVICE temporary disable LVM_BAS_BOOST"); + ALOGV("\tEFFECT_CMD_SET_DEVICE temporary disable LVM_BAS_BOOST"); // If a device doesnt support bassboost the effect must be temporarily disabled // the effect must still report its original state as this can only be changed // by the ENABLE/DISABLE command if (pContext->pBundledContext->bBassEnabled == LVM_TRUE) { - LOGV("\tEFFECT_CMD_SET_DEVICE disable LVM_BASS_BOOST %d", - *(int32_t *)pCmdData); + ALOGV("\tEFFECT_CMD_SET_DEVICE disable LVM_BASS_BOOST %d", + *(int32_t *)pCmdData); android::LvmEffect_disable(pContext); } pContext->pBundledContext->bBassTempDisabled = LVM_TRUE; } else { - LOGV("\tEFFECT_CMD_SET_DEVICE device is valid for LVM_BASS_BOOST %d", - *(int32_t *)pCmdData); + ALOGV("\tEFFECT_CMD_SET_DEVICE device is valid for LVM_BASS_BOOST %d", + *(int32_t *)pCmdData); // If a device supports bassboost and the effect has been temporarily disabled // previously then re-enable it if (pContext->pBundledContext->bBassEnabled == LVM_TRUE) { - LOGV("\tEFFECT_CMD_SET_DEVICE re-enable LVM_BASS_BOOST %d", - *(int32_t *)pCmdData); + ALOGV("\tEFFECT_CMD_SET_DEVICE re-enable LVM_BASS_BOOST %d", + *(int32_t *)pCmdData); android::LvmEffect_enable(pContext); } pContext->pBundledContext->bBassTempDisabled = LVM_FALSE; @@ -3101,36 +3101,36 @@ int Effect_command(effect_handle_t self, if((device == AUDIO_DEVICE_OUT_SPEAKER)|| (device == AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT)|| (device == AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER)){ - LOGV("\tEFFECT_CMD_SET_DEVICE device is invalid for LVM_VIRTUALIZER %d", + ALOGV("\tEFFECT_CMD_SET_DEVICE device is invalid for LVM_VIRTUALIZER %d", *(int32_t *)pCmdData); - LOGV("\tEFFECT_CMD_SET_DEVICE temporary disable LVM_VIRTUALIZER"); + ALOGV("\tEFFECT_CMD_SET_DEVICE temporary disable LVM_VIRTUALIZER"); //If a device doesnt support virtualizer the effect must be temporarily disabled // the effect must still report its original state as this can only be changed // by the ENABLE/DISABLE command if (pContext->pBundledContext->bVirtualizerEnabled == LVM_TRUE) { - LOGV("\tEFFECT_CMD_SET_DEVICE disable LVM_VIRTUALIZER %d", + ALOGV("\tEFFECT_CMD_SET_DEVICE disable LVM_VIRTUALIZER %d", *(int32_t *)pCmdData); android::LvmEffect_disable(pContext); } pContext->pBundledContext->bVirtualizerTempDisabled = LVM_TRUE; } else { - LOGV("\tEFFECT_CMD_SET_DEVICE device is valid for LVM_VIRTUALIZER %d", + ALOGV("\tEFFECT_CMD_SET_DEVICE device is valid for LVM_VIRTUALIZER %d", *(int32_t *)pCmdData); // If a device supports virtualizer and the effect has been temporarily disabled // previously then re-enable it if(pContext->pBundledContext->bVirtualizerEnabled == LVM_TRUE){ - LOGV("\tEFFECT_CMD_SET_DEVICE re-enable LVM_VIRTUALIZER %d", + ALOGV("\tEFFECT_CMD_SET_DEVICE re-enable LVM_VIRTUALIZER %d", *(int32_t *)pCmdData); android::LvmEffect_enable(pContext); } pContext->pBundledContext->bVirtualizerTempDisabled = LVM_FALSE; } } - LOGV("\tEffect_command cmdCode Case: EFFECT_CMD_SET_DEVICE end"); + ALOGV("\tEffect_command cmdCode Case: EFFECT_CMD_SET_DEVICE end"); break; } case EFFECT_CMD_SET_VOLUME: @@ -3150,7 +3150,7 @@ int Effect_command(effect_handle_t self, if (pCmdData == NULL || cmdSize != 2 * sizeof(uint32_t)) { - LOGV("\tLVM_ERROR : Effect_command cmdCode Case: " + ALOGV("\tLVM_ERROR : Effect_command cmdCode Case: " "EFFECT_CMD_SET_VOLUME: ERROR"); return -EINVAL; } @@ -3176,12 +3176,12 @@ int Effect_command(effect_handle_t self, if(rightdB > maxdB){ maxdB = rightdB; } - //LOGV("\tEFFECT_CMD_SET_VOLUME Session: %d, SessionID: %d VOLUME is %d dB (%d), " + //ALOGV("\tEFFECT_CMD_SET_VOLUME Session: %d, SessionID: %d VOLUME is %d dB (%d), " // "effect is %d", //pContext->pBundledContext->SessionNo, pContext->pBundledContext->SessionId, //(int32_t)maxdB, maxVol<<7, pContext->EffectType); - //LOGV("\tEFFECT_CMD_SET_VOLUME: Left is %d, Right is %d", leftVolume, rightVolume); - //LOGV("\tEFFECT_CMD_SET_VOLUME: Left %ddB, Right %ddB, Position %ddB", + //ALOGV("\tEFFECT_CMD_SET_VOLUME: Left is %d, Right is %d", leftVolume, rightVolume); + //ALOGV("\tEFFECT_CMD_SET_VOLUME: Left %ddB, Right %ddB, Position %ddB", // leftdB, rightdB, pandB); memcpy(pReplyData, vol_ret, sizeof(int32_t)*2); @@ -3194,7 +3194,7 @@ int Effect_command(effect_handle_t self, /* Volume parameters */ ActiveParams.VC_Balance = pandB; - LOGV("\t\tVolumeSetStereoPosition() (-96dB -> +96dB)-> %d\n", ActiveParams.VC_Balance ); + ALOGV("\t\tVolumeSetStereoPosition() (-96dB -> +96dB)-> %d\n", ActiveParams.VC_Balance ); /* Activate the initial settings */ LvmStatus =LVM_SetControlParameters(pContext->pBundledContext->hInstance,&ActiveParams); @@ -3208,7 +3208,7 @@ int Effect_command(effect_handle_t self, return -EINVAL; } - //LOGV("\tEffect_command end...\n\n"); + //ALOGV("\tEffect_command end...\n\n"); return 0; } /* end Effect_command */ @@ -3220,7 +3220,7 @@ int Effect_getDescriptor(effect_handle_t self, const effect_descriptor_t *desc; if (pContext == NULL || pDescriptor == NULL) { - LOGV("Effect_getDescriptor() invalid param"); + ALOGV("Effect_getDescriptor() invalid param"); return -EINVAL; } diff --git a/media/libeffects/lvm/wrapper/Reverb/EffectReverb.cpp b/media/libeffects/lvm/wrapper/Reverb/EffectReverb.cpp index 663f8ff..1825aab 100755 --- a/media/libeffects/lvm/wrapper/Reverb/EffectReverb.cpp +++ b/media/libeffects/lvm/wrapper/Reverb/EffectReverb.cpp @@ -32,15 +32,15 @@ extern "C" const struct effect_interface_s gReverbInterface; #define LVM_ERROR_CHECK(LvmStatus, callingFunc, calledFunc){\ if (LvmStatus == LVREV_NULLADDRESS){\ - LOGV("\tLVREV_ERROR : Parameter error - "\ + ALOGV("\tLVREV_ERROR : Parameter error - "\ "null pointer returned by %s in %s\n\n\n\n", callingFunc, calledFunc);\ }\ if (LvmStatus == LVREV_INVALIDNUMSAMPLES){\ - LOGV("\tLVREV_ERROR : Parameter error - "\ + ALOGV("\tLVREV_ERROR : Parameter error - "\ "bad number of samples returned by %s in %s\n\n\n\n", callingFunc, calledFunc);\ }\ if (LvmStatus == LVREV_OUTOFRANGE){\ - LOGV("\tLVREV_ERROR : Parameter error - "\ + ALOGV("\tLVREV_ERROR : Parameter error - "\ "out of range returned by %s in %s\n", callingFunc, calledFunc);\ }\ } @@ -185,27 +185,27 @@ int Reverb_LoadPreset (ReverbContext *pContext); /* Effect Library Interface Implementation */ extern "C" int EffectQueryNumberEffects(uint32_t *pNumEffects){ - LOGV("\n\tEffectQueryNumberEffects start"); + ALOGV("\n\tEffectQueryNumberEffects start"); *pNumEffects = sizeof(gDescriptors) / sizeof(const effect_descriptor_t *); - LOGV("\tEffectQueryNumberEffects creating %d effects", *pNumEffects); - LOGV("\tEffectQueryNumberEffects end\n"); + ALOGV("\tEffectQueryNumberEffects creating %d effects", *pNumEffects); + ALOGV("\tEffectQueryNumberEffects end\n"); return 0; } /* end EffectQueryNumberEffects */ extern "C" int EffectQueryEffect(uint32_t index, effect_descriptor_t *pDescriptor){ - LOGV("\n\tEffectQueryEffect start"); - LOGV("\tEffectQueryEffect processing index %d", index); + ALOGV("\n\tEffectQueryEffect start"); + ALOGV("\tEffectQueryEffect processing index %d", index); if (pDescriptor == NULL){ - LOGV("\tLVM_ERROR : EffectQueryEffect was passed NULL pointer"); + ALOGV("\tLVM_ERROR : EffectQueryEffect was passed NULL pointer"); return -EINVAL; } if (index >= sizeof(gDescriptors) / sizeof(const effect_descriptor_t *)) { - LOGV("\tLVM_ERROR : EffectQueryEffect index out of range %d", index); + ALOGV("\tLVM_ERROR : EffectQueryEffect index out of range %d", index); return -ENOENT; } memcpy(pDescriptor, gDescriptors[index], sizeof(effect_descriptor_t)); - LOGV("\tEffectQueryEffect end\n"); + ALOGV("\tEffectQueryEffect end\n"); return 0; } /* end EffectQueryEffect */ @@ -218,10 +218,10 @@ extern "C" int EffectCreate(effect_uuid_t *uuid, int length = sizeof(gDescriptors) / sizeof(const effect_descriptor_t *); const effect_descriptor_t *desc; - LOGV("\t\nEffectCreate start"); + ALOGV("\t\nEffectCreate start"); if (pHandle == NULL || uuid == NULL){ - LOGV("\tLVM_ERROR : EffectCreate() called with NULL pointer"); + ALOGV("\tLVM_ERROR : EffectCreate() called with NULL pointer"); return -EINVAL; } @@ -229,7 +229,7 @@ extern "C" int EffectCreate(effect_uuid_t *uuid, desc = gDescriptors[i]; if (memcmp(uuid, &desc->uuid, sizeof(effect_uuid_t)) == 0) { - LOGV("\tEffectCreate - UUID matched Reverb type %d, UUID = %x", i, desc->uuid.timeLow); + ALOGV("\tEffectCreate - UUID matched Reverb type %d, UUID = %x", i, desc->uuid.timeLow); break; } } @@ -246,9 +246,9 @@ extern "C" int EffectCreate(effect_uuid_t *uuid, pContext->auxiliary = false; if ((desc->flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_AUXILIARY){ pContext->auxiliary = true; - LOGV("\tEffectCreate - AUX"); + ALOGV("\tEffectCreate - AUX"); }else{ - LOGV("\tEffectCreate - INS"); + ALOGV("\tEffectCreate - INS"); } pContext->preset = false; @@ -257,16 +257,16 @@ extern "C" int EffectCreate(effect_uuid_t *uuid, // force reloading preset at first call to process() pContext->curPreset = REVERB_PRESET_LAST + 1; pContext->nextPreset = REVERB_DEFAULT_PRESET; - LOGV("\tEffectCreate - PRESET"); + ALOGV("\tEffectCreate - PRESET"); }else{ - LOGV("\tEffectCreate - ENVIRONMENTAL"); + ALOGV("\tEffectCreate - ENVIRONMENTAL"); } - LOGV("\tEffectCreate - Calling Reverb_init"); + ALOGV("\tEffectCreate - Calling Reverb_init"); ret = Reverb_init(pContext); if (ret < 0){ - LOGV("\tLVM_ERROR : EffectCreate() init failed"); + ALOGV("\tLVM_ERROR : EffectCreate() init failed"); delete pContext; return ret; } @@ -291,17 +291,17 @@ extern "C" int EffectCreate(effect_uuid_t *uuid, pContext->InFrames32 = (LVM_INT32 *)malloc(LVREV_MAX_FRAME_SIZE * sizeof(LVM_INT32) * 2); pContext->OutFrames32 = (LVM_INT32 *)malloc(LVREV_MAX_FRAME_SIZE * sizeof(LVM_INT32) * 2); - LOGV("\tEffectCreate %p, size %d", pContext, sizeof(ReverbContext)); - LOGV("\tEffectCreate end\n"); + ALOGV("\tEffectCreate %p, size %d", pContext, sizeof(ReverbContext)); + ALOGV("\tEffectCreate end\n"); return 0; } /* end EffectCreate */ extern "C" int EffectRelease(effect_handle_t handle){ ReverbContext * pContext = (ReverbContext *)handle; - LOGV("\tEffectRelease %p", handle); + ALOGV("\tEffectRelease %p", handle); if (pContext == NULL){ - LOGV("\tLVM_ERROR : EffectRelease called with NULL pointer"); + ALOGV("\tLVM_ERROR : EffectRelease called with NULL pointer"); return -EINVAL; } @@ -322,14 +322,14 @@ extern "C" int EffectGetDescriptor(effect_uuid_t *uuid, int length = sizeof(gDescriptors) / sizeof(const effect_descriptor_t *); if (pDescriptor == NULL || uuid == NULL){ - LOGV("EffectGetDescriptor() called with NULL pointer"); + ALOGV("EffectGetDescriptor() called with NULL pointer"); return -EINVAL; } for (i = 0; i < length; i++) { if (memcmp(uuid, &gDescriptors[i]->uuid, sizeof(effect_uuid_t)) == 0) { memcpy(pDescriptor, gDescriptors[i], sizeof(effect_descriptor_t)); - LOGV("EffectGetDescriptor - UUID matched Reverb type %d, UUID = %x", + ALOGV("EffectGetDescriptor - UUID matched Reverb type %d, UUID = %x", i, gDescriptors[i]->uuid.timeLow); return 0; } @@ -341,7 +341,7 @@ extern "C" int EffectGetDescriptor(effect_uuid_t *uuid, /* local functions */ #define CHECK_ARG(cond) { \ if (!(cond)) { \ - LOGV("\tLVM_ERROR : Invalid argument: "#cond); \ + ALOGV("\tLVM_ERROR : Invalid argument: "#cond); \ return -EINVAL; \ } \ } @@ -444,7 +444,7 @@ int process( LVM_INT16 *pIn, if (pContext->config.inputCfg.channels == AUDIO_CHANNEL_OUT_STEREO) { samplesPerFrame = 2; } else if (pContext->config.inputCfg.channels != AUDIO_CHANNEL_OUT_MONO) { - LOGV("\tLVREV_ERROR : process invalid PCM format"); + ALOGV("\tLVREV_ERROR : process invalid PCM format"); return -EINVAL; } @@ -452,7 +452,7 @@ int process( LVM_INT16 *pIn, // Check for NULL pointers if((pContext->InFrames32 == NULL)||(pContext->OutFrames32 == NULL)){ - LOGV("\tLVREV_ERROR : process failed to allocate memory for temporary buffers "); + ALOGV("\tLVREV_ERROR : process failed to allocate memory for temporary buffers "); return -EINVAL; } @@ -485,7 +485,7 @@ int process( LVM_INT16 *pIn, } else { if(pContext->bEnabled == LVM_FALSE && pContext->SamplesToExitCount > 0) { memset(pContext->InFrames32,0,frameCount * sizeof(LVM_INT32) * samplesPerFrame); - LOGV("\tZeroing %d samples per frame at the end of call", samplesPerFrame); + ALOGV("\tZeroing %d samples per frame at the end of call", samplesPerFrame); } /* Process the samples, producing a stereo output */ @@ -552,12 +552,12 @@ int process( LVM_INT16 *pIn, // Accumulate if required if (pContext->config.outputCfg.accessMode == EFFECT_BUFFER_ACCESS_ACCUMULATE){ - //LOGV("\tBuffer access is ACCUMULATE"); + //ALOGV("\tBuffer access is ACCUMULATE"); for (int i=0; i<frameCount*2; i++){ //always stereo here pOut[i] = clamp16((int32_t)pOut[i] + (int32_t)OutFrames16[i]); } }else{ - //LOGV("\tBuffer access is WRITE"); + //ALOGV("\tBuffer access is WRITE"); memcpy(pOut, OutFrames16, frameCount*sizeof(LVM_INT16)*2); } @@ -592,15 +592,15 @@ void Reverb_free(ReverbContext *pContext){ for (int i=0; i<LVM_NR_MEMORY_REGIONS; i++){ if (MemTab.Region[i].Size != 0){ if (MemTab.Region[i].pBaseAddress != NULL){ - LOGV("\tfree() - START freeing %ld bytes for region %u at %p\n", + ALOGV("\tfree() - START freeing %ld bytes for region %u at %p\n", MemTab.Region[i].Size, i, MemTab.Region[i].pBaseAddress); free(MemTab.Region[i].pBaseAddress); - LOGV("\tfree() - END freeing %ld bytes for region %u at %p\n", + ALOGV("\tfree() - END freeing %ld bytes for region %u at %p\n", MemTab.Region[i].Size, i, MemTab.Region[i].pBaseAddress); }else{ - LOGV("\tLVM_ERROR : free() - trying to free with NULL pointer %ld bytes " + ALOGV("\tLVM_ERROR : free() - trying to free with NULL pointer %ld bytes " "for region %u at %p ERROR\n", MemTab.Region[i].Size, i, MemTab.Region[i].pBaseAddress); } @@ -624,7 +624,7 @@ void Reverb_free(ReverbContext *pContext){ int Reverb_configure(ReverbContext *pContext, effect_config_t *pConfig){ LVM_Fs_en SampleRate; - //LOGV("\tReverb_configure start"); + //ALOGV("\tReverb_configure start"); CHECK_ARG(pContext != NULL); CHECK_ARG(pConfig != NULL); @@ -642,7 +642,7 @@ int Reverb_configure(ReverbContext *pContext, effect_config_t *pConfig){ return -EINVAL; } - //LOGV("\tReverb_configure calling memcpy"); + //ALOGV("\tReverb_configure calling memcpy"); memcpy(&pContext->config, pConfig, sizeof(effect_config_t)); @@ -666,7 +666,7 @@ int Reverb_configure(ReverbContext *pContext, effect_config_t *pConfig){ SampleRate = LVM_FS_48000; break; default: - LOGV("\rReverb_Configure invalid sampling rate %d", pConfig->inputCfg.samplingRate); + ALOGV("\rReverb_Configure invalid sampling rate %d", pConfig->inputCfg.samplingRate); return -EINVAL; } @@ -675,7 +675,7 @@ int Reverb_configure(ReverbContext *pContext, effect_config_t *pConfig){ LVREV_ControlParams_st ActiveParams; LVREV_ReturnStatus_en LvmStatus = LVREV_SUCCESS; - //LOGV("\tReverb_configure change sampling rate to %d", SampleRate); + //ALOGV("\tReverb_configure change sampling rate to %d", SampleRate); /* Get the current settings */ LvmStatus = LVREV_GetControlParameters(pContext->hInstance, @@ -687,13 +687,13 @@ int Reverb_configure(ReverbContext *pContext, effect_config_t *pConfig){ LvmStatus = LVREV_SetControlParameters(pContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVREV_SetControlParameters", "Reverb_configure") - //LOGV("\tReverb_configure Succesfully called LVREV_SetControlParameters\n"); + //ALOGV("\tReverb_configure Succesfully called LVREV_SetControlParameters\n"); }else{ - //LOGV("\tReverb_configure keep sampling rate at %d", SampleRate); + //ALOGV("\tReverb_configure keep sampling rate at %d", SampleRate); } - //LOGV("\tReverb_configure End"); + //ALOGV("\tReverb_configure End"); return 0; } /* end Reverb_configure */ @@ -713,7 +713,7 @@ int Reverb_configure(ReverbContext *pContext, effect_config_t *pConfig){ int Reverb_init(ReverbContext *pContext){ int status; - LOGV("\tReverb_init start"); + ALOGV("\tReverb_init start"); CHECK_ARG(pContext != NULL); @@ -768,7 +768,7 @@ int Reverb_init(ReverbContext *pContext){ LVM_ERROR_CHECK(LvmStatus, "LVREV_GetMemoryTable", "Reverb_init") if(LvmStatus != LVREV_SUCCESS) return -EINVAL; - LOGV("\tCreateInstance Succesfully called LVM_GetMemoryTable\n"); + ALOGV("\tCreateInstance Succesfully called LVM_GetMemoryTable\n"); /* Allocate memory */ for (int i=0; i<LVM_NR_MEMORY_REGIONS; i++){ @@ -776,11 +776,11 @@ int Reverb_init(ReverbContext *pContext){ MemTab.Region[i].pBaseAddress = malloc(MemTab.Region[i].Size); if (MemTab.Region[i].pBaseAddress == LVM_NULL){ - LOGV("\tLVREV_ERROR :Reverb_init CreateInstance Failed to allocate %ld " + ALOGV("\tLVREV_ERROR :Reverb_init CreateInstance Failed to allocate %ld " "bytes for region %u\n", MemTab.Region[i].Size, i ); bMallocFailure = LVM_TRUE; }else{ - LOGV("\tReverb_init CreateInstance allocate %ld bytes for region %u at %p\n", + ALOGV("\tReverb_init CreateInstance allocate %ld bytes for region %u at %p\n", MemTab.Region[i].Size, i, MemTab.Region[i].pBaseAddress); } } @@ -792,10 +792,10 @@ int Reverb_init(ReverbContext *pContext){ if(bMallocFailure == LVM_TRUE){ for (int i=0; i<LVM_NR_MEMORY_REGIONS; i++){ if (MemTab.Region[i].pBaseAddress == LVM_NULL){ - LOGV("\tLVM_ERROR :Reverb_init CreateInstance Failed to allocate %ld bytes " + ALOGV("\tLVM_ERROR :Reverb_init CreateInstance Failed to allocate %ld bytes " "for region %u - Not freeing\n", MemTab.Region[i].Size, i ); }else{ - LOGV("\tLVM_ERROR :Reverb_init CreateInstance Failed: but allocated %ld bytes " + ALOGV("\tLVM_ERROR :Reverb_init CreateInstance Failed: but allocated %ld bytes " "for region %u at %p- free\n", MemTab.Region[i].Size, i, MemTab.Region[i].pBaseAddress); free(MemTab.Region[i].pBaseAddress); @@ -803,7 +803,7 @@ int Reverb_init(ReverbContext *pContext){ } return -EINVAL; } - LOGV("\tReverb_init CreateInstance Succesfully malloc'd memory\n"); + ALOGV("\tReverb_init CreateInstance Succesfully malloc'd memory\n"); /* Initialise */ pContext->hInstance = LVM_NULL; @@ -816,7 +816,7 @@ int Reverb_init(ReverbContext *pContext){ LVM_ERROR_CHECK(LvmStatus, "LVM_GetInstanceHandle", "Reverb_init") if(LvmStatus != LVREV_SUCCESS) return -EINVAL; - LOGV("\tReverb_init CreateInstance Succesfully called LVM_GetInstanceHandle\n"); + ALOGV("\tReverb_init CreateInstance Succesfully called LVM_GetInstanceHandle\n"); /* Set the initial process parameters */ /* General parameters */ @@ -860,8 +860,8 @@ int Reverb_init(ReverbContext *pContext){ LVM_ERROR_CHECK(LvmStatus, "LVREV_SetControlParameters", "Reverb_init") if(LvmStatus != LVREV_SUCCESS) return -EINVAL; - LOGV("\tReverb_init CreateInstance Succesfully called LVREV_SetControlParameters\n"); - LOGV("\tReverb_init End"); + ALOGV("\tReverb_init CreateInstance Succesfully called LVREV_SetControlParameters\n"); + ALOGV("\tReverb_init End"); return 0; } /* end Reverb_init */ @@ -960,7 +960,7 @@ int16_t ReverbConvertHfLevel(int16_t Hflevel){ //---------------------------------------------------------------------------- void ReverbSetRoomHfLevel(ReverbContext *pContext, int16_t level){ - //LOGV("\tReverbSetRoomHfLevel start (%d)", level); + //ALOGV("\tReverbSetRoomHfLevel start (%d)", level); LVREV_ControlParams_st ActiveParams; /* Current control Parameters */ LVREV_ReturnStatus_en LvmStatus=LVREV_SUCCESS; /* Function call status */ @@ -968,17 +968,17 @@ void ReverbSetRoomHfLevel(ReverbContext *pContext, int16_t level){ /* Get the current settings */ LvmStatus = LVREV_GetControlParameters(pContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVREV_GetControlParameters", "ReverbSetRoomHfLevel") - //LOGV("\tReverbSetRoomHfLevel Succesfully returned from LVM_GetControlParameters\n"); - //LOGV("\tReverbSetRoomHfLevel() just Got -> %d\n", ActiveParams.LPF); + //ALOGV("\tReverbSetRoomHfLevel Succesfully returned from LVM_GetControlParameters\n"); + //ALOGV("\tReverbSetRoomHfLevel() just Got -> %d\n", ActiveParams.LPF); ActiveParams.LPF = ReverbConvertHfLevel(level); /* Activate the initial settings */ LvmStatus = LVREV_SetControlParameters(pContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVREV_SetControlParameters", "ReverbSetRoomHfLevel") - //LOGV("\tReverbSetRoomhfLevel() just Set -> %d\n", ActiveParams.LPF); + //ALOGV("\tReverbSetRoomhfLevel() just Set -> %d\n", ActiveParams.LPF); pContext->SavedHfLevel = level; - //LOGV("\tReverbSetHfRoomLevel end.. saving %d", pContext->SavedHfLevel); + //ALOGV("\tReverbSetHfRoomLevel end.. saving %d", pContext->SavedHfLevel); return; } @@ -995,7 +995,7 @@ void ReverbSetRoomHfLevel(ReverbContext *pContext, int16_t level){ int16_t ReverbGetRoomHfLevel(ReverbContext *pContext){ int16_t level; - //LOGV("\tReverbGetRoomHfLevel start, saved level is %d", pContext->SavedHfLevel); + //ALOGV("\tReverbGetRoomHfLevel start, saved level is %d", pContext->SavedHfLevel); LVREV_ControlParams_st ActiveParams; /* Current control Parameters */ LVREV_ReturnStatus_en LvmStatus=LVREV_SUCCESS; /* Function call status */ @@ -1003,20 +1003,20 @@ int16_t ReverbGetRoomHfLevel(ReverbContext *pContext){ /* Get the current settings */ LvmStatus = LVREV_GetControlParameters(pContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVREV_GetControlParameters", "ReverbGetRoomHfLevel") - //LOGV("\tReverbGetRoomHfLevel Succesfully returned from LVM_GetControlParameters\n"); - //LOGV("\tReverbGetRoomHfLevel() just Got -> %d\n", ActiveParams.LPF); + //ALOGV("\tReverbGetRoomHfLevel Succesfully returned from LVM_GetControlParameters\n"); + //ALOGV("\tReverbGetRoomHfLevel() just Got -> %d\n", ActiveParams.LPF); level = ReverbConvertHfLevel(pContext->SavedHfLevel); - //LOGV("\tReverbGetRoomHfLevel() ActiveParams.LPFL %d, pContext->SavedHfLevel: %d, " + //ALOGV("\tReverbGetRoomHfLevel() ActiveParams.LPFL %d, pContext->SavedHfLevel: %d, " // "converted level: %d\n", ActiveParams.LPF, pContext->SavedHfLevel, level); if(ActiveParams.LPF != level){ - LOGV("\tLVM_ERROR : (ignore at start up) ReverbGetRoomHfLevel() has wrong level -> %d %d\n", + ALOGV("\tLVM_ERROR : (ignore at start up) ReverbGetRoomHfLevel() has wrong level -> %d %d\n", ActiveParams.Level, level); } - //LOGV("\tReverbGetRoomHfLevel end"); + //ALOGV("\tReverbGetRoomHfLevel end"); return pContext->SavedHfLevel; } @@ -1033,7 +1033,7 @@ int16_t ReverbGetRoomHfLevel(ReverbContext *pContext){ //---------------------------------------------------------------------------- void ReverbSetReverbLevel(ReverbContext *pContext, int16_t level){ - //LOGV("\n\tReverbSetReverbLevel start (%d)", level); + //ALOGV("\n\tReverbSetReverbLevel start (%d)", level); LVREV_ControlParams_st ActiveParams; /* Current control Parameters */ LVREV_ReturnStatus_en LvmStatus=LVREV_SUCCESS; /* Function call status */ @@ -1042,25 +1042,25 @@ void ReverbSetReverbLevel(ReverbContext *pContext, int16_t level){ /* Get the current settings */ LvmStatus = LVREV_GetControlParameters(pContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVREV_GetControlParameters", "ReverbSetReverbLevel") - //LOGV("\tReverbSetReverbLevel Succesfully returned from LVM_GetControlParameters\n"); - //LOGV("\tReverbSetReverbLevel just Got -> %d\n", ActiveParams.Level); + //ALOGV("\tReverbSetReverbLevel Succesfully returned from LVM_GetControlParameters\n"); + //ALOGV("\tReverbSetReverbLevel just Got -> %d\n", ActiveParams.Level); // needs to subtract max levels for both RoomLevel and ReverbLevel CombinedLevel = (level + pContext->SavedRoomLevel)-LVREV_MAX_REVERB_LEVEL; - //LOGV("\tReverbSetReverbLevel() CombinedLevel is %d = %d + %d\n", + //ALOGV("\tReverbSetReverbLevel() CombinedLevel is %d = %d + %d\n", // CombinedLevel, level, pContext->SavedRoomLevel); ActiveParams.Level = ReverbConvertLevel(CombinedLevel); - //LOGV("\tReverbSetReverbLevel() Trying to set -> %d\n", ActiveParams.Level); + //ALOGV("\tReverbSetReverbLevel() Trying to set -> %d\n", ActiveParams.Level); /* Activate the initial settings */ LvmStatus = LVREV_SetControlParameters(pContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVREV_SetControlParameters", "ReverbSetReverbLevel") - //LOGV("\tReverbSetReverbLevel() just Set -> %d\n", ActiveParams.Level); + //ALOGV("\tReverbSetReverbLevel() just Set -> %d\n", ActiveParams.Level); pContext->SavedReverbLevel = level; - //LOGV("\tReverbSetReverbLevel end pContext->SavedReverbLevel is %d\n\n", + //ALOGV("\tReverbSetReverbLevel end pContext->SavedReverbLevel is %d\n\n", // pContext->SavedReverbLevel); return; } @@ -1078,7 +1078,7 @@ void ReverbSetReverbLevel(ReverbContext *pContext, int16_t level){ int16_t ReverbGetReverbLevel(ReverbContext *pContext){ int16_t level; - //LOGV("\tReverbGetReverbLevel start"); + //ALOGV("\tReverbGetReverbLevel start"); LVREV_ControlParams_st ActiveParams; /* Current control Parameters */ LVREV_ReturnStatus_en LvmStatus=LVREV_SUCCESS; /* Function call status */ @@ -1087,26 +1087,26 @@ int16_t ReverbGetReverbLevel(ReverbContext *pContext){ /* Get the current settings */ LvmStatus = LVREV_GetControlParameters(pContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVREV_GetControlParameters", "ReverbGetReverbLevel") - //LOGV("\tReverbGetReverbLevel Succesfully returned from LVM_GetControlParameters\n"); - //LOGV("\tReverbGetReverbLevel() just Got -> %d\n", ActiveParams.Level); + //ALOGV("\tReverbGetReverbLevel Succesfully returned from LVM_GetControlParameters\n"); + //ALOGV("\tReverbGetReverbLevel() just Got -> %d\n", ActiveParams.Level); // needs to subtract max levels for both RoomLevel and ReverbLevel CombinedLevel = (pContext->SavedReverbLevel + pContext->SavedRoomLevel)-LVREV_MAX_REVERB_LEVEL; - //LOGV("\tReverbGetReverbLevel() CombinedLevel is %d = %d + %d\n", + //ALOGV("\tReverbGetReverbLevel() CombinedLevel is %d = %d + %d\n", //CombinedLevel, pContext->SavedReverbLevel, pContext->SavedRoomLevel); level = ReverbConvertLevel(CombinedLevel); - //LOGV("\tReverbGetReverbLevel(): ActiveParams.Level: %d, pContext->SavedReverbLevel: %d, " + //ALOGV("\tReverbGetReverbLevel(): ActiveParams.Level: %d, pContext->SavedReverbLevel: %d, " //"pContext->SavedRoomLevel: %d, CombinedLevel: %d, converted level: %d\n", //ActiveParams.Level, pContext->SavedReverbLevel,pContext->SavedRoomLevel, CombinedLevel,level); if(ActiveParams.Level != level){ - LOGV("\tLVM_ERROR : (ignore at start up) ReverbGetReverbLevel() has wrong level -> %d %d\n", + ALOGV("\tLVM_ERROR : (ignore at start up) ReverbGetReverbLevel() has wrong level -> %d %d\n", ActiveParams.Level, level); } - //LOGV("\tReverbGetReverbLevel end\n"); + //ALOGV("\tReverbGetReverbLevel end\n"); return pContext->SavedReverbLevel; } @@ -1124,7 +1124,7 @@ int16_t ReverbGetReverbLevel(ReverbContext *pContext){ //---------------------------------------------------------------------------- void ReverbSetRoomLevel(ReverbContext *pContext, int16_t level){ - //LOGV("\tReverbSetRoomLevel start (%d)", level); + //ALOGV("\tReverbSetRoomLevel start (%d)", level); LVREV_ControlParams_st ActiveParams; /* Current control Parameters */ LVREV_ReturnStatus_en LvmStatus=LVREV_SUCCESS; /* Function call status */ @@ -1133,8 +1133,8 @@ void ReverbSetRoomLevel(ReverbContext *pContext, int16_t level){ /* Get the current settings */ LvmStatus = LVREV_GetControlParameters(pContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVREV_GetControlParameters", "ReverbSetRoomLevel") - //LOGV("\tReverbSetRoomLevel Succesfully returned from LVM_GetControlParameters\n"); - //LOGV("\tReverbSetRoomLevel() just Got -> %d\n", ActiveParams.Level); + //ALOGV("\tReverbSetRoomLevel Succesfully returned from LVM_GetControlParameters\n"); + //ALOGV("\tReverbSetRoomLevel() just Got -> %d\n", ActiveParams.Level); // needs to subtract max levels for both RoomLevel and ReverbLevel CombinedLevel = (level + pContext->SavedReverbLevel)-LVREV_MAX_REVERB_LEVEL; @@ -1143,10 +1143,10 @@ void ReverbSetRoomLevel(ReverbContext *pContext, int16_t level){ /* Activate the initial settings */ LvmStatus = LVREV_SetControlParameters(pContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVREV_SetControlParameters", "ReverbSetRoomLevel") - //LOGV("\tReverbSetRoomLevel() just Set -> %d\n", ActiveParams.Level); + //ALOGV("\tReverbSetRoomLevel() just Set -> %d\n", ActiveParams.Level); pContext->SavedRoomLevel = level; - //LOGV("\tReverbSetRoomLevel end"); + //ALOGV("\tReverbSetRoomLevel end"); return; } @@ -1163,7 +1163,7 @@ void ReverbSetRoomLevel(ReverbContext *pContext, int16_t level){ int16_t ReverbGetRoomLevel(ReverbContext *pContext){ int16_t level; - //LOGV("\tReverbGetRoomLevel start"); + //ALOGV("\tReverbGetRoomLevel start"); LVREV_ControlParams_st ActiveParams; /* Current control Parameters */ LVREV_ReturnStatus_en LvmStatus=LVREV_SUCCESS; /* Function call status */ @@ -1172,24 +1172,24 @@ int16_t ReverbGetRoomLevel(ReverbContext *pContext){ /* Get the current settings */ LvmStatus = LVREV_GetControlParameters(pContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVREV_GetControlParameters", "ReverbGetRoomLevel") - //LOGV("\tReverbGetRoomLevel Succesfully returned from LVM_GetControlParameters\n"); - //LOGV("\tReverbGetRoomLevel() just Got -> %d\n", ActiveParams.Level); + //ALOGV("\tReverbGetRoomLevel Succesfully returned from LVM_GetControlParameters\n"); + //ALOGV("\tReverbGetRoomLevel() just Got -> %d\n", ActiveParams.Level); // needs to subtract max levels for both RoomLevel and ReverbLevel CombinedLevel = (pContext->SavedRoomLevel + pContext->SavedReverbLevel-LVREV_MAX_REVERB_LEVEL); level = ReverbConvertLevel(CombinedLevel); - //LOGV("\tReverbGetRoomLevel, Level = %d, pContext->SavedRoomLevel = %d, " + //ALOGV("\tReverbGetRoomLevel, Level = %d, pContext->SavedRoomLevel = %d, " // "pContext->SavedReverbLevel = %d, CombinedLevel = %d, level = %d", // ActiveParams.Level, pContext->SavedRoomLevel, // pContext->SavedReverbLevel, CombinedLevel, level); if(ActiveParams.Level != level){ - LOGV("\tLVM_ERROR : (ignore at start up) ReverbGetRoomLevel() has wrong level -> %d %d\n", + ALOGV("\tLVM_ERROR : (ignore at start up) ReverbGetRoomLevel() has wrong level -> %d %d\n", ActiveParams.Level, level); } - //LOGV("\tReverbGetRoomLevel end"); + //ALOGV("\tReverbGetRoomLevel end"); return pContext->SavedRoomLevel; } @@ -1206,7 +1206,7 @@ int16_t ReverbGetRoomLevel(ReverbContext *pContext){ //---------------------------------------------------------------------------- void ReverbSetDecayTime(ReverbContext *pContext, uint32_t time){ - //LOGV("\tReverbSetDecayTime start (%d)", time); + //ALOGV("\tReverbSetDecayTime start (%d)", time); LVREV_ControlParams_st ActiveParams; /* Current control Parameters */ LVREV_ReturnStatus_en LvmStatus=LVREV_SUCCESS; /* Function call status */ @@ -1214,8 +1214,8 @@ void ReverbSetDecayTime(ReverbContext *pContext, uint32_t time){ /* Get the current settings */ LvmStatus = LVREV_GetControlParameters(pContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVREV_GetControlParameters", "ReverbSetDecayTime") - //LOGV("\tReverbSetDecayTime Succesfully returned from LVM_GetControlParameters\n"); - //LOGV("\tReverbSetDecayTime() just Got -> %d\n", ActiveParams.T60); + //ALOGV("\tReverbSetDecayTime Succesfully returned from LVM_GetControlParameters\n"); + //ALOGV("\tReverbSetDecayTime() just Got -> %d\n", ActiveParams.T60); if (time <= LVREV_MAX_T60) { ActiveParams.T60 = (LVM_UINT16)time; @@ -1227,12 +1227,12 @@ void ReverbSetDecayTime(ReverbContext *pContext, uint32_t time){ /* Activate the initial settings */ LvmStatus = LVREV_SetControlParameters(pContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVREV_SetControlParameters", "ReverbSetDecayTime") - //LOGV("\tReverbSetDecayTime() just Set -> %d\n", ActiveParams.T60); + //ALOGV("\tReverbSetDecayTime() just Set -> %d\n", ActiveParams.T60); pContext->SamplesToExitCount = (ActiveParams.T60 * pContext->config.inputCfg.samplingRate)/1000; - //LOGV("\tReverbSetDecayTime() just Set SamplesToExitCount-> %d\n",pContext->SamplesToExitCount); + //ALOGV("\tReverbSetDecayTime() just Set SamplesToExitCount-> %d\n",pContext->SamplesToExitCount); pContext->SavedDecayTime = (int16_t)time; - //LOGV("\tReverbSetDecayTime end"); + //ALOGV("\tReverbSetDecayTime end"); return; } @@ -1248,7 +1248,7 @@ void ReverbSetDecayTime(ReverbContext *pContext, uint32_t time){ //---------------------------------------------------------------------------- uint32_t ReverbGetDecayTime(ReverbContext *pContext){ - //LOGV("\tReverbGetDecayTime start"); + //ALOGV("\tReverbGetDecayTime start"); LVREV_ControlParams_st ActiveParams; /* Current control Parameters */ LVREV_ReturnStatus_en LvmStatus=LVREV_SUCCESS; /* Function call status */ @@ -1256,16 +1256,16 @@ uint32_t ReverbGetDecayTime(ReverbContext *pContext){ /* Get the current settings */ LvmStatus = LVREV_GetControlParameters(pContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVREV_GetControlParameters", "ReverbGetDecayTime") - //LOGV("\tReverbGetDecayTime Succesfully returned from LVM_GetControlParameters\n"); - //LOGV("\tReverbGetDecayTime() just Got -> %d\n", ActiveParams.T60); + //ALOGV("\tReverbGetDecayTime Succesfully returned from LVM_GetControlParameters\n"); + //ALOGV("\tReverbGetDecayTime() just Got -> %d\n", ActiveParams.T60); if(ActiveParams.T60 != pContext->SavedDecayTime){ // This will fail if the decay time is set to more than 7000 - LOGV("\tLVM_ERROR : ReverbGetDecayTime() has wrong level -> %d %d\n", + ALOGV("\tLVM_ERROR : ReverbGetDecayTime() has wrong level -> %d %d\n", ActiveParams.T60, pContext->SavedDecayTime); } - //LOGV("\tReverbGetDecayTime end"); + //ALOGV("\tReverbGetDecayTime end"); return (uint32_t)ActiveParams.T60; } @@ -1282,7 +1282,7 @@ uint32_t ReverbGetDecayTime(ReverbContext *pContext){ //---------------------------------------------------------------------------- void ReverbSetDecayHfRatio(ReverbContext *pContext, int16_t ratio){ - //LOGV("\tReverbSetDecayHfRatioe start (%d)", ratio); + //ALOGV("\tReverbSetDecayHfRatioe start (%d)", ratio); LVREV_ControlParams_st ActiveParams; /* Current control Parameters */ LVREV_ReturnStatus_en LvmStatus=LVREV_SUCCESS; /* Function call status */ @@ -1290,18 +1290,18 @@ void ReverbSetDecayHfRatio(ReverbContext *pContext, int16_t ratio){ /* Get the current settings */ LvmStatus = LVREV_GetControlParameters(pContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVREV_GetControlParameters", "ReverbSetDecayHfRatio") - //LOGV("\tReverbSetDecayHfRatio Succesfully returned from LVM_GetControlParameters\n"); - //LOGV("\tReverbSetDecayHfRatio() just Got -> %d\n", ActiveParams.Damping); + //ALOGV("\tReverbSetDecayHfRatio Succesfully returned from LVM_GetControlParameters\n"); + //ALOGV("\tReverbSetDecayHfRatio() just Got -> %d\n", ActiveParams.Damping); ActiveParams.Damping = (LVM_INT16)(ratio/20); /* Activate the initial settings */ LvmStatus = LVREV_SetControlParameters(pContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVREV_SetControlParameters", "ReverbSetDecayHfRatio") - //LOGV("\tReverbSetDecayHfRatio() just Set -> %d\n", ActiveParams.Damping); + //ALOGV("\tReverbSetDecayHfRatio() just Set -> %d\n", ActiveParams.Damping); pContext->SavedDecayHfRatio = ratio; - //LOGV("\tReverbSetDecayHfRatio end"); + //ALOGV("\tReverbSetDecayHfRatio end"); return; } @@ -1317,7 +1317,7 @@ void ReverbSetDecayHfRatio(ReverbContext *pContext, int16_t ratio){ //---------------------------------------------------------------------------- int32_t ReverbGetDecayHfRatio(ReverbContext *pContext){ - //LOGV("\tReverbGetDecayHfRatio start"); + //ALOGV("\tReverbGetDecayHfRatio start"); LVREV_ControlParams_st ActiveParams; /* Current control Parameters */ LVREV_ReturnStatus_en LvmStatus=LVREV_SUCCESS; /* Function call status */ @@ -1325,15 +1325,15 @@ int32_t ReverbGetDecayHfRatio(ReverbContext *pContext){ /* Get the current settings */ LvmStatus = LVREV_GetControlParameters(pContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVREV_GetControlParameters", "ReverbGetDecayHfRatio") - //LOGV("\tReverbGetDecayHfRatio Succesfully returned from LVM_GetControlParameters\n"); - //LOGV("\tReverbGetDecayHfRatio() just Got -> %d\n", ActiveParams.Damping); + //ALOGV("\tReverbGetDecayHfRatio Succesfully returned from LVM_GetControlParameters\n"); + //ALOGV("\tReverbGetDecayHfRatio() just Got -> %d\n", ActiveParams.Damping); if(ActiveParams.Damping != (LVM_INT16)(pContext->SavedDecayHfRatio / 20)){ - LOGV("\tLVM_ERROR : ReverbGetDecayHfRatio() has wrong level -> %d %d\n", + ALOGV("\tLVM_ERROR : ReverbGetDecayHfRatio() has wrong level -> %d %d\n", ActiveParams.Damping, pContext->SavedDecayHfRatio); } - //LOGV("\tReverbGetDecayHfRatio end"); + //ALOGV("\tReverbGetDecayHfRatio end"); return pContext->SavedDecayHfRatio; } @@ -1350,7 +1350,7 @@ int32_t ReverbGetDecayHfRatio(ReverbContext *pContext){ //---------------------------------------------------------------------------- void ReverbSetDiffusion(ReverbContext *pContext, int16_t level){ - //LOGV("\tReverbSetDiffusion start (%d)", level); + //ALOGV("\tReverbSetDiffusion start (%d)", level); LVREV_ControlParams_st ActiveParams; /* Current control Parameters */ LVREV_ReturnStatus_en LvmStatus=LVREV_SUCCESS; /* Function call status */ @@ -1358,18 +1358,18 @@ void ReverbSetDiffusion(ReverbContext *pContext, int16_t level){ /* Get the current settings */ LvmStatus = LVREV_GetControlParameters(pContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVREV_GetControlParameters", "ReverbSetDiffusion") - //LOGV("\tReverbSetDiffusion Succesfully returned from LVM_GetControlParameters\n"); - //LOGV("\tReverbSetDiffusion() just Got -> %d\n", ActiveParams.Density); + //ALOGV("\tReverbSetDiffusion Succesfully returned from LVM_GetControlParameters\n"); + //ALOGV("\tReverbSetDiffusion() just Got -> %d\n", ActiveParams.Density); ActiveParams.Density = (LVM_INT16)(level/10); /* Activate the initial settings */ LvmStatus = LVREV_SetControlParameters(pContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVREV_SetControlParameters", "ReverbSetDiffusion") - //LOGV("\tReverbSetDiffusion() just Set -> %d\n", ActiveParams.Density); + //ALOGV("\tReverbSetDiffusion() just Set -> %d\n", ActiveParams.Density); pContext->SavedDiffusion = level; - //LOGV("\tReverbSetDiffusion end"); + //ALOGV("\tReverbSetDiffusion end"); return; } @@ -1385,7 +1385,7 @@ void ReverbSetDiffusion(ReverbContext *pContext, int16_t level){ //---------------------------------------------------------------------------- int32_t ReverbGetDiffusion(ReverbContext *pContext){ - //LOGV("\tReverbGetDiffusion start"); + //ALOGV("\tReverbGetDiffusion start"); LVREV_ControlParams_st ActiveParams; /* Current control Parameters */ LVREV_ReturnStatus_en LvmStatus=LVREV_SUCCESS; /* Function call status */ @@ -1394,16 +1394,16 @@ int32_t ReverbGetDiffusion(ReverbContext *pContext){ /* Get the current settings */ LvmStatus = LVREV_GetControlParameters(pContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVREV_GetControlParameters", "ReverbGetDiffusion") - //LOGV("\tReverbGetDiffusion Succesfully returned from LVM_GetControlParameters\n"); - //LOGV("\tReverbGetDiffusion just Got -> %d\n", ActiveParams.Density); + //ALOGV("\tReverbGetDiffusion Succesfully returned from LVM_GetControlParameters\n"); + //ALOGV("\tReverbGetDiffusion just Got -> %d\n", ActiveParams.Density); Temp = (LVM_INT16)(pContext->SavedDiffusion/10); if(ActiveParams.Density != Temp){ - LOGV("\tLVM_ERROR : ReverbGetDiffusion invalid value %d %d", Temp, ActiveParams.Density); + ALOGV("\tLVM_ERROR : ReverbGetDiffusion invalid value %d %d", Temp, ActiveParams.Density); } - //LOGV("\tReverbGetDiffusion end"); + //ALOGV("\tReverbGetDiffusion end"); return pContext->SavedDiffusion; } @@ -1420,7 +1420,7 @@ int32_t ReverbGetDiffusion(ReverbContext *pContext){ //---------------------------------------------------------------------------- void ReverbSetDensity(ReverbContext *pContext, int16_t level){ - //LOGV("\tReverbSetDensity start (%d)", level); + //ALOGV("\tReverbSetDensity start (%d)", level); LVREV_ControlParams_st ActiveParams; /* Current control Parameters */ LVREV_ReturnStatus_en LvmStatus=LVREV_SUCCESS; /* Function call status */ @@ -1428,18 +1428,18 @@ void ReverbSetDensity(ReverbContext *pContext, int16_t level){ /* Get the current settings */ LvmStatus = LVREV_GetControlParameters(pContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVREV_GetControlParameters", "ReverbSetDensity") - //LOGV("\tReverbSetDensity Succesfully returned from LVM_GetControlParameters\n"); - //LOGV("\tReverbSetDensity just Got -> %d\n", ActiveParams.RoomSize); + //ALOGV("\tReverbSetDensity Succesfully returned from LVM_GetControlParameters\n"); + //ALOGV("\tReverbSetDensity just Got -> %d\n", ActiveParams.RoomSize); ActiveParams.RoomSize = (LVM_INT16)(((level * 99) / 1000) + 1); /* Activate the initial settings */ LvmStatus = LVREV_SetControlParameters(pContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVREV_SetControlParameters", "ReverbSetDensity") - //LOGV("\tReverbSetDensity just Set -> %d\n", ActiveParams.RoomSize); + //ALOGV("\tReverbSetDensity just Set -> %d\n", ActiveParams.RoomSize); pContext->SavedDensity = level; - //LOGV("\tReverbSetDensity end"); + //ALOGV("\tReverbSetDensity end"); return; } @@ -1455,7 +1455,7 @@ void ReverbSetDensity(ReverbContext *pContext, int16_t level){ //---------------------------------------------------------------------------- int32_t ReverbGetDensity(ReverbContext *pContext){ - //LOGV("\tReverbGetDensity start"); + //ALOGV("\tReverbGetDensity start"); LVREV_ControlParams_st ActiveParams; /* Current control Parameters */ LVREV_ReturnStatus_en LvmStatus=LVREV_SUCCESS; /* Function call status */ @@ -1463,17 +1463,17 @@ int32_t ReverbGetDensity(ReverbContext *pContext){ /* Get the current settings */ LvmStatus = LVREV_GetControlParameters(pContext->hInstance, &ActiveParams); LVM_ERROR_CHECK(LvmStatus, "LVREV_GetControlParameters", "ReverbGetDensity") - //LOGV("\tReverbGetDensity Succesfully returned from LVM_GetControlParameters\n"); - //LOGV("\tReverbGetDensity() just Got -> %d\n", ActiveParams.RoomSize); + //ALOGV("\tReverbGetDensity Succesfully returned from LVM_GetControlParameters\n"); + //ALOGV("\tReverbGetDensity() just Got -> %d\n", ActiveParams.RoomSize); Temp = (LVM_INT16)(((pContext->SavedDensity * 99) / 1000) + 1); if(Temp != ActiveParams.RoomSize){ - LOGV("\tLVM_ERROR : ReverbGetDensity invalid value %d %d", Temp, ActiveParams.RoomSize); + ALOGV("\tLVM_ERROR : ReverbGetDensity invalid value %d %d", Temp, ActiveParams.RoomSize); } - //LOGV("\tReverbGetDensity end"); + //ALOGV("\tReverbGetDensity end"); return pContext->SavedDensity; } @@ -1546,98 +1546,98 @@ int Reverb_getParameter(ReverbContext *pContext, char *name; t_reverb_settings *pProperties; - //LOGV("\tReverb_getParameter start"); + //ALOGV("\tReverb_getParameter start"); if (pContext->preset) { if (param != REVERB_PARAM_PRESET || *pValueSize < sizeof(uint16_t)) { return -EINVAL; } *(uint16_t *)pValue = pContext->nextPreset; - LOGV("get REVERB_PARAM_PRESET, preset %d", pContext->nextPreset); + ALOGV("get REVERB_PARAM_PRESET, preset %d", pContext->nextPreset); return 0; } switch (param){ case REVERB_PARAM_ROOM_LEVEL: if (*pValueSize != sizeof(int16_t)){ - LOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize1 %d", *pValueSize); + ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize1 %d", *pValueSize); return -EINVAL; } *pValueSize = sizeof(int16_t); break; case REVERB_PARAM_ROOM_HF_LEVEL: if (*pValueSize != sizeof(int16_t)){ - LOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize12 %d", *pValueSize); + ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize12 %d", *pValueSize); return -EINVAL; } *pValueSize = sizeof(int16_t); break; case REVERB_PARAM_DECAY_TIME: if (*pValueSize != sizeof(uint32_t)){ - LOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize3 %d", *pValueSize); + ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize3 %d", *pValueSize); return -EINVAL; } *pValueSize = sizeof(uint32_t); break; case REVERB_PARAM_DECAY_HF_RATIO: if (*pValueSize != sizeof(int16_t)){ - LOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize4 %d", *pValueSize); + ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize4 %d", *pValueSize); return -EINVAL; } *pValueSize = sizeof(int16_t); break; case REVERB_PARAM_REFLECTIONS_LEVEL: if (*pValueSize != sizeof(int16_t)){ - LOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize5 %d", *pValueSize); + ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize5 %d", *pValueSize); return -EINVAL; } *pValueSize = sizeof(int16_t); break; case REVERB_PARAM_REFLECTIONS_DELAY: if (*pValueSize != sizeof(uint32_t)){ - LOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize6 %d", *pValueSize); + ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize6 %d", *pValueSize); return -EINVAL; } *pValueSize = sizeof(uint32_t); break; case REVERB_PARAM_REVERB_LEVEL: if (*pValueSize != sizeof(int16_t)){ - LOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize7 %d", *pValueSize); + ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize7 %d", *pValueSize); return -EINVAL; } *pValueSize = sizeof(int16_t); break; case REVERB_PARAM_REVERB_DELAY: if (*pValueSize != sizeof(uint32_t)){ - LOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize8 %d", *pValueSize); + ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize8 %d", *pValueSize); return -EINVAL; } *pValueSize = sizeof(uint32_t); break; case REVERB_PARAM_DIFFUSION: if (*pValueSize != sizeof(int16_t)){ - LOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize9 %d", *pValueSize); + ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize9 %d", *pValueSize); return -EINVAL; } *pValueSize = sizeof(int16_t); break; case REVERB_PARAM_DENSITY: if (*pValueSize != sizeof(int16_t)){ - LOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize10 %d", *pValueSize); + ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize10 %d", *pValueSize); return -EINVAL; } *pValueSize = sizeof(int16_t); break; case REVERB_PARAM_PROPERTIES: if (*pValueSize != sizeof(t_reverb_settings)){ - LOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize11 %d", *pValueSize); + ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize11 %d", *pValueSize); return -EINVAL; } *pValueSize = sizeof(t_reverb_settings); break; default: - LOGV("\tLVM_ERROR : Reverb_getParameter() invalid param %d", param); + ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid param %d", param); return -EINVAL; } @@ -1656,68 +1656,68 @@ int Reverb_getParameter(ReverbContext *pContext, pProperties->diffusion = ReverbGetDiffusion(pContext); pProperties->density = ReverbGetDensity(pContext); - LOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is roomLevel %d", + ALOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is roomLevel %d", pProperties->roomLevel); - LOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is roomHFLevel %d", + ALOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is roomHFLevel %d", pProperties->roomHFLevel); - LOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is decayTime %d", + ALOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is decayTime %d", pProperties->decayTime); - LOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is decayHFRatio %d", + ALOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is decayHFRatio %d", pProperties->decayHFRatio); - LOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is reflectionsLevel %d", + ALOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is reflectionsLevel %d", pProperties->reflectionsLevel); - LOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is reflectionsDelay %d", + ALOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is reflectionsDelay %d", pProperties->reflectionsDelay); - LOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is reverbDelay %d", + ALOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is reverbDelay %d", pProperties->reverbDelay); - LOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is reverbLevel %d", + ALOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is reverbLevel %d", pProperties->reverbLevel); - LOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is diffusion %d", + ALOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is diffusion %d", pProperties->diffusion); - LOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is density %d", + ALOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is density %d", pProperties->density); break; case REVERB_PARAM_ROOM_LEVEL: *(int16_t *)pValue = ReverbGetRoomLevel(pContext); - //LOGV("\tReverb_getParameter() REVERB_PARAM_ROOM_LEVEL Value is %d", + //ALOGV("\tReverb_getParameter() REVERB_PARAM_ROOM_LEVEL Value is %d", // *(int16_t *)pValue); break; case REVERB_PARAM_ROOM_HF_LEVEL: *(int16_t *)pValue = ReverbGetRoomHfLevel(pContext); - //LOGV("\tReverb_getParameter() REVERB_PARAM_ROOM_HF_LEVEL Value is %d", + //ALOGV("\tReverb_getParameter() REVERB_PARAM_ROOM_HF_LEVEL Value is %d", // *(int16_t *)pValue); break; case REVERB_PARAM_DECAY_TIME: *(uint32_t *)pValue = ReverbGetDecayTime(pContext); - //LOGV("\tReverb_getParameter() REVERB_PARAM_DECAY_TIME Value is %d", + //ALOGV("\tReverb_getParameter() REVERB_PARAM_DECAY_TIME Value is %d", // *(int32_t *)pValue); break; case REVERB_PARAM_DECAY_HF_RATIO: *(int16_t *)pValue = ReverbGetDecayHfRatio(pContext); - //LOGV("\tReverb_getParameter() REVERB_PARAM_DECAY_HF_RATION Value is %d", + //ALOGV("\tReverb_getParameter() REVERB_PARAM_DECAY_HF_RATION Value is %d", // *(int16_t *)pValue); break; case REVERB_PARAM_REVERB_LEVEL: *(int16_t *)pValue = ReverbGetReverbLevel(pContext); - //LOGV("\tReverb_getParameter() REVERB_PARAM_REVERB_LEVEL Value is %d", + //ALOGV("\tReverb_getParameter() REVERB_PARAM_REVERB_LEVEL Value is %d", // *(int16_t *)pValue); break; case REVERB_PARAM_DIFFUSION: *(int16_t *)pValue = ReverbGetDiffusion(pContext); - //LOGV("\tReverb_getParameter() REVERB_PARAM_DECAY_DIFFUSION Value is %d", + //ALOGV("\tReverb_getParameter() REVERB_PARAM_DECAY_DIFFUSION Value is %d", // *(int16_t *)pValue); break; case REVERB_PARAM_DENSITY: *(uint16_t *)pValue = 0; *(int16_t *)pValue = ReverbGetDensity(pContext); - //LOGV("\tReverb_getParameter() REVERB_PARAM_DENSITY Value is %d", + //ALOGV("\tReverb_getParameter() REVERB_PARAM_DENSITY Value is %d", // *(uint32_t *)pValue); break; case REVERB_PARAM_REFLECTIONS_LEVEL: @@ -1729,12 +1729,12 @@ int Reverb_getParameter(ReverbContext *pContext, break; default: - LOGV("\tLVM_ERROR : Reverb_getParameter() invalid param %d", param); + ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid param %d", param); status = -EINVAL; break; } - //LOGV("\tReverb_getParameter end"); + //ALOGV("\tReverb_getParameter end"); return status; } /* end Reverb_getParameter */ @@ -1762,14 +1762,14 @@ int Reverb_setParameter (ReverbContext *pContext, void *pParam, void *pValue){ int32_t *pParamTemp = (int32_t *)pParam; int32_t param = *pParamTemp++; - //LOGV("\tReverb_setParameter start"); + //ALOGV("\tReverb_setParameter start"); if (pContext->preset) { if (param != REVERB_PARAM_PRESET) { return -EINVAL; } uint16_t preset = *(uint16_t *)pValue; - LOGV("set REVERB_PARAM_PRESET, preset %d", preset); + ALOGV("set REVERB_PARAM_PRESET, preset %d", preset); if (preset > REVERB_PRESET_LAST) { return -EINVAL; } @@ -1779,7 +1779,7 @@ int Reverb_setParameter (ReverbContext *pContext, void *pParam, void *pValue){ switch (param){ case REVERB_PARAM_PROPERTIES: - LOGV("\tReverb_setParameter() REVERB_PARAM_PROPERTIES"); + ALOGV("\tReverb_setParameter() REVERB_PARAM_PROPERTIES"); pProperties = (t_reverb_settings *) pValue; ReverbSetRoomLevel(pContext, pProperties->roomLevel); ReverbSetRoomHfLevel(pContext, pProperties->roomHFLevel); @@ -1791,52 +1791,52 @@ int Reverb_setParameter (ReverbContext *pContext, void *pParam, void *pValue){ break; case REVERB_PARAM_ROOM_LEVEL: level = *(int16_t *)pValue; - //LOGV("\tReverb_setParameter() REVERB_PARAM_ROOM_LEVEL value is %d", level); - //LOGV("\tReverb_setParameter() Calling ReverbSetRoomLevel"); + //ALOGV("\tReverb_setParameter() REVERB_PARAM_ROOM_LEVEL value is %d", level); + //ALOGV("\tReverb_setParameter() Calling ReverbSetRoomLevel"); ReverbSetRoomLevel(pContext, level); - //LOGV("\tReverb_setParameter() Called ReverbSetRoomLevel"); + //ALOGV("\tReverb_setParameter() Called ReverbSetRoomLevel"); break; case REVERB_PARAM_ROOM_HF_LEVEL: level = *(int16_t *)pValue; - //LOGV("\tReverb_setParameter() REVERB_PARAM_ROOM_HF_LEVEL value is %d", level); - //LOGV("\tReverb_setParameter() Calling ReverbSetRoomHfLevel"); + //ALOGV("\tReverb_setParameter() REVERB_PARAM_ROOM_HF_LEVEL value is %d", level); + //ALOGV("\tReverb_setParameter() Calling ReverbSetRoomHfLevel"); ReverbSetRoomHfLevel(pContext, level); - //LOGV("\tReverb_setParameter() Called ReverbSetRoomHfLevel"); + //ALOGV("\tReverb_setParameter() Called ReverbSetRoomHfLevel"); break; case REVERB_PARAM_DECAY_TIME: time = *(uint32_t *)pValue; - //LOGV("\tReverb_setParameter() REVERB_PARAM_DECAY_TIME value is %d", time); - //LOGV("\tReverb_setParameter() Calling ReverbSetDecayTime"); + //ALOGV("\tReverb_setParameter() REVERB_PARAM_DECAY_TIME value is %d", time); + //ALOGV("\tReverb_setParameter() Calling ReverbSetDecayTime"); ReverbSetDecayTime(pContext, time); - //LOGV("\tReverb_setParameter() Called ReverbSetDecayTime"); + //ALOGV("\tReverb_setParameter() Called ReverbSetDecayTime"); break; case REVERB_PARAM_DECAY_HF_RATIO: ratio = *(int16_t *)pValue; - //LOGV("\tReverb_setParameter() REVERB_PARAM_DECAY_HF_RATIO value is %d", ratio); - //LOGV("\tReverb_setParameter() Calling ReverbSetDecayHfRatio"); + //ALOGV("\tReverb_setParameter() REVERB_PARAM_DECAY_HF_RATIO value is %d", ratio); + //ALOGV("\tReverb_setParameter() Calling ReverbSetDecayHfRatio"); ReverbSetDecayHfRatio(pContext, ratio); - //LOGV("\tReverb_setParameter() Called ReverbSetDecayHfRatio"); + //ALOGV("\tReverb_setParameter() Called ReverbSetDecayHfRatio"); break; case REVERB_PARAM_REVERB_LEVEL: level = *(int16_t *)pValue; - //LOGV("\tReverb_setParameter() REVERB_PARAM_REVERB_LEVEL value is %d", level); - //LOGV("\tReverb_setParameter() Calling ReverbSetReverbLevel"); + //ALOGV("\tReverb_setParameter() REVERB_PARAM_REVERB_LEVEL value is %d", level); + //ALOGV("\tReverb_setParameter() Calling ReverbSetReverbLevel"); ReverbSetReverbLevel(pContext, level); - //LOGV("\tReverb_setParameter() Called ReverbSetReverbLevel"); + //ALOGV("\tReverb_setParameter() Called ReverbSetReverbLevel"); break; case REVERB_PARAM_DIFFUSION: ratio = *(int16_t *)pValue; - //LOGV("\tReverb_setParameter() REVERB_PARAM_DECAY_DIFFUSION value is %d", ratio); - //LOGV("\tReverb_setParameter() Calling ReverbSetDiffusion"); + //ALOGV("\tReverb_setParameter() REVERB_PARAM_DECAY_DIFFUSION value is %d", ratio); + //ALOGV("\tReverb_setParameter() Calling ReverbSetDiffusion"); ReverbSetDiffusion(pContext, ratio); - //LOGV("\tReverb_setParameter() Called ReverbSetDiffusion"); + //ALOGV("\tReverb_setParameter() Called ReverbSetDiffusion"); break; case REVERB_PARAM_DENSITY: ratio = *(int16_t *)pValue; - //LOGV("\tReverb_setParameter() REVERB_PARAM_DECAY_DENSITY value is %d", ratio); - //LOGV("\tReverb_setParameter() Calling ReverbSetDensity"); + //ALOGV("\tReverb_setParameter() REVERB_PARAM_DECAY_DENSITY value is %d", ratio); + //ALOGV("\tReverb_setParameter() Calling ReverbSetDensity"); ReverbSetDensity(pContext, ratio); - //LOGV("\tReverb_setParameter() Called ReverbSetDensity"); + //ALOGV("\tReverb_setParameter() Called ReverbSetDensity"); break; break; case REVERB_PARAM_REFLECTIONS_LEVEL: @@ -1844,11 +1844,11 @@ int Reverb_setParameter (ReverbContext *pContext, void *pParam, void *pValue){ case REVERB_PARAM_REVERB_DELAY: break; default: - LOGV("\tLVM_ERROR : Reverb_setParameter() invalid param %d", param); + ALOGV("\tLVM_ERROR : Reverb_setParameter() invalid param %d", param); break; } - //LOGV("\tReverb_setParameter end"); + //ALOGV("\tReverb_setParameter end"); return status; } /* end Reverb_setParameter */ @@ -1864,16 +1864,16 @@ int Reverb_process(effect_handle_t self, int status = 0; if (pContext == NULL){ - LOGV("\tLVM_ERROR : Reverb_process() ERROR pContext == NULL"); + ALOGV("\tLVM_ERROR : Reverb_process() ERROR pContext == NULL"); return -EINVAL; } if (inBuffer == NULL || inBuffer->raw == NULL || outBuffer == NULL || outBuffer->raw == NULL || inBuffer->frameCount != outBuffer->frameCount){ - LOGV("\tLVM_ERROR : Reverb_process() ERROR NULL INPUT POINTER OR FRAME COUNT IS WRONG"); + ALOGV("\tLVM_ERROR : Reverb_process() ERROR NULL INPUT POINTER OR FRAME COUNT IS WRONG"); return -EINVAL; } - //LOGV("\tReverb_process() Calling process with %d frames", outBuffer->frameCount); + //ALOGV("\tReverb_process() Calling process with %d frames", outBuffer->frameCount); /* Process all the available frames, block processing is handled internalLY by the LVM bundle */ status = process( (LVM_INT16 *)inBuffer->raw, (LVM_INT16 *)outBuffer->raw, @@ -1905,19 +1905,19 @@ int Reverb_command(effect_handle_t self, if (pContext == NULL){ - LOGV("\tLVM_ERROR : Reverb_command ERROR pContext == NULL"); + ALOGV("\tLVM_ERROR : Reverb_command ERROR pContext == NULL"); return -EINVAL; } - //LOGV("\tReverb_command INPUTS are: command %d cmdSize %d",cmdCode, cmdSize); + //ALOGV("\tReverb_command INPUTS are: command %d cmdSize %d",cmdCode, cmdSize); switch (cmdCode){ case EFFECT_CMD_INIT: - //LOGV("\tReverb_command cmdCode Case: " + //ALOGV("\tReverb_command cmdCode Case: " // "EFFECT_CMD_INIT start"); if (pReplyData == NULL || *replySize != sizeof(int)){ - LOGV("\tLVM_ERROR : Reverb_command cmdCode Case: " + ALOGV("\tLVM_ERROR : Reverb_command cmdCode Case: " "EFFECT_CMD_INIT: ERROR"); return -EINVAL; } @@ -1925,13 +1925,13 @@ int Reverb_command(effect_handle_t self, break; case EFFECT_CMD_CONFIGURE: - //LOGV("\tReverb_command cmdCode Case: " + //ALOGV("\tReverb_command cmdCode Case: " // "EFFECT_CMD_CONFIGURE start"); if (pCmdData == NULL|| cmdSize != sizeof(effect_config_t)|| pReplyData == NULL|| *replySize != sizeof(int)){ - LOGV("\tLVM_ERROR : Reverb_command cmdCode Case: " + ALOGV("\tLVM_ERROR : Reverb_command cmdCode Case: " "EFFECT_CMD_CONFIGURE: ERROR"); return -EINVAL; } @@ -1939,19 +1939,19 @@ int Reverb_command(effect_handle_t self, break; case EFFECT_CMD_RESET: - //LOGV("\tReverb_command cmdCode Case: " + //ALOGV("\tReverb_command cmdCode Case: " // "EFFECT_CMD_RESET start"); Reverb_configure(pContext, &pContext->config); break; case EFFECT_CMD_GET_PARAM:{ - //LOGV("\tReverb_command cmdCode Case: " + //ALOGV("\tReverb_command cmdCode Case: " // "EFFECT_CMD_GET_PARAM start"); if (pCmdData == NULL || cmdSize < (int)(sizeof(effect_param_t) + sizeof(int32_t)) || pReplyData == NULL || *replySize < (int) (sizeof(effect_param_t) + sizeof(int32_t))){ - LOGV("\tLVM_ERROR : Reverb_command cmdCode Case: " + ALOGV("\tLVM_ERROR : Reverb_command cmdCode Case: " "EFFECT_CMD_GET_PARAM: ERROR"); return -EINVAL; } @@ -1970,7 +1970,7 @@ int Reverb_command(effect_handle_t self, *replySize = sizeof(effect_param_t) + voffset + p->vsize; - //LOGV("\tReverb_command EFFECT_CMD_GET_PARAM " + //ALOGV("\tReverb_command EFFECT_CMD_GET_PARAM " // "*pCmdData %d, *replySize %d, *pReplyData %d ", // *(int32_t *)((char *)pCmdData + sizeof(effect_param_t)), // *replySize, @@ -1979,16 +1979,16 @@ int Reverb_command(effect_handle_t self, } break; case EFFECT_CMD_SET_PARAM:{ - //LOGV("\tReverb_command cmdCode Case: " + //ALOGV("\tReverb_command cmdCode Case: " // "EFFECT_CMD_SET_PARAM start"); - //LOGV("\tReverb_command EFFECT_CMD_SET_PARAM param %d, *replySize %d, value %d ", + //ALOGV("\tReverb_command EFFECT_CMD_SET_PARAM param %d, *replySize %d, value %d ", // *(int32_t *)((char *)pCmdData + sizeof(effect_param_t)), // *replySize, // *(int16_t *)((char *)pCmdData + sizeof(effect_param_t) + sizeof(int32_t))); if (pCmdData == NULL || (cmdSize < (int)(sizeof(effect_param_t) + sizeof(int32_t))) || pReplyData == NULL || *replySize != (int)sizeof(int32_t)) { - LOGV("\tLVM_ERROR : Reverb_command cmdCode Case: " + ALOGV("\tLVM_ERROR : Reverb_command cmdCode Case: " "EFFECT_CMD_SET_PARAM: ERROR"); return -EINVAL; } @@ -1996,12 +1996,12 @@ int Reverb_command(effect_handle_t self, effect_param_t *p = (effect_param_t *) pCmdData; if (p->psize != sizeof(int32_t)){ - LOGV("\t4LVM_ERROR : Reverb_command cmdCode Case: " + ALOGV("\t4LVM_ERROR : Reverb_command cmdCode Case: " "EFFECT_CMD_SET_PARAM: ERROR, psize is not sizeof(int32_t)"); return -EINVAL; } - //LOGV("\tn5Reverb_command cmdSize is %d\n" + //ALOGV("\tn5Reverb_command cmdSize is %d\n" // "\tsizeof(effect_param_t) is %d\n" // "\tp->psize is %d\n" // "\tp->vsize is %d" @@ -2014,16 +2014,16 @@ int Reverb_command(effect_handle_t self, } break; case EFFECT_CMD_ENABLE: - //LOGV("\tReverb_command cmdCode Case: " + //ALOGV("\tReverb_command cmdCode Case: " // "EFFECT_CMD_ENABLE start"); if (pReplyData == NULL || *replySize != sizeof(int)){ - LOGV("\tLVM_ERROR : Reverb_command cmdCode Case: " + ALOGV("\tLVM_ERROR : Reverb_command cmdCode Case: " "EFFECT_CMD_ENABLE: ERROR"); return -EINVAL; } if(pContext->bEnabled == LVM_TRUE){ - LOGV("\tLVM_ERROR : Reverb_command cmdCode Case: " + ALOGV("\tLVM_ERROR : Reverb_command cmdCode Case: " "EFFECT_CMD_ENABLE: ERROR-Effect is already enabled"); return -EINVAL; } @@ -2036,19 +2036,19 @@ int Reverb_command(effect_handle_t self, (ActiveParams.T60 * pContext->config.inputCfg.samplingRate)/1000; // force no volume ramp for first buffer processed after enabling the effect pContext->volumeMode = android::REVERB_VOLUME_FLAT; - //LOGV("\tEFFECT_CMD_ENABLE SamplesToExitCount = %d", pContext->SamplesToExitCount); + //ALOGV("\tEFFECT_CMD_ENABLE SamplesToExitCount = %d", pContext->SamplesToExitCount); break; case EFFECT_CMD_DISABLE: - //LOGV("\tReverb_command cmdCode Case: " + //ALOGV("\tReverb_command cmdCode Case: " // "EFFECT_CMD_DISABLE start"); if (pReplyData == NULL || *replySize != sizeof(int)){ - LOGV("\tLVM_ERROR : Reverb_command cmdCode Case: " + ALOGV("\tLVM_ERROR : Reverb_command cmdCode Case: " "EFFECT_CMD_DISABLE: ERROR"); return -EINVAL; } if(pContext->bEnabled == LVM_FALSE){ - LOGV("\tLVM_ERROR : Reverb_command cmdCode Case: " + ALOGV("\tLVM_ERROR : Reverb_command cmdCode Case: " "EFFECT_CMD_DISABLE: ERROR-Effect is not yet enabled"); return -EINVAL; } @@ -2059,7 +2059,7 @@ int Reverb_command(effect_handle_t self, case EFFECT_CMD_SET_VOLUME: if (pCmdData == NULL || cmdSize != 2 * sizeof(uint32_t)) { - LOGV("\tLVM_ERROR : Reverb_command cmdCode Case: " + ALOGV("\tLVM_ERROR : Reverb_command cmdCode Case: " "EFFECT_CMD_SET_VOLUME: ERROR"); return -EINVAL; } @@ -2079,23 +2079,23 @@ int Reverb_command(effect_handle_t self, pContext->rightVolume = REVERB_UNIT_VOLUME; pContext->volumeMode = android::REVERB_VOLUME_OFF; } - LOGV("EFFECT_CMD_SET_VOLUME left %d, right %d mode %d", + ALOGV("EFFECT_CMD_SET_VOLUME left %d, right %d mode %d", pContext->leftVolume, pContext->rightVolume, pContext->volumeMode); break; case EFFECT_CMD_SET_DEVICE: case EFFECT_CMD_SET_AUDIO_MODE: - //LOGV("\tReverb_command cmdCode Case: " + //ALOGV("\tReverb_command cmdCode Case: " // "EFFECT_CMD_SET_DEVICE/EFFECT_CMD_SET_VOLUME/EFFECT_CMD_SET_AUDIO_MODE start"); break; default: - LOGV("\tLVM_ERROR : Reverb_command cmdCode Case: " + ALOGV("\tLVM_ERROR : Reverb_command cmdCode Case: " "DEFAULT start %d ERROR",cmdCode); return -EINVAL; } - //LOGV("\tReverb_command end\n\n"); + //ALOGV("\tReverb_command end\n\n"); return 0; } /* end Reverb_command */ @@ -2107,7 +2107,7 @@ int Reverb_getDescriptor(effect_handle_t self, const effect_descriptor_t *desc; if (pContext == NULL || pDescriptor == NULL) { - LOGV("Reverb_getDescriptor() invalid param"); + ALOGV("Reverb_getDescriptor() invalid param"); return -EINVAL; } diff --git a/media/libeffects/preprocessing/PreProcessing.cpp b/media/libeffects/preprocessing/PreProcessing.cpp index ba286a1..b15614a 100755 --- a/media/libeffects/preprocessing/PreProcessing.cpp +++ b/media/libeffects/preprocessing/PreProcessing.cpp @@ -226,7 +226,7 @@ static const bool kAgcDefaultLimiter = true; int AgcInit (preproc_effect_t *effect) { - LOGV("AgcInit"); + ALOGV("AgcInit"); webrtc::GainControl *agc = static_cast<webrtc::GainControl *>(effect->engine); agc->set_mode(webrtc::GainControl::kFixedDigital); agc->set_target_level_dbfs(kAgcDefaultTargetLevel); @@ -238,7 +238,7 @@ int AgcInit (preproc_effect_t *effect) int AgcCreate(preproc_effect_t *effect) { webrtc::GainControl *agc = effect->session->apm->gain_control(); - LOGV("AgcCreate got agc %p", agc); + ALOGV("AgcCreate got agc %p", agc); if (agc == NULL) { LOGW("AgcCreate Error"); return -ENOMEM; @@ -288,15 +288,15 @@ int AgcGetParameter(preproc_effect_t *effect, switch (param) { case AGC_PARAM_TARGET_LEVEL: *(int16_t *) pValue = (int16_t)(agc->target_level_dbfs() * -100); - LOGV("AgcGetParameter() target level %d milliBels", *(int16_t *) pValue); + ALOGV("AgcGetParameter() target level %d milliBels", *(int16_t *) pValue); break; case AGC_PARAM_COMP_GAIN: *(int16_t *) pValue = (int16_t)(agc->compression_gain_db() * 100); - LOGV("AgcGetParameter() comp gain %d milliBels", *(int16_t *) pValue); + ALOGV("AgcGetParameter() comp gain %d milliBels", *(int16_t *) pValue); break; case AGC_PARAM_LIMITER_ENA: *(bool *) pValue = (bool)agc->is_limiter_enabled(); - LOGV("AgcGetParameter() limiter enabled %s", + ALOGV("AgcGetParameter() limiter enabled %s", (*(int16_t *) pValue != 0) ? "true" : "false"); break; case AGC_PARAM_PROPERTIES: @@ -321,19 +321,19 @@ int AgcSetParameter (preproc_effect_t *effect, void *pParam, void *pValue) switch (param) { case AGC_PARAM_TARGET_LEVEL: - LOGV("AgcSetParameter() target level %d milliBels", *(int16_t *)pValue); + ALOGV("AgcSetParameter() target level %d milliBels", *(int16_t *)pValue); status = agc->set_target_level_dbfs(-(*(int16_t *)pValue / 100)); break; case AGC_PARAM_COMP_GAIN: - LOGV("AgcSetParameter() comp gain %d milliBels", *(int16_t *)pValue); + ALOGV("AgcSetParameter() comp gain %d milliBels", *(int16_t *)pValue); status = agc->set_compression_gain_db(*(int16_t *)pValue / 100); break; case AGC_PARAM_LIMITER_ENA: - LOGV("AgcSetParameter() limiter enabled %s", *(bool *)pValue ? "true" : "false"); + ALOGV("AgcSetParameter() limiter enabled %s", *(bool *)pValue ? "true" : "false"); status = agc->enable_limiter(*(bool *)pValue); break; case AGC_PARAM_PROPERTIES: - LOGV("AgcSetParameter() properties level %d, gain %d limiter %d", + ALOGV("AgcSetParameter() properties level %d, gain %d limiter %d", pProperties->targetLevel, pProperties->compGain, pProperties->limiterEnabled); @@ -349,7 +349,7 @@ int AgcSetParameter (preproc_effect_t *effect, void *pParam, void *pValue) break; } - LOGV("AgcSetParameter() done status %d", status); + ALOGV("AgcSetParameter() done status %d", status); return status; } @@ -357,13 +357,13 @@ int AgcSetParameter (preproc_effect_t *effect, void *pParam, void *pValue) void AgcEnable(preproc_effect_t *effect) { webrtc::GainControl *agc = static_cast<webrtc::GainControl *>(effect->engine); - LOGV("AgcEnable agc %p", agc); + ALOGV("AgcEnable agc %p", agc); agc->Enable(true); } void AgcDisable(preproc_effect_t *effect) { - LOGV("AgcDisable"); + ALOGV("AgcDisable"); webrtc::GainControl *agc = static_cast<webrtc::GainControl *>(effect->engine); agc->Enable(false); } @@ -391,7 +391,7 @@ static const bool kAecDefaultComfortNoise = true; int AecInit (preproc_effect_t *effect) { - LOGV("AecInit"); + ALOGV("AecInit"); webrtc::EchoControlMobile *aec = static_cast<webrtc::EchoControlMobile *>(effect->engine); aec->set_routing_mode(kAecDefaultMode); aec->enable_comfort_noise(kAecDefaultComfortNoise); @@ -401,7 +401,7 @@ int AecInit (preproc_effect_t *effect) int AecCreate(preproc_effect_t *effect) { webrtc::EchoControlMobile *aec = effect->session->apm->echo_control_mobile(); - LOGV("AecCreate got aec %p", aec); + ALOGV("AecCreate got aec %p", aec); if (aec == NULL) { LOGW("AgcCreate Error"); return -ENOMEM; @@ -426,7 +426,7 @@ int AecGetParameter(preproc_effect_t *effect, case AEC_PARAM_ECHO_DELAY: case AEC_PARAM_PROPERTIES: *(uint32_t *)pValue = 1000 * effect->session->apm->stream_delay_ms(); - LOGV("AecGetParameter() echo delay %d us", *(uint32_t *)pValue); + ALOGV("AecGetParameter() echo delay %d us", *(uint32_t *)pValue); break; default: LOGW("AecGetParameter() unknown param %08x value %08x", param, *(uint32_t *)pValue); @@ -446,7 +446,7 @@ int AecSetParameter (preproc_effect_t *effect, void *pParam, void *pValue) case AEC_PARAM_ECHO_DELAY: case AEC_PARAM_PROPERTIES: status = effect->session->apm->set_stream_delay_ms(value/1000); - LOGV("AecSetParameter() echo delay %d us, status %d", value, status); + ALOGV("AecSetParameter() echo delay %d us, status %d", value, status); break; default: LOGW("AecSetParameter() unknown param %08x value %08x", param, *(uint32_t *)pValue); @@ -459,20 +459,20 @@ int AecSetParameter (preproc_effect_t *effect, void *pParam, void *pValue) void AecEnable(preproc_effect_t *effect) { webrtc::EchoControlMobile *aec = static_cast<webrtc::EchoControlMobile *>(effect->engine); - LOGV("AecEnable aec %p", aec); + ALOGV("AecEnable aec %p", aec); aec->Enable(true); } void AecDisable(preproc_effect_t *effect) { - LOGV("AecDisable"); + ALOGV("AecDisable"); webrtc::EchoControlMobile *aec = static_cast<webrtc::EchoControlMobile *>(effect->engine); aec->Enable(false); } int AecSetDevice(preproc_effect_t *effect, uint32_t device) { - LOGV("AecSetDevice %08x", device); + ALOGV("AecSetDevice %08x", device); webrtc::EchoControlMobile *aec = static_cast<webrtc::EchoControlMobile *>(effect->engine); webrtc::EchoControlMobile::RoutingMode mode = webrtc::EchoControlMobile::kQuietEarpieceOrHeadset; @@ -511,7 +511,7 @@ static const webrtc::NoiseSuppression::Level kNsDefaultLevel = webrtc::NoiseSupp int NsInit (preproc_effect_t *effect) { - LOGV("NsInit"); + ALOGV("NsInit"); webrtc::NoiseSuppression *ns = static_cast<webrtc::NoiseSuppression *>(effect->engine); ns->set_level(kNsDefaultLevel); return 0; @@ -520,7 +520,7 @@ int NsInit (preproc_effect_t *effect) int NsCreate(preproc_effect_t *effect) { webrtc::NoiseSuppression *ns = effect->session->apm->noise_suppression(); - LOGV("NsCreate got ns %p", ns); + ALOGV("NsCreate got ns %p", ns); if (ns == NULL) { LOGW("AgcCreate Error"); return -ENOMEM; @@ -548,13 +548,13 @@ int NsSetParameter (preproc_effect_t *effect, void *pParam, void *pValue) void NsEnable(preproc_effect_t *effect) { webrtc::NoiseSuppression *ns = static_cast<webrtc::NoiseSuppression *>(effect->engine); - LOGV("NsEnable ns %p", ns); + ALOGV("NsEnable ns %p", ns); ns->Enable(true); } void NsDisable(preproc_effect_t *effect) { - LOGV("NsDisable"); + ALOGV("NsDisable"); webrtc::NoiseSuppression *ns = static_cast<webrtc::NoiseSuppression *>(effect->engine); ns->Enable(false); } @@ -593,7 +593,7 @@ extern "C" const struct effect_interface_s sEffectInterfaceReverse; int Effect_SetState(preproc_effect_t *effect, uint32_t state) { int status = 0; - LOGV("Effect_SetState proc %d, new %d old %d", effect->procId, state, effect->state); + ALOGV("Effect_SetState proc %d, new %d old %d", effect->procId, state, effect->state); switch(state) { case PREPROC_EFFECT_STATE_INIT: switch(effect->state) { @@ -725,7 +725,7 @@ extern "C" int Session_CreateEffect(preproc_session_t *session, { int status = -ENOMEM; - LOGV("Session_CreateEffect procId %d, createdMsk %08x", procId, session->createdMsk); + ALOGV("Session_CreateEffect procId %d, createdMsk %08x", procId, session->createdMsk); if (session->createdMsk == 0) { session->apm = webrtc::AudioProcessing::Create(session->io); @@ -775,7 +775,7 @@ extern "C" int Session_CreateEffect(preproc_session_t *session, if (status < 0) { goto error; } - LOGV("Session_CreateEffect OK"); + ALOGV("Session_CreateEffect OK"); session->createdMsk |= (1<<procId); return status; @@ -841,7 +841,7 @@ int Session_SetConfig(preproc_session_t *session, effect_config_t *config) return -EINVAL; } - LOGV("Session_SetConfig sr %d cnl %08x", + ALOGV("Session_SetConfig sr %d cnl %08x", config->inputCfg.samplingRate, config->inputCfg.channels); int status; @@ -948,7 +948,7 @@ int Session_SetReverseConfig(preproc_session_t *session, effect_config_t *config return -EINVAL; } - LOGV("Session_SetReverseConfig sr %d cnl %08x", + ALOGV("Session_SetReverseConfig sr %d cnl %08x", config->inputCfg.samplingRate, config->inputCfg.channels); if (session->state < PREPROC_SESSION_STATE_CONFIG) { @@ -996,7 +996,7 @@ void Session_SetProcEnabled(preproc_session_t *session, uint32_t procId, bool en session->revEnabledMsk &= ~(1 << procId); } } - LOGV("Session_SetProcEnabled proc %d, enabled %d enabledMsk %08x revEnabledMsk %08x", + ALOGV("Session_SetProcEnabled proc %d, enabled %d enabledMsk %08x revEnabledMsk %08x", procId, enabled, session->enabledMsk, session->revEnabledMsk); session->processedMsk = 0; if (HasReverseStream(procId)) { @@ -1074,7 +1074,7 @@ int PreProcessingFx_Process(effect_handle_t self, int status = 0; if (effect == NULL){ - LOGV("PreProcessingFx_Process() ERROR effect == NULL"); + ALOGV("PreProcessingFx_Process() ERROR effect == NULL"); return -EINVAL; } preproc_session_t * session = (preproc_session_t *)effect->session; @@ -1087,7 +1087,7 @@ int PreProcessingFx_Process(effect_handle_t self, session->processedMsk |= (1<<effect->procId); -// LOGV("PreProcessingFx_Process In %d frames enabledMsk %08x processedMsk %08x", +// ALOGV("PreProcessingFx_Process In %d frames enabledMsk %08x processedMsk %08x", // inBuffer->frameCount, session->enabledMsk, session->processedMsk); if ((session->processedMsk & session->enabledMsk) == session->enabledMsk) { @@ -1237,7 +1237,7 @@ int PreProcessingFx_Command(effect_handle_t self, return -EINVAL; } - //LOGV("PreProcessingFx_Command: command %d cmdSize %d",cmdCode, cmdSize); + //ALOGV("PreProcessingFx_Command: command %d cmdSize %d",cmdCode, cmdSize); switch (cmdCode){ case EFFECT_CMD_INIT: @@ -1255,7 +1255,7 @@ int PreProcessingFx_Command(effect_handle_t self, cmdSize != sizeof(effect_config_t)|| pReplyData == NULL|| *replySize != sizeof(int)){ - LOGV("PreProcessingFx_Command cmdCode Case: " + ALOGV("PreProcessingFx_Command cmdCode Case: " "EFFECT_CMD_CONFIGURE: ERROR"); return -EINVAL; } @@ -1271,7 +1271,7 @@ int PreProcessingFx_Command(effect_handle_t self, cmdSize != sizeof(effect_config_t)|| pReplyData == NULL|| *replySize != sizeof(int)){ - LOGV("PreProcessingFx_Command cmdCode Case: " + ALOGV("PreProcessingFx_Command cmdCode Case: " "EFFECT_CMD_CONFIGURE_REVERSE: ERROR"); return -EINVAL; } @@ -1293,7 +1293,7 @@ int PreProcessingFx_Command(effect_handle_t self, cmdSize < (int)sizeof(effect_param_t) || pReplyData == NULL || *replySize < (int)sizeof(effect_param_t)){ - LOGV("PreProcessingFx_Command cmdCode Case: " + ALOGV("PreProcessingFx_Command cmdCode Case: " "EFFECT_CMD_GET_PARAM: ERROR"); return -EINVAL; } @@ -1318,14 +1318,14 @@ int PreProcessingFx_Command(effect_handle_t self, cmdSize < (int)sizeof(effect_param_t) || pReplyData == NULL || *replySize != sizeof(int32_t)){ - LOGV("PreProcessingFx_Command cmdCode Case: " + ALOGV("PreProcessingFx_Command cmdCode Case: " "EFFECT_CMD_SET_PARAM: ERROR"); return -EINVAL; } effect_param_t *p = (effect_param_t *) pCmdData; if (p->psize != sizeof(int32_t)){ - LOGV("PreProcessingFx_Command cmdCode Case: " + ALOGV("PreProcessingFx_Command cmdCode Case: " "EFFECT_CMD_SET_PARAM: ERROR, psize is not sizeof(int32_t)"); return -EINVAL; } @@ -1338,7 +1338,7 @@ int PreProcessingFx_Command(effect_handle_t self, case EFFECT_CMD_ENABLE: if (pReplyData == NULL || *replySize != sizeof(int)){ - LOGV("PreProcessingFx_Command cmdCode Case: EFFECT_CMD_ENABLE: ERROR"); + ALOGV("PreProcessingFx_Command cmdCode Case: EFFECT_CMD_ENABLE: ERROR"); return -EINVAL; } *(int *)pReplyData = Effect_SetState(effect, PREPROC_EFFECT_STATE_ACTIVE); @@ -1346,7 +1346,7 @@ int PreProcessingFx_Command(effect_handle_t self, case EFFECT_CMD_DISABLE: if (pReplyData == NULL || *replySize != sizeof(int)){ - LOGV("PreProcessingFx_Command cmdCode Case: EFFECT_CMD_DISABLE: ERROR"); + ALOGV("PreProcessingFx_Command cmdCode Case: EFFECT_CMD_DISABLE: ERROR"); return -EINVAL; } *(int *)pReplyData = Effect_SetState(effect, PREPROC_EFFECT_STATE_CONFIG); @@ -1356,7 +1356,7 @@ int PreProcessingFx_Command(effect_handle_t self, case EFFECT_CMD_SET_INPUT_DEVICE: if (pCmdData == NULL || cmdSize != sizeof(uint32_t)) { - LOGV("PreProcessingFx_Command cmdCode Case: EFFECT_CMD_SET_DEVICE: ERROR"); + ALOGV("PreProcessingFx_Command cmdCode Case: EFFECT_CMD_SET_DEVICE: ERROR"); return -EINVAL; } @@ -1410,7 +1410,7 @@ int PreProcessingFx_ProcessReverse(effect_handle_t self, session->revProcessedMsk |= (1<<effect->procId); -// LOGV("PreProcessingFx_ProcessReverse In %d frames revEnabledMsk %08x revProcessedMsk %08x", +// ALOGV("PreProcessingFx_ProcessReverse In %d frames revEnabledMsk %08x revProcessedMsk %08x", // inBuffer->frameCount, session->revEnabledMsk, session->revProcessedMsk); @@ -1528,7 +1528,7 @@ int PreProcessingLib_Create(effect_uuid_t *uuid, int32_t ioId, effect_handle_t *pInterface) { - LOGV("EffectCreate: uuid: %08x session %d IO: %d", uuid->timeLow, sessionId, ioId); + ALOGV("EffectCreate: uuid: %08x session %d IO: %d", uuid->timeLow, sessionId, ioId); int status; const effect_descriptor_t *desc; @@ -1562,7 +1562,7 @@ int PreProcessingLib_Create(effect_uuid_t *uuid, int PreProcessingLib_Release(effect_handle_t interface) { int status; - LOGV("EffectRelease start %p", interface); + ALOGV("EffectRelease start %p", interface); if (PreProc_Init() != 0) { return sInitStatus; } @@ -1584,11 +1584,11 @@ int PreProcessingLib_GetDescriptor(effect_uuid_t *uuid, const effect_descriptor_t *desc = PreProc_GetDescriptor(uuid); if (desc == NULL) { - LOGV("PreProcessingLib_GetDescriptor() not found"); + ALOGV("PreProcessingLib_GetDescriptor() not found"); return -EINVAL; } - LOGV("PreProcessingLib_GetDescriptor() got fx %s", desc->name); + ALOGV("PreProcessingLib_GetDescriptor() got fx %s", desc->name); memcpy(pDescriptor, desc, sizeof(effect_descriptor_t)); return 0; diff --git a/media/libeffects/testlibs/AudioEqualizer.cpp b/media/libeffects/testlibs/AudioEqualizer.cpp index 44c9476..4f3a308 100644 --- a/media/libeffects/testlibs/AudioEqualizer.cpp +++ b/media/libeffects/testlibs/AudioEqualizer.cpp @@ -39,7 +39,7 @@ AudioEqualizer * AudioEqualizer::CreateInstance(void * pMem, int nBands, int nChannels, int sampleRate, const PresetConfig * presets, int nPresets) { - LOGV("AudioEqualizer::CreateInstance(pMem=%p, nBands=%d, nChannels=%d, " + ALOGV("AudioEqualizer::CreateInstance(pMem=%p, nBands=%d, nChannels=%d, " "sampleRate=%d, nPresets=%d)", pMem, nBands, nChannels, sampleRate, nPresets); assert(nBands >= 2); @@ -56,7 +56,7 @@ AudioEqualizer * AudioEqualizer::CreateInstance(void * pMem, int nBands, } void AudioEqualizer::configure(int nChannels, int sampleRate) { - LOGV("AudioEqualizer::configure(nChannels=%d, sampleRate=%d)", nChannels, + ALOGV("AudioEqualizer::configure(nChannels=%d, sampleRate=%d)", nChannels, sampleRate); mpLowShelf->configure(nChannels, sampleRate); for (int i = 0; i < mNumPeaking; ++i) { @@ -66,7 +66,7 @@ void AudioEqualizer::configure(int nChannels, int sampleRate) { } void AudioEqualizer::clear() { - LOGV("AudioEqualizer::clear()"); + ALOGV("AudioEqualizer::clear()"); mpLowShelf->clear(); for (int i = 0; i < mNumPeaking; ++i) { mpPeakingFilters[i].clear(); @@ -75,14 +75,14 @@ void AudioEqualizer::clear() { } void AudioEqualizer::free() { - LOGV("AudioEqualizer::free()"); + ALOGV("AudioEqualizer::free()"); if (mpMem != NULL) { ::free(mpMem); } } void AudioEqualizer::reset() { - LOGV("AudioEqualizer::reset()"); + ALOGV("AudioEqualizer::reset()"); const int32_t bottom = Effects_log2(kMinFreq); const int32_t top = Effects_log2(mSampleRate * 500); const int32_t jump = (top - bottom) / (mNumPeaking + 2); @@ -103,7 +103,7 @@ void AudioEqualizer::reset() { } void AudioEqualizer::setGain(int band, int32_t millibel) { - LOGV("AudioEqualizer::setGain(band=%d, millibel=%d)", band, millibel); + ALOGV("AudioEqualizer::setGain(band=%d, millibel=%d)", band, millibel); assert(band >= 0 && band < mNumPeaking + 2); if (band == 0) { mpLowShelf->setGain(millibel); @@ -116,7 +116,7 @@ void AudioEqualizer::setGain(int band, int32_t millibel) { } void AudioEqualizer::setFrequency(int band, uint32_t millihertz) { - LOGV("AudioEqualizer::setFrequency(band=%d, millihertz=%d)", band, + ALOGV("AudioEqualizer::setFrequency(band=%d, millihertz=%d)", band, millihertz); assert(band >= 0 && band < mNumPeaking + 2); if (band == 0) { @@ -130,7 +130,7 @@ void AudioEqualizer::setFrequency(int band, uint32_t millihertz) { } void AudioEqualizer::setBandwidth(int band, uint32_t cents) { - LOGV("AudioEqualizer::setBandwidth(band=%d, cents=%d)", band, cents); + ALOGV("AudioEqualizer::setBandwidth(band=%d, cents=%d)", band, cents); assert(band >= 0 && band < mNumPeaking + 2); if (band > 0 && band < mNumPeaking + 1) { mpPeakingFilters[band - 1].setBandwidth(cents); @@ -201,7 +201,7 @@ int AudioEqualizer::getPreset() const { } void AudioEqualizer::setPreset(int preset) { - LOGV("AudioEqualizer::setPreset(preset=%d)", preset); + ALOGV("AudioEqualizer::setPreset(preset=%d)", preset); assert(preset < mNumPresets && preset >= 0); const PresetConfig &presetCfg = mpPresets[preset]; for (int band = 0; band < (mNumPeaking + 2); ++band) { @@ -214,7 +214,7 @@ void AudioEqualizer::setPreset(int preset) { } void AudioEqualizer::commit(bool immediate) { - LOGV("AudioEqualizer::commit(immediate=%d)", immediate); + ALOGV("AudioEqualizer::commit(immediate=%d)", immediate); mpLowShelf->commit(immediate); for (int i = 0; i < mNumPeaking; ++i) { mpPeakingFilters[i].commit(immediate); @@ -225,7 +225,7 @@ void AudioEqualizer::commit(bool immediate) { void AudioEqualizer::process(const audio_sample_t * pIn, audio_sample_t * pOut, int frameCount) { -// LOGV("AudioEqualizer::process(frameCount=%d)", frameCount); +// ALOGV("AudioEqualizer::process(frameCount=%d)", frameCount); mpLowShelf->process(pIn, pOut, frameCount); for (int i = 0; i < mNumPeaking; ++i) { mpPeakingFilters[i].process(pIn, pOut, frameCount); @@ -234,7 +234,7 @@ void AudioEqualizer::process(const audio_sample_t * pIn, } void AudioEqualizer::enable(bool immediate) { - LOGV("AudioEqualizer::enable(immediate=%d)", immediate); + ALOGV("AudioEqualizer::enable(immediate=%d)", immediate); mpLowShelf->enable(immediate); for (int i = 0; i < mNumPeaking; ++i) { mpPeakingFilters[i].enable(immediate); @@ -243,7 +243,7 @@ void AudioEqualizer::enable(bool immediate) { } void AudioEqualizer::disable(bool immediate) { - LOGV("AudioEqualizer::disable(immediate=%d)", immediate); + ALOGV("AudioEqualizer::disable(immediate=%d)", immediate); mpLowShelf->disable(immediate); for (int i = 0; i < mNumPeaking; ++i) { mpPeakingFilters[i].disable(immediate); diff --git a/media/libeffects/testlibs/EffectEqualizer.cpp b/media/libeffects/testlibs/EffectEqualizer.cpp index b22ebec..79a296c 100644 --- a/media/libeffects/testlibs/EffectEqualizer.cpp +++ b/media/libeffects/testlibs/EffectEqualizer.cpp @@ -147,7 +147,7 @@ extern "C" int EffectCreate(effect_uuid_t *uuid, int ret; int i; - LOGV("EffectLibCreateEffect start"); + ALOGV("EffectLibCreateEffect start"); if (pHandle == NULL || uuid == NULL) { return -EINVAL; @@ -173,7 +173,7 @@ extern "C" int EffectCreate(effect_uuid_t *uuid, *pHandle = (effect_handle_t)pContext; pContext->state = EQUALIZER_STATE_INITIALIZED; - LOGV("EffectLibCreateEffect %p, size %d", + ALOGV("EffectLibCreateEffect %p, size %d", pContext, AudioEqualizer::GetInstanceSize(kNumBands)+sizeof(EqualizerContext)); return 0; @@ -183,7 +183,7 @@ extern "C" int EffectCreate(effect_uuid_t *uuid, extern "C" int EffectRelease(effect_handle_t handle) { EqualizerContext * pContext = (EqualizerContext *)handle; - LOGV("EffectLibReleaseEffect %p", handle); + ALOGV("EffectLibReleaseEffect %p", handle); if (pContext == NULL) { return -EINVAL; } @@ -199,7 +199,7 @@ extern "C" int EffectGetDescriptor(effect_uuid_t *uuid, effect_descriptor_t *pDescriptor) { if (pDescriptor == NULL || uuid == NULL){ - LOGV("EffectGetDescriptor() called with NULL pointer"); + ALOGV("EffectGetDescriptor() called with NULL pointer"); return -EINVAL; } @@ -218,7 +218,7 @@ extern "C" int EffectGetDescriptor(effect_uuid_t *uuid, #define CHECK_ARG(cond) { \ if (!(cond)) { \ - LOGV("Invalid argument: "#cond); \ + ALOGV("Invalid argument: "#cond); \ return -EINVAL; \ } \ } @@ -239,7 +239,7 @@ extern "C" int EffectGetDescriptor(effect_uuid_t *uuid, int Equalizer_configure(EqualizerContext *pContext, effect_config_t *pConfig) { - LOGV("Equalizer_configure start"); + ALOGV("Equalizer_configure start"); CHECK_ARG(pContext != NULL); CHECK_ARG(pConfig != NULL); @@ -292,7 +292,7 @@ int Equalizer_init(EqualizerContext *pContext) { int status; - LOGV("Equalizer_init start"); + ALOGV("Equalizer_init start"); CHECK_ARG(pContext != NULL); @@ -416,13 +416,13 @@ int Equalizer_getParameter(AudioEqualizer * pEqualizer, int32_t *pParam, size_t switch (param) { case EQ_PARAM_NUM_BANDS: *(uint16_t *)pValue = (uint16_t)kNumBands; - LOGV("Equalizer_getParameter() EQ_PARAM_NUM_BANDS %d", *(int16_t *)pValue); + ALOGV("Equalizer_getParameter() EQ_PARAM_NUM_BANDS %d", *(int16_t *)pValue); break; case EQ_PARAM_LEVEL_RANGE: *(int16_t *)pValue = -9600; *((int16_t *)pValue + 1) = 4800; - LOGV("Equalizer_getParameter() EQ_PARAM_LEVEL_RANGE min %d, max %d", + ALOGV("Equalizer_getParameter() EQ_PARAM_LEVEL_RANGE min %d, max %d", *(int32_t *)pValue, *((int32_t *)pValue + 1)); break; @@ -433,7 +433,7 @@ int Equalizer_getParameter(AudioEqualizer * pEqualizer, int32_t *pParam, size_t break; } *(int16_t *)pValue = (int16_t)pEqualizer->getGain(param2); - LOGV("Equalizer_getParameter() EQ_PARAM_BAND_LEVEL band %d, level %d", + ALOGV("Equalizer_getParameter() EQ_PARAM_BAND_LEVEL band %d, level %d", param2, *(int32_t *)pValue); break; @@ -444,7 +444,7 @@ int Equalizer_getParameter(AudioEqualizer * pEqualizer, int32_t *pParam, size_t break; } *(int32_t *)pValue = pEqualizer->getFrequency(param2); - LOGV("Equalizer_getParameter() EQ_PARAM_CENTER_FREQ band %d, frequency %d", + ALOGV("Equalizer_getParameter() EQ_PARAM_CENTER_FREQ band %d, frequency %d", param2, *(int32_t *)pValue); break; @@ -455,25 +455,25 @@ int Equalizer_getParameter(AudioEqualizer * pEqualizer, int32_t *pParam, size_t break; } pEqualizer->getBandRange(param2, *(uint32_t *)pValue, *((uint32_t *)pValue + 1)); - LOGV("Equalizer_getParameter() EQ_PARAM_BAND_FREQ_RANGE band %d, min %d, max %d", + ALOGV("Equalizer_getParameter() EQ_PARAM_BAND_FREQ_RANGE band %d, min %d, max %d", param2, *(int32_t *)pValue, *((int32_t *)pValue + 1)); break; case EQ_PARAM_GET_BAND: param2 = *pParam; *(uint16_t *)pValue = (uint16_t)pEqualizer->getMostRelevantBand(param2); - LOGV("Equalizer_getParameter() EQ_PARAM_GET_BAND frequency %d, band %d", + ALOGV("Equalizer_getParameter() EQ_PARAM_GET_BAND frequency %d, band %d", param2, *(int32_t *)pValue); break; case EQ_PARAM_CUR_PRESET: *(uint16_t *)pValue = (uint16_t)pEqualizer->getPreset(); - LOGV("Equalizer_getParameter() EQ_PARAM_CUR_PRESET %d", *(int32_t *)pValue); + ALOGV("Equalizer_getParameter() EQ_PARAM_CUR_PRESET %d", *(int32_t *)pValue); break; case EQ_PARAM_GET_NUM_OF_PRESETS: *(uint16_t *)pValue = (uint16_t)pEqualizer->getNumPresets(); - LOGV("Equalizer_getParameter() EQ_PARAM_GET_NUM_OF_PRESETS %d", *(int16_t *)pValue); + ALOGV("Equalizer_getParameter() EQ_PARAM_GET_NUM_OF_PRESETS %d", *(int16_t *)pValue); break; case EQ_PARAM_GET_PRESET_NAME: @@ -486,13 +486,13 @@ int Equalizer_getParameter(AudioEqualizer * pEqualizer, int32_t *pParam, size_t strncpy(name, pEqualizer->getPresetName(param2), *pValueSize - 1); name[*pValueSize - 1] = 0; *pValueSize = strlen(name) + 1; - LOGV("Equalizer_getParameter() EQ_PARAM_GET_PRESET_NAME preset %d, name %s len %d", + ALOGV("Equalizer_getParameter() EQ_PARAM_GET_PRESET_NAME preset %d, name %s len %d", param2, gEqualizerPresets[param2].name, *pValueSize); break; case EQ_PARAM_PROPERTIES: { int16_t *p = (int16_t *)pValue; - LOGV("Equalizer_getParameter() EQ_PARAM_PROPERTIES"); + ALOGV("Equalizer_getParameter() EQ_PARAM_PROPERTIES"); p[0] = (int16_t)pEqualizer->getPreset(); p[1] = (int16_t)kNumBands; for (int i = 0; i < kNumBands; i++) { @@ -501,7 +501,7 @@ int Equalizer_getParameter(AudioEqualizer * pEqualizer, int32_t *pParam, size_t } break; default: - LOGV("Equalizer_getParameter() invalid param %d", param); + ALOGV("Equalizer_getParameter() invalid param %d", param); status = -EINVAL; break; } @@ -541,7 +541,7 @@ int Equalizer_setParameter (AudioEqualizer * pEqualizer, int32_t *pParam, void * case EQ_PARAM_CUR_PRESET: preset = (int32_t)(*(uint16_t *)pValue); - LOGV("setParameter() EQ_PARAM_CUR_PRESET %d", preset); + ALOGV("setParameter() EQ_PARAM_CUR_PRESET %d", preset); if (preset < 0 || preset >= pEqualizer->getNumPresets()) { status = -EINVAL; break; @@ -552,7 +552,7 @@ int Equalizer_setParameter (AudioEqualizer * pEqualizer, int32_t *pParam, void * case EQ_PARAM_BAND_LEVEL: band = *pParam; level = (int32_t)(*(int16_t *)pValue); - LOGV("setParameter() EQ_PARAM_BAND_LEVEL band %d, level %d", band, level); + ALOGV("setParameter() EQ_PARAM_BAND_LEVEL band %d, level %d", band, level); if (band >= kNumBands) { status = -EINVAL; break; @@ -561,7 +561,7 @@ int Equalizer_setParameter (AudioEqualizer * pEqualizer, int32_t *pParam, void * pEqualizer->commit(true); break; case EQ_PARAM_PROPERTIES: { - LOGV("setParameter() EQ_PARAM_PROPERTIES"); + ALOGV("setParameter() EQ_PARAM_PROPERTIES"); int16_t *p = (int16_t *)pValue; if ((int)p[0] >= pEqualizer->getNumPresets()) { status = -EINVAL; @@ -581,7 +581,7 @@ int Equalizer_setParameter (AudioEqualizer * pEqualizer, int32_t *pParam, void * pEqualizer->commit(true); } break; default: - LOGV("setParameter() invalid param %d", param); + ALOGV("setParameter() invalid param %d", param); status = -EINVAL; break; } @@ -634,7 +634,7 @@ extern "C" int Equalizer_command(effect_handle_t self, uint32_t cmdCode, uint32_ android::AudioEqualizer * pEqualizer = pContext->pEqualizer; - LOGV("Equalizer_command command %d cmdSize %d",cmdCode, cmdSize); + ALOGV("Equalizer_command command %d cmdSize %d",cmdCode, cmdSize); switch (cmdCode) { case EFFECT_CMD_INIT: @@ -666,14 +666,14 @@ extern "C" int Equalizer_command(effect_handle_t self, uint32_t cmdCode, uint32_ p->status = android::Equalizer_getParameter(pEqualizer, (int32_t *)p->data, &p->vsize, p->data + voffset); *replySize = sizeof(effect_param_t) + voffset + p->vsize; - LOGV("Equalizer_command EFFECT_CMD_GET_PARAM *pCmdData %d, *replySize %d, *pReplyData %08x %08x", + ALOGV("Equalizer_command EFFECT_CMD_GET_PARAM *pCmdData %d, *replySize %d, *pReplyData %08x %08x", *(int32_t *)((char *)pCmdData + sizeof(effect_param_t)), *replySize, *(int32_t *)((char *)pReplyData + sizeof(effect_param_t) + voffset), *(int32_t *)((char *)pReplyData + sizeof(effect_param_t) + voffset + sizeof(int32_t))); } break; case EFFECT_CMD_SET_PARAM: { - LOGV("Equalizer_command EFFECT_CMD_SET_PARAM cmdSize %d pCmdData %p, *replySize %d, pReplyData %p", + ALOGV("Equalizer_command EFFECT_CMD_SET_PARAM cmdSize %d pCmdData %p, *replySize %d, pReplyData %p", cmdSize, pCmdData, *replySize, pReplyData); if (pCmdData == NULL || cmdSize < (int)(sizeof(effect_param_t) + sizeof(int32_t)) || pReplyData == NULL || *replySize != sizeof(int32_t)) { @@ -691,7 +691,7 @@ extern "C" int Equalizer_command(effect_handle_t self, uint32_t cmdCode, uint32_ return -ENOSYS; } pContext->state = EQUALIZER_STATE_ACTIVE; - LOGV("EFFECT_CMD_ENABLE() OK"); + ALOGV("EFFECT_CMD_ENABLE() OK"); *(int *)pReplyData = 0; break; case EFFECT_CMD_DISABLE: @@ -702,7 +702,7 @@ extern "C" int Equalizer_command(effect_handle_t self, uint32_t cmdCode, uint32_ return -ENOSYS; } pContext->state = EQUALIZER_STATE_INITIALIZED; - LOGV("EFFECT_CMD_DISABLE() OK"); + ALOGV("EFFECT_CMD_DISABLE() OK"); *(int *)pReplyData = 0; break; case EFFECT_CMD_SET_DEVICE: @@ -723,7 +723,7 @@ extern "C" int Equalizer_getDescriptor(effect_handle_t self, android::EqualizerContext * pContext = (android::EqualizerContext *) self; if (pContext == NULL || pDescriptor == NULL) { - LOGV("Equalizer_getDescriptor() invalid param"); + ALOGV("Equalizer_getDescriptor() invalid param"); return -EINVAL; } diff --git a/media/libeffects/testlibs/EffectReverb.c b/media/libeffects/testlibs/EffectReverb.c index 405f908..1da8d32 100644 --- a/media/libeffects/testlibs/EffectReverb.c +++ b/media/libeffects/testlibs/EffectReverb.c @@ -122,7 +122,7 @@ int EffectCreate(effect_uuid_t *uuid, int aux = 0; int preset = 0; - LOGV("EffectLibCreateEffect start"); + ALOGV("EffectLibCreateEffect start"); if (pHandle == NULL || uuid == NULL) { return -EINVAL; @@ -163,7 +163,7 @@ int EffectCreate(effect_uuid_t *uuid, module->context.mState = REVERB_STATE_INITIALIZED; - LOGV("EffectLibCreateEffect %p ,size %d", module, sizeof(reverb_module_t)); + ALOGV("EffectLibCreateEffect %p ,size %d", module, sizeof(reverb_module_t)); return 0; } @@ -171,7 +171,7 @@ int EffectCreate(effect_uuid_t *uuid, int EffectRelease(effect_handle_t handle) { reverb_module_t *pRvbModule = (reverb_module_t *)handle; - LOGV("EffectLibReleaseEffect %p", handle); + ALOGV("EffectLibReleaseEffect %p", handle); if (handle == NULL) { return -EINVAL; } @@ -188,14 +188,14 @@ int EffectGetDescriptor(effect_uuid_t *uuid, int length = sizeof(gDescriptors) / sizeof(const effect_descriptor_t *); if (pDescriptor == NULL || uuid == NULL){ - LOGV("EffectGetDescriptor() called with NULL pointer"); + ALOGV("EffectGetDescriptor() called with NULL pointer"); return -EINVAL; } for (i = 0; i < length; i++) { if (memcmp(uuid, &gDescriptors[i]->uuid, sizeof(effect_uuid_t)) == 0) { memcpy(pDescriptor, gDescriptors[i], sizeof(effect_descriptor_t)); - LOGV("EffectGetDescriptor - UUID matched Reverb type %d, UUID = %x", + ALOGV("EffectGetDescriptor - UUID matched Reverb type %d, UUID = %x", i, gDescriptors[i]->uuid.timeLow); return 0; } @@ -306,7 +306,7 @@ static int Reverb_Command(effect_handle_t self, uint32_t cmdCode, uint32_t cmdSi pReverb = (reverb_object_t*) &pRvbModule->context; - LOGV("Reverb_Command command %d cmdSize %d",cmdCode, cmdSize); + ALOGV("Reverb_Command command %d cmdSize %d",cmdCode, cmdSize); switch (cmdCode) { case EFFECT_CMD_INIT: @@ -330,7 +330,7 @@ static int Reverb_Command(effect_handle_t self, uint32_t cmdCode, uint32_t cmdSi Reverb_Reset(pReverb, false); break; case EFFECT_CMD_GET_PARAM: - LOGV("Reverb_Command EFFECT_CMD_GET_PARAM pCmdData %p, *replySize %d, pReplyData: %p",pCmdData, *replySize, pReplyData); + ALOGV("Reverb_Command EFFECT_CMD_GET_PARAM pCmdData %p, *replySize %d, pReplyData: %p",pCmdData, *replySize, pReplyData); if (pCmdData == NULL || cmdSize < (int)(sizeof(effect_param_t) + sizeof(int32_t)) || pReplyData == NULL || *replySize < (int) sizeof(effect_param_t)) { @@ -338,13 +338,13 @@ static int Reverb_Command(effect_handle_t self, uint32_t cmdCode, uint32_t cmdSi } effect_param_t *rep = (effect_param_t *) pReplyData; memcpy(pReplyData, pCmdData, sizeof(effect_param_t) + sizeof(int32_t)); - LOGV("Reverb_Command EFFECT_CMD_GET_PARAM param %d, replySize %d",*(int32_t *)rep->data, rep->vsize); + ALOGV("Reverb_Command EFFECT_CMD_GET_PARAM param %d, replySize %d",*(int32_t *)rep->data, rep->vsize); rep->status = Reverb_getParameter(pReverb, *(int32_t *)rep->data, &rep->vsize, rep->data + sizeof(int32_t)); *replySize = sizeof(effect_param_t) + sizeof(int32_t) + rep->vsize; break; case EFFECT_CMD_SET_PARAM: - LOGV("Reverb_Command EFFECT_CMD_SET_PARAM cmdSize %d pCmdData %p, *replySize %d, pReplyData %p", + ALOGV("Reverb_Command EFFECT_CMD_SET_PARAM cmdSize %d pCmdData %p, *replySize %d, pReplyData %p", cmdSize, pCmdData, *replySize, pReplyData); if (pCmdData == NULL || (cmdSize < (int)(sizeof(effect_param_t) + sizeof(int32_t))) || pReplyData == NULL || *replySize != (int)sizeof(int32_t)) { @@ -362,7 +362,7 @@ static int Reverb_Command(effect_handle_t self, uint32_t cmdCode, uint32_t cmdSi return -ENOSYS; } pReverb->mState = REVERB_STATE_ACTIVE; - LOGV("EFFECT_CMD_ENABLE() OK"); + ALOGV("EFFECT_CMD_ENABLE() OK"); *(int *)pReplyData = 0; break; case EFFECT_CMD_DISABLE: @@ -373,14 +373,14 @@ static int Reverb_Command(effect_handle_t self, uint32_t cmdCode, uint32_t cmdSi return -ENOSYS; } pReverb->mState = REVERB_STATE_INITIALIZED; - LOGV("EFFECT_CMD_DISABLE() OK"); + ALOGV("EFFECT_CMD_DISABLE() OK"); *(int *)pReplyData = 0; break; case EFFECT_CMD_SET_DEVICE: if (pCmdData == NULL || cmdSize != (int)sizeof(uint32_t)) { return -EINVAL; } - LOGV("Reverb_Command EFFECT_CMD_SET_DEVICE: 0x%08x", *(uint32_t *)pCmdData); + ALOGV("Reverb_Command EFFECT_CMD_SET_DEVICE: 0x%08x", *(uint32_t *)pCmdData); break; case EFFECT_CMD_SET_VOLUME: { // audio output is always stereo => 2 channel volumes @@ -389,14 +389,14 @@ static int Reverb_Command(effect_handle_t self, uint32_t cmdCode, uint32_t cmdSi } float left = (float)(*(uint32_t *)pCmdData) / (1 << 24); float right = (float)(*((uint32_t *)pCmdData + 1)) / (1 << 24); - LOGV("Reverb_Command EFFECT_CMD_SET_VOLUME: left %f, right %f ", left, right); + ALOGV("Reverb_Command EFFECT_CMD_SET_VOLUME: left %f, right %f ", left, right); break; } case EFFECT_CMD_SET_AUDIO_MODE: if (pCmdData == NULL || cmdSize != (int)sizeof(uint32_t)) { return -EINVAL; } - LOGV("Reverb_Command EFFECT_CMD_SET_AUDIO_MODE: %d", *(uint32_t *)pCmdData); + ALOGV("Reverb_Command EFFECT_CMD_SET_AUDIO_MODE: %d", *(uint32_t *)pCmdData); break; default: LOGW("Reverb_Command invalid command %d",cmdCode); @@ -464,7 +464,7 @@ int Reverb_GetDescriptor(effect_handle_t self, int Reverb_Init(reverb_module_t *pRvbModule, int aux, int preset) { int ret; - LOGV("Reverb_Init module %p, aux: %d, preset: %d", pRvbModule,aux, preset); + ALOGV("Reverb_Init module %p, aux: %d, preset: %d", pRvbModule,aux, preset); memset(&pRvbModule->context, 0, sizeof(reverb_object_t)); @@ -494,7 +494,7 @@ int Reverb_Init(reverb_module_t *pRvbModule, int aux, int preset) { ret = Reverb_Configure(pRvbModule, &pRvbModule->config, true); if (ret < 0) { - LOGV("Reverb_Init error %d on module %p", ret, pRvbModule); + ALOGV("Reverb_Init error %d on module %p", ret, pRvbModule); } return ret; @@ -531,12 +531,12 @@ int Reverb_Configure(reverb_module_t *pRvbModule, effect_config_t *pConfig, || pConfig->outputCfg.channels != OUTPUT_CHANNELS || pConfig->inputCfg.format != AUDIO_FORMAT_PCM_16_BIT || pConfig->outputCfg.format != AUDIO_FORMAT_PCM_16_BIT) { - LOGV("Reverb_Configure invalid config"); + ALOGV("Reverb_Configure invalid config"); return -EINVAL; } if ((pReverb->m_Aux && (pConfig->inputCfg.channels != AUDIO_CHANNEL_OUT_MONO)) || (!pReverb->m_Aux && (pConfig->inputCfg.channels != AUDIO_CHANNEL_OUT_STEREO))) { - LOGV("Reverb_Configure invalid config"); + ALOGV("Reverb_Configure invalid config"); return -EINVAL; } @@ -576,7 +576,7 @@ int Reverb_Configure(reverb_module_t *pRvbModule, effect_config_t *pConfig, pReverb->m_nCosWT_5KHz = 25997; break; default: - LOGV("Reverb_Configure invalid sampling rate %d", pReverb->m_nSamplingRate); + ALOGV("Reverb_Configure invalid sampling rate %d", pReverb->m_nSamplingRate); return -EINVAL; } @@ -761,7 +761,7 @@ int Reverb_getParameter(reverb_object_t *pReverb, int32_t param, size_t *pSize, } else { *pValue16 = (int16_t)(pReverb->m_nNextRoom + 1); } - LOGV("get REVERB_PARAM_PRESET, preset %d", *pValue16); + ALOGV("get REVERB_PARAM_PRESET, preset %d", *pValue16); } else { switch (param) { case REVERB_PARAM_ROOM_LEVEL: @@ -812,7 +812,7 @@ int Reverb_getParameter(reverb_object_t *pReverb, int32_t param, size_t *pSize, / (32767 - pReverb->m_nRoomLpfFbk); *pValue16 = Effects_Linear16ToMillibels(temp); - LOGV("get REVERB_PARAM_ROOM_LEVEL %d, gain %d, m_nRoomLpfFwd %d, m_nRoomLpfFbk %d", *pValue16, temp, pReverb->m_nRoomLpfFwd, pReverb->m_nRoomLpfFbk); + ALOGV("get REVERB_PARAM_ROOM_LEVEL %d, gain %d, m_nRoomLpfFwd %d, m_nRoomLpfFbk %d", *pValue16, temp, pReverb->m_nRoomLpfFwd, pReverb->m_nRoomLpfFbk); if (param == REVERB_PARAM_ROOM_LEVEL) { break; @@ -827,17 +827,17 @@ int Reverb_getParameter(reverb_object_t *pReverb, int32_t param, size_t *pSize, // - C is cos(2piWT) @ 5000Hz: pReverb->m_nCosWT_5KHz temp = MULT_EG1_EG1(pReverb->m_nRoomLpfFbk, pReverb->m_nRoomLpfFbk); - LOGV("get REVERB_PARAM_ROOM_HF_LEVEL, a1^2 %d", temp); + ALOGV("get REVERB_PARAM_ROOM_HF_LEVEL, a1^2 %d", temp); temp2 = MULT_EG1_EG1(pReverb->m_nRoomLpfFbk, pReverb->m_nCosWT_5KHz) << 1; - LOGV("get REVERB_PARAM_ROOM_HF_LEVEL, 2 Cos a1 %d", temp2); + ALOGV("get REVERB_PARAM_ROOM_HF_LEVEL, 2 Cos a1 %d", temp2); temp = 32767 + temp - temp2; - LOGV("get REVERB_PARAM_ROOM_HF_LEVEL, a1^2 + 2 Cos a1 + 1 %d", temp); + ALOGV("get REVERB_PARAM_ROOM_HF_LEVEL, a1^2 + 2 Cos a1 + 1 %d", temp); temp = Effects_Sqrt(temp) * 181; - LOGV("get REVERB_PARAM_ROOM_HF_LEVEL, SQRT(a1^2 + 2 Cos a1 + 1) %d", temp); + ALOGV("get REVERB_PARAM_ROOM_HF_LEVEL, SQRT(a1^2 + 2 Cos a1 + 1) %d", temp); temp = ((32767 - pReverb->m_nRoomLpfFbk) << 15) / temp; - LOGV("get REVERB_PARAM_ROOM_HF_LEVEL, gain %d, m_nRoomLpfFwd %d, m_nRoomLpfFbk %d", temp, pReverb->m_nRoomLpfFwd, pReverb->m_nRoomLpfFbk); + ALOGV("get REVERB_PARAM_ROOM_HF_LEVEL, gain %d, m_nRoomLpfFwd %d, m_nRoomLpfFbk %d", temp, pReverb->m_nRoomLpfFwd, pReverb->m_nRoomLpfFbk); *pValue16 = Effects_Linear16ToMillibels(temp); @@ -858,7 +858,7 @@ int Reverb_getParameter(reverb_object_t *pReverb, int32_t param, size_t *pSize, // Convert samples to ms *pValue32 = (temp * 1000) / pReverb->m_nSamplingRate; - LOGV("get REVERB_PARAM_DECAY_TIME, samples %d, ms %d", temp, *pValue32); + ALOGV("get REVERB_PARAM_DECAY_TIME, samples %d, ms %d", temp, *pValue32); if (param == REVERB_PARAM_DECAY_TIME) { break; @@ -877,7 +877,7 @@ int Reverb_getParameter(reverb_object_t *pReverb, int32_t param, size_t *pSize, // - C is cos(2piWT) @ 5000Hz: pReverb->m_nCosWT_5KHz if (pReverb->m_nRvbLpfFbk == 0) { *pValue16 = 1000; - LOGV("get REVERB_PARAM_DECAY_HF_RATIO, pReverb->m_nRvbLpfFbk == 0, ratio %d", *pValue16); + ALOGV("get REVERB_PARAM_DECAY_HF_RATIO, pReverb->m_nRvbLpfFbk == 0, ratio %d", *pValue16); } else { temp = MULT_EG1_EG1(pReverb->m_nRvbLpfFbk, pReverb->m_nRvbLpfFbk); temp2 = MULT_EG1_EG1(pReverb->m_nRvbLpfFbk, pReverb->m_nCosWT_5KHz) @@ -891,7 +891,7 @@ int Reverb_getParameter(reverb_object_t *pReverb, int32_t param, size_t *pSize, temp = Effects_Linear16ToMillibels(temp); temp2 = Effects_Linear16ToMillibels(temp2); - LOGV("get REVERB_PARAM_DECAY_HF_RATIO, gain 5KHz %d mB, gain DC %d mB", temp, temp2); + ALOGV("get REVERB_PARAM_DECAY_HF_RATIO, gain 5KHz %d mB, gain DC %d mB", temp, temp2); if (temp == 0) temp = 1; @@ -900,7 +900,7 @@ int Reverb_getParameter(reverb_object_t *pReverb, int32_t param, size_t *pSize, temp = 1000; *pValue16 = temp; - LOGV("get REVERB_PARAM_DECAY_HF_RATIO, ratio %d", *pValue16); + ALOGV("get REVERB_PARAM_DECAY_HF_RATIO, ratio %d", *pValue16); } if (param == REVERB_PARAM_DECAY_HF_RATIO) { @@ -912,7 +912,7 @@ int Reverb_getParameter(reverb_object_t *pReverb, int32_t param, size_t *pSize, case REVERB_PARAM_REFLECTIONS_LEVEL: *pValue16 = Effects_Linear16ToMillibels(pReverb->m_nEarlyGain); - LOGV("get REVERB_PARAM_REFLECTIONS_LEVEL, %d", *pValue16); + ALOGV("get REVERB_PARAM_REFLECTIONS_LEVEL, %d", *pValue16); if (param == REVERB_PARAM_REFLECTIONS_LEVEL) { break; } @@ -923,7 +923,7 @@ int Reverb_getParameter(reverb_object_t *pReverb, int32_t param, size_t *pSize, // convert samples to ms *pValue32 = (pReverb->m_nEarlyDelay * 1000) / pReverb->m_nSamplingRate; - LOGV("get REVERB_PARAM_REFLECTIONS_DELAY, samples %d, ms %d", pReverb->m_nEarlyDelay, *pValue32); + ALOGV("get REVERB_PARAM_REFLECTIONS_DELAY, samples %d, ms %d", pReverb->m_nEarlyDelay, *pValue32); if (param == REVERB_PARAM_REFLECTIONS_DELAY) { break; @@ -935,7 +935,7 @@ int Reverb_getParameter(reverb_object_t *pReverb, int32_t param, size_t *pSize, // Convert linear gain to millibels *pValue16 = Effects_Linear16ToMillibels(pReverb->m_nLateGain << 2); - LOGV("get REVERB_PARAM_REVERB_LEVEL %d", *pValue16); + ALOGV("get REVERB_PARAM_REVERB_LEVEL %d", *pValue16); if (param == REVERB_PARAM_REVERB_LEVEL) { break; @@ -947,7 +947,7 @@ int Reverb_getParameter(reverb_object_t *pReverb, int32_t param, size_t *pSize, // convert samples to ms *pValue32 = (pReverb->m_nLateDelay * 1000) / pReverb->m_nSamplingRate; - LOGV("get REVERB_PARAM_REVERB_DELAY, samples %d, ms %d", pReverb->m_nLateDelay, *pValue32); + ALOGV("get REVERB_PARAM_REVERB_DELAY, samples %d, ms %d", pReverb->m_nLateDelay, *pValue32); if (param == REVERB_PARAM_REVERB_DELAY) { break; @@ -965,7 +965,7 @@ int Reverb_getParameter(reverb_object_t *pReverb, int32_t param, size_t *pSize, temp = 1000; *pValue16 = temp; - LOGV("get REVERB_PARAM_DIFFUSION, %d, AP0 gain %d", *pValue16, pReverb->m_sAp0.m_nApGain); + ALOGV("get REVERB_PARAM_DIFFUSION, %d, AP0 gain %d", *pValue16, pReverb->m_sAp0.m_nApGain); if (param == REVERB_PARAM_DIFFUSION) { break; @@ -987,7 +987,7 @@ int Reverb_getParameter(reverb_object_t *pReverb, int32_t param, size_t *pSize, *pValue16 = temp; - LOGV("get REVERB_PARAM_DENSITY, %d, AP0 delay smps %d", *pValue16, pReverb->m_sAp0.m_zApOut - pReverb->m_sAp0.m_zApIn); + ALOGV("get REVERB_PARAM_DENSITY, %d, AP0 delay smps %d", *pValue16, pReverb->m_sAp0.m_zApOut - pReverb->m_sAp0.m_zApIn); break; default: @@ -997,7 +997,7 @@ int Reverb_getParameter(reverb_object_t *pReverb, int32_t param, size_t *pSize, *pSize = size; - LOGV("Reverb_getParameter, context %p, param %d, value %d", + ALOGV("Reverb_getParameter, context %p, param %d, value %d", pReverb, param, *(int *)pValue); return 0; @@ -1035,7 +1035,7 @@ int Reverb_setParameter(reverb_object_t *pReverb, int32_t param, size_t size, int32_t averageDelay; size_t paramSize; - LOGV("Reverb_setParameter, context %p, param %d, value16 %d, value32 %d", + ALOGV("Reverb_setParameter, context %p, param %d, value16 %d, value32 %d", pReverb, param, *(int16_t *)pValue, *(int32_t *)pValue); if (pReverb->m_Preset) { @@ -1043,7 +1043,7 @@ int Reverb_setParameter(reverb_object_t *pReverb, int32_t param, size_t size, return -EINVAL; } value16 = *(int16_t *)pValue; - LOGV("set REVERB_PARAM_PRESET, preset %d", value16); + ALOGV("set REVERB_PARAM_PRESET, preset %d", value16); if (value16 < REVERB_PRESET_NONE || value16 > REVERB_PRESET_PLATE) { return -EINVAL; } @@ -1114,7 +1114,7 @@ int Reverb_setParameter(reverb_object_t *pReverb, int32_t param, size_t size, pReverb->m_nRoomLpfFwd = MULT_EG1_EG1(temp, (32767 - pReverb->m_nRoomLpfFbk)); - LOGV("REVERB_PARAM_ROOM_LEVEL, gain %d, new m_nRoomLpfFwd %d, m_nRoomLpfFbk %d", temp, pReverb->m_nRoomLpfFwd, pReverb->m_nRoomLpfFbk); + ALOGV("REVERB_PARAM_ROOM_LEVEL, gain %d, new m_nRoomLpfFwd %d, m_nRoomLpfFbk %d", temp, pReverb->m_nRoomLpfFwd, pReverb->m_nRoomLpfFbk); if (param == REVERB_PARAM_ROOM_LEVEL) break; value16 = pProperties->roomHFLevel; @@ -1142,11 +1142,11 @@ int Reverb_setParameter(reverb_object_t *pReverb, int32_t param, size_t size, // dG^2 temp = Effects_MillibelsToLinear16(value16); - LOGV("REVERB_PARAM_ROOM_HF_LEVEL, HF gain %d", temp); + ALOGV("REVERB_PARAM_ROOM_HF_LEVEL, HF gain %d", temp); temp = (1 << 30) / temp; - LOGV("REVERB_PARAM_ROOM_HF_LEVEL, 1/ HF gain %d", temp); + ALOGV("REVERB_PARAM_ROOM_HF_LEVEL, 1/ HF gain %d", temp); dG2 = (int32_t) (((int64_t) temp * (int64_t) temp) >> 15); - LOGV("REVERB_PARAM_ROOM_HF_LEVEL, 1/ HF gain ^ 2 %d", dG2); + ALOGV("REVERB_PARAM_ROOM_HF_LEVEL, 1/ HF gain ^ 2 %d", dG2); // b = 2*(C-dG^2)/(1-dG^2) b = (int32_t) ((((int64_t) 1 << (15 + 1)) * ((int64_t) pReverb->m_nCosWT_5KHz - (int64_t) dG2)) @@ -1156,18 +1156,18 @@ int Reverb_setParameter(reverb_object_t *pReverb, int32_t param, size_t size, delta = (int32_t) ((((int64_t) b * (int64_t) b) >> 15) - (1 << (15 + 2))); - LOGV_IF(delta > (1<<30), " delta overflow %d", delta); + ALOGV_IF(delta > (1<<30), " delta overflow %d", delta); - LOGV("REVERB_PARAM_ROOM_HF_LEVEL, dG2 %d, b %d, delta %d, m_nCosWT_5KHz %d", dG2, b, delta, pReverb->m_nCosWT_5KHz); + ALOGV("REVERB_PARAM_ROOM_HF_LEVEL, dG2 %d, b %d, delta %d, m_nCosWT_5KHz %d", dG2, b, delta, pReverb->m_nCosWT_5KHz); // m_nRoomLpfFbk = -a1 = - (- b + sqrt(delta)) / 2 pReverb->m_nRoomLpfFbk = (b - Effects_Sqrt(delta) * 181) >> 1; } - LOGV("REVERB_PARAM_ROOM_HF_LEVEL, olg DC gain %d new m_nRoomLpfFbk %d, old m_nRoomLpfFwd %d", + ALOGV("REVERB_PARAM_ROOM_HF_LEVEL, olg DC gain %d new m_nRoomLpfFbk %d, old m_nRoomLpfFwd %d", temp2, pReverb->m_nRoomLpfFbk, pReverb->m_nRoomLpfFwd); pReverb->m_nRoomLpfFwd = MULT_EG1_EG1(temp2, (32767 - pReverb->m_nRoomLpfFbk)); - LOGV("REVERB_PARAM_ROOM_HF_LEVEL, new m_nRoomLpfFwd %d", pReverb->m_nRoomLpfFwd); + ALOGV("REVERB_PARAM_ROOM_HF_LEVEL, new m_nRoomLpfFwd %d", pReverb->m_nRoomLpfFwd); if (param == REVERB_PARAM_ROOM_HF_LEVEL) break; @@ -1189,7 +1189,7 @@ int Reverb_setParameter(reverb_object_t *pReverb, int32_t param, size_t size, + (pReverb->m_sAp1.m_zApOut - pReverb->m_sAp1.m_zApIn)) >> 1; temp = (-6000 * averageDelay) / value32; - LOGV("REVERB_PARAM_DECAY_TIME, delay smps %d, DT smps %d, gain mB %d",averageDelay, value32, temp); + ALOGV("REVERB_PARAM_DECAY_TIME, delay smps %d, DT smps %d, gain mB %d",averageDelay, value32, temp); if (temp < -4000 || temp > -100) return -EINVAL; @@ -1202,7 +1202,7 @@ int Reverb_setParameter(reverb_object_t *pReverb, int32_t param, size_t size, pReverb->m_nRvbLpfFwd = MULT_EG1_EG1(temp, (32767 - pReverb->m_nRvbLpfFbk)); - LOGV("REVERB_PARAM_DECAY_TIME, gain %d, new m_nRvbLpfFwd %d, old m_nRvbLpfFbk %d, reverb gain %d", temp, pReverb->m_nRvbLpfFwd, pReverb->m_nRvbLpfFbk, Effects_Linear16ToMillibels(pReverb->m_nLateGain)); + ALOGV("REVERB_PARAM_DECAY_TIME, gain %d, new m_nRvbLpfFwd %d, old m_nRvbLpfFbk %d, reverb gain %d", temp, pReverb->m_nRvbLpfFwd, pReverb->m_nRvbLpfFbk, Effects_Linear16ToMillibels(pReverb->m_nLateGain)); if (param == REVERB_PARAM_DECAY_TIME) break; @@ -1229,17 +1229,17 @@ int Reverb_setParameter(reverb_object_t *pReverb, int32_t param, size_t size, // G_5000Hz = G_DC * (1000/REVERB_PARAM_DECAY_HF_RATIO) in millibels value32 = ((int32_t) 1000 << 15) / (int32_t) value16; - LOGV("REVERB_PARAM_DECAY_HF_RATIO, DC gain %d, DC gain mB %d, 1000/R %d", temp2, temp, value32); + ALOGV("REVERB_PARAM_DECAY_HF_RATIO, DC gain %d, DC gain mB %d, 1000/R %d", temp2, temp, value32); temp = (int32_t) (((int64_t) temp * (int64_t) value32) >> 15); if (temp < -4000) { - LOGV("REVERB_PARAM_DECAY_HF_RATIO HF gain overflow %d mB", temp); + ALOGV("REVERB_PARAM_DECAY_HF_RATIO HF gain overflow %d mB", temp); temp = -4000; } temp = Effects_MillibelsToLinear16(temp); - LOGV("REVERB_PARAM_DECAY_HF_RATIO, HF gain %d", temp); + ALOGV("REVERB_PARAM_DECAY_HF_RATIO, HF gain %d", temp); // dG^2 temp = (temp2 << 15) / temp; dG2 = (int32_t) (((int64_t) temp * (int64_t) temp) >> 15); @@ -1256,11 +1256,11 @@ int Reverb_setParameter(reverb_object_t *pReverb, int32_t param, size_t size, // m_nRoomLpfFbk = -a1 = - (- b + sqrt(delta)) / 2 pReverb->m_nRvbLpfFbk = (b - Effects_Sqrt(delta) * 181) >> 1; - LOGV("REVERB_PARAM_DECAY_HF_RATIO, dG2 %d, b %d, delta %d", dG2, b, delta); + ALOGV("REVERB_PARAM_DECAY_HF_RATIO, dG2 %d, b %d, delta %d", dG2, b, delta); } - LOGV("REVERB_PARAM_DECAY_HF_RATIO, gain %d, m_nRvbLpfFbk %d, m_nRvbLpfFwd %d", temp2, pReverb->m_nRvbLpfFbk, pReverb->m_nRvbLpfFwd); + ALOGV("REVERB_PARAM_DECAY_HF_RATIO, gain %d, m_nRvbLpfFbk %d, m_nRvbLpfFwd %d", temp2, pReverb->m_nRvbLpfFbk, pReverb->m_nRvbLpfFwd); pReverb->m_nRvbLpfFwd = MULT_EG1_EG1(temp2, (32767 - pReverb->m_nRvbLpfFbk)); @@ -1284,7 +1284,7 @@ int Reverb_setParameter(reverb_object_t *pReverb, int32_t param, size_t size, = MULT_EG1_EG1(pPreset->m_sEarlyR.m_nGain[i],value16); } pReverb->m_nEarlyGain = value16; - LOGV("REVERB_PARAM_REFLECTIONS_LEVEL, m_nEarlyGain %d", pReverb->m_nEarlyGain); + ALOGV("REVERB_PARAM_REFLECTIONS_LEVEL, m_nEarlyGain %d", pReverb->m_nEarlyGain); if (param == REVERB_PARAM_REFLECTIONS_LEVEL) break; @@ -1315,7 +1315,7 @@ int Reverb_setParameter(reverb_object_t *pReverb, int32_t param, size_t size, } pReverb->m_nEarlyDelay = temp; - LOGV("REVERB_PARAM_REFLECTIONS_DELAY, m_nEarlyDelay smps %d max smp delay %d", pReverb->m_nEarlyDelay, maxSamples); + ALOGV("REVERB_PARAM_REFLECTIONS_DELAY, m_nEarlyDelay smps %d max smp delay %d", pReverb->m_nEarlyDelay, maxSamples); // Convert milliseconds to sample count => m_nEarlyDelay if (param == REVERB_PARAM_REFLECTIONS_DELAY) @@ -1330,7 +1330,7 @@ int Reverb_setParameter(reverb_object_t *pReverb, int32_t param, size_t size, // Convert millibels to linear 16 bits (gange 0 - 8191) => m_nLateGain. pReverb->m_nLateGain = Effects_MillibelsToLinear16(value16) >> 2; - LOGV("REVERB_PARAM_REVERB_LEVEL, m_nLateGain %d", pReverb->m_nLateGain); + ALOGV("REVERB_PARAM_REVERB_LEVEL, m_nLateGain %d", pReverb->m_nLateGain); if (param == REVERB_PARAM_REVERB_LEVEL) break; @@ -1359,7 +1359,7 @@ int Reverb_setParameter(reverb_object_t *pReverb, int32_t param, size_t size, pReverb->m_nDelay1Out += temp; pReverb->m_nLateDelay += temp; - LOGV("REVERB_PARAM_REVERB_DELAY, m_nLateDelay smps %d max smp delay %d", pReverb->m_nLateDelay, maxSamples); + ALOGV("REVERB_PARAM_REVERB_DELAY, m_nLateDelay smps %d max smp delay %d", pReverb->m_nLateDelay, maxSamples); // Convert milliseconds to sample count => m_nDelay1Out + m_nMaxExcursion if (param == REVERB_PARAM_REVERB_DELAY) @@ -1378,7 +1378,7 @@ int Reverb_setParameter(reverb_object_t *pReverb, int32_t param, size_t size, pReverb->m_sAp1.m_nApGain = AP1_GAIN_BASE + ((int32_t) value16 * AP1_GAIN_RANGE) / 1000; - LOGV("REVERB_PARAM_DIFFUSION, m_sAp0.m_nApGain %d m_sAp1.m_nApGain %d", pReverb->m_sAp0.m_nApGain, pReverb->m_sAp1.m_nApGain); + ALOGV("REVERB_PARAM_DIFFUSION, m_sAp0.m_nApGain %d m_sAp1.m_nApGain %d", pReverb->m_sAp0.m_nApGain, pReverb->m_sAp1.m_nApGain); if (param == REVERB_PARAM_DIFFUSION) break; @@ -1400,7 +1400,7 @@ int Reverb_setParameter(reverb_object_t *pReverb, int32_t param, size_t size, temp = maxSamples; pReverb->m_sAp0.m_zApOut = (uint16_t) (pReverb->m_sAp0.m_zApIn + temp); - LOGV("REVERB_PARAM_DENSITY, Ap0 delay smps %d", temp); + ALOGV("REVERB_PARAM_DENSITY, Ap0 delay smps %d", temp); temp = AP1_TIME_BASE + ((int32_t) value16 * AP1_TIME_RANGE) / 1000; /*lint -e{702} shift for performance */ @@ -1409,7 +1409,7 @@ int Reverb_setParameter(reverb_object_t *pReverb, int32_t param, size_t size, temp = maxSamples; pReverb->m_sAp1.m_zApOut = (uint16_t) (pReverb->m_sAp1.m_zApIn + temp); - LOGV("Ap1 delay smps %d", temp); + ALOGV("Ap1 delay smps %d", temp); break; diff --git a/media/libeffects/visualizer/EffectVisualizer.cpp b/media/libeffects/visualizer/EffectVisualizer.cpp index 1a06cc6..e9b8042 100644 --- a/media/libeffects/visualizer/EffectVisualizer.cpp +++ b/media/libeffects/visualizer/EffectVisualizer.cpp @@ -93,7 +93,7 @@ void Visualizer_reset(VisualizerContext *pContext) int Visualizer_configure(VisualizerContext *pContext, effect_config_t *pConfig) { - LOGV("Visualizer_configure start"); + ALOGV("Visualizer_configure start"); if (pConfig->inputCfg.samplingRate != pConfig->outputCfg.samplingRate) return -EINVAL; if (pConfig->inputCfg.channels != pConfig->outputCfg.channels) return -EINVAL; @@ -201,7 +201,7 @@ int VisualizerLib_Create(effect_uuid_t *uuid, pContext->mState = VISUALIZER_STATE_INITIALIZED; - LOGV("VisualizerLib_Create %p", pContext); + ALOGV("VisualizerLib_Create %p", pContext); return 0; @@ -210,7 +210,7 @@ int VisualizerLib_Create(effect_uuid_t *uuid, int VisualizerLib_Release(effect_handle_t handle) { VisualizerContext * pContext = (VisualizerContext *)handle; - LOGV("VisualizerLib_Release %p", handle); + ALOGV("VisualizerLib_Release %p", handle); if (pContext == NULL) { return -EINVAL; } @@ -224,7 +224,7 @@ int VisualizerLib_GetDescriptor(effect_uuid_t *uuid, effect_descriptor_t *pDescriptor) { if (pDescriptor == NULL || uuid == NULL){ - LOGV("VisualizerLib_GetDescriptor() called with NULL pointer"); + ALOGV("VisualizerLib_GetDescriptor() called with NULL pointer"); return -EINVAL; } @@ -328,7 +328,7 @@ int Visualizer_command(effect_handle_t self, uint32_t cmdCode, uint32_t cmdSize, return -EINVAL; } -// LOGV("Visualizer_command command %d cmdSize %d",cmdCode, cmdSize); +// ALOGV("Visualizer_command command %d cmdSize %d",cmdCode, cmdSize); switch (cmdCode) { case EFFECT_CMD_INIT: @@ -356,7 +356,7 @@ int Visualizer_command(effect_handle_t self, uint32_t cmdCode, uint32_t cmdSize, return -ENOSYS; } pContext->mState = VISUALIZER_STATE_ACTIVE; - LOGV("EFFECT_CMD_ENABLE() OK"); + ALOGV("EFFECT_CMD_ENABLE() OK"); *(int *)pReplyData = 0; break; case EFFECT_CMD_DISABLE: @@ -367,7 +367,7 @@ int Visualizer_command(effect_handle_t self, uint32_t cmdCode, uint32_t cmdSize, return -ENOSYS; } pContext->mState = VISUALIZER_STATE_INITIALIZED; - LOGV("EFFECT_CMD_DISABLE() OK"); + ALOGV("EFFECT_CMD_DISABLE() OK"); *(int *)pReplyData = 0; break; case EFFECT_CMD_GET_PARAM: { @@ -386,7 +386,7 @@ int Visualizer_command(effect_handle_t self, uint32_t cmdCode, uint32_t cmdSize, p->status = -EINVAL; break; } - LOGV("get mCaptureSize = %d", pContext->mCaptureSize); + ALOGV("get mCaptureSize = %d", pContext->mCaptureSize); *((uint32_t *)p->data + 1) = pContext->mCaptureSize; p->vsize = sizeof(uint32_t); *replySize += sizeof(uint32_t); @@ -406,7 +406,7 @@ int Visualizer_command(effect_handle_t self, uint32_t cmdCode, uint32_t cmdSize, break;; } pContext->mCaptureSize = *((uint32_t *)p->data + 1); - LOGV("set mCaptureSize = %d", pContext->mCaptureSize); + ALOGV("set mCaptureSize = %d", pContext->mCaptureSize); } break; case EFFECT_CMD_SET_DEVICE: case EFFECT_CMD_SET_VOLUME: @@ -416,7 +416,7 @@ int Visualizer_command(effect_handle_t self, uint32_t cmdCode, uint32_t cmdSize, case VISUALIZER_CMD_CAPTURE: if (pReplyData == NULL || *replySize != pContext->mCaptureSize) { - LOGV("VISUALIZER_CMD_CAPTURE() error *replySize %d pContext->mCaptureSize %d", + ALOGV("VISUALIZER_CMD_CAPTURE() error *replySize %d pContext->mCaptureSize %d", *replySize, pContext->mCaptureSize); return -EINVAL; } @@ -459,7 +459,7 @@ int Visualizer_getDescriptor(effect_handle_t self, VisualizerContext * pContext = (VisualizerContext *) self; if (pContext == NULL || pDescriptor == NULL) { - LOGV("Visualizer_getDescriptor() invalid param"); + ALOGV("Visualizer_getDescriptor() invalid param"); return -EINVAL; } diff --git a/media/libmedia/AudioEffect.cpp b/media/libmedia/AudioEffect.cpp index 0633744..6e53a15 100644 --- a/media/libmedia/AudioEffect.cpp +++ b/media/libmedia/AudioEffect.cpp @@ -69,7 +69,7 @@ AudioEffect::AudioEffect(const char *typeStr, effect_uuid_t uuid; effect_uuid_t *pUuid = NULL; - LOGV("Constructor string\n - type: %s\n - uuid: %s", typeStr, uuidStr); + ALOGV("Constructor string\n - type: %s\n - uuid: %s", typeStr, uuidStr); if (typeStr != NULL) { if (stringToGuid(typeStr, &type) == NO_ERROR) { @@ -98,7 +98,7 @@ status_t AudioEffect::set(const effect_uuid_t *type, sp<IMemory> cblk; int enabled; - LOGV("set %p mUserData: %p uuid: %p timeLow %08x", this, user, type, type ? type->timeLow : 0); + ALOGV("set %p mUserData: %p uuid: %p timeLow %08x", this, user, type, type ? type->timeLow : 0); if (mIEffect != 0) { LOGW("Effect already in use"); @@ -159,7 +159,7 @@ status_t AudioEffect::set(const effect_uuid_t *type, mCblk->buffer = (uint8_t *)mCblk + bufOffset; iEffect->asBinder()->linkToDeath(mIEffectClient); - LOGV("set() %p OK effect: %s id: %d status %d enabled %d, ", this, mDescriptor.name, mId, mStatus, mEnabled); + ALOGV("set() %p OK effect: %s id: %d status %d enabled %d, ", this, mDescriptor.name, mId, mStatus, mEnabled); return mStatus; } @@ -167,7 +167,7 @@ status_t AudioEffect::set(const effect_uuid_t *type, AudioEffect::~AudioEffect() { - LOGV("Destructor %p", this); + ALOGV("Destructor %p", this); if (mStatus == NO_ERROR || mStatus == ALREADY_EXISTS) { if (mIEffect != NULL) { @@ -210,10 +210,10 @@ status_t AudioEffect::setEnabled(bool enabled) AutoMutex lock(mLock); if (enabled != mEnabled) { if (enabled) { - LOGV("enable %p", this); + ALOGV("enable %p", this); status = mIEffect->enable(); } else { - LOGV("disable %p", this); + ALOGV("disable %p", this); status = mIEffect->disable(); } if (status == NO_ERROR) { @@ -230,7 +230,7 @@ status_t AudioEffect::command(uint32_t cmdCode, void *replyData) { if (mStatus != NO_ERROR && mStatus != ALREADY_EXISTS) { - LOGV("command() bad status %d", mStatus); + ALOGV("command() bad status %d", mStatus); return INVALID_OPERATION; } @@ -273,7 +273,7 @@ status_t AudioEffect::setParameter(effect_param_t *param) uint32_t size = sizeof(int); uint32_t psize = ((param->psize - 1) / sizeof(int) + 1) * sizeof(int) + param->vsize; - LOGV("setParameter: param: %d, param2: %d", *(int *)param->data, (param->psize == 8) ? *((int *)param->data + 1): -1); + ALOGV("setParameter: param: %d, param2: %d", *(int *)param->data, (param->psize == 8) ? *((int *)param->data + 1): -1); return mIEffect->command(EFFECT_CMD_SET_PARAM, sizeof (effect_param_t) + psize, param, &size, ¶m->status); } @@ -328,7 +328,7 @@ status_t AudioEffect::getParameter(effect_param_t *param) return BAD_VALUE; } - LOGV("getParameter: param: %d, param2: %d", *(int *)param->data, (param->psize == 8) ? *((int *)param->data + 1): -1); + ALOGV("getParameter: param: %d, param2: %d", *(int *)param->data, (param->psize == 8) ? *((int *)param->data + 1): -1); uint32_t psize = sizeof(effect_param_t) + ((param->psize - 1) / sizeof(int) + 1) * sizeof(int) + param->vsize; @@ -353,7 +353,7 @@ void AudioEffect::binderDied() void AudioEffect::controlStatusChanged(bool controlGranted) { - LOGV("controlStatusChanged %p control %d callback %p mUserData %p", this, controlGranted, mCbf, mUserData); + ALOGV("controlStatusChanged %p control %d callback %p mUserData %p", this, controlGranted, mCbf, mUserData); if (controlGranted) { if (mStatus == ALREADY_EXISTS) { mStatus = NO_ERROR; @@ -370,7 +370,7 @@ void AudioEffect::controlStatusChanged(bool controlGranted) void AudioEffect::enableStatusChanged(bool enabled) { - LOGV("enableStatusChanged %p enabled %d mCbf %p", this, enabled, mCbf); + ALOGV("enableStatusChanged %p enabled %d mCbf %p", this, enabled, mCbf); if (mStatus == ALREADY_EXISTS) { mEnabled = enabled; if (mCbf) { diff --git a/media/libmedia/AudioParameter.cpp b/media/libmedia/AudioParameter.cpp index 59ccfd0..abc7b3f 100644 --- a/media/libmedia/AudioParameter.cpp +++ b/media/libmedia/AudioParameter.cpp @@ -53,7 +53,7 @@ AudioParameter::AudioParameter(const String8& keyValuePairs) mParameters.replaceValueFor(key, value); } } else { - LOGV("AudioParameter() cstor empty key value pair"); + ALOGV("AudioParameter() cstor empty key value pair"); } pair = strtok(NULL, ";"); } diff --git a/media/libmedia/AudioRecord.cpp b/media/libmedia/AudioRecord.cpp index e5062ab..f32929e 100644 --- a/media/libmedia/AudioRecord.cpp +++ b/media/libmedia/AudioRecord.cpp @@ -132,7 +132,7 @@ status_t AudioRecord::set( int sessionId) { - LOGV("set(): sampleRate %d, channelMask %d, frameCount %d",sampleRate, channelMask, frameCount); + ALOGV("set(): sampleRate %d, channelMask %d, frameCount %d",sampleRate, channelMask, frameCount); AutoMutex lock(mLock); @@ -168,7 +168,7 @@ status_t AudioRecord::set( } else { mSessionId = sessionId; } - LOGV("set(): mSessionId %d", mSessionId); + ALOGV("set(): mSessionId %d", mSessionId); audio_io_handle_t input = AudioSystem::getInput(inputSource, sampleRate, @@ -187,7 +187,7 @@ status_t AudioRecord::set( if (status != NO_ERROR) { return status; } - LOGV("AudioRecord::set() minFrameCount = %d", minFrameCount); + ALOGV("AudioRecord::set() minFrameCount = %d", minFrameCount); if (frameCount == 0) { frameCount = minFrameCount; @@ -287,7 +287,7 @@ status_t AudioRecord::start() status_t ret = NO_ERROR; sp<ClientRecordThread> t = mClientRecordThread; - LOGV("start"); + ALOGV("start"); if (t != 0) { if (t->exitPending()) { @@ -346,7 +346,7 @@ status_t AudioRecord::stop() { sp<ClientRecordThread> t = mClientRecordThread; - LOGV("stop"); + ALOGV("stop"); if (t != 0) { t->mLock.lock(); @@ -739,7 +739,7 @@ bool AudioRecord::processAudioBuffer(const sp<ClientRecordThread>& thread) // Manage overrun callback if (mActive && (cblk->framesAvailable() == 0)) { - LOGV("Overrun user: %x, server: %x, flags %04x", cblk->user, cblk->server, cblk->flags); + ALOGV("Overrun user: %x, server: %x, flags %04x", cblk->user, cblk->server, cblk->flags); if (!(android_atomic_or(CBLK_UNDERRUN_ON, &cblk->flags) & CBLK_UNDERRUN_MSK)) { mCbf(EVENT_OVERRUN, mUserData, 0); } @@ -798,7 +798,7 @@ status_t AudioRecord::restoreRecord_l(audio_track_cblk_t*& cblk) result = status_t(STOPPED); } } - LOGV("restoreRecord_l() status %d mActive %d cblk %p, old cblk %p flags %08x old flags %08x", + ALOGV("restoreRecord_l() status %d mActive %d cblk %p, old cblk %p flags %08x old flags %08x", result, mActive, mCblk, cblk, mCblk->flags, cblk->flags); if (result == NO_ERROR) { diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp index 7b14c18..b9a5bc5 100644 --- a/media/libmedia/AudioSystem.cpp +++ b/media/libmedia/AudioSystem.cpp @@ -220,18 +220,18 @@ status_t AudioSystem::getOutputSamplingRate(int* samplingRate, int streamType) gLock.lock(); outputDesc = AudioSystem::gOutputs.valueFor(output); if (outputDesc == 0) { - LOGV("getOutputSamplingRate() no output descriptor for output %d in gOutputs", output); + ALOGV("getOutputSamplingRate() no output descriptor for output %d in gOutputs", output); gLock.unlock(); const sp<IAudioFlinger>& af = AudioSystem::get_audio_flinger(); if (af == 0) return PERMISSION_DENIED; *samplingRate = af->sampleRate(output); } else { - LOGV("getOutputSamplingRate() reading from output desc"); + ALOGV("getOutputSamplingRate() reading from output desc"); *samplingRate = outputDesc->samplingRate; gLock.unlock(); } - LOGV("getOutputSamplingRate() streamType %d, output %d, sampling rate %d", streamType, output, *samplingRate); + ALOGV("getOutputSamplingRate() streamType %d, output %d, sampling rate %d", streamType, output, *samplingRate); return NO_ERROR; } @@ -262,7 +262,7 @@ status_t AudioSystem::getOutputFrameCount(int* frameCount, int streamType) gLock.unlock(); } - LOGV("getOutputFrameCount() streamType %d, output %d, frameCount %d", streamType, output, *frameCount); + ALOGV("getOutputFrameCount() streamType %d, output %d, frameCount %d", streamType, output, *frameCount); return NO_ERROR; } @@ -293,7 +293,7 @@ status_t AudioSystem::getOutputLatency(uint32_t* latency, int streamType) gLock.unlock(); } - LOGV("getOutputLatency() streamType %d, output %d, latency %d", streamType, output, *latency); + ALOGV("getOutputLatency() streamType %d, output %d, latency %d", streamType, output, *latency); return NO_ERROR; } @@ -387,7 +387,7 @@ void AudioSystem::AudioFlingerClient::binderDied(const wp<IBinder>& who) { } void AudioSystem::AudioFlingerClient::ioConfigChanged(int event, int ioHandle, void *param2) { - LOGV("ioConfigChanged() event %d", event); + ALOGV("ioConfigChanged() event %d", event); OutputDescriptor *desc; uint32_t stream; @@ -399,14 +399,14 @@ void AudioSystem::AudioFlingerClient::ioConfigChanged(int event, int ioHandle, v case STREAM_CONFIG_CHANGED: if (param2 == 0) break; stream = *(uint32_t *)param2; - LOGV("ioConfigChanged() STREAM_CONFIG_CHANGED stream %d, output %d", stream, ioHandle); + ALOGV("ioConfigChanged() STREAM_CONFIG_CHANGED stream %d, output %d", stream, ioHandle); if (gStreamOutputMap.indexOfKey(stream) >= 0) { gStreamOutputMap.replaceValueFor(stream, ioHandle); } break; case OUTPUT_OPENED: { if (gOutputs.indexOfKey(ioHandle) >= 0) { - LOGV("ioConfigChanged() opening already existing output! %d", ioHandle); + ALOGV("ioConfigChanged() opening already existing output! %d", ioHandle); break; } if (param2 == 0) break; @@ -414,7 +414,7 @@ void AudioSystem::AudioFlingerClient::ioConfigChanged(int event, int ioHandle, v OutputDescriptor *outputDesc = new OutputDescriptor(*desc); gOutputs.add(ioHandle, outputDesc); - LOGV("ioConfigChanged() new output samplingRate %d, format %d channels %d frameCount %d latency %d", + ALOGV("ioConfigChanged() new output samplingRate %d, format %d channels %d frameCount %d latency %d", outputDesc->samplingRate, outputDesc->format, outputDesc->channels, outputDesc->frameCount, outputDesc->latency); } break; case OUTPUT_CLOSED: { @@ -422,7 +422,7 @@ void AudioSystem::AudioFlingerClient::ioConfigChanged(int event, int ioHandle, v LOGW("ioConfigChanged() closing unknow output! %d", ioHandle); break; } - LOGV("ioConfigChanged() output %d closed", ioHandle); + ALOGV("ioConfigChanged() output %d closed", ioHandle); gOutputs.removeItem(ioHandle); for (int i = gStreamOutputMap.size() - 1; i >= 0 ; i--) { @@ -441,7 +441,7 @@ void AudioSystem::AudioFlingerClient::ioConfigChanged(int event, int ioHandle, v if (param2 == 0) break; desc = (OutputDescriptor *)param2; - LOGV("ioConfigChanged() new config for output %d samplingRate %d, format %d channels %d frameCount %d latency %d", + ALOGV("ioConfigChanged() new config for output %d samplingRate %d, format %d channels %d frameCount %d latency %d", ioHandle, desc->samplingRate, desc->format, desc->channels, desc->frameCount, desc->latency); OutputDescriptor *outputDesc = gOutputs.valueAt(index); @@ -582,7 +582,7 @@ audio_io_handle_t AudioSystem::getOutput(audio_stream_type_t stream, (samplingRate != 8000 && samplingRate != 16000))) { Mutex::Autolock _l(gLock); output = AudioSystem::gStreamOutputMap.valueFor(stream); - LOGV_IF((output != 0), "getOutput() read %d from cache for stream %d", output, stream); + ALOGV_IF((output != 0), "getOutput() read %d from cache for stream %d", output, stream); } if (output == 0) { const sp<IAudioPolicyService>& aps = AudioSystem::get_audio_policy_service(); @@ -736,7 +736,7 @@ status_t AudioSystem::isStreamActive(int stream, bool* state, uint32_t inPastMs) void AudioSystem::clearAudioConfigCache() { Mutex::Autolock _l(gLock); - LOGV("clearAudioConfigCache()"); + ALOGV("clearAudioConfigCache()"); gStreamOutputMap.clear(); gOutputs.clear(); } diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp index 8ebb652..8ccba80 100644 --- a/media/libmedia/AudioTrack.cpp +++ b/media/libmedia/AudioTrack.cpp @@ -121,7 +121,7 @@ AudioTrack::AudioTrack( AudioTrack::~AudioTrack() { - LOGV_IF(mSharedBuffer != 0, "Destructor sharedBuffer: %p", mSharedBuffer->pointer()); + ALOGV_IF(mSharedBuffer != 0, "Destructor sharedBuffer: %p", mSharedBuffer->pointer()); if (mStatus == NO_ERROR) { // Make sure that callback function exits in the case where @@ -153,7 +153,7 @@ status_t AudioTrack::set( int sessionId) { - LOGV_IF(sharedBuffer != 0, "sharedBuffer: %p, size: %d", sharedBuffer->pointer(), sharedBuffer->size()); + ALOGV_IF(sharedBuffer != 0, "sharedBuffer: %p, size: %d", sharedBuffer->pointer(), sharedBuffer->size()); AutoMutex lock(mLock); if (mAudioTrack != 0) { @@ -319,7 +319,7 @@ void AudioTrack::start() sp<AudioTrackThread> t = mAudioTrackThread; status_t status = NO_ERROR; - LOGV("start %p", this); + ALOGV("start %p", this); if (t != 0) { if (t->exitPending()) { if (t->requestExitAndWait() == WOULD_BLOCK) { @@ -351,7 +351,7 @@ void AudioTrack::start() setpriority(PRIO_PROCESS, 0, ANDROID_PRIORITY_AUDIO); } - LOGV("start %p before lock cblk %p", this, mCblk); + ALOGV("start %p before lock cblk %p", this, mCblk); if (!(cblk->flags & CBLK_INVALID_MSK)) { cblk->lock.unlock(); status = mAudioTrack->start(); @@ -365,7 +365,7 @@ void AudioTrack::start() } cblk->lock.unlock(); if (status != NO_ERROR) { - LOGV("start() failed"); + ALOGV("start() failed"); mActive = 0; if (t != 0) { t->requestExit(); @@ -384,7 +384,7 @@ void AudioTrack::stop() { sp<AudioTrackThread> t = mAudioTrackThread; - LOGV("stop %p", this); + ALOGV("stop %p", this); if (t != 0) { t->mLock.lock(); } @@ -431,7 +431,7 @@ void AudioTrack::flush() // must be called with mLock held void AudioTrack::flush_l() { - LOGV("flush"); + ALOGV("flush"); // clear playback marker and periodic update counter mMarkerPosition = 0; @@ -449,7 +449,7 @@ void AudioTrack::flush_l() void AudioTrack::pause() { - LOGV("pause"); + ALOGV("pause"); AutoMutex lock(mLock); if (mActive == 1) { mActive = 0; @@ -496,7 +496,7 @@ void AudioTrack::getVolume(float* left, float* right) status_t AudioTrack::setAuxEffectSendLevel(float level) { - LOGV("setAuxEffectSendLevel(%f)", level); + ALOGV("setAuxEffectSendLevel(%f)", level); if (level > 1.0f) { return BAD_VALUE; } @@ -696,7 +696,7 @@ int AudioTrack::getSessionId() status_t AudioTrack::attachAuxEffect(int effectId) { - LOGV("attachAuxEffect(%d)", effectId); + ALOGV("attachAuxEffect(%d)", effectId); status_t status = mAudioTrack->attachAuxEffect(effectId); if (status == NO_ERROR) { mAuxEffectId = effectId; @@ -852,7 +852,7 @@ status_t AudioTrack::obtainBuffer(Buffer* audioBuffer, int32_t waitCount) while (framesAvail == 0) { active = mActive; if (UNLIKELY(!active)) { - LOGV("Not active and NO_MORE_BUFFERS"); + ALOGV("Not active and NO_MORE_BUFFERS"); cblk->lock.unlock(); return NO_MORE_BUFFERS; } @@ -966,7 +966,7 @@ ssize_t AudioTrack::write(const void* buffer, size_t userSize) return BAD_VALUE; } - LOGV("write %p: %d bytes, mActive=%d", this, userSize, mActive); + ALOGV("write %p: %d bytes, mActive=%d", this, userSize, mActive); // acquire a strong reference on the IMemory and IAudioTrack so that they cannot be destroyed // while we are accessing the cblk @@ -1036,7 +1036,7 @@ bool AudioTrack::processAudioBuffer(const sp<AudioTrackThread>& thread) // Manage underrun callback if (mActive && (cblk->framesAvailable() == cblk->frameCount)) { - LOGV("Underrun user: %x, server: %x, flags %04x", cblk->user, cblk->server, cblk->flags); + ALOGV("Underrun user: %x, server: %x, flags %04x", cblk->user, cblk->server, cblk->flags); if (!(android_atomic_or(CBLK_UNDERRUN_ON, &cblk->flags) & CBLK_UNDERRUN_MSK)) { mCbf(EVENT_UNDERRUN, mUserData, 0); if (cblk->server == cblk->frameCount) { @@ -1247,7 +1247,7 @@ status_t AudioTrack::restoreTrack_l(audio_track_cblk_t*& cblk, bool fromStart) cblk->lock.unlock(); } } - LOGV("restoreTrack_l() status %d mActive %d cblk %p, old cblk %p flags %08x old flags %08x", + ALOGV("restoreTrack_l() status %d mActive %d cblk %p, old cblk %p flags %08x old flags %08x", result, mActive, mCblk, cblk, mCblk->flags, cblk->flags); if (result == NO_ERROR) { diff --git a/media/libmedia/IAudioFlinger.cpp b/media/libmedia/IAudioFlinger.cpp index d58834b..bedf8d3 100644 --- a/media/libmedia/IAudioFlinger.cpp +++ b/media/libmedia/IAudioFlinger.cpp @@ -377,7 +377,7 @@ public: data.writeInt32(flags); remote()->transact(OPEN_OUTPUT, data, &reply); int output = reply.readInt32(); - LOGV("openOutput() returned output, %p", output); + ALOGV("openOutput() returned output, %p", output); devices = reply.readInt32(); if (pDevices) *pDevices = devices; samplingRate = reply.readInt32(); @@ -844,7 +844,7 @@ status_t BnAudioFlinger::onTransact( &channels, &latency, flags); - LOGV("OPEN_OUTPUT output, %p", output); + ALOGV("OPEN_OUTPUT output, %p", output); reply->writeInt32(output); reply->writeInt32(devices); reply->writeInt32(samplingRate); diff --git a/media/libmedia/IAudioFlingerClient.cpp b/media/libmedia/IAudioFlingerClient.cpp index 3900de4..5a3f250 100644 --- a/media/libmedia/IAudioFlingerClient.cpp +++ b/media/libmedia/IAudioFlingerClient.cpp @@ -47,7 +47,7 @@ public: data.writeInt32(ioHandle); if (event == AudioSystem::STREAM_CONFIG_CHANGED) { uint32_t stream = *(uint32_t *)param2; - LOGV("ioConfigChanged stream %d", stream); + ALOGV("ioConfigChanged stream %d", stream); data.writeInt32(stream); } else if (event != AudioSystem::OUTPUT_CLOSED && event != AudioSystem::INPUT_CLOSED) { AudioSystem::OutputDescriptor *desc = (AudioSystem::OutputDescriptor *)param2; @@ -79,7 +79,7 @@ status_t BnAudioFlingerClient::onTransact( if (event == AudioSystem::STREAM_CONFIG_CHANGED) { stream = data.readInt32(); param2 = &stream; - LOGV("STREAM_CONFIG_CHANGED stream %d", stream); + ALOGV("STREAM_CONFIG_CHANGED stream %d", stream); } else if (event != AudioSystem::OUTPUT_CLOSED && event != AudioSystem::INPUT_CLOSED) { desc.samplingRate = data.readInt32(); desc.format = data.readInt32(); diff --git a/media/libmedia/IEffect.cpp b/media/libmedia/IEffect.cpp index a945b97..d469e28 100644 --- a/media/libmedia/IEffect.cpp +++ b/media/libmedia/IEffect.cpp @@ -43,7 +43,7 @@ public: status_t enable() { - LOGV("enable"); + ALOGV("enable"); Parcel data, reply; data.writeInterfaceToken(IEffect::getInterfaceDescriptor()); remote()->transact(ENABLE, data, &reply); @@ -52,7 +52,7 @@ public: status_t disable() { - LOGV("disable"); + ALOGV("disable"); Parcel data, reply; data.writeInterfaceToken(IEffect::getInterfaceDescriptor()); remote()->transact(DISABLE, data, &reply); @@ -65,7 +65,7 @@ public: uint32_t *pReplySize, void *pReplyData) { - LOGV("command"); + ALOGV("command"); Parcel data, reply; data.writeInterfaceToken(IEffect::getInterfaceDescriptor()); data.writeInt32(cmdCode); @@ -95,7 +95,7 @@ public: void disconnect() { - LOGV("disconnect"); + ALOGV("disconnect"); Parcel data, reply; data.writeInterfaceToken(IEffect::getInterfaceDescriptor()); remote()->transact(DISCONNECT, data, &reply); @@ -124,21 +124,21 @@ status_t BnEffect::onTransact( { switch(code) { case ENABLE: { - LOGV("ENABLE"); + ALOGV("ENABLE"); CHECK_INTERFACE(IEffect, data, reply); reply->writeInt32(enable()); return NO_ERROR; } break; case DISABLE: { - LOGV("DISABLE"); + ALOGV("DISABLE"); CHECK_INTERFACE(IEffect, data, reply); reply->writeInt32(disable()); return NO_ERROR; } break; case COMMAND: { - LOGV("COMMAND"); + ALOGV("COMMAND"); CHECK_INTERFACE(IEffect, data, reply); uint32_t cmdCode = data.readInt32(); uint32_t cmdSize = data.readInt32(); @@ -172,7 +172,7 @@ status_t BnEffect::onTransact( } break; case DISCONNECT: { - LOGV("DISCONNECT"); + ALOGV("DISCONNECT"); CHECK_INTERFACE(IEffect, data, reply); disconnect(); return NO_ERROR; diff --git a/media/libmedia/IEffectClient.cpp b/media/libmedia/IEffectClient.cpp index 1fa9cbe..4693b45 100644 --- a/media/libmedia/IEffectClient.cpp +++ b/media/libmedia/IEffectClient.cpp @@ -40,7 +40,7 @@ public: void controlStatusChanged(bool controlGranted) { - LOGV("controlStatusChanged"); + ALOGV("controlStatusChanged"); Parcel data, reply; data.writeInterfaceToken(IEffectClient::getInterfaceDescriptor()); data.writeInt32((uint32_t)controlGranted); @@ -49,7 +49,7 @@ public: void enableStatusChanged(bool enabled) { - LOGV("enableStatusChanged"); + ALOGV("enableStatusChanged"); Parcel data, reply; data.writeInterfaceToken(IEffectClient::getInterfaceDescriptor()); data.writeInt32((uint32_t)enabled); @@ -62,7 +62,7 @@ public: uint32_t replySize, void *pReplyData) { - LOGV("commandExecuted"); + ALOGV("commandExecuted"); Parcel data, reply; data.writeInterfaceToken(IEffectClient::getInterfaceDescriptor()); data.writeInt32(cmdCode); @@ -96,21 +96,21 @@ status_t BnEffectClient::onTransact( { switch(code) { case CONTROL_STATUS_CHANGED: { - LOGV("CONTROL_STATUS_CHANGED"); + ALOGV("CONTROL_STATUS_CHANGED"); CHECK_INTERFACE(IEffectClient, data, reply); bool hasControl = (bool)data.readInt32(); controlStatusChanged(hasControl); return NO_ERROR; } break; case ENABLE_STATUS_CHANGED: { - LOGV("ENABLE_STATUS_CHANGED"); + ALOGV("ENABLE_STATUS_CHANGED"); CHECK_INTERFACE(IEffectClient, data, reply); bool enabled = (bool)data.readInt32(); enableStatusChanged(enabled); return NO_ERROR; } break; case COMMAND_EXECUTED: { - LOGV("COMMAND_EXECUTED"); + ALOGV("COMMAND_EXECUTED"); CHECK_INTERFACE(IEffectClient, data, reply); uint32_t cmdCode = data.readInt32(); uint32_t cmdSize = data.readInt32(); diff --git a/media/libmedia/IMediaDeathNotifier.cpp b/media/libmedia/IMediaDeathNotifier.cpp index 39ac076..da33edb 100644 --- a/media/libmedia/IMediaDeathNotifier.cpp +++ b/media/libmedia/IMediaDeathNotifier.cpp @@ -34,7 +34,7 @@ SortedVector< wp<IMediaDeathNotifier> > IMediaDeathNotifier::sObitRecipients; /*static*/const sp<IMediaPlayerService>& IMediaDeathNotifier::getMediaPlayerService() { - LOGV("getMediaPlayerService"); + ALOGV("getMediaPlayerService"); Mutex::Autolock _l(sServiceLock); if (sMediaPlayerService.get() == 0) { sp<IServiceManager> sm = defaultServiceManager(); @@ -61,7 +61,7 @@ IMediaDeathNotifier::getMediaPlayerService() /*static*/ void IMediaDeathNotifier::addObitRecipient(const wp<IMediaDeathNotifier>& recipient) { - LOGV("addObitRecipient"); + ALOGV("addObitRecipient"); Mutex::Autolock _l(sServiceLock); sObitRecipients.add(recipient); } @@ -69,7 +69,7 @@ IMediaDeathNotifier::addObitRecipient(const wp<IMediaDeathNotifier>& recipient) /*static*/ void IMediaDeathNotifier::removeObitRecipient(const wp<IMediaDeathNotifier>& recipient) { - LOGV("removeObitRecipient"); + ALOGV("removeObitRecipient"); Mutex::Autolock _l(sServiceLock); sObitRecipients.remove(recipient); } @@ -100,7 +100,7 @@ IMediaDeathNotifier::DeathNotifier::binderDied(const wp<IBinder>& who) { IMediaDeathNotifier::DeathNotifier::~DeathNotifier() { - LOGV("DeathNotifier::~DeathNotifier"); + ALOGV("DeathNotifier::~DeathNotifier"); Mutex::Autolock _l(sServiceLock); sObitRecipients.clear(); if (sMediaPlayerService != 0) { diff --git a/media/libmedia/IMediaMetadataRetriever.cpp b/media/libmedia/IMediaMetadataRetriever.cpp index 07152d8..9b8d7c3 100644 --- a/media/libmedia/IMediaMetadataRetriever.cpp +++ b/media/libmedia/IMediaMetadataRetriever.cpp @@ -118,7 +118,7 @@ public: sp<IMemory> getFrameAtTime(int64_t timeUs, int option) { - LOGV("getTimeAtTime: time(%lld us) and option(%d)", timeUs, option); + ALOGV("getTimeAtTime: time(%lld us) and option(%d)", timeUs, option); Parcel data, reply; data.writeInterfaceToken(IMediaMetadataRetriever::getInterfaceDescriptor()); data.writeInt64(timeUs); @@ -208,7 +208,7 @@ status_t BnMediaMetadataRetriever::onTransact( CHECK_INTERFACE(IMediaMetadataRetriever, data, reply); int64_t timeUs = data.readInt64(); int option = data.readInt32(); - LOGV("getTimeAtTime: time(%lld us) and option(%d)", timeUs, option); + ALOGV("getTimeAtTime: time(%lld us) and option(%d)", timeUs, option); #ifndef DISABLE_GROUP_SCHEDULE_HACK setSchedPolicy(data); #endif diff --git a/media/libmedia/IMediaRecorder.cpp b/media/libmedia/IMediaRecorder.cpp index 38e111e..42f55c2 100644 --- a/media/libmedia/IMediaRecorder.cpp +++ b/media/libmedia/IMediaRecorder.cpp @@ -64,7 +64,7 @@ public: status_t setCamera(const sp<ICamera>& camera, const sp<ICameraRecordingProxy>& proxy) { - LOGV("setCamera(%p,%p)", camera.get(), proxy.get()); + ALOGV("setCamera(%p,%p)", camera.get(), proxy.get()); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); data.writeStrongBinder(camera->asBinder()); @@ -75,7 +75,7 @@ public: sp<ISurfaceTexture> querySurfaceMediaSource() { - LOGV("Query SurfaceMediaSource"); + ALOGV("Query SurfaceMediaSource"); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); remote()->transact(QUERY_SURFACE_MEDIASOURCE, data, &reply); @@ -88,7 +88,7 @@ public: status_t setPreviewSurface(const sp<Surface>& surface) { - LOGV("setPreviewSurface(%p)", surface.get()); + ALOGV("setPreviewSurface(%p)", surface.get()); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); Surface::writeToParcel(surface, &data); @@ -98,7 +98,7 @@ public: status_t init() { - LOGV("init"); + ALOGV("init"); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); remote()->transact(INIT, data, &reply); @@ -107,7 +107,7 @@ public: status_t setVideoSource(int vs) { - LOGV("setVideoSource(%d)", vs); + ALOGV("setVideoSource(%d)", vs); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); data.writeInt32(vs); @@ -117,7 +117,7 @@ public: status_t setAudioSource(int as) { - LOGV("setAudioSource(%d)", as); + ALOGV("setAudioSource(%d)", as); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); data.writeInt32(as); @@ -127,7 +127,7 @@ public: status_t setOutputFormat(int of) { - LOGV("setOutputFormat(%d)", of); + ALOGV("setOutputFormat(%d)", of); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); data.writeInt32(of); @@ -137,7 +137,7 @@ public: status_t setVideoEncoder(int ve) { - LOGV("setVideoEncoder(%d)", ve); + ALOGV("setVideoEncoder(%d)", ve); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); data.writeInt32(ve); @@ -147,7 +147,7 @@ public: status_t setAudioEncoder(int ae) { - LOGV("setAudioEncoder(%d)", ae); + ALOGV("setAudioEncoder(%d)", ae); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); data.writeInt32(ae); @@ -157,7 +157,7 @@ public: status_t setOutputFile(const char* path) { - LOGV("setOutputFile(%s)", path); + ALOGV("setOutputFile(%s)", path); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); data.writeCString(path); @@ -166,7 +166,7 @@ public: } status_t setOutputFile(int fd, int64_t offset, int64_t length) { - LOGV("setOutputFile(%d, %lld, %lld)", fd, offset, length); + ALOGV("setOutputFile(%d, %lld, %lld)", fd, offset, length); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); data.writeFileDescriptor(fd); @@ -178,7 +178,7 @@ public: status_t setVideoSize(int width, int height) { - LOGV("setVideoSize(%dx%d)", width, height); + ALOGV("setVideoSize(%dx%d)", width, height); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); data.writeInt32(width); @@ -189,7 +189,7 @@ public: status_t setVideoFrameRate(int frames_per_second) { - LOGV("setVideoFrameRate(%d)", frames_per_second); + ALOGV("setVideoFrameRate(%d)", frames_per_second); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); data.writeInt32(frames_per_second); @@ -199,7 +199,7 @@ public: status_t setParameters(const String8& params) { - LOGV("setParameter(%s)", params.string()); + ALOGV("setParameter(%s)", params.string()); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); data.writeString8(params); @@ -209,7 +209,7 @@ public: status_t setListener(const sp<IMediaRecorderClient>& listener) { - LOGV("setListener(%p)", listener.get()); + ALOGV("setListener(%p)", listener.get()); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); data.writeStrongBinder(listener->asBinder()); @@ -219,7 +219,7 @@ public: status_t prepare() { - LOGV("prepare"); + ALOGV("prepare"); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); remote()->transact(PREPARE, data, &reply); @@ -228,7 +228,7 @@ public: status_t getMaxAmplitude(int* max) { - LOGV("getMaxAmplitude"); + ALOGV("getMaxAmplitude"); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); remote()->transact(GET_MAX_AMPLITUDE, data, &reply); @@ -238,7 +238,7 @@ public: status_t start() { - LOGV("start"); + ALOGV("start"); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); remote()->transact(START, data, &reply); @@ -247,7 +247,7 @@ public: status_t stop() { - LOGV("stop"); + ALOGV("stop"); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); remote()->transact(STOP, data, &reply); @@ -256,7 +256,7 @@ public: status_t reset() { - LOGV("reset"); + ALOGV("reset"); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); remote()->transact(RESET, data, &reply); @@ -265,7 +265,7 @@ public: status_t close() { - LOGV("close"); + ALOGV("close"); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); remote()->transact(CLOSE, data, &reply); @@ -274,7 +274,7 @@ public: status_t release() { - LOGV("release"); + ALOGV("release"); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); remote()->transact(RELEASE, data, &reply); @@ -291,49 +291,49 @@ status_t BnMediaRecorder::onTransact( { switch(code) { case RELEASE: { - LOGV("RELEASE"); + ALOGV("RELEASE"); CHECK_INTERFACE(IMediaRecorder, data, reply); reply->writeInt32(release()); return NO_ERROR; } break; case INIT: { - LOGV("INIT"); + ALOGV("INIT"); CHECK_INTERFACE(IMediaRecorder, data, reply); reply->writeInt32(init()); return NO_ERROR; } break; case CLOSE: { - LOGV("CLOSE"); + ALOGV("CLOSE"); CHECK_INTERFACE(IMediaRecorder, data, reply); reply->writeInt32(close()); return NO_ERROR; } break; case RESET: { - LOGV("RESET"); + ALOGV("RESET"); CHECK_INTERFACE(IMediaRecorder, data, reply); reply->writeInt32(reset()); return NO_ERROR; } break; case STOP: { - LOGV("STOP"); + ALOGV("STOP"); CHECK_INTERFACE(IMediaRecorder, data, reply); reply->writeInt32(stop()); return NO_ERROR; } break; case START: { - LOGV("START"); + ALOGV("START"); CHECK_INTERFACE(IMediaRecorder, data, reply); reply->writeInt32(start()); return NO_ERROR; } break; case PREPARE: { - LOGV("PREPARE"); + ALOGV("PREPARE"); CHECK_INTERFACE(IMediaRecorder, data, reply); reply->writeInt32(prepare()); return NO_ERROR; } break; case GET_MAX_AMPLITUDE: { - LOGV("GET_MAX_AMPLITUDE"); + ALOGV("GET_MAX_AMPLITUDE"); CHECK_INTERFACE(IMediaRecorder, data, reply); int max = 0; status_t ret = getMaxAmplitude(&max); @@ -342,35 +342,35 @@ status_t BnMediaRecorder::onTransact( return NO_ERROR; } break; case SET_VIDEO_SOURCE: { - LOGV("SET_VIDEO_SOURCE"); + ALOGV("SET_VIDEO_SOURCE"); CHECK_INTERFACE(IMediaRecorder, data, reply); int vs = data.readInt32(); reply->writeInt32(setVideoSource(vs)); return NO_ERROR; } break; case SET_AUDIO_SOURCE: { - LOGV("SET_AUDIO_SOURCE"); + ALOGV("SET_AUDIO_SOURCE"); CHECK_INTERFACE(IMediaRecorder, data, reply); int as = data.readInt32(); reply->writeInt32(setAudioSource(as)); return NO_ERROR; } break; case SET_OUTPUT_FORMAT: { - LOGV("SET_OUTPUT_FORMAT"); + ALOGV("SET_OUTPUT_FORMAT"); CHECK_INTERFACE(IMediaRecorder, data, reply); int of = data.readInt32(); reply->writeInt32(setOutputFormat(of)); return NO_ERROR; } break; case SET_VIDEO_ENCODER: { - LOGV("SET_VIDEO_ENCODER"); + ALOGV("SET_VIDEO_ENCODER"); CHECK_INTERFACE(IMediaRecorder, data, reply); int ve = data.readInt32(); reply->writeInt32(setVideoEncoder(ve)); return NO_ERROR; } break; case SET_AUDIO_ENCODER: { - LOGV("SET_AUDIO_ENCODER"); + ALOGV("SET_AUDIO_ENCODER"); CHECK_INTERFACE(IMediaRecorder, data, reply); int ae = data.readInt32(); reply->writeInt32(setAudioEncoder(ae)); @@ -378,14 +378,14 @@ status_t BnMediaRecorder::onTransact( } break; case SET_OUTPUT_FILE_PATH: { - LOGV("SET_OUTPUT_FILE_PATH"); + ALOGV("SET_OUTPUT_FILE_PATH"); CHECK_INTERFACE(IMediaRecorder, data, reply); const char* path = data.readCString(); reply->writeInt32(setOutputFile(path)); return NO_ERROR; } break; case SET_OUTPUT_FILE_FD: { - LOGV("SET_OUTPUT_FILE_FD"); + ALOGV("SET_OUTPUT_FILE_FD"); CHECK_INTERFACE(IMediaRecorder, data, reply); int fd = dup(data.readFileDescriptor()); int64_t offset = data.readInt64(); @@ -395,7 +395,7 @@ status_t BnMediaRecorder::onTransact( return NO_ERROR; } break; case SET_VIDEO_SIZE: { - LOGV("SET_VIDEO_SIZE"); + ALOGV("SET_VIDEO_SIZE"); CHECK_INTERFACE(IMediaRecorder, data, reply); int width = data.readInt32(); int height = data.readInt32(); @@ -403,20 +403,20 @@ status_t BnMediaRecorder::onTransact( return NO_ERROR; } break; case SET_VIDEO_FRAMERATE: { - LOGV("SET_VIDEO_FRAMERATE"); + ALOGV("SET_VIDEO_FRAMERATE"); CHECK_INTERFACE(IMediaRecorder, data, reply); int frames_per_second = data.readInt32(); reply->writeInt32(setVideoFrameRate(frames_per_second)); return NO_ERROR; } break; case SET_PARAMETERS: { - LOGV("SET_PARAMETER"); + ALOGV("SET_PARAMETER"); CHECK_INTERFACE(IMediaRecorder, data, reply); reply->writeInt32(setParameters(data.readString8())); return NO_ERROR; } break; case SET_LISTENER: { - LOGV("SET_LISTENER"); + ALOGV("SET_LISTENER"); CHECK_INTERFACE(IMediaRecorder, data, reply); sp<IMediaRecorderClient> listener = interface_cast<IMediaRecorderClient>(data.readStrongBinder()); @@ -424,14 +424,14 @@ status_t BnMediaRecorder::onTransact( return NO_ERROR; } break; case SET_PREVIEW_SURFACE: { - LOGV("SET_PREVIEW_SURFACE"); + ALOGV("SET_PREVIEW_SURFACE"); CHECK_INTERFACE(IMediaRecorder, data, reply); sp<Surface> surface = Surface::readFromParcel(data); reply->writeInt32(setPreviewSurface(surface)); return NO_ERROR; } break; case SET_CAMERA: { - LOGV("SET_CAMERA"); + ALOGV("SET_CAMERA"); CHECK_INTERFACE(IMediaRecorder, data, reply); sp<ICamera> camera = interface_cast<ICamera>(data.readStrongBinder()); sp<ICameraRecordingProxy> proxy = @@ -440,7 +440,7 @@ status_t BnMediaRecorder::onTransact( return NO_ERROR; } break; case QUERY_SURFACE_MEDIASOURCE: { - LOGV("QUERY_SURFACE_MEDIASOURCE"); + ALOGV("QUERY_SURFACE_MEDIASOURCE"); CHECK_INTERFACE(IMediaRecorder, data, reply); // call the mediaserver side to create // a surfacemediasource diff --git a/media/libmedia/JetPlayer.cpp b/media/libmedia/JetPlayer.cpp index 8b953e0..3d94b49 100644 --- a/media/libmedia/JetPlayer.cpp +++ b/media/libmedia/JetPlayer.cpp @@ -42,7 +42,7 @@ JetPlayer::JetPlayer(jobject javaJetPlayer, int maxTracks, int trackBufferSize) mAudioTrack(NULL), mTrackBufferSize(trackBufferSize) { - LOGV("JetPlayer constructor"); + ALOGV("JetPlayer constructor"); mPreviousJetStatus.currentUserID = -1; mPreviousJetStatus.segmentRepeatCount = -1; mPreviousJetStatus.numQueuedSegments = -1; @@ -52,7 +52,7 @@ JetPlayer::JetPlayer(jobject javaJetPlayer, int maxTracks, int trackBufferSize) //------------------------------------------------------------------------------------------------- JetPlayer::~JetPlayer() { - LOGV("~JetPlayer"); + ALOGV("~JetPlayer"); release(); } @@ -99,13 +99,13 @@ int JetPlayer::init() // create render and playback thread { Mutex::Autolock l(mMutex); - LOGV("JetPlayer::init(): trying to start render thread"); + ALOGV("JetPlayer::init(): trying to start render thread"); createThreadEtc(renderThread, this, "jetRenderThread", ANDROID_PRIORITY_AUDIO); mCondition.wait(mMutex); } if (mTid > 0) { // render thread started, we're ready - LOGV("JetPlayer::init(): render thread(%d) successfully started.", mTid); + ALOGV("JetPlayer::init(): render thread(%d) successfully started.", mTid); mState = EAS_STATE_READY; } else { LOGE("JetPlayer::init(): failed to start render thread."); @@ -125,7 +125,7 @@ void JetPlayer::setEventCallback(jetevent_callback eventCallback) //------------------------------------------------------------------------------------------------- int JetPlayer::release() { - LOGV("JetPlayer::release()"); + ALOGV("JetPlayer::release()"); Mutex::Autolock lock(mMutex); mPaused = true; mRender = false; @@ -168,7 +168,7 @@ int JetPlayer::render() { int temp; bool audioStarted = false; - LOGV("JetPlayer::render(): entering"); + ALOGV("JetPlayer::render(): entering"); // allocate render buffer mAudioBuffer = @@ -182,7 +182,7 @@ int JetPlayer::render() { { Mutex::Autolock l(mMutex); mTid = gettid(); - LOGV("JetPlayer::render(): render thread(%d) signal", mTid); + ALOGV("JetPlayer::render(): render thread(%d) signal", mTid); mCondition.signal(); } @@ -192,21 +192,21 @@ int JetPlayer::render() { if (mEasData == NULL) { mMutex.unlock(); - LOGV("JetPlayer::render(): NULL EAS data, exiting render."); + ALOGV("JetPlayer::render(): NULL EAS data, exiting render."); goto threadExit; } // nothing to render, wait for client thread to wake us up while (!mRender) { - LOGV("JetPlayer::render(): signal wait"); + ALOGV("JetPlayer::render(): signal wait"); if (audioStarted) { mAudioTrack->pause(); // we have to restart the playback once we start rendering again audioStarted = false; } mCondition.wait(mMutex); - LOGV("JetPlayer::render(): signal rx'd"); + ALOGV("JetPlayer::render(): signal rx'd"); } // render midi data into the input buffer @@ -225,7 +225,7 @@ int JetPlayer::render() { } // update playback state - //LOGV("JetPlayer::render(): updating state"); + //ALOGV("JetPlayer::render(): updating state"); JET_Status(mEasData, &mJetStatus); fireUpdateOnStatusChange(); mPaused = mJetStatus.paused; @@ -239,7 +239,7 @@ int JetPlayer::render() { } // Write data to the audio hardware - //LOGV("JetPlayer::render(): writing to audio output"); + //ALOGV("JetPlayer::render(): writing to audio output"); if ((temp = mAudioTrack->write(mAudioBuffer, num_output)) < 0) { LOGE("JetPlayer::render(): Error in writing:%d",temp); return temp; @@ -247,7 +247,7 @@ int JetPlayer::render() { // start audio output if necessary if (!audioStarted) { - LOGV("JetPlayer::render(): starting audio playback"); + ALOGV("JetPlayer::render(): starting audio playback"); mAudioTrack->start(); audioStarted = true; } @@ -338,7 +338,7 @@ void JetPlayer::fireEventsFromJetQueue() //------------------------------------------------------------------------------------------------- int JetPlayer::loadFromFile(const char* path) { - LOGV("JetPlayer::loadFromFile(): path=%s", path); + ALOGV("JetPlayer::loadFromFile(): path=%s", path); Mutex::Autolock lock(mMutex); @@ -363,7 +363,7 @@ int JetPlayer::loadFromFile(const char* path) //------------------------------------------------------------------------------------------------- int JetPlayer::loadFromFD(const int fd, const long long offset, const long long length) { - LOGV("JetPlayer::loadFromFD(): fd=%d offset=%lld length=%lld", fd, offset, length); + ALOGV("JetPlayer::loadFromFD(): fd=%d offset=%lld length=%lld", fd, offset, length); Mutex::Autolock lock(mMutex); @@ -393,7 +393,7 @@ int JetPlayer::closeFile() //------------------------------------------------------------------------------------------------- int JetPlayer::play() { - LOGV("JetPlayer::play(): entering"); + ALOGV("JetPlayer::play(): entering"); Mutex::Autolock lock(mMutex); EAS_RESULT result = JET_Play(mEasData); @@ -407,7 +407,7 @@ int JetPlayer::play() fireUpdateOnStatusChange(); // wake up render thread - LOGV("JetPlayer::play(): wakeup render thread"); + ALOGV("JetPlayer::play(): wakeup render thread"); mCondition.signal(); return result; @@ -435,7 +435,7 @@ int JetPlayer::pause() int JetPlayer::queueSegment(int segmentNum, int libNum, int repeatCount, int transpose, EAS_U32 muteFlags, EAS_U8 userID) { - LOGV("JetPlayer::queueSegment segmentNum=%d, libNum=%d, repeatCount=%d, transpose=%d", + ALOGV("JetPlayer::queueSegment segmentNum=%d, libNum=%d, repeatCount=%d, transpose=%d", segmentNum, libNum, repeatCount, transpose); Mutex::Autolock lock(mMutex); return JET_QueueSegment(mEasData, segmentNum, libNum, repeatCount, transpose, muteFlags, userID); @@ -458,7 +458,7 @@ int JetPlayer::setMuteFlag(int trackNum, bool muteFlag, bool sync) //------------------------------------------------------------------------------------------------- int JetPlayer::triggerClip(int clipId) { - LOGV("JetPlayer::triggerClip clipId=%d", clipId); + ALOGV("JetPlayer::triggerClip clipId=%d", clipId); Mutex::Autolock lock(mMutex); return JET_TriggerClip(mEasData, clipId); } @@ -466,7 +466,7 @@ int JetPlayer::triggerClip(int clipId) //------------------------------------------------------------------------------------------------- int JetPlayer::clearQueue() { - LOGV("JetPlayer::clearQueue"); + ALOGV("JetPlayer::clearQueue"); Mutex::Autolock lock(mMutex); return JET_Clear_Queue(mEasData); } @@ -480,7 +480,7 @@ void JetPlayer::dump() void JetPlayer::dumpJetStatus(S_JET_STATUS* pJetStatus) { if(pJetStatus!=NULL) - LOGV(">> current JET player status: userID=%d segmentRepeatCount=%d numQueuedSegments=%d paused=%d", + ALOGV(">> current JET player status: userID=%d segmentRepeatCount=%d numQueuedSegments=%d paused=%d", pJetStatus->currentUserID, pJetStatus->segmentRepeatCount, pJetStatus->numQueuedSegments, pJetStatus->paused); else diff --git a/media/libmedia/MediaProfiles.cpp b/media/libmedia/MediaProfiles.cpp index 6096b72..109f294 100644 --- a/media/libmedia/MediaProfiles.cpp +++ b/media/libmedia/MediaProfiles.cpp @@ -82,67 +82,67 @@ const MediaProfiles::NameToTagMap MediaProfiles::sCamcorderQualityNameMap[] = { /*static*/ void MediaProfiles::logVideoCodec(const MediaProfiles::VideoCodec& codec) { - LOGV("video codec:"); - LOGV("codec = %d", codec.mCodec); - LOGV("bit rate: %d", codec.mBitRate); - LOGV("frame width: %d", codec.mFrameWidth); - LOGV("frame height: %d", codec.mFrameHeight); - LOGV("frame rate: %d", codec.mFrameRate); + ALOGV("video codec:"); + ALOGV("codec = %d", codec.mCodec); + ALOGV("bit rate: %d", codec.mBitRate); + ALOGV("frame width: %d", codec.mFrameWidth); + ALOGV("frame height: %d", codec.mFrameHeight); + ALOGV("frame rate: %d", codec.mFrameRate); } /*static*/ void MediaProfiles::logAudioCodec(const MediaProfiles::AudioCodec& codec) { - LOGV("audio codec:"); - LOGV("codec = %d", codec.mCodec); - LOGV("bit rate: %d", codec.mBitRate); - LOGV("sample rate: %d", codec.mSampleRate); - LOGV("number of channels: %d", codec.mChannels); + ALOGV("audio codec:"); + ALOGV("codec = %d", codec.mCodec); + ALOGV("bit rate: %d", codec.mBitRate); + ALOGV("sample rate: %d", codec.mSampleRate); + ALOGV("number of channels: %d", codec.mChannels); } /*static*/ void MediaProfiles::logVideoEncoderCap(const MediaProfiles::VideoEncoderCap& cap) { - LOGV("video encoder cap:"); - LOGV("codec = %d", cap.mCodec); - LOGV("bit rate: min = %d and max = %d", cap.mMinBitRate, cap.mMaxBitRate); - LOGV("frame width: min = %d and max = %d", cap.mMinFrameWidth, cap.mMaxFrameWidth); - LOGV("frame height: min = %d and max = %d", cap.mMinFrameHeight, cap.mMaxFrameHeight); - LOGV("frame rate: min = %d and max = %d", cap.mMinFrameRate, cap.mMaxFrameRate); + ALOGV("video encoder cap:"); + ALOGV("codec = %d", cap.mCodec); + ALOGV("bit rate: min = %d and max = %d", cap.mMinBitRate, cap.mMaxBitRate); + ALOGV("frame width: min = %d and max = %d", cap.mMinFrameWidth, cap.mMaxFrameWidth); + ALOGV("frame height: min = %d and max = %d", cap.mMinFrameHeight, cap.mMaxFrameHeight); + ALOGV("frame rate: min = %d and max = %d", cap.mMinFrameRate, cap.mMaxFrameRate); } /*static*/ void MediaProfiles::logAudioEncoderCap(const MediaProfiles::AudioEncoderCap& cap) { - LOGV("audio encoder cap:"); - LOGV("codec = %d", cap.mCodec); - LOGV("bit rate: min = %d and max = %d", cap.mMinBitRate, cap.mMaxBitRate); - LOGV("sample rate: min = %d and max = %d", cap.mMinSampleRate, cap.mMaxSampleRate); - LOGV("number of channels: min = %d and max = %d", cap.mMinChannels, cap.mMaxChannels); + ALOGV("audio encoder cap:"); + ALOGV("codec = %d", cap.mCodec); + ALOGV("bit rate: min = %d and max = %d", cap.mMinBitRate, cap.mMaxBitRate); + ALOGV("sample rate: min = %d and max = %d", cap.mMinSampleRate, cap.mMaxSampleRate); + ALOGV("number of channels: min = %d and max = %d", cap.mMinChannels, cap.mMaxChannels); } /*static*/ void MediaProfiles::logVideoDecoderCap(const MediaProfiles::VideoDecoderCap& cap) { - LOGV("video decoder cap:"); - LOGV("codec = %d", cap.mCodec); + ALOGV("video decoder cap:"); + ALOGV("codec = %d", cap.mCodec); } /*static*/ void MediaProfiles::logAudioDecoderCap(const MediaProfiles::AudioDecoderCap& cap) { - LOGV("audio codec cap:"); - LOGV("codec = %d", cap.mCodec); + ALOGV("audio codec cap:"); + ALOGV("codec = %d", cap.mCodec); } /*static*/ void MediaProfiles::logVideoEditorCap(const MediaProfiles::VideoEditorCap& cap) { - LOGV("videoeditor cap:"); - LOGV("mMaxInputFrameWidth = %d", cap.mMaxInputFrameWidth); - LOGV("mMaxInputFrameHeight = %d", cap.mMaxInputFrameHeight); - LOGV("mMaxOutputFrameWidth = %d", cap.mMaxOutputFrameWidth); - LOGV("mMaxOutputFrameHeight = %d", cap.mMaxOutputFrameHeight); + ALOGV("videoeditor cap:"); + ALOGV("mMaxInputFrameWidth = %d", cap.mMaxInputFrameWidth); + ALOGV("mMaxInputFrameHeight = %d", cap.mMaxInputFrameHeight); + ALOGV("mMaxOutputFrameWidth = %d", cap.mMaxOutputFrameWidth); + ALOGV("mMaxOutputFrameHeight = %d", cap.mMaxOutputFrameHeight); } /*static*/ int @@ -349,7 +349,7 @@ void MediaProfiles::addImageEncodingQualityLevel(int cameraId, const char** atts { CHECK(!strcmp("quality", atts[0])); int quality = atoi(atts[1]); - LOGV("%s: cameraId=%d, quality=%d\n", __func__, cameraId, quality); + ALOGV("%s: cameraId=%d, quality=%d\n", __func__, cameraId, quality); ImageEncodingQualityLevels *levels = findImageEncodingQualityLevels(cameraId); if (levels == NULL) { @@ -377,7 +377,7 @@ void MediaProfiles::addStartTimeOffset(int cameraId, const char** atts) offsetTimeMs = atoi(atts[3]); } - LOGV("%s: cameraId=%d, offset=%d ms", __func__, cameraId, offsetTimeMs); + ALOGV("%s: cameraId=%d, offset=%d ms", __func__, cameraId, offsetTimeMs); mStartTimeOffsets.replaceValueFor(cameraId, offsetTimeMs); } /*static*/ MediaProfiles::ExportVideoProfile* @@ -465,7 +465,7 @@ static bool isTimelapseProfile(camcorder_quality quality) { } void MediaProfiles::initRequiredProfileRefs(const Vector<int>& cameraIds) { - LOGV("Number of camera ids: %d", cameraIds.size()); + ALOGV("Number of camera ids: %d", cameraIds.size()); CHECK(cameraIds.size() > 0); mRequiredProfileRefs = new RequiredProfiles[cameraIds.size()]; for (size_t i = 0, n = cameraIds.size(); i < n; ++i) { @@ -592,14 +592,14 @@ void MediaProfiles::checkAndAddRequiredProfilesIfNecessary() { int index = getCamcorderProfileIndex(cameraId, profile->mQuality); if (index != -1) { - LOGV("Profile quality %d for camera %d already exists", + ALOGV("Profile quality %d for camera %d already exists", profile->mQuality, cameraId); CHECK(index == refIndex); continue; } // Insert the new profile - LOGV("Add a profile: quality %d=>%d for camera %d", + ALOGV("Add a profile: quality %d=>%d for camera %d", mCamcorderProfiles[info->mRefProfileIndex]->mQuality, profile->mQuality, cameraId); @@ -612,7 +612,7 @@ void MediaProfiles::checkAndAddRequiredProfilesIfNecessary() { /*static*/ MediaProfiles* MediaProfiles::getInstance() { - LOGV("getInstance"); + ALOGV("getInstance"); Mutex::Autolock lock(sLock); if (!sIsInitialized) { char value[PROPERTY_VALUE_MAX]; @@ -954,7 +954,7 @@ Vector<video_encoder> MediaProfiles::getVideoEncoders() const int MediaProfiles::getVideoEncoderParamByName(const char *name, video_encoder codec) const { - LOGV("getVideoEncoderParamByName: %s for codec %d", name, codec); + ALOGV("getVideoEncoderParamByName: %s for codec %d", name, codec); int index = -1; for (size_t i = 0, n = mVideoEncoders.size(); i < n; ++i) { if (mVideoEncoders[i]->mCodec == codec) { @@ -982,7 +982,7 @@ int MediaProfiles::getVideoEncoderParamByName(const char *name, video_encoder co int MediaProfiles::getVideoEditorExportParamByName( const char *name, int codec) const { - LOGV("getVideoEditorExportParamByName: name %s codec %d", name, codec); + ALOGV("getVideoEditorExportParamByName: name %s codec %d", name, codec); ExportVideoProfile *exportProfile = NULL; int index = -1; for (size_t i =0; i < mVideoEditorExportProfiles.size(); i++) { @@ -1006,7 +1006,7 @@ int MediaProfiles::getVideoEditorExportParamByName( } int MediaProfiles::getVideoEditorCapParamByName(const char *name) const { - LOGV("getVideoEditorCapParamByName: %s", name); + ALOGV("getVideoEditorCapParamByName: %s", name); if (mVideoEditorCap == NULL) { LOGE("The mVideoEditorCap is not created, then create default cap."); @@ -1039,7 +1039,7 @@ Vector<audio_encoder> MediaProfiles::getAudioEncoders() const int MediaProfiles::getAudioEncoderParamByName(const char *name, audio_encoder codec) const { - LOGV("getAudioEncoderParamByName: %s for codec %d", name, codec); + ALOGV("getAudioEncoderParamByName: %s for codec %d", name, codec); int index = -1; for (size_t i = 0, n = mAudioEncoders.size(); i < n; ++i) { if (mAudioEncoders[i]->mCodec == codec) { @@ -1098,7 +1098,7 @@ int MediaProfiles::getCamcorderProfileParamByName(const char *name, int cameraId, camcorder_quality quality) const { - LOGV("getCamcorderProfileParamByName: %s for camera %d, quality %d", + ALOGV("getCamcorderProfileParamByName: %s for camera %d, quality %d", name, cameraId, quality); int index = getCamcorderProfileIndex(cameraId, quality); @@ -1145,7 +1145,7 @@ int MediaProfiles::getStartTimeOffsetMs(int cameraId) const { if (index >= 0) { offsetTimeMs = mStartTimeOffsets.valueFor(cameraId); } - LOGV("offsetTime=%d ms and cameraId=%d", offsetTimeMs, cameraId); + ALOGV("offsetTime=%d ms and cameraId=%d", offsetTimeMs, cameraId); return offsetTimeMs; } diff --git a/media/libmedia/MediaScanner.cpp b/media/libmedia/MediaScanner.cpp index 19dedfc..b304f8c 100644 --- a/media/libmedia/MediaScanner.cpp +++ b/media/libmedia/MediaScanner.cpp @@ -143,7 +143,7 @@ MediaScanResult MediaScanner::doProcessDirectory( if (pathRemaining >= 8 /* strlen(".nomedia") */ ) { strcpy(fileSpot, ".nomedia"); if (access(path, F_OK) == 0) { - LOGV("found .nomedia, setting noMedia flag\n"); + ALOGV("found .nomedia, setting noMedia flag\n"); noMedia = true; } diff --git a/media/libmedia/ToneGenerator.cpp b/media/libmedia/ToneGenerator.cpp index 7c2200e..28b54b5 100644 --- a/media/libmedia/ToneGenerator.cpp +++ b/media/libmedia/ToneGenerator.cpp @@ -800,7 +800,7 @@ const unsigned char ToneGenerator::sToneMappingTable[NUM_REGIONS-1][NUM_SUP_TONE //////////////////////////////////////////////////////////////////////////////// ToneGenerator::ToneGenerator(int streamType, float volume, bool threadCanCallJava) { - LOGV("ToneGenerator constructor: streamType=%d, volume=%f\n", streamType, volume); + ALOGV("ToneGenerator constructor: streamType=%d, volume=%f\n", streamType, volume); mState = TONE_IDLE; @@ -829,9 +829,9 @@ ToneGenerator::ToneGenerator(int streamType, float volume, bool threadCanCallJav } if (initAudioTrack()) { - LOGV("ToneGenerator INIT OK, time: %d\n", (unsigned int)(systemTime()/1000000)); + ALOGV("ToneGenerator INIT OK, time: %d\n", (unsigned int)(systemTime()/1000000)); } else { - LOGV("!!!ToneGenerator INIT FAILED!!!\n"); + ALOGV("!!!ToneGenerator INIT FAILED!!!\n"); } } @@ -853,11 +853,11 @@ ToneGenerator::ToneGenerator(int streamType, float volume, bool threadCanCallJav // //////////////////////////////////////////////////////////////////////////////// ToneGenerator::~ToneGenerator() { - LOGV("ToneGenerator destructor\n"); + ALOGV("ToneGenerator destructor\n"); if (mpAudioTrack) { stopTone(); - LOGV("Delete Track: %p\n", mpAudioTrack); + ALOGV("Delete Track: %p\n", mpAudioTrack); delete mpAudioTrack; } } @@ -886,13 +886,13 @@ bool ToneGenerator::startTone(int toneType, int durationMs) { return lResult; if (mState == TONE_IDLE) { - LOGV("startTone: try to re-init AudioTrack"); + ALOGV("startTone: try to re-init AudioTrack"); if (!initAudioTrack()) { return lResult; } } - LOGV("startTone\n"); + ALOGV("startTone\n"); mLock.lock(); @@ -903,7 +903,7 @@ bool ToneGenerator::startTone(int toneType, int durationMs) { mDurationMs = durationMs; if (mState == TONE_STOPPED) { - LOGV("Start waiting for previous tone to stop"); + ALOGV("Start waiting for previous tone to stop"); lStatus = mWaitCbkCond.waitRelative(mLock, seconds(3)); if (lStatus != NO_ERROR) { LOGE("--- start wait for stop timed out, status %d", lStatus); @@ -915,14 +915,14 @@ bool ToneGenerator::startTone(int toneType, int durationMs) { if (mState == TONE_INIT) { if (prepareWave()) { - LOGV("Immediate start, time %d\n", (unsigned int)(systemTime()/1000000)); + ALOGV("Immediate start, time %d\n", (unsigned int)(systemTime()/1000000)); lResult = true; mState = TONE_STARTING; mLock.unlock(); mpAudioTrack->start(); mLock.lock(); if (mState == TONE_STARTING) { - LOGV("Wait for start callback"); + ALOGV("Wait for start callback"); lStatus = mWaitCbkCond.waitRelative(mLock, seconds(3)); if (lStatus != NO_ERROR) { LOGE("--- Immediate start timed out, status %d", lStatus); @@ -934,14 +934,14 @@ bool ToneGenerator::startTone(int toneType, int durationMs) { mState = TONE_IDLE; } } else { - LOGV("Delayed start\n"); + ALOGV("Delayed start\n"); mState = TONE_RESTARTING; lStatus = mWaitCbkCond.waitRelative(mLock, seconds(3)); if (lStatus == NO_ERROR) { if (mState != TONE_IDLE) { lResult = true; } - LOGV("cond received"); + ALOGV("cond received"); } else { LOGE("--- Delayed start timed out, status %d", lStatus); mState = TONE_IDLE; @@ -949,7 +949,7 @@ bool ToneGenerator::startTone(int toneType, int durationMs) { } mLock.unlock(); - LOGV_IF(lResult, "Tone started, time %d\n", (unsigned int)(systemTime()/1000000)); + ALOGV_IF(lResult, "Tone started, time %d\n", (unsigned int)(systemTime()/1000000)); LOGW_IF(!lResult, "Tone start failed!!!, time %d\n", (unsigned int)(systemTime()/1000000)); return lResult; @@ -969,15 +969,15 @@ bool ToneGenerator::startTone(int toneType, int durationMs) { // //////////////////////////////////////////////////////////////////////////////// void ToneGenerator::stopTone() { - LOGV("stopTone"); + ALOGV("stopTone"); mLock.lock(); if (mState == TONE_PLAYING || mState == TONE_STARTING || mState == TONE_RESTARTING) { mState = TONE_STOPPING; - LOGV("waiting cond"); + ALOGV("waiting cond"); status_t lStatus = mWaitCbkCond.waitRelative(mLock, seconds(3)); if (lStatus == NO_ERROR) { - LOGV("track stop complete, time %d", (unsigned int)(systemTime()/1000000)); + ALOGV("track stop complete, time %d", (unsigned int)(systemTime()/1000000)); } else { LOGE("--- Stop timed out"); mState = TONE_IDLE; @@ -1021,7 +1021,7 @@ bool ToneGenerator::initAudioTrack() { LOGE("AudioTrack allocation failed"); goto initAudioTrack_exit; } - LOGV("Create Track: %p\n", mpAudioTrack); + ALOGV("Create Track: %p\n", mpAudioTrack); mpAudioTrack->set(mStreamType, 0, @@ -1050,7 +1050,7 @@ initAudioTrack_exit: // Cleanup if (mpAudioTrack) { - LOGV("Delete Track I: %p\n", mpAudioTrack); + ALOGV("Delete Track I: %p\n", mpAudioTrack); delete mpAudioTrack; mpAudioTrack = 0; } @@ -1109,22 +1109,22 @@ void ToneGenerator::audioCallback(int event, void* user, void *info) { lWaveCmd = WaveGenerator::WAVEGEN_CONT; break; case TONE_STARTING: - LOGV("Starting Cbk"); + ALOGV("Starting Cbk"); lWaveCmd = WaveGenerator::WAVEGEN_START; break; case TONE_STOPPING: case TONE_RESTARTING: - LOGV("Stop/restart Cbk"); + ALOGV("Stop/restart Cbk"); lWaveCmd = WaveGenerator::WAVEGEN_STOP; lpToneGen->mNextSegSmp = TONEGEN_INF; // forced to skip state machine management below break; case TONE_STOPPED: - LOGV("Stopped Cbk"); + ALOGV("Stopped Cbk"); goto audioCallback_EndLoop; default: - LOGV("Extra Cbk"); + ALOGV("Extra Cbk"); goto audioCallback_EndLoop; } @@ -1145,7 +1145,7 @@ void ToneGenerator::audioCallback(int event, void* user, void *info) { if (lpToneGen->mTotalSmp > lpToneGen->mNextSegSmp) { // Time to go to next sequence segment - LOGV("End Segment, time: %d\n", (unsigned int)(systemTime()/1000000)); + ALOGV("End Segment, time: %d\n", (unsigned int)(systemTime()/1000000)); lGenSmp = lReqSmp; @@ -1160,13 +1160,13 @@ void ToneGenerator::audioCallback(int event, void* user, void *info) { lpWaveGen->getSamples(lpOut, lGenSmp, lWaveCmd); lFrequency = lpToneDesc->segments[lpToneGen->mCurSegment].waveFreq[++lFreqIdx]; } - LOGV("ON->OFF, lGenSmp: %d, lReqSmp: %d\n", lGenSmp, lReqSmp); + ALOGV("ON->OFF, lGenSmp: %d, lReqSmp: %d\n", lGenSmp, lReqSmp); } // check if we need to loop and loop for the reqd times if (lpToneDesc->segments[lpToneGen->mCurSegment].loopCnt) { if (lpToneGen->mLoopCounter < lpToneDesc->segments[lpToneGen->mCurSegment].loopCnt) { - LOGV ("in if loop loopCnt(%d) loopctr(%d), CurSeg(%d) \n", + ALOGV ("in if loop loopCnt(%d) loopctr(%d), CurSeg(%d) \n", lpToneDesc->segments[lpToneGen->mCurSegment].loopCnt, lpToneGen->mLoopCounter, lpToneGen->mCurSegment); @@ -1176,14 +1176,14 @@ void ToneGenerator::audioCallback(int event, void* user, void *info) { // completed loop. go to next segment lpToneGen->mLoopCounter = 0; lpToneGen->mCurSegment++; - LOGV ("in else loop loopCnt(%d) loopctr(%d), CurSeg(%d) \n", + ALOGV ("in else loop loopCnt(%d) loopctr(%d), CurSeg(%d) \n", lpToneDesc->segments[lpToneGen->mCurSegment].loopCnt, lpToneGen->mLoopCounter, lpToneGen->mCurSegment); } } else { lpToneGen->mCurSegment++; - LOGV ("Goto next seg loopCnt(%d) loopctr(%d), CurSeg(%d) \n", + ALOGV ("Goto next seg loopCnt(%d) loopctr(%d), CurSeg(%d) \n", lpToneDesc->segments[lpToneGen->mCurSegment].loopCnt, lpToneGen->mLoopCounter, lpToneGen->mCurSegment); @@ -1192,32 +1192,32 @@ void ToneGenerator::audioCallback(int event, void* user, void *info) { // Handle loop if last segment reached if (lpToneDesc->segments[lpToneGen->mCurSegment].duration == 0) { - LOGV("Last Seg: %d\n", lpToneGen->mCurSegment); + ALOGV("Last Seg: %d\n", lpToneGen->mCurSegment); // Pre increment loop count and restart if total count not reached. Stop sequence otherwise if (++lpToneGen->mCurCount <= lpToneDesc->repeatCnt) { - LOGV("Repeating Count: %d\n", lpToneGen->mCurCount); + ALOGV("Repeating Count: %d\n", lpToneGen->mCurCount); lpToneGen->mCurSegment = lpToneDesc->repeatSegment; if (lpToneDesc->segments[lpToneDesc->repeatSegment].waveFreq[0] != 0) { lWaveCmd = WaveGenerator::WAVEGEN_START; } - LOGV("New segment %d, Next Time: %d\n", lpToneGen->mCurSegment, + ALOGV("New segment %d, Next Time: %d\n", lpToneGen->mCurSegment, (lpToneGen->mNextSegSmp*1000)/lpToneGen->mSamplingRate); } else { lGenSmp = 0; - LOGV("End repeat, time: %d\n", (unsigned int)(systemTime()/1000000)); + ALOGV("End repeat, time: %d\n", (unsigned int)(systemTime()/1000000)); } } else { - LOGV("New segment %d, Next Time: %d\n", lpToneGen->mCurSegment, + ALOGV("New segment %d, Next Time: %d\n", lpToneGen->mCurSegment, (lpToneGen->mNextSegSmp*1000)/lpToneGen->mSamplingRate); if (lpToneDesc->segments[lpToneGen->mCurSegment].waveFreq[0] != 0) { // If next segment is not silent, OFF -> ON transition : reset wave generator lWaveCmd = WaveGenerator::WAVEGEN_START; - LOGV("OFF->ON, lGenSmp: %d, lReqSmp: %d\n", lGenSmp, lReqSmp); + ALOGV("OFF->ON, lGenSmp: %d, lReqSmp: %d\n", lGenSmp, lReqSmp); } else { lGenSmp = 0; } @@ -1255,7 +1255,7 @@ audioCallback_EndLoop: switch (lpToneGen->mState) { case TONE_RESTARTING: - LOGV("Cbk restarting track\n"); + ALOGV("Cbk restarting track\n"); if (lpToneGen->prepareWave()) { lpToneGen->mState = TONE_STARTING; // must reload lpToneDesc as prepareWave() may change mpToneDesc @@ -1270,14 +1270,14 @@ audioCallback_EndLoop: lSignal = true; break; case TONE_STOPPING: - LOGV("Cbk Stopping\n"); + ALOGV("Cbk Stopping\n"); lpToneGen->mState = TONE_STOPPED; // Force loop exit lNumSmp = 0; break; case TONE_STOPPED: lpToneGen->mState = TONE_INIT; - LOGV("Cbk Stopped track\n"); + ALOGV("Cbk Stopped track\n"); lpToneGen->mpAudioTrack->stop(); // Force loop exit lNumSmp = 0; @@ -1285,7 +1285,7 @@ audioCallback_EndLoop: lSignal = true; break; case TONE_STARTING: - LOGV("Cbk starting track\n"); + ALOGV("Cbk starting track\n"); lpToneGen->mState = TONE_PLAYING; lSignal = true; break; @@ -1338,7 +1338,7 @@ bool ToneGenerator::prepareWave() { } else { mMaxSmp = (mDurationMs * mSamplingRate) / 1000; } - LOGV("prepareWave, duration limited to %d ms", mDurationMs); + ALOGV("prepareWave, duration limited to %d ms", mDurationMs); } while (mpToneDesc->segments[segmentIdx].duration) { @@ -1425,7 +1425,7 @@ unsigned int ToneGenerator::numWaves(unsigned int segmentIdx) { // //////////////////////////////////////////////////////////////////////////////// void ToneGenerator::clearWaveGens() { - LOGV("Clearing mWaveGens:"); + ALOGV("Clearing mWaveGens:"); for (size_t lIdx = 0; lIdx < mWaveGens.size(); lIdx++) { delete mWaveGens.valueAt(lIdx); @@ -1456,7 +1456,7 @@ int ToneGenerator::getToneForRegion(int toneType) { regionTone = sToneMappingTable[mRegion][toneType - FIRST_SUP_TONE]; } - LOGV("getToneForRegion, tone %d, region %d, regionTone %d", toneType, mRegion, regionTone); + ALOGV("getToneForRegion, tone %d, region %d, regionTone %d", toneType, mRegion, regionTone); return regionTone; } @@ -1504,7 +1504,7 @@ ToneGenerator::WaveGenerator::WaveGenerator(unsigned short samplingRate, d0 = 32767; mA1_Q14 = (short) d0; - LOGV("WaveGenerator init, mA1_Q14: %d, mS2_0: %d, mAmplitude_Q15: %d\n", + ALOGV("WaveGenerator init, mA1_Q14: %d, mS2_0: %d, mAmplitude_Q15: %d\n", mA1_Q14, mS2_0, mAmplitude_Q15); } diff --git a/media/libmedia/Visualizer.cpp b/media/libmedia/Visualizer.cpp index bf40481..de40f98 100644 --- a/media/libmedia/Visualizer.cpp +++ b/media/libmedia/Visualizer.cpp @@ -120,7 +120,7 @@ status_t Visualizer::setCaptureCallBack(capture_cbk_t cbk, void* user, uint32_t return NO_INIT; } } - LOGV("setCaptureCallBack() rate: %d thread %p flags 0x%08x", + ALOGV("setCaptureCallBack() rate: %d thread %p flags 0x%08x", rate, mCaptureThread.get(), mCaptureFlags); return NO_ERROR; } @@ -147,7 +147,7 @@ status_t Visualizer::setCaptureSize(uint32_t size) *((int32_t *)p->data + 1)= size; status_t status = setParameter(p); - LOGV("setCaptureSize size %d status %d p->status %d", size, status, p->status); + ALOGV("setCaptureSize size %d status %d p->status %d", size, status, p->status); if (status == NO_ERROR) { status = p->status; @@ -172,12 +172,12 @@ status_t Visualizer::getWaveForm(uint8_t *waveform) if (mEnabled) { uint32_t replySize = mCaptureSize; status = command(VISUALIZER_CMD_CAPTURE, 0, NULL, &replySize, waveform); - LOGV("getWaveForm() command returned %d", status); + ALOGV("getWaveForm() command returned %d", status); if (replySize == 0) { status = NOT_ENOUGH_DATA; } } else { - LOGV("getWaveForm() disabled"); + ALOGV("getWaveForm() disabled"); memset(waveform, 0x80, mCaptureSize); } return status; @@ -236,7 +236,7 @@ status_t Visualizer::doFft(uint8_t *fft, uint8_t *waveform) void Visualizer::periodicCapture() { Mutex::Autolock _l(mLock); - LOGV("periodicCapture() %p mCaptureCallBack %p mCaptureFlags 0x%08x", + ALOGV("periodicCapture() %p mCaptureCallBack %p mCaptureFlags 0x%08x", this, mCaptureCallBack, mCaptureFlags); if (mCaptureCallBack != NULL && (mCaptureFlags & (CAPTURE_WAVEFORM|CAPTURE_FFT)) && @@ -289,7 +289,7 @@ uint32_t Visualizer::initCaptureSize() } mCaptureSize = size; - LOGV("initCaptureSize size %d status %d", mCaptureSize, status); + ALOGV("initCaptureSize size %d status %d", mCaptureSize, status); return size; } @@ -300,18 +300,18 @@ Visualizer::CaptureThread::CaptureThread(Visualizer& receiver, uint32_t captureR : Thread(bCanCallJava), mReceiver(receiver) { mSleepTimeUs = 1000000000 / captureRate; - LOGV("CaptureThread cstor %p captureRate %d mSleepTimeUs %d", this, captureRate, mSleepTimeUs); + ALOGV("CaptureThread cstor %p captureRate %d mSleepTimeUs %d", this, captureRate, mSleepTimeUs); } bool Visualizer::CaptureThread::threadLoop() { - LOGV("CaptureThread %p enter", this); + ALOGV("CaptureThread %p enter", this); while (!exitPending()) { usleep(mSleepTimeUs); mReceiver.periodicCapture(); } - LOGV("CaptureThread %p exiting", this); + ALOGV("CaptureThread %p exiting", this); return false; } diff --git a/media/libmedia/mediametadataretriever.cpp b/media/libmedia/mediametadataretriever.cpp index cee06ab..fd8c065 100644 --- a/media/libmedia/mediametadataretriever.cpp +++ b/media/libmedia/mediametadataretriever.cpp @@ -58,7 +58,7 @@ const sp<IMediaPlayerService>& MediaMetadataRetriever::getService() MediaMetadataRetriever::MediaMetadataRetriever() { - LOGV("constructor"); + ALOGV("constructor"); const sp<IMediaPlayerService>& service(getService()); if (service == 0) { LOGE("failed to obtain MediaMetadataRetrieverService"); @@ -73,14 +73,14 @@ MediaMetadataRetriever::MediaMetadataRetriever() MediaMetadataRetriever::~MediaMetadataRetriever() { - LOGV("destructor"); + ALOGV("destructor"); disconnect(); IPCThreadState::self()->flushCommands(); } void MediaMetadataRetriever::disconnect() { - LOGV("disconnect"); + ALOGV("disconnect"); sp<IMediaMetadataRetriever> retriever; { Mutex::Autolock _l(mLock); @@ -95,7 +95,7 @@ void MediaMetadataRetriever::disconnect() status_t MediaMetadataRetriever::setDataSource( const char *srcUrl, const KeyedVector<String8, String8> *headers) { - LOGV("setDataSource"); + ALOGV("setDataSource"); Mutex::Autolock _l(mLock); if (mRetriever == 0) { LOGE("retriever is not initialized"); @@ -105,13 +105,13 @@ status_t MediaMetadataRetriever::setDataSource( LOGE("data source is a null pointer"); return UNKNOWN_ERROR; } - LOGV("data source (%s)", srcUrl); + ALOGV("data source (%s)", srcUrl); return mRetriever->setDataSource(srcUrl, headers); } status_t MediaMetadataRetriever::setDataSource(int fd, int64_t offset, int64_t length) { - LOGV("setDataSource(%d, %lld, %lld)", fd, offset, length); + ALOGV("setDataSource(%d, %lld, %lld)", fd, offset, length); Mutex::Autolock _l(mLock); if (mRetriever == 0) { LOGE("retriever is not initialized"); @@ -126,7 +126,7 @@ status_t MediaMetadataRetriever::setDataSource(int fd, int64_t offset, int64_t l sp<IMemory> MediaMetadataRetriever::getFrameAtTime(int64_t timeUs, int option) { - LOGV("getFrameAtTime: time(%lld us) option(%d)", timeUs, option); + ALOGV("getFrameAtTime: time(%lld us) option(%d)", timeUs, option); Mutex::Autolock _l(mLock); if (mRetriever == 0) { LOGE("retriever is not initialized"); @@ -137,7 +137,7 @@ sp<IMemory> MediaMetadataRetriever::getFrameAtTime(int64_t timeUs, int option) const char* MediaMetadataRetriever::extractMetadata(int keyCode) { - LOGV("extractMetadata(%d)", keyCode); + ALOGV("extractMetadata(%d)", keyCode); Mutex::Autolock _l(mLock); if (mRetriever == 0) { LOGE("retriever is not initialized"); @@ -148,7 +148,7 @@ const char* MediaMetadataRetriever::extractMetadata(int keyCode) sp<IMemory> MediaMetadataRetriever::extractAlbumArt() { - LOGV("extractAlbumArt"); + ALOGV("extractAlbumArt"); Mutex::Autolock _l(mLock); if (mRetriever == 0) { LOGE("retriever is not initialized"); diff --git a/media/libmedia/mediaplayer.cpp b/media/libmedia/mediaplayer.cpp index c2e1ddf..5853144 100644 --- a/media/libmedia/mediaplayer.cpp +++ b/media/libmedia/mediaplayer.cpp @@ -46,7 +46,7 @@ namespace android { MediaPlayer::MediaPlayer() { - LOGV("constructor"); + ALOGV("constructor"); mListener = NULL; mCookie = NULL; mDuration = -1; @@ -67,7 +67,7 @@ MediaPlayer::MediaPlayer() MediaPlayer::~MediaPlayer() { - LOGV("destructor"); + ALOGV("destructor"); AudioSystem::releaseAudioSessionId(mAudioSessionId); disconnect(); IPCThreadState::self()->flushCommands(); @@ -75,7 +75,7 @@ MediaPlayer::~MediaPlayer() void MediaPlayer::disconnect() { - LOGV("disconnect"); + ALOGV("disconnect"); sp<IMediaPlayer> p; { Mutex::Autolock _l(mLock); @@ -99,7 +99,7 @@ void MediaPlayer::clear_l() status_t MediaPlayer::setListener(const sp<MediaPlayerListener>& listener) { - LOGV("setListener"); + ALOGV("setListener"); Mutex::Autolock _l(mLock); mListener = listener; return NO_ERROR; @@ -140,7 +140,7 @@ status_t MediaPlayer::attachNewPlayer(const sp<IMediaPlayer>& player) status_t MediaPlayer::setDataSource( const char *url, const KeyedVector<String8, String8> *headers) { - LOGV("setDataSource(%s)", url); + ALOGV("setDataSource(%s)", url); status_t err = BAD_VALUE; if (url != NULL) { const sp<IMediaPlayerService>& service(getMediaPlayerService()); @@ -157,7 +157,7 @@ status_t MediaPlayer::setDataSource( status_t MediaPlayer::setDataSource(int fd, int64_t offset, int64_t length) { - LOGV("setDataSource(%d, %lld, %lld)", fd, offset, length); + ALOGV("setDataSource(%d, %lld, %lld)", fd, offset, length); status_t err = UNKNOWN_ERROR; const sp<IMediaPlayerService>& service(getMediaPlayerService()); if (service != 0) { @@ -172,7 +172,7 @@ status_t MediaPlayer::setDataSource(int fd, int64_t offset, int64_t length) status_t MediaPlayer::setDataSource(const sp<IStreamSource> &source) { - LOGV("setDataSource"); + ALOGV("setDataSource"); status_t err = UNKNOWN_ERROR; const sp<IMediaPlayerService>& service(getMediaPlayerService()); if (service != 0) { @@ -192,7 +192,7 @@ status_t MediaPlayer::invoke(const Parcel& request, Parcel *reply) (mCurrentState != MEDIA_PLAYER_STATE_ERROR) && ((mCurrentState & MEDIA_PLAYER_IDLE) != MEDIA_PLAYER_IDLE); if ((mPlayer != NULL) && hasBeenInitialized) { - LOGV("invoke %d", request.dataSize()); + ALOGV("invoke %d", request.dataSize()); return mPlayer->invoke(request, reply); } LOGE("invoke failed: wrong state %X", mCurrentState); @@ -222,7 +222,7 @@ status_t MediaPlayer::getMetadata(bool update_only, bool apply_filter, Parcel *m status_t MediaPlayer::setVideoSurfaceTexture( const sp<ISurfaceTexture>& surfaceTexture) { - LOGV("setVideoSurfaceTexture"); + ALOGV("setVideoSurfaceTexture"); Mutex::Autolock _l(mLock); if (mPlayer == 0) return NO_INIT; return mPlayer->setVideoSurfaceTexture(surfaceTexture); @@ -246,7 +246,7 @@ status_t MediaPlayer::prepareAsync_l() // code. status_t MediaPlayer::prepare() { - LOGV("prepare"); + ALOGV("prepare"); Mutex::Autolock _l(mLock); mLockThreadId = getThreadId(); if (mPrepareSync) { @@ -264,21 +264,21 @@ status_t MediaPlayer::prepare() mSignal.wait(mLock); // wait for prepare done mPrepareSync = false; } - LOGV("prepare complete - status=%d", mPrepareStatus); + ALOGV("prepare complete - status=%d", mPrepareStatus); mLockThreadId = 0; return mPrepareStatus; } status_t MediaPlayer::prepareAsync() { - LOGV("prepareAsync"); + ALOGV("prepareAsync"); Mutex::Autolock _l(mLock); return prepareAsync_l(); } status_t MediaPlayer::start() { - LOGV("start"); + ALOGV("start"); Mutex::Autolock _l(mLock); if (mCurrentState & MEDIA_PLAYER_STARTED) return NO_ERROR; @@ -293,7 +293,7 @@ status_t MediaPlayer::start() mCurrentState = MEDIA_PLAYER_STATE_ERROR; } else { if (mCurrentState == MEDIA_PLAYER_PLAYBACK_COMPLETE) { - LOGV("playback completed immediately following start()"); + ALOGV("playback completed immediately following start()"); } } return ret; @@ -304,7 +304,7 @@ status_t MediaPlayer::start() status_t MediaPlayer::stop() { - LOGV("stop"); + ALOGV("stop"); Mutex::Autolock _l(mLock); if (mCurrentState & MEDIA_PLAYER_STOPPED) return NO_ERROR; if ( (mPlayer != 0) && ( mCurrentState & ( MEDIA_PLAYER_STARTED | MEDIA_PLAYER_PREPARED | @@ -323,7 +323,7 @@ status_t MediaPlayer::stop() status_t MediaPlayer::pause() { - LOGV("pause"); + ALOGV("pause"); Mutex::Autolock _l(mLock); if (mCurrentState & (MEDIA_PLAYER_PAUSED|MEDIA_PLAYER_PLAYBACK_COMPLETE)) return NO_ERROR; @@ -346,20 +346,20 @@ bool MediaPlayer::isPlaying() if (mPlayer != 0) { bool temp = false; mPlayer->isPlaying(&temp); - LOGV("isPlaying: %d", temp); + ALOGV("isPlaying: %d", temp); if ((mCurrentState & MEDIA_PLAYER_STARTED) && ! temp) { LOGE("internal/external state mismatch corrected"); mCurrentState = MEDIA_PLAYER_PAUSED; } return temp; } - LOGV("isPlaying: no active player"); + ALOGV("isPlaying: no active player"); return false; } status_t MediaPlayer::getVideoWidth(int *w) { - LOGV("getVideoWidth"); + ALOGV("getVideoWidth"); Mutex::Autolock _l(mLock); if (mPlayer == 0) return INVALID_OPERATION; *w = mVideoWidth; @@ -368,7 +368,7 @@ status_t MediaPlayer::getVideoWidth(int *w) status_t MediaPlayer::getVideoHeight(int *h) { - LOGV("getVideoHeight"); + ALOGV("getVideoHeight"); Mutex::Autolock _l(mLock); if (mPlayer == 0) return INVALID_OPERATION; *h = mVideoHeight; @@ -377,11 +377,11 @@ status_t MediaPlayer::getVideoHeight(int *h) status_t MediaPlayer::getCurrentPosition(int *msec) { - LOGV("getCurrentPosition"); + ALOGV("getCurrentPosition"); Mutex::Autolock _l(mLock); if (mPlayer != 0) { if (mCurrentPosition >= 0) { - LOGV("Using cached seek position: %d", mCurrentPosition); + ALOGV("Using cached seek position: %d", mCurrentPosition); *msec = mCurrentPosition; return NO_ERROR; } @@ -392,7 +392,7 @@ status_t MediaPlayer::getCurrentPosition(int *msec) status_t MediaPlayer::getDuration_l(int *msec) { - LOGV("getDuration"); + ALOGV("getDuration"); bool isValidState = (mCurrentState & (MEDIA_PLAYER_PREPARED | MEDIA_PLAYER_STARTED | MEDIA_PLAYER_PAUSED | MEDIA_PLAYER_STOPPED | MEDIA_PLAYER_PLAYBACK_COMPLETE)); if (mPlayer != 0 && isValidState) { status_t ret = NO_ERROR; @@ -414,7 +414,7 @@ status_t MediaPlayer::getDuration(int *msec) status_t MediaPlayer::seekTo_l(int msec) { - LOGV("seekTo %d", msec); + ALOGV("seekTo %d", msec); if ((mPlayer != 0) && ( mCurrentState & ( MEDIA_PLAYER_STARTED | MEDIA_PLAYER_PREPARED | MEDIA_PLAYER_PAUSED | MEDIA_PLAYER_PLAYBACK_COMPLETE) ) ) { if ( msec < 0 ) { LOGW("Attempt to seek to invalid position: %d", msec); @@ -431,7 +431,7 @@ status_t MediaPlayer::seekTo_l(int msec) return mPlayer->seekTo(msec); } else { - LOGV("Seek in progress - queue up seekTo[%d]", msec); + ALOGV("Seek in progress - queue up seekTo[%d]", msec); return NO_ERROR; } } @@ -473,14 +473,14 @@ status_t MediaPlayer::reset_l() status_t MediaPlayer::reset() { - LOGV("reset"); + ALOGV("reset"); Mutex::Autolock _l(mLock); return reset_l(); } status_t MediaPlayer::setAudioStreamType(int type) { - LOGV("MediaPlayer::setAudioStreamType"); + ALOGV("MediaPlayer::setAudioStreamType"); Mutex::Autolock _l(mLock); if (mStreamType == type) return NO_ERROR; if (mCurrentState & ( MEDIA_PLAYER_PREPARED | MEDIA_PLAYER_STARTED | @@ -496,7 +496,7 @@ status_t MediaPlayer::setAudioStreamType(int type) status_t MediaPlayer::setLooping(int loop) { - LOGV("MediaPlayer::setLooping"); + ALOGV("MediaPlayer::setLooping"); Mutex::Autolock _l(mLock); mLoop = (loop != 0); if (mPlayer != 0) { @@ -506,18 +506,18 @@ status_t MediaPlayer::setLooping(int loop) } bool MediaPlayer::isLooping() { - LOGV("isLooping"); + ALOGV("isLooping"); Mutex::Autolock _l(mLock); if (mPlayer != 0) { return mLoop; } - LOGV("isLooping: no active player"); + ALOGV("isLooping: no active player"); return false; } status_t MediaPlayer::setVolume(float leftVolume, float rightVolume) { - LOGV("MediaPlayer::setVolume(%f, %f)", leftVolume, rightVolume); + ALOGV("MediaPlayer::setVolume(%f, %f)", leftVolume, rightVolume); Mutex::Autolock _l(mLock); mLeftVolume = leftVolume; mRightVolume = rightVolume; @@ -529,7 +529,7 @@ status_t MediaPlayer::setVolume(float leftVolume, float rightVolume) status_t MediaPlayer::setAudioSessionId(int sessionId) { - LOGV("MediaPlayer::setAudioSessionId(%d)", sessionId); + ALOGV("MediaPlayer::setAudioSessionId(%d)", sessionId); Mutex::Autolock _l(mLock); if (!(mCurrentState & MEDIA_PLAYER_IDLE)) { LOGE("setAudioSessionId called in state %d", mCurrentState); @@ -554,7 +554,7 @@ int MediaPlayer::getAudioSessionId() status_t MediaPlayer::setAuxEffectSendLevel(float level) { - LOGV("MediaPlayer::setAuxEffectSendLevel(%f)", level); + ALOGV("MediaPlayer::setAuxEffectSendLevel(%f)", level); Mutex::Autolock _l(mLock); mSendLevel = level; if (mPlayer != 0) { @@ -565,7 +565,7 @@ status_t MediaPlayer::setAuxEffectSendLevel(float level) status_t MediaPlayer::attachAuxEffect(int effectId) { - LOGV("MediaPlayer::attachAuxEffect(%d)", effectId); + ALOGV("MediaPlayer::attachAuxEffect(%d)", effectId); Mutex::Autolock _l(mLock); if (mPlayer == 0 || (mCurrentState & MEDIA_PLAYER_IDLE) || @@ -579,29 +579,29 @@ status_t MediaPlayer::attachAuxEffect(int effectId) status_t MediaPlayer::setParameter(int key, const Parcel& request) { - LOGV("MediaPlayer::setParameter(%d)", key); + ALOGV("MediaPlayer::setParameter(%d)", key); Mutex::Autolock _l(mLock); if (mPlayer != NULL) { return mPlayer->setParameter(key, request); } - LOGV("setParameter: no active player"); + ALOGV("setParameter: no active player"); return INVALID_OPERATION; } status_t MediaPlayer::getParameter(int key, Parcel *reply) { - LOGV("MediaPlayer::getParameter(%d)", key); + ALOGV("MediaPlayer::getParameter(%d)", key); Mutex::Autolock _l(mLock); if (mPlayer != NULL) { return mPlayer->getParameter(key, reply); } - LOGV("getParameter: no active player"); + ALOGV("getParameter: no active player"); return INVALID_OPERATION; } void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj) { - LOGV("message received msg=%d, ext1=%d, ext2=%d", msg, ext1, ext2); + ALOGV("message received msg=%d, ext1=%d, ext2=%d", msg, ext1, ext2); bool send = true; bool locked = false; @@ -620,7 +620,7 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj) // Allows calls from JNI in idle state to notify errors if (!(msg == MEDIA_ERROR && mCurrentState == MEDIA_PLAYER_IDLE) && mPlayer == 0) { - LOGV("notify(%d, %d, %d) callback on disconnected mediaplayer", msg, ext1, ext2); + ALOGV("notify(%d, %d, %d) callback on disconnected mediaplayer", msg, ext1, ext2); if (locked) mLock.unlock(); // release the lock when done. return; } @@ -629,17 +629,17 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj) case MEDIA_NOP: // interface test message break; case MEDIA_PREPARED: - LOGV("prepared"); + ALOGV("prepared"); mCurrentState = MEDIA_PLAYER_PREPARED; if (mPrepareSync) { - LOGV("signal application thread"); + ALOGV("signal application thread"); mPrepareSync = false; mPrepareStatus = NO_ERROR; mSignal.signal(); } break; case MEDIA_PLAYBACK_COMPLETE: - LOGV("playback complete"); + ALOGV("playback complete"); if (mCurrentState == MEDIA_PLAYER_IDLE) { LOGE("playback complete in idle state"); } @@ -655,7 +655,7 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj) mCurrentState = MEDIA_PLAYER_STATE_ERROR; if (mPrepareSync) { - LOGV("signal application thread"); + ALOGV("signal application thread"); mPrepareSync = false; mPrepareStatus = ext1; mSignal.signal(); @@ -670,30 +670,30 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj) } break; case MEDIA_SEEK_COMPLETE: - LOGV("Received seek complete"); + ALOGV("Received seek complete"); if (mSeekPosition != mCurrentPosition) { - LOGV("Executing queued seekTo(%d)", mSeekPosition); + ALOGV("Executing queued seekTo(%d)", mSeekPosition); mSeekPosition = -1; seekTo_l(mCurrentPosition); } else { - LOGV("All seeks complete - return to regularly scheduled program"); + ALOGV("All seeks complete - return to regularly scheduled program"); mCurrentPosition = mSeekPosition = -1; } break; case MEDIA_BUFFERING_UPDATE: - LOGV("buffering %d", ext1); + ALOGV("buffering %d", ext1); break; case MEDIA_SET_VIDEO_SIZE: - LOGV("New video size %d x %d", ext1, ext2); + ALOGV("New video size %d x %d", ext1, ext2); mVideoWidth = ext1; mVideoHeight = ext2; break; case MEDIA_TIMED_TEXT: - LOGV("Received timed text message"); + ALOGV("Received timed text message"); break; default: - LOGV("unrecognized message: (%d, %d, %d)", msg, ext1, ext2); + ALOGV("unrecognized message: (%d, %d, %d)", msg, ext1, ext2); break; } @@ -703,15 +703,15 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj) // this prevents re-entrant calls into client code if ((listener != 0) && send) { Mutex::Autolock _l(mNotifyLock); - LOGV("callback application"); + ALOGV("callback application"); listener->notify(msg, ext1, ext2, obj); - LOGV("back from callback"); + ALOGV("back from callback"); } } /*static*/ sp<IMemory> MediaPlayer::decode(const char* url, uint32_t *pSampleRate, int* pNumChannels, int* pFormat) { - LOGV("decode(%s)", url); + ALOGV("decode(%s)", url); sp<IMemory> p; const sp<IMediaPlayerService>& service = getMediaPlayerService(); if (service != 0) { @@ -725,13 +725,13 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj) void MediaPlayer::died() { - LOGV("died"); + ALOGV("died"); notify(MEDIA_ERROR, MEDIA_ERROR_SERVER_DIED, 0); } /*static*/ sp<IMemory> MediaPlayer::decode(int fd, int64_t offset, int64_t length, uint32_t *pSampleRate, int* pNumChannels, int* pFormat) { - LOGV("decode(%d, %lld, %lld)", fd, offset, length); + ALOGV("decode(%d, %lld, %lld)", fd, offset, length); sp<IMemory> p; const sp<IMediaPlayerService>& service = getMediaPlayerService(); if (service != 0) { diff --git a/media/libmedia/mediarecorder.cpp b/media/libmedia/mediarecorder.cpp index 11d281f..ec62978 100644 --- a/media/libmedia/mediarecorder.cpp +++ b/media/libmedia/mediarecorder.cpp @@ -31,7 +31,7 @@ namespace android { status_t MediaRecorder::setCamera(const sp<ICamera>& camera, const sp<ICameraRecordingProxy>& proxy) { - LOGV("setCamera(%p,%p)", camera.get(), proxy.get()); + ALOGV("setCamera(%p,%p)", camera.get(), proxy.get()); if(mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -43,7 +43,7 @@ status_t MediaRecorder::setCamera(const sp<ICamera>& camera, const sp<ICameraRec status_t ret = mMediaRecorder->setCamera(camera, proxy); if (OK != ret) { - LOGV("setCamera failed: %d", ret); + ALOGV("setCamera failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -52,7 +52,7 @@ status_t MediaRecorder::setCamera(const sp<ICamera>& camera, const sp<ICameraRec status_t MediaRecorder::setPreviewSurface(const sp<Surface>& surface) { - LOGV("setPreviewSurface(%p)", surface.get()); + ALOGV("setPreviewSurface(%p)", surface.get()); if(mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -68,7 +68,7 @@ status_t MediaRecorder::setPreviewSurface(const sp<Surface>& surface) status_t ret = mMediaRecorder->setPreviewSurface(surface); if (OK != ret) { - LOGV("setPreviewSurface failed: %d", ret); + ALOGV("setPreviewSurface failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -77,7 +77,7 @@ status_t MediaRecorder::setPreviewSurface(const sp<Surface>& surface) status_t MediaRecorder::init() { - LOGV("init"); + ALOGV("init"); if(mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -89,14 +89,14 @@ status_t MediaRecorder::init() status_t ret = mMediaRecorder->init(); if (OK != ret) { - LOGV("init failed: %d", ret); + ALOGV("init failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } ret = mMediaRecorder->setListener(this); if (OK != ret) { - LOGV("setListener failed: %d", ret); + ALOGV("setListener failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -107,7 +107,7 @@ status_t MediaRecorder::init() status_t MediaRecorder::setVideoSource(int vs) { - LOGV("setVideoSource(%d)", vs); + ALOGV("setVideoSource(%d)", vs); if(mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -117,7 +117,7 @@ status_t MediaRecorder::setVideoSource(int vs) return INVALID_OPERATION; } if (mCurrentState & MEDIA_RECORDER_IDLE) { - LOGV("Call init() since the media recorder is not initialized yet"); + ALOGV("Call init() since the media recorder is not initialized yet"); status_t ret = init(); if (OK != ret) { return ret; @@ -132,7 +132,7 @@ status_t MediaRecorder::setVideoSource(int vs) status_t ret = mMediaRecorder->setVideoSource(vs); if (OK != ret) { - LOGV("setVideoSource failed: %d", ret); + ALOGV("setVideoSource failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -142,13 +142,13 @@ status_t MediaRecorder::setVideoSource(int vs) status_t MediaRecorder::setAudioSource(int as) { - LOGV("setAudioSource(%d)", as); + ALOGV("setAudioSource(%d)", as); if(mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } if (mCurrentState & MEDIA_RECORDER_IDLE) { - LOGV("Call init() since the media recorder is not initialized yet"); + ALOGV("Call init() since the media recorder is not initialized yet"); status_t ret = init(); if (OK != ret) { return ret; @@ -165,7 +165,7 @@ status_t MediaRecorder::setAudioSource(int as) status_t ret = mMediaRecorder->setAudioSource(as); if (OK != ret) { - LOGV("setAudioSource failed: %d", ret); + ALOGV("setAudioSource failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -175,7 +175,7 @@ status_t MediaRecorder::setAudioSource(int as) status_t MediaRecorder::setOutputFormat(int of) { - LOGV("setOutputFormat(%d)", of); + ALOGV("setOutputFormat(%d)", of); if(mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -201,7 +201,7 @@ status_t MediaRecorder::setOutputFormat(int of) status_t MediaRecorder::setVideoEncoder(int ve) { - LOGV("setVideoEncoder(%d)", ve); + ALOGV("setVideoEncoder(%d)", ve); if(mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -221,7 +221,7 @@ status_t MediaRecorder::setVideoEncoder(int ve) status_t ret = mMediaRecorder->setVideoEncoder(ve); if (OK != ret) { - LOGV("setVideoEncoder failed: %d", ret); + ALOGV("setVideoEncoder failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -231,7 +231,7 @@ status_t MediaRecorder::setVideoEncoder(int ve) status_t MediaRecorder::setAudioEncoder(int ae) { - LOGV("setAudioEncoder(%d)", ae); + ALOGV("setAudioEncoder(%d)", ae); if(mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -251,7 +251,7 @@ status_t MediaRecorder::setAudioEncoder(int ae) status_t ret = mMediaRecorder->setAudioEncoder(ae); if (OK != ret) { - LOGV("setAudioEncoder failed: %d", ret); + ALOGV("setAudioEncoder failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -261,7 +261,7 @@ status_t MediaRecorder::setAudioEncoder(int ae) status_t MediaRecorder::setOutputFile(const char* path) { - LOGV("setOutputFile(%s)", path); + ALOGV("setOutputFile(%s)", path); if(mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -277,7 +277,7 @@ status_t MediaRecorder::setOutputFile(const char* path) status_t ret = mMediaRecorder->setOutputFile(path); if (OK != ret) { - LOGV("setOutputFile failed: %d", ret); + ALOGV("setOutputFile failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -287,7 +287,7 @@ status_t MediaRecorder::setOutputFile(const char* path) status_t MediaRecorder::setOutputFile(int fd, int64_t offset, int64_t length) { - LOGV("setOutputFile(%d, %lld, %lld)", fd, offset, length); + ALOGV("setOutputFile(%d, %lld, %lld)", fd, offset, length); if(mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -314,7 +314,7 @@ status_t MediaRecorder::setOutputFile(int fd, int64_t offset, int64_t length) status_t ret = mMediaRecorder->setOutputFile(fd, offset, length); if (OK != ret) { - LOGV("setOutputFile failed: %d", ret); + ALOGV("setOutputFile failed: %d", ret); mCurrentState = MEDIA_RECORDER_ERROR; return ret; } @@ -324,7 +324,7 @@ status_t MediaRecorder::setOutputFile(int fd, int64_t offset, int64_t length) status_t MediaRecorder::setVideoSize(int width, int height) { - LOGV("setVideoSize(%d, %d)", width, height); + ALOGV("setVideoSize(%d, %d)", width, height); if(mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -367,7 +367,7 @@ sp<ISurfaceTexture> MediaRecorder:: status_t MediaRecorder::setVideoFrameRate(int frames_per_second) { - LOGV("setVideoFrameRate(%d)", frames_per_second); + ALOGV("setVideoFrameRate(%d)", frames_per_second); if(mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -391,7 +391,7 @@ status_t MediaRecorder::setVideoFrameRate(int frames_per_second) } status_t MediaRecorder::setParameters(const String8& params) { - LOGV("setParameters(%s)", params.string()); + ALOGV("setParameters(%s)", params.string()); if(mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -419,7 +419,7 @@ status_t MediaRecorder::setParameters(const String8& params) { status_t MediaRecorder::prepare() { - LOGV("prepare"); + ALOGV("prepare"); if(mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -458,7 +458,7 @@ status_t MediaRecorder::prepare() status_t MediaRecorder::getMaxAmplitude(int* max) { - LOGV("getMaxAmplitude"); + ALOGV("getMaxAmplitude"); if(mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -479,7 +479,7 @@ status_t MediaRecorder::getMaxAmplitude(int* max) status_t MediaRecorder::start() { - LOGV("start"); + ALOGV("start"); if (mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -501,7 +501,7 @@ status_t MediaRecorder::start() status_t MediaRecorder::stop() { - LOGV("stop"); + ALOGV("stop"); if (mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -529,7 +529,7 @@ status_t MediaRecorder::stop() // Reset should be OK in any state status_t MediaRecorder::reset() { - LOGV("reset"); + ALOGV("reset"); if (mMediaRecorder == NULL) { LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; @@ -565,7 +565,7 @@ status_t MediaRecorder::reset() status_t MediaRecorder::close() { - LOGV("close"); + ALOGV("close"); if (!(mCurrentState & MEDIA_RECORDER_INITIALIZED)) { LOGE("close called in an invalid state: %d", mCurrentState); return INVALID_OPERATION; @@ -583,7 +583,7 @@ status_t MediaRecorder::close() status_t MediaRecorder::doReset() { - LOGV("doReset"); + ALOGV("doReset"); status_t ret = mMediaRecorder->reset(); if (OK != ret) { LOGE("doReset failed: %d", ret); @@ -597,7 +597,7 @@ status_t MediaRecorder::doReset() void MediaRecorder::doCleanUp() { - LOGV("doCleanUp"); + ALOGV("doCleanUp"); mIsAudioSourceSet = false; mIsVideoSourceSet = false; mIsAudioEncoderSet = false; @@ -608,7 +608,7 @@ void MediaRecorder::doCleanUp() // Release should be OK in any state status_t MediaRecorder::release() { - LOGV("release"); + ALOGV("release"); if (mMediaRecorder != NULL) { return mMediaRecorder->release(); } @@ -617,7 +617,7 @@ status_t MediaRecorder::release() MediaRecorder::MediaRecorder() : mSurfaceMediaSource(NULL) { - LOGV("constructor"); + ALOGV("constructor"); const sp<IMediaPlayerService>& service(getMediaPlayerService()); if (service != NULL) { @@ -638,7 +638,7 @@ status_t MediaRecorder::initCheck() MediaRecorder::~MediaRecorder() { - LOGV("destructor"); + ALOGV("destructor"); if (mMediaRecorder != NULL) { mMediaRecorder.clear(); } @@ -650,7 +650,7 @@ MediaRecorder::~MediaRecorder() status_t MediaRecorder::setListener(const sp<MediaRecorderListener>& listener) { - LOGV("setListener"); + ALOGV("setListener"); Mutex::Autolock _l(mLock); mListener = listener; @@ -659,7 +659,7 @@ status_t MediaRecorder::setListener(const sp<MediaRecorderListener>& listener) void MediaRecorder::notify(int msg, int ext1, int ext2) { - LOGV("message received msg=%d, ext1=%d, ext2=%d", msg, ext1, ext2); + ALOGV("message received msg=%d, ext1=%d, ext2=%d", msg, ext1, ext2); sp<MediaRecorderListener> listener; mLock.lock(); @@ -668,15 +668,15 @@ void MediaRecorder::notify(int msg, int ext1, int ext2) if (listener != NULL) { Mutex::Autolock _l(mNotifyLock); - LOGV("callback application"); + ALOGV("callback application"); listener->notify(msg, ext1, ext2); - LOGV("back from callback"); + ALOGV("back from callback"); } } void MediaRecorder::died() { - LOGV("died"); + ALOGV("died"); notify(MEDIA_RECORDER_EVENT_ERROR, MEDIA_ERROR_SERVER_DIED, 0); } diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp index e8d0f0c..588bd6a 100644 --- a/media/libmediaplayerservice/MediaPlayerService.cpp +++ b/media/libmediaplayerservice/MediaPlayerService.cpp @@ -215,7 +215,7 @@ void MediaPlayerService::instantiate() { MediaPlayerService::MediaPlayerService() { - LOGV("MediaPlayerService created"); + ALOGV("MediaPlayerService created"); mNextConnId = 1; mBatteryAudio.refCount = 0; @@ -230,7 +230,7 @@ MediaPlayerService::MediaPlayerService() MediaPlayerService::~MediaPlayerService() { - LOGV("MediaPlayerService destroyed"); + ALOGV("MediaPlayerService destroyed"); } sp<IMediaRecorder> MediaPlayerService::createMediaRecorder(pid_t pid) @@ -239,7 +239,7 @@ sp<IMediaRecorder> MediaPlayerService::createMediaRecorder(pid_t pid) wp<MediaRecorderClient> w = recorder; Mutex::Autolock lock(mLock); mMediaRecorderClients.add(w); - LOGV("Create new media recorder client from pid %d", pid); + ALOGV("Create new media recorder client from pid %d", pid); return recorder; } @@ -247,13 +247,13 @@ void MediaPlayerService::removeMediaRecorderClient(wp<MediaRecorderClient> clien { Mutex::Autolock lock(mLock); mMediaRecorderClients.remove(client); - LOGV("Delete media recorder client"); + ALOGV("Delete media recorder client"); } sp<IMediaMetadataRetriever> MediaPlayerService::createMetadataRetriever(pid_t pid) { sp<MetadataRetrieverClient> retriever = new MetadataRetrieverClient(pid); - LOGV("Create new media retriever from pid %d", pid); + ALOGV("Create new media retriever from pid %d", pid); return retriever; } @@ -266,7 +266,7 @@ sp<IMediaPlayer> MediaPlayerService::create(pid_t pid, const sp<IMediaPlayerClie this, pid, connId, client, audioSessionId, IPCThreadState::self()->getCallingUid()); - LOGV("Create new client(%d) from pid %d, uid %d, ", connId, pid, + ALOGV("Create new client(%d) from pid %d, uid %d, ", connId, pid, IPCThreadState::self()->getCallingUid()); wp<Client> w = c; @@ -478,7 +478,7 @@ MediaPlayerService::Client::Client( int32_t connId, const sp<IMediaPlayerClient>& client, int audioSessionId, uid_t uid) { - LOGV("Client(%d) constructor", connId); + ALOGV("Client(%d) constructor", connId); mPid = pid; mConnId = connId; mService = service; @@ -496,7 +496,7 @@ MediaPlayerService::Client::Client( MediaPlayerService::Client::~Client() { - LOGV("Client(%d) destructor pid = %d", mConnId, mPid); + ALOGV("Client(%d) destructor pid = %d", mConnId, mPid); mAudioOutput.clear(); wp<Client> client(this); disconnect(); @@ -505,7 +505,7 @@ MediaPlayerService::Client::~Client() void MediaPlayerService::Client::disconnect() { - LOGV("disconnect(%d) from pid %d", mConnId, mPid); + ALOGV("disconnect(%d) from pid %d", mConnId, mPid); // grab local reference and clear main reference to prevent future // access to object sp<MediaPlayerBase> p; @@ -614,19 +614,19 @@ static sp<MediaPlayerBase> createPlayer(player_type playerType, void* cookie, sp<MediaPlayerBase> p; switch (playerType) { case SONIVOX_PLAYER: - LOGV(" create MidiFile"); + ALOGV(" create MidiFile"); p = new MidiFile(); break; case STAGEFRIGHT_PLAYER: - LOGV(" create StagefrightPlayer"); + ALOGV(" create StagefrightPlayer"); p = new StagefrightPlayer; break; case NU_PLAYER: - LOGV(" create NuPlayer"); + ALOGV(" create NuPlayer"); p = new NuPlayerDriver; break; case TEST_PLAYER: - LOGV("Create Test Player stub"); + ALOGV("Create Test Player stub"); p = new TestPlayerStub(); break; default: @@ -651,7 +651,7 @@ sp<MediaPlayerBase> MediaPlayerService::Client::createPlayer(player_type playerT // determine if we have the right player type sp<MediaPlayerBase> p = mPlayer; if ((p != NULL) && (p->playerType() != playerType)) { - LOGV("delete player"); + ALOGV("delete player"); p.clear(); } if (p == NULL) { @@ -668,7 +668,7 @@ sp<MediaPlayerBase> MediaPlayerService::Client::createPlayer(player_type playerT status_t MediaPlayerService::Client::setDataSource( const char *url, const KeyedVector<String8, String8> *headers) { - LOGV("setDataSource(%s)", url); + ALOGV("setDataSource(%s)", url); if (url == NULL) return UNKNOWN_ERROR; @@ -696,7 +696,7 @@ status_t MediaPlayerService::Client::setDataSource( return mStatus; } else { player_type playerType = getPlayerType(url); - LOGV("player type = %d", playerType); + ALOGV("player type = %d", playerType); // create the right type of player sp<MediaPlayerBase> p = createPlayer(playerType); @@ -708,7 +708,7 @@ status_t MediaPlayerService::Client::setDataSource( } // now set data source - LOGV(" setDataSource"); + ALOGV(" setDataSource"); mStatus = p->setDataSource(url, headers); if (mStatus == NO_ERROR) { mPlayer = p; @@ -721,7 +721,7 @@ status_t MediaPlayerService::Client::setDataSource( status_t MediaPlayerService::Client::setDataSource(int fd, int64_t offset, int64_t length) { - LOGV("setDataSource fd=%d, offset=%lld, length=%lld", fd, offset, length); + ALOGV("setDataSource fd=%d, offset=%lld, length=%lld", fd, offset, length); struct stat sb; int ret = fstat(fd, &sb); if (ret != 0) { @@ -729,11 +729,11 @@ status_t MediaPlayerService::Client::setDataSource(int fd, int64_t offset, int64 return UNKNOWN_ERROR; } - LOGV("st_dev = %llu", sb.st_dev); - LOGV("st_mode = %u", sb.st_mode); - LOGV("st_uid = %lu", sb.st_uid); - LOGV("st_gid = %lu", sb.st_gid); - LOGV("st_size = %llu", sb.st_size); + ALOGV("st_dev = %llu", sb.st_dev); + ALOGV("st_mode = %u", sb.st_mode); + ALOGV("st_uid = %lu", sb.st_uid); + ALOGV("st_gid = %lu", sb.st_gid); + ALOGV("st_size = %llu", sb.st_size); if (offset >= sb.st_size) { LOGE("offset error"); @@ -742,11 +742,11 @@ status_t MediaPlayerService::Client::setDataSource(int fd, int64_t offset, int64 } if (offset + length > sb.st_size) { length = sb.st_size - offset; - LOGV("calculated length = %lld", length); + ALOGV("calculated length = %lld", length); } player_type playerType = getPlayerType(fd, offset, length); - LOGV("player type = %d", playerType); + ALOGV("player type = %d", playerType); // create the right type of player sp<MediaPlayerBase> p = createPlayer(playerType); @@ -794,7 +794,7 @@ void MediaPlayerService::Client::disconnectNativeWindow() { NATIVE_WINDOW_API_MEDIA); if (err != OK) { - LOGW("native_window_api_disconnect returned an error: %s (%d)", + ALOGW("native_window_api_disconnect returned an error: %s (%d)", strerror(-err), err); } } @@ -804,7 +804,7 @@ void MediaPlayerService::Client::disconnectNativeWindow() { status_t MediaPlayerService::Client::setVideoSurfaceTexture( const sp<ISurfaceTexture>& surfaceTexture) { - LOGV("[%d] setVideoSurfaceTexture(%p)", mConnId, surfaceTexture.get()); + ALOGV("[%d] setVideoSurfaceTexture(%p)", mConnId, surfaceTexture.get()); sp<MediaPlayerBase> p = getPlayer(); if (p == 0) return UNKNOWN_ERROR; @@ -920,7 +920,7 @@ status_t MediaPlayerService::Client::getMetadata( status_t MediaPlayerService::Client::prepareAsync() { - LOGV("[%d] prepareAsync", mConnId); + ALOGV("[%d] prepareAsync", mConnId); sp<MediaPlayerBase> p = getPlayer(); if (p == 0) return UNKNOWN_ERROR; status_t ret = p->prepareAsync(); @@ -933,7 +933,7 @@ status_t MediaPlayerService::Client::prepareAsync() status_t MediaPlayerService::Client::start() { - LOGV("[%d] start", mConnId); + ALOGV("[%d] start", mConnId); sp<MediaPlayerBase> p = getPlayer(); if (p == 0) return UNKNOWN_ERROR; p->setLooping(mLoop); @@ -942,7 +942,7 @@ status_t MediaPlayerService::Client::start() status_t MediaPlayerService::Client::stop() { - LOGV("[%d] stop", mConnId); + ALOGV("[%d] stop", mConnId); sp<MediaPlayerBase> p = getPlayer(); if (p == 0) return UNKNOWN_ERROR; return p->stop(); @@ -950,7 +950,7 @@ status_t MediaPlayerService::Client::stop() status_t MediaPlayerService::Client::pause() { - LOGV("[%d] pause", mConnId); + ALOGV("[%d] pause", mConnId); sp<MediaPlayerBase> p = getPlayer(); if (p == 0) return UNKNOWN_ERROR; return p->pause(); @@ -962,18 +962,18 @@ status_t MediaPlayerService::Client::isPlaying(bool* state) sp<MediaPlayerBase> p = getPlayer(); if (p == 0) return UNKNOWN_ERROR; *state = p->isPlaying(); - LOGV("[%d] isPlaying: %d", mConnId, *state); + ALOGV("[%d] isPlaying: %d", mConnId, *state); return NO_ERROR; } status_t MediaPlayerService::Client::getCurrentPosition(int *msec) { - LOGV("getCurrentPosition"); + ALOGV("getCurrentPosition"); sp<MediaPlayerBase> p = getPlayer(); if (p == 0) return UNKNOWN_ERROR; status_t ret = p->getCurrentPosition(msec); if (ret == NO_ERROR) { - LOGV("[%d] getCurrentPosition = %d", mConnId, *msec); + ALOGV("[%d] getCurrentPosition = %d", mConnId, *msec); } else { LOGE("getCurrentPosition returned %d", ret); } @@ -982,12 +982,12 @@ status_t MediaPlayerService::Client::getCurrentPosition(int *msec) status_t MediaPlayerService::Client::getDuration(int *msec) { - LOGV("getDuration"); + ALOGV("getDuration"); sp<MediaPlayerBase> p = getPlayer(); if (p == 0) return UNKNOWN_ERROR; status_t ret = p->getDuration(msec); if (ret == NO_ERROR) { - LOGV("[%d] getDuration = %d", mConnId, *msec); + ALOGV("[%d] getDuration = %d", mConnId, *msec); } else { LOGE("getDuration returned %d", ret); } @@ -996,7 +996,7 @@ status_t MediaPlayerService::Client::getDuration(int *msec) status_t MediaPlayerService::Client::seekTo(int msec) { - LOGV("[%d] seekTo(%d)", mConnId, msec); + ALOGV("[%d] seekTo(%d)", mConnId, msec); sp<MediaPlayerBase> p = getPlayer(); if (p == 0) return UNKNOWN_ERROR; return p->seekTo(msec); @@ -1004,7 +1004,7 @@ status_t MediaPlayerService::Client::seekTo(int msec) status_t MediaPlayerService::Client::reset() { - LOGV("[%d] reset", mConnId); + ALOGV("[%d] reset", mConnId); sp<MediaPlayerBase> p = getPlayer(); if (p == 0) return UNKNOWN_ERROR; return p->reset(); @@ -1012,7 +1012,7 @@ status_t MediaPlayerService::Client::reset() status_t MediaPlayerService::Client::setAudioStreamType(int type) { - LOGV("[%d] setAudioStreamType(%d)", mConnId, type); + ALOGV("[%d] setAudioStreamType(%d)", mConnId, type); // TODO: for hardware output, call player instead Mutex::Autolock l(mLock); if (mAudioOutput != 0) mAudioOutput->setAudioStreamType(type); @@ -1021,7 +1021,7 @@ status_t MediaPlayerService::Client::setAudioStreamType(int type) status_t MediaPlayerService::Client::setLooping(int loop) { - LOGV("[%d] setLooping(%d)", mConnId, loop); + ALOGV("[%d] setLooping(%d)", mConnId, loop); mLoop = loop; sp<MediaPlayerBase> p = getPlayer(); if (p != 0) return p->setLooping(loop); @@ -1030,7 +1030,7 @@ status_t MediaPlayerService::Client::setLooping(int loop) status_t MediaPlayerService::Client::setVolume(float leftVolume, float rightVolume) { - LOGV("[%d] setVolume(%f, %f)", mConnId, leftVolume, rightVolume); + ALOGV("[%d] setVolume(%f, %f)", mConnId, leftVolume, rightVolume); // TODO: for hardware output, call player instead Mutex::Autolock l(mLock); if (mAudioOutput != 0) mAudioOutput->setVolume(leftVolume, rightVolume); @@ -1039,7 +1039,7 @@ status_t MediaPlayerService::Client::setVolume(float leftVolume, float rightVolu status_t MediaPlayerService::Client::setAuxEffectSendLevel(float level) { - LOGV("[%d] setAuxEffectSendLevel(%f)", mConnId, level); + ALOGV("[%d] setAuxEffectSendLevel(%f)", mConnId, level); Mutex::Autolock l(mLock); if (mAudioOutput != 0) return mAudioOutput->setAuxEffectSendLevel(level); return NO_ERROR; @@ -1047,21 +1047,21 @@ status_t MediaPlayerService::Client::setAuxEffectSendLevel(float level) status_t MediaPlayerService::Client::attachAuxEffect(int effectId) { - LOGV("[%d] attachAuxEffect(%d)", mConnId, effectId); + ALOGV("[%d] attachAuxEffect(%d)", mConnId, effectId); Mutex::Autolock l(mLock); if (mAudioOutput != 0) return mAudioOutput->attachAuxEffect(effectId); return NO_ERROR; } status_t MediaPlayerService::Client::setParameter(int key, const Parcel &request) { - LOGV("[%d] setParameter(%d)", mConnId, key); + ALOGV("[%d] setParameter(%d)", mConnId, key); sp<MediaPlayerBase> p = getPlayer(); if (p == 0) return UNKNOWN_ERROR; return p->setParameter(key, request); } status_t MediaPlayerService::Client::getParameter(int key, Parcel *reply) { - LOGV("[%d] getParameter(%d)", mConnId, key); + ALOGV("[%d] getParameter(%d)", mConnId, key); sp<MediaPlayerBase> p = getPlayer(); if (p == 0) return UNKNOWN_ERROR; return p->getParameter(key, reply); @@ -1084,7 +1084,7 @@ void MediaPlayerService::Client::notify( // also access mMetadataUpdated and clears it. client->addNewMetadataUpdate(metadata_type); } - LOGV("[%d] notify (%p, %d, %d, %d)", client->mConnId, cookie, msg, ext1, ext2); + ALOGV("[%d] notify (%p, %d, %d, %d)", client->mConnId, cookie, msg, ext1, ext2); client->mClient->notify(msg, ext1, ext2, obj); } @@ -1135,7 +1135,7 @@ int Antagonizer::callbackThread(void* user) Antagonizer* p = reinterpret_cast<Antagonizer*>(user); while (!p->mExit) { if (p->mActive) { - LOGV("send event"); + ALOGV("send event"); p->mCb(p->mClient, 0, 0, 0); } usleep(interval); @@ -1151,7 +1151,7 @@ static size_t kDefaultHeapSize = 1024 * 1024; // 1MB sp<IMemory> MediaPlayerService::decode(const char* url, uint32_t *pSampleRate, int* pNumChannels, int* pFormat) { - LOGV("decode(%s)", url); + ALOGV("decode(%s)", url); sp<MemoryBase> mem; sp<MediaPlayerBase> player; @@ -1165,7 +1165,7 @@ sp<IMemory> MediaPlayerService::decode(const char* url, uint32_t *pSampleRate, i } player_type playerType = getPlayerType(url); - LOGV("player type = %d", playerType); + ALOGV("player type = %d", playerType); // create the right type of player sp<AudioCache> cache = new AudioCache(url); @@ -1178,16 +1178,16 @@ sp<IMemory> MediaPlayerService::decode(const char* url, uint32_t *pSampleRate, i // set data source if (player->setDataSource(url) != NO_ERROR) goto Exit; - LOGV("prepare"); + ALOGV("prepare"); player->prepareAsync(); - LOGV("wait for prepare"); + ALOGV("wait for prepare"); if (cache->wait() != NO_ERROR) goto Exit; - LOGV("start"); + ALOGV("start"); player->start(); - LOGV("wait for playback complete"); + ALOGV("wait for playback complete"); cache->wait(); // in case of error, return what was successfully decoded. if (cache->size() == 0) { @@ -1198,7 +1198,7 @@ sp<IMemory> MediaPlayerService::decode(const char* url, uint32_t *pSampleRate, i *pSampleRate = cache->sampleRate(); *pNumChannels = cache->channelCount(); *pFormat = (int)cache->format(); - LOGV("return memory @ %p, sampleRate=%u, channelCount = %d, format = %d", mem->pointer(), *pSampleRate, *pNumChannels, *pFormat); + ALOGV("return memory @ %p, sampleRate=%u, channelCount = %d, format = %d", mem->pointer(), *pSampleRate, *pNumChannels, *pFormat); Exit: if (player != 0) player->reset(); @@ -1207,12 +1207,12 @@ Exit: sp<IMemory> MediaPlayerService::decode(int fd, int64_t offset, int64_t length, uint32_t *pSampleRate, int* pNumChannels, int* pFormat) { - LOGV("decode(%d, %lld, %lld)", fd, offset, length); + ALOGV("decode(%d, %lld, %lld)", fd, offset, length); sp<MemoryBase> mem; sp<MediaPlayerBase> player; player_type playerType = getPlayerType(fd, offset, length); - LOGV("player type = %d", playerType); + ALOGV("player type = %d", playerType); // create the right type of player sp<AudioCache> cache = new AudioCache("decode_fd"); @@ -1225,16 +1225,16 @@ sp<IMemory> MediaPlayerService::decode(int fd, int64_t offset, int64_t length, u // set data source if (player->setDataSource(fd, offset, length) != NO_ERROR) goto Exit; - LOGV("prepare"); + ALOGV("prepare"); player->prepareAsync(); - LOGV("wait for prepare"); + ALOGV("wait for prepare"); if (cache->wait() != NO_ERROR) goto Exit; - LOGV("start"); + ALOGV("start"); player->start(); - LOGV("wait for playback complete"); + ALOGV("wait for playback complete"); cache->wait(); // in case of error, return what was successfully decoded. if (cache->size() == 0) { @@ -1245,7 +1245,7 @@ sp<IMemory> MediaPlayerService::decode(int fd, int64_t offset, int64_t length, u *pSampleRate = cache->sampleRate(); *pNumChannels = cache->channelCount(); *pFormat = cache->format(); - LOGV("return memory @ %p, sampleRate=%u, channelCount = %d, format = %d", mem->pointer(), *pSampleRate, *pNumChannels, *pFormat); + ALOGV("return memory @ %p, sampleRate=%u, channelCount = %d, format = %d", mem->pointer(), *pSampleRate, *pNumChannels, *pFormat); Exit: if (player != 0) player->reset(); @@ -1260,7 +1260,7 @@ MediaPlayerService::AudioOutput::AudioOutput(int sessionId) : mCallback(NULL), mCallbackCookie(NULL), mSessionId(sessionId) { - LOGV("AudioOutput(%d)", sessionId); + ALOGV("AudioOutput(%d)", sessionId); mTrack = 0; mStreamType = AUDIO_STREAM_MUSIC; mLeftVolume = 1.0; @@ -1351,7 +1351,7 @@ status_t MediaPlayerService::AudioOutput::open( bufferCount = mMinBufferCount; } - LOGV("open(%u, %d, %d, %d, %d)", sampleRate, channelCount, format, bufferCount,mSessionId); + ALOGV("open(%u, %d, %d, %d, %d)", sampleRate, channelCount, format, bufferCount,mSessionId); if (mTrack) close(); int afSampleRate; int afFrameCount; @@ -1399,7 +1399,7 @@ status_t MediaPlayerService::AudioOutput::open( return NO_INIT; } - LOGV("setVolume"); + ALOGV("setVolume"); t->setVolume(mLeftVolume, mRightVolume); mMsecsPerFrame = 1.e3 / (float) sampleRate; @@ -1412,7 +1412,7 @@ status_t MediaPlayerService::AudioOutput::open( void MediaPlayerService::AudioOutput::start() { - LOGV("start"); + ALOGV("start"); if (mTrack) { mTrack->setVolume(mLeftVolume, mRightVolume); mTrack->setAuxEffectSendLevel(mSendLevel); @@ -1426,7 +1426,7 @@ ssize_t MediaPlayerService::AudioOutput::write(const void* buffer, size_t size) { LOG_FATAL_IF(mCallback != NULL, "Don't call write if supplying a callback."); - //LOGV("write(%p, %u)", buffer, size); + //ALOGV("write(%p, %u)", buffer, size); if (mTrack) { ssize_t ret = mTrack->write(buffer, size); return ret; @@ -1436,32 +1436,32 @@ ssize_t MediaPlayerService::AudioOutput::write(const void* buffer, size_t size) void MediaPlayerService::AudioOutput::stop() { - LOGV("stop"); + ALOGV("stop"); if (mTrack) mTrack->stop(); } void MediaPlayerService::AudioOutput::flush() { - LOGV("flush"); + ALOGV("flush"); if (mTrack) mTrack->flush(); } void MediaPlayerService::AudioOutput::pause() { - LOGV("pause"); + ALOGV("pause"); if (mTrack) mTrack->pause(); } void MediaPlayerService::AudioOutput::close() { - LOGV("close"); + ALOGV("close"); delete mTrack; mTrack = 0; } void MediaPlayerService::AudioOutput::setVolume(float left, float right) { - LOGV("setVolume(%f, %f)", left, right); + ALOGV("setVolume(%f, %f)", left, right); mLeftVolume = left; mRightVolume = right; if (mTrack) { @@ -1471,7 +1471,7 @@ void MediaPlayerService::AudioOutput::setVolume(float left, float right) status_t MediaPlayerService::AudioOutput::setAuxEffectSendLevel(float level) { - LOGV("setAuxEffectSendLevel(%f)", level); + ALOGV("setAuxEffectSendLevel(%f)", level); mSendLevel = level; if (mTrack) { return mTrack->setAuxEffectSendLevel(level); @@ -1481,7 +1481,7 @@ status_t MediaPlayerService::AudioOutput::setAuxEffectSendLevel(float level) status_t MediaPlayerService::AudioOutput::attachAuxEffect(int effectId) { - LOGV("attachAuxEffect(%d)", effectId); + ALOGV("attachAuxEffect(%d)", effectId); mAuxEffectId = effectId; if (mTrack) { return mTrack->attachAuxEffect(effectId); @@ -1492,7 +1492,7 @@ status_t MediaPlayerService::AudioOutput::attachAuxEffect(int effectId) // static void MediaPlayerService::AudioOutput::CallbackWrapper( int event, void *cookie, void *info) { - //LOGV("callbackwrapper"); + //ALOGV("callbackwrapper"); if (event != AudioTrack::EVENT_MORE_DATA) { return; } @@ -1614,7 +1614,7 @@ status_t MediaPlayerService::AudioCache::open( uint32_t sampleRate, int channelCount, int format, int bufferCount, AudioCallback cb, void *cookie) { - LOGV("open(%u, %d, %d, %d)", sampleRate, channelCount, format, bufferCount); + ALOGV("open(%u, %d, %d, %d)", sampleRate, channelCount, format, bufferCount); if (mHeap->getHeapID() < 0) { return NO_INIT; } @@ -1644,13 +1644,13 @@ void MediaPlayerService::AudioCache::stop() { ssize_t MediaPlayerService::AudioCache::write(const void* buffer, size_t size) { - LOGV("write(%p, %u)", buffer, size); + ALOGV("write(%p, %u)", buffer, size); if ((buffer == 0) || (size == 0)) return size; uint8_t* p = static_cast<uint8_t*>(mHeap->getBase()); if (p == NULL) return NO_INIT; p += mSize; - LOGV("memcpy(%p, %p, %u)", p, buffer, size); + ALOGV("memcpy(%p, %p, %u)", p, buffer, size); if (mSize + size > mHeap->getSize()) { LOGE("Heap size overflow! req size: %d, max size: %d", (mSize + size), mHeap->getSize()); size = mHeap->getSize() - mSize; @@ -1670,9 +1670,9 @@ status_t MediaPlayerService::AudioCache::wait() mCommandComplete = false; if (mError == NO_ERROR) { - LOGV("wait - success"); + ALOGV("wait - success"); } else { - LOGV("wait - error"); + ALOGV("wait - error"); } return mError; } @@ -1680,7 +1680,7 @@ status_t MediaPlayerService::AudioCache::wait() void MediaPlayerService::AudioCache::notify( void* cookie, int msg, int ext1, int ext2, const Parcel *obj) { - LOGV("notify(%p, %d, %d, %d)", cookie, msg, ext1, ext2); + ALOGV("notify(%p, %d, %d, %d)", cookie, msg, ext1, ext2); AudioCache* p = static_cast<AudioCache*>(cookie); // ignore buffering messages @@ -1691,13 +1691,13 @@ void MediaPlayerService::AudioCache::notify( p->mError = ext1; break; case MEDIA_PREPARED: - LOGV("prepared"); + ALOGV("prepared"); break; case MEDIA_PLAYBACK_COMPLETE: - LOGV("playback complete"); + ALOGV("playback complete"); break; default: - LOGV("ignored"); + ALOGV("ignored"); return; } diff --git a/media/libmediaplayerservice/MediaRecorderClient.cpp b/media/libmediaplayerservice/MediaRecorderClient.cpp index 6f80b35..ca92c77 100644 --- a/media/libmediaplayerservice/MediaRecorderClient.cpp +++ b/media/libmediaplayerservice/MediaRecorderClient.cpp @@ -61,7 +61,7 @@ static bool checkPermission(const char* permissionString) { sp<ISurfaceTexture> MediaRecorderClient::querySurfaceMediaSource() { - LOGV("Query SurfaceMediaSource"); + ALOGV("Query SurfaceMediaSource"); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { LOGE("recorder is not initialized"); @@ -75,7 +75,7 @@ sp<ISurfaceTexture> MediaRecorderClient::querySurfaceMediaSource() status_t MediaRecorderClient::setCamera(const sp<ICamera>& camera, const sp<ICameraRecordingProxy>& proxy) { - LOGV("setCamera"); + ALOGV("setCamera"); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { LOGE("recorder is not initialized"); @@ -86,7 +86,7 @@ status_t MediaRecorderClient::setCamera(const sp<ICamera>& camera, status_t MediaRecorderClient::setPreviewSurface(const sp<Surface>& surface) { - LOGV("setPreviewSurface"); + ALOGV("setPreviewSurface"); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { LOGE("recorder is not initialized"); @@ -97,7 +97,7 @@ status_t MediaRecorderClient::setPreviewSurface(const sp<Surface>& surface) status_t MediaRecorderClient::setVideoSource(int vs) { - LOGV("setVideoSource(%d)", vs); + ALOGV("setVideoSource(%d)", vs); if (!checkPermission(cameraPermission)) { return PERMISSION_DENIED; } @@ -111,7 +111,7 @@ status_t MediaRecorderClient::setVideoSource(int vs) status_t MediaRecorderClient::setAudioSource(int as) { - LOGV("setAudioSource(%d)", as); + ALOGV("setAudioSource(%d)", as); if (!checkPermission(recordAudioPermission)) { return PERMISSION_DENIED; } @@ -125,7 +125,7 @@ status_t MediaRecorderClient::setAudioSource(int as) status_t MediaRecorderClient::setOutputFormat(int of) { - LOGV("setOutputFormat(%d)", of); + ALOGV("setOutputFormat(%d)", of); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { LOGE("recorder is not initialized"); @@ -136,7 +136,7 @@ status_t MediaRecorderClient::setOutputFormat(int of) status_t MediaRecorderClient::setVideoEncoder(int ve) { - LOGV("setVideoEncoder(%d)", ve); + ALOGV("setVideoEncoder(%d)", ve); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { LOGE("recorder is not initialized"); @@ -147,7 +147,7 @@ status_t MediaRecorderClient::setVideoEncoder(int ve) status_t MediaRecorderClient::setAudioEncoder(int ae) { - LOGV("setAudioEncoder(%d)", ae); + ALOGV("setAudioEncoder(%d)", ae); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { LOGE("recorder is not initialized"); @@ -158,7 +158,7 @@ status_t MediaRecorderClient::setAudioEncoder(int ae) status_t MediaRecorderClient::setOutputFile(const char* path) { - LOGV("setOutputFile(%s)", path); + ALOGV("setOutputFile(%s)", path); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { LOGE("recorder is not initialized"); @@ -169,7 +169,7 @@ status_t MediaRecorderClient::setOutputFile(const char* path) status_t MediaRecorderClient::setOutputFile(int fd, int64_t offset, int64_t length) { - LOGV("setOutputFile(%d, %lld, %lld)", fd, offset, length); + ALOGV("setOutputFile(%d, %lld, %lld)", fd, offset, length); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { LOGE("recorder is not initialized"); @@ -180,7 +180,7 @@ status_t MediaRecorderClient::setOutputFile(int fd, int64_t offset, int64_t leng status_t MediaRecorderClient::setVideoSize(int width, int height) { - LOGV("setVideoSize(%dx%d)", width, height); + ALOGV("setVideoSize(%dx%d)", width, height); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { LOGE("recorder is not initialized"); @@ -191,7 +191,7 @@ status_t MediaRecorderClient::setVideoSize(int width, int height) status_t MediaRecorderClient::setVideoFrameRate(int frames_per_second) { - LOGV("setVideoFrameRate(%d)", frames_per_second); + ALOGV("setVideoFrameRate(%d)", frames_per_second); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { LOGE("recorder is not initialized"); @@ -201,7 +201,7 @@ status_t MediaRecorderClient::setVideoFrameRate(int frames_per_second) } status_t MediaRecorderClient::setParameters(const String8& params) { - LOGV("setParameters(%s)", params.string()); + ALOGV("setParameters(%s)", params.string()); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { LOGE("recorder is not initialized"); @@ -212,7 +212,7 @@ status_t MediaRecorderClient::setParameters(const String8& params) { status_t MediaRecorderClient::prepare() { - LOGV("prepare"); + ALOGV("prepare"); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { LOGE("recorder is not initialized"); @@ -224,7 +224,7 @@ status_t MediaRecorderClient::prepare() status_t MediaRecorderClient::getMaxAmplitude(int* max) { - LOGV("getMaxAmplitude"); + ALOGV("getMaxAmplitude"); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { LOGE("recorder is not initialized"); @@ -235,7 +235,7 @@ status_t MediaRecorderClient::getMaxAmplitude(int* max) status_t MediaRecorderClient::start() { - LOGV("start"); + ALOGV("start"); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { LOGE("recorder is not initialized"); @@ -247,7 +247,7 @@ status_t MediaRecorderClient::start() status_t MediaRecorderClient::stop() { - LOGV("stop"); + ALOGV("stop"); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { LOGE("recorder is not initialized"); @@ -258,7 +258,7 @@ status_t MediaRecorderClient::stop() status_t MediaRecorderClient::init() { - LOGV("init"); + ALOGV("init"); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { LOGE("recorder is not initialized"); @@ -269,7 +269,7 @@ status_t MediaRecorderClient::init() status_t MediaRecorderClient::close() { - LOGV("close"); + ALOGV("close"); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { LOGE("recorder is not initialized"); @@ -281,7 +281,7 @@ status_t MediaRecorderClient::close() status_t MediaRecorderClient::reset() { - LOGV("reset"); + ALOGV("reset"); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { LOGE("recorder is not initialized"); @@ -292,7 +292,7 @@ status_t MediaRecorderClient::reset() status_t MediaRecorderClient::release() { - LOGV("release"); + ALOGV("release"); Mutex::Autolock lock(mLock); if (mRecorder != NULL) { delete mRecorder; @@ -305,7 +305,7 @@ status_t MediaRecorderClient::release() MediaRecorderClient::MediaRecorderClient(const sp<MediaPlayerService>& service, pid_t pid) { - LOGV("Client constructor"); + ALOGV("Client constructor"); mPid = pid; mRecorder = new StagefrightRecorder; mMediaPlayerService = service; @@ -313,13 +313,13 @@ MediaRecorderClient::MediaRecorderClient(const sp<MediaPlayerService>& service, MediaRecorderClient::~MediaRecorderClient() { - LOGV("Client destructor"); + ALOGV("Client destructor"); release(); } status_t MediaRecorderClient::setListener(const sp<IMediaRecorderClient>& listener) { - LOGV("setListener"); + ALOGV("setListener"); Mutex::Autolock lock(mLock); if (mRecorder == NULL) { LOGE("recorder is not initialized"); diff --git a/media/libmediaplayerservice/MetadataRetrieverClient.cpp b/media/libmediaplayerservice/MetadataRetrieverClient.cpp index d574ea3..f945c6a 100644 --- a/media/libmediaplayerservice/MetadataRetrieverClient.cpp +++ b/media/libmediaplayerservice/MetadataRetrieverClient.cpp @@ -46,7 +46,7 @@ extern player_type getPlayerType(int fd, int64_t offset, int64_t length); MetadataRetrieverClient::MetadataRetrieverClient(pid_t pid) { - LOGV("MetadataRetrieverClient constructor pid(%d)", pid); + ALOGV("MetadataRetrieverClient constructor pid(%d)", pid); mPid = pid; mThumbnail = NULL; mAlbumArt = NULL; @@ -55,7 +55,7 @@ MetadataRetrieverClient::MetadataRetrieverClient(pid_t pid) MetadataRetrieverClient::~MetadataRetrieverClient() { - LOGV("MetadataRetrieverClient destructor"); + ALOGV("MetadataRetrieverClient destructor"); disconnect(); } @@ -74,7 +74,7 @@ status_t MetadataRetrieverClient::dump(int fd, const Vector<String16>& args) con void MetadataRetrieverClient::disconnect() { - LOGV("disconnect from pid %d", mPid); + ALOGV("disconnect from pid %d", mPid); Mutex::Autolock lock(mLock); mRetriever.clear(); mThumbnail.clear(); @@ -92,7 +92,7 @@ static sp<MediaMetadataRetrieverBase> createRetriever(player_type playerType) break; } case SONIVOX_PLAYER: - LOGV("create midi metadata retriever"); + ALOGV("create midi metadata retriever"); p = new MidiMetadataRetriever(); break; default: @@ -110,13 +110,13 @@ static sp<MediaMetadataRetrieverBase> createRetriever(player_type playerType) status_t MetadataRetrieverClient::setDataSource( const char *url, const KeyedVector<String8, String8> *headers) { - LOGV("setDataSource(%s)", url); + ALOGV("setDataSource(%s)", url); Mutex::Autolock lock(mLock); if (url == NULL) { return UNKNOWN_ERROR; } player_type playerType = getPlayerType(url); - LOGV("player type = %d", playerType); + ALOGV("player type = %d", playerType); sp<MediaMetadataRetrieverBase> p = createRetriever(playerType); if (p == NULL) return NO_INIT; status_t ret = p->setDataSource(url, headers); @@ -126,7 +126,7 @@ status_t MetadataRetrieverClient::setDataSource( status_t MetadataRetrieverClient::setDataSource(int fd, int64_t offset, int64_t length) { - LOGV("setDataSource fd=%d, offset=%lld, length=%lld", fd, offset, length); + ALOGV("setDataSource fd=%d, offset=%lld, length=%lld", fd, offset, length); Mutex::Autolock lock(mLock); struct stat sb; int ret = fstat(fd, &sb); @@ -134,11 +134,11 @@ status_t MetadataRetrieverClient::setDataSource(int fd, int64_t offset, int64_t LOGE("fstat(%d) failed: %d, %s", fd, ret, strerror(errno)); return BAD_VALUE; } - LOGV("st_dev = %llu", sb.st_dev); - LOGV("st_mode = %u", sb.st_mode); - LOGV("st_uid = %lu", sb.st_uid); - LOGV("st_gid = %lu", sb.st_gid); - LOGV("st_size = %llu", sb.st_size); + ALOGV("st_dev = %llu", sb.st_dev); + ALOGV("st_mode = %u", sb.st_mode); + ALOGV("st_uid = %lu", sb.st_uid); + ALOGV("st_gid = %lu", sb.st_gid); + ALOGV("st_size = %llu", sb.st_size); if (offset >= sb.st_size) { LOGE("offset (%lld) bigger than file size (%llu)", offset, sb.st_size); @@ -147,11 +147,11 @@ status_t MetadataRetrieverClient::setDataSource(int fd, int64_t offset, int64_t } if (offset + length > sb.st_size) { length = sb.st_size - offset; - LOGV("calculated length = %lld", length); + ALOGV("calculated length = %lld", length); } player_type playerType = getPlayerType(fd, offset, length); - LOGV("player type = %d", playerType); + ALOGV("player type = %d", playerType); sp<MediaMetadataRetrieverBase> p = createRetriever(playerType); if (p == NULL) { ::close(fd); @@ -165,7 +165,7 @@ status_t MetadataRetrieverClient::setDataSource(int fd, int64_t offset, int64_t sp<IMemory> MetadataRetrieverClient::getFrameAtTime(int64_t timeUs, int option) { - LOGV("getFrameAtTime: time(%lld us) option(%d)", timeUs, option); + ALOGV("getFrameAtTime: time(%lld us) option(%d)", timeUs, option); Mutex::Autolock lock(mLock); mThumbnail.clear(); if (mRetriever == NULL) { @@ -197,7 +197,7 @@ sp<IMemory> MetadataRetrieverClient::getFrameAtTime(int64_t timeUs, int option) frameCopy->mDisplayHeight = frame->mDisplayHeight; frameCopy->mSize = frame->mSize; frameCopy->mRotationAngle = frame->mRotationAngle; - LOGV("rotation: %d", frameCopy->mRotationAngle); + ALOGV("rotation: %d", frameCopy->mRotationAngle); frameCopy->mData = (uint8_t *)frameCopy + sizeof(VideoFrame); memcpy(frameCopy->mData, frame->mData, frame->mSize); delete frame; // Fix memory leakage @@ -206,7 +206,7 @@ sp<IMemory> MetadataRetrieverClient::getFrameAtTime(int64_t timeUs, int option) sp<IMemory> MetadataRetrieverClient::extractAlbumArt() { - LOGV("extractAlbumArt"); + ALOGV("extractAlbumArt"); Mutex::Autolock lock(mLock); mAlbumArt.clear(); if (mRetriever == NULL) { @@ -241,7 +241,7 @@ sp<IMemory> MetadataRetrieverClient::extractAlbumArt() const char* MetadataRetrieverClient::extractMetadata(int keyCode) { - LOGV("extractMetadata"); + ALOGV("extractMetadata"); Mutex::Autolock lock(mLock); if (mRetriever == NULL) { LOGE("retriever is not initialized"); diff --git a/media/libmediaplayerservice/MidiFile.cpp b/media/libmediaplayerservice/MidiFile.cpp index 7e04523..85b1f9d 100644 --- a/media/libmediaplayerservice/MidiFile.cpp +++ b/media/libmediaplayerservice/MidiFile.cpp @@ -58,7 +58,7 @@ MidiFile::MidiFile() : mStreamType(AUDIO_STREAM_MUSIC), mLoop(false), mExit(false), mPaused(false), mRender(false), mTid(-1) { - LOGV("constructor"); + ALOGV("constructor"); mFileLocator.path = NULL; mFileLocator.fd = -1; @@ -88,12 +88,12 @@ MidiFile::MidiFile() : Mutex::Autolock l(mMutex); createThreadEtc(renderThread, this, "midithread", ANDROID_PRIORITY_AUDIO); mCondition.wait(mMutex); - LOGV("thread started"); + ALOGV("thread started"); } // indicate success if (mTid > 0) { - LOGV(" render thread(%d) started", mTid); + ALOGV(" render thread(%d) started", mTid); mState = EAS_STATE_READY; } @@ -108,13 +108,13 @@ status_t MidiFile::initCheck() } MidiFile::~MidiFile() { - LOGV("MidiFile destructor"); + ALOGV("MidiFile destructor"); release(); } status_t MidiFile::setDataSource( const char* path, const KeyedVector<String8, String8> *) { - LOGV("MidiFile::setDataSource url=%s", path); + ALOGV("MidiFile::setDataSource url=%s", path); Mutex::Autolock lock(mMutex); // file still open? @@ -145,7 +145,7 @@ status_t MidiFile::setDataSource( status_t MidiFile::setDataSource(int fd, int64_t offset, int64_t length) { - LOGV("MidiFile::setDataSource fd=%d", fd); + ALOGV("MidiFile::setDataSource fd=%d", fd); Mutex::Autolock lock(mMutex); // file still open? @@ -173,7 +173,7 @@ status_t MidiFile::setDataSource(int fd, int64_t offset, int64_t length) status_t MidiFile::prepare() { - LOGV("MidiFile::prepare"); + ALOGV("MidiFile::prepare"); Mutex::Autolock lock(mMutex); if (!mEasHandle) { return ERROR_NOT_OPEN; @@ -189,7 +189,7 @@ status_t MidiFile::prepare() status_t MidiFile::prepareAsync() { - LOGV("MidiFile::prepareAsync"); + ALOGV("MidiFile::prepareAsync"); status_t ret = prepare(); // don't hold lock during callback @@ -203,7 +203,7 @@ status_t MidiFile::prepareAsync() status_t MidiFile::start() { - LOGV("MidiFile::start"); + ALOGV("MidiFile::start"); Mutex::Autolock lock(mMutex); if (!mEasHandle) { return ERROR_NOT_OPEN; @@ -221,14 +221,14 @@ status_t MidiFile::start() mRender = true; // wake up render thread - LOGV(" wakeup render thread"); + ALOGV(" wakeup render thread"); mCondition.signal(); return NO_ERROR; } status_t MidiFile::stop() { - LOGV("MidiFile::stop"); + ALOGV("MidiFile::stop"); Mutex::Autolock lock(mMutex); if (!mEasHandle) { return ERROR_NOT_OPEN; @@ -246,7 +246,7 @@ status_t MidiFile::stop() status_t MidiFile::seekTo(int position) { - LOGV("MidiFile::seekTo %d", position); + ALOGV("MidiFile::seekTo %d", position); // hold lock during EAS calls { Mutex::Autolock lock(mMutex); @@ -268,7 +268,7 @@ status_t MidiFile::seekTo(int position) status_t MidiFile::pause() { - LOGV("MidiFile::pause"); + ALOGV("MidiFile::pause"); Mutex::Autolock lock(mMutex); if (!mEasHandle) { return ERROR_NOT_OPEN; @@ -283,14 +283,14 @@ status_t MidiFile::pause() bool MidiFile::isPlaying() { - LOGV("MidiFile::isPlaying, mState=%d", int(mState)); + ALOGV("MidiFile::isPlaying, mState=%d", int(mState)); if (!mEasHandle || mPaused) return false; return (mState == EAS_STATE_PLAY); } status_t MidiFile::getCurrentPosition(int* position) { - LOGV("MidiFile::getCurrentPosition"); + ALOGV("MidiFile::getCurrentPosition"); if (!mEasHandle) { LOGE("getCurrentPosition(): file not open"); return ERROR_NOT_OPEN; @@ -306,7 +306,7 @@ status_t MidiFile::getCurrentPosition(int* position) status_t MidiFile::getDuration(int* duration) { - LOGV("MidiFile::getDuration"); + ALOGV("MidiFile::getDuration"); { Mutex::Autolock lock(mMutex); if (!mEasHandle) return ERROR_NOT_OPEN; @@ -349,7 +349,7 @@ status_t MidiFile::getDuration(int* duration) status_t MidiFile::release() { - LOGV("MidiFile::release"); + ALOGV("MidiFile::release"); Mutex::Autolock l(mMutex); reset_nosync(); @@ -372,7 +372,7 @@ status_t MidiFile::release() status_t MidiFile::reset() { - LOGV("MidiFile::reset"); + ALOGV("MidiFile::reset"); Mutex::Autolock lock(mMutex); return reset_nosync(); } @@ -380,7 +380,7 @@ status_t MidiFile::reset() // call only with mutex held status_t MidiFile::reset_nosync() { - LOGV("MidiFile::reset_nosync"); + ALOGV("MidiFile::reset_nosync"); // close file if (mEasHandle) { EAS_CloseFile(mEasData, mEasHandle); @@ -407,7 +407,7 @@ status_t MidiFile::reset_nosync() status_t MidiFile::setLooping(int loop) { - LOGV("MidiFile::setLooping"); + ALOGV("MidiFile::setLooping"); Mutex::Autolock lock(mMutex); if (!mEasHandle) { return ERROR_NOT_OPEN; @@ -438,7 +438,7 @@ int MidiFile::render() { int temp; bool audioStarted = false; - LOGV("MidiFile::render"); + ALOGV("MidiFile::render"); // allocate render buffer mAudioBuffer = new EAS_PCM[pLibConfig->mixBufferSize * pLibConfig->numChannels * NUM_BUFFERS]; @@ -451,7 +451,7 @@ int MidiFile::render() { { Mutex::Autolock l(mMutex); mTid = gettid(); - LOGV("render thread(%d) signal", mTid); + ALOGV("render thread(%d) signal", mTid); mCondition.signal(); } @@ -461,9 +461,9 @@ int MidiFile::render() { // nothing to render, wait for client thread to wake us up while (!mRender && !mExit) { - LOGV("MidiFile::render - signal wait"); + ALOGV("MidiFile::render - signal wait"); mCondition.wait(mMutex); - LOGV("MidiFile::render - signal rx'd"); + ALOGV("MidiFile::render - signal rx'd"); } if (mExit) { mMutex.unlock(); @@ -471,7 +471,7 @@ int MidiFile::render() { } // render midi data into the input buffer - //LOGV("MidiFile::render - rendering audio"); + //ALOGV("MidiFile::render - rendering audio"); int num_output = 0; EAS_PCM* p = mAudioBuffer; for (int i = 0; i < NUM_BUFFERS; i++) { @@ -484,20 +484,20 @@ int MidiFile::render() { } // update playback state and position - // LOGV("MidiFile::render - updating state"); + // ALOGV("MidiFile::render - updating state"); EAS_GetLocation(mEasData, mEasHandle, &mPlayTime); EAS_State(mEasData, mEasHandle, &mState); mMutex.unlock(); // create audio output track if necessary if (!mAudioSink->ready()) { - LOGV("MidiFile::render - create output track"); + ALOGV("MidiFile::render - create output track"); if (createOutputTrack() != NO_ERROR) goto threadExit; } // Write data to the audio hardware - // LOGV("MidiFile::render - writing to audio output"); + // ALOGV("MidiFile::render - writing to audio output"); if ((temp = mAudioSink->write(mAudioBuffer, num_output)) < 0) { LOGE("Error in writing:%d",temp); return temp; @@ -505,7 +505,7 @@ int MidiFile::render() { // start audio output if necessary if (!audioStarted) { - //LOGV("MidiFile::render - starting audio"); + //ALOGV("MidiFile::render - starting audio"); mAudioSink->start(); audioStarted = true; } @@ -517,7 +517,7 @@ int MidiFile::render() { switch(mState) { case EAS_STATE_STOPPED: { - LOGV("MidiFile::render - stopped"); + ALOGV("MidiFile::render - stopped"); sendEvent(MEDIA_PLAYBACK_COMPLETE); break; } @@ -528,7 +528,7 @@ int MidiFile::render() { break; } case EAS_STATE_PAUSED: - LOGV("MidiFile::render - paused"); + ALOGV("MidiFile::render - paused"); break; default: break; diff --git a/media/libmediaplayerservice/MidiMetadataRetriever.cpp b/media/libmediaplayerservice/MidiMetadataRetriever.cpp index aaf2d18..bb65ed4 100644 --- a/media/libmediaplayerservice/MidiMetadataRetriever.cpp +++ b/media/libmediaplayerservice/MidiMetadataRetriever.cpp @@ -31,14 +31,14 @@ static status_t ERROR_ALLOCATE_FAILED = -4; void MidiMetadataRetriever::clearMetadataValues() { - LOGV("clearMetadataValues"); + ALOGV("clearMetadataValues"); mMetadataValues[0][0] = '\0'; } status_t MidiMetadataRetriever::setDataSource( const char *url, const KeyedVector<String8, String8> *headers) { - LOGV("setDataSource: %s", url? url: "NULL pointer"); + ALOGV("setDataSource: %s", url? url: "NULL pointer"); Mutex::Autolock lock(mLock); clearMetadataValues(); if (mMidiPlayer == 0) { @@ -49,7 +49,7 @@ status_t MidiMetadataRetriever::setDataSource( status_t MidiMetadataRetriever::setDataSource(int fd, int64_t offset, int64_t length) { - LOGV("setDataSource: fd(%d), offset(%lld), and length(%lld)", fd, offset, length); + ALOGV("setDataSource: fd(%d), offset(%lld), and length(%lld)", fd, offset, length); Mutex::Autolock lock(mLock); clearMetadataValues(); if (mMidiPlayer == 0) { @@ -60,7 +60,7 @@ status_t MidiMetadataRetriever::setDataSource(int fd, int64_t offset, int64_t le const char* MidiMetadataRetriever::extractMetadata(int keyCode) { - LOGV("extractMetdata: key(%d)", keyCode); + ALOGV("extractMetdata: key(%d)", keyCode); Mutex::Autolock lock(mLock); if (mMidiPlayer == 0 || mMidiPlayer->initCheck() != NO_ERROR) { LOGE("Midi player is not initialized yet"); @@ -78,7 +78,7 @@ const char* MidiMetadataRetriever::extractMetadata(int keyCode) snprintf(mMetadataValues[0], MAX_METADATA_STRING_LENGTH, "%d", duration); } - LOGV("duration: %s ms", mMetadataValues[0]); + ALOGV("duration: %s ms", mMetadataValues[0]); return mMetadataValues[0]; } default: diff --git a/media/libmediaplayerservice/StagefrightPlayer.cpp b/media/libmediaplayerservice/StagefrightPlayer.cpp index 598d573..6d7771a 100644 --- a/media/libmediaplayerservice/StagefrightPlayer.cpp +++ b/media/libmediaplayerservice/StagefrightPlayer.cpp @@ -29,13 +29,13 @@ namespace android { StagefrightPlayer::StagefrightPlayer() : mPlayer(new AwesomePlayer) { - LOGV("StagefrightPlayer"); + ALOGV("StagefrightPlayer"); mPlayer->setListener(this); } StagefrightPlayer::~StagefrightPlayer() { - LOGV("~StagefrightPlayer"); + ALOGV("~StagefrightPlayer"); reset(); delete mPlayer; @@ -43,7 +43,7 @@ StagefrightPlayer::~StagefrightPlayer() { } status_t StagefrightPlayer::initCheck() { - LOGV("initCheck"); + ALOGV("initCheck"); return OK; } @@ -61,7 +61,7 @@ status_t StagefrightPlayer::setDataSource( // Warning: The filedescriptor passed into this method will only be valid until // the method returns, if you want to keep it, dup it! status_t StagefrightPlayer::setDataSource(int fd, int64_t offset, int64_t length) { - LOGV("setDataSource(%d, %lld, %lld)", fd, offset, length); + ALOGV("setDataSource(%d, %lld, %lld)", fd, offset, length); return mPlayer->setDataSource(dup(fd), offset, length); } @@ -71,7 +71,7 @@ status_t StagefrightPlayer::setDataSource(const sp<IStreamSource> &source) { status_t StagefrightPlayer::setVideoSurfaceTexture( const sp<ISurfaceTexture> &surfaceTexture) { - LOGV("setVideoSurfaceTexture"); + ALOGV("setVideoSurfaceTexture"); return mPlayer->setSurfaceTexture(surfaceTexture); } @@ -85,30 +85,30 @@ status_t StagefrightPlayer::prepareAsync() { } status_t StagefrightPlayer::start() { - LOGV("start"); + ALOGV("start"); return mPlayer->play(); } status_t StagefrightPlayer::stop() { - LOGV("stop"); + ALOGV("stop"); return pause(); // what's the difference? } status_t StagefrightPlayer::pause() { - LOGV("pause"); + ALOGV("pause"); return mPlayer->pause(); } bool StagefrightPlayer::isPlaying() { - LOGV("isPlaying"); + ALOGV("isPlaying"); return mPlayer->isPlaying(); } status_t StagefrightPlayer::seekTo(int msec) { - LOGV("seekTo %.2f secs", msec / 1E3); + ALOGV("seekTo %.2f secs", msec / 1E3); status_t err = mPlayer->seekTo((int64_t)msec * 1000); @@ -116,7 +116,7 @@ status_t StagefrightPlayer::seekTo(int msec) { } status_t StagefrightPlayer::getCurrentPosition(int *msec) { - LOGV("getCurrentPosition"); + ALOGV("getCurrentPosition"); int64_t positionUs; status_t err = mPlayer->getPosition(&positionUs); @@ -131,7 +131,7 @@ status_t StagefrightPlayer::getCurrentPosition(int *msec) { } status_t StagefrightPlayer::getDuration(int *msec) { - LOGV("getDuration"); + ALOGV("getDuration"); int64_t durationUs; status_t err = mPlayer->getDuration(&durationUs); @@ -147,7 +147,7 @@ status_t StagefrightPlayer::getDuration(int *msec) { } status_t StagefrightPlayer::reset() { - LOGV("reset"); + ALOGV("reset"); mPlayer->reset(); @@ -155,13 +155,13 @@ status_t StagefrightPlayer::reset() { } status_t StagefrightPlayer::setLooping(int loop) { - LOGV("setLooping"); + ALOGV("setLooping"); return mPlayer->setLooping(loop); } player_type StagefrightPlayer::playerType() { - LOGV("playerType"); + ALOGV("playerType"); return STAGEFRIGHT_PLAYER; } @@ -176,12 +176,12 @@ void StagefrightPlayer::setAudioSink(const sp<AudioSink> &audioSink) { } status_t StagefrightPlayer::setParameter(int key, const Parcel &request) { - LOGV("setParameter"); + ALOGV("setParameter"); return mPlayer->setParameter(key, request); } status_t StagefrightPlayer::getParameter(int key, Parcel *reply) { - LOGV("getParameter"); + ALOGV("getParameter"); return mPlayer->getParameter(key, reply); } diff --git a/media/libmediaplayerservice/StagefrightRecorder.cpp b/media/libmediaplayerservice/StagefrightRecorder.cpp index 6981668..c0ba091 100644 --- a/media/libmediaplayerservice/StagefrightRecorder.cpp +++ b/media/libmediaplayerservice/StagefrightRecorder.cpp @@ -71,17 +71,17 @@ StagefrightRecorder::StagefrightRecorder() mVideoSource(VIDEO_SOURCE_LIST_END), mStarted(false), mSurfaceMediaSource(NULL) { - LOGV("Constructor"); + ALOGV("Constructor"); reset(); } StagefrightRecorder::~StagefrightRecorder() { - LOGV("Destructor"); + ALOGV("Destructor"); stop(); } status_t StagefrightRecorder::init() { - LOGV("init"); + ALOGV("init"); return OK; } @@ -89,12 +89,12 @@ status_t StagefrightRecorder::init() { // and return a interface reference. The client side will use that // while encoding GL Frames sp<ISurfaceTexture> StagefrightRecorder::querySurfaceMediaSource() const { - LOGV("Get SurfaceMediaSource"); + ALOGV("Get SurfaceMediaSource"); return mSurfaceMediaSource; } status_t StagefrightRecorder::setAudioSource(audio_source_t as) { - LOGV("setAudioSource: %d", as); + ALOGV("setAudioSource: %d", as); if (as < AUDIO_SOURCE_DEFAULT || as >= AUDIO_SOURCE_CNT) { LOGE("Invalid audio source: %d", as); @@ -111,7 +111,7 @@ status_t StagefrightRecorder::setAudioSource(audio_source_t as) { } status_t StagefrightRecorder::setVideoSource(video_source vs) { - LOGV("setVideoSource: %d", vs); + ALOGV("setVideoSource: %d", vs); if (vs < VIDEO_SOURCE_DEFAULT || vs >= VIDEO_SOURCE_LIST_END) { LOGE("Invalid video source: %d", vs); @@ -128,7 +128,7 @@ status_t StagefrightRecorder::setVideoSource(video_source vs) { } status_t StagefrightRecorder::setOutputFormat(output_format of) { - LOGV("setOutputFormat: %d", of); + ALOGV("setOutputFormat: %d", of); if (of < OUTPUT_FORMAT_DEFAULT || of >= OUTPUT_FORMAT_LIST_END) { LOGE("Invalid output format: %d", of); @@ -145,7 +145,7 @@ status_t StagefrightRecorder::setOutputFormat(output_format of) { } status_t StagefrightRecorder::setAudioEncoder(audio_encoder ae) { - LOGV("setAudioEncoder: %d", ae); + ALOGV("setAudioEncoder: %d", ae); if (ae < AUDIO_ENCODER_DEFAULT || ae >= AUDIO_ENCODER_LIST_END) { LOGE("Invalid audio encoder: %d", ae); @@ -162,7 +162,7 @@ status_t StagefrightRecorder::setAudioEncoder(audio_encoder ae) { } status_t StagefrightRecorder::setVideoEncoder(video_encoder ve) { - LOGV("setVideoEncoder: %d", ve); + ALOGV("setVideoEncoder: %d", ve); if (ve < VIDEO_ENCODER_DEFAULT || ve >= VIDEO_ENCODER_LIST_END) { LOGE("Invalid video encoder: %d", ve); @@ -179,7 +179,7 @@ status_t StagefrightRecorder::setVideoEncoder(video_encoder ve) { } status_t StagefrightRecorder::setVideoSize(int width, int height) { - LOGV("setVideoSize: %dx%d", width, height); + ALOGV("setVideoSize: %dx%d", width, height); if (width <= 0 || height <= 0) { LOGE("Invalid video size: %dx%d", width, height); return BAD_VALUE; @@ -193,7 +193,7 @@ status_t StagefrightRecorder::setVideoSize(int width, int height) { } status_t StagefrightRecorder::setVideoFrameRate(int frames_per_second) { - LOGV("setVideoFrameRate: %d", frames_per_second); + ALOGV("setVideoFrameRate: %d", frames_per_second); if ((frames_per_second <= 0 && frames_per_second != -1) || frames_per_second > 120) { LOGE("Invalid video frame rate: %d", frames_per_second); @@ -208,7 +208,7 @@ status_t StagefrightRecorder::setVideoFrameRate(int frames_per_second) { status_t StagefrightRecorder::setCamera(const sp<ICamera> &camera, const sp<ICameraRecordingProxy> &proxy) { - LOGV("setCamera"); + ALOGV("setCamera"); if (camera == 0) { LOGE("camera is NULL"); return BAD_VALUE; @@ -224,7 +224,7 @@ status_t StagefrightRecorder::setCamera(const sp<ICamera> &camera, } status_t StagefrightRecorder::setPreviewSurface(const sp<Surface> &surface) { - LOGV("setPreviewSurface: %p", surface.get()); + ALOGV("setPreviewSurface: %p", surface.get()); mPreviewSurface = surface; return OK; @@ -239,7 +239,7 @@ status_t StagefrightRecorder::setOutputFile(const char *path) { } status_t StagefrightRecorder::setOutputFile(int fd, int64_t offset, int64_t length) { - LOGV("setOutputFile: %d, %lld, %lld", fd, offset, length); + ALOGV("setOutputFile: %d, %lld, %lld", fd, offset, length); // These don't make any sense, do they? CHECK_EQ(offset, 0); CHECK_EQ(length, 0); @@ -313,7 +313,7 @@ static void TrimString(String8 *s) { } status_t StagefrightRecorder::setParamAudioSamplingRate(int32_t sampleRate) { - LOGV("setParamAudioSamplingRate: %d", sampleRate); + ALOGV("setParamAudioSamplingRate: %d", sampleRate); if (sampleRate <= 0) { LOGE("Invalid audio sampling rate: %d", sampleRate); return BAD_VALUE; @@ -325,7 +325,7 @@ status_t StagefrightRecorder::setParamAudioSamplingRate(int32_t sampleRate) { } status_t StagefrightRecorder::setParamAudioNumberOfChannels(int32_t channels) { - LOGV("setParamAudioNumberOfChannels: %d", channels); + ALOGV("setParamAudioNumberOfChannels: %d", channels); if (channels <= 0 || channels >= 3) { LOGE("Invalid number of audio channels: %d", channels); return BAD_VALUE; @@ -337,7 +337,7 @@ status_t StagefrightRecorder::setParamAudioNumberOfChannels(int32_t channels) { } status_t StagefrightRecorder::setParamAudioEncodingBitRate(int32_t bitRate) { - LOGV("setParamAudioEncodingBitRate: %d", bitRate); + ALOGV("setParamAudioEncodingBitRate: %d", bitRate); if (bitRate <= 0) { LOGE("Invalid audio encoding bit rate: %d", bitRate); return BAD_VALUE; @@ -352,7 +352,7 @@ status_t StagefrightRecorder::setParamAudioEncodingBitRate(int32_t bitRate) { } status_t StagefrightRecorder::setParamVideoEncodingBitRate(int32_t bitRate) { - LOGV("setParamVideoEncodingBitRate: %d", bitRate); + ALOGV("setParamVideoEncodingBitRate: %d", bitRate); if (bitRate <= 0) { LOGE("Invalid video encoding bit rate: %d", bitRate); return BAD_VALUE; @@ -368,7 +368,7 @@ status_t StagefrightRecorder::setParamVideoEncodingBitRate(int32_t bitRate) { // Always rotate clockwise, and only support 0, 90, 180 and 270 for now. status_t StagefrightRecorder::setParamVideoRotation(int32_t degrees) { - LOGV("setParamVideoRotation: %d", degrees); + ALOGV("setParamVideoRotation: %d", degrees); if (degrees < 0 || degrees % 90 != 0) { LOGE("Unsupported video rotation angle: %d", degrees); return BAD_VALUE; @@ -378,7 +378,7 @@ status_t StagefrightRecorder::setParamVideoRotation(int32_t degrees) { } status_t StagefrightRecorder::setParamMaxFileDurationUs(int64_t timeUs) { - LOGV("setParamMaxFileDurationUs: %lld us", timeUs); + ALOGV("setParamMaxFileDurationUs: %lld us", timeUs); // This is meant for backward compatibility for MediaRecorder.java if (timeUs <= 0) { @@ -397,7 +397,7 @@ status_t StagefrightRecorder::setParamMaxFileDurationUs(int64_t timeUs) { } status_t StagefrightRecorder::setParamMaxFileSizeBytes(int64_t bytes) { - LOGV("setParamMaxFileSizeBytes: %lld bytes", bytes); + ALOGV("setParamMaxFileSizeBytes: %lld bytes", bytes); // This is meant for backward compatibility for MediaRecorder.java if (bytes <= 0) { @@ -418,7 +418,7 @@ status_t StagefrightRecorder::setParamMaxFileSizeBytes(int64_t bytes) { } status_t StagefrightRecorder::setParamInterleaveDuration(int32_t durationUs) { - LOGV("setParamInterleaveDuration: %d", durationUs); + ALOGV("setParamInterleaveDuration: %d", durationUs); if (durationUs <= 500000) { // 500 ms // If interleave duration is too small, it is very inefficient to do // interleaving since the metadata overhead will count for a significant @@ -440,20 +440,20 @@ status_t StagefrightRecorder::setParamInterleaveDuration(int32_t durationUs) { // If seconds == 0, all frames are encoded as I frames. No P frames // If seconds > 0, it is the time spacing (seconds) between 2 neighboring I frames status_t StagefrightRecorder::setParamVideoIFramesInterval(int32_t seconds) { - LOGV("setParamVideoIFramesInterval: %d seconds", seconds); + ALOGV("setParamVideoIFramesInterval: %d seconds", seconds); mIFramesIntervalSec = seconds; return OK; } status_t StagefrightRecorder::setParam64BitFileOffset(bool use64Bit) { - LOGV("setParam64BitFileOffset: %s", + ALOGV("setParam64BitFileOffset: %s", use64Bit? "use 64 bit file offset": "use 32 bit file offset"); mUse64BitFileOffset = use64Bit; return OK; } status_t StagefrightRecorder::setParamVideoCameraId(int32_t cameraId) { - LOGV("setParamVideoCameraId: %d", cameraId); + ALOGV("setParamVideoCameraId: %d", cameraId); if (cameraId < 0) { return BAD_VALUE; } @@ -462,7 +462,7 @@ status_t StagefrightRecorder::setParamVideoCameraId(int32_t cameraId) { } status_t StagefrightRecorder::setParamTrackTimeStatus(int64_t timeDurationUs) { - LOGV("setParamTrackTimeStatus: %lld", timeDurationUs); + ALOGV("setParamTrackTimeStatus: %lld", timeDurationUs); if (timeDurationUs < 20000) { // Infeasible if shorter than 20 ms? LOGE("Tracking time duration too short: %lld us", timeDurationUs); return BAD_VALUE; @@ -472,7 +472,7 @@ status_t StagefrightRecorder::setParamTrackTimeStatus(int64_t timeDurationUs) { } status_t StagefrightRecorder::setParamVideoEncoderProfile(int32_t profile) { - LOGV("setParamVideoEncoderProfile: %d", profile); + ALOGV("setParamVideoEncoderProfile: %d", profile); // Additional check will be done later when we load the encoder. // For now, we are accepting values defined in OpenMAX IL. @@ -481,7 +481,7 @@ status_t StagefrightRecorder::setParamVideoEncoderProfile(int32_t profile) { } status_t StagefrightRecorder::setParamVideoEncoderLevel(int32_t level) { - LOGV("setParamVideoEncoderLevel: %d", level); + ALOGV("setParamVideoEncoderLevel: %d", level); // Additional check will be done later when we load the encoder. // For now, we are accepting values defined in OpenMAX IL. @@ -490,7 +490,7 @@ status_t StagefrightRecorder::setParamVideoEncoderLevel(int32_t level) { } status_t StagefrightRecorder::setParamMovieTimeScale(int32_t timeScale) { - LOGV("setParamMovieTimeScale: %d", timeScale); + ALOGV("setParamMovieTimeScale: %d", timeScale); // The range is set to be the same as the audio's time scale range // since audio's time scale has a wider range. @@ -503,7 +503,7 @@ status_t StagefrightRecorder::setParamMovieTimeScale(int32_t timeScale) { } status_t StagefrightRecorder::setParamVideoTimeScale(int32_t timeScale) { - LOGV("setParamVideoTimeScale: %d", timeScale); + ALOGV("setParamVideoTimeScale: %d", timeScale); // 60000 is chosen to make sure that each video frame from a 60-fps // video has 1000 ticks. @@ -516,7 +516,7 @@ status_t StagefrightRecorder::setParamVideoTimeScale(int32_t timeScale) { } status_t StagefrightRecorder::setParamAudioTimeScale(int32_t timeScale) { - LOGV("setParamAudioTimeScale: %d", timeScale); + ALOGV("setParamAudioTimeScale: %d", timeScale); // 96000 Hz is the highest sampling rate support in AAC. if (timeScale < 600 || timeScale > 96000) { @@ -528,7 +528,7 @@ status_t StagefrightRecorder::setParamAudioTimeScale(int32_t timeScale) { } status_t StagefrightRecorder::setParamTimeLapseEnable(int32_t timeLapseEnable) { - LOGV("setParamTimeLapseEnable: %d", timeLapseEnable); + ALOGV("setParamTimeLapseEnable: %d", timeLapseEnable); if(timeLapseEnable == 0) { mCaptureTimeLapse = false; @@ -541,7 +541,7 @@ status_t StagefrightRecorder::setParamTimeLapseEnable(int32_t timeLapseEnable) { } status_t StagefrightRecorder::setParamTimeBetweenTimeLapseFrameCapture(int64_t timeUs) { - LOGV("setParamTimeBetweenTimeLapseFrameCapture: %lld us", timeUs); + ALOGV("setParamTimeBetweenTimeLapseFrameCapture: %lld us", timeUs); // Not allowing time more than a day if (timeUs <= 0 || timeUs > 86400*1E6) { @@ -575,7 +575,7 @@ status_t StagefrightRecorder::setParamGeoDataLatitude( status_t StagefrightRecorder::setParameter( const String8 &key, const String8 &value) { - LOGV("setParameter: key (%s) => value (%s)", key.string(), value.string()); + ALOGV("setParameter: key (%s) => value (%s)", key.string(), value.string()); if (key == "max-duration") { int64_t max_duration_ms; if (safe_strtoi64(value.string(), &max_duration_ms)) { @@ -689,7 +689,7 @@ status_t StagefrightRecorder::setParameter( } status_t StagefrightRecorder::setParameters(const String8 ¶ms) { - LOGV("setParameters: %s", params.string()); + ALOGV("setParameters: %s", params.string()); const char *cparams = params.string(); const char *key_start = cparams; for (;;) { @@ -1016,7 +1016,7 @@ status_t StagefrightRecorder::startMPEG2TSRecording() { } void StagefrightRecorder::clipVideoFrameRate() { - LOGV("clipVideoFrameRate: encoder %d", mVideoEncoder); + ALOGV("clipVideoFrameRate: encoder %d", mVideoEncoder); int minFrameRate = mEncoderProfiles->getVideoEncoderParamByName( "enc.vid.fps.min", mVideoEncoder); int maxFrameRate = mEncoderProfiles->getVideoEncoderParamByName( @@ -1033,7 +1033,7 @@ void StagefrightRecorder::clipVideoFrameRate() { } void StagefrightRecorder::clipVideoBitRate() { - LOGV("clipVideoBitRate: encoder %d", mVideoEncoder); + ALOGV("clipVideoBitRate: encoder %d", mVideoEncoder); int minBitRate = mEncoderProfiles->getVideoEncoderParamByName( "enc.vid.bps.min", mVideoEncoder); int maxBitRate = mEncoderProfiles->getVideoEncoderParamByName( @@ -1050,7 +1050,7 @@ void StagefrightRecorder::clipVideoBitRate() { } void StagefrightRecorder::clipVideoFrameWidth() { - LOGV("clipVideoFrameWidth: encoder %d", mVideoEncoder); + ALOGV("clipVideoFrameWidth: encoder %d", mVideoEncoder); int minFrameWidth = mEncoderProfiles->getVideoEncoderParamByName( "enc.vid.width.min", mVideoEncoder); int maxFrameWidth = mEncoderProfiles->getVideoEncoderParamByName( @@ -1082,7 +1082,7 @@ status_t StagefrightRecorder::checkVideoEncoderCapabilities() { // Set to use AVC baseline profile if the encoding parameters matches // CAMCORDER_QUALITY_LOW profile; this is for the sake of MMS service. void StagefrightRecorder::setDefaultProfileIfNecessary() { - LOGV("setDefaultProfileIfNecessary"); + ALOGV("setDefaultProfileIfNecessary"); camcorder_quality quality = CAMCORDER_QUALITY_LOW; @@ -1145,7 +1145,7 @@ status_t StagefrightRecorder::checkAudioEncoderCapabilities() { } void StagefrightRecorder::clipAudioBitRate() { - LOGV("clipAudioBitRate: encoder %d", mAudioEncoder); + ALOGV("clipAudioBitRate: encoder %d", mAudioEncoder); int minAudioBitRate = mEncoderProfiles->getAudioEncoderParamByName( @@ -1167,7 +1167,7 @@ void StagefrightRecorder::clipAudioBitRate() { } void StagefrightRecorder::clipAudioSampleRate() { - LOGV("clipAudioSampleRate: encoder %d", mAudioEncoder); + ALOGV("clipAudioSampleRate: encoder %d", mAudioEncoder); int minSampleRate = mEncoderProfiles->getAudioEncoderParamByName( @@ -1189,7 +1189,7 @@ void StagefrightRecorder::clipAudioSampleRate() { } void StagefrightRecorder::clipNumberOfAudioChannels() { - LOGV("clipNumberOfAudioChannels: encoder %d", mAudioEncoder); + ALOGV("clipNumberOfAudioChannels: encoder %d", mAudioEncoder); int minChannels = mEncoderProfiles->getAudioEncoderParamByName( @@ -1211,7 +1211,7 @@ void StagefrightRecorder::clipNumberOfAudioChannels() { } void StagefrightRecorder::clipVideoFrameHeight() { - LOGV("clipVideoFrameHeight: encoder %d", mVideoEncoder); + ALOGV("clipVideoFrameHeight: encoder %d", mVideoEncoder); int minFrameHeight = mEncoderProfiles->getVideoEncoderParamByName( "enc.vid.height.min", mVideoEncoder); int maxFrameHeight = mEncoderProfiles->getVideoEncoderParamByName( @@ -1548,7 +1548,7 @@ status_t StagefrightRecorder::startMPEG4Recording() { } status_t StagefrightRecorder::pause() { - LOGV("pause"); + ALOGV("pause"); if (mWriter == NULL) { return UNKNOWN_ERROR; } @@ -1573,7 +1573,7 @@ status_t StagefrightRecorder::pause() { } status_t StagefrightRecorder::stop() { - LOGV("stop"); + ALOGV("stop"); status_t err = OK; if (mCaptureTimeLapse && mCameraSourceTimeLapse != NULL) { @@ -1610,14 +1610,14 @@ status_t StagefrightRecorder::stop() { } status_t StagefrightRecorder::close() { - LOGV("close"); + ALOGV("close"); stop(); return OK; } status_t StagefrightRecorder::reset() { - LOGV("reset"); + ALOGV("reset"); stop(); // No audio or video source by default @@ -1664,7 +1664,7 @@ status_t StagefrightRecorder::reset() { } status_t StagefrightRecorder::getMaxAmplitude(int *max) { - LOGV("getMaxAmplitude"); + ALOGV("getMaxAmplitude"); if (max == NULL) { LOGE("Null pointer argument"); @@ -1682,7 +1682,7 @@ status_t StagefrightRecorder::getMaxAmplitude(int *max) { status_t StagefrightRecorder::dump( int fd, const Vector<String16>& args) const { - LOGV("dump"); + ALOGV("dump"); const size_t SIZE = 256; char buffer[SIZE]; String8 result; diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp index 93ab704..b43b915 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp +++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp @@ -160,7 +160,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { switch (msg->what()) { case kWhatSetDataSource: { - LOGV("kWhatSetDataSource"); + ALOGV("kWhatSetDataSource"); CHECK(mSource == NULL); @@ -173,7 +173,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { case kWhatSetVideoNativeWindow: { - LOGV("kWhatSetVideoNativeWindow"); + ALOGV("kWhatSetVideoNativeWindow"); sp<RefBase> obj; CHECK(msg->findObject("native-window", &obj)); @@ -184,7 +184,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { case kWhatSetAudioSink: { - LOGV("kWhatSetAudioSink"); + ALOGV("kWhatSetAudioSink"); sp<RefBase> obj; CHECK(msg->findObject("sink", &obj)); @@ -195,7 +195,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { case kWhatStart: { - LOGV("kWhatStart"); + ALOGV("kWhatStart"); mVideoIsAVC = false; mAudioEOS = false; @@ -229,7 +229,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { mScanSourcesPending = false; - LOGV("scanning sources haveAudio=%d, haveVideo=%d", + ALOGV("scanning sources haveAudio=%d, haveVideo=%d", mAudioDecoder != NULL, mVideoDecoder != NULL); instantiateDecoder(false, &mVideoDecoder); @@ -285,9 +285,9 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { CHECK(codecRequest->findInt32("err", &err)); if (err == ERROR_END_OF_STREAM) { - LOGV("got %s decoder EOS", audio ? "audio" : "video"); + ALOGV("got %s decoder EOS", audio ? "audio" : "video"); } else { - LOGV("got %s decoder EOS w/ error %d", + ALOGV("got %s decoder EOS w/ error %d", audio ? "audio" : "video", err); } @@ -306,10 +306,10 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { mVideoLateByUs = 0; } - LOGV("decoder %s flush completed", audio ? "audio" : "video"); + ALOGV("decoder %s flush completed", audio ? "audio" : "video"); if (needShutdown) { - LOGV("initiating %s decoder shutdown", + ALOGV("initiating %s decoder shutdown", audio ? "audio" : "video"); (audio ? mAudioDecoder : mVideoDecoder)->initiateShutdown(); @@ -330,7 +330,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { int32_t sampleRate; CHECK(codecRequest->findInt32("sample-rate", &sampleRate)); - LOGV("Audio output format changed to %d Hz, %d channels", + ALOGV("Audio output format changed to %d Hz, %d channels", sampleRate, numChannels); mAudioSink->close(); @@ -355,7 +355,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { "crop", &cropLeft, &cropTop, &cropRight, &cropBottom)); - LOGV("Video output format changed to %d x %d " + ALOGV("Video output format changed to %d x %d " "(crop: %d x %d @ (%d, %d))", width, height, (cropRight - cropLeft + 1), @@ -368,7 +368,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { cropBottom - cropTop + 1); } } else if (what == ACodec::kWhatShutdownCompleted) { - LOGV("%s shutdown completed", audio ? "audio" : "video"); + ALOGV("%s shutdown completed", audio ? "audio" : "video"); if (audio) { mAudioDecoder.clear(); @@ -415,7 +415,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { } if (finalResult == ERROR_END_OF_STREAM) { - LOGV("reached %s EOS", audio ? "audio" : "video"); + ALOGV("reached %s EOS", audio ? "audio" : "video"); } else { LOGE("%s track encountered an error (%d)", audio ? "audio" : "video", finalResult); @@ -449,7 +449,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { int32_t audio; CHECK(msg->findInt32("audio", &audio)); - LOGV("renderer %s flush completed.", audio ? "audio" : "video"); + ALOGV("renderer %s flush completed.", audio ? "audio" : "video"); } break; } @@ -461,7 +461,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { case kWhatReset: { - LOGV("kWhatReset"); + ALOGV("kWhatReset"); if (mRenderer != NULL) { // There's an edge case where the renderer owns all output @@ -479,7 +479,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { // We're currently flushing, postpone the reset until that's // completed. - LOGV("postponing reset mFlushingAudio=%d, mFlushingVideo=%d", + ALOGV("postponing reset mFlushingAudio=%d, mFlushingVideo=%d", mFlushingAudio, mFlushingVideo); mResetPostponed = true; @@ -510,7 +510,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { int64_t seekTimeUs; CHECK(msg->findInt64("seekTimeUs", &seekTimeUs)); - LOGV("kWhatSeek seekTimeUs=%lld us (%.2f secs)", + ALOGV("kWhatSeek seekTimeUs=%lld us (%.2f secs)", seekTimeUs, seekTimeUs / 1E6); mSource->seekTo(seekTimeUs); @@ -554,7 +554,7 @@ void NuPlayer::finishFlushIfPossible() { return; } - LOGV("both audio and video are flushed now."); + ALOGV("both audio and video are flushed now."); if (mTimeDiscontinuityPending) { mRenderer->signalTimeDiscontinuity(); @@ -573,7 +573,7 @@ void NuPlayer::finishFlushIfPossible() { mFlushingVideo = NONE; if (mResetInProgress) { - LOGV("reset completed"); + ALOGV("reset completed"); mResetInProgress = false; finishReset(); @@ -689,8 +689,8 @@ status_t NuPlayer::feedDecoderInputData(bool audio, const sp<AMessage> &msg) { bool timeChange = (type & ATSParser::DISCONTINUITY_TIME) != 0; - LOGI("%s discontinuity (formatChange=%d, time=%d)", - audio ? "audio" : "video", formatChange, timeChange); + ALOGI("%s discontinuity (formatChange=%d, time=%d)", + audio ? "audio" : "video", formatChange, timeChange); if (audio) { mSkipRenderingAudioUntilMediaTimeUs = -1; @@ -758,12 +758,12 @@ status_t NuPlayer::feedDecoderInputData(bool audio, const sp<AMessage> &msg) { } } while (dropAccessUnit); - // LOGV("returned a valid buffer of %s data", audio ? "audio" : "video"); + // ALOGV("returned a valid buffer of %s data", audio ? "audio" : "video"); #if 0 int64_t mediaTimeUs; CHECK(accessUnit->meta()->findInt64("timeUs", &mediaTimeUs)); - LOGV("feeding %s input buffer at media time %.2f secs", + ALOGV("feeding %s input buffer at media time %.2f secs", audio ? "audio" : "video", mediaTimeUs / 1E6); #endif @@ -775,7 +775,7 @@ status_t NuPlayer::feedDecoderInputData(bool audio, const sp<AMessage> &msg) { } void NuPlayer::renderBuffer(bool audio, const sp<AMessage> &msg) { - // LOGV("renderBuffer %s", audio ? "audio" : "video"); + // ALOGV("renderBuffer %s", audio ? "audio" : "video"); sp<AMessage> reply; CHECK(msg->findMessage("reply", &reply)); @@ -786,7 +786,7 @@ void NuPlayer::renderBuffer(bool audio, const sp<AMessage> &msg) { // so we don't want any output buffers it sent us (from before // we initiated the flush) to be stuck in the renderer's queue. - LOGV("we're still flushing the %s decoder, sending its output buffer" + ALOGV("we're still flushing the %s decoder, sending its output buffer" " right back.", audio ? "audio" : "video"); reply->post(); @@ -808,7 +808,7 @@ void NuPlayer::renderBuffer(bool audio, const sp<AMessage> &msg) { CHECK(buffer->meta()->findInt64("timeUs", &mediaTimeUs)); if (mediaTimeUs < skipUntilMediaTimeUs) { - LOGV("dropping %s buffer at time %lld as requested.", + ALOGV("dropping %s buffer at time %lld as requested.", audio ? "audio" : "video", mediaTimeUs); diff --git a/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp index 0cb7f45..3711eb4 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp +++ b/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp @@ -230,7 +230,7 @@ bool NuPlayer::Renderer::onDrainAudioQueue() { if (numFramesAvailableToWrite == mAudioSink->frameCount()) { LOGI("audio sink underrun"); } else { - LOGV("audio queue has %d frames left to play", + ALOGV("audio queue has %d frames left to play", mAudioSink->frameCount() - numFramesAvailableToWrite); } #endif @@ -255,7 +255,7 @@ bool NuPlayer::Renderer::onDrainAudioQueue() { int64_t mediaTimeUs; CHECK(entry->mBuffer->meta()->findInt64("timeUs", &mediaTimeUs)); - LOGV("rendering audio at media time %.2f secs", mediaTimeUs / 1E6); + ALOGV("rendering audio at media time %.2f secs", mediaTimeUs / 1E6); mAnchorTimeMediaUs = mediaTimeUs; @@ -376,9 +376,9 @@ void NuPlayer::Renderer::onDrainVideoQueue() { bool tooLate = (mVideoLateByUs > 40000); if (tooLate) { - LOGV("video late by %lld us (%.2f secs)", lateByUs, lateByUs / 1E6); + ALOGV("video late by %lld us (%.2f secs)", lateByUs, lateByUs / 1E6); } else { - LOGV("rendering video at media time %.2f secs", mediaTimeUs / 1E6); + ALOGV("rendering video at media time %.2f secs", mediaTimeUs / 1E6); } entry->mNotifyConsumed->setInt32("render", !tooLate); @@ -454,7 +454,7 @@ void NuPlayer::Renderer::onQueueBuffer(const sp<AMessage> &msg) { int64_t diff = firstVideoTimeUs - firstAudioTimeUs; - LOGV("queueDiff = %.2f secs", diff / 1E6); + ALOGV("queueDiff = %.2f secs", diff / 1E6); if (diff > 100000ll) { // Audio data starts More than 0.1 secs before video. @@ -628,7 +628,7 @@ void NuPlayer::Renderer::onPause() { mAudioSink->pause(); } - LOGV("now paused audio queue has %d entries, video has %d entries", + ALOGV("now paused audio queue has %d entries, video has %d entries", mAudioQueue.size(), mVideoQueue.size()); mPaused = true; diff --git a/media/libmediaplayerservice/nuplayer/RTSPSource.cpp b/media/libmediaplayerservice/nuplayer/RTSPSource.cpp index a3f2bf6..6d28298 100644 --- a/media/libmediaplayerservice/nuplayer/RTSPSource.cpp +++ b/media/libmediaplayerservice/nuplayer/RTSPSource.cpp @@ -242,7 +242,7 @@ void NuPlayer::RTSPSource::onMessageReceived(const sp<AMessage> &msg) { // playtime mapping. Assume the first packets correspond // to time 0. - LOGV("This is a live stream, assuming time = 0"); + ALOGV("This is a live stream, assuming time = 0"); info->mRTPTime = rtpTime; info->mNormalPlaytimeUs = 0ll; 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 dbc9b7e..ebf5fab 100644 --- a/media/libstagefright/ACodec.cpp +++ b/media/libstagefright/ACodec.cpp @@ -342,7 +342,7 @@ void ACodec::initiateSetup(const sp<AMessage> &msg) { } void ACodec::signalFlush() { - LOGV("[%s] signalFlush", mComponentName.c_str()); + ALOGV("[%s] signalFlush", mComponentName.c_str()); (new AMessage(kWhatFlush, id()))->post(); } @@ -375,7 +375,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"); @@ -504,7 +504,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); @@ -535,7 +535,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()); } @@ -565,7 +565,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( @@ -1114,7 +1114,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; @@ -1361,7 +1361,7 @@ bool ACodec::BaseState::onOMXMessage(const sp<AMessage> &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; @@ -1375,7 +1375,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 = @@ -1438,7 +1438,7 @@ void ACodec::BaseState::onInputBufferFilled(const sp<AMessage> &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(); @@ -1482,7 +1482,7 @@ void ACodec::BaseState::onInputBufferFilled(const sp<AMessage> &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()); } @@ -1491,10 +1491,10 @@ void ACodec::BaseState::onInputBufferFilled(const sp<AMessage> &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); } @@ -1512,15 +1512,15 @@ void ACodec::BaseState::onInputBufferFilled(const sp<AMessage> &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( @@ -1582,7 +1582,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; @@ -1603,7 +1603,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( @@ -1717,7 +1717,7 @@ void ACodec::BaseState::onOutputBufferDrained(const sp<AMessage> &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), @@ -1870,7 +1870,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) { @@ -1934,7 +1934,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<AMessage> &msg) { @@ -2001,7 +2001,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), @@ -2013,7 +2013,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; @@ -2031,7 +2031,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(); } @@ -2056,7 +2056,7 @@ bool ACodec::ExecutingState::onMessageReceived(const sp<AMessage> &msg) { case kWhatFlush: { - LOGV("[%s] ExecutingState flushing now " + ALOGV("[%s] ExecutingState flushing now " "(codec owns %d/%d input, %d/%d output).", mCodec->mComponentName.c_str(), mCodec->countBuffersOwnedByComponent(kPortIndexInput), @@ -2111,7 +2111,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); } @@ -2156,7 +2156,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); @@ -2173,7 +2173,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()); } @@ -2185,7 +2185,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()); @@ -2217,7 +2217,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()) { @@ -2272,7 +2272,7 @@ bool ACodec::ExecutingToIdleState::onMessageReceived(const sp<AMessage> &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; } @@ -2364,7 +2364,7 @@ bool ACodec::IdleToLoadedState::onMessageReceived(const sp<AMessage> &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( @@ -2375,7 +2375,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); @@ -2405,7 +2405,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; } @@ -2437,7 +2437,7 @@ bool ACodec::FlushingState::onMessageReceived(const sp<AMessage> &msg) { bool ACodec::FlushingState::onOMXEvent( OMX_EVENTTYPE event, OMX_U32 data1, OMX_U32 data2) { - LOGV("[%s] FlushingState onOMXEvent(%d,%ld)", + ALOGV("[%s] FlushingState onOMXEvent(%d,%ld)", mCodec->mComponentName.c_str(), event, data1); switch (event) { @@ -2473,7 +2473,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 815f987..142fa5b 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<MediaBuffer *>::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 50c264e..964cb1f 100644 --- a/media/libstagefright/AwesomePlayer.cpp +++ b/media/libstagefright/AwesomePlayer.cpp @@ -247,7 +247,7 @@ void AwesomePlayer::setListener(const wp<MediaPlayerBase> &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; @@ -360,7 +360,7 @@ status_t AwesomePlayer::setDataSource_l(const sp<MediaExtractor> &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; @@ -371,7 +371,7 @@ status_t AwesomePlayer::setDataSource_l(const sp<MediaExtractor> &extractor) { mBitrate = totalBitRate; - LOGV("mBitrate = %lld bits/sec", mBitrate); + ALOGV("mBitrate = %lld bits/sec", mBitrate); { Mutex::Autolock autoLock(mStatsLock); @@ -637,7 +637,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, @@ -665,7 +665,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 { @@ -701,7 +701,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(); } @@ -721,7 +721,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 { @@ -737,7 +737,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 @@ -757,7 +757,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(); } @@ -789,7 +789,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); @@ -820,7 +820,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 */); @@ -991,20 +991,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; } @@ -1170,7 +1170,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<ANativeWindow> &native) { @@ -1180,7 +1180,7 @@ status_t AwesomePlayer::setNativeWindow_l(const sp<ANativeWindow> &native) { return OK; } - LOGV("attempting to reconfigure to use new surface"); + ALOGV("attempting to reconfigure to use new surface"); bool wasPlaying = (mFlags & PLAYING) != 0; @@ -1317,7 +1317,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); @@ -1470,7 +1470,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 @@ -1534,7 +1534,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. @@ -1597,7 +1597,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, @@ -1613,7 +1613,7 @@ void AwesomePlayer::onVideoEvent() { CHECK(mVideoBuffer == NULL); if (err == INFO_FORMAT_CHANGED) { - LOGV("VideoSource signalled format change."); + ALOGV("VideoSource signalled format change."); notifyVideoSize_l(); @@ -1628,7 +1628,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); @@ -1745,13 +1745,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); @@ -2038,7 +2038,7 @@ status_t AwesomePlayer::finishSetDataSource_l() { break; } - LOGV("now cached %d bytes of data", cachedDataRemaining); + ALOGV("now cached %d bytes of data", cachedDataRemaining); if (metaDataSize < 0 && cachedDataRemaining >= kMinBytesForSniffing) { @@ -2063,7 +2063,7 @@ status_t AwesomePlayer::finishSetDataSource_l() { } CHECK_GE(metaDataSize, 0ll); - LOGV("metaDataSize = %lld bytes", metaDataSize); + ALOGV("metaDataSize = %lld bytes", metaDataSize); } usleep(200000); diff --git a/media/libstagefright/CameraSource.cpp b/media/libstagefright/CameraSource.cpp index 57989c5..927e122 100755 --- a/media/libstagefright/CameraSource.cpp +++ b/media/libstagefright/CameraSource.cpp @@ -63,12 +63,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<IMemory> &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<CameraSource> source = mSource.promote(); @@ -217,7 +217,7 @@ static bool isVideoSizeSupported( int32_t width, int32_t height, const Vector<Size>& supportedSizes) { - LOGV("isVideoSizeSupported"); + ALOGV("isVideoSizeSupported"); for (size_t i = 0; i < supportedSizes.size(); ++i) { if (width == supportedSizes[i].width && height == supportedSizes[i].height) { @@ -294,7 +294,7 @@ status_t CameraSource::configureCamera( CameraParameters* params, int32_t width, int32_t height, int32_t frameRate) { - LOGV("configureCamera"); + ALOGV("configureCamera"); Vector<Size> sizes; bool isSetVideoSizeSupportedByCamera = true; getSupportedVideoSizes(*params, &isSetVideoSizeSupportedByCamera, sizes); @@ -326,7 +326,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) { @@ -370,7 +370,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 @@ -422,7 +422,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); @@ -468,7 +468,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, @@ -485,7 +485,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) { @@ -558,7 +558,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. @@ -576,7 +576,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"); @@ -602,7 +602,7 @@ status_t CameraSource::start(MetaData *meta) { } void CameraSource::stopCameraRecording() { - LOGV("stopCameraRecording"); + ALOGV("stopCameraRecording"); if (mCameraFlags & FLAGS_HOT_CAMERA) { mCameraRecordingProxy->stopRecording(); } else { @@ -612,11 +612,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(); } @@ -675,7 +675,7 @@ status_t CameraSource::stop() { } void CameraSource::releaseRecordingFrame(const sp<IMemory>& frame) { - LOGV("releaseRecordingFrame"); + ALOGV("releaseRecordingFrame"); if (mCameraRecordingProxy != NULL) { mCameraRecordingProxy->releaseRecordingFrame(frame); } else if (mCamera != NULL) { @@ -704,7 +704,7 @@ void CameraSource::releaseOneRecordingFrame(const sp<IMemory>& frame) { } void CameraSource::signalBufferReturned(MediaBuffer *buffer) { - LOGV("signalBufferReturned: %p", buffer->data()); + ALOGV("signalBufferReturned: %p", buffer->data()); Mutex::Autolock autoLock(mLock); for (List<sp<IMemory> >::iterator it = mFramesBeingEncoded.begin(); it != mFramesBeingEncoded.end(); ++it) { @@ -723,7 +723,7 @@ void CameraSource::signalBufferReturned(MediaBuffer *buffer) { status_t CameraSource::read( MediaBuffer **buffer, const ReadOptions *options) { - LOGV("read"); + ALOGV("read"); *buffer = NULL; @@ -770,10 +770,10 @@ status_t CameraSource::read( void CameraSource::dataCallbackTimestamp(int64_t timestampUs, int32_t msgType, const sp<IMemory> &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; } @@ -812,13 +812,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 eb456f4..4f6c8d1 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<IMemory> CameraSourceTimeLapse::createIMemoryCopy( const sp<IMemory> &source_data) { - LOGV("createIMemoryCopy"); + ALOGV("createIMemoryCopy"); size_t source_size = source_data->size(); void* source_pointer = source_data->pointer(); @@ -227,7 +227,7 @@ sp<IMemory> 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; @@ -275,14 +275,14 @@ bool CameraSourceTimeLapse::skipFrameAndModifyTimeStamp(int64_t *timestampUs) { // Skip all frames from last encoded frame until // sufficient time (mTimeBetweenFrameCaptureUs) 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 mTimeBetweenFrameCaptureUs 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; @@ -293,7 +293,7 @@ bool CameraSourceTimeLapse::skipFrameAndModifyTimeStamp(int64_t *timestampUs) { void CameraSourceTimeLapse::dataCallbackTimestamp(int64_t timestampUs, int32_t msgType, const sp<IMemory> &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<AMessage> &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<AMessage> &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 f6b06c7..8b85cfd 100644 --- a/media/libstagefright/MPEG4Extractor.cpp +++ b/media/libstagefright/MPEG4Extractor.cpp @@ -683,7 +683,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 @@ -1417,7 +1417,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( @@ -1820,7 +1820,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); } @@ -1830,7 +1830,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); } @@ -2407,7 +2407,7 @@ static bool BetterSniffMPEG4( *meta = new AMessage; (*meta)->setInt64("meta-data-size", moovAtomEndOffset); - LOGV("found metadata size: %lld", moovAtomEndOffset); + ALOGV("found metadata size: %lld", moovAtomEndOffset); } return true; 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<MPEG4Writer *>(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 374ecf7..7b17d65 100644 --- a/media/libstagefright/MediaExtractor.cpp +++ b/media/libstagefright/MediaExtractor.cpp @@ -58,13 +58,13 @@ sp<MediaExtractor> 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<MediaSource> 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<MetaData> 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<AMessage> &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<HTTPBase *>(mSource.get())->disconnect(); } } @@ -393,7 +393,7 @@ void NuCachedSource2::onFetch() { } void NuCachedSource2::onRead(const sp<AMessage> &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 86b3fe4..f9f92d2 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<MediaSource> 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<MediaSource> 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<OMXCodec> codec = new OMXCodec( omx, node, quirks, flags, @@ -513,7 +513,7 @@ sp<MediaSource> OMXCodec::Create( return codec; } - LOGV("Failed to configure codec '%s'", componentName); + ALOGV("Failed to configure codec '%s'", componentName); } } @@ -600,7 +600,7 @@ status_t OMXCodec::parseAVCCodecSpecificData( } status_t OMXCodec::configureCodec(const sp<MetaData> &meta) { - LOGV("configureCodec protected=%d", + ALOGV("configureCodec protected=%d", (mFlags & kEnableGrallocUsageProtected) ? 1 : 0); if (!(mFlags & kIgnoreCodecSpecificData)) { @@ -904,7 +904,7 @@ static size_t getFrameSize( status_t OMXCodec::findTargetColorFormat( const sp<MetaData>& meta, OMX_COLOR_FORMATTYPE *colorFormat) { - LOGV("findTargetColorFormat"); + ALOGV("findTargetColorFormat"); CHECK(mIsEncoder); *colorFormat = OMX_COLOR_FormatYUV420SemiPlanar; @@ -924,7 +924,7 @@ status_t OMXCodec::findTargetColorFormat( status_t OMXCodec::isColorFormatSupported( OMX_COLOR_FORMATTYPE colorFormat, int portIndex) { - LOGV("isColorFormatSupported: %d", static_cast<int>(colorFormat)); + ALOGV("isColorFormatSupported: %d", static_cast<int>(colorFormat)); // Enumerate all the color formats supported by // the omx component to see whether the given @@ -1890,7 +1890,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) { @@ -2568,7 +2568,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) { @@ -3296,7 +3296,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; @@ -4466,14 +4466,14 @@ void OMXCodec::initOutputFormat(const sp<MetaData> &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<MetaData> &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 bf31947..9a66577 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 2505096..4345184 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 4491c97..2634da0 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<String8, String8> *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<MetaData> 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<MediaSource> 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<MetaData> 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 38daf72..9ab6552 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<ISurfaceComposer> 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<GraphicBuffer>* 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<GraphicBuffer>* 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) { @@ -384,7 +384,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) { @@ -425,7 +425,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) { @@ -457,7 +457,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; @@ -497,7 +497,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 { @@ -536,7 +536,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(); @@ -556,7 +556,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", @@ -572,7 +572,7 @@ void SurfaceMediaSource::cancelBuffer(int bufIndex) { } nsecs_t SurfaceMediaSource::getTimestamp() { - LOGV("SurfaceMediaSource::getTimestamp"); + ALOGV("SurfaceMediaSource::getTimestamp"); Mutex::Autolock lock(mMutex); return mCurrentTimestamp; } @@ -580,13 +580,13 @@ nsecs_t SurfaceMediaSource::getTimestamp() { void SurfaceMediaSource::setFrameAvailableListener( const sp<FrameAvailableListener>& 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; @@ -600,7 +600,7 @@ sp<GraphicBuffer> SurfaceMediaSource::getCurrentBuffer() const { int SurfaceMediaSource::query(int what, int* outValue) { - LOGV("query"); + ALOGV("query"); Mutex::Autolock lock(mMutex); int value; switch (what) { @@ -691,7 +691,7 @@ status_t SurfaceMediaSource::setFrameRate(int32_t fps) } bool SurfaceMediaSource::isMetaDataStoredInVideoBuffers() const { - LOGV("isMetaDataStoredInVideoBuffers"); + ALOGV("isMetaDataStoredInVideoBuffers"); return true; } @@ -702,7 +702,7 @@ int32_t SurfaceMediaSource::getFrameRate( ) const { status_t SurfaceMediaSource::start(MetaData *params) { - LOGV("started!"); + ALOGV("started!"); mStartTimeNs = 0; int64_t startTimeUs; @@ -716,7 +716,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? @@ -731,7 +731,7 @@ status_t SurfaceMediaSource::stop() sp<MetaData> SurfaceMediaSource::getFormat() { - LOGV("getFormat"); + ALOGV("getFormat"); Mutex::Autolock autoLock(mMutex); sp<MetaData> meta = new MetaData; @@ -753,20 +753,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; } @@ -787,7 +787,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); @@ -806,7 +806,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)); @@ -820,18 +820,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; } @@ -840,7 +840,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); @@ -858,7 +858,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> 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> 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<MediaSource> &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<MetaData> 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<MetaData> 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<MetaData>& 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<MetaData>& 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<MetaData>& 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<MetaData> 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 aa07e57..bedfc58 100644 --- a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp +++ b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp @@ -489,7 +489,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<MetaData>& 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<MetaData>& 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<MetaData> 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<ABuffer> *out) { if (bufferRemaining == 0) { bufferRemaining = 32768; - LOGV("increasing download buffer to %d bytes", + ALOGV("increasing download buffer to %d bytes", buffer->size() + bufferRemaining); sp<ABuffer> copy = new ABuffer(buffer->size() + bufferRemaining); @@ -321,7 +321,7 @@ sp<M3UParser> 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 6cec63a..da911e4 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; @@ -138,7 +138,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( @@ -188,18 +188,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); @@ -214,7 +214,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 @@ -230,17 +230,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); @@ -253,7 +253,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); @@ -428,7 +428,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); @@ -563,10 +563,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; @@ -575,10 +575,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 @@ -597,25 +597,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; @@ -633,7 +633,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; @@ -650,7 +650,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; } @@ -668,7 +668,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); @@ -718,7 +718,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); @@ -736,7 +736,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()); @@ -750,7 +750,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) { @@ -769,7 +769,7 @@ void ATSParser::Stream::onPayloadData( sp<MetaData> 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); @@ -846,18 +846,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)); @@ -872,7 +872,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)); @@ -881,7 +881,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) { @@ -931,7 +931,7 @@ status_t ATSParser::parsePID( } if (!handled) { - LOGV("PID 0x%04x not handled.", PID); + ALOGV("PID 0x%04x not handled.", PID); } return OK; @@ -945,7 +945,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); @@ -953,20 +953,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 f782ce5..d708ba6 100644 --- a/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp +++ b/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp @@ -143,7 +143,7 @@ void AnotherPacketSource::queueAccessUnit(const sp<ABuffer> &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<ABuffer> 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<ABuffer> 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<ABuffer> 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<ABuffer> 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 a089dbf..df30a9c 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<MetaData> 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<OMX_COMPONENTTYPE *>(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 328cadf..9d72b1f 100644 --- a/media/libstagefright/rtsp/AAMRAssembler.cpp +++ b/media/libstagefright/rtsp/AAMRAssembler.cpp @@ -127,7 +127,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; } @@ -138,7 +138,7 @@ ARTPAssembler::AssemblyStatus AAMRAssembler::addPacket( queue->erase(queue->begin()); ++mNextExpectedSeqNo; - LOGV("AMR packet too short."); + ALOGV("AMR packet too short."); return MALFORMED_PACKET; } @@ -156,7 +156,7 @@ ARTPAssembler::AssemblyStatus AAMRAssembler::addPacket( queue->erase(queue->begin()); ++mNextExpectedSeqNo; - LOGV("Unable to parse TOC."); + ALOGV("Unable to parse TOC."); return MALFORMED_PACKET; } @@ -170,7 +170,7 @@ ARTPAssembler::AssemblyStatus AAMRAssembler::addPacket( queue->erase(queue->begin()); ++mNextExpectedSeqNo; - LOGV("Illegal TOC entry."); + ALOGV("Illegal TOC entry."); return MALFORMED_PACKET; } @@ -197,7 +197,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<ABuffer> &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<ABuffer> &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<ABuffer> &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<ABuffer> &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<sp<ABuffer> >::iterator it = ++queue->begin(); while (it != queue->end()) { - LOGV("sequence length %d", totalCount); + ALOGV("sequence length %d", totalCount); const sp<ABuffer> &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<ABuffer> &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<sp<ABuffer> >::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<sp<ABuffer> >::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 cd374e2..c5d8740 100644 --- a/media/libstagefright/rtsp/ARTPConnection.cpp +++ b/media/libstagefright/rtsp/ARTPConnection.cpp @@ -336,7 +336,7 @@ void ARTPConnection::onPollStreams() { } if (buffer->size() > 0) { - LOGV("Sending RR..."); + ALOGV("Sending RR..."); ssize_t n; do { @@ -369,7 +369,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<ABuffer> &buffer) { buffer->setRange(buffer->offset(), buffer->size() + 20); - LOGV("Added FIR request."); + ALOGV("Added FIR request."); } void ARTPSource::addReceiverReport(const sp<ABuffer> &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<AMessage> &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 380b3dc..d8107bc 100644 --- a/media/libstagefright/rtsp/ARTSPConnection.cpp +++ b/media/libstagefright/rtsp/ARTSPConnection.cpp @@ -245,7 +245,7 @@ void ARTSPConnection::onConnect(const sp<AMessage> &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()); @@ -429,7 +429,7 @@ void ARTSPConnection::onSendRequest(const sp<AMessage> &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()) { @@ -669,7 +669,7 @@ bool ARTSPConnection::receiveRTSPReponse() { break; } - LOGV("line: '%s'", line.c_str()); + ALOGV("line: '%s'", line.c_str()); if (line.c_str()[0] == ' ' || line.c_str()[0] == '\t') { // Support for folded header values. 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 5a95f9c..21ef298 100644 --- a/media/libstagefright/rtsp/MyHandler.h +++ b/media/libstagefright/rtsp/MyHandler.h @@ -342,7 +342,7 @@ struct MyHandler : public AHandler { return false; } - LOGV("successfully poked holes."); + ALOGV("successfully poked holes."); return true; } @@ -840,7 +840,7 @@ struct MyHandler : public AHandler { CHECK(msg->findSize("track-index", &trackIndex)); if (trackIndex >= mTracks.size()) { - LOGV("late packets ignored."); + ALOGV("late packets ignored."); break; } @@ -863,12 +863,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; } @@ -981,7 +981,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."); } @@ -1092,7 +1092,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)); @@ -1116,7 +1116,7 @@ struct MyHandler : public AHandler { for (List<AString>::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)); @@ -1140,7 +1140,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); @@ -1272,7 +1272,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); @@ -1363,7 +1363,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)); @@ -1381,7 +1381,7 @@ private: void onAccessUnitComplete( int32_t trackIndex, const sp<ABuffer> &accessUnit) { - LOGV("onAccessUnitComplete track %d", trackIndex); + ALOGV("onAccessUnitComplete track %d", trackIndex); if (mFirstAccessUnit) { sp<AMessage> msg = mNotify->dup(); @@ -1404,7 +1404,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; } @@ -1443,11 +1443,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<DummyRecorder *>(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<SurfaceMediaSource> sms = new SurfaceMediaSource( getSurfaceWidth(), getSurfaceHeight()); sp<SurfaceTextureClient> 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<MediaRecorder> 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); diff --git a/media/mtp/MtpDevice.cpp b/media/mtp/MtpDevice.cpp index 2e86159..8a8d493 100644 --- a/media/mtp/MtpDevice.cpp +++ b/media/mtp/MtpDevice.cpp @@ -765,7 +765,7 @@ fail: } bool MtpDevice::sendRequest(MtpOperationCode operation) { - LOGV("sendRequest: %s\n", MtpDebug::getOperationCodeName(operation)); + ALOGV("sendRequest: %s\n", MtpDebug::getOperationCodeName(operation)); mReceivedResponse = false; mRequest.setOperationCode(operation); if (mTransactionID > 0) @@ -776,7 +776,7 @@ bool MtpDevice::sendRequest(MtpOperationCode operation) { } bool MtpDevice::sendData() { - LOGV("sendData\n"); + ALOGV("sendData\n"); mData.setOperationCode(mRequest.getOperationCode()); mData.setTransactionID(mRequest.getTransactionID()); int ret = mData.write(mRequestOut); @@ -787,7 +787,7 @@ bool MtpDevice::sendData() { bool MtpDevice::readData() { mData.reset(); int ret = mData.read(mRequestIn1); - LOGV("readData returned %d\n", ret); + ALOGV("readData returned %d\n", ret); if (ret >= MTP_CONTAINER_HEADER_SIZE) { if (mData.getContainerType() == MTP_CONTAINER_TYPE_RESPONSE) { LOGD("got response packet instead of data packet"); @@ -801,7 +801,7 @@ bool MtpDevice::readData() { return true; } else { - LOGV("readResponse failed\n"); + ALOGV("readResponse failed\n"); return false; } } @@ -813,7 +813,7 @@ bool MtpDevice::writeDataHeader(MtpOperationCode operation, int dataLength) { } MtpResponseCode MtpDevice::readResponse() { - LOGV("readResponse\n"); + ALOGV("readResponse\n"); if (mReceivedResponse) { mReceivedResponse = false; return mResponse.getResponseCode(); diff --git a/media/mtp/MtpDeviceInfo.cpp b/media/mtp/MtpDeviceInfo.cpp index 5a9322e..108e2b8 100644 --- a/media/mtp/MtpDeviceInfo.cpp +++ b/media/mtp/MtpDeviceInfo.cpp @@ -88,9 +88,9 @@ void MtpDeviceInfo::read(MtpDataPacket& packet) { } void MtpDeviceInfo::print() { - LOGV("Device Info:\n\tmStandardVersion: %d\n\tmVendorExtensionID: %d\n\tmVendorExtensionVersiony: %d\n", + ALOGV("Device Info:\n\tmStandardVersion: %d\n\tmVendorExtensionID: %d\n\tmVendorExtensionVersiony: %d\n", mStandardVersion, mVendorExtensionID, mVendorExtensionVersion); - LOGV("\tmVendorExtensionDesc: %s\n\tmFunctionalCode: %d\n\tmManufacturer: %s\n\tmModel: %s\n\tmVersion: %s\n\tmSerial: %s\n", + ALOGV("\tmVendorExtensionDesc: %s\n\tmFunctionalCode: %d\n\tmManufacturer: %s\n\tmModel: %s\n\tmVersion: %s\n\tmSerial: %s\n", mVendorExtensionDesc, mFunctionalCode, mManufacturer, mModel, mVersion, mSerial); } diff --git a/media/mtp/MtpPacket.cpp b/media/mtp/MtpPacket.cpp index baf99e5..39815d4 100644 --- a/media/mtp/MtpPacket.cpp +++ b/media/mtp/MtpPacket.cpp @@ -73,15 +73,15 @@ void MtpPacket::dump() { sprintf(bufptr, "%02X ", mBuffer[i]); bufptr += strlen(bufptr); if (i % DUMP_BYTES_PER_ROW == (DUMP_BYTES_PER_ROW - 1)) { - LOGV("%s", buffer); + ALOGV("%s", buffer); bufptr = buffer; } } if (bufptr != buffer) { // print last line - LOGV("%s", buffer); + ALOGV("%s", buffer); } - LOGV("\n"); + ALOGV("\n"); } void MtpPacket::copyFrom(const MtpPacket& src) { diff --git a/media/mtp/MtpServer.cpp b/media/mtp/MtpServer.cpp index 1dcfb74..1334e6c 100644 --- a/media/mtp/MtpServer.cpp +++ b/media/mtp/MtpServer.cpp @@ -153,12 +153,12 @@ bool MtpServer::hasStorage(MtpStorageID id) { void MtpServer::run() { int fd = mFD; - LOGV("MtpServer::run fd: %d\n", fd); + ALOGV("MtpServer::run fd: %d\n", fd); while (1) { int ret = mRequest.read(fd); if (ret < 0) { - LOGV("request read returned %d, errno: %d", ret, errno); + ALOGV("request read returned %d, errno: %d", ret, errno); if (errno == ECANCELED) { // return to top of loop and wait for next command continue; @@ -168,7 +168,7 @@ void MtpServer::run() { MtpOperationCode operation = mRequest.getOperationCode(); MtpTransactionID transaction = mRequest.getTransactionID(); - LOGV("operation: %s", MtpDebug::getOperationCodeName(operation)); + ALOGV("operation: %s", MtpDebug::getOperationCodeName(operation)); mRequest.dump(); // FIXME need to generalize this @@ -186,7 +186,7 @@ void MtpServer::run() { } break; } - LOGV("received data:"); + ALOGV("received data:"); mData.dump(); } else { mData.reset(); @@ -196,7 +196,7 @@ void MtpServer::run() { if (!dataIn && mData.hasData()) { mData.setOperationCode(operation); mData.setTransactionID(transaction); - LOGV("sending data:"); + ALOGV("sending data:"); mData.dump(); ret = mData.write(fd); if (ret < 0) { @@ -210,7 +210,7 @@ void MtpServer::run() { } mResponse.setTransactionID(transaction); - LOGV("sending response %04X", mResponse.getResponseCode()); + ALOGV("sending response %04X", mResponse.getResponseCode()); ret = mResponse.write(fd); mResponse.dump(); if (ret < 0) { @@ -222,7 +222,7 @@ void MtpServer::run() { break; } } else { - LOGV("skipping response\n"); + ALOGV("skipping response\n"); } } @@ -242,22 +242,22 @@ void MtpServer::run() { } void MtpServer::sendObjectAdded(MtpObjectHandle handle) { - LOGV("sendObjectAdded %d\n", handle); + ALOGV("sendObjectAdded %d\n", handle); sendEvent(MTP_EVENT_OBJECT_ADDED, handle); } void MtpServer::sendObjectRemoved(MtpObjectHandle handle) { - LOGV("sendObjectRemoved %d\n", handle); + ALOGV("sendObjectRemoved %d\n", handle); sendEvent(MTP_EVENT_OBJECT_REMOVED, handle); } void MtpServer::sendStoreAdded(MtpStorageID id) { - LOGV("sendStoreAdded %08X\n", id); + ALOGV("sendStoreAdded %08X\n", id); sendEvent(MTP_EVENT_STORE_ADDED, id); } void MtpServer::sendStoreRemoved(MtpStorageID id) { - LOGV("sendStoreRemoved %08X\n", id); + ALOGV("sendStoreRemoved %08X\n", id); sendEvent(MTP_EVENT_STORE_REMOVED, id); } @@ -267,7 +267,7 @@ void MtpServer::sendEvent(MtpEventCode code, uint32_t param1) { mEvent.setTransactionID(mRequest.getTransactionID()); mEvent.setParameter(1, param1); int ret = mEvent.write(mFD); - LOGV("mEvent.write returned %d\n", ret); + ALOGV("mEvent.write returned %d\n", ret); } } @@ -614,7 +614,7 @@ MtpResponseCode MtpServer::doGetObjectPropValue() { return MTP_RESPONSE_INVALID_OBJECT_HANDLE; MtpObjectHandle handle = mRequest.getParameter(1); MtpObjectProperty property = mRequest.getParameter(2); - LOGV("GetObjectPropValue %d %s\n", handle, + ALOGV("GetObjectPropValue %d %s\n", handle, MtpDebug::getObjectPropCodeName(property)); return mDatabase->getObjectPropertyValue(handle, property, mData); @@ -625,7 +625,7 @@ MtpResponseCode MtpServer::doSetObjectPropValue() { return MTP_RESPONSE_INVALID_OBJECT_HANDLE; MtpObjectHandle handle = mRequest.getParameter(1); MtpObjectProperty property = mRequest.getParameter(2); - LOGV("SetObjectPropValue %d %s\n", handle, + ALOGV("SetObjectPropValue %d %s\n", handle, MtpDebug::getObjectPropCodeName(property)); return mDatabase->setObjectPropertyValue(handle, property, mData); @@ -633,7 +633,7 @@ MtpResponseCode MtpServer::doSetObjectPropValue() { MtpResponseCode MtpServer::doGetDevicePropValue() { MtpDeviceProperty property = mRequest.getParameter(1); - LOGV("GetDevicePropValue %s\n", + ALOGV("GetDevicePropValue %s\n", MtpDebug::getDevicePropCodeName(property)); return mDatabase->getDevicePropertyValue(property, mData); @@ -641,7 +641,7 @@ MtpResponseCode MtpServer::doGetDevicePropValue() { MtpResponseCode MtpServer::doSetDevicePropValue() { MtpDeviceProperty property = mRequest.getParameter(1); - LOGV("SetDevicePropValue %s\n", + ALOGV("SetDevicePropValue %s\n", MtpDebug::getDevicePropCodeName(property)); return mDatabase->setDevicePropertyValue(property, mData); @@ -649,7 +649,7 @@ MtpResponseCode MtpServer::doSetDevicePropValue() { MtpResponseCode MtpServer::doResetDevicePropValue() { MtpDeviceProperty property = mRequest.getParameter(1); - LOGV("ResetDevicePropValue %s\n", + ALOGV("ResetDevicePropValue %s\n", MtpDebug::getDevicePropCodeName(property)); return mDatabase->resetDeviceProperty(property); @@ -665,7 +665,7 @@ MtpResponseCode MtpServer::doGetObjectPropList() { uint32_t property = mRequest.getParameter(3); int groupCode = mRequest.getParameter(4); int depth = mRequest.getParameter(5); - LOGV("GetObjectPropList %d format: %s property: %s group: %d depth: %d\n", + ALOGV("GetObjectPropList %d format: %s property: %s group: %d depth: %d\n", handle, MtpDebug::getFormatCodeName(format), MtpDebug::getObjectPropCodeName(property), groupCode, depth); @@ -736,7 +736,7 @@ MtpResponseCode MtpServer::doGetObject() { // then transfer the file int ret = ioctl(mFD, MTP_SEND_FILE_WITH_HEADER, (unsigned long)&mfr); - LOGV("MTP_SEND_FILE_WITH_HEADER returned %d\n", ret); + ALOGV("MTP_SEND_FILE_WITH_HEADER returned %d\n", ret); close(mfr.fd); if (ret < 0) { if (errno == ECANCELED) @@ -802,7 +802,7 @@ MtpResponseCode MtpServer::doGetPartialObject(MtpOperationCode operation) { // transfer the file int ret = ioctl(mFD, MTP_SEND_FILE_WITH_HEADER, (unsigned long)&mfr); - LOGV("MTP_SEND_FILE_WITH_HEADER returned %d\n", ret); + ALOGV("MTP_SEND_FILE_WITH_HEADER returned %d\n", ret); close(mfr.fd); if (ret < 0) { if (errno == ECANCELED) @@ -857,7 +857,7 @@ MtpResponseCode MtpServer::doSendObjectInfo() { mData.getString(modified); // date modified // keywords follow - LOGV("name: %s format: %04X\n", (const char *)name, format); + ALOGV("name: %s format: %04X\n", (const char *)name, format); time_t modifiedTime; if (!parseDateTime(modified, modifiedTime)) modifiedTime = 0; @@ -954,10 +954,10 @@ MtpResponseCode MtpServer::doSendObject() { mfr.length = mSendObjectFileSize - initialData; } - LOGV("receiving %s\n", (const char *)mSendObjectFilePath); + ALOGV("receiving %s\n", (const char *)mSendObjectFilePath); // transfer the file ret = ioctl(mFD, MTP_RECEIVE_FILE, (unsigned long)&mfr); - LOGV("MTP_RECEIVE_FILE returned %d\n", ret); + ALOGV("MTP_RECEIVE_FILE returned %d\n", ret); } close(mfr.fd); @@ -1052,7 +1052,7 @@ MtpResponseCode MtpServer::doDeleteObject() { int64_t fileLength; int result = mDatabase->getObjectFilePath(handle, filePath, fileLength, format); if (result == MTP_RESPONSE_OK) { - LOGV("deleting %s", (const char *)filePath); + ALOGV("deleting %s", (const char *)filePath); result = mDatabase->deleteFile(handle); // Don't delete the actual files unless the database deletion is allowed if (result == MTP_RESPONSE_OK) { @@ -1066,7 +1066,7 @@ MtpResponseCode MtpServer::doDeleteObject() { MtpResponseCode MtpServer::doGetObjectPropDesc() { MtpObjectProperty propCode = mRequest.getParameter(1); MtpObjectFormat format = mRequest.getParameter(2); - LOGV("GetObjectPropDesc %s %s\n", MtpDebug::getObjectPropCodeName(propCode), + ALOGV("GetObjectPropDesc %s %s\n", MtpDebug::getObjectPropCodeName(propCode), MtpDebug::getFormatCodeName(format)); MtpProperty* property = mDatabase->getObjectPropertyDesc(propCode, format); if (!property) @@ -1078,7 +1078,7 @@ MtpResponseCode MtpServer::doGetObjectPropDesc() { MtpResponseCode MtpServer::doGetDevicePropDesc() { MtpDeviceProperty propCode = mRequest.getParameter(1); - LOGV("GetDevicePropDesc %s\n", MtpDebug::getDevicePropCodeName(propCode)); + ALOGV("GetDevicePropDesc %s\n", MtpDebug::getDevicePropCodeName(propCode)); MtpProperty* property = mDatabase->getDevicePropertyDesc(propCode); if (!property) return MTP_RESPONSE_DEVICE_PROP_NOT_SUPPORTED; @@ -1109,7 +1109,7 @@ MtpResponseCode MtpServer::doSendPartialObject() { } const char* filePath = (const char *)edit->mPath; - LOGV("receiving partial %s %lld %lld\n", filePath, offset, length); + ALOGV("receiving partial %s %lld %lld\n", filePath, offset, length); // read the header, and possibly some data int ret = mData.read(mFD); @@ -1131,7 +1131,7 @@ MtpResponseCode MtpServer::doSendPartialObject() { // transfer the file ret = ioctl(mFD, MTP_RECEIVE_FILE, (unsigned long)&mfr); - LOGV("MTP_RECEIVE_FILE returned %d", ret); + ALOGV("MTP_RECEIVE_FILE returned %d", ret); } if (ret < 0) { mResponse.setParameter(1, 0); diff --git a/media/mtp/MtpStorage.cpp b/media/mtp/MtpStorage.cpp index 941e303..d77ca72 100644 --- a/media/mtp/MtpStorage.cpp +++ b/media/mtp/MtpStorage.cpp @@ -43,7 +43,7 @@ MtpStorage::MtpStorage(MtpStorageID id, const char* filePath, mReserveSpace(reserveSpace), mRemovable(removable) { - LOGV("MtpStorage id: %d path: %s\n", id, filePath); + ALOGV("MtpStorage id: %d path: %s\n", id, filePath); } MtpStorage::~MtpStorage() { |