summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
Diffstat (limited to 'media')
-rw-r--r--media/libeffects/factory/EffectsFactory.c44
-rw-r--r--media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp672
-rwxr-xr-xmedia/libeffects/lvm/wrapper/Reverb/EffectReverb.cpp438
-rwxr-xr-xmedia/libeffects/preprocessing/PreProcessing.cpp136
-rw-r--r--media/libeffects/testlibs/AudioEqualizer.cpp26
-rw-r--r--media/libeffects/testlibs/EffectEqualizer.cpp60
-rw-r--r--media/libeffects/testlibs/EffectReverb.c126
-rw-r--r--media/libeffects/visualizer/EffectVisualizer.cpp26
-rw-r--r--media/libmedia/AudioEffect.cpp34
-rw-r--r--media/libmedia/AudioParameter.cpp2
-rw-r--r--media/libmedia/AudioRecord.cpp44
-rw-r--r--media/libmedia/AudioSystem.cpp44
-rw-r--r--media/libmedia/AudioTrack.cpp86
-rw-r--r--media/libmedia/IAudioFlinger.cpp10
-rw-r--r--media/libmedia/IAudioFlingerClient.cpp4
-rw-r--r--media/libmedia/IAudioRecord.cpp2
-rw-r--r--media/libmedia/IAudioTrack.cpp4
-rw-r--r--media/libmedia/IEffect.cpp16
-rw-r--r--media/libmedia/IEffectClient.cpp12
-rw-r--r--media/libmedia/IMediaDeathNotifier.cpp14
-rw-r--r--media/libmedia/IMediaMetadataRetriever.cpp4
-rw-r--r--media/libmedia/IMediaRecorder.cpp88
-rw-r--r--media/libmedia/IOMX.cpp2
-rw-r--r--media/libmedia/JetPlayer.cpp62
-rw-r--r--media/libmedia/MediaProfiles.cpp114
-rw-r--r--media/libmedia/MediaScanner.cpp8
-rw-r--r--media/libmedia/MediaScannerClient.cpp6
-rw-r--r--media/libmedia/Metadata.cpp4
-rw-r--r--media/libmedia/ToneGenerator.cpp100
-rw-r--r--media/libmedia/Visualizer.cpp22
-rw-r--r--media/libmedia/mediametadataretriever.cpp42
-rw-r--r--media/libmedia/mediaplayer.cpp158
-rw-r--r--media/libmedia/mediarecorder.cpp212
-rw-r--r--media/libmediaplayerservice/MediaPlayerService.cpp224
-rw-r--r--media/libmediaplayerservice/MediaRecorderClient.cpp92
-rw-r--r--media/libmediaplayerservice/MetadataRetrieverClient.cpp62
-rw-r--r--media/libmediaplayerservice/MidiFile.cpp90
-rw-r--r--media/libmediaplayerservice/MidiMetadataRetriever.cpp16
-rw-r--r--media/libmediaplayerservice/StagefrightPlayer.cpp34
-rw-r--r--media/libmediaplayerservice/StagefrightRecorder.cpp216
-rw-r--r--media/libmediaplayerservice/TestPlayerStub.cpp8
-rw-r--r--media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp6
-rw-r--r--media/libmediaplayerservice/nuplayer/NuPlayer.cpp60
-rw-r--r--media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp16
-rw-r--r--media/libmediaplayerservice/nuplayer/RTSPSource.cpp4
-rw-r--r--media/libmediaplayerservice/nuplayer/StreamingSource.cpp6
-rw-r--r--media/libstagefright/AACWriter.cpp12
-rw-r--r--media/libstagefright/ACodec.cpp100
-rw-r--r--media/libstagefright/AMRExtractor.cpp4
-rw-r--r--media/libstagefright/AMRWriter.cpp2
-rw-r--r--media/libstagefright/AVIExtractor.cpp14
-rw-r--r--media/libstagefright/AudioPlayer.cpp12
-rw-r--r--media/libstagefright/AudioSource.cpp20
-rw-r--r--media/libstagefright/AwesomePlayer.cpp88
-rwxr-xr-xmedia/libstagefright/CameraSource.cpp82
-rw-r--r--media/libstagefright/CameraSourceTimeLapse.cpp38
-rw-r--r--media/libstagefright/DRMExtractor.cpp2
-rw-r--r--media/libstagefright/ESDS.cpp4
-rw-r--r--media/libstagefright/FLACExtractor.cpp52
-rw-r--r--media/libstagefright/FileSource.cpp2
-rw-r--r--media/libstagefright/HTTPBase.cpp8
-rw-r--r--media/libstagefright/MP3Extractor.cpp18
-rw-r--r--media/libstagefright/MPEG2TSWriter.cpp6
-rw-r--r--media/libstagefright/MPEG4Extractor.cpp28
-rwxr-xr-xmedia/libstagefright/MPEG4Writer.cpp134
-rw-r--r--media/libstagefright/MediaBuffer.cpp2
-rw-r--r--media/libstagefright/MediaExtractor.cpp4
-rw-r--r--media/libstagefright/MediaSourceSplitter.cpp12
-rw-r--r--media/libstagefright/NuCachedSource2.cpp44
-rwxr-xr-xmedia/libstagefright/OMXCodec.cpp104
-rw-r--r--media/libstagefright/OggExtractor.cpp48
-rw-r--r--media/libstagefright/SampleIterator.cpp10
-rw-r--r--media/libstagefright/SampleTable.cpp6
-rw-r--r--media/libstagefright/StagefrightMediaScanner.cpp6
-rw-r--r--media/libstagefright/StagefrightMetadataRetriever.cpp42
-rw-r--r--media/libstagefright/SurfaceMediaSource.cpp94
-rw-r--r--media/libstagefright/TimedEventQueue.cpp6
-rw-r--r--media/libstagefright/VBRISeeker.cpp10
-rw-r--r--media/libstagefright/VideoSourceDownSampler.cpp12
-rw-r--r--media/libstagefright/WAVExtractor.cpp6
-rw-r--r--media/libstagefright/WVMExtractor.cpp4
-rw-r--r--media/libstagefright/avc_utils.cpp6
-rw-r--r--media/libstagefright/codecs/aacdec/SoftAAC.cpp14
-rw-r--r--media/libstagefright/codecs/aacenc/AACEncoder.cpp20
-rw-r--r--media/libstagefright/codecs/aacenc/basic_op/oper_32b.c2
-rw-r--r--media/libstagefright/codecs/aacenc/inc/config.h2
-rw-r--r--media/libstagefright/codecs/aacenc/inc/sf_estim.h2
-rw-r--r--media/libstagefright/codecs/aacenc/inc/transform.h2
-rw-r--r--media/libstagefright/codecs/aacenc/src/aac_rom.c2
-rw-r--r--media/libstagefright/codecs/aacenc/src/aacenc.c2
-rw-r--r--media/libstagefright/codecs/aacenc/src/adj_thr.c2
-rw-r--r--media/libstagefright/codecs/aacenc/src/asm/ARMV5E/PrePostMDCT_v5.s2
-rw-r--r--media/libstagefright/codecs/aacenc/src/asm/ARMV5E/R4R8First_v5.s2
-rw-r--r--media/libstagefright/codecs/aacenc/src/asm/ARMV5E/Radix4FFT_v5.s2
-rw-r--r--media/libstagefright/codecs/aacenc/src/asm/ARMV7/PrePostMDCT_v7.s2
-rw-r--r--media/libstagefright/codecs/aacenc/src/asm/ARMV7/R4R8First_v7.s2
-rw-r--r--media/libstagefright/codecs/aacenc/src/asm/ARMV7/Radix4FFT_v7.s2
-rw-r--r--media/libstagefright/codecs/aacenc/src/band_nrg.c2
-rw-r--r--media/libstagefright/codecs/amrnb/dec/SoftAMR.cpp2
-rw-r--r--media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp6
-rw-r--r--media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp14
-rw-r--r--media/libstagefright/codecs/avc/enc/AVCEncoder.cpp40
-rw-r--r--media/libstagefright/codecs/g711/dec/SoftG711.cpp2
-rw-r--r--media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp8
-rw-r--r--media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp52
-rw-r--r--media/libstagefright/codecs/mp3dec/SoftMP3.cpp6
-rw-r--r--media/libstagefright/codecs/on2/dec/SoftVPX.cpp6
-rw-r--r--media/libstagefright/codecs/on2/h264dec/SoftAVC.cpp4
-rw-r--r--media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp6
-rw-r--r--media/libstagefright/colorconversion/SoftwareRenderer.cpp4
-rw-r--r--media/libstagefright/foundation/AHierarchicalStateMachine.cpp2
-rw-r--r--media/libstagefright/foundation/ALooperRoster.cpp8
-rw-r--r--media/libstagefright/foundation/AMessage.cpp4
-rw-r--r--media/libstagefright/foundation/hexdump.cpp2
-rw-r--r--media/libstagefright/httplive/LiveDataSource.cpp4
-rw-r--r--media/libstagefright/httplive/LiveSession.cpp52
-rw-r--r--media/libstagefright/httplive/M3UParser.cpp12
-rw-r--r--media/libstagefright/id3/ID3.cpp14
-rw-r--r--media/libstagefright/matroska/MatroskaExtractor.cpp18
-rw-r--r--media/libstagefright/mpeg2ts/ATSParser.cpp98
-rw-r--r--media/libstagefright/mpeg2ts/AnotherPacketSource.cpp2
-rw-r--r--media/libstagefright/mpeg2ts/ESQueue.cpp28
-rw-r--r--media/libstagefright/mpeg2ts/MPEG2PSExtractor.cpp36
-rw-r--r--media/libstagefright/mpeg2ts/MPEG2TSExtractor.cpp2
-rw-r--r--media/libstagefright/omx/OMX.cpp10
-rw-r--r--media/libstagefright/omx/OMXMaster.cpp4
-rw-r--r--media/libstagefright/omx/OMXNodeInstance.cpp48
-rw-r--r--media/libstagefright/omx/SimpleSoftOMXComponent.cpp4
-rw-r--r--media/libstagefright/omx/SoftOMXPlugin.cpp4
-rw-r--r--media/libstagefright/omx/tests/OMXHarness.cpp16
-rw-r--r--media/libstagefright/rtsp/AAMRAssembler.cpp10
-rw-r--r--media/libstagefright/rtsp/AAVCAssembler.cpp34
-rw-r--r--media/libstagefright/rtsp/AMPEG4AudioAssembler.cpp6
-rw-r--r--media/libstagefright/rtsp/AMPEG4ElementaryAssembler.cpp6
-rw-r--r--media/libstagefright/rtsp/APacketSource.cpp4
-rw-r--r--media/libstagefright/rtsp/ARTPConnection.cpp14
-rw-r--r--media/libstagefright/rtsp/ARTPSession.cpp14
-rw-r--r--media/libstagefright/rtsp/ARTPSource.cpp8
-rw-r--r--media/libstagefright/rtsp/ARTPWriter.cpp6
-rw-r--r--media/libstagefright/rtsp/ARTSPConnection.cpp32
-rw-r--r--media/libstagefright/rtsp/ARawAudioAssembler.cpp4
-rw-r--r--media/libstagefright/rtsp/ASessionDescription.cpp8
-rw-r--r--media/libstagefright/rtsp/MyHandler.h92
-rw-r--r--media/libstagefright/rtsp/UDPPusher.cpp8
-rw-r--r--media/libstagefright/rtsp/rtp_test.cpp2
-rw-r--r--media/libstagefright/tests/DummyRecorder.cpp14
-rw-r--r--media/libstagefright/tests/SurfaceMediaSource_test.cpp78
-rw-r--r--media/libstagefright/timedtext/TimedTextPlayer.cpp2
-rw-r--r--media/libstagefright/yuv/YUVImage.cpp8
-rw-r--r--media/mediaserver/main_mediaserver.cpp2
-rw-r--r--media/mtp/MtpDataPacket.cpp2
-rw-r--r--media/mtp/MtpDevice.cpp50
-rw-r--r--media/mtp/MtpDeviceInfo.cpp4
-rw-r--r--media/mtp/MtpObjectInfo.cpp14
-rw-r--r--media/mtp/MtpPacket.cpp14
-rw-r--r--media/mtp/MtpProperty.cpp32
-rw-r--r--media/mtp/MtpServer.cpp92
-rw-r--r--media/mtp/MtpStorage.cpp2
-rw-r--r--media/mtp/MtpStorageInfo.cpp6
159 files changed, 2823 insertions, 2823 deletions
diff --git a/media/libeffects/factory/EffectsFactory.c b/media/libeffects/factory/EffectsFactory.c
index d333510..9f6599f 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]);
@@ -279,7 +279,7 @@ int EffectCreate(effect_uuid_t *uuid, int32_t sessionId, int32_t ioId, effect_ha
ret = init();
if (ret < 0) {
- LOGW("EffectCreate() init error: %d", ret);
+ ALOGW("EffectCreate() init error: %d", ret);
return ret;
}
@@ -293,7 +293,7 @@ int EffectCreate(effect_uuid_t *uuid, int32_t sessionId, int32_t ioId, effect_ha
// create effect in library
ret = l->desc->create_effect(uuid, sessionId, ioId, &itfe);
if (ret != 0) {
- LOGW("EffectCreate() library %s: could not create fx %s, error %d", l->name, d->name, ret);
+ ALOGW("EffectCreate() library %s: could not create fx %s, error %d", l->name, d->name, ret);
goto exit;
}
@@ -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);
@@ -359,7 +359,7 @@ int EffectRelease(effect_handle_t handle)
// release effect in library
if (fx->lib == NULL) {
- LOGW("EffectRelease() fx %p library already unloaded", handle);
+ ALOGW("EffectRelease() fx %p library already unloaded", handle);
} else {
pthread_mutex_lock(&fx->lib->lock);
fx->lib->desc->release_effect(fx->subItfe);
@@ -401,7 +401,7 @@ int init() {
updateNumEffects();
gInitDone = 1;
- LOGV("init() done");
+ ALOGV("init() done");
return 0;
}
@@ -456,24 +456,24 @@ int loadLibrary(cnode *root, const char *name)
hdl = dlopen(node->value, RTLD_NOW);
if (hdl == NULL) {
- LOGW("loadLibrary() failed to open %s", node->value);
+ ALOGW("loadLibrary() failed to open %s", node->value);
goto error;
}
desc = (audio_effect_library_t *)dlsym(hdl, AUDIO_EFFECT_LIBRARY_INFO_SYM_AS_STR);
if (desc == NULL) {
- LOGW("loadLibrary() could not find symbol %s", AUDIO_EFFECT_LIBRARY_INFO_SYM_AS_STR);
+ ALOGW("loadLibrary() could not find symbol %s", AUDIO_EFFECT_LIBRARY_INFO_SYM_AS_STR);
goto error;
}
if (AUDIO_EFFECT_LIBRARY_TAG != desc->tag) {
- LOGW("getLibrary() bad tag %08x in lib info struct", desc->tag);
+ ALOGW("getLibrary() bad tag %08x in lib info struct", desc->tag);
goto error;
}
if (EFFECT_API_VERSION_MAJOR(desc->version) !=
EFFECT_API_VERSION_MAJOR(EFFECT_LIBRARY_API_VERSION)) {
- LOGW("loadLibrary() bad lib version %08x", desc->version);
+ ALOGW("loadLibrary() bad lib version %08x", desc->version);
goto error;
}
@@ -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;
@@ -534,7 +534,7 @@ int loadEffect(cnode *root)
l = getLibrary(node->value);
if (l == NULL) {
- LOGW("loadEffect() could not get library %s", node->value);
+ ALOGW("loadEffect() could not get library %s", node->value);
return -EINVAL;
}
@@ -543,7 +543,7 @@ int loadEffect(cnode *root)
return -EINVAL;
}
if (stringToUuid(node->value, &uuid) != 0) {
- LOGW("loadEffect() invalid uuid %s", node->value);
+ ALOGW("loadEffect() invalid uuid %s", node->value);
return -EINVAL;
}
@@ -551,18 +551,18 @@ int loadEffect(cnode *root)
if (l->desc->get_descriptor(&uuid, d) != 0) {
char s[40];
uuidToString(&uuid, s, 40);
- LOGW("Error querying effect %s on lib %s", s, l->name);
+ ALOGW("Error querying effect %s on lib %s", s, l->name);
free(d);
return -EINVAL;
}
#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)) {
- LOGW("Bad API version %08x on lib %s", d->apiVersion, l->name);
+ ALOGW("Bad API version %08x on lib %s", d->apiVersion, l->name);
free(d);
return -EINVAL;
}
@@ -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..6267d1d 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,9 +238,9 @@ 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");
+ ALOGW("AgcCreate Error");
return -ENOMEM;
}
effect->engine = static_cast<preproc_fx_handle_t>(agc);
@@ -280,7 +280,7 @@ int AgcGetParameter(preproc_effect_t *effect,
break;
default:
- LOGW("AgcGetParameter() unknown param %08x", param);
+ ALOGW("AgcGetParameter() unknown param %08x", param);
status = -EINVAL;
break;
}
@@ -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:
@@ -305,7 +305,7 @@ int AgcGetParameter(preproc_effect_t *effect,
pProperties->limiterEnabled = (bool)agc->is_limiter_enabled();
break;
default:
- LOGW("AgcGetParameter() unknown param %d", param);
+ ALOGW("AgcGetParameter() unknown param %d", param);
status = -EINVAL;
break;
}
@@ -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);
@@ -344,12 +344,12 @@ int AgcSetParameter (preproc_effect_t *effect, void *pParam, void *pValue)
status = agc->enable_limiter(pProperties->limiterEnabled);
break;
default:
- LOGW("AgcSetParameter() unknown param %08x value %08x", param, *(uint32_t *)pValue);
+ ALOGW("AgcSetParameter() unknown param %08x value %08x", param, *(uint32_t *)pValue);
status = -EINVAL;
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,9 +401,9 @@ 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");
+ ALOGW("AgcCreate Error");
return -ENOMEM;
}
effect->engine = static_cast<preproc_fx_handle_t>(aec);
@@ -426,10 +426,10 @@ 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);
+ ALOGW("AecGetParameter() unknown param %08x value %08x", param, *(uint32_t *)pValue);
status = -EINVAL;
break;
}
@@ -446,10 +446,10 @@ 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);
+ ALOGW("AecSetParameter() unknown param %08x value %08x", param, *(uint32_t *)pValue);
status = -EINVAL;
break;
}
@@ -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,9 +520,9 @@ 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");
+ ALOGW("AgcCreate Error");
return -ENOMEM;
}
effect->engine = static_cast<preproc_fx_handle_t>(ns);
@@ -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) {
@@ -616,7 +616,7 @@ int Effect_SetState(preproc_effect_t *effect, uint32_t state)
case PREPROC_EFFECT_STATE_CREATED:
case PREPROC_EFFECT_STATE_ACTIVE:
case PREPROC_EFFECT_STATE_CONFIG:
- LOGE("Effect_SetState invalid transition");
+ ALOGE("Effect_SetState invalid transition");
status = -ENOSYS;
break;
default:
@@ -626,7 +626,7 @@ int Effect_SetState(preproc_effect_t *effect, uint32_t state)
case PREPROC_EFFECT_STATE_CONFIG:
switch(effect->state) {
case PREPROC_EFFECT_STATE_INIT:
- LOGE("Effect_SetState invalid transition");
+ ALOGE("Effect_SetState invalid transition");
status = -ENOSYS;
break;
case PREPROC_EFFECT_STATE_ACTIVE:
@@ -645,7 +645,7 @@ int Effect_SetState(preproc_effect_t *effect, uint32_t state)
case PREPROC_EFFECT_STATE_INIT:
case PREPROC_EFFECT_STATE_CREATED:
case PREPROC_EFFECT_STATE_ACTIVE:
- LOGE("Effect_SetState invalid transition");
+ ALOGE("Effect_SetState invalid transition");
status = -ENOSYS;
break;
case PREPROC_EFFECT_STATE_CONFIG:
@@ -725,12 +725,12 @@ 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);
if (session->apm == NULL) {
- LOGW("Session_CreateEffect could not get apm engine");
+ ALOGW("Session_CreateEffect could not get apm engine");
goto error;
}
session->apm->set_sample_rate_hz(kPreprocDefaultSr);
@@ -738,12 +738,12 @@ extern "C" int Session_CreateEffect(preproc_session_t *session,
session->apm->set_num_reverse_channels(kPreProcDefaultCnl);
session->procFrame = new webrtc::AudioFrame();
if (session->procFrame == NULL) {
- LOGW("Session_CreateEffect could not allocate audio frame");
+ ALOGW("Session_CreateEffect could not allocate audio frame");
goto error;
}
session->revFrame = new webrtc::AudioFrame();
if (session->revFrame == NULL) {
- LOGW("Session_CreateEffect could not allocate reverse audio frame");
+ ALOGW("Session_CreateEffect could not allocate reverse audio frame");
goto error;
}
session->apmSamplingRate = kPreprocDefaultSr;
@@ -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;
@@ -794,7 +794,7 @@ error:
int Session_ReleaseEffect(preproc_session_t *session,
preproc_effect_t *fx)
{
- LOGW_IF(Effect_Release(fx) != 0, " Effect_Release() failed for proc ID %d", fx->procId);
+ ALOGW_IF(Effect_Release(fx) != 0, " Effect_Release() failed for proc ID %d", fx->procId);
session->createdMsk &= ~(1<<fx->procId);
if (session->createdMsk == 0) {
webrtc::AudioProcessing::Destroy(session->apm);
@@ -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;
@@ -904,7 +904,7 @@ int Session_SetConfig(preproc_session_t *session, effect_config_t *config)
RESAMPLER_QUALITY,
&error);
if (session->inResampler == NULL) {
- LOGW("Session_SetConfig Cannot create speex resampler: %s",
+ ALOGW("Session_SetConfig Cannot create speex resampler: %s",
speex_resampler_strerror(error));
return -EINVAL;
}
@@ -914,7 +914,7 @@ int Session_SetConfig(preproc_session_t *session, effect_config_t *config)
RESAMPLER_QUALITY,
&error);
if (session->outResampler == NULL) {
- LOGW("Session_SetConfig Cannot create speex resampler: %s",
+ ALOGW("Session_SetConfig Cannot create speex resampler: %s",
speex_resampler_strerror(error));
speex_resampler_destroy(session->inResampler);
session->inResampler = NULL;
@@ -926,7 +926,7 @@ int Session_SetConfig(preproc_session_t *session, effect_config_t *config)
RESAMPLER_QUALITY,
&error);
if (session->revResampler == NULL) {
- LOGW("Session_SetConfig Cannot create speex resampler: %s",
+ ALOGW("Session_SetConfig Cannot create speex resampler: %s",
speex_resampler_strerror(error));
speex_resampler_destroy(session->inResampler);
session->inResampler = NULL;
@@ -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,20 +1074,20 @@ 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;
if (inBuffer == NULL || inBuffer->raw == NULL ||
outBuffer == NULL || outBuffer->raw == NULL){
- LOGW("PreProcessingFx_Process() ERROR bad pointer");
+ ALOGW("PreProcessingFx_Process() ERROR bad pointer");
return -EINVAL;
}
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;
}
@@ -1398,19 +1398,19 @@ int PreProcessingFx_ProcessReverse(effect_handle_t self,
int status = 0;
if (effect == NULL){
- LOGW("PreProcessingFx_ProcessReverse() ERROR effect == NULL");
+ ALOGW("PreProcessingFx_ProcessReverse() ERROR effect == NULL");
return -EINVAL;
}
preproc_session_t * session = (preproc_session_t *)effect->session;
if (inBuffer == NULL || inBuffer->raw == NULL){
- LOGW("PreProcessingFx_ProcessReverse() ERROR bad pointer");
+ ALOGW("PreProcessingFx_ProcessReverse() ERROR bad pointer");
return -EINVAL;
}
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;
@@ -1540,14 +1540,14 @@ int PreProcessingLib_Create(effect_uuid_t *uuid,
}
desc = PreProc_GetDescriptor(uuid);
if (desc == NULL) {
- LOGW("EffectCreate: fx not found uuid: %08x", uuid->timeLow);
+ ALOGW("EffectCreate: fx not found uuid: %08x", uuid->timeLow);
return -EINVAL;
}
procId = UuidToProcId(&desc->type);
session = PreProc_GetSession(procId, sessionId, ioId);
if (session == NULL) {
- LOGW("EffectCreate: no more session available");
+ ALOGW("EffectCreate: no more session available");
return -EINVAL;
}
@@ -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..43f34de 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;
@@ -165,7 +165,7 @@ extern "C" int EffectCreate(effect_uuid_t *uuid,
ret = Equalizer_init(pContext);
if (ret < 0) {
- LOGW("EffectLibCreateEffect() init failed");
+ ALOGW("EffectLibCreateEffect() init failed");
delete pContext;
return ret;
}
@@ -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:
@@ -710,7 +710,7 @@ extern "C" int Equalizer_command(effect_handle_t self, uint32_t cmdCode, uint32_
case EFFECT_CMD_SET_AUDIO_MODE:
break;
default:
- LOGW("Equalizer_command invalid command %d",cmdCode);
+ ALOGW("Equalizer_command invalid command %d",cmdCode);
return -EINVAL;
}
@@ -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..d22868a 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;
@@ -154,7 +154,7 @@ int EffectCreate(effect_uuid_t *uuid,
}
ret = Reverb_Init(module, aux, preset);
if (ret < 0) {
- LOGW("EffectLibCreateEffect() init failed");
+ ALOGW("EffectLibCreateEffect() init failed");
free(module);
return ret;
}
@@ -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,17 +389,17 @@ 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);
+ ALOGW("Reverb_Command invalid command %d",cmdCode);
return -EINVAL;
}
@@ -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..c441710 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;
@@ -192,7 +192,7 @@ int VisualizerLib_Create(effect_uuid_t *uuid,
ret = Visualizer_init(pContext);
if (ret < 0) {
- LOGW("VisualizerLib_Create() init failed");
+ ALOGW("VisualizerLib_Create() init failed");
delete pContext;
return ret;
}
@@ -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;
}
@@ -445,7 +445,7 @@ int Visualizer_command(effect_handle_t self, uint32_t cmdCode, uint32_t cmdSize,
break;
default:
- LOGW("Visualizer_command invalid command %d",cmdCode);
+ ALOGW("Visualizer_command invalid command %d",cmdCode);
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..6639d06 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,21 +98,21 @@ 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");
+ ALOGW("Effect already in use");
return INVALID_OPERATION;
}
const sp<IAudioFlinger>& audioFlinger = AudioSystem::get_audio_flinger();
if (audioFlinger == 0) {
- LOGE("set(): Could not get audioflinger");
+ ALOGE("set(): Could not get audioflinger");
return NO_INIT;
}
if (type == NULL && uuid == NULL) {
- LOGW("Must specify at least type or uuid");
+ ALOGW("Must specify at least type or uuid");
return BAD_VALUE;
}
@@ -138,7 +138,7 @@ status_t AudioEffect::set(const effect_uuid_t *type,
mIEffectClient, priority, io, mSessionId, &mStatus, &mId, &enabled);
if (iEffect == 0 || (mStatus != NO_ERROR && mStatus != ALREADY_EXISTS)) {
- LOGE("set(): AudioFlinger could not create effect, status: %d", mStatus);
+ ALOGE("set(): AudioFlinger could not create effect, status: %d", mStatus);
return mStatus;
}
@@ -148,7 +148,7 @@ status_t AudioEffect::set(const effect_uuid_t *type,
cblk = iEffect->getCblk();
if (cblk == 0) {
mStatus = NO_INIT;
- LOGE("Could not get control block");
+ ALOGE("Could not get control block");
return mStatus;
}
@@ -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, &param->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;
@@ -340,7 +340,7 @@ status_t AudioEffect::getParameter(effect_param_t *param)
void AudioEffect::binderDied()
{
- LOGW("IEffect died");
+ ALOGW("IEffect died");
mStatus = NO_INIT;
if (mCbf) {
status_t status = DEAD_OBJECT;
@@ -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..34a5eb7 100644
--- a/media/libmedia/AudioRecord.cpp
+++ b/media/libmedia/AudioRecord.cpp
@@ -56,12 +56,12 @@ status_t AudioRecord::getMinFrameCount(
size_t size = 0;
if (AudioSystem::getInputBufferSize(sampleRate, format, channelCount, &size)
!= NO_ERROR) {
- LOGE("AudioSystem could not query the input buffer size.");
+ ALOGE("AudioSystem could not query the input buffer size.");
return NO_INIT;
}
if (size == 0) {
- LOGE("Unsupported configuration: sampleRate %d, format %d, channelCount %d",
+ ALOGE("Unsupported configuration: sampleRate %d, format %d, channelCount %d",
sampleRate, format, channelCount);
return BAD_VALUE;
}
@@ -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);
@@ -153,7 +153,7 @@ status_t AudioRecord::set(
}
// validate parameters
if (!audio_is_valid_format(format)) {
- LOGE("Invalid format");
+ ALOGE("Invalid format");
return BAD_VALUE;
}
@@ -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,
@@ -177,7 +177,7 @@ status_t AudioRecord::set(
(audio_in_acoustics_t)flags,
mSessionId);
if (input == 0) {
- LOGE("Could not get audio input for record source %d", inputSource);
+ ALOGE("Could not get audio input for record source %d", inputSource);
return BAD_VALUE;
}
@@ -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,12 +287,12 @@ status_t AudioRecord::start()
status_t ret = NO_ERROR;
sp<ClientRecordThread> t = mClientRecordThread;
- LOGV("start");
+ ALOGV("start");
if (t != 0) {
if (t->exitPending()) {
if (t->requestExitAndWait() == WOULD_BLOCK) {
- LOGE("AudioRecord::start called from thread");
+ ALOGE("AudioRecord::start called from thread");
return WOULD_BLOCK;
}
}
@@ -346,7 +346,7 @@ status_t AudioRecord::stop()
{
sp<ClientRecordThread> t = mClientRecordThread;
- LOGV("stop");
+ ALOGV("stop");
if (t != 0) {
t->mLock.lock();
@@ -469,12 +469,12 @@ status_t AudioRecord::openRecord_l(
&status);
if (record == 0) {
- LOGE("AudioFlinger could not create record track, status: %d", status);
+ ALOGE("AudioFlinger could not create record track, status: %d", status);
return status;
}
sp<IMemory> cblk = record->getCblk();
if (cblk == 0) {
- LOGE("Could not get control block");
+ ALOGE("Could not get control block");
return NO_INIT;
}
mAudioRecord.clear();
@@ -532,7 +532,7 @@ status_t AudioRecord::obtainBuffer(Buffer* audioBuffer, int32_t waitCount)
if (__builtin_expect(result!=NO_ERROR, false)) {
cblk->waitTimeMs += waitTimeMs;
if (cblk->waitTimeMs >= cblk->bufferTimeoutMs) {
- LOGW( "obtainBuffer timed out (is the CPU pegged?) "
+ ALOGW( "obtainBuffer timed out (is the CPU pegged?) "
"user=%08x, server=%08x", cblk->user, cblk->server);
cblk->lock.unlock();
result = mAudioRecord->start();
@@ -543,7 +543,7 @@ create_new_record:
result = AudioRecord::restoreRecord_l(cblk);
}
if (result != NO_ERROR) {
- LOGW("obtainBuffer create Track error %d", result);
+ ALOGW("obtainBuffer create Track error %d", result);
cblk->lock.unlock();
return result;
}
@@ -623,7 +623,7 @@ ssize_t AudioRecord::read(void* buffer, size_t userSize)
if (ssize_t(userSize) < 0) {
// sanity-check. user is most-likely passing an error code.
- LOGE("AudioRecord::read(buffer=%p, size=%u (%d)",
+ ALOGE("AudioRecord::read(buffer=%p, size=%u (%d)",
buffer, userSize, userSize);
return BAD_VALUE;
}
@@ -706,7 +706,7 @@ bool AudioRecord::processAudioBuffer(const sp<ClientRecordThread>& thread)
status_t err = obtainBuffer(&audioBuffer, 1);
if (err < NO_ERROR) {
if (err != TIMED_OUT) {
- LOGE_IF(err != status_t(NO_MORE_BUFFERS), "Error obtaining an audio buffer, giving up.");
+ ALOGE_IF(err != status_t(NO_MORE_BUFFERS), "Error obtaining an audio buffer, giving up.");
return false;
}
break;
@@ -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);
}
@@ -761,7 +761,7 @@ status_t AudioRecord::restoreRecord_l(audio_track_cblk_t*& cblk)
status_t result;
if (!(android_atomic_or(CBLK_RESTORING_ON, &cblk->flags) & CBLK_RESTORING_MSK)) {
- LOGW("dead IAudioRecord, creating a new one");
+ ALOGW("dead IAudioRecord, creating a new one");
// signal old cblk condition so that other threads waiting for available buffers stop
// waiting now
cblk->cv.broadcast();
@@ -784,13 +784,13 @@ status_t AudioRecord::restoreRecord_l(audio_track_cblk_t*& cblk)
cblk->cv.broadcast();
} else {
if (!(cblk->flags & CBLK_RESTORED_MSK)) {
- LOGW("dead IAudioRecord, waiting for a new one to be created");
+ ALOGW("dead IAudioRecord, waiting for a new one to be created");
mLock.unlock();
result = cblk->cv.waitRelative(cblk->lock, milliseconds(RESTORE_TIMEOUT_MS));
cblk->lock.unlock();
mLock.lock();
} else {
- LOGW("dead IAudioRecord, already restored");
+ ALOGW("dead IAudioRecord, already restored");
result = NO_ERROR;
cblk->lock.unlock();
}
@@ -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) {
@@ -807,7 +807,7 @@ status_t AudioRecord::restoreRecord_l(audio_track_cblk_t*& cblk)
}
cblk->lock.lock();
- LOGW_IF(result != NO_ERROR, "restoreRecord_l() error %d", result);
+ ALOGW_IF(result != NO_ERROR, "restoreRecord_l() error %d", result);
return result;
}
diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp
index 7b14c18..f7f129c 100644
--- a/media/libmedia/AudioSystem.cpp
+++ b/media/libmedia/AudioSystem.cpp
@@ -56,7 +56,7 @@ const sp<IAudioFlinger>& AudioSystem::get_audio_flinger()
binder = sm->getService(String16("media.audio_flinger"));
if (binder != 0)
break;
- LOGW("AudioFlinger not published, waiting...");
+ ALOGW("AudioFlinger not published, waiting...");
usleep(500000); // 0.5 s
} while(true);
if (gAudioFlingerClient == NULL) {
@@ -70,7 +70,7 @@ const sp<IAudioFlinger>& AudioSystem::get_audio_flinger()
gAudioFlinger = interface_cast<IAudioFlinger>(binder);
gAudioFlinger->registerClient(gAudioFlingerClient);
}
- LOGE_IF(gAudioFlinger==0, "no AudioFlinger!?");
+ ALOGE_IF(gAudioFlinger==0, "no AudioFlinger!?");
return gAudioFlinger;
}
@@ -190,7 +190,7 @@ static const float dBConvertInverse = 1.0f / dBConvert;
float AudioSystem::linearToLog(int volume)
{
// float v = volume ? exp(float(100 - volume) * dBConvert) : 0;
- // LOGD("linearToLog(%d)=%f", volume, v);
+ // ALOGD("linearToLog(%d)=%f", volume, v);
// return v;
return volume ? exp(float(100 - volume) * dBConvert) : 0;
}
@@ -198,7 +198,7 @@ float AudioSystem::linearToLog(int volume)
int AudioSystem::logToLinear(float volume)
{
// int v = volume ? 100 - int(dBConvertInverse * log(volume) + 0.5) : 0;
- // LOGD("logTolinear(%d)=%f", v, volume);
+ // ALOGD("logTolinear(%d)=%f", v, volume);
// return v;
return volume ? 100 - int(dBConvertInverse * log(volume) + 0.5) : 0;
}
@@ -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;
}
@@ -383,11 +383,11 @@ void AudioSystem::AudioFlingerClient::binderDied(const wp<IBinder>& who) {
if (gAudioErrorCallback) {
gAudioErrorCallback(DEAD_OBJECT);
}
- LOGW("AudioFlinger server died!");
+ ALOGW("AudioFlinger server died!");
}
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,15 +414,15 @@ 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: {
if (gOutputs.indexOfKey(ioHandle) < 0) {
- LOGW("ioConfigChanged() closing unknow output! %d", ioHandle);
+ ALOGW("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--) {
@@ -435,13 +435,13 @@ void AudioSystem::AudioFlingerClient::ioConfigChanged(int event, int ioHandle, v
case OUTPUT_CONFIG_CHANGED: {
int index = gOutputs.indexOfKey(ioHandle);
if (index < 0) {
- LOGW("ioConfigChanged() modifying unknow output! %d", ioHandle);
+ ALOGW("ioConfigChanged() modifying unknow output! %d", ioHandle);
break;
}
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);
@@ -491,7 +491,7 @@ const sp<IAudioPolicyService>& AudioSystem::get_audio_policy_service()
binder = sm->getService(String16("media.audio_policy"));
if (binder != 0)
break;
- LOGW("AudioPolicyService not published, waiting...");
+ ALOGW("AudioPolicyService not published, waiting...");
usleep(500000); // 0.5 s
} while(true);
if (gAudioPolicyServiceClient == NULL) {
@@ -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();
}
@@ -747,7 +747,7 @@ void AudioSystem::AudioPolicyServiceClient::binderDied(const wp<IBinder>& who) {
Mutex::Autolock _l(AudioSystem::gLock);
AudioSystem::gAudioPolicyService.clear();
- LOGW("AudioPolicyService server died!");
+ ALOGW("AudioPolicyService server died!");
}
}; // namespace android
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp
index 8ebb652..d51cd69 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,11 +153,11 @@ 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) {
- LOGE("Track already in use");
+ ALOGE("Track already in use");
return INVALID_OPERATION;
}
@@ -187,7 +187,7 @@ status_t AudioTrack::set(
// validate parameters
if (!audio_is_valid_format(format)) {
- LOGE("Invalid format");
+ ALOGE("Invalid format");
return BAD_VALUE;
}
@@ -197,7 +197,7 @@ status_t AudioTrack::set(
}
if (!audio_is_output_channel(channelMask)) {
- LOGE("Invalid channel mask");
+ ALOGE("Invalid channel mask");
return BAD_VALUE;
}
uint32_t channelCount = popcount(channelMask);
@@ -208,7 +208,7 @@ status_t AudioTrack::set(
(audio_policy_output_flags_t)flags);
if (output == 0) {
- LOGE("Could not get audio output for stream type %d", streamType);
+ ALOGE("Could not get audio output for stream type %d", streamType);
return BAD_VALUE;
}
@@ -238,7 +238,7 @@ status_t AudioTrack::set(
if (cbf != 0) {
mAudioTrackThread = new AudioTrackThread(*this, threadCanCallJava);
if (mAudioTrackThread == 0) {
- LOGE("Could not create callback thread");
+ ALOGE("Could not create callback thread");
return NO_INIT;
}
}
@@ -319,11 +319,11 @@ 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) {
- LOGE("AudioTrack::start called from thread");
+ ALOGE("AudioTrack::start called from thread");
return;
}
}
@@ -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;
}
@@ -561,12 +561,12 @@ status_t AudioTrack::setLoop_l(uint32_t loopStart, uint32_t loopEnd, int loopCou
if (loopStart >= loopEnd ||
loopEnd - loopStart > cblk->frameCount ||
cblk->server > loopStart) {
- LOGE("setLoop invalid value: loopStart %d, loopEnd %d, loopCount %d, framecount %d, user %d", loopStart, loopEnd, loopCount, cblk->frameCount, cblk->user);
+ ALOGE("setLoop invalid value: loopStart %d, loopEnd %d, loopCount %d, framecount %d, user %d", loopStart, loopEnd, loopCount, cblk->frameCount, cblk->user);
return BAD_VALUE;
}
if ((mSharedBuffer != 0) && (loopEnd > cblk->frameCount)) {
- LOGE("setLoop invalid value: loop markers beyond data: loopStart %d, loopEnd %d, framecount %d",
+ ALOGE("setLoop invalid value: loop markers beyond data: loopStart %d, loopEnd %d, framecount %d",
loopStart, loopEnd, cblk->frameCount);
return BAD_VALUE;
}
@@ -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;
@@ -721,7 +721,7 @@ status_t AudioTrack::createTrack_l(
status_t status;
const sp<IAudioFlinger>& audioFlinger = AudioSystem::get_audio_flinger();
if (audioFlinger == 0) {
- LOGE("Could not get audioflinger");
+ ALOGE("Could not get audioflinger");
return NO_INIT;
}
@@ -764,7 +764,7 @@ status_t AudioTrack::createTrack_l(
}
if (frameCount < minFrameCount) {
if (enforceFrameCount) {
- LOGE("Invalid buffer size: minFrameCount %d, frameCount %d", minFrameCount, frameCount);
+ ALOGE("Invalid buffer size: minFrameCount %d, frameCount %d", minFrameCount, frameCount);
return BAD_VALUE;
} else {
frameCount = minFrameCount;
@@ -774,7 +774,7 @@ status_t AudioTrack::createTrack_l(
// Ensure that buffer alignment matches channelcount
int channelCount = popcount(channelMask);
if (((uint32_t)sharedBuffer->pointer() & (channelCount | 1)) != 0) {
- LOGE("Invalid buffer alignement: address %p, channelCount %d", sharedBuffer->pointer(), channelCount);
+ ALOGE("Invalid buffer alignement: address %p, channelCount %d", sharedBuffer->pointer(), channelCount);
return BAD_VALUE;
}
frameCount = sharedBuffer->size()/channelCount/sizeof(int16_t);
@@ -794,12 +794,12 @@ status_t AudioTrack::createTrack_l(
&status);
if (track == 0) {
- LOGE("AudioFlinger could not create track, status: %d", status);
+ ALOGE("AudioFlinger could not create track, status: %d", status);
return status;
}
sp<IMemory> cblk = track->getCblk();
if (cblk == 0) {
- LOGE("Could not get control block");
+ ALOGE("Could not get control block");
return NO_INIT;
}
mAudioTrack.clear();
@@ -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;
}
@@ -880,7 +880,7 @@ status_t AudioTrack::obtainBuffer(Buffer* audioBuffer, int32_t waitCount)
// timing out when a loop has been set and we have already written upto loop end
// is a normal condition: no need to wake AudioFlinger up.
if (cblk->user < cblk->loopEnd) {
- LOGW( "obtainBuffer timed out (is the CPU pegged?) %p "
+ ALOGW( "obtainBuffer timed out (is the CPU pegged?) %p "
"user=%08x, server=%08x", this, cblk->user, cblk->server);
//unlock cblk mutex before calling mAudioTrack->start() (see issue #1617140)
cblk->lock.unlock();
@@ -892,7 +892,7 @@ create_new_track:
result = restoreTrack_l(cblk, false);
}
if (result != NO_ERROR) {
- LOGW("obtainBuffer create Track error %d", result);
+ ALOGW("obtainBuffer create Track error %d", result);
cblk->lock.unlock();
return result;
}
@@ -915,7 +915,7 @@ create_new_track:
// restart track if it was disabled by audioflinger due to previous underrun
if (mActive && (cblk->flags & CBLK_DISABLED_MSK)) {
android_atomic_and(~CBLK_DISABLED_ON, &cblk->flags);
- LOGW("obtainBuffer() track %p disabled, restarting", this);
+ ALOGW("obtainBuffer() track %p disabled, restarting", this);
mAudioTrack->start();
}
@@ -961,12 +961,12 @@ ssize_t AudioTrack::write(const void* buffer, size_t userSize)
if (ssize_t(userSize) < 0) {
// sanity-check. user is most-likely passing an error code.
- LOGE("AudioTrack::write(buffer=%p, size=%u (%d)",
+ ALOGE("AudioTrack::write(buffer=%p, size=%u (%d)",
buffer, userSize, userSize);
return BAD_VALUE;
}
- 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) {
@@ -1093,7 +1093,7 @@ bool AudioTrack::processAudioBuffer(const sp<AudioTrackThread>& thread)
status_t err = obtainBuffer(&audioBuffer, waitCount);
if (err < NO_ERROR) {
if (err != TIMED_OUT) {
- LOGE_IF(err != status_t(NO_MORE_BUFFERS), "Error obtaining an audio buffer, giving up.");
+ ALOGE_IF(err != status_t(NO_MORE_BUFFERS), "Error obtaining an audio buffer, giving up.");
return false;
}
break;
@@ -1161,7 +1161,7 @@ status_t AudioTrack::restoreTrack_l(audio_track_cblk_t*& cblk, bool fromStart)
status_t result;
if (!(android_atomic_or(CBLK_RESTORING_ON, &cblk->flags) & CBLK_RESTORING_MSK)) {
- LOGW("dead IAudioTrack, creating a new one from %s TID %d",
+ ALOGW("dead IAudioTrack, creating a new one from %s TID %d",
fromStart ? "start()" : "obtainBuffer()", gettid());
// signal old cblk condition so that other threads waiting for available buffers stop
@@ -1217,7 +1217,7 @@ status_t AudioTrack::restoreTrack_l(audio_track_cblk_t*& cblk, bool fromStart)
}
if (mActive) {
result = mAudioTrack->start();
- LOGW_IF(result != NO_ERROR, "restoreTrack_l() start() failed status %d", result);
+ ALOGW_IF(result != NO_ERROR, "restoreTrack_l() start() failed status %d", result);
}
if (fromStart && result == NO_ERROR) {
mNewPosition = mCblk->server + mUpdatePeriod;
@@ -1225,7 +1225,7 @@ status_t AudioTrack::restoreTrack_l(audio_track_cblk_t*& cblk, bool fromStart)
}
if (result != NO_ERROR) {
android_atomic_and(~CBLK_RESTORING_ON, &cblk->flags);
- LOGW_IF(result != NO_ERROR, "restoreTrack_l() failed status %d", result);
+ ALOGW_IF(result != NO_ERROR, "restoreTrack_l() failed status %d", result);
}
mRestoreStatus = result;
// signal old cblk condition for other threads waiting for restore completion
@@ -1233,7 +1233,7 @@ status_t AudioTrack::restoreTrack_l(audio_track_cblk_t*& cblk, bool fromStart)
cblk->cv.broadcast();
} else {
if (!(cblk->flags & CBLK_RESTORED_MSK)) {
- LOGW("dead IAudioTrack, waiting for a new one TID %d", gettid());
+ ALOGW("dead IAudioTrack, waiting for a new one TID %d", gettid());
mLock.unlock();
result = cblk->cv.waitRelative(cblk->lock, milliseconds(RESTORE_TIMEOUT_MS));
if (result == NO_ERROR) {
@@ -1242,12 +1242,12 @@ status_t AudioTrack::restoreTrack_l(audio_track_cblk_t*& cblk, bool fromStart)
cblk->lock.unlock();
mLock.lock();
} else {
- LOGW("dead IAudioTrack, already restored TID %d", gettid());
+ ALOGW("dead IAudioTrack, already restored TID %d", gettid());
result = mRestoreStatus;
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) {
@@ -1256,7 +1256,7 @@ status_t AudioTrack::restoreTrack_l(audio_track_cblk_t*& cblk, bool fromStart)
}
cblk->lock.lock();
- LOGW_IF(result != NO_ERROR, "restoreTrack_l() error %d TID %d", result, gettid());
+ ALOGW_IF(result != NO_ERROR, "restoreTrack_l() error %d TID %d", result, gettid());
return result;
}
@@ -1325,7 +1325,7 @@ uint32_t audio_track_cblk_t::stepUser(uint32_t frameCount)
bufferTimeoutMs = MAX_RUN_TIMEOUT_MS;
}
} else if (u > this->server) {
- LOGW("stepServer occured after track reset");
+ ALOGW("stepServer occured after track reset");
u = this->server;
}
@@ -1346,7 +1346,7 @@ uint32_t audio_track_cblk_t::stepUser(uint32_t frameCount)
bool audio_track_cblk_t::stepServer(uint32_t frameCount)
{
if (!tryLock()) {
- LOGW("stepServer() could not lock cblk");
+ ALOGW("stepServer() could not lock cblk");
return false;
}
@@ -1364,13 +1364,13 @@ bool audio_track_cblk_t::stepServer(uint32_t frameCount)
// stepServer() is called After the flush() has reset u & s and
// we have s > u
if (s > this->user) {
- LOGW("stepServer occured after track reset");
+ ALOGW("stepServer occured after track reset");
s = this->user;
}
}
if (s >= loopEnd) {
- LOGW_IF(s > loopEnd, "stepServer: s %u > loopEnd %u", s, loopEnd);
+ ALOGW_IF(s > loopEnd, "stepServer: s %u > loopEnd %u", s, loopEnd);
s = loopStart;
if (--loopCount == 0) {
loopEnd = UINT_MAX;
@@ -1425,7 +1425,7 @@ uint32_t audio_track_cblk_t::framesReady()
} else {
// do not block on mutex shared with client on AudioFlinger side
if (!tryLock()) {
- LOGW("framesReady() could not lock cblk");
+ ALOGW("framesReady() could not lock cblk");
return 0;
}
uint32_t frames = UINT_MAX;
diff --git a/media/libmedia/IAudioFlinger.cpp b/media/libmedia/IAudioFlinger.cpp
index d58834b..abd491f 100644
--- a/media/libmedia/IAudioFlinger.cpp
+++ b/media/libmedia/IAudioFlinger.cpp
@@ -112,7 +112,7 @@ public:
data.writeInt32(lSessionId);
status_t lStatus = remote()->transact(CREATE_TRACK, data, &reply);
if (lStatus != NO_ERROR) {
- LOGE("createTrack error: %s", strerror(-lStatus));
+ ALOGE("createTrack error: %s", strerror(-lStatus));
} else {
lSessionId = reply.readInt32();
if (sessionId != NULL) {
@@ -155,7 +155,7 @@ public:
data.writeInt32(lSessionId);
status_t lStatus = remote()->transact(OPEN_RECORD, data, &reply);
if (lStatus != NO_ERROR) {
- LOGE("openRecord error: %s", strerror(-lStatus));
+ ALOGE("openRecord error: %s", strerror(-lStatus));
} else {
lSessionId = reply.readInt32();
if (sessionId != NULL) {
@@ -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();
@@ -632,7 +632,7 @@ public:
status_t lStatus = remote()->transact(CREATE_EFFECT, data, &reply);
if (lStatus != NO_ERROR) {
- LOGE("createEffect error: %s", strerror(-lStatus));
+ ALOGE("createEffect error: %s", strerror(-lStatus));
} else {
lStatus = reply.readInt32();
int tmp = reply.readInt32();
@@ -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/IAudioRecord.cpp b/media/libmedia/IAudioRecord.cpp
index ba0d55b..8c7a960 100644
--- a/media/libmedia/IAudioRecord.cpp
+++ b/media/libmedia/IAudioRecord.cpp
@@ -50,7 +50,7 @@ public:
if (status == NO_ERROR) {
status = reply.readInt32();
} else {
- LOGW("start() error: %s", strerror(-status));
+ ALOGW("start() error: %s", strerror(-status));
}
return status;
}
diff --git a/media/libmedia/IAudioTrack.cpp b/media/libmedia/IAudioTrack.cpp
index bc8ff34..0b372f3 100644
--- a/media/libmedia/IAudioTrack.cpp
+++ b/media/libmedia/IAudioTrack.cpp
@@ -54,7 +54,7 @@ public:
if (status == NO_ERROR) {
status = reply.readInt32();
} else {
- LOGW("start() error: %s", strerror(-status));
+ ALOGW("start() error: %s", strerror(-status));
}
return status;
}
@@ -109,7 +109,7 @@ public:
if (status == NO_ERROR) {
status = reply.readInt32();
} else {
- LOGW("attachAuxEffect() error: %s", strerror(-status));
+ ALOGW("attachAuxEffect() error: %s", strerror(-status));
}
return status;
}
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..8525482 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();
@@ -44,7 +44,7 @@ IMediaDeathNotifier::getMediaPlayerService()
if (binder != 0) {
break;
}
- LOGW("Media player service not published, waiting...");
+ ALOGW("Media player service not published, waiting...");
usleep(500000); // 0.5 s
} while(true);
@@ -54,14 +54,14 @@ IMediaDeathNotifier::getMediaPlayerService()
binder->linkToDeath(sDeathNotifier);
sMediaPlayerService = interface_cast<IMediaPlayerService>(binder);
}
- LOGE_IF(sMediaPlayerService == 0, "no media player service!?");
+ ALOGE_IF(sMediaPlayerService == 0, "no media player service!?");
return sMediaPlayerService;
}
/*static*/ void
IMediaDeathNotifier::addObitRecipient(const wp<IMediaDeathNotifier>& recipient)
{
- LOGV("addObitRecipient");
+ ALOGV("addObitRecipient");
Mutex::Autolock _l(sServiceLock);
sObitRecipients.add(recipient);
}
@@ -69,14 +69,14 @@ 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);
}
void
IMediaDeathNotifier::DeathNotifier::binderDied(const wp<IBinder>& who) {
- LOGW("media server died");
+ ALOGW("media server died");
// Need to do this with the lock held
SortedVector< wp<IMediaDeathNotifier> > list;
@@ -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/IOMX.cpp b/media/libmedia/IOMX.cpp
index 7d2fbce..d2f5f71 100644
--- a/media/libmedia/IOMX.cpp
+++ b/media/libmedia/IOMX.cpp
@@ -407,7 +407,7 @@ IMPLEMENT_META_INTERFACE(OMX, "android.hardware.IOMX");
#define CHECK_INTERFACE(interface, data, reply) \
do { if (!data.enforceInterface(interface::getInterfaceDescriptor())) { \
- LOGW("Call incorrectly routed to " #interface); \
+ ALOGW("Call incorrectly routed to " #interface); \
return PERMISSION_DENIED; \
} } while (0)
diff --git a/media/libmedia/JetPlayer.cpp b/media/libmedia/JetPlayer.cpp
index 8b953e0..fa5b67a 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();
}
@@ -68,21 +68,21 @@ int JetPlayer::init()
if (pLibConfig == NULL)
pLibConfig = EAS_Config();
if (pLibConfig == NULL) {
- LOGE("JetPlayer::init(): EAS library configuration could not be retrieved, aborting.");
+ ALOGE("JetPlayer::init(): EAS library configuration could not be retrieved, aborting.");
return EAS_FAILURE;
}
// init the EAS library
result = EAS_Init(&mEasData);
if( result != EAS_SUCCESS) {
- LOGE("JetPlayer::init(): Error initializing Sonivox EAS library, aborting.");
+ ALOGE("JetPlayer::init(): Error initializing Sonivox EAS library, aborting.");
mState = EAS_STATE_ERROR;
return result;
}
// init the JET library with the default app event controller range
result = JET_Init(mEasData, NULL, sizeof(S_JET_CONFIG));
if( result != EAS_SUCCESS) {
- LOGE("JetPlayer::init(): Error initializing JET library, aborting.");
+ ALOGE("JetPlayer::init(): Error initializing JET library, aborting.");
mState = EAS_STATE_ERROR;
return result;
}
@@ -99,16 +99,16 @@ 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.");
+ ALOGE("JetPlayer::init(): failed to start render thread.");
mState = EAS_STATE_ERROR;
return EAS_FAILURE;
}
@@ -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,13 +168,13 @@ int JetPlayer::render() {
int temp;
bool audioStarted = false;
- LOGV("JetPlayer::render(): entering");
+ ALOGV("JetPlayer::render(): entering");
// allocate render buffer
mAudioBuffer =
new EAS_PCM[pLibConfig->mixBufferSize * pLibConfig->numChannels * MIX_NUM_BUFFERS];
if (!mAudioBuffer) {
- LOGE("JetPlayer::render(): mAudioBuffer allocate failed");
+ ALOGE("JetPlayer::render(): mAudioBuffer allocate failed");
goto threadExit;
}
@@ -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
@@ -215,7 +215,7 @@ int JetPlayer::render() {
for (int i = 0; i < MIX_NUM_BUFFERS; i++) {
result = EAS_Render(mEasData, p, pLibConfig->mixBufferSize, &count);
if (result != EAS_SUCCESS) {
- LOGE("JetPlayer::render(): EAS_Render returned error %ld", result);
+ ALOGE("JetPlayer::render(): EAS_Render returned error %ld", result);
}
p += count * pLibConfig->numChannels;
num_output += count * pLibConfig->numChannels * sizeof(EAS_PCM);
@@ -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;
@@ -234,20 +234,20 @@ int JetPlayer::render() {
// check audio output track
if (mAudioTrack == NULL) {
- LOGE("JetPlayer::render(): output AudioTrack was not created");
+ ALOGE("JetPlayer::render(): output AudioTrack was not created");
goto threadExit;
}
// Write data to the audio hardware
- //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);
+ ALOGE("JetPlayer::render(): Error in writing:%d",temp);
return temp;
}
// 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);
}
@@ -474,17 +474,17 @@ int JetPlayer::clearQueue()
//-------------------------------------------------------------------------------------------------
void JetPlayer::dump()
{
- LOGE("JetPlayer dump: JET file=%s", mEasJetFileLoc->path);
+ ALOGE("JetPlayer dump: JET file=%s", mEasJetFileLoc->path);
}
void JetPlayer::dumpJetStatus(S_JET_STATUS* pJetStatus)
{
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
- LOGE(">> JET player status is NULL");
+ ALOGE(">> JET player status is NULL");
}
diff --git a/media/libmedia/MediaProfiles.cpp b/media/libmedia/MediaProfiles.cpp
index 6096b72..c905762 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];
@@ -620,7 +620,7 @@ MediaProfiles::getInstance()
const char *defaultXmlFile = "/etc/media_profiles.xml";
FILE *fp = fopen(defaultXmlFile, "r");
if (fp == NULL) {
- LOGW("could not find media config xml file");
+ ALOGW("could not find media config xml file");
sInstance = createDefaultInstance();
} else {
fclose(fp); // close the file first.
@@ -903,7 +903,7 @@ MediaProfiles::createInstanceFromXmlFile(const char *xml)
expat is not compiled with -DXML_DTD. We don't have DTD parsing support.
if (!::XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS)) {
- LOGE("failed to enable DTD support in the xml file");
+ ALOGE("failed to enable DTD support in the xml file");
return UNKNOWN_ERROR;
}
@@ -913,7 +913,7 @@ MediaProfiles::createInstanceFromXmlFile(const char *xml)
for (;;) {
void *buff = ::XML_GetBuffer(parser, BUFF_SIZE);
if (buff == NULL) {
- LOGE("failed to in call to XML_GetBuffer()");
+ ALOGE("failed to in call to XML_GetBuffer()");
delete profiles;
profiles = NULL;
goto exit;
@@ -921,7 +921,7 @@ MediaProfiles::createInstanceFromXmlFile(const char *xml)
int bytes_read = ::fread(buff, 1, BUFF_SIZE, fp);
if (bytes_read < 0) {
- LOGE("failed in call to read");
+ ALOGE("failed in call to read");
delete profiles;
profiles = NULL;
goto exit;
@@ -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) {
@@ -963,7 +963,7 @@ int MediaProfiles::getVideoEncoderParamByName(const char *name, video_encoder co
}
}
if (index == -1) {
- LOGE("The given video encoder %d is not found", codec);
+ ALOGE("The given video encoder %d is not found", codec);
return -1;
}
@@ -976,13 +976,13 @@ int MediaProfiles::getVideoEncoderParamByName(const char *name, video_encoder co
if (!strcmp("enc.vid.fps.min", name)) return mVideoEncoders[index]->mMinFrameRate;
if (!strcmp("enc.vid.fps.max", name)) return mVideoEncoders[index]->mMaxFrameRate;
- LOGE("The given video encoder param name %s is not found", name);
+ ALOGE("The given video encoder param name %s is not found", name);
return -1;
}
int MediaProfiles::getVideoEditorExportParamByName(
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++) {
@@ -993,7 +993,7 @@ int MediaProfiles::getVideoEditorExportParamByName(
}
}
if (index == -1) {
- LOGE("The given video decoder %d is not found", codec);
+ ALOGE("The given video decoder %d is not found", codec);
return -1;
}
if (!strcmp("videoeditor.export.profile", name))
@@ -1001,15 +1001,15 @@ int MediaProfiles::getVideoEditorExportParamByName(
if (!strcmp("videoeditor.export.level", name))
return exportProfile->mLevel;
- LOGE("The given video editor export param name %s is not found", name);
+ ALOGE("The given video editor export param name %s is not found", name);
return -1;
}
int MediaProfiles::getVideoEditorCapParamByName(const char *name) const
{
- LOGV("getVideoEditorCapParamByName: %s", name);
+ ALOGV("getVideoEditorCapParamByName: %s", name);
if (mVideoEditorCap == NULL) {
- LOGE("The mVideoEditorCap is not created, then create default cap.");
+ ALOGE("The mVideoEditorCap is not created, then create default cap.");
createDefaultVideoEditorCap(sInstance);
}
@@ -1024,7 +1024,7 @@ int MediaProfiles::getVideoEditorCapParamByName(const char *name) const
if (!strcmp("maxPrefetchYUVFrames", name))
return mVideoEditorCap->mMaxPrefetchYUVFrames;
- LOGE("The given video editor param name %s is not found", name);
+ ALOGE("The given video editor param name %s is not found", name);
return -1;
}
@@ -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) {
@@ -1048,7 +1048,7 @@ int MediaProfiles::getAudioEncoderParamByName(const char *name, audio_encoder co
}
}
if (index == -1) {
- LOGE("The given audio encoder %d is not found", codec);
+ ALOGE("The given audio encoder %d is not found", codec);
return -1;
}
@@ -1059,7 +1059,7 @@ int MediaProfiles::getAudioEncoderParamByName(const char *name, audio_encoder co
if (!strcmp("enc.aud.hz.min", name)) return mAudioEncoders[index]->mMinSampleRate;
if (!strcmp("enc.aud.hz.max", name)) return mAudioEncoders[index]->mMaxSampleRate;
- LOGE("The given audio encoder param name %s is not found", name);
+ ALOGE("The given audio encoder param name %s is not found", name);
return -1;
}
@@ -1098,12 +1098,12 @@ 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);
if (index == -1) {
- LOGE("The given camcorder profile camera %d quality %d is not found",
+ ALOGE("The given camcorder profile camera %d quality %d is not found",
cameraId, quality);
return -1;
}
@@ -1120,7 +1120,7 @@ int MediaProfiles::getCamcorderProfileParamByName(const char *name,
if (!strcmp("aud.ch", name)) return mCamcorderProfiles[index]->mAudioCodec->mChannels;
if (!strcmp("aud.hz", name)) return mCamcorderProfiles[index]->mAudioCodec->mSampleRate;
- LOGE("The given camcorder profile param id %d name %s is not found", cameraId, name);
+ ALOGE("The given camcorder profile param id %d name %s is not found", cameraId, name);
return -1;
}
@@ -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..79cab74 100644
--- a/media/libmedia/MediaScanner.cpp
+++ b/media/libmedia/MediaScanner.cpp
@@ -135,7 +135,7 @@ MediaScanResult MediaScanner::doProcessDirectory(
struct dirent* entry;
if (shouldSkipDirectory(path)) {
- LOGD("Skipping: %s", path);
+ ALOGD("Skipping: %s", path);
return MEDIA_SCAN_RESULT_OK;
}
@@ -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;
}
@@ -153,7 +153,7 @@ MediaScanResult MediaScanner::doProcessDirectory(
DIR* dir = opendir(path);
if (!dir) {
- LOGW("Error opening directory '%s', skipping: %s.", path, strerror(errno));
+ ALOGW("Error opening directory '%s', skipping: %s.", path, strerror(errno));
return MEDIA_SCAN_RESULT_SKIPPED;
}
@@ -199,7 +199,7 @@ MediaScanResult MediaScanner::doProcessDirectoryEntry(
type = DT_DIR;
}
} else {
- LOGD("stat() failed for %s: %s", path, strerror(errno) );
+ ALOGD("stat() failed for %s: %s", path, strerror(errno) );
}
}
if (type == DT_DIR) {
diff --git a/media/libmedia/MediaScannerClient.cpp b/media/libmedia/MediaScannerClient.cpp
index 629b165..40b8188 100644
--- a/media/libmedia/MediaScannerClient.cpp
+++ b/media/libmedia/MediaScannerClient.cpp
@@ -142,12 +142,12 @@ void MediaScannerClient::convertValues(uint32_t encoding)
UConverter *conv = ucnv_open(enc, &status);
if (U_FAILURE(status)) {
- LOGE("could not create UConverter for %s\n", enc);
+ ALOGE("could not create UConverter for %s\n", enc);
return;
}
UConverter *utf8Conv = ucnv_open("UTF-8", &status);
if (U_FAILURE(status)) {
- LOGE("could not create UConverter for UTF-8\n");
+ ALOGE("could not create UConverter for UTF-8\n");
ucnv_close(conv);
return;
}
@@ -180,7 +180,7 @@ void MediaScannerClient::convertValues(uint32_t encoding)
ucnv_convertEx(utf8Conv, conv, &target, target + targetLength,
&source, (const char *)dest, NULL, NULL, NULL, NULL, TRUE, TRUE, &status);
if (U_FAILURE(status)) {
- LOGE("ucnv_convertEx failed: %d\n", status);
+ ALOGE("ucnv_convertEx failed: %d\n", status);
mValues->setEntry(i, "???");
} else {
// zero terminate
diff --git a/media/libmedia/Metadata.cpp b/media/libmedia/Metadata.cpp
index 8eeebbb..546a9b0 100644
--- a/media/libmedia/Metadata.cpp
+++ b/media/libmedia/Metadata.cpp
@@ -135,7 +135,7 @@ bool Metadata::checkKey(int key)
{
if (key < FIRST_SYSTEM_ID ||
(LAST_SYSTEM_ID < key && key < FIRST_CUSTOM_ID)) {
- LOGE("Bad key %d", key);
+ ALOGE("Bad key %d", key);
return false;
}
size_t curr = mData->dataPosition();
@@ -152,7 +152,7 @@ bool Metadata::checkKey(int key)
break;
}
if (mData->readInt32() == key) {
- LOGE("Key exists already %d", key);
+ ALOGE("Key exists already %d", key);
error = true;
break;
}
diff --git a/media/libmedia/ToneGenerator.cpp b/media/libmedia/ToneGenerator.cpp
index 7c2200e..35dfbb8 100644
--- a/media/libmedia/ToneGenerator.cpp
+++ b/media/libmedia/ToneGenerator.cpp
@@ -800,12 +800,12 @@ 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;
if (AudioSystem::getOutputSamplingRate(&mSamplingRate, streamType) != NO_ERROR) {
- LOGE("Unable to marshal AudioFlinger");
+ ALOGE("Unable to marshal AudioFlinger");
return;
}
mThreadCanCallJava = threadCanCallJava;
@@ -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,10 +903,10 @@ 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);
+ ALOGE("--- start wait for stop timed out, status %d", lStatus);
mState = TONE_IDLE;
mLock.unlock();
return lResult;
@@ -915,17 +915,17 @@ 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);
+ ALOGE("--- Immediate start timed out, status %d", lStatus);
mState = TONE_IDLE;
lResult = false;
}
@@ -934,23 +934,23 @@ 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);
+ ALOGE("--- Delayed start timed out, status %d", lStatus);
mState = TONE_IDLE;
}
}
mLock.unlock();
- LOGV_IF(lResult, "Tone started, time %d\n", (unsigned int)(systemTime()/1000000));
- LOGW_IF(!lResult, "Tone start failed!!!, time %d\n", (unsigned int)(systemTime()/1000000));
+ ALOGV_IF(lResult, "Tone started, time %d\n", (unsigned int)(systemTime()/1000000));
+ ALOGW_IF(!lResult, "Tone start failed!!!, time %d\n", (unsigned int)(systemTime()/1000000));
return lResult;
}
@@ -969,17 +969,17 @@ 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");
+ ALOGE("--- Stop timed out");
mState = TONE_IDLE;
mpAudioTrack->stop();
}
@@ -1018,10 +1018,10 @@ bool ToneGenerator::initAudioTrack() {
// Open audio track in mono, PCM 16bit, default sampling rate, default buffer size
mpAudioTrack = new AudioTrack();
if (mpAudioTrack == 0) {
- LOGE("AudioTrack allocation failed");
+ ALOGE("AudioTrack allocation failed");
goto initAudioTrack_exit;
}
- LOGV("Create Track: %p\n", mpAudioTrack);
+ ALOGV("Create Track: %p\n", mpAudioTrack);
mpAudioTrack->set(mStreamType,
0,
@@ -1036,7 +1036,7 @@ bool ToneGenerator::initAudioTrack() {
mThreadCanCallJava);
if (mpAudioTrack->initCheck() != NO_ERROR) {
- LOGE("AudioTrack->initCheck failed");
+ ALOGE("AudioTrack->initCheck failed");
goto initAudioTrack_exit;
}
@@ -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,13 +1255,13 @@ 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
lpToneDesc = lpToneGen->mpToneDesc;
} else {
- LOGW("Cbk restarting prepareWave() failed\n");
+ ALOGW("Cbk restarting prepareWave() failed\n");
lpToneGen->mState = TONE_IDLE;
lpToneGen->mpAudioTrack->stop();
// Force loop exit
@@ -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..d08ffa5 100644
--- a/media/libmedia/Visualizer.cpp
+++ b/media/libmedia/Visualizer.cpp
@@ -61,7 +61,7 @@ status_t Visualizer::setEnabled(bool enabled)
if (enabled) {
if (t->exitPending()) {
if (t->requestExitAndWait() == WOULD_BLOCK) {
- LOGE("Visualizer::enable() called from thread");
+ ALOGE("Visualizer::enable() called from thread");
return INVALID_OPERATION;
}
}
@@ -116,11 +116,11 @@ status_t Visualizer::setCaptureCallBack(capture_cbk_t cbk, void* user, uint32_t
if (cbk != NULL) {
mCaptureThread = new CaptureThread(*this, rate, ((flags & CAPTURE_CALL_JAVA) != 0));
if (mCaptureThread == 0) {
- LOGE("Could not create callback thread");
+ ALOGE("Could not create callback thread");
return NO_INIT;
}
}
- 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..88e269f 100644
--- a/media/libmedia/mediametadataretriever.cpp
+++ b/media/libmedia/mediametadataretriever.cpp
@@ -43,7 +43,7 @@ const sp<IMediaPlayerService>& MediaMetadataRetriever::getService()
if (binder != 0) {
break;
}
- LOGW("MediaPlayerService not published, waiting...");
+ ALOGW("MediaPlayerService not published, waiting...");
usleep(500000); // 0.5 s
} while(true);
if (sDeathNotifier == NULL) {
@@ -52,35 +52,35 @@ const sp<IMediaPlayerService>& MediaMetadataRetriever::getService()
binder->linkToDeath(sDeathNotifier);
sService = interface_cast<IMediaPlayerService>(binder);
}
- LOGE_IF(sService == 0, "no MediaPlayerService!?");
+ ALOGE_IF(sService == 0, "no MediaPlayerService!?");
return sService;
}
MediaMetadataRetriever::MediaMetadataRetriever()
{
- LOGV("constructor");
+ ALOGV("constructor");
const sp<IMediaPlayerService>& service(getService());
if (service == 0) {
- LOGE("failed to obtain MediaMetadataRetrieverService");
+ ALOGE("failed to obtain MediaMetadataRetrieverService");
return;
}
sp<IMediaMetadataRetriever> retriever(service->createMetadataRetriever(getpid()));
if (retriever == 0) {
- LOGE("failed to create IMediaMetadataRetriever object from server");
+ ALOGE("failed to create IMediaMetadataRetriever object from server");
}
mRetriever = retriever;
}
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,30 +95,30 @@ 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");
+ ALOGE("retriever is not initialized");
return INVALID_OPERATION;
}
if (srcUrl == NULL) {
- LOGE("data source is a null pointer");
+ ALOGE("data source is a null pointer");
return UNKNOWN_ERROR;
}
- 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");
+ ALOGE("retriever is not initialized");
return INVALID_OPERATION;
}
if (fd < 0 || offset < 0 || length < 0) {
- LOGE("Invalid negative argument");
+ ALOGE("Invalid negative argument");
return UNKNOWN_ERROR;
}
return mRetriever->setDataSource(fd, offset, length);
@@ -126,10 +126,10 @@ 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");
+ ALOGE("retriever is not initialized");
return NULL;
}
return mRetriever->getFrameAtTime(timeUs, option);
@@ -137,10 +137,10 @@ 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");
+ ALOGE("retriever is not initialized");
return NULL;
}
return mRetriever->extractMetadata(keyCode);
@@ -148,10 +148,10 @@ 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");
+ ALOGE("retriever is not initialized");
return NULL;
}
return mRetriever->extractAlbumArt();
@@ -160,7 +160,7 @@ sp<IMemory> MediaMetadataRetriever::extractAlbumArt()
void MediaMetadataRetriever::DeathNotifier::binderDied(const wp<IBinder>& who) {
Mutex::Autolock lock(MediaMetadataRetriever::sServiceLock);
MediaMetadataRetriever::sService.clear();
- LOGW("MediaMetadataRetriever server died!");
+ ALOGW("MediaMetadataRetriever server died!");
}
MediaMetadataRetriever::DeathNotifier::~DeathNotifier()
diff --git a/media/libmedia/mediaplayer.cpp b/media/libmedia/mediaplayer.cpp
index c2e1ddf..2284927 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;
@@ -115,7 +115,7 @@ status_t MediaPlayer::attachNewPlayer(const sp<IMediaPlayer>& player)
if ( !( (mCurrentState & MEDIA_PLAYER_IDLE) ||
(mCurrentState == MEDIA_PLAYER_STATE_ERROR ) ) ) {
- LOGE("attachNewPlayer called in state %d", mCurrentState);
+ ALOGE("attachNewPlayer called in state %d", mCurrentState);
return INVALID_OPERATION;
}
@@ -126,7 +126,7 @@ status_t MediaPlayer::attachNewPlayer(const sp<IMediaPlayer>& player)
mCurrentState = MEDIA_PLAYER_INITIALIZED;
err = NO_ERROR;
} else {
- LOGE("Unable to to create media player");
+ ALOGE("Unable to to create media player");
}
}
@@ -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,16 +192,16 @@ 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);
+ ALOGE("invoke failed: wrong state %X", mCurrentState);
return INVALID_OPERATION;
}
status_t MediaPlayer::setMetadataFilter(const Parcel& filter)
{
- LOGD("setMetadataFilter");
+ ALOGD("setMetadataFilter");
Mutex::Autolock lock(mLock);
if (mPlayer == NULL) {
return NO_INIT;
@@ -211,7 +211,7 @@ status_t MediaPlayer::setMetadataFilter(const Parcel& filter)
status_t MediaPlayer::getMetadata(bool update_only, bool apply_filter, Parcel *metadata)
{
- LOGD("getMetadata");
+ ALOGD("getMetadata");
Mutex::Autolock lock(mLock);
if (mPlayer == NULL) {
return NO_INIT;
@@ -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);
@@ -236,7 +236,7 @@ status_t MediaPlayer::prepareAsync_l()
mCurrentState = MEDIA_PLAYER_PREPARING;
return mPlayer->prepareAsync();
}
- LOGE("prepareAsync called in state %d", mCurrentState);
+ ALOGE("prepareAsync called in state %d", mCurrentState);
return INVALID_OPERATION;
}
@@ -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,18 +293,18 @@ 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;
}
- LOGE("start called in state %d", mCurrentState);
+ ALOGE("start called in state %d", mCurrentState);
return INVALID_OPERATION;
}
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 |
@@ -317,13 +317,13 @@ status_t MediaPlayer::stop()
}
return ret;
}
- LOGE("stop called in state %d", mCurrentState);
+ ALOGE("stop called in state %d", mCurrentState);
return INVALID_OPERATION;
}
status_t MediaPlayer::pause()
{
- LOGV("pause");
+ ALOGV("pause");
Mutex::Autolock _l(mLock);
if (mCurrentState & (MEDIA_PLAYER_PAUSED|MEDIA_PLAYER_PLAYBACK_COMPLETE))
return NO_ERROR;
@@ -336,7 +336,7 @@ status_t MediaPlayer::pause()
}
return ret;
}
- LOGE("pause called in state %d", mCurrentState);
+ ALOGE("pause called in state %d", mCurrentState);
return INVALID_OPERATION;
}
@@ -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");
+ ALOGE("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;
@@ -402,7 +402,7 @@ status_t MediaPlayer::getDuration_l(int *msec)
*msec = mDuration;
return ret;
}
- LOGE("Attempt to call getDuration without a valid mediaplayer");
+ ALOGE("Attempt to call getDuration without a valid mediaplayer");
return INVALID_OPERATION;
}
@@ -414,13 +414,13 @@ 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);
+ ALOGW("Attempt to seek to invalid position: %d", msec);
msec = 0;
} else if ((mDuration > 0) && (msec > mDuration)) {
- LOGW("Attempt to seek to past end of file: request = %d, EOF = %d", msec, mDuration);
+ ALOGW("Attempt to seek to past end of file: request = %d, EOF = %d", msec, mDuration);
msec = mDuration;
}
// cache duration
@@ -431,11 +431,11 @@ 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;
}
}
- LOGE("Attempt to perform seekTo in wrong state: mPlayer=%p, mCurrentState=%u", mPlayer.get(), mCurrentState);
+ ALOGE("Attempt to perform seekTo in wrong state: mPlayer=%p, mCurrentState=%u", mPlayer.get(), mCurrentState);
return INVALID_OPERATION;
}
@@ -457,7 +457,7 @@ status_t MediaPlayer::reset_l()
if (mPlayer != 0) {
status_t ret = mPlayer->reset();
if (ret != NO_ERROR) {
- LOGE("reset() failed with return code (%d)", ret);
+ ALOGE("reset() failed with return code (%d)", ret);
mCurrentState = MEDIA_PLAYER_STATE_ERROR;
} else {
mCurrentState = MEDIA_PLAYER_IDLE;
@@ -473,20 +473,20 @@ 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 |
MEDIA_PLAYER_PAUSED | MEDIA_PLAYER_PLAYBACK_COMPLETE ) ) {
// Can't change the stream type after prepare
- LOGE("setAudioStream called in state %d", mCurrentState);
+ ALOGE("setAudioStream called in state %d", mCurrentState);
return INVALID_OPERATION;
}
// cache
@@ -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,10 +529,10 @@ 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);
+ ALOGE("setAudioSessionId called in state %d", mCurrentState);
return INVALID_OPERATION;
}
if (sessionId < 0) {
@@ -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,12 +565,12 @@ 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) ||
(mCurrentState == MEDIA_PLAYER_STATE_ERROR )) {
- LOGE("attachAuxEffect called in state %d", mCurrentState);
+ ALOGE("attachAuxEffect called in state %d", mCurrentState);
return INVALID_OPERATION;
}
@@ -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,19 +629,19 @@ 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");
+ ALOGE("playback complete in idle state");
}
if (!mLoop) {
mCurrentState = MEDIA_PLAYER_PLAYBACK_COMPLETE;
@@ -651,11 +651,11 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj)
// Always log errors.
// ext1: Media framework error code.
// ext2: Implementation dependant error code.
- LOGE("error (%d, %d)", ext1, ext2);
+ ALOGE("error (%d, %d)", ext1, ext2);
mCurrentState = MEDIA_PLAYER_STATE_ERROR;
if (mPrepareSync)
{
- LOGV("signal application thread");
+ ALOGV("signal application thread");
mPrepareSync = false;
mPrepareStatus = ext1;
mSignal.signal();
@@ -666,34 +666,34 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj)
// ext1: Media framework error code.
// ext2: Implementation dependant error code.
if (ext1 != MEDIA_INFO_VIDEO_TRACK_LAGGING) {
- LOGW("info/warning (%d, %d)", ext1, ext2);
+ ALOGW("info/warning (%d, %d)", ext1, ext2);
}
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,21 +703,21 @@ 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) {
p = service->decode(url, pSampleRate, pNumChannels, pFormat);
} else {
- LOGE("Unable to locate media service");
+ ALOGE("Unable to locate media service");
}
return p;
@@ -725,19 +725,19 @@ 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) {
p = service->decode(fd, offset, length, pSampleRate, pNumChannels, pFormat);
} else {
- LOGE("Unable to locate media service");
+ ALOGE("Unable to locate media service");
}
return p;
diff --git a/media/libmedia/mediarecorder.cpp b/media/libmedia/mediarecorder.cpp
index 11d281f..8d947d8 100644
--- a/media/libmedia/mediarecorder.cpp
+++ b/media/libmedia/mediarecorder.cpp
@@ -31,19 +31,19 @@ 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");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_IDLE)) {
- LOGE("setCamera called in an invalid state(%d)", mCurrentState);
+ ALOGE("setCamera called in an invalid state(%d)", mCurrentState);
return INVALID_OPERATION;
}
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,23 +52,23 @@ 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");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) {
- LOGE("setPreviewSurface called in an invalid state(%d)", mCurrentState);
+ ALOGE("setPreviewSurface called in an invalid state(%d)", mCurrentState);
return INVALID_OPERATION;
}
if (!mIsVideoSourceSet) {
- LOGE("try to set preview surface without setting the video source first");
+ ALOGE("try to set preview surface without setting the video source first");
return INVALID_OPERATION;
}
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,26 +77,26 @@ 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");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_IDLE)) {
- LOGE("init called in an invalid state(%d)", mCurrentState);
+ ALOGE("init called in an invalid state(%d)", mCurrentState);
return INVALID_OPERATION;
}
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,24 +107,24 @@ 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");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (mIsVideoSourceSet) {
- LOGE("video source has already been set");
+ ALOGE("video source has already been set");
return INVALID_OPERATION;
}
if (mCurrentState & MEDIA_RECORDER_IDLE) {
- 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;
}
}
if (!(mCurrentState & MEDIA_RECORDER_INITIALIZED)) {
- LOGE("setVideoSource called in an invalid state(%d)", mCurrentState);
+ ALOGE("setVideoSource called in an invalid state(%d)", mCurrentState);
return INVALID_OPERATION;
}
@@ -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,30 +142,30 @@ 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");
+ ALOGE("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;
}
}
if (mIsAudioSourceSet) {
- LOGE("audio source has already been set");
+ ALOGE("audio source has already been set");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_INITIALIZED)) {
- LOGE("setAudioSource called in an invalid state(%d)", mCurrentState);
+ ALOGE("setAudioSource called in an invalid state(%d)", mCurrentState);
return INVALID_OPERATION;
}
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,23 +175,23 @@ 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");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_INITIALIZED)) {
- LOGE("setOutputFormat called in an invalid state: %d", mCurrentState);
+ ALOGE("setOutputFormat called in an invalid state: %d", mCurrentState);
return INVALID_OPERATION;
}
if (mIsVideoSourceSet && of >= OUTPUT_FORMAT_AUDIO_ONLY_START && of != OUTPUT_FORMAT_RTP_AVP && of != OUTPUT_FORMAT_MPEG2TS) { //first non-video output format
- LOGE("output format (%d) is meant for audio recording only and incompatible with video recording", of);
+ ALOGE("output format (%d) is meant for audio recording only and incompatible with video recording", of);
return INVALID_OPERATION;
}
status_t ret = mMediaRecorder->setOutputFormat(of);
if (OK != ret) {
- LOGE("setOutputFormat failed: %d", ret);
+ ALOGE("setOutputFormat failed: %d", ret);
mCurrentState = MEDIA_RECORDER_ERROR;
return ret;
}
@@ -201,27 +201,27 @@ 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");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!mIsVideoSourceSet) {
- LOGE("try to set the video encoder without setting the video source first");
+ ALOGE("try to set the video encoder without setting the video source first");
return INVALID_OPERATION;
}
if (mIsVideoEncoderSet) {
- LOGE("video encoder has already been set");
+ ALOGE("video encoder has already been set");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) {
- LOGE("setVideoEncoder called in an invalid state(%d)", mCurrentState);
+ ALOGE("setVideoEncoder called in an invalid state(%d)", mCurrentState);
return INVALID_OPERATION;
}
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,27 +231,27 @@ 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");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!mIsAudioSourceSet) {
- LOGE("try to set the audio encoder without setting the audio source first");
+ ALOGE("try to set the audio encoder without setting the audio source first");
return INVALID_OPERATION;
}
if (mIsAudioEncoderSet) {
- LOGE("audio encoder has already been set");
+ ALOGE("audio encoder has already been set");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) {
- LOGE("setAudioEncoder called in an invalid state(%d)", mCurrentState);
+ ALOGE("setAudioEncoder called in an invalid state(%d)", mCurrentState);
return INVALID_OPERATION;
}
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,23 +261,23 @@ 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");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (mIsOutputFileSet) {
- LOGE("output file has already been set");
+ ALOGE("output file has already been set");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) {
- LOGE("setOutputFile called in an invalid state(%d)", mCurrentState);
+ ALOGE("setOutputFile called in an invalid state(%d)", mCurrentState);
return INVALID_OPERATION;
}
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,17 +287,17 @@ 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");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (mIsOutputFileSet) {
- LOGE("output file has already been set");
+ ALOGE("output file has already been set");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) {
- LOGE("setOutputFile called in an invalid state(%d)", mCurrentState);
+ ALOGE("setOutputFile called in an invalid state(%d)", mCurrentState);
return INVALID_OPERATION;
}
@@ -308,13 +308,13 @@ status_t MediaRecorder::setOutputFile(int fd, int64_t offset, int64_t length)
// this issue by checking the file descriptor first before passing
// it through binder call.
if (fd < 0) {
- LOGE("Invalid file descriptor: %d", fd);
+ ALOGE("Invalid file descriptor: %d", fd);
return BAD_VALUE;
}
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,23 +324,23 @@ 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");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) {
- LOGE("setVideoSize called in an invalid state: %d", mCurrentState);
+ ALOGE("setVideoSize called in an invalid state: %d", mCurrentState);
return INVALID_OPERATION;
}
if (!mIsVideoSourceSet) {
- LOGE("Cannot set video size without setting video source first");
+ ALOGE("Cannot set video size without setting video source first");
return INVALID_OPERATION;
}
status_t ret = mMediaRecorder->setVideoSize(width, height);
if (OK != ret) {
- LOGE("setVideoSize failed: %d", ret);
+ ALOGE("setVideoSize failed: %d", ret);
mCurrentState = MEDIA_RECORDER_ERROR;
return ret;
}
@@ -358,7 +358,7 @@ sp<ISurfaceTexture> MediaRecorder::
mSurfaceMediaSource =
mMediaRecorder->querySurfaceMediaSource();
if (mSurfaceMediaSource == NULL) {
- LOGE("SurfaceMediaSource could not be initialized!");
+ ALOGE("SurfaceMediaSource could not be initialized!");
}
return mSurfaceMediaSource;
}
@@ -367,23 +367,23 @@ 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");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) {
- LOGE("setVideoFrameRate called in an invalid state: %d", mCurrentState);
+ ALOGE("setVideoFrameRate called in an invalid state: %d", mCurrentState);
return INVALID_OPERATION;
}
if (!mIsVideoSourceSet) {
- LOGE("Cannot set video frame rate without setting video source first");
+ ALOGE("Cannot set video frame rate without setting video source first");
return INVALID_OPERATION;
}
status_t ret = mMediaRecorder->setVideoFrameRate(frames_per_second);
if (OK != ret) {
- LOGE("setVideoFrameRate failed: %d", ret);
+ ALOGE("setVideoFrameRate failed: %d", ret);
mCurrentState = MEDIA_RECORDER_ERROR;
return ret;
}
@@ -391,9 +391,9 @@ 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");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
@@ -402,13 +402,13 @@ status_t MediaRecorder::setParameters(const String8& params) {
MEDIA_RECORDER_RECORDING |
MEDIA_RECORDER_ERROR));
if (isInvalidState) {
- LOGE("setParameters is called in an invalid state: %d", mCurrentState);
+ ALOGE("setParameters is called in an invalid state: %d", mCurrentState);
return INVALID_OPERATION;
}
status_t ret = mMediaRecorder->setParameters(params);
if (OK != ret) {
- LOGE("setParameters(%s) failed: %d", params.string(), ret);
+ ALOGE("setParameters(%s) failed: %d", params.string(), ret);
// Do not change our current state to MEDIA_RECORDER_ERROR, failures
// of the only currently supported parameters, "max-duration" and
// "max-filesize" are _not_ fatal.
@@ -419,36 +419,36 @@ 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");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) {
- LOGE("prepare called in an invalid state: %d", mCurrentState);
+ ALOGE("prepare called in an invalid state: %d", mCurrentState);
return INVALID_OPERATION;
}
if (mIsAudioSourceSet != mIsAudioEncoderSet) {
if (mIsAudioSourceSet) {
- LOGE("audio source is set, but audio encoder is not set");
+ ALOGE("audio source is set, but audio encoder is not set");
} else { // must not happen, since setAudioEncoder checks this already
- LOGE("audio encoder is set, but audio source is not set");
+ ALOGE("audio encoder is set, but audio source is not set");
}
return INVALID_OPERATION;
}
if (mIsVideoSourceSet != mIsVideoEncoderSet) {
if (mIsVideoSourceSet) {
- LOGE("video source is set, but video encoder is not set");
+ ALOGE("video source is set, but video encoder is not set");
} else { // must not happen, since setVideoEncoder checks this already
- LOGE("video encoder is set, but video source is not set");
+ ALOGE("video encoder is set, but video source is not set");
}
return INVALID_OPERATION;
}
status_t ret = mMediaRecorder->prepare();
if (OK != ret) {
- LOGE("prepare failed: %d", ret);
+ ALOGE("prepare failed: %d", ret);
mCurrentState = MEDIA_RECORDER_ERROR;
return ret;
}
@@ -458,19 +458,19 @@ status_t MediaRecorder::prepare()
status_t MediaRecorder::getMaxAmplitude(int* max)
{
- LOGV("getMaxAmplitude");
+ ALOGV("getMaxAmplitude");
if(mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (mCurrentState & MEDIA_RECORDER_ERROR) {
- LOGE("getMaxAmplitude called in an invalid state: %d", mCurrentState);
+ ALOGE("getMaxAmplitude called in an invalid state: %d", mCurrentState);
return INVALID_OPERATION;
}
status_t ret = mMediaRecorder->getMaxAmplitude(max);
if (OK != ret) {
- LOGE("getMaxAmplitude failed: %d", ret);
+ ALOGE("getMaxAmplitude failed: %d", ret);
mCurrentState = MEDIA_RECORDER_ERROR;
return ret;
}
@@ -479,19 +479,19 @@ status_t MediaRecorder::getMaxAmplitude(int* max)
status_t MediaRecorder::start()
{
- LOGV("start");
+ ALOGV("start");
if (mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_PREPARED)) {
- LOGE("start called in an invalid state: %d", mCurrentState);
+ ALOGE("start called in an invalid state: %d", mCurrentState);
return INVALID_OPERATION;
}
status_t ret = mMediaRecorder->start();
if (OK != ret) {
- LOGE("start failed: %d", ret);
+ ALOGE("start failed: %d", ret);
mCurrentState = MEDIA_RECORDER_ERROR;
return ret;
}
@@ -501,19 +501,19 @@ status_t MediaRecorder::start()
status_t MediaRecorder::stop()
{
- LOGV("stop");
+ ALOGV("stop");
if (mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_RECORDING)) {
- LOGE("stop called in an invalid state: %d", mCurrentState);
+ ALOGE("stop called in an invalid state: %d", mCurrentState);
return INVALID_OPERATION;
}
status_t ret = mMediaRecorder->stop();
if (OK != ret) {
- LOGE("stop failed: %d", ret);
+ ALOGE("stop failed: %d", ret);
mCurrentState = MEDIA_RECORDER_ERROR;
return ret;
}
@@ -529,9 +529,9 @@ 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");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
@@ -556,7 +556,7 @@ status_t MediaRecorder::reset()
break;
default: {
- LOGE("Unexpected non-existing state: %d", mCurrentState);
+ ALOGE("Unexpected non-existing state: %d", mCurrentState);
break;
}
}
@@ -565,14 +565,14 @@ 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);
+ ALOGE("close called in an invalid state: %d", mCurrentState);
return INVALID_OPERATION;
}
status_t ret = mMediaRecorder->close();
if (OK != ret) {
- LOGE("close failed: %d", ret);
+ ALOGE("close failed: %d", ret);
mCurrentState = MEDIA_RECORDER_ERROR;
return UNKNOWN_ERROR;
} else {
@@ -583,10 +583,10 @@ 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);
+ ALOGE("doReset failed: %d", ret);
mCurrentState = MEDIA_RECORDER_ERROR;
return ret;
} else {
@@ -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..f5cb019 100644
--- a/media/libmediaplayerservice/MediaPlayerService.cpp
+++ b/media/libmediaplayerservice/MediaPlayerService.cpp
@@ -112,14 +112,14 @@ bool unmarshallFilter(const Parcel& p,
int32_t val;
if (p.readInt32(&val) != OK)
{
- LOGE("Failed to read filter's length");
+ ALOGE("Failed to read filter's length");
*status = NOT_ENOUGH_DATA;
return false;
}
if( val > kMaxFilterSize || val < 0)
{
- LOGE("Invalid filter len %d", val);
+ ALOGE("Invalid filter len %d", val);
*status = BAD_VALUE;
return false;
}
@@ -134,7 +134,7 @@ bool unmarshallFilter(const Parcel& p,
if (p.dataAvail() < size)
{
- LOGE("Filter too short expected %d but got %d", size, p.dataAvail());
+ ALOGE("Filter too short expected %d but got %d", size, p.dataAvail());
*status = NOT_ENOUGH_DATA;
return false;
}
@@ -144,7 +144,7 @@ bool unmarshallFilter(const Parcel& p,
if (NULL == data)
{
- LOGE("Filter had no data");
+ ALOGE("Filter had no data");
*status = BAD_VALUE;
return false;
}
@@ -184,7 +184,7 @@ static bool checkPermission(const char* permissionString) {
#endif
if (getpid() == IPCThreadState::self()->getCallingPid()) return true;
bool ok = checkCallingPermission(String16(permissionString));
- if (!ok) LOGE("Request requires %s", permissionString);
+ if (!ok) ALOGE("Request requires %s", permissionString);
return ok;
}
@@ -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;
@@ -489,14 +489,14 @@ MediaPlayerService::Client::Client(
mUID = uid;
#if CALLBACK_ANTAGONIZER
- LOGD("create Antagonizer");
+ ALOGD("create Antagonizer");
mAntagonizer = new Antagonizer(notify, this);
#endif
}
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;
@@ -523,7 +523,7 @@ void MediaPlayerService::Client::disconnect()
if (p != 0) {
p->setNotifyCallback(0, 0);
#if CALLBACK_ANTAGONIZER
- LOGD("kill Antagonizer");
+ ALOGD("kill Antagonizer");
mAntagonizer->kill();
#endif
p->reset();
@@ -614,23 +614,23 @@ 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:
- LOGE("Unknown player type: %d", playerType);
+ ALOGE("Unknown player type: %d", playerType);
return NULL;
}
if (p != NULL) {
@@ -641,7 +641,7 @@ static sp<MediaPlayerBase> createPlayer(player_type playerType, void* cookie,
}
}
if (p == NULL) {
- LOGE("Failed to create player object");
+ ALOGE("Failed to create player object");
}
return p;
}
@@ -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;
@@ -688,7 +688,7 @@ status_t MediaPlayerService::Client::setDataSource(
int fd = android::openContentProviderFile(url16);
if (fd < 0)
{
- LOGE("Couldn't open fd for %s", url);
+ ALOGE("Couldn't open fd for %s", url);
return UNKNOWN_ERROR;
}
setDataSource(fd, 0, 0x7fffffffffLL); // this sets mStatus
@@ -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,12 +708,12 @@ status_t MediaPlayerService::Client::setDataSource(
}
// now set data source
- LOGV(" setDataSource");
+ ALOGV(" setDataSource");
mStatus = p->setDataSource(url, headers);
if (mStatus == NO_ERROR) {
mPlayer = p;
} else {
- LOGE(" error: %d", mStatus);
+ ALOGE(" error: %d", mStatus);
}
return mStatus;
}
@@ -721,32 +721,32 @@ 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) {
- LOGE("fstat(%d) failed: %d, %s", fd, ret, strerror(errno));
+ ALOGE("fstat(%d) failed: %d, %s", fd, ret, strerror(errno));
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");
+ ALOGE("offset error");
::close(fd);
return UNKNOWN_ERROR;
}
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;
@@ -821,7 +821,7 @@ status_t MediaPlayerService::Client::setVideoSurfaceTexture(
NATIVE_WINDOW_API_MEDIA);
if (err != OK) {
- LOGE("setVideoSurfaceTexture failed: %d", err);
+ ALOGE("setVideoSurfaceTexture failed: %d", err);
// Note that we must do the reset before disconnecting from the ANW.
// Otherwise queue/dequeue calls could be made on the disconnected
// ANW, which may result in errors.
@@ -905,7 +905,7 @@ status_t MediaPlayerService::Client::getMetadata(
if (status != OK) {
metadata.resetParcel();
- LOGE("getMetadata failed %d", status);
+ ALOGE("getMetadata failed %d", status);
return status;
}
@@ -920,12 +920,12 @@ 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();
#if CALLBACK_ANTAGONIZER
- LOGD("start Antagonizer");
+ ALOGD("start Antagonizer");
if (ret == NO_ERROR) mAntagonizer->start();
#endif
return ret;
@@ -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,41 +962,41 @@ 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);
+ ALOGE("getCurrentPosition returned %d", ret);
}
return ret;
}
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);
+ ALOGE("getDuration returned %d", ret);
}
return ret;
}
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);
}
@@ -1131,18 +1131,18 @@ void Antagonizer::kill()
int Antagonizer::callbackThread(void* user)
{
- LOGD("Antagonizer started");
+ ALOGD("Antagonizer started");
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);
}
Mutex::Autolock _l(p->mLock);
p->mCondition.signal();
- LOGD("Antagonizer stopped");
+ ALOGD("Antagonizer stopped");
return 0;
}
#endif
@@ -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;
@@ -1160,12 +1160,12 @@ sp<IMemory> MediaPlayerService::decode(const char* url, uint32_t *pSampleRate, i
// If the application wants to decode those, it should open a
// filedescriptor for them and use that.
if (url != NULL && strncmp(url, "http://", 7) != 0) {
- LOGD("Can't decode %s by path, use filedescriptor instead", url);
+ ALOGD("Can't decode %s by path, use filedescriptor instead", url);
return mem;
}
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;
@@ -1347,11 +1347,11 @@ status_t MediaPlayerService::AudioOutput::open(
// Check argument "bufferCount" against the mininum buffer count
if (bufferCount < mMinBufferCount) {
- LOGD("bufferCount (%d) is too small and increased to %d", bufferCount, mMinBufferCount);
+ ALOGD("bufferCount (%d) is too small and increased to %d", bufferCount, mMinBufferCount);
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;
@@ -1394,12 +1394,12 @@ status_t MediaPlayerService::AudioOutput::open(
}
if ((t == 0) || (t->initCheck() != NO_ERROR)) {
- LOGE("Unable to create audio track");
+ ALOGE("Unable to create audio track");
delete t;
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,15 +1644,15 @@ 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());
+ ALOGE("Heap size overflow! req size: %d, max size: %d", (mSize + size), mHeap->getSize());
size = mHeap->getSize() - mSize;
}
memcpy(p, buffer, size);
@@ -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,24 +1680,24 @@ 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
switch (msg)
{
case MEDIA_ERROR:
- LOGE("Error %d, %d occurred", ext1, ext2);
+ ALOGE("Error %d, %d occurred", ext1, ext2);
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;
}
@@ -1772,7 +1772,7 @@ void MediaPlayerService::addBatteryData(uint32_t params)
} else if (params & kBatteryDataAudioFlingerStop) {
if (mBatteryAudio.refCount <= 0) {
- LOGW("Battery track warning: refCount is <= 0");
+ ALOGW("Battery track warning: refCount is <= 0");
return;
}
@@ -1807,7 +1807,7 @@ void MediaPlayerService::addBatteryData(uint32_t params)
info.refCount = 0;
if (mBatteryData.add(uid, info) == NO_MEMORY) {
- LOGE("Battery track error: no memory for new app");
+ ALOGE("Battery track error: no memory for new app");
return;
}
}
@@ -1825,10 +1825,10 @@ void MediaPlayerService::addBatteryData(uint32_t params)
}
} else {
if (info.refCount == 0) {
- LOGW("Battery track warning: refCount is already 0");
+ ALOGW("Battery track warning: refCount is already 0");
return;
} else if (info.refCount < 0) {
- LOGE("Battery track error: refCount < 0");
+ ALOGE("Battery track error: refCount < 0");
mBatteryData.removeItem(uid);
return;
}
diff --git a/media/libmediaplayerservice/MediaRecorderClient.cpp b/media/libmediaplayerservice/MediaRecorderClient.cpp
index 6f80b35..d219fc2 100644
--- a/media/libmediaplayerservice/MediaRecorderClient.cpp
+++ b/media/libmediaplayerservice/MediaRecorderClient.cpp
@@ -54,17 +54,17 @@ static bool checkPermission(const char* permissionString) {
#endif
if (getpid() == IPCThreadState::self()->getCallingPid()) return true;
bool ok = checkCallingPermission(String16(permissionString));
- if (!ok) LOGE("Request requires %s", permissionString);
+ if (!ok) ALOGE("Request requires %s", permissionString);
return ok;
}
sp<ISurfaceTexture> MediaRecorderClient::querySurfaceMediaSource()
{
- LOGV("Query SurfaceMediaSource");
+ ALOGV("Query SurfaceMediaSource");
Mutex::Autolock lock(mLock);
if (mRecorder == NULL) {
- LOGE("recorder is not initialized");
+ ALOGE("recorder is not initialized");
return NULL;
}
return mRecorder->querySurfaceMediaSource();
@@ -75,10 +75,10 @@ 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");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->setCamera(camera, proxy);
@@ -86,10 +86,10 @@ 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");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->setPreviewSurface(surface);
@@ -97,13 +97,13 @@ 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;
}
Mutex::Autolock lock(mLock);
if (mRecorder == NULL) {
- LOGE("recorder is not initialized");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->setVideoSource((video_source)vs);
@@ -111,13 +111,13 @@ 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;
}
Mutex::Autolock lock(mLock);
if (mRecorder == NULL) {
- LOGE("recorder is not initialized");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->setAudioSource((audio_source_t)as);
@@ -125,10 +125,10 @@ 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");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->setOutputFormat((output_format)of);
@@ -136,10 +136,10 @@ 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");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->setVideoEncoder((video_encoder)ve);
@@ -147,10 +147,10 @@ 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");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->setAudioEncoder((audio_encoder)ae);
@@ -158,10 +158,10 @@ 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");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->setOutputFile(path);
@@ -169,10 +169,10 @@ 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");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->setOutputFile(fd, offset, length);
@@ -180,10 +180,10 @@ 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");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->setVideoSize(width, height);
@@ -191,20 +191,20 @@ 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");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->setVideoFrameRate(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");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->setParameters(params);
@@ -212,10 +212,10 @@ 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");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->prepare();
@@ -224,10 +224,10 @@ 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");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->getMaxAmplitude(max);
@@ -235,10 +235,10 @@ 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");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->start();
@@ -247,10 +247,10 @@ status_t MediaRecorderClient::start()
status_t MediaRecorderClient::stop()
{
- LOGV("stop");
+ ALOGV("stop");
Mutex::Autolock lock(mLock);
if (mRecorder == NULL) {
- LOGE("recorder is not initialized");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->stop();
@@ -258,10 +258,10 @@ status_t MediaRecorderClient::stop()
status_t MediaRecorderClient::init()
{
- LOGV("init");
+ ALOGV("init");
Mutex::Autolock lock(mLock);
if (mRecorder == NULL) {
- LOGE("recorder is not initialized");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->init();
@@ -269,10 +269,10 @@ status_t MediaRecorderClient::init()
status_t MediaRecorderClient::close()
{
- LOGV("close");
+ ALOGV("close");
Mutex::Autolock lock(mLock);
if (mRecorder == NULL) {
- LOGE("recorder is not initialized");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->close();
@@ -281,10 +281,10 @@ status_t MediaRecorderClient::close()
status_t MediaRecorderClient::reset()
{
- LOGV("reset");
+ ALOGV("reset");
Mutex::Autolock lock(mLock);
if (mRecorder == NULL) {
- LOGE("recorder is not initialized");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->reset();
@@ -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,16 +313,16 @@ 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");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->setListener(listener);
diff --git a/media/libmediaplayerservice/MetadataRetrieverClient.cpp b/media/libmediaplayerservice/MetadataRetrieverClient.cpp
index d574ea3..7dbb57f 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,17 +92,17 @@ 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:
// TODO:
// support for TEST_PLAYER
- LOGE("player type %d is not supported", playerType);
+ ALOGE("player type %d is not supported", playerType);
break;
}
if (p == NULL) {
- LOGE("failed to create a retriever object");
+ ALOGE("failed to create a retriever object");
}
return p;
}
@@ -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,32 +126,32 @@ 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);
if (ret != 0) {
- LOGE("fstat(%d) failed: %d, %s", fd, ret, strerror(errno));
+ ALOGE("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);
+ ALOGE("offset (%lld) bigger than file size (%llu)", offset, sb.st_size);
::close(fd);
return BAD_VALUE;
}
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,28 +165,28 @@ 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) {
- LOGE("retriever is not initialized");
+ ALOGE("retriever is not initialized");
return NULL;
}
VideoFrame *frame = mRetriever->getFrameAtTime(timeUs, option);
if (frame == NULL) {
- LOGE("failed to capture a video frame");
+ ALOGE("failed to capture a video frame");
return NULL;
}
size_t size = sizeof(VideoFrame) + frame->mSize;
sp<MemoryHeapBase> heap = new MemoryHeapBase(size, 0, "MetadataRetrieverClient");
if (heap == NULL) {
- LOGE("failed to create MemoryDealer");
+ ALOGE("failed to create MemoryDealer");
delete frame;
return NULL;
}
mThumbnail = new MemoryBase(heap, 0, size);
if (mThumbnail == NULL) {
- LOGE("not enough memory for VideoFrame size=%u", size);
+ ALOGE("not enough memory for VideoFrame size=%u", size);
delete frame;
return 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,28 +206,28 @@ 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) {
- LOGE("retriever is not initialized");
+ ALOGE("retriever is not initialized");
return NULL;
}
MediaAlbumArt *albumArt = mRetriever->extractAlbumArt();
if (albumArt == NULL) {
- LOGE("failed to extract an album art");
+ ALOGE("failed to extract an album art");
return NULL;
}
size_t size = sizeof(MediaAlbumArt) + albumArt->mSize;
sp<MemoryHeapBase> heap = new MemoryHeapBase(size, 0, "MetadataRetrieverClient");
if (heap == NULL) {
- LOGE("failed to create MemoryDealer object");
+ ALOGE("failed to create MemoryDealer object");
delete albumArt;
return NULL;
}
mAlbumArt = new MemoryBase(heap, 0, size);
if (mAlbumArt == NULL) {
- LOGE("not enough memory for MediaAlbumArt size=%u", size);
+ ALOGE("not enough memory for MediaAlbumArt size=%u", size);
delete albumArt;
return NULL;
}
@@ -241,10 +241,10 @@ 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");
+ ALOGE("retriever is not initialized");
return NULL;
}
return mRetriever->extractMetadata(keyCode);
diff --git a/media/libmediaplayerservice/MidiFile.cpp b/media/libmediaplayerservice/MidiFile.cpp
index 7e04523..d89b5f4 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;
@@ -69,13 +69,13 @@ MidiFile::MidiFile() :
if (pLibConfig == NULL)
pLibConfig = EAS_Config();
if ((pLibConfig == NULL) || (LIB_VERSION != pLibConfig->libVersion)) {
- LOGE("EAS library/header mismatch");
+ ALOGE("EAS library/header mismatch");
goto Failed;
}
// initialize EAS library
if (EAS_Init(&mEasData) != EAS_SUCCESS) {
- LOGE("EAS_Init failed");
+ ALOGE("EAS_Init failed");
goto Failed;
}
@@ -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?
@@ -133,7 +133,7 @@ status_t MidiFile::setDataSource(
}
if (result != EAS_SUCCESS) {
- LOGE("EAS_OpenFile failed: [%d]", (int)result);
+ ALOGE("EAS_OpenFile failed: [%d]", (int)result);
mState = EAS_STATE_ERROR;
return ERROR_OPEN_FAILED;
}
@@ -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?
@@ -161,7 +161,7 @@ status_t MidiFile::setDataSource(int fd, int64_t offset, int64_t length)
updateState();
if (result != EAS_SUCCESS) {
- LOGE("EAS_OpenFile failed: [%d]", (int)result);
+ ALOGE("EAS_OpenFile failed: [%d]", (int)result);
mState = EAS_STATE_ERROR;
return ERROR_OPEN_FAILED;
}
@@ -173,14 +173,14 @@ 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;
}
EAS_RESULT result;
if ((result = EAS_Prepare(mEasData, mEasHandle)) != EAS_SUCCESS) {
- LOGE("EAS_Prepare failed: [%ld]", result);
+ ALOGE("EAS_Prepare failed: [%ld]", result);
return ERROR_EAS_FAILURE;
}
updateState();
@@ -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;
@@ -236,7 +236,7 @@ status_t MidiFile::stop()
if (!mPaused && (mState != EAS_STATE_STOPPED)) {
EAS_RESULT result = EAS_Pause(mEasData, mEasHandle);
if (result != EAS_SUCCESS) {
- LOGE("EAS_Pause returned error %ld", result);
+ ALOGE("EAS_Pause returned error %ld", result);
return ERROR_EAS_FAILURE;
}
}
@@ -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);
@@ -257,7 +257,7 @@ status_t MidiFile::seekTo(int position)
if ((result = EAS_Locate(mEasData, mEasHandle, position, false))
!= EAS_SUCCESS)
{
- LOGE("EAS_Locate returned %ld", result);
+ ALOGE("EAS_Locate returned %ld", result);
return ERROR_EAS_FAILURE;
}
EAS_GetLocation(mEasData, mEasHandle, &mPlayTime);
@@ -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,20 +283,20 @@ 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");
+ ALOGE("getCurrentPosition(): file not open");
return ERROR_NOT_OPEN;
}
if (mPlayTime < 0) {
- LOGE("getCurrentPosition(): mPlayTime = %ld", mPlayTime);
+ ALOGE("getCurrentPosition(): mPlayTime = %ld", mPlayTime);
return ERROR_EAS_FAILURE;
}
*position = mPlayTime;
@@ -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;
@@ -421,7 +421,7 @@ status_t MidiFile::setLooping(int loop)
status_t MidiFile::createOutputTrack() {
if (mAudioSink->open(pLibConfig->sampleRate, pLibConfig->numChannels, AUDIO_FORMAT_PCM_16_BIT, 2) != NO_ERROR) {
- LOGE("mAudioSink open failed");
+ ALOGE("mAudioSink open failed");
return ERROR_OPEN_FAILED;
}
return NO_ERROR;
@@ -438,12 +438,12 @@ 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];
if (!mAudioBuffer) {
- LOGE("mAudioBuffer allocate failed");
+ ALOGE("mAudioBuffer allocate failed");
goto threadExit;
}
@@ -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,41 +471,41 @@ 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++) {
result = EAS_Render(mEasData, p, pLibConfig->mixBufferSize, &count);
if (result != EAS_SUCCESS) {
- LOGE("EAS_Render returned %ld", result);
+ ALOGE("EAS_Render returned %ld", result);
}
p += count * pLibConfig->numChannels;
num_output += count * pLibConfig->numChannels * sizeof(EAS_PCM);
}
// 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);
+ ALOGE("Error in writing:%d",temp);
return temp;
}
// start audio output if necessary
if (!audioStarted) {
- //LOGV("MidiFile::render - starting audio");
+ //ALOGV("MidiFile::render - starting audio");
mAudioSink->start();
audioStarted = true;
}
@@ -517,18 +517,18 @@ int MidiFile::render() {
switch(mState) {
case EAS_STATE_STOPPED:
{
- LOGV("MidiFile::render - stopped");
+ ALOGV("MidiFile::render - stopped");
sendEvent(MEDIA_PLAYBACK_COMPLETE);
break;
}
case EAS_STATE_ERROR:
{
- LOGE("MidiFile::render - error");
+ ALOGE("MidiFile::render - error");
sendEvent(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN);
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..465209f 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,10 +60,10 @@ 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");
+ ALOGE("Midi player is not initialized yet");
return NULL;
}
switch (keyCode) {
@@ -72,17 +72,17 @@ const char* MidiMetadataRetriever::extractMetadata(int keyCode)
if (mMetadataValues[0][0] == '\0') {
int duration = -1;
if (mMidiPlayer->getDuration(&duration) != NO_ERROR) {
- LOGE("failed to get duration");
+ ALOGE("failed to get duration");
return NULL;
}
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:
- LOGE("Unsupported key code (%d)", keyCode);
+ ALOGE("Unsupported key code (%d)", keyCode);
return NULL;
}
return NULL;
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..4632016 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,15 +89,15 @@ 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);
+ ALOGE("Invalid audio source: %d", as);
return BAD_VALUE;
}
@@ -111,10 +111,10 @@ 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);
+ ALOGE("Invalid video source: %d", vs);
return BAD_VALUE;
}
@@ -128,10 +128,10 @@ 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);
+ ALOGE("Invalid output format: %d", of);
return BAD_VALUE;
}
@@ -145,10 +145,10 @@ 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);
+ ALOGE("Invalid audio encoder: %d", ae);
return BAD_VALUE;
}
@@ -162,10 +162,10 @@ 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);
+ ALOGE("Invalid video encoder: %d", ve);
return BAD_VALUE;
}
@@ -179,9 +179,9 @@ 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);
+ ALOGE("Invalid video size: %dx%d", width, height);
return BAD_VALUE;
}
@@ -193,10 +193,10 @@ 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);
+ ALOGE("Invalid video frame rate: %d", frames_per_second);
return BAD_VALUE;
}
@@ -208,13 +208,13 @@ 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");
+ ALOGE("camera is NULL");
return BAD_VALUE;
}
if (proxy == 0) {
- LOGE("camera proxy is NULL");
+ ALOGE("camera proxy is NULL");
return BAD_VALUE;
}
@@ -224,14 +224,14 @@ 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;
}
status_t StagefrightRecorder::setOutputFile(const char *path) {
- LOGE("setOutputFile(const char*) must not be called");
+ ALOGE("setOutputFile(const char*) must not be called");
// We don't actually support this at all, as the media_server process
// no longer has permissions to create files.
@@ -239,13 +239,13 @@ 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);
if (fd < 0) {
- LOGE("Invalid file descriptor: %d", fd);
+ ALOGE("Invalid file descriptor: %d", fd);
return -EBADF;
}
@@ -313,9 +313,9 @@ 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);
+ ALOGE("Invalid audio sampling rate: %d", sampleRate);
return BAD_VALUE;
}
@@ -325,9 +325,9 @@ 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);
+ ALOGE("Invalid number of audio channels: %d", channels);
return BAD_VALUE;
}
@@ -337,9 +337,9 @@ 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);
+ ALOGE("Invalid audio encoding bit rate: %d", bitRate);
return BAD_VALUE;
}
@@ -352,9 +352,9 @@ 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);
+ ALOGE("Invalid video encoding bit rate: %d", bitRate);
return BAD_VALUE;
}
@@ -368,9 +368,9 @@ 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);
+ ALOGE("Unsupported video rotation angle: %d", degrees);
return BAD_VALUE;
}
mRotationDegrees = degrees % 360;
@@ -378,39 +378,39 @@ 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) {
- LOGW("Max file duration is not positive: %lld us. Disabling duration limit.", timeUs);
+ ALOGW("Max file duration is not positive: %lld us. Disabling duration limit.", timeUs);
timeUs = 0; // Disable the duration limit for zero or negative values.
} else if (timeUs <= 100000LL) { // XXX: 100 milli-seconds
- LOGE("Max file duration is too short: %lld us", timeUs);
+ ALOGE("Max file duration is too short: %lld us", timeUs);
return BAD_VALUE;
}
if (timeUs <= 15 * 1000000LL) {
- LOGW("Target duration (%lld us) too short to be respected", timeUs);
+ ALOGW("Target duration (%lld us) too short to be respected", timeUs);
}
mMaxFileDurationUs = timeUs;
return OK;
}
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) {
- LOGW("Max file size is not positive: %lld bytes. "
+ ALOGW("Max file size is not positive: %lld bytes. "
"Disabling file size limit.", bytes);
bytes = 0; // Disable the file size limit for zero or negative values.
} else if (bytes <= 1024) { // XXX: 1 kB
- LOGE("Max file size is too small: %lld bytes", bytes);
+ ALOGE("Max file size is too small: %lld bytes", bytes);
return BAD_VALUE;
}
if (bytes <= 100 * 1024) {
- LOGW("Target file size (%lld bytes) is too small to be respected", bytes);
+ ALOGW("Target file size (%lld bytes) is too small to be respected", bytes);
}
mMaxFileSizeBytes = bytes;
@@ -418,18 +418,18 @@ 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
// portion of the saved contents
- LOGE("Audio/video interleave duration is too small: %d us", durationUs);
+ ALOGE("Audio/video interleave duration is too small: %d us", durationUs);
return BAD_VALUE;
} else if (durationUs >= 10000000) { // 10 seconds
// If interleaving duration is too large, it can cause the recording
// session to use too much memory since we have to save the output
// data before we write them out
- LOGE("Audio/video interleave duration is too large: %d us", durationUs);
+ ALOGE("Audio/video interleave duration is too large: %d us", durationUs);
return BAD_VALUE;
}
mInterleaveDurationUs = durationUs;
@@ -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,9 +462,9 @@ 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);
+ ALOGE("Tracking time duration too short: %lld us", timeDurationUs);
return BAD_VALUE;
}
mTrackEveryTimeDurationUs = timeDurationUs;
@@ -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,12 +490,12 @@ 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.
if (timeScale < 600 || timeScale > 96000) {
- LOGE("Time scale (%d) for movie is out of range [600, 96000]", timeScale);
+ ALOGE("Time scale (%d) for movie is out of range [600, 96000]", timeScale);
return BAD_VALUE;
}
mMovieTimeScale = timeScale;
@@ -503,12 +503,12 @@ 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.
if (timeScale < 600 || timeScale > 60000) {
- LOGE("Time scale (%d) for video is out of range [600, 60000]", timeScale);
+ ALOGE("Time scale (%d) for video is out of range [600, 60000]", timeScale);
return BAD_VALUE;
}
mVideoTimeScale = timeScale;
@@ -516,11 +516,11 @@ 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) {
- LOGE("Time scale (%d) for audio is out of range [600, 96000]", timeScale);
+ ALOGE("Time scale (%d) for audio is out of range [600, 96000]", timeScale);
return BAD_VALUE;
}
mAudioTimeScale = timeScale;
@@ -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,11 +541,11 @@ 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) {
- LOGE("Time between time lapse frame capture (%lld) is out of range [0, 1 Day]", timeUs);
+ ALOGE("Time between time lapse frame capture (%lld) is out of range [0, 1 Day]", timeUs);
return BAD_VALUE;
}
@@ -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)) {
@@ -683,25 +683,25 @@ status_t StagefrightRecorder::setParameter(
1000LL * timeBetweenTimeLapseFrameCaptureMs);
}
} else {
- LOGE("setParameter: failed to find key %s", key.string());
+ ALOGE("setParameter: failed to find key %s", key.string());
}
return BAD_VALUE;
}
status_t StagefrightRecorder::setParameters(const String8 &params) {
- LOGV("setParameters: %s", params.string());
+ ALOGV("setParameters: %s", params.string());
const char *cparams = params.string();
const char *key_start = cparams;
for (;;) {
const char *equal_pos = strchr(key_start, '=');
if (equal_pos == NULL) {
- LOGE("Parameters %s miss a value", cparams);
+ ALOGE("Parameters %s miss a value", cparams);
return BAD_VALUE;
}
String8 key(key_start, equal_pos - key_start);
TrimString(&key);
if (key.length() == 0) {
- LOGE("Parameters %s contains an empty key", cparams);
+ ALOGE("Parameters %s contains an empty key", cparams);
return BAD_VALUE;
}
const char *value_start = equal_pos + 1;
@@ -737,7 +737,7 @@ status_t StagefrightRecorder::start() {
CHECK(mOutputFd >= 0);
if (mWriter != NULL) {
- LOGE("File writer is not avaialble");
+ ALOGE("File writer is not avaialble");
return UNKNOWN_ERROR;
}
@@ -769,7 +769,7 @@ status_t StagefrightRecorder::start() {
break;
default:
- LOGE("Unsupported output file format: %d", mOutputFormat);
+ ALOGE("Unsupported output file format: %d", mOutputFormat);
status = UNKNOWN_ERROR;
break;
}
@@ -801,7 +801,7 @@ sp<MediaSource> StagefrightRecorder::createAudioSource() {
status_t err = audioSource->initCheck();
if (err != OK) {
- LOGE("audio source is not initialized");
+ ALOGE("audio source is not initialized");
return NULL;
}
@@ -819,7 +819,7 @@ sp<MediaSource> StagefrightRecorder::createAudioSource() {
mime = MEDIA_MIMETYPE_AUDIO_AAC;
break;
default:
- LOGE("Unknown audio encoder: %d", mAudioEncoder);
+ ALOGE("Unknown audio encoder: %d", mAudioEncoder);
return NULL;
}
encMeta->setCString(kKeyMIMEType, mime);
@@ -872,13 +872,13 @@ status_t StagefrightRecorder::startAMRRecording() {
if (mOutputFormat == OUTPUT_FORMAT_AMR_NB) {
if (mAudioEncoder != AUDIO_ENCODER_DEFAULT &&
mAudioEncoder != AUDIO_ENCODER_AMR_NB) {
- LOGE("Invalid encoder %d used for AMRNB recording",
+ ALOGE("Invalid encoder %d used for AMRNB recording",
mAudioEncoder);
return BAD_VALUE;
}
} else { // mOutputFormat must be OUTPUT_FORMAT_AMR_WB
if (mAudioEncoder != AUDIO_ENCODER_AMR_WB) {
- LOGE("Invlaid encoder %d used for AMRWB recording",
+ ALOGE("Invlaid encoder %d used for AMRWB recording",
mAudioEncoder);
return BAD_VALUE;
}
@@ -895,7 +895,7 @@ status_t StagefrightRecorder::startAMRRecording() {
status_t StagefrightRecorder::startRawAudioRecording() {
if (mAudioSource >= AUDIO_SOURCE_CNT) {
- LOGE("Invalid audio source: %d", mAudioSource);
+ ALOGE("Invalid audio source: %d", mAudioSource);
return BAD_VALUE;
}
@@ -1016,51 +1016,51 @@ 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(
"enc.vid.fps.max", mVideoEncoder);
if (mFrameRate < minFrameRate && mFrameRate != -1) {
- LOGW("Intended video encoding frame rate (%d fps) is too small"
+ ALOGW("Intended video encoding frame rate (%d fps) is too small"
" and will be set to (%d fps)", mFrameRate, minFrameRate);
mFrameRate = minFrameRate;
} else if (mFrameRate > maxFrameRate) {
- LOGW("Intended video encoding frame rate (%d fps) is too large"
+ ALOGW("Intended video encoding frame rate (%d fps) is too large"
" and will be set to (%d fps)", mFrameRate, maxFrameRate);
mFrameRate = maxFrameRate;
}
}
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(
"enc.vid.bps.max", mVideoEncoder);
if (mVideoBitRate < minBitRate) {
- LOGW("Intended video encoding bit rate (%d bps) is too small"
+ ALOGW("Intended video encoding bit rate (%d bps) is too small"
" and will be set to (%d bps)", mVideoBitRate, minBitRate);
mVideoBitRate = minBitRate;
} else if (mVideoBitRate > maxBitRate) {
- LOGW("Intended video encoding bit rate (%d bps) is too large"
+ ALOGW("Intended video encoding bit rate (%d bps) is too large"
" and will be set to (%d bps)", mVideoBitRate, maxBitRate);
mVideoBitRate = maxBitRate;
}
}
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(
"enc.vid.width.max", mVideoEncoder);
if (mVideoWidth < minFrameWidth) {
- LOGW("Intended video encoding frame width (%d) is too small"
+ ALOGW("Intended video encoding frame width (%d) is too small"
" and will be set to (%d)", mVideoWidth, minFrameWidth);
mVideoWidth = minFrameWidth;
} else if (mVideoWidth > maxFrameWidth) {
- LOGW("Intended video encoding frame width (%d) is too large"
+ ALOGW("Intended video encoding frame width (%d) is too large"
" and will be set to (%d)", mVideoWidth, maxFrameWidth);
mVideoWidth = maxFrameWidth;
}
@@ -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;
@@ -1131,7 +1131,7 @@ void StagefrightRecorder::setDefaultProfileIfNecessary() {
audioSampleRate == mSampleRate &&
audioChannels == mAudioChannels) {
if (videoCodec == VIDEO_ENCODER_H264) {
- LOGI("Force to use AVC baseline profile");
+ ALOGI("Force to use AVC baseline profile");
setParamVideoEncoderProfile(OMX_VIDEO_AVCProfileBaseline);
}
}
@@ -1145,13 +1145,13 @@ status_t StagefrightRecorder::checkAudioEncoderCapabilities() {
}
void StagefrightRecorder::clipAudioBitRate() {
- LOGV("clipAudioBitRate: encoder %d", mAudioEncoder);
+ ALOGV("clipAudioBitRate: encoder %d", mAudioEncoder);
int minAudioBitRate =
mEncoderProfiles->getAudioEncoderParamByName(
"enc.aud.bps.min", mAudioEncoder);
if (mAudioBitRate < minAudioBitRate) {
- LOGW("Intended audio encoding bit rate (%d) is too small"
+ ALOGW("Intended audio encoding bit rate (%d) is too small"
" and will be set to (%d)", mAudioBitRate, minAudioBitRate);
mAudioBitRate = minAudioBitRate;
}
@@ -1160,20 +1160,20 @@ void StagefrightRecorder::clipAudioBitRate() {
mEncoderProfiles->getAudioEncoderParamByName(
"enc.aud.bps.max", mAudioEncoder);
if (mAudioBitRate > maxAudioBitRate) {
- LOGW("Intended audio encoding bit rate (%d) is too large"
+ ALOGW("Intended audio encoding bit rate (%d) is too large"
" and will be set to (%d)", mAudioBitRate, maxAudioBitRate);
mAudioBitRate = maxAudioBitRate;
}
}
void StagefrightRecorder::clipAudioSampleRate() {
- LOGV("clipAudioSampleRate: encoder %d", mAudioEncoder);
+ ALOGV("clipAudioSampleRate: encoder %d", mAudioEncoder);
int minSampleRate =
mEncoderProfiles->getAudioEncoderParamByName(
"enc.aud.hz.min", mAudioEncoder);
if (mSampleRate < minSampleRate) {
- LOGW("Intended audio sample rate (%d) is too small"
+ ALOGW("Intended audio sample rate (%d) is too small"
" and will be set to (%d)", mSampleRate, minSampleRate);
mSampleRate = minSampleRate;
}
@@ -1182,20 +1182,20 @@ void StagefrightRecorder::clipAudioSampleRate() {
mEncoderProfiles->getAudioEncoderParamByName(
"enc.aud.hz.max", mAudioEncoder);
if (mSampleRate > maxSampleRate) {
- LOGW("Intended audio sample rate (%d) is too large"
+ ALOGW("Intended audio sample rate (%d) is too large"
" and will be set to (%d)", mSampleRate, maxSampleRate);
mSampleRate = maxSampleRate;
}
}
void StagefrightRecorder::clipNumberOfAudioChannels() {
- LOGV("clipNumberOfAudioChannels: encoder %d", mAudioEncoder);
+ ALOGV("clipNumberOfAudioChannels: encoder %d", mAudioEncoder);
int minChannels =
mEncoderProfiles->getAudioEncoderParamByName(
"enc.aud.ch.min", mAudioEncoder);
if (mAudioChannels < minChannels) {
- LOGW("Intended number of audio channels (%d) is too small"
+ ALOGW("Intended number of audio channels (%d) is too small"
" and will be set to (%d)", mAudioChannels, minChannels);
mAudioChannels = minChannels;
}
@@ -1204,24 +1204,24 @@ void StagefrightRecorder::clipNumberOfAudioChannels() {
mEncoderProfiles->getAudioEncoderParamByName(
"enc.aud.ch.max", mAudioEncoder);
if (mAudioChannels > maxChannels) {
- LOGW("Intended number of audio channels (%d) is too large"
+ ALOGW("Intended number of audio channels (%d) is too large"
" and will be set to (%d)", mAudioChannels, maxChannels);
mAudioChannels = maxChannels;
}
}
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(
"enc.vid.height.max", mVideoEncoder);
if (mVideoHeight < minFrameHeight) {
- LOGW("Intended video encoding frame height (%d) is too small"
+ ALOGW("Intended video encoding frame height (%d) is too small"
" and will be set to (%d)", mVideoHeight, minFrameHeight);
mVideoHeight = minFrameHeight;
} else if (mVideoHeight > maxFrameHeight) {
- LOGW("Intended video encoding frame height (%d) is too large"
+ ALOGW("Intended video encoding frame height (%d) is too large"
" and will be set to (%d)", mVideoHeight, maxFrameHeight);
mVideoHeight = maxFrameHeight;
}
@@ -1268,7 +1268,7 @@ status_t StagefrightRecorder::setupSurfaceMediaSource() {
int32_t frameRate = 0;
CHECK (mSurfaceMediaSource->getFormat()->findInt32(
kKeyFrameRate, &frameRate));
- LOGI("Frame rate is not explicitly set. Use the current frame "
+ ALOGI("Frame rate is not explicitly set. Use the current frame "
"rate (%d fps)", frameRate);
mFrameRate = frameRate;
} else {
@@ -1319,7 +1319,7 @@ status_t StagefrightRecorder::setupCameraSource(
int32_t frameRate = 0;
CHECK ((*cameraSource)->getFormat()->findInt32(
kKeyFrameRate, &frameRate));
- LOGI("Frame rate is not explicitly set. Use the current frame "
+ ALOGI("Frame rate is not explicitly set. Use the current frame "
"rate (%d fps)", frameRate);
mFrameRate = frameRate;
}
@@ -1406,7 +1406,7 @@ status_t StagefrightRecorder::setupVideoEncoder(
true /* createEncoder */, cameraSource,
NULL, encoder_flags);
if (encoder == NULL) {
- LOGW("Failed to create the encoder");
+ ALOGW("Failed to create the encoder");
// When the encoder fails to be created, we need
// release the camera source due to the camera's lock
// and unlock mechanism.
@@ -1432,7 +1432,7 @@ status_t StagefrightRecorder::setupAudioEncoder(const sp<MediaWriter>& writer) {
break;
default:
- LOGE("Unsupported audio encoder: %d", mAudioEncoder);
+ ALOGE("Unsupported audio encoder: %d", mAudioEncoder);
return UNKNOWN_ERROR;
}
@@ -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,10 +1664,10 @@ status_t StagefrightRecorder::reset() {
}
status_t StagefrightRecorder::getMaxAmplitude(int *max) {
- LOGV("getMaxAmplitude");
+ ALOGV("getMaxAmplitude");
if (max == NULL) {
- LOGE("Null pointer argument");
+ ALOGE("Null pointer argument");
return BAD_VALUE;
}
@@ -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/TestPlayerStub.cpp b/media/libmediaplayerservice/TestPlayerStub.cpp
index 169e49a..5d9728a 100644
--- a/media/libmediaplayerservice/TestPlayerStub.cpp
+++ b/media/libmediaplayerservice/TestPlayerStub.cpp
@@ -134,7 +134,7 @@ status_t TestPlayerStub::setDataSource(
// None of the entry points should be NULL.
mHandle = ::dlopen(mFilename, RTLD_NOW | RTLD_GLOBAL);
if (!mHandle) {
- LOGE("dlopen failed: %s", ::dlerror());
+ ALOGE("dlopen failed: %s", ::dlerror());
resetInternal();
return UNKNOWN_ERROR;
}
@@ -147,7 +147,7 @@ status_t TestPlayerStub::setDataSource(
if (err || mNewPlayer == NULL) {
// if err is NULL the string <null> is inserted in the logs =>
// mNewPlayer was NULL.
- LOGE("dlsym for newPlayer failed %s", err);
+ ALOGE("dlsym for newPlayer failed %s", err);
resetInternal();
return UNKNOWN_ERROR;
}
@@ -156,7 +156,7 @@ status_t TestPlayerStub::setDataSource(
"deletePlayer"));
err = ::dlerror();
if (err || mDeletePlayer == NULL) {
- LOGE("dlsym for deletePlayer failed %s", err);
+ ALOGE("dlsym for deletePlayer failed %s", err);
resetInternal();
return UNKNOWN_ERROR;
}
@@ -176,7 +176,7 @@ status_t TestPlayerStub::resetInternal()
mContentUrl = NULL;
if (mPlayer) {
- LOG_ASSERT(mDeletePlayer != NULL, "mDeletePlayer is null");
+ ALOG_ASSERT(mDeletePlayer != NULL, "mDeletePlayer is null");
(*mDeletePlayer)(mPlayer);
mPlayer = NULL;
}
diff --git a/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp b/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp
index 079f6fa..22b8847 100644
--- a/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp
+++ b/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp
@@ -111,9 +111,9 @@ status_t NuPlayer::HTTPLiveSource::feedMoreTSData() {
break;
} else if (n < 0) {
if (n != ERROR_END_OF_STREAM) {
- LOGI("input data EOS reached, error %ld", n);
+ ALOGI("input data EOS reached, error %ld", n);
} else {
- LOGI("input data EOS reached.");
+ ALOGI("input data EOS reached.");
}
mTSParser->signalEOS(n);
mFinalResult = n;
@@ -131,7 +131,7 @@ status_t NuPlayer::HTTPLiveSource::feedMoreTSData() {
status_t err = mTSParser->feedTSPacket(buffer, sizeof(buffer));
if (err != OK) {
- LOGE("TS Parser returned error %d", err);
+ ALOGE("TS Parser returned error %d", err);
mTSParser->signalEOS(err);
mFinalResult = err;
break;
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
index 93ab704..a00aaa5 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();
@@ -383,7 +383,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) {
finishFlushIfPossible();
} else if (what == ACodec::kWhatError) {
- LOGE("Received error from %s decoder, aborting playback.",
+ ALOGE("Received error from %s decoder, aborting playback.",
audio ? "audio" : "video");
mRenderer->queueEOS(audio, UNKNOWN_ERROR);
@@ -415,9 +415,9 @@ 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)",
+ ALOGE("%s track encountered an error (%d)",
audio ? "audio" : "video", finalResult);
notifyListener(
@@ -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;
@@ -705,7 +705,7 @@ status_t NuPlayer::feedDecoderInputData(bool audio, const sp<AMessage> &msg) {
int64_t resumeAtMediaTimeUs;
if (extra->findInt64(
"resume-at-mediatimeUs", &resumeAtMediaTimeUs)) {
- LOGI("suppressing rendering of %s until %lld us",
+ ALOGI("suppressing rendering of %s until %lld us",
audio ? "audio" : "video", resumeAtMediaTimeUs);
if (audio) {
@@ -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);
@@ -838,7 +838,7 @@ void NuPlayer::notifyListener(int msg, int ext1, int ext2) {
void NuPlayer::flushDecoder(bool audio, bool needShutdown) {
if ((audio && mAudioDecoder == NULL) || (!audio && mVideoDecoder == NULL)) {
- LOGI("flushDecoder %s without decoder present",
+ ALOGI("flushDecoder %s without decoder present",
audio ? "audio" : "video");
}
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp
index 0cb7f45..074cb4f 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp
+++ b/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp
@@ -228,9 +228,9 @@ bool NuPlayer::Renderer::onDrainAudioQueue() {
#if 0
if (numFramesAvailableToWrite == mAudioSink->frameCount()) {
- LOGI("audio sink underrun");
+ ALOGI("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;
@@ -270,7 +270,7 @@ bool NuPlayer::Renderer::onDrainAudioQueue() {
+ numFramesPendingPlayout
* mAudioSink->msecsPerFrame()) * 1000ll;
- // LOGI("realTimeOffsetUs = %lld us", realTimeOffsetUs);
+ // ALOGI("realTimeOffsetUs = %lld us", realTimeOffsetUs);
mAnchorTimeRealUs =
ALooper::GetNowUs() + realTimeOffsetUs;
@@ -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..6eb0d07 100644
--- a/media/libmediaplayerservice/nuplayer/RTSPSource.cpp
+++ b/media/libmediaplayerservice/nuplayer/RTSPSource.cpp
@@ -226,7 +226,7 @@ void NuPlayer::RTSPSource::onMessageReceived(const sp<AMessage> &msg) {
int32_t damaged;
if (accessUnit->meta()->findInt32("damaged", &damaged)
&& damaged) {
- LOGI("dropping damaged access unit.");
+ ALOGI("dropping damaged access unit.");
break;
}
@@ -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/libmediaplayerservice/nuplayer/StreamingSource.cpp b/media/libmediaplayerservice/nuplayer/StreamingSource.cpp
index 2e63b3b..7c9bc5e 100644
--- a/media/libmediaplayerservice/nuplayer/StreamingSource.cpp
+++ b/media/libmediaplayerservice/nuplayer/StreamingSource.cpp
@@ -58,7 +58,7 @@ status_t NuPlayer::StreamingSource::feedMoreTSData() {
ssize_t n = mStreamListener->read(buffer, sizeof(buffer), &extra);
if (n == 0) {
- LOGI("input data EOS reached.");
+ ALOGI("input data EOS reached.");
mTSParser->signalEOS(ERROR_END_OF_STREAM);
mFinalResult = ERROR_END_OF_STREAM;
break;
@@ -70,7 +70,7 @@ status_t NuPlayer::StreamingSource::feedMoreTSData() {
&& extra->findInt32(
IStreamListener::kKeyDiscontinuityMask, &mask)) {
if (mask == 0) {
- LOGE("Client specified an illegal discontinuity type.");
+ ALOGE("Client specified an illegal discontinuity type.");
return ERROR_UNSUPPORTED;
}
@@ -94,7 +94,7 @@ status_t NuPlayer::StreamingSource::feedMoreTSData() {
status_t err = mTSParser->feedTSPacket(buffer, sizeof(buffer));
if (err != OK) {
- LOGE("TS Parser returned error %d", err);
+ ALOGE("TS Parser returned error %d", err);
mTSParser->signalEOS(err);
mFinalResult = err;
diff --git a/media/libstagefright/AACWriter.cpp b/media/libstagefright/AACWriter.cpp
index d133e91..1673ccd 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) {
@@ -84,7 +84,7 @@ status_t AACWriter::addSource(const sp<MediaSource> &source) {
}
if (mSource != NULL) {
- LOGE("AAC files only support a single track of audio.");
+ ALOGE("AAC files only support a single track of audio.");
return UNKNOWN_ERROR;
}
@@ -209,14 +209,14 @@ 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;
}
}
- LOGE("Sampling rate %d bps is not supported", sampleRate);
+ ALOGE("Sampling rate %d bps is not supported", sampleRate);
return false;
}
@@ -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..ca44ea3 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");
@@ -394,7 +394,7 @@ status_t ACodec::allocateBuffersOnPort(OMX_U32 portIndex) {
if (portIndex == kPortIndexInput && i == 0) {
// Only log this warning once per allocation round.
- LOGW("OMX.TI.DUCATI1.VIDEO.DECODER requires the use of "
+ ALOGW("OMX.TI.DUCATI1.VIDEO.DECODER requires the use of "
"OMX_AllocateBuffer instead of the preferred "
"OMX_UseBuffer. Vendor must fix this.");
}
@@ -445,7 +445,7 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() {
def.format.video.eColorFormat);
if (err != 0) {
- LOGE("native_window_set_buffers_geometry failed: %s (%d)",
+ ALOGE("native_window_set_buffers_geometry failed: %s (%d)",
strerror(-err), -err);
return err;
}
@@ -454,7 +454,7 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() {
OMX_U32 usage = 0;
err = mOMX->getGraphicBufferUsage(mNode, kPortIndexOutput, &usage);
if (err != 0) {
- LOGW("querying usage flags from OMX IL component failed: %d", err);
+ ALOGW("querying usage flags from OMX IL component failed: %d", err);
// XXX: Currently this error is logged, but not fatal.
usage = 0;
}
@@ -464,7 +464,7 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() {
usage | GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_EXTERNAL_DISP);
if (err != 0) {
- LOGE("native_window_set_usage failed: %s (%d)", strerror(-err), -err);
+ ALOGE("native_window_set_usage failed: %s (%d)", strerror(-err), -err);
return err;
}
@@ -474,7 +474,7 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() {
&minUndequeuedBufs);
if (err != 0) {
- LOGE("NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS query failed: %s (%d)",
+ ALOGE("NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS query failed: %s (%d)",
strerror(-err), -err);
return err;
}
@@ -489,7 +489,7 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() {
mNode, OMX_IndexParamPortDefinition, &def, sizeof(def));
if (err != OK) {
- LOGE("[%s] setting nBufferCountActual to %lu failed: %d",
+ ALOGE("[%s] setting nBufferCountActual to %lu failed: %d",
mComponentName.c_str(), newBufferCount, err);
return err;
}
@@ -499,12 +499,12 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() {
mNativeWindow.get(), def.nBufferCountActual);
if (err != 0) {
- LOGE("native_window_set_buffer_count failed: %s (%d)", strerror(-err),
+ ALOGE("native_window_set_buffer_count failed: %s (%d)", strerror(-err),
-err);
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);
@@ -513,7 +513,7 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() {
ANativeWindowBuffer *buf;
err = mNativeWindow->dequeueBuffer(mNativeWindow.get(), &buf);
if (err != 0) {
- LOGE("dequeueBuffer failed: %s (%d)", strerror(-err), -err);
+ ALOGE("dequeueBuffer failed: %s (%d)", strerror(-err), -err);
break;
}
@@ -528,14 +528,14 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() {
err = mOMX->useGraphicBuffer(mNode, kPortIndexOutput, graphicBuffer,
&bufferId);
if (err != 0) {
- LOGE("registering GraphicBuffer %lu with OMX IL component failed: "
+ ALOGE("registering GraphicBuffer %lu with OMX IL component failed: "
"%d", i, err);
break;
}
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(
@@ -581,7 +581,7 @@ status_t ACodec::cancelBufferToNativeWindow(BufferInfo *info) {
ACodec::BufferInfo *ACodec::dequeueBufferFromNativeWindow() {
ANativeWindowBuffer *buf;
if (mNativeWindow->dequeueBuffer(mNativeWindow.get(), &buf) != 0) {
- LOGE("dequeueBuffer failed.");
+ ALOGE("dequeueBuffer failed.");
return NULL;
}
@@ -734,7 +734,7 @@ void ACodec::setComponentRole(
&roleParams, sizeof(roleParams));
if (err != OK) {
- LOGW("[%s] Failed to set standard component role '%s'.",
+ ALOGW("[%s] Failed to set standard component role '%s'.",
mComponentName.c_str(), role);
}
}
@@ -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,13 +1361,13 @@ 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;
}
- LOGE("[%s] ERROR(0x%08lx)", mCodec->mComponentName.c_str(), data1);
+ ALOGE("[%s] ERROR(0x%08lx)", mCodec->mComponentName.c_str(), data1);
mCodec->signalError((OMX_ERRORTYPE)data1);
@@ -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),
@@ -1826,7 +1826,7 @@ void ACodec::UninitializedState::onSetup(
}
if (node == NULL) {
- LOGE("Unable to instantiate a decoder for type '%s'.", mime.c_str());
+ ALOGE("Unable to instantiate a decoder for type '%s'.", mime.c_str());
mCodec->signalError(OMX_ErrorComponentNotFound);
return;
@@ -1870,11 +1870,11 @@ 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) {
- LOGE("Failed to allocate buffers after transitioning to IDLE state "
+ ALOGE("Failed to allocate buffers after transitioning to IDLE state "
"(error 0x%08x)",
err);
@@ -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());
@@ -2198,7 +2198,7 @@ bool ACodec::OutputPortSettingsChangedState::onOMXEvent(
status_t err;
if ((err = mCodec->allocateBuffersOnPort(
kPortIndexOutput)) != OK) {
- LOGE("Failed to allocate output port buffers after "
+ ALOGE("Failed to allocate output port buffers after "
"port reconfiguration (error 0x%08x)",
err);
@@ -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/AMRExtractor.cpp b/media/libstagefright/AMRExtractor.cpp
index 7eca5e4..5a28347 100644
--- a/media/libstagefright/AMRExtractor.cpp
+++ b/media/libstagefright/AMRExtractor.cpp
@@ -85,7 +85,7 @@ static size_t getFrameSize(bool isWide, unsigned FT) {
};
if (FT > 15 || (isWide && FT > 9 && FT < 14) || (!isWide && FT > 11 && FT < 15)) {
- LOGE("illegal AMR frame type %d", FT);
+ ALOGE("illegal AMR frame type %d", FT);
return 0;
}
@@ -285,7 +285,7 @@ status_t AMRSource::read(
if (header & 0x83) {
// Padding bits must be 0.
- LOGE("padding bits must be 0, header is 0x%02x", header);
+ ALOGE("padding bits must be 0, header is 0x%02x", header);
return ERROR_MALFORMED;
}
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..a3187b7 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),
@@ -625,7 +625,7 @@ status_t AVIExtractor::parseStreamHeader(off64_t offset, size_t size) {
}
if (mime == NULL) {
- LOGW("Unsupported video format '%c%c%c%c'",
+ ALOGW("Unsupported video format '%c%c%c%c'",
(char)(handler >> 24),
(char)((handler >> 16) & 0xff),
(char)((handler >> 8) & 0xff),
@@ -705,7 +705,7 @@ status_t AVIExtractor::parseStreamFormat(off64_t offset, size_t size) {
if (format == 0x55) {
track->mMeta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_MPEG);
} else {
- LOGW("Unsupported audio format = 0x%04x", format);
+ ALOGW("Unsupported audio format = 0x%04x", format);
}
uint32_t numChannels = U16LE_AT(&data[2]);
@@ -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);
@@ -1080,7 +1080,7 @@ status_t AVIExtractor::addH264CodecSpecificData(size_t trackIndex) {
sp<MetaData> meta = MakeAVCCodecSpecificData(buffer);
if (meta == NULL) {
- LOGE("Unable to extract AVC codec specific data");
+ ALOGE("Unable to extract AVC codec specific data");
return ERROR_MALFORMED;
}
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..2172cc0 100644
--- a/media/libstagefright/AudioSource.cpp
+++ b/media/libstagefright/AudioSource.cpp
@@ -37,7 +37,7 @@ static void AudioRecordCallbackFunction(int event, void *user, void *info) {
break;
}
case AudioRecord::EVENT_OVERRUN: {
- LOGW("AudioRecord reported overrun!");
+ ALOGW("AudioRecord reported overrun!");
break;
}
default:
@@ -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,17 +256,17 @@ 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.");
+ ALOGW("Spurious callback from AudioRecord. Drop the audio data.");
return OK;
}
// 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;
}
@@ -301,7 +301,7 @@ status_t AudioSource::dataCallbackTimestamp(
audioBuffer.i16, audioBuffer.size);
} else {
if (audioBuffer.size == 0) {
- LOGW("Nothing is available from AudioRecord callback buffer");
+ ALOGW("Nothing is available from AudioRecord callback buffer");
buffer->release();
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..7a2d7b3 100644
--- a/media/libstagefright/AwesomePlayer.cpp
+++ b/media/libstagefright/AwesomePlayer.cpp
@@ -132,7 +132,7 @@ struct AwesomeNativeWindowRenderer : public AwesomeRenderer {
status_t err = mNativeWindow->queueBuffer(
mNativeWindow.get(), buffer->graphicBuffer().get());
if (err != 0) {
- LOGE("queueBuffer failed with error %s (%d)", strerror(-err),
+ ALOGE("queueBuffer failed with error %s (%d)", strerror(-err),
-err);
return;
}
@@ -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;
@@ -280,9 +280,9 @@ status_t AwesomePlayer::setDataSource_l(
}
if (!(mFlags & INCOGNITO)) {
- LOGI("setDataSource_l('%s')", mUri.string());
+ ALOGI("setDataSource_l('%s')", mUri.string());
} else {
- LOGI("setDataSource_l(URL suppressed)");
+ ALOGI("setDataSource_l(URL suppressed)");
}
// The actual work will be done during preparation in the call to
@@ -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);
@@ -483,7 +483,7 @@ void AwesomePlayer::reset_l() {
if (mFlags & PREPARING) {
modifyFlags(PREPARE_CANCELLED, SET);
if (mConnectingDataSource != NULL) {
- LOGI("interrupting the connection process");
+ ALOGI("interrupting the connection process");
mConnectingDataSource->disconnect();
}
@@ -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 {
@@ -686,7 +686,7 @@ void AwesomePlayer::onBufferingUpdate() {
if ((mFlags & PLAYING) && !eos
&& (cachedDataRemaining < kLowWaterMarkBytes)) {
- LOGI("cache is running low (< %d) , pausing.",
+ ALOGI("cache is running low (< %d) , pausing.",
kLowWaterMarkBytes);
modifyFlags(CACHE_UNDERRUN, SET);
pause_l();
@@ -695,13 +695,13 @@ void AwesomePlayer::onBufferingUpdate() {
notifyListener_l(MEDIA_INFO, MEDIA_INFO_BUFFERING_START);
} else if (eos || cachedDataRemaining > kHighWaterMarkBytes) {
if (mFlags & CACHE_UNDERRUN) {
- LOGI("cache has filled up (> %d), resuming.",
+ ALOGI("cache has filled up (> %d), resuming.",
kHighWaterMarkBytes);
modifyFlags(CACHE_UNDERRUN, CLEAR);
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,12 +737,12 @@ 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
&& (cachedDurationUs < kLowWaterMarkUs)) {
- LOGI("cache is running low (%.2f secs) , pausing.",
+ ALOGI("cache is running low (%.2f secs) , pausing.",
cachedDurationUs / 1E6);
modifyFlags(CACHE_UNDERRUN, SET);
pause_l();
@@ -751,13 +751,13 @@ void AwesomePlayer::onBufferingUpdate() {
notifyListener_l(MEDIA_INFO, MEDIA_INFO_BUFFERING_START);
} else if (eos || cachedDurationUs > kHighWaterMarkUs) {
if (mFlags & CACHE_UNDERRUN) {
- LOGI("cache has filled up (%.2f secs), resuming.",
+ ALOGI("cache has filled up (%.2f secs), resuming.",
cachedDurationUs / 1E6);
modifyFlags(CACHE_UNDERRUN, CLEAR);
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;
@@ -1192,7 +1192,7 @@ status_t AwesomePlayer::setNativeWindow_l(const sp<ANativeWindow> &native) {
status_t err = initVideoDecoder();
if (err != OK) {
- LOGE("failed to reinstantiate video decoder after surface change.");
+ ALOGE("failed to reinstantiate video decoder after surface change.");
return err;
}
@@ -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);
@@ -1667,7 +1667,7 @@ void AwesomePlayer::onVideoEvent() {
if (mSeeking == SEEK_VIDEO_ONLY) {
if (mSeekTimeUs > timeUs) {
- LOGI("XXX mSeekTimeUs = %lld us, timeUs = %lld us",
+ ALOGI("XXX mSeekTimeUs = %lld us, timeUs = %lld us",
mSeekTimeUs, timeUs);
}
}
@@ -1683,7 +1683,7 @@ void AwesomePlayer::onVideoEvent() {
if (mAudioPlayer != NULL && !(mFlags & (AUDIO_RUNNING | SEEK_PREVIEW))) {
status_t err = startAudioPlayer_l();
if (err != OK) {
- LOGE("Starting the audio player failed w/ err %d", err);
+ ALOGE("Starting the audio player failed w/ err %d", err);
return;
}
}
@@ -1715,7 +1715,7 @@ void AwesomePlayer::onVideoEvent() {
int64_t latenessUs = nowUs - timeUs;
if (latenessUs > 0) {
- LOGI("after SEEK_VIDEO_ONLY we're late by %.2f secs", latenessUs / 1E6);
+ ALOGI("after SEEK_VIDEO_ONLY we're late by %.2f secs", latenessUs / 1E6);
}
}
@@ -1730,7 +1730,7 @@ void AwesomePlayer::onVideoEvent() {
&& mAudioPlayer != NULL
&& mAudioPlayer->getMediaTimeMapping(
&realTimeUs, &mediaTimeUs)) {
- LOGI("we're much too late (%.2f secs), video skipping ahead",
+ ALOGI("we're much too late (%.2f secs), video skipping ahead",
latenessUs / 1E6);
mVideoBuffer->release();
@@ -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);
@@ -1975,7 +1975,7 @@ status_t AwesomePlayer::finishSetDataSource_l() {
if (err != OK) {
mConnectingDataSource.clear();
- LOGI("mConnectingDataSource->connect() returned %d", err);
+ ALOGI("mConnectingDataSource->connect() returned %d", err);
return err;
}
@@ -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);
@@ -2073,7 +2073,7 @@ status_t AwesomePlayer::finishSetDataSource_l() {
}
if (mFlags & PREPARE_CANCELLED) {
- LOGI("Prepare cancelled while waiting for initial cache fill.");
+ ALOGI("Prepare cancelled while waiting for initial cache fill.");
return UNKNOWN_ERROR;
}
}
@@ -2155,7 +2155,7 @@ void AwesomePlayer::onPrepareAsyncEvent() {
Mutex::Autolock autoLock(mLock);
if (mFlags & PREPARE_CANCELLED) {
- LOGI("prepare was cancelled before doing anything");
+ ALOGI("prepare was cancelled before doing anything");
abortPrepare(UNKNOWN_ERROR);
return;
}
@@ -2256,7 +2256,7 @@ status_t AwesomePlayer::setParameter(int key, const Parcel &request) {
status_t AwesomePlayer::setCacheStatCollectFreq(const Parcel &request) {
if (mCachedSource != NULL) {
int32_t freqMs = request.readInt32();
- LOGD("Request to keep cache stats in the past %d ms",
+ ALOGD("Request to keep cache stats in the past %d ms",
freqMs);
return mCachedSource->setCacheStatCollectFreq(freqMs);
}
diff --git a/media/libstagefright/CameraSource.cpp b/media/libstagefright/CameraSource.cpp
index 57989c5..1850c9c 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();
@@ -111,7 +111,7 @@ static int32_t getColorFormat(const char* colorFormat) {
return OMX_TI_COLOR_FormatYUV420PackedSemiPlanar;
}
- LOGE("Uknown color format (%s), please add it to "
+ ALOGE("Uknown color format (%s), please add it to "
"CameraSource::getColorFormat", colorFormat);
CHECK_EQ(0, "Unknown color format");
@@ -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) {
@@ -254,7 +254,7 @@ static void getSupportedVideoSizes(
*isSetVideoSizeSupported = true;
params.getSupportedVideoSizes(sizes);
if (sizes.size() == 0) {
- LOGD("Camera does not support setVideoSize()");
+ ALOGD("Camera does not support setVideoSize()");
params.getSupportedPreviewSizes(sizes);
*isSetVideoSizeSupported = false;
}
@@ -294,14 +294,14 @@ 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);
bool isCameraParamChanged = false;
if (width != -1 && height != -1) {
if (!isVideoSizeSupported(width, height, sizes)) {
- LOGE("Video dimension (%dx%d) is unsupported", width, height);
+ ALOGE("Video dimension (%dx%d) is unsupported", width, height);
return BAD_VALUE;
}
if (isSetVideoSizeSupportedByCamera) {
@@ -314,7 +314,7 @@ status_t CameraSource::configureCamera(
(width != -1 && height == -1)) {
// If one and only one of the width and height is -1
// we reject such a request.
- LOGE("Requested video size (%dx%d) is not supported", width, height);
+ ALOGE("Requested video size (%dx%d) is not supported", width, height);
return BAD_VALUE;
} else { // width == -1 && height == -1
// Do not configure the camera.
@@ -326,11 +326,11 @@ 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) {
- LOGE("Requested frame rate (%d) is not supported: %s",
+ ALOGE("Requested frame rate (%d) is not supported: %s",
frameRate, supportedFrameRates);
return BAD_VALUE;
}
@@ -347,7 +347,7 @@ status_t CameraSource::configureCamera(
// Either frame rate or frame size needs to be changed.
String8 s = params->flatten();
if (OK != mCamera->setParameters(s)) {
- LOGE("Could not change settings."
+ ALOGE("Could not change settings."
" Someone else is using camera %p?", mCamera.get());
return -EBUSY;
}
@@ -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
@@ -387,7 +387,7 @@ status_t CameraSource::checkVideoSize(
params.getVideoSize(&frameWidthActual, &frameHeightActual);
}
if (frameWidthActual < 0 || frameHeightActual < 0) {
- LOGE("Failed to retrieve video frame size (%dx%d)",
+ ALOGE("Failed to retrieve video frame size (%dx%d)",
frameWidthActual, frameHeightActual);
return UNKNOWN_ERROR;
}
@@ -396,7 +396,7 @@ status_t CameraSource::checkVideoSize(
// video frame size.
if (width != -1 && height != -1) {
if (frameWidthActual != width || frameHeightActual != height) {
- LOGE("Failed to set video frame size to %dx%d. "
+ ALOGE("Failed to set video frame size to %dx%d. "
"The actual video size is %dx%d ", width, height,
frameWidthActual, frameHeightActual);
return UNKNOWN_ERROR;
@@ -422,17 +422,17 @@ 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);
+ ALOGE("Failed to retrieve preview frame rate (%d)", frameRateActual);
return UNKNOWN_ERROR;
}
// Check the actual video frame rate against the target/requested
// video frame rate.
if (frameRate != -1 && (frameRateActual - frameRate) != 0) {
- LOGE("Failed to set preview frame rate to %d fps. The actual "
+ ALOGE("Failed to set preview frame rate to %d fps. The actual "
"frame rate is %d", frameRate, frameRateActual);
return UNKNOWN_ERROR;
}
@@ -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,11 +485,11 @@ 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) {
- LOGE("Camera connection could not be established.");
+ ALOGE("Camera connection could not be established.");
return err;
}
CameraParameters params(mCamera->getParameters());
@@ -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,10 +576,10 @@ void CameraSource::startCameraRecording() {
}
status_t CameraSource::start(MetaData *meta) {
- LOGV("start");
+ ALOGV("start");
CHECK(!mStarted);
if (mInitCheck != OK) {
- LOGE("CameraSource is not initialized yet");
+ ALOGE("CameraSource is not initialized yet");
return mInitCheck;
}
@@ -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();
}
@@ -633,7 +633,7 @@ void CameraSource::releaseCamera() {
}
status_t CameraSource::stop() {
- LOGD("stop: E");
+ ALOGD("stop: E");
Mutex::Autolock autoLock(mLock);
mStarted = false;
mFrameAvailableCondition.signal();
@@ -649,7 +649,7 @@ status_t CameraSource::stop() {
if (NO_ERROR !=
mFrameCompleteCondition.waitRelative(mLock,
mTimeBetweenFrameCaptureUs * 1000LL + CAMERA_SOURCE_TIMEOUT_NS)) {
- LOGW("Timed out waiting for outstanding frames being encoded: %d",
+ ALOGW("Timed out waiting for outstanding frames being encoded: %d",
mFramesBeingEncoded.size());
}
}
@@ -660,22 +660,22 @@ status_t CameraSource::stop() {
}
if (mCollectStats) {
- LOGI("Frames received/encoded/dropped: %d/%d/%d in %lld us",
+ ALOGI("Frames received/encoded/dropped: %d/%d/%d in %lld us",
mNumFramesReceived, mNumFramesEncoded, mNumFramesDropped,
mLastFrameTimestampUs - mFirstFrameTimeUs);
}
if (mNumGlitches > 0) {
- LOGW("%d long delays between neighboring video frames", mNumGlitches);
+ ALOGW("%d long delays between neighboring video frames", mNumGlitches);
}
CHECK_EQ(mNumFramesReceived, mNumFramesEncoded + mNumFramesDropped);
- LOGD("stop: X");
+ ALOGD("stop: X");
return OK;
}
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;
@@ -744,10 +744,10 @@ status_t CameraSource::read(
mTimeBetweenFrameCaptureUs * 1000LL + CAMERA_SOURCE_TIMEOUT_NS)) {
if (mCameraRecordingProxy != 0 &&
!mCameraRecordingProxy->asBinder()->isBinderAlive()) {
- LOGW("camera recording proxy is gone");
+ ALOGW("camera recording proxy is gone");
return ERROR_END_OF_STREAM;
}
- LOGW("Timed out waiting for incoming camera video frames: %lld us",
+ ALOGW("Timed out waiting for incoming camera video frames: %lld us",
mLastFrameTimestampUs);
}
}
@@ -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;
}
@@ -832,7 +832,7 @@ void CameraSource::ProxyListener::dataCallbackTimestamp(
}
void CameraSource::DeathNotifier::binderDied(const wp<IBinder>& who) {
- LOGI("Camera recording proxy died");
+ ALOGI("Camera recording proxy died");
}
} // namespace android
diff --git a/media/libstagefright/CameraSourceTimeLapse.cpp b/media/libstagefright/CameraSourceTimeLapse.cpp
index eb456f4..263ab50 100644
--- a/media/libstagefright/CameraSourceTimeLapse.cpp
+++ b/media/libstagefright/CameraSourceTimeLapse.cpp
@@ -69,7 +69,7 @@ CameraSourceTimeLapse::CameraSourceTimeLapse(
mSkipCurrentFrame(false) {
mTimeBetweenFrameCaptureUs = timeBetweenFrameCaptureUs;
- LOGD("starting time lapse mode: %lld us",
+ ALOGD("starting time lapse mode: %lld us",
mTimeBetweenFrameCaptureUs);
mVideoWidth = videoSize.width;
@@ -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 {
@@ -140,7 +140,7 @@ bool CameraSourceTimeLapse::trySettingVideoSize(
if (mCamera->setParameters(params.flatten()) == OK) {
isSuccessful = true;
} else {
- LOGE("Failed to set preview size to %dx%d", width, height);
+ ALOGE("Failed to set preview size to %dx%d", width, height);
isSuccessful = false;
}
}
@@ -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,14 +253,14 @@ 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;
// Really make sure that this video recording frame will not be dropped.
if (*timestampUs < mStartTimeUs) {
- LOGI("set timestampUs to start time stamp %lld us", mStartTimeUs);
+ ALOGI("set timestampUs to start time stamp %lld us", mStartTimeUs);
*timestampUs = mStartTimeUs;
}
return false;
@@ -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(&timestampUs);
CameraSource::dataCallbackTimestamp(timestampUs, msgType, data);
}
diff --git a/media/libstagefright/DRMExtractor.cpp b/media/libstagefright/DRMExtractor.cpp
index 1f3d581..9452ab1 100644
--- a/media/libstagefright/DRMExtractor.cpp
+++ b/media/libstagefright/DRMExtractor.cpp
@@ -286,7 +286,7 @@ bool SniffDRM(
*mimeType = String8("drm+es_based+") + decryptHandle->mimeType;
} else if (decryptHandle->decryptApiType == DecryptApiType::WV_BASED) {
*mimeType = MEDIA_MIMETYPE_CONTAINER_WVM;
- LOGW("SniffWVM: found match\n");
+ ALOGW("SniffWVM: found match\n");
}
*confidence = 10.0f;
diff --git a/media/libstagefright/ESDS.cpp b/media/libstagefright/ESDS.cpp
index 1f7ee25..4a0c35c 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;
@@ -162,7 +162,7 @@ status_t ESDS::parseESDescriptor(size_t offset, size_t size) {
offset -= 2;
size += 2;
- LOGW("Found malformed 'esds' atom, ignoring missing OCR_ES_Id.");
+ ALOGW("Found malformed 'esds' atom, ignoring missing OCR_ES_Id.");
}
}
diff --git a/media/libstagefright/FLACExtractor.cpp b/media/libstagefright/FLACExtractor.cpp
index 8ba5a2d..668d7f7 100644
--- a/media/libstagefright/FLACExtractor.cpp
+++ b/media/libstagefright/FLACExtractor.cpp
@@ -327,7 +327,7 @@ FLAC__StreamDecoderWriteStatus FLACParser::writeCallback(
mWriteCompleted = true;
return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
} else {
- LOGE("FLACParser::writeCallback unexpected");
+ ALOGE("FLACParser::writeCallback unexpected");
return FLAC__STREAM_DECODER_WRITE_STATUS_ABORT;
}
}
@@ -340,7 +340,7 @@ void FLACParser::metadataCallback(const FLAC__StreamMetadata *metadata)
mStreamInfo = metadata->data.stream_info;
mStreamInfoValid = true;
} else {
- LOGE("FLACParser::metadataCallback unexpected STREAMINFO");
+ ALOGE("FLACParser::metadataCallback unexpected STREAMINFO");
}
break;
case FLAC__METADATA_TYPE_VORBIS_COMMENT:
@@ -366,14 +366,14 @@ void FLACParser::metadataCallback(const FLAC__StreamMetadata *metadata)
}
break;
default:
- LOGW("FLACParser::metadataCallback unexpected type %u", metadata->type);
+ ALOGW("FLACParser::metadataCallback unexpected type %u", metadata->type);
break;
}
}
void FLACParser::errorCallback(FLAC__StreamDecoderErrorStatus status)
{
- LOGE("FLACParser::errorCallback status=%d", status);
+ ALOGE("FLACParser::errorCallback status=%d", status);
mErrorStatus = status;
}
@@ -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;
@@ -477,7 +477,7 @@ status_t FLACParser::init()
// The new should succeed, since probably all it does is a malloc
// that always succeeds in Android. But to avoid dependence on the
// libFLAC internals, we check and log here.
- LOGE("new failed");
+ ALOGE("new failed");
return NO_INIT;
}
FLAC__stream_decoder_set_md5_checking(mDecoder, false);
@@ -497,12 +497,12 @@ status_t FLACParser::init()
if (initStatus != FLAC__STREAM_DECODER_INIT_STATUS_OK) {
// A failure here probably indicates a programming error and so is
// unlikely to happen. But we check and log here similarly to above.
- LOGE("init_stream failed %d", initStatus);
+ ALOGE("init_stream failed %d", initStatus);
return NO_INIT;
}
// parse all metadata
if (!FLAC__stream_decoder_process_until_end_of_metadata(mDecoder)) {
- LOGE("end_of_metadata failed");
+ ALOGE("end_of_metadata failed");
return NO_INIT;
}
if (mStreamInfoValid) {
@@ -512,7 +512,7 @@ status_t FLACParser::init()
case 2:
break;
default:
- LOGE("unsupported channel count %u", getChannels());
+ ALOGE("unsupported channel count %u", getChannels());
return NO_INIT;
}
// check bit depth
@@ -522,7 +522,7 @@ status_t FLACParser::init()
case 24:
break;
default:
- LOGE("unsupported bits per sample %u", getBitsPerSample());
+ ALOGE("unsupported bits per sample %u", getBitsPerSample());
return NO_INIT;
}
// check sample rate
@@ -539,7 +539,7 @@ status_t FLACParser::init()
break;
default:
// 96000 would require a proper downsampler in AudioFlinger
- LOGE("unsupported sample rate %u", getSampleRate());
+ ALOGE("unsupported sample rate %u", getSampleRate());
return NO_INIT;
}
// configure the appropriate copy function, defaulting to trespass
@@ -572,7 +572,7 @@ status_t FLACParser::init()
(getTotalSamples() * 1000000LL) / getSampleRate());
}
} else {
- LOGE("missing STREAMINFO");
+ ALOGE("missing STREAMINFO");
return NO_INIT;
}
if (mFileMetadata != 0) {
@@ -603,30 +603,30 @@ MediaBuffer *FLACParser::readBuffer(bool doSeek, FLAC__uint64 sample)
if (doSeek) {
// We implement the seek callback, so this works without explicit flush
if (!FLAC__stream_decoder_seek_absolute(mDecoder, sample)) {
- LOGE("FLACParser::readBuffer seek to sample %llu failed", sample);
+ ALOGE("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");
+ ALOGE("FLACParser::readBuffer process_single failed");
return NULL;
}
}
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
unsigned blocksize = mWriteHeader.blocksize;
if (blocksize == 0 || blocksize > getMaxBlockSize()) {
- LOGE("FLACParser::readBuffer write invalid blocksize %u", blocksize);
+ ALOGE("FLACParser::readBuffer write invalid blocksize %u", blocksize);
return NULL;
}
if (mWriteHeader.sample_rate != getSampleRate() ||
mWriteHeader.channels != getChannels() ||
mWriteHeader.bits_per_sample != getBitsPerSample()) {
- LOGE("FLACParser::readBuffer write changed parameters mid-stream");
+ ALOGE("FLACParser::readBuffer write changed parameters mid-stream");
}
// acquire a media buffer
CHECK(mGroup != NULL);
@@ -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/FileSource.cpp b/media/libstagefright/FileSource.cpp
index 0794f57..73cb48c 100644
--- a/media/libstagefright/FileSource.cpp
+++ b/media/libstagefright/FileSource.cpp
@@ -101,7 +101,7 @@ ssize_t FileSource::readAt(off64_t offset, void *data, size_t size) {
} else {
off64_t result = lseek64(mFd, offset + mOffset, SEEK_SET);
if (result == -1) {
- LOGE("seek to %lld failed", offset + mOffset);
+ ALOGE("seek to %lld failed", offset + mOffset);
return UNKNOWN_ERROR;
}
diff --git a/media/libstagefright/HTTPBase.cpp b/media/libstagefright/HTTPBase.cpp
index 3c5a8a5..d7eea3f 100644
--- a/media/libstagefright/HTTPBase.cpp
+++ b/media/libstagefright/HTTPBase.cpp
@@ -111,11 +111,11 @@ status_t HTTPBase::setBandwidthStatCollectFreq(int32_t freqMs) {
if (freqMs < kMinBandwidthCollectFreqMs
|| freqMs > kMaxBandwidthCollectFreqMs) {
- LOGE("frequency (%d ms) is out of range [1000, 60000]", freqMs);
+ ALOGE("frequency (%d ms) is out of range [1000, 60000]", freqMs);
return BAD_VALUE;
}
- LOGI("frequency set to %d ms", freqMs);
+ ALOGI("frequency set to %d ms", freqMs);
mBandWidthCollectFreqMs = freqMs;
return OK;
}
@@ -139,7 +139,7 @@ bool HTTPBase::getUID(uid_t *uid) const {
void HTTPBase::RegisterSocketUserTag(int sockfd, uid_t uid, uint32_t kTag) {
int res = qtaguid_tagSocket(sockfd, kTag, uid);
if (res != 0) {
- LOGE("Failed tagging socket %d for uid %d (My UID=%d)", sockfd, uid, geteuid());
+ ALOGE("Failed tagging socket %d for uid %d (My UID=%d)", sockfd, uid, geteuid());
}
}
@@ -147,7 +147,7 @@ void HTTPBase::RegisterSocketUserTag(int sockfd, uid_t uid, uint32_t kTag) {
void HTTPBase::UnRegisterSocketUserTag(int sockfd) {
int res = qtaguid_untagSocket(sockfd);
if (res != 0) {
- LOGE("Failed untagging socket %d (My UID=%d)", sockfd, geteuid());
+ ALOGE("Failed untagging socket %d (My UID=%d)", sockfd, geteuid());
}
}
diff --git a/media/libstagefright/MP3Extractor.cpp b/media/libstagefright/MP3Extractor.cpp
index 34e9cd7..2215c07 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;
@@ -431,7 +431,7 @@ status_t MP3Source::read(
int32_t bitrate;
if (!mMeta->findInt32(kKeyBitRate, &bitrate)) {
// bitrate is in bits/sec.
- LOGI("no bitrate");
+ ALOGI("no bitrate");
return ERROR_UNSUPPORTED;
}
@@ -483,11 +483,11 @@ 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)) {
- LOGE("Unable to resync. Signalling end of stream.");
+ ALOGE("Unable to resync. Signalling end of stream.");
buffer->release();
buffer = 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..22bdd95 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
@@ -1250,7 +1250,7 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
char buffer[23];
if (chunk_data_size != 7 &&
chunk_data_size != 23) {
- LOGE("Incorrect D263 box size %lld", chunk_data_size);
+ ALOGE("Incorrect D263 box size %lld", chunk_data_size);
return ERROR_MALFORMED;
}
@@ -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(
@@ -1499,9 +1499,9 @@ status_t MPEG4Extractor::parseTrackHeader(
int32_t dy = U32_AT(&buffer[matrixOffset + 20]);
#if 0
- LOGI("x' = %.2f * x + %.2f * y + %.2f",
+ ALOGI("x' = %.2f * x + %.2f * y + %.2f",
a00 / 65536.0f, a01 / 65536.0f, dx / 65536.0f);
- LOGI("y' = %.2f * x + %.2f * y + %.2f",
+ ALOGI("y' = %.2f * x + %.2f * y + %.2f",
a10 / 65536.0f, a11 / 65536.0f, dy / 65536.0f);
#endif
@@ -1518,7 +1518,7 @@ status_t MPEG4Extractor::parseTrackHeader(
} else if (a00 == -kFixedOne && a01 == 0 && a10 == 0 && a11 == -kFixedOne) {
rotationDegrees = 180;
} else {
- LOGW("We only support 0,90,180,270 degree rotation matrices");
+ ALOGW("We only support 0,90,180,270 degree rotation matrices");
rotationDegrees = 0;
}
@@ -1750,7 +1750,7 @@ status_t MPEG4Extractor::updateAudioTrackInfoFromESDS_MPEG4Audio(
// The media subtype is MP3 audio
// Our software MP3 audio decoder may not be able to handle
// packetized MP3 audio; for now, lets just return ERROR_UNSUPPORTED
- LOGE("MP3 track in MP4/3GPP file is not supported");
+ ALOGE("MP3 track in MP4/3GPP file is not supported");
return ERROR_UNSUPPORTED;
}
@@ -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);
}
@@ -2035,7 +2035,7 @@ status_t MPEG4Source::read(
CHECK_EQ(OK, mSampleTable->getMetaDataForSample(
syncSampleIndex, NULL, NULL, &syncSampleTime));
- LOGI("seek to time %lld us => sample at time %lld us, "
+ ALOGI("seek to time %lld us => sample at time %lld us, "
"sync sample at time %lld us",
seekTimeUs,
sampleTime * 1000000ll / mTimescale,
@@ -2122,7 +2122,7 @@ status_t MPEG4Source::read(
size_t nal_size = parseNALSize(src);
if (mBuffer->range_length() < mNALLengthSize + nal_size) {
- LOGE("incomplete NAL unit.");
+ ALOGE("incomplete NAL unit.");
mBuffer->release();
mBuffer = NULL;
@@ -2186,7 +2186,7 @@ status_t MPEG4Source::read(
}
if (isMalFormed) {
- LOGE("Video is malformed");
+ ALOGE("Video is malformed");
mBuffer->release();
mBuffer = NULL;
return ERROR_MALFORMED;
@@ -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;
@@ -2421,7 +2421,7 @@ bool SniffMPEG4(
}
if (LegacySniffMPEG4(source, mimeType, confidence)) {
- LOGW("Identified supported mpeg4 through LegacySniffMPEG4.");
+ ALOGW("Identified supported mpeg4 through LegacySniffMPEG4.");
return true;
}
diff --git a/media/libstagefright/MPEG4Writer.cpp b/media/libstagefright/MPEG4Writer.cpp
index 46d87df..06dd875 100755
--- a/media/libstagefright/MPEG4Writer.cpp
+++ b/media/libstagefright/MPEG4Writer.cpp
@@ -327,7 +327,7 @@ status_t MPEG4Writer::Track::dump(
status_t MPEG4Writer::addSource(const sp<MediaSource> &source) {
Mutex::Autolock l(mLock);
if (mStarted) {
- LOGE("Attempt to add source AFTER recording is started");
+ ALOGE("Attempt to add source AFTER recording is started");
return UNKNOWN_ERROR;
}
Track *track = new Track(this, source, mTracks.size());
@@ -406,7 +406,7 @@ int64_t MPEG4Writer::estimateMoovBoxSize(int32_t bitRate) {
size = MAX_MOOV_BOX_SIZE;
}
- LOGI("limits: %lld/%lld bytes/us, bit rate: %d bps and the estimated"
+ ALOGI("limits: %lld/%lld bytes/us, bit rate: %d bps and the estimated"
" moov size %lld bytes",
mMaxFileSizeLimitBytes, mMaxFileDurationLimitUs, bitRate, size);
return factor * size;
@@ -443,7 +443,7 @@ status_t MPEG4Writer::start(MetaData *param) {
// If file size is set to be larger than the 32 bit file
// size limit, treat it as an error.
if (mMaxFileSizeLimitBytes > kMax32BitFileSize) {
- LOGW("32-bit file size limit (%lld bytes) too big. "
+ ALOGW("32-bit file size limit (%lld bytes) too big. "
"It is changed to %lld bytes",
mMaxFileSizeLimitBytes, kMax32BitFileSize);
mMaxFileSizeLimitBytes = kMax32BitFileSize;
@@ -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;
@@ -539,7 +539,7 @@ status_t MPEG4Writer::pause() {
}
void MPEG4Writer::stopWriterThread() {
- LOGD("Stopping writer thread");
+ ALOGD("Stopping writer thread");
if (!mWriterThreadStarted) {
return;
}
@@ -554,7 +554,7 @@ void MPEG4Writer::stopWriterThread() {
void *dummy;
pthread_join(mThread, &dummy);
mWriterThreadStarted = false;
- LOGD("Writer thread stopped");
+ ALOGD("Writer thread stopped");
}
/*
@@ -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;
@@ -650,7 +650,7 @@ status_t MPEG4Writer::stop() {
}
if (mTracks.size() > 1) {
- LOGD("Duration from tracks range is [%lld, %lld] us",
+ ALOGD("Duration from tracks range is [%lld, %lld] us",
minDurationUs, maxDurationUs);
}
@@ -701,7 +701,7 @@ status_t MPEG4Writer::stop() {
mMoovBoxBuffer = NULL;
mMoovBoxBufferOffset = 0;
} else {
- LOGI("The mp4 file will not be streamable.");
+ ALOGI("The mp4 file will not be streamable.");
}
CHECK(mBoxes.empty());
@@ -1084,12 +1084,12 @@ bool MPEG4Writer::reachedEOS() {
}
void MPEG4Writer::setStartTimestampUs(int64_t timeUs) {
- LOGI("setStartTimestampUs: %lld", timeUs);
+ ALOGI("setStartTimestampUs: %lld", timeUs);
CHECK(timeUs >= 0);
Mutex::Autolock autoLock(mLock);
if (mStartTimestampUs < 0 || mStartTimestampUs > timeUs) {
mStartTimestampUs = timeUs;
- LOGI("Earliest track starting time: %lld", mStartTimestampUs);
+ ALOGI("Earliest track starting time: %lld", mStartTimestampUs);
}
}
@@ -1173,7 +1173,7 @@ void MPEG4Writer::Track::addOneSttsTableEntry(
size_t sampleCount, int32_t duration) {
if (duration == 0) {
- LOGW("0-duration samples found: %d", sampleCount);
+ ALOGW("0-duration samples found: %d", sampleCount);
}
SttsTableEntry sttsEntry(sampleCount, duration);
mSttsTableEntries.push_back(sttsEntry);
@@ -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)) {
@@ -1338,11 +1338,11 @@ void MPEG4Writer::writeAllChunks() {
sendSessionSummary();
mChunkInfos.clear();
- LOGD("%d chunks are written in the last batch", outstandingChunks);
+ ALOGD("%d chunks are written in the last batch", outstandingChunks);
}
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;
@@ -1481,7 +1481,7 @@ status_t MPEG4Writer::Track::start(MetaData *params) {
startTimeOffsetUs = kInitialDelayTimeUs;
}
startTimeUs += startTimeOffsetUs;
- LOGI("Start time offset: %lld us", startTimeOffsetUs);
+ ALOGI("Start time offset: %lld us", startTimeOffsetUs);
}
meta->setInt64(kKeyTime, startTimeUs);
@@ -1523,9 +1523,9 @@ status_t MPEG4Writer::Track::pause() {
}
status_t MPEG4Writer::Track::stop() {
- LOGD("Stopping %s track", mIsAudio? "Audio": "Video");
+ ALOGD("Stopping %s track", mIsAudio? "Audio": "Video");
if (!mStarted) {
- LOGE("Stop() called but track is not started");
+ ALOGE("Stop() called but track is not started");
return ERROR_END_OF_STREAM;
}
@@ -1539,7 +1539,7 @@ status_t MPEG4Writer::Track::stop() {
status_t err = (status_t) dummy;
- LOGD("Stopping %s track source", mIsAudio? "Audio": "Video");
+ ALOGD("Stopping %s track source", mIsAudio? "Audio": "Video");
{
status_t status = mSource->stop();
if (err == OK && status != OK && status != ERROR_END_OF_STREAM) {
@@ -1547,7 +1547,7 @@ status_t MPEG4Writer::Track::stop() {
}
}
- LOGD("%s track stopped", mIsAudio? "Audio": "Video");
+ ALOGD("%s track stopped", mIsAudio? "Audio": "Video");
return err;
}
@@ -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,21 +1589,21 @@ 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);
const uint8_t *nextStartCode = findNextStartCode(data, length);
*paramSetLen = nextStartCode - data;
if (*paramSetLen == 0) {
- LOGE("Param set is malformed, since its length is 0");
+ ALOGE("Param set is malformed, since its length is 0");
return NULL;
}
AVCParamSet paramSet(*paramSetLen, data);
if (type == kNalUnitTypeSeqParamSet) {
if (*paramSetLen < 4) {
- LOGE("Seq parameter set malformed");
+ ALOGE("Seq parameter set malformed");
return NULL;
}
if (mSeqParamSets.empty()) {
@@ -1614,7 +1614,7 @@ const uint8_t *MPEG4Writer::Track::parseParamSet(
if (mProfileIdc != data[1] ||
mProfileCompatible != data[2] ||
mLevelIdc != data[3]) {
- LOGE("Inconsistent profile/level found in seq parameter sets");
+ ALOGE("Inconsistent profile/level found in seq parameter sets");
return NULL;
}
}
@@ -1627,12 +1627,12 @@ 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
if (size < 4 + 7) {
- LOGE("Codec specific data length too short: %d", size);
+ ALOGE("Codec specific data length too short: %d", size);
return ERROR_MALFORMED;
}
@@ -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
@@ -1661,7 +1661,7 @@ status_t MPEG4Writer::Track::parseAVCCodecSpecificData(
getNalUnitType(*(tmp + 4), &type);
if (type == kNalUnitTypeSeqParamSet) {
if (gotPps) {
- LOGE("SPS must come before PPS");
+ ALOGE("SPS must come before PPS");
return ERROR_MALFORMED;
}
if (!gotSps) {
@@ -1670,7 +1670,7 @@ status_t MPEG4Writer::Track::parseAVCCodecSpecificData(
nextStartCode = parseParamSet(tmp + 4, bytesLeft - 4, type, &paramSetLen);
} else if (type == kNalUnitTypePicParamSet) {
if (!gotSps) {
- LOGE("SPS must come before PPS");
+ ALOGE("SPS must come before PPS");
return ERROR_MALFORMED;
}
if (!gotPps) {
@@ -1678,7 +1678,7 @@ status_t MPEG4Writer::Track::parseAVCCodecSpecificData(
}
nextStartCode = parseParamSet(tmp + 4, bytesLeft - 4, type, &paramSetLen);
} else {
- LOGE("Only SPS and PPS Nal units are expected");
+ ALOGE("Only SPS and PPS Nal units are expected");
return ERROR_MALFORMED;
}
@@ -1696,12 +1696,12 @@ status_t MPEG4Writer::Track::parseAVCCodecSpecificData(
// Check on the number of seq parameter sets
size_t nSeqParamSets = mSeqParamSets.size();
if (nSeqParamSets == 0) {
- LOGE("Cound not find sequence parameter set");
+ ALOGE("Cound not find sequence parameter set");
return ERROR_MALFORMED;
}
if (nSeqParamSets > 0x1F) {
- LOGE("Too many seq parameter sets (%d) found", nSeqParamSets);
+ ALOGE("Too many seq parameter sets (%d) found", nSeqParamSets);
return ERROR_MALFORMED;
}
}
@@ -1710,11 +1710,11 @@ status_t MPEG4Writer::Track::parseAVCCodecSpecificData(
// Check on the number of pic parameter sets
size_t nPicParamSets = mPicParamSets.size();
if (nPicParamSets == 0) {
- LOGE("Cound not find picture parameter set");
+ ALOGE("Cound not find picture parameter set");
return ERROR_MALFORMED;
}
if (nPicParamSets > 0xFF) {
- LOGE("Too many pic parameter sets (%d) found", nPicParamSets);
+ ALOGE("Too many pic parameter sets (%d) found", nPicParamSets);
return ERROR_MALFORMED;
}
}
@@ -1727,7 +1727,7 @@ status_t MPEG4Writer::Track::parseAVCCodecSpecificData(
// These profiles requires additional parameter set extensions
if (mProfileIdc == 100 || mProfileIdc == 110 ||
mProfileIdc == 122 || mProfileIdc == 144) {
- LOGE("Sorry, no support for profile_idc: %d!", mProfileIdc);
+ ALOGE("Sorry, no support for profile_idc: %d!", mProfileIdc);
return BAD_VALUE;
}
}
@@ -1739,12 +1739,12 @@ status_t MPEG4Writer::Track::makeAVCCodecSpecificData(
const uint8_t *data, size_t size) {
if (mCodecSpecificData != NULL) {
- LOGE("Already have codec specific data");
+ ALOGE("Already have codec specific data");
return ERROR_MALFORMED;
}
if (size < 4) {
- LOGE("Codec specific data length too short: %d", size);
+ ALOGE("Codec specific data length too short: %d", size);
return ERROR_MALFORMED;
}
@@ -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;
@@ -2146,10 +2146,10 @@ status_t MPEG4Writer::Track::threadEntry() {
sendTrackSummary(hasMultipleTracks);
- LOGI("Received total/0-length (%d/%d) buffers and encoded %d frames. - %s",
+ ALOGI("Received total/0-length (%d/%d) buffers and encoded %d frames. - %s",
count, nZeroLengthFrames, mNumSamples, mIsAudio? "audio": "video");
if (mIsAudio) {
- LOGI("Audio track drift time: %lld us", mOwner->getDriftTimeUs());
+ ALOGI("Audio track drift time: %lld us", mOwner->getDriftTimeUs());
}
if (err == ERROR_END_OF_STREAM) {
@@ -2160,12 +2160,12 @@ status_t MPEG4Writer::Track::threadEntry() {
bool MPEG4Writer::Track::isTrackMalFormed() const {
if (mSampleSizes.empty()) { // no samples written
- LOGE("The number of recorded samples is 0");
+ ALOGE("The number of recorded samples is 0");
return true;
}
if (!mIsAudio && mNumStssTableEntries == 0) { // no sync frames for video
- LOGE("There are no sync frames for video track");
+ ALOGE("There are no sync frames for video track");
return true;
}
@@ -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);
@@ -2308,13 +2308,13 @@ status_t MPEG4Writer::Track::checkCodecSpecificData() const {
!strcasecmp(MEDIA_MIMETYPE_VIDEO_AVC, mime)) {
if (!mCodecSpecificData ||
mCodecSpecificDataSize <= 0) {
- LOGE("Missing codec specific data");
+ ALOGE("Missing codec specific data");
return ERROR_MALFORMED;
}
} else {
if (mCodecSpecificData ||
mCodecSpecificDataSize > 0) {
- LOGE("Unexepected codec specific data found");
+ ALOGE("Unexepected codec specific data found");
return ERROR_MALFORMED;
}
}
@@ -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);
@@ -2378,7 +2378,7 @@ void MPEG4Writer::Track::writeVideoFourCCBox() {
} else if (!strcasecmp(MEDIA_MIMETYPE_VIDEO_AVC, mime)) {
mOwner->beginBox("avc1");
} else {
- LOGE("Unknown mime type '%s'.", mime);
+ ALOGE("Unknown mime type '%s'.", mime);
CHECK(!"should not be here, unknown mime type.");
}
@@ -2432,7 +2432,7 @@ void MPEG4Writer::Track::writeAudioFourCCBox() {
} else if (!strcasecmp(MEDIA_MIMETYPE_AUDIO_AAC, mime)) {
fourcc = "mp4a";
} else {
- LOGE("Unknown mime type '%s'.", mime);
+ ALOGE("Unknown mime type '%s'.", mime);
CHECK(!"should not be here, unknown mime type.");
}
@@ -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/MediaBuffer.cpp b/media/libstagefright/MediaBuffer.cpp
index 0b14f1e..96271e4 100644
--- a/media/libstagefright/MediaBuffer.cpp
+++ b/media/libstagefright/MediaBuffer.cpp
@@ -135,7 +135,7 @@ size_t MediaBuffer::range_length() const {
void MediaBuffer::set_range(size_t offset, size_t length) {
if ((mGraphicBuffer == NULL) && (offset + length > mSize)) {
- LOGE("offset = %d, length = %d, mSize = %d", offset, length, mSize);
+ ALOGE("offset = %d, length = %d, mSize = %d", offset, length, mSize);
}
CHECK((mGraphicBuffer != NULL) || (offset + length <= mSize));
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..249c298 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;
@@ -302,7 +302,7 @@ void NuCachedSource2::fetchInternal() {
mNumRetriesLeft = 0;
return;
} else if (err != OK) {
- LOGI("The attempt to reconnect failed, %d retries remaining",
+ ALOGI("The attempt to reconnect failed, %d retries remaining",
mNumRetriesLeft);
return;
@@ -317,11 +317,11 @@ void NuCachedSource2::fetchInternal() {
Mutex::Autolock autoLock(mLock);
if (n < 0) {
- LOGE("source returned error %ld, %d retries left", n, mNumRetriesLeft);
+ ALOGE("source returned error %ld, %d retries left", n, mNumRetriesLeft);
mFinalStatus = n;
mCache->releasePage(page);
} else if (n == 0) {
- LOGI("ERROR_END_OF_STREAM");
+ ALOGI("ERROR_END_OF_STREAM");
mNumRetriesLeft = 0;
mFinalStatus = ERROR_END_OF_STREAM;
@@ -329,7 +329,7 @@ void NuCachedSource2::fetchInternal() {
mCache->releasePage(page);
} else {
if (mFinalStatus != OK) {
- LOGI("retrying a previously failed read succeeded.");
+ ALOGI("retrying a previously failed read succeeded.");
}
mNumRetriesLeft = kMaxNumRetries;
mFinalStatus = OK;
@@ -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;
}
@@ -355,7 +355,7 @@ void NuCachedSource2::onFetch() {
if (mFetching || keepAlive) {
if (keepAlive) {
- LOGI("Keep alive");
+ ALOGI("Keep alive");
}
fetchInternal();
@@ -363,12 +363,12 @@ void NuCachedSource2::onFetch() {
mLastFetchTimeUs = ALooper::GetNowUs();
if (mFetching && mCache->totalSize() >= mHighwaterThresholdBytes) {
- LOGI("Cache full, done prefetching for now");
+ ALOGI("Cache full, done prefetching for now");
mFetching = false;
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));
@@ -448,14 +448,14 @@ void NuCachedSource2::restartPrefetcherIfNecessary_l(
size_t actualBytes = mCache->releaseFromStart(maxBytes);
mCacheOffset += actualBytes;
- LOGI("restarting prefetcher, totalSize = %d", mCache->totalSize());
+ ALOGI("restarting prefetcher, totalSize = %d", mCache->totalSize());
mFetching = true;
}
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;
}
@@ -584,7 +584,7 @@ status_t NuCachedSource2::seekInternal_l(off64_t offset) {
return OK;
}
- LOGI("new range: offset= %lld", offset);
+ ALOGI("new range: offset= %lld", offset);
mCacheOffset = offset;
@@ -634,7 +634,7 @@ void NuCachedSource2::updateCacheParamsFromString(const char *s) {
if (sscanf(s, "%ld/%ld/%d",
&lowwaterMarkKb, &highwaterMarkKb, &keepAliveSecs) != 3) {
- LOGE("Failed to parse cache parameters from '%s'.", s);
+ ALOGE("Failed to parse cache parameters from '%s'.", s);
return;
}
@@ -651,7 +651,7 @@ void NuCachedSource2::updateCacheParamsFromString(const char *s) {
}
if (mLowwaterThresholdBytes >= mHighwaterThresholdBytes) {
- LOGE("Illegal low/highwater marks specified, reverting to defaults.");
+ ALOGE("Illegal low/highwater marks specified, reverting to defaults.");
mLowwaterThresholdBytes = kDefaultLowWaterThreshold;
mHighwaterThresholdBytes = kDefaultHighWaterThreshold;
@@ -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..60d9bb7 100755
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -179,9 +179,9 @@ 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_LOGE(x, ...) LOGE("[%s] "x, mComponentName, ##__VA_ARGS__)
+#define CODEC_LOGI(x, ...) ALOGI("[%s] "x, mComponentName, ##__VA_ARGS__)
+#define CODEC_LOGV(x, ...) ALOGV("[%s] "x, mComponentName, ##__VA_ARGS__)
+#define CODEC_LOGE(x, ...) ALOGE("[%s] "x, mComponentName, ##__VA_ARGS__)
struct OMXCodecObserver : public BnOMXObserver {
OMXCodecObserver() {
@@ -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);
@@ -484,7 +484,7 @@ sp<MediaSource> OMXCodec::Create(
// For OMX.SEC.* decoders we can enable a special mode that
// gives the client access to the framebuffer contents.
- LOGW("Component '%s' does not give the client access to "
+ ALOGW("Component '%s' does not give the client access to "
"the framebuffer contents. Skipping.",
componentName);
@@ -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)) {
@@ -625,7 +625,7 @@ status_t OMXCodec::configureCodec(const sp<MetaData> &meta) {
status_t err;
if ((err = parseAVCCodecSpecificData(
data, size, &profile, &level)) != OK) {
- LOGE("Malformed AVC codec specific data.");
+ ALOGE("Malformed AVC codec specific data.");
return err;
}
@@ -639,7 +639,7 @@ status_t OMXCodec::configureCodec(const sp<MetaData> &meta) {
// does not handle this gracefully and would clobber the heap
// and wreak havoc instead...
- LOGE("Profile and/or level exceed the decoder's capabilities.");
+ ALOGE("Profile and/or level exceed the decoder's capabilities.");
return ERROR_UNSUPPORTED;
}
} else if (meta->findData(kKeyVorbisInfo, &type, &data, &size)) {
@@ -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
@@ -981,7 +981,7 @@ void OMXCodec::setVideoInputFormat(
} else if (!strcasecmp(MEDIA_MIMETYPE_VIDEO_H263, mime)) {
compressionFormat = OMX_VIDEO_CodingH263;
} else {
- LOGE("Not a supported video mime type: %s", mime);
+ ALOGE("Not a supported video mime type: %s", mime);
CHECK(!"Should not be here. Not a supported video mime type.");
}
@@ -1093,7 +1093,7 @@ status_t OMXCodec::setupErrorCorrectionParameters() {
mNode, OMX_IndexParamVideoErrorCorrection,
&errorCorrectionType, sizeof(errorCorrectionType));
if (err != OK) {
- LOGW("Error correction param query is not supported");
+ ALOGW("Error correction param query is not supported");
return OK; // Optional feature. Ignore this failure
}
@@ -1107,7 +1107,7 @@ status_t OMXCodec::setupErrorCorrectionParameters() {
mNode, OMX_IndexParamVideoErrorCorrection,
&errorCorrectionType, sizeof(errorCorrectionType));
if (err != OK) {
- LOGW("Error correction param configuration is not supported");
+ ALOGW("Error correction param configuration is not supported");
}
// Optional feature. Ignore the failure.
@@ -1375,7 +1375,7 @@ status_t OMXCodec::setVideoOutputFormat(
} else if (!strcasecmp(MEDIA_MIMETYPE_VIDEO_MPEG2, mime)) {
compressionFormat = OMX_VIDEO_CodingMPEG2;
} else {
- LOGE("Not a supported video mime type: %s", mime);
+ ALOGE("Not a supported video mime type: %s", mime);
CHECK(!"Should not be here. Not a supported video mime type.");
}
@@ -1579,7 +1579,7 @@ void OMXCodec::setComponentRole(
&roleParams, sizeof(roleParams));
if (err != OK) {
- LOGW("Failed to set standard component role '%s'.", role);
+ ALOGW("Failed to set standard component role '%s'.", role);
}
}
}
@@ -1664,7 +1664,7 @@ status_t OMXCodec::allocateBuffersOnPort(OMX_U32 portIndex) {
}
if ((mFlags & kEnableGrallocUsageProtected) && portIndex == kPortIndexOutput) {
- LOGE("protected output buffers must be stent to an ANativeWindow");
+ ALOGE("protected output buffers must be stent to an ANativeWindow");
return PERMISSION_DENIED;
}
@@ -1673,7 +1673,7 @@ status_t OMXCodec::allocateBuffersOnPort(OMX_U32 portIndex) {
&& portIndex == kPortIndexInput) {
err = mOMX->storeMetaDataInBuffers(mNode, kPortIndexInput, OMX_TRUE);
if (err != OK) {
- LOGE("Storing meta data in video buffers is not supported");
+ ALOGE("Storing meta data in video buffers is not supported");
return err;
}
}
@@ -1735,7 +1735,7 @@ status_t OMXCodec::allocateBuffersOnPort(OMX_U32 portIndex) {
}
if (err != OK) {
- LOGE("allocate_buffer_with_backup failed");
+ ALOGE("allocate_buffer_with_backup failed");
return err;
}
@@ -1849,7 +1849,7 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() {
def.format.video.eColorFormat);
if (err != 0) {
- LOGE("native_window_set_buffers_geometry failed: %s (%d)",
+ ALOGE("native_window_set_buffers_geometry failed: %s (%d)",
strerror(-err), -err);
return err;
}
@@ -1863,7 +1863,7 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() {
OMX_U32 usage = 0;
err = mOMX->getGraphicBufferUsage(mNode, kPortIndexOutput, &usage);
if (err != 0) {
- LOGW("querying usage flags from OMX IL component failed: %d", err);
+ ALOGW("querying usage flags from OMX IL component failed: %d", err);
// XXX: Currently this error is logged, but not fatal.
usage = 0;
}
@@ -1881,20 +1881,20 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() {
mNativeWindow.get(), NATIVE_WINDOW_QUEUES_TO_WINDOW_COMPOSER,
&queuesToNativeWindow);
if (err != 0) {
- LOGE("error authenticating native window: %d", err);
+ ALOGE("error authenticating native window: %d", err);
return err;
}
if (queuesToNativeWindow != 1) {
- LOGE("native window could not be authenticated");
+ ALOGE("native window could not be authenticated");
return PERMISSION_DENIED;
}
}
- 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) {
- LOGE("native_window_set_usage failed: %s (%d)", strerror(-err), -err);
+ ALOGE("native_window_set_usage failed: %s (%d)", strerror(-err), -err);
return err;
}
@@ -1902,7 +1902,7 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() {
err = mNativeWindow->query(mNativeWindow.get(),
NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS, &minUndequeuedBufs);
if (err != 0) {
- LOGE("NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS query failed: %s (%d)",
+ ALOGE("NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS query failed: %s (%d)",
strerror(-err), -err);
return err;
}
@@ -1925,7 +1925,7 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() {
err = native_window_set_buffer_count(
mNativeWindow.get(), def.nBufferCountActual);
if (err != 0) {
- LOGE("native_window_set_buffer_count failed: %s (%d)", strerror(-err),
+ ALOGE("native_window_set_buffer_count failed: %s (%d)", strerror(-err),
-err);
return err;
}
@@ -1938,7 +1938,7 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() {
ANativeWindowBuffer* buf;
err = mNativeWindow->dequeueBuffer(mNativeWindow.get(), &buf);
if (err != 0) {
- LOGE("dequeueBuffer failed: %s (%d)", strerror(-err), -err);
+ ALOGE("dequeueBuffer failed: %s (%d)", strerror(-err), -err);
break;
}
@@ -2052,7 +2052,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() {
err = native_window_api_disconnect(mNativeWindow.get(),
NATIVE_WINDOW_API_MEDIA);
if (err != NO_ERROR) {
- LOGE("error pushing blank frames: api_disconnect failed: %s (%d)",
+ ALOGE("error pushing blank frames: api_disconnect failed: %s (%d)",
strerror(-err), -err);
return err;
}
@@ -2060,7 +2060,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() {
err = native_window_api_connect(mNativeWindow.get(),
NATIVE_WINDOW_API_CPU);
if (err != NO_ERROR) {
- LOGE("error pushing blank frames: api_connect failed: %s (%d)",
+ ALOGE("error pushing blank frames: api_connect failed: %s (%d)",
strerror(-err), -err);
return err;
}
@@ -2068,7 +2068,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() {
err = native_window_set_scaling_mode(mNativeWindow.get(),
NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW);
if (err != NO_ERROR) {
- LOGE("error pushing blank frames: set_buffers_geometry failed: %s (%d)",
+ ALOGE("error pushing blank frames: set_buffers_geometry failed: %s (%d)",
strerror(-err), -err);
goto error;
}
@@ -2076,7 +2076,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() {
err = native_window_set_buffers_geometry(mNativeWindow.get(), 1, 1,
HAL_PIXEL_FORMAT_RGBX_8888);
if (err != NO_ERROR) {
- LOGE("error pushing blank frames: set_buffers_geometry failed: %s (%d)",
+ ALOGE("error pushing blank frames: set_buffers_geometry failed: %s (%d)",
strerror(-err), -err);
goto error;
}
@@ -2084,7 +2084,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() {
err = native_window_set_usage(mNativeWindow.get(),
GRALLOC_USAGE_SW_WRITE_OFTEN);
if (err != NO_ERROR) {
- LOGE("error pushing blank frames: set_usage failed: %s (%d)",
+ ALOGE("error pushing blank frames: set_usage failed: %s (%d)",
strerror(-err), -err);
goto error;
}
@@ -2092,7 +2092,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() {
err = mNativeWindow->query(mNativeWindow.get(),
NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS, &minUndequeuedBufs);
if (err != NO_ERROR) {
- LOGE("error pushing blank frames: MIN_UNDEQUEUED_BUFFERS query "
+ ALOGE("error pushing blank frames: MIN_UNDEQUEUED_BUFFERS query "
"failed: %s (%d)", strerror(-err), -err);
goto error;
}
@@ -2100,7 +2100,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() {
numBufs = minUndequeuedBufs + 1;
err = native_window_set_buffer_count(mNativeWindow.get(), numBufs);
if (err != NO_ERROR) {
- LOGE("error pushing blank frames: set_buffer_count failed: %s (%d)",
+ ALOGE("error pushing blank frames: set_buffer_count failed: %s (%d)",
strerror(-err), -err);
goto error;
}
@@ -2112,7 +2112,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() {
for (int i = 0; i < numBufs + 1; i++) {
err = mNativeWindow->dequeueBuffer(mNativeWindow.get(), &anb);
if (err != NO_ERROR) {
- LOGE("error pushing blank frames: dequeueBuffer failed: %s (%d)",
+ ALOGE("error pushing blank frames: dequeueBuffer failed: %s (%d)",
strerror(-err), -err);
goto error;
}
@@ -2121,7 +2121,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() {
err = mNativeWindow->lockBuffer(mNativeWindow.get(),
buf->getNativeBuffer());
if (err != NO_ERROR) {
- LOGE("error pushing blank frames: lockBuffer failed: %s (%d)",
+ ALOGE("error pushing blank frames: lockBuffer failed: %s (%d)",
strerror(-err), -err);
goto error;
}
@@ -2130,7 +2130,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() {
uint32_t* img = NULL;
err = buf->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)(&img));
if (err != NO_ERROR) {
- LOGE("error pushing blank frames: lock failed: %s (%d)",
+ ALOGE("error pushing blank frames: lock failed: %s (%d)",
strerror(-err), -err);
goto error;
}
@@ -2139,7 +2139,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() {
err = buf->unlock();
if (err != NO_ERROR) {
- LOGE("error pushing blank frames: unlock failed: %s (%d)",
+ ALOGE("error pushing blank frames: unlock failed: %s (%d)",
strerror(-err), -err);
goto error;
}
@@ -2147,7 +2147,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() {
err = mNativeWindow->queueBuffer(mNativeWindow.get(),
buf->getNativeBuffer());
if (err != NO_ERROR) {
- LOGE("error pushing blank frames: queueBuffer failed: %s (%d)",
+ ALOGE("error pushing blank frames: queueBuffer failed: %s (%d)",
strerror(-err), -err);
goto error;
}
@@ -2174,7 +2174,7 @@ error:
err = native_window_api_disconnect(mNativeWindow.get(),
NATIVE_WINDOW_API_CPU);
if (err != NO_ERROR) {
- LOGE("error pushing blank frames: api_disconnect failed: %s (%d)",
+ ALOGE("error pushing blank frames: api_disconnect failed: %s (%d)",
strerror(-err), -err);
return err;
}
@@ -2182,7 +2182,7 @@ error:
err = native_window_api_connect(mNativeWindow.get(),
NATIVE_WINDOW_API_MEDIA);
if (err != NO_ERROR) {
- LOGE("error pushing blank frames: api_connect failed: %s (%d)",
+ ALOGE("error pushing blank frames: api_connect failed: %s (%d)",
strerror(-err), -err);
return err;
}
@@ -2214,7 +2214,7 @@ int64_t OMXCodec::retrieveDecodingTimeUs(bool isCodecSpecific) {
void OMXCodec::on_message(const omx_message &msg) {
if (mState == ERROR) {
- LOGW("Dropping OMX message - we're in ERROR state.");
+ ALOGW("Dropping OMX message - we're in ERROR state.");
return;
}
@@ -2242,7 +2242,7 @@ void OMXCodec::on_message(const omx_message &msg) {
CHECK(i < buffers->size());
if ((*buffers)[i].mStatus != OWNED_BY_COMPONENT) {
- LOGW("We already own input buffer %p, yet received "
+ ALOGW("We already own input buffer %p, yet received "
"an EMPTY_BUFFER_DONE.", buffer);
}
@@ -2302,7 +2302,7 @@ void OMXCodec::on_message(const omx_message &msg) {
BufferInfo *info = &buffers->editItemAt(i);
if (info->mStatus != OWNED_BY_COMPONENT) {
- LOGW("We already own output buffer %p, yet received "
+ ALOGW("We already own output buffer %p, yet received "
"a FILL_BUFFER_DONE.", buffer);
}
@@ -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;
@@ -3556,7 +3556,7 @@ void OMXCodec::setAMRFormat(bool isWAMR, int32_t bitRate) {
status_t OMXCodec::setAACFormat(int32_t numChannels, int32_t sampleRate, int32_t bitRate) {
if (numChannels > 2)
- LOGW("Number of channels: (%d) \n", numChannels);
+ ALOGW("Number of channels: (%d) \n", numChannels);
if (mIsEncoder) {
//////////////// input port ////////////////////
@@ -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..73efc27 100644
--- a/media/libstagefright/OggExtractor.cpp
+++ b/media/libstagefright/OggExtractor.cpp
@@ -189,9 +189,9 @@ status_t OggSource::read(
#if 0
int64_t timeUs;
if (packet->meta_data()->findInt64(kKeyTime, &timeUs)) {
- LOGI("found time = %lld us", timeUs);
+ ALOGI("found time = %lld us", timeUs);
} else {
- LOGI("NO time");
+ ALOGI("NO time");
}
#endif
@@ -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) {
@@ -777,7 +777,7 @@ void MyVorbisExtractor::parseFileMetaData() {
const char *comment = mVc.user_comments[i];
size_t commentLength = mVc.comment_lengths[i];
parseVorbisComment(mFileMeta, comment, commentLength);
- //LOGI("comment #%d: '%s'", i + 1, mVc.user_comments[i]);
+ //ALOGI("comment #%d: '%s'", i + 1, mVc.user_comments[i]);
}
}
@@ -893,17 +893,17 @@ 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);
if (flac == NULL) {
- LOGE("malformed base64 encoded data.");
+ ALOGE("malformed base64 encoded data.");
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..81ec5c1 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;
@@ -77,7 +77,7 @@ status_t SampleIterator::seekTo(uint32_t sampleIndex) {
if (sampleIndex >= mStopChunkSampleIndex) {
status_t err;
if ((err = findChunkRange(sampleIndex)) != OK) {
- LOGE("findChunkRange failed");
+ ALOGE("findChunkRange failed");
return err;
}
}
@@ -93,7 +93,7 @@ status_t SampleIterator::seekTo(uint32_t sampleIndex) {
status_t err;
if ((err = getChunkOffset(chunk, &mCurrentChunkOffset)) != OK) {
- LOGE("getChunkOffset return error");
+ ALOGE("getChunkOffset return error");
return err;
}
@@ -107,7 +107,7 @@ status_t SampleIterator::seekTo(uint32_t sampleIndex) {
size_t sampleSize;
if ((err = getSampleSizeDirect(
firstChunkSampleIndex + i, &sampleSize)) != OK) {
- LOGE("getSampleSizeDirect return error");
+ ALOGE("getSampleSizeDirect return error");
return err;
}
@@ -134,7 +134,7 @@ status_t SampleIterator::seekTo(uint32_t sampleIndex) {
status_t err;
if ((err = findSampleTime(sampleIndex, &mCurrentSampleTime)) != OK) {
- LOGE("findSampleTime return error");
+ ALOGE("findSampleTime return error");
return err;
}
diff --git a/media/libstagefright/SampleTable.cpp b/media/libstagefright/SampleTable.cpp
index bf31947..8d80d63 100644
--- a/media/libstagefright/SampleTable.cpp
+++ b/media/libstagefright/SampleTable.cpp
@@ -347,7 +347,7 @@ status_t SampleTable::setTimeToSampleParams(
status_t SampleTable::setCompositionTimeToSampleParams(
off64_t data_offset, size_t data_size) {
- LOGI("There are reordered frames present.");
+ ALOGI("There are reordered frames present.");
if (mCompositionTimeDeltaEntries != NULL || data_size < 8) {
return ERROR_MALFORMED;
@@ -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];
@@ -630,7 +630,7 @@ status_t SampleTable::findSyncSampleNear(
if (left == mNumSyncSamples) {
if (flags == kFlagAfter) {
- LOGE("tried to find a sync frame after the last one: %d", left);
+ ALOGE("tried to find a sync frame after the last one: %d", left);
return ERROR_OUT_OF_RANGE;
}
}
diff --git a/media/libstagefright/StagefrightMediaScanner.cpp b/media/libstagefright/StagefrightMediaScanner.cpp
index 2505096..bd7a226 100644
--- a/media/libstagefright/StagefrightMediaScanner.cpp
+++ b/media/libstagefright/StagefrightMediaScanner.cpp
@@ -57,7 +57,7 @@ static MediaScanResult HandleMIDI(
// get the library configuration and do sanity check
const S_EAS_LIB_CONFIG* pLibConfig = EAS_Config();
if ((pLibConfig == NULL) || (LIB_VERSION != pLibConfig->libVersion)) {
- LOGE("EAS library/header mismatch\n");
+ ALOGE("EAS library/header mismatch\n");
return MEDIA_SCAN_RESULT_ERROR;
}
EAS_I32 temp;
@@ -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..43bfd9e 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,14 +120,14 @@ 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;
}
status_t err = decoder->start();
if (err != OK) {
- LOGW("OMXCodec::start returned error %d (0x%08x)\n", err, err);
+ ALOGW("OMXCodec::start returned error %d (0x%08x)\n", err, err);
return NULL;
}
@@ -138,7 +138,7 @@ static VideoFrame *extractVideoFrameWithCodecFlags(
if (seekMode < MediaSource::ReadOptions::SEEK_PREVIOUS_SYNC ||
seekMode > MediaSource::ReadOptions::SEEK_CLOSEST) {
- LOGE("Unknown seek mode: %d", seekMode);
+ ALOGE("Unknown seek mode: %d", seekMode);
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);
}
}
@@ -264,7 +264,7 @@ static VideoFrame *extractVideoFrameWithCodecFlags(
decoder->stop();
if (err != OK) {
- LOGE("Colorconverter failed to convert frame.");
+ ALOGE("Colorconverter failed to convert frame.");
delete frame;
frame = NULL;
@@ -276,23 +276,23 @@ 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;
}
int32_t drm = 0;
if (fileMeta->findInt32(kKeyIsDRM, &drm) && drm != 0) {
- LOGE("frame grab not allowed.");
+ ALOGE("frame grab not allowed.");
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..48df058 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,9 +108,9 @@ 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");
+ ALOGE("setBufferCount: bufferCount is larger than the number of buffer slots");
return BAD_VALUE;
}
@@ -118,7 +118,7 @@ status_t SurfaceMediaSource::setBufferCount(int bufferCount) {
// Error out if the user has dequeued buffers
for (int i = 0 ; i < mBufferCount ; i++) {
if (mSlots[i].mBufferState == BufferSlot::DEQUEUED) {
- LOGE("setBufferCount: client owns some buffers");
+ ALOGE("setBufferCount: client owns some buffers");
return INVALID_OPERATION;
}
}
@@ -150,10 +150,10 @@ 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",
+ ALOGE("requestBuffer: slot index out of range [0, %d]: %d",
mBufferCount, slot);
return BAD_VALUE;
}
@@ -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
@@ -181,7 +181,7 @@ status_t SurfaceMediaSource::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h,
// we might declare mHeight and mWidth and check against those here.
if ((w != 0) || (h != 0)) {
if ((w != mDefaultWidth) || (h != mDefaultHeight)) {
- LOGE("dequeuebuffer: invalid buffer size! Req: %dx%d, Found: %dx%d",
+ ALOGE("dequeuebuffer: invalid buffer size! Req: %dx%d, Found: %dx%d",
mDefaultWidth, mDefaultHeight, w, h);
return BAD_VALUE;
}
@@ -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) {
@@ -282,7 +282,7 @@ status_t SurfaceMediaSource::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h,
// than allowed.
const int avail = mBufferCount - (dequeuedCount+1);
if (avail < (MIN_UNDEQUEUED_BUFFERS-int(mSynchronousMode))) {
- LOGE("dequeueBuffer: MIN_UNDEQUEUED_BUFFERS=%d exceeded (dequeued=%d)",
+ ALOGE("dequeueBuffer: MIN_UNDEQUEUED_BUFFERS=%d exceeded (dequeued=%d)",
MIN_UNDEQUEUED_BUFFERS-int(mSynchronousMode),
dequeuedCount);
return -EBUSY;
@@ -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) {
@@ -344,7 +344,7 @@ status_t SurfaceMediaSource::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h,
mGraphicBufferAlloc->createGraphicBuffer(
w, h, format, usage, &error));
if (graphicBuffer == 0) {
- LOGE("dequeueBuffer: SurfaceComposer::createGraphicBuffer failed");
+ ALOGE("dequeueBuffer: SurfaceComposer::createGraphicBuffer failed");
return error;
}
if (updateFormat) {
@@ -361,13 +361,13 @@ status_t SurfaceMediaSource::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h,
status_t SurfaceMediaSource::setSynchronousMode(bool enabled) {
Mutex::Autolock lock(mMutex);
if (mStopped) {
- LOGE("setSynchronousMode: SurfaceMediaSource has been stopped!");
+ ALOGE("setSynchronousMode: SurfaceMediaSource has been stopped!");
return NO_INIT;
}
if (!enabled) {
// Async mode is not allowed
- LOGE("SurfaceMediaSource can be used only synchronous mode!");
+ ALOGE("SurfaceMediaSource can be used only synchronous mode!");
return INVALID_OPERATION;
}
@@ -384,11 +384,11 @@ 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) {
- LOGE("Connect: SurfaceMediaSource has been stopped!");
+ ALOGE("Connect: SurfaceMediaSource has been stopped!");
return NO_INIT;
}
@@ -425,11 +425,11 @@ 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) {
- LOGE("disconnect: SurfaceMediaSoource is already stopped!");
+ ALOGE("disconnect: SurfaceMediaSoource is already stopped!");
return NO_INIT;
}
@@ -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;
@@ -465,15 +465,15 @@ status_t SurfaceMediaSource::queueBuffer(int bufIndex, int64_t timestamp,
*outTransform = 0;
if (bufIndex < 0 || bufIndex >= mBufferCount) {
- LOGE("queueBuffer: slot index out of range [0, %d]: %d",
+ ALOGE("queueBuffer: slot index out of range [0, %d]: %d",
mBufferCount, bufIndex);
return -EINVAL;
} else if (mSlots[bufIndex].mBufferState != BufferSlot::DEQUEUED) {
- LOGE("queueBuffer: slot %d is not owned by the client (state=%d)",
+ ALOGE("queueBuffer: slot %d is not owned by the client (state=%d)",
bufIndex, mSlots[bufIndex].mBufferState);
return -EINVAL;
} else if (!mSlots[bufIndex].mRequestBufferCalled) {
- LOGE("queueBuffer: slot %d was enqueued without requesting a "
+ ALOGE("queueBuffer: slot %d was enqueued without requesting a "
"buffer", bufIndex);
return -EINVAL;
}
@@ -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,14 +556,14 @@ 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",
+ ALOGE("cancelBuffer: slot index out of range [0, %d]: %d",
mBufferCount, bufIndex);
return;
} else if (mSlots[bufIndex].mBufferState != BufferSlot::DEQUEUED) {
- LOGE("cancelBuffer: slot %d is not owned by the client (state=%d)",
+ ALOGE("cancelBuffer: slot %d is not owned by the client (state=%d)",
bufIndex, mSlots[bufIndex].mBufferState);
return;
}
@@ -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,13 +806,13 @@ 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));
char *data = (char *)tempBuffer->data();
if (data == NULL) {
- LOGE("Cannot allocate memory for metadata buffer!");
+ ALOGE("Cannot allocate memory for metadata buffer!");
return;
}
OMX_U32 type = kMetadataBufferTypeGrallocSource;
@@ -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..12c9c36 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);
@@ -265,7 +265,7 @@ void TimedEventQueue::threadEntry() {
static int64_t kMaxTimeoutUs = 10000000ll; // 10 secs
bool timeoutCapped = false;
if (delay_us > kMaxTimeoutUs) {
- LOGW("delay_us exceeds max timeout: %lld us", delay_us);
+ ALOGW("delay_us exceeds max timeout: %lld us", delay_us);
// We'll never block for more than 10 secs, instead
// we will split up the full timeout into chunks of
@@ -315,7 +315,7 @@ sp<TimedEventQueue::Event> TimedEventQueue::removeEventFromQueue_l(
}
}
- LOGW("Event %d was not found in the queue, already cancelled?", id);
+ ALOGW("Event %d was not found in the queue, already cancelled?", id);
return NULL;
}
diff --git a/media/libstagefright/VBRISeeker.cpp b/media/libstagefright/VBRISeeker.cpp
index 6f968be..6ac5a83 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,14 +113,14 @@ 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;
}
delete[] buffer;
buffer = NULL;
- LOGI("Found VBRI header.");
+ ALOGI("Found VBRI header.");
return seeker;
}
@@ -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/WVMExtractor.cpp b/media/libstagefright/WVMExtractor.cpp
index 26eda0c..2092cb6 100644
--- a/media/libstagefright/WVMExtractor.cpp
+++ b/media/libstagefright/WVMExtractor.cpp
@@ -53,7 +53,7 @@ WVMExtractor::WVMExtractor(const sp<DataSource> &source)
}
if (gVendorLibHandle == NULL) {
- LOGE("Failed to open libwvm.so");
+ ALOGE("Failed to open libwvm.so");
return;
}
}
@@ -67,7 +67,7 @@ WVMExtractor::WVMExtractor(const sp<DataSource> &source)
mImpl = (*getInstanceFunc)(source);
CHECK(mImpl != NULL);
} else {
- LOGE("Failed to locate GetInstance in libwvm.so");
+ ALOGE("Failed to locate GetInstance in libwvm.so");
}
}
diff --git a/media/libstagefright/avc_utils.cpp b/media/libstagefright/avc_utils.cpp
index 153ee33..65c1848 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);
@@ -290,7 +290,7 @@ sp<MetaData> MakeAVCCodecSpecificData(const sp<ABuffer> &accessUnit) {
memcpy(out, picParamSet->data(), picParamSet->size());
#if 0
- LOGI("AVC seq param set");
+ ALOGI("AVC seq param set");
hexdump(seqParamSet->data(), seqParamSet->size());
#endif
@@ -301,7 +301,7 @@ sp<MetaData> MakeAVCCodecSpecificData(const sp<ABuffer> &accessUnit) {
meta->setInt32(kKeyWidth, width);
meta->setInt32(kKeyHeight, height);
- LOGI("found AVC codec config (%d x %d, %s-profile level %d.%d)",
+ ALOGI("found AVC codec config (%d x %d, %s-profile level %d.%d)",
width, height, AVCProfileToString(profile), level / 10, level % 10);
return meta;
diff --git a/media/libstagefright/codecs/aacdec/SoftAAC.cpp b/media/libstagefright/codecs/aacdec/SoftAAC.cpp
index 2abdb56..da9d280 100644
--- a/media/libstagefright/codecs/aacdec/SoftAAC.cpp
+++ b/media/libstagefright/codecs/aacdec/SoftAAC.cpp
@@ -116,7 +116,7 @@ status_t SoftAAC::initDecoder() {
Int err = PVMP4AudioDecoderInitLibrary(mConfig, mDecoderBuf);
if (err != MP4AUDEC_SUCCESS) {
- LOGE("Failed to initialize MP4 audio decoder");
+ ALOGE("Failed to initialize MP4 audio decoder");
return UNKNOWN_ERROR;
}
@@ -317,16 +317,16 @@ 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) {
mUpsamplingFactor = mConfig->aacPlusUpsamplingFactor;
// Check on the sampling rate to see whether it is changed.
if (mConfig->samplingRate != prevSamplingRate) {
- LOGW("Sample rate was %d Hz, but now is %d Hz",
+ ALOGW("Sample rate was %d Hz, but now is %d Hz",
prevSamplingRate, mConfig->samplingRate);
// We'll hold onto the input buffer and will decode
@@ -341,7 +341,7 @@ void SoftAAC::onQueueFilled(OMX_U32 portIndex) {
mConfig->extendedAudioObjectType == MP4AUDIO_LTP) {
if (mUpsamplingFactor == 2) {
// The stream turns out to be not aacPlus mode anyway
- LOGW("Disable AAC+/eAAC+ since extended audio object "
+ ALOGW("Disable AAC+/eAAC+ since extended audio object "
"type is %d",
mConfig->extendedAudioObjectType);
mConfig->aacPlusEnabled = 0;
@@ -351,7 +351,7 @@ void SoftAAC::onQueueFilled(OMX_U32 portIndex) {
// aacPlus mode does not buy us anything, but to cause
// 1. CPU load to increase, and
// 2. a half speed of decoding
- LOGW("Disable AAC+/eAAC+ since upsampling factor is 1");
+ ALOGW("Disable AAC+/eAAC+ since upsampling factor is 1");
mConfig->aacPlusEnabled = 0;
}
}
@@ -367,7 +367,7 @@ void SoftAAC::onQueueFilled(OMX_U32 portIndex) {
inHeader->nFilledLen -= mConfig->inputBufferUsedLength;
inHeader->nOffset += mConfig->inputBufferUsedLength;
} else {
- LOGW("AAC decoder returned error %d, substituting silence",
+ ALOGW("AAC decoder returned error %d, substituting silence",
decoderErr);
memset(outHeader->pBuffer + outHeader->nOffset, 0, numOutBytes);
diff --git a/media/libstagefright/codecs/aacenc/AACEncoder.cpp b/media/libstagefright/codecs/aacenc/AACEncoder.cpp
index 0bff52d..2b8633d 100644
--- a/media/libstagefright/codecs/aacenc/AACEncoder.cpp
+++ b/media/libstagefright/codecs/aacenc/AACEncoder.cpp
@@ -53,7 +53,7 @@ status_t AACEncoder::initCheck() {
CHECK(mApiHandle);
if (VO_ERR_NONE != voGetAACEncAPI(mApiHandle)) {
- LOGE("Failed to get api handle");
+ ALOGE("Failed to get api handle");
return UNKNOWN_ERROR;
}
@@ -70,11 +70,11 @@ status_t AACEncoder::initCheck() {
userData.memflag = VO_IMF_USERMEMOPERATOR;
userData.memData = (VO_PTR) mMemOperator;
if (VO_ERR_NONE != mApiHandle->Init(&mEncoderHandle, VO_AUDIO_CodingAAC, &userData)) {
- LOGE("Failed to init AAC encoder");
+ ALOGE("Failed to init AAC encoder");
return UNKNOWN_ERROR;
}
if (OK != setAudioSpecificConfigData()) {
- LOGE("Failed to configure AAC encoder");
+ ALOGE("Failed to configure AAC encoder");
return UNKNOWN_ERROR;
}
@@ -86,7 +86,7 @@ status_t AACEncoder::initCheck() {
params.nChannels = mChannels;
params.adtsUsed = 0; // We add adts header in the file writer if needed.
if (VO_ERR_NONE != mApiHandle->SetParam(mEncoderHandle, VO_PID_AAC_ENCPARAM, &params)) {
- LOGE("Failed to set AAC encoder parameters");
+ ALOGE("Failed to set AAC encoder parameters");
return UNKNOWN_ERROR;
}
@@ -106,18 +106,18 @@ static status_t getSampleRateTableIndex(int32_t sampleRate, int32_t &index) {
}
}
- LOGE("Sampling rate %d bps is not supported", sampleRate);
+ ALOGE("Sampling rate %d bps is not supported", sampleRate);
return UNKNOWN_ERROR;
}
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;
CHECK_EQ(OK, getSampleRateTableIndex(mSampleRate, index));
if (mChannels > 2 || mChannels <= 0) {
- LOGE("Unsupported number of channels(%d)", mChannels);
+ ALOGE("Unsupported number of channels(%d)", mChannels);
return UNKNOWN_ERROR;
}
@@ -135,7 +135,7 @@ AACEncoder::~AACEncoder() {
status_t AACEncoder::start(MetaData *params) {
if (mStarted) {
- LOGW("Call start() when encoder already started");
+ ALOGW("Call start() when encoder already started");
return OK;
}
@@ -153,7 +153,7 @@ status_t AACEncoder::start(MetaData *params) {
status_t err = mSource->start(params);
if (err != OK) {
- LOGE("AudioSource is not available");
+ ALOGE("AudioSource is not available");
return err;
}
@@ -177,7 +177,7 @@ status_t AACEncoder::stop() {
}
if (!mStarted) {
- LOGW("Call stop() when encoder has not started");
+ ALOGW("Call stop() when encoder has not started");
return ERROR_END_OF_STREAM;
}
diff --git a/media/libstagefright/codecs/aacenc/basic_op/oper_32b.c b/media/libstagefright/codecs/aacenc/basic_op/oper_32b.c
index e48af9d..982f4fd 100644
--- a/media/libstagefright/codecs/aacenc/basic_op/oper_32b.c
+++ b/media/libstagefright/codecs/aacenc/basic_op/oper_32b.c
@@ -358,4 +358,4 @@ Word32 pow2_xy(Word32 x, Word32 y)
res = pow2Table[(POW2_TABLE_SIZE*fPart)/y] >> iPart;
return(res);
-} \ No newline at end of file
+}
diff --git a/media/libstagefright/codecs/aacenc/inc/config.h b/media/libstagefright/codecs/aacenc/inc/config.h
index 3b29cef..b0b4c26 100644
--- a/media/libstagefright/codecs/aacenc/inc/config.h
+++ b/media/libstagefright/codecs/aacenc/inc/config.h
@@ -33,4 +33,4 @@
#define MINBITS_COEF 744
-#endif \ No newline at end of file
+#endif
diff --git a/media/libstagefright/codecs/aacenc/inc/sf_estim.h b/media/libstagefright/codecs/aacenc/inc/sf_estim.h
index 9039f25..997eba5 100644
--- a/media/libstagefright/codecs/aacenc/inc/sf_estim.h
+++ b/media/libstagefright/codecs/aacenc/inc/sf_estim.h
@@ -43,4 +43,4 @@ EstimateScaleFactors(PSY_OUT_CHANNEL psyOutChannel[MAX_CHANNELS],
Word16 logSfbFormFactor[MAX_CHANNELS][MAX_GROUPED_SFB],
Word16 sfbNRelevantLines[MAX_CHANNELS][MAX_GROUPED_SFB],
const Word16 nChannels);
-#endif \ No newline at end of file
+#endif
diff --git a/media/libstagefright/codecs/aacenc/inc/transform.h b/media/libstagefright/codecs/aacenc/inc/transform.h
index fbac7aa..311cef5 100644
--- a/media/libstagefright/codecs/aacenc/inc/transform.h
+++ b/media/libstagefright/codecs/aacenc/inc/transform.h
@@ -33,4 +33,4 @@ void Transform_Real(Word16 *mdctDelayBuffer,
Word16 windowSequence
);
-#endif \ No newline at end of file
+#endif
diff --git a/media/libstagefright/codecs/aacenc/src/aac_rom.c b/media/libstagefright/codecs/aacenc/src/aac_rom.c
index 08792e8..127322d 100644
--- a/media/libstagefright/codecs/aacenc/src/aac_rom.c
+++ b/media/libstagefright/codecs/aacenc/src/aac_rom.c
@@ -2360,4 +2360,4 @@ const unsigned char bitrevTab[17 + 129] =
0x4d, 0x59, 0x4f, 0x79, 0x53, 0x65, 0x57, 0x75, 0x5b, 0x6d, 0x5f, 0x7d, 0x67, 0x73, 0x6f, 0x7b,
0x00, 0x08, 0x14, 0x1c, 0x22, 0x2a, 0x36, 0x3e, 0x41, 0x49, 0x55, 0x5d, 0x63, 0x6b, 0x77, 0x7f,
0x00,
-}; \ No newline at end of file
+};
diff --git a/media/libstagefright/codecs/aacenc/src/aacenc.c b/media/libstagefright/codecs/aacenc/src/aacenc.c
index b5e8a9c..ad2f29a 100644
--- a/media/libstagefright/codecs/aacenc/src/aacenc.c
+++ b/media/libstagefright/codecs/aacenc/src/aacenc.c
@@ -492,4 +492,4 @@ VO_S32 VO_API voGetAACEncAPI(VO_AUDIO_CODECAPI * pDecHandle)
pDecHandle->Uninit = voAACEncUninit;
return VO_ERR_NONE;
-} \ No newline at end of file
+}
diff --git a/media/libstagefright/codecs/aacenc/src/adj_thr.c b/media/libstagefright/codecs/aacenc/src/adj_thr.c
index c656f65..a8ab809 100644
--- a/media/libstagefright/codecs/aacenc/src/adj_thr.c
+++ b/media/libstagefright/codecs/aacenc/src/adj_thr.c
@@ -1039,7 +1039,7 @@ void AdjThrInit(ADJ_THR_STATE *hAdjThr,
/* minSnr adaptation */
/* maximum reduction of minSnr goes down to minSnr^maxRed */
- msaParam->maxRed = 0x20000000; /* *0.25f /
+ msaParam->maxRed = 0x20000000; /* *0.25f */
/* start adaptation of minSnr for avgEn/sfbEn > startRatio */
msaParam->startRatio = 0x0ccccccd; /* 10 */
/* maximum minSnr reduction to minSnr^maxRed is reached for
diff --git a/media/libstagefright/codecs/aacenc/src/asm/ARMV5E/PrePostMDCT_v5.s b/media/libstagefright/codecs/aacenc/src/asm/ARMV5E/PrePostMDCT_v5.s
index 103cc91..da21d5f 100644
--- a/media/libstagefright/codecs/aacenc/src/asm/ARMV5E/PrePostMDCT_v5.s
+++ b/media/libstagefright/codecs/aacenc/src/asm/ARMV5E/PrePostMDCT_v5.s
@@ -128,4 +128,4 @@ PostMDCT_LOOP:
PostMDCT_END:
ldmia sp!, {r4 - r11, pc}
@ENDP @ |PostMDCT|
- .end \ No newline at end of file
+ .end
diff --git a/media/libstagefright/codecs/aacenc/src/asm/ARMV5E/R4R8First_v5.s b/media/libstagefright/codecs/aacenc/src/asm/ARMV5E/R4R8First_v5.s
index 72cb9a3..4ca4f31 100644
--- a/media/libstagefright/codecs/aacenc/src/asm/ARMV5E/R4R8First_v5.s
+++ b/media/libstagefright/codecs/aacenc/src/asm/ARMV5E/R4R8First_v5.s
@@ -249,4 +249,4 @@ DATATab:
.word 0x5a82799a
@ENDP @ |Radix8First|
- .end \ No newline at end of file
+ .end
diff --git a/media/libstagefright/codecs/aacenc/src/asm/ARMV5E/Radix4FFT_v5.s b/media/libstagefright/codecs/aacenc/src/asm/ARMV5E/Radix4FFT_v5.s
index e81c82e..b59b967 100644
--- a/media/libstagefright/codecs/aacenc/src/asm/ARMV5E/Radix4FFT_v5.s
+++ b/media/libstagefright/codecs/aacenc/src/asm/ARMV5E/Radix4FFT_v5.s
@@ -166,4 +166,4 @@ Radix4FFT_END:
ldmia sp!, {r4 - r11, pc}
@ENDP @ |Radix4FFT|
- .end \ No newline at end of file
+ .end
diff --git a/media/libstagefright/codecs/aacenc/src/asm/ARMV7/PrePostMDCT_v7.s b/media/libstagefright/codecs/aacenc/src/asm/ARMV7/PrePostMDCT_v7.s
index 64d767a..b2bc9d9 100644
--- a/media/libstagefright/codecs/aacenc/src/asm/ARMV7/PrePostMDCT_v7.s
+++ b/media/libstagefright/codecs/aacenc/src/asm/ARMV7/PrePostMDCT_v7.s
@@ -132,4 +132,4 @@ PostMDCT_END:
ldmia sp!, {r4 - r11, pc}
@ENDP @ |PostMDCT|
- .end \ No newline at end of file
+ .end
diff --git a/media/libstagefright/codecs/aacenc/src/asm/ARMV7/R4R8First_v7.s b/media/libstagefright/codecs/aacenc/src/asm/ARMV7/R4R8First_v7.s
index 7fc5520..3033156 100644
--- a/media/libstagefright/codecs/aacenc/src/asm/ARMV7/R4R8First_v7.s
+++ b/media/libstagefright/codecs/aacenc/src/asm/ARMV7/R4R8First_v7.s
@@ -143,4 +143,4 @@ Radix4First_END:
ldmia sp!, {r4 - r11, pc}
@ENDP @ |Radix4First|
- .end \ No newline at end of file
+ .end
diff --git a/media/libstagefright/codecs/aacenc/src/asm/ARMV7/Radix4FFT_v7.s b/media/libstagefright/codecs/aacenc/src/asm/ARMV7/Radix4FFT_v7.s
index b8655ae..f874825 100644
--- a/media/libstagefright/codecs/aacenc/src/asm/ARMV7/Radix4FFT_v7.s
+++ b/media/libstagefright/codecs/aacenc/src/asm/ARMV7/Radix4FFT_v7.s
@@ -140,4 +140,4 @@ Radix4FFT_END:
ldmia sp!, {r4 - r11, pc}
@ENDP @ |Radix4FFT|
- .end \ No newline at end of file
+ .end
diff --git a/media/libstagefright/codecs/aacenc/src/band_nrg.c b/media/libstagefright/codecs/aacenc/src/band_nrg.c
index 7501af1..e4034b8 100644
--- a/media/libstagefright/codecs/aacenc/src/band_nrg.c
+++ b/media/libstagefright/codecs/aacenc/src/band_nrg.c
@@ -99,4 +99,4 @@ void CalcBandEnergyMS(const Word32 *mdctSpectrumLeft,
*bandEnergySideSum = accuSideSum;
}
-#endif \ No newline at end of file
+#endif
diff --git a/media/libstagefright/codecs/amrnb/dec/SoftAMR.cpp b/media/libstagefright/codecs/amrnb/dec/SoftAMR.cpp
index c0a588f..7602f2d 100644
--- a/media/libstagefright/codecs/amrnb/dec/SoftAMR.cpp
+++ b/media/libstagefright/codecs/amrnb/dec/SoftAMR.cpp
@@ -304,7 +304,7 @@ void SoftAMR::onQueueFilled(OMX_U32 portIndex) {
MIME_IETF);
if (numBytesRead == -1) {
- LOGE("PV AMR decoder AMRDecode() call failed");
+ ALOGE("PV AMR decoder AMRDecode() call failed");
notify(OMX_EventError, OMX_ErrorUndefined, 0, NULL);
mSignalledError = true;
diff --git a/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp b/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp
index d361ef4..3afbc4f 100644
--- a/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp
+++ b/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp
@@ -71,7 +71,7 @@ static Mode PickModeFromBitrate(int32_t bps) {
status_t AMRNBEncoder::start(MetaData *params) {
if (mStarted) {
- LOGW("Call start() when encoder already started");
+ ALOGW("Call start() when encoder already started");
return OK;
}
@@ -84,7 +84,7 @@ status_t AMRNBEncoder::start(MetaData *params) {
status_t err = mSource->start(params);
if (err != OK) {
- LOGE("AudioSource is not available");
+ ALOGE("AudioSource is not available");
return err;
}
@@ -105,7 +105,7 @@ status_t AMRNBEncoder::start(MetaData *params) {
status_t AMRNBEncoder::stop() {
if (!mStarted) {
- LOGW("Call stop() when encoder has not started.");
+ ALOGW("Call stop() when encoder has not started.");
return OK;
}
diff --git a/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp b/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp
index 5eacc16..60b1163 100644
--- a/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp
+++ b/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp
@@ -80,7 +80,7 @@ status_t AMRWBEncoder::initCheck() {
CHECK(mApiHandle);
if (VO_ERR_NONE != voGetAMRWBEncAPI(mApiHandle)) {
- LOGE("Failed to get api handle");
+ ALOGE("Failed to get api handle");
return UNKNOWN_ERROR;
}
@@ -97,20 +97,20 @@ status_t AMRWBEncoder::initCheck() {
userData.memflag = VO_IMF_USERMEMOPERATOR;
userData.memData = (VO_PTR) mMemOperator;
if (VO_ERR_NONE != mApiHandle->Init(&mEncoderHandle, VO_AUDIO_CodingAMRWB, &userData)) {
- LOGE("Failed to init AMRWB encoder");
+ ALOGE("Failed to init AMRWB encoder");
return UNKNOWN_ERROR;
}
// Configure AMRWB encoder$
VOAMRWBMODE mode = pickModeFromBitRate(mBitRate);
if (VO_ERR_NONE != mApiHandle->SetParam(mEncoderHandle, VO_PID_AMRWB_MODE, &mode)) {
- LOGE("Failed to set AMRWB encoder mode to %d", mode);
+ ALOGE("Failed to set AMRWB encoder mode to %d", mode);
return UNKNOWN_ERROR;
}
VOAMRWBFRAMETYPE type = VOAMRWB_RFC3267;
if (VO_ERR_NONE != mApiHandle->SetParam(mEncoderHandle, VO_PID_AMRWB_FRAMETYPE, &type)) {
- LOGE("Failed to set AMRWB encoder frame type to %d", type);
+ ALOGE("Failed to set AMRWB encoder frame type to %d", type);
return UNKNOWN_ERROR;
}
@@ -125,7 +125,7 @@ AMRWBEncoder::~AMRWBEncoder() {
status_t AMRWBEncoder::start(MetaData *params) {
if (mStarted) {
- LOGW("Call start() when encoder already started");
+ ALOGW("Call start() when encoder already started");
return OK;
}
@@ -140,7 +140,7 @@ status_t AMRWBEncoder::start(MetaData *params) {
status_t err = mSource->start(params);
if (err != OK) {
- LOGE("AudioSource is not available");
+ ALOGE("AudioSource is not available");
return err;
}
mStarted = true;
@@ -150,7 +150,7 @@ status_t AMRWBEncoder::start(MetaData *params) {
status_t AMRWBEncoder::stop() {
if (!mStarted) {
- LOGW("Call stop() when encoder has not started");
+ ALOGW("Call stop() when encoder has not started");
return OK;
}
diff --git a/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp b/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp
index 0096760..e202a2b 100644
--- a/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp
+++ b/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp
@@ -35,20 +35,20 @@ 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;
return OK;
default:
- LOGE("Unsupported omx profile: %d", omxProfile);
+ ALOGE("Unsupported omx profile: %d", omxProfile);
}
return BAD_VALUE;
}
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:
@@ -100,7 +100,7 @@ static status_t ConvertOmxAvcLevelToAvcSpecLevel(
level = AVC_LEVEL5_1;
break;
default:
- LOGE("Unknown omx level: %d", omxLevel);
+ ALOGE("Unknown omx level: %d", omxLevel);
return BAD_VALUE;
}
*pvLevel = level;
@@ -178,7 +178,7 @@ AVCEncoder::AVCEncoder(
mInputFrameData(NULL),
mGroup(NULL) {
- LOGI("Construct software AVCEncoder");
+ ALOGI("Construct software AVCEncoder");
mHandle = new tagAVCHandle;
memset(mHandle, 0, sizeof(tagAVCHandle));
@@ -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));
@@ -214,7 +214,7 @@ status_t AVCEncoder::initCheck(const sp<MetaData>& meta) {
CHECK(meta->findInt32(kKeyColorFormat, &mVideoColorFormat));
if (mVideoColorFormat != OMX_COLOR_FormatYUV420Planar) {
if (mVideoColorFormat != OMX_COLOR_FormatYUV420SemiPlanar) {
- LOGE("Color format %d is not supported", mVideoColorFormat);
+ ALOGE("Color format %d is not supported", mVideoColorFormat);
return BAD_VALUE;
}
// Allocate spare buffer only when color conversion is needed.
@@ -226,7 +226,7 @@ status_t AVCEncoder::initCheck(const sp<MetaData>& meta) {
// XXX: Remove this restriction
if (mVideoWidth % 16 != 0 || mVideoHeight % 16 != 0) {
- LOGE("Video frame size %dx%d must be a multiple of 16",
+ ALOGE("Video frame size %dx%d must be a multiple of 16",
mVideoWidth, mVideoHeight);
return BAD_VALUE;
}
@@ -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,20 +330,20 @@ status_t AVCEncoder::initCheck(const sp<MetaData>& meta) {
}
status_t AVCEncoder::start(MetaData *params) {
- LOGV("start");
+ ALOGV("start");
if (mInitCheck != OK) {
return mInitCheck;
}
if (mStarted) {
- LOGW("Call start() when encoder already started");
+ ALOGW("Call start() when encoder already started");
return OK;
}
AVCEnc_Status err;
err = PVAVCEncInitialize(mHandle, mEncParams, NULL, NULL);
if (err != AVCENC_SUCCESS) {
- LOGE("Failed to initialize the encoder: %d", err);
+ ALOGE("Failed to initialize the encoder: %d", err);
return UNKNOWN_ERROR;
}
@@ -366,9 +366,9 @@ status_t AVCEncoder::start(MetaData *params) {
}
status_t AVCEncoder::stop() {
- LOGV("stop");
+ ALOGV("stop");
if (!mStarted) {
- LOGW("Call stop() when encoder has not started");
+ ALOGW("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;
}
@@ -461,7 +461,7 @@ status_t AVCEncoder::read(
*out = outputBuffer;
return OK;
default:
- LOGE("Nal type (%d) other than SPS/PPS is unexpected", type);
+ ALOGE("Nal type (%d) other than SPS/PPS is unexpected", type);
return UNKNOWN_ERROR;
}
}
@@ -476,7 +476,7 @@ status_t AVCEncoder::read(
status_t err = mSource->read(&mInputBuffer, options);
if (err != OK) {
if (err != ERROR_END_OF_STREAM) {
- LOGE("Failed to read input video frame: %d", err);
+ ALOGE("Failed to read input video frame: %d", err);
}
outputBuffer->release();
return err;
@@ -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/g711/dec/SoftG711.cpp b/media/libstagefright/codecs/g711/dec/SoftG711.cpp
index 15e2c26..32ef003 100644
--- a/media/libstagefright/codecs/g711/dec/SoftG711.cpp
+++ b/media/libstagefright/codecs/g711/dec/SoftG711.cpp
@@ -210,7 +210,7 @@ void SoftG711::onQueueFilled(OMX_U32 portIndex) {
}
if (inHeader->nFilledLen > kMaxNumSamplesPerFrame) {
- LOGE("input buffer too large (%ld).", inHeader->nFilledLen);
+ ALOGE("input buffer too large (%ld).", inHeader->nFilledLen);
notify(OMX_EventError, OMX_ErrorUndefined, 0, NULL);
mSignalledError = true;
diff --git a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp
index aa07e57..a34a0ca 100644
--- a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp
+++ b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp
@@ -207,7 +207,7 @@ OMX_ERRORTYPE SoftMPEG4::internalGetParameter(
(OMX_VIDEO_PARAM_PROFILELEVELTYPE *) params;
if (profileLevel->nPortIndex != 0) { // Input port only
- LOGE("Invalid port index: %ld", profileLevel->nPortIndex);
+ ALOGE("Invalid port index: %ld", profileLevel->nPortIndex);
return OMX_ErrorUnsupportedIndex;
}
@@ -371,7 +371,7 @@ void SoftMPEG4::onQueueFilled(OMX_U32 portIndex) {
mHandle, vol_data, &vol_size, 1, mWidth, mHeight, mode);
if (!success) {
- LOGW("PVInitVideoDecoder failed. Unsupported content?");
+ ALOGW("PVInitVideoDecoder failed. Unsupported content?");
notify(OMX_EventError, OMX_ErrorUndefined, 0, NULL);
mSignalledError = true;
@@ -430,7 +430,7 @@ void SoftMPEG4::onQueueFilled(OMX_U32 portIndex) {
mHandle, &bitstream, &timestamp, &tmp,
&useExtTimestamp,
outHeader->pBuffer) != PV_TRUE) {
- LOGE("failed to decode video frame.");
+ ALOGE("failed to decode video frame.");
notify(OMX_EventError, OMX_ErrorUndefined, 0, NULL);
mSignalledError = true;
@@ -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..d538603 100644
--- a/media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp
+++ b/media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp
@@ -37,22 +37,22 @@ 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) {
case OMX_VIDEO_H263ProfileBaseline:
if (omxLevel > OMX_VIDEO_H263Level45) {
- LOGE("Unsupported level (%d) for H263", omxLevel);
+ ALOGE("Unsupported level (%d) for H263", omxLevel);
return BAD_VALUE;
} else {
- LOGW("PV does not support level configuration for H263");
+ ALOGW("PV does not support level configuration for H263");
profileLevel = CORE_PROFILE_LEVEL2;
break;
}
break;
default:
- LOGE("Unsupported profile (%d) for H263", omxProfile);
+ ALOGE("Unsupported profile (%d) for H263", omxProfile);
return BAD_VALUE;
}
} else { // MPEG4
@@ -72,7 +72,7 @@ static status_t ConvertOmxProfileLevel(
profileLevel = SIMPLE_PROFILE_LEVEL3;
break;
default:
- LOGE("Unsupported level (%d) for MPEG4 simple profile",
+ ALOGE("Unsupported level (%d) for MPEG4 simple profile",
omxLevel);
return BAD_VALUE;
}
@@ -89,7 +89,7 @@ static status_t ConvertOmxProfileLevel(
profileLevel = SIMPLE_SCALABLE_PROFILE_LEVEL2;
break;
default:
- LOGE("Unsupported level (%d) for MPEG4 simple "
+ ALOGE("Unsupported level (%d) for MPEG4 simple "
"scalable profile", omxLevel);
return BAD_VALUE;
}
@@ -103,7 +103,7 @@ static status_t ConvertOmxProfileLevel(
profileLevel = CORE_PROFILE_LEVEL2;
break;
default:
- LOGE("Unsupported level (%d) for MPEG4 core "
+ ALOGE("Unsupported level (%d) for MPEG4 core "
"profile", omxLevel);
return BAD_VALUE;
}
@@ -120,13 +120,13 @@ static status_t ConvertOmxProfileLevel(
profileLevel = CORE_SCALABLE_PROFILE_LEVEL3;
break;
default:
- LOGE("Unsupported level (%d) for MPEG4 core "
+ ALOGE("Unsupported level (%d) for MPEG4 core "
"scalable profile", omxLevel);
return BAD_VALUE;
}
break;
default:
- LOGE("Unsupported MPEG4 profile (%d)", omxProfile);
+ ALOGE("Unsupported MPEG4 profile (%d)", omxProfile);
return BAD_VALUE;
}
}
@@ -178,7 +178,7 @@ M4vH263Encoder::M4vH263Encoder(
mInputFrameData(NULL),
mGroup(NULL) {
- LOGI("Construct software M4vH263Encoder");
+ ALOGI("Construct software M4vH263Encoder");
mHandle = new tagvideoEncControls;
memset(mHandle, 0, sizeof(tagvideoEncControls));
@@ -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));
@@ -207,7 +207,7 @@ status_t M4vH263Encoder::initCheck(const sp<MetaData>& meta) {
CHECK(meta->findInt32(kKeyColorFormat, &mVideoColorFormat));
if (mVideoColorFormat != OMX_COLOR_FormatYUV420Planar) {
if (mVideoColorFormat != OMX_COLOR_FormatYUV420SemiPlanar) {
- LOGE("Color format %d is not supported", mVideoColorFormat);
+ ALOGE("Color format %d is not supported", mVideoColorFormat);
return BAD_VALUE;
}
// Allocate spare buffer only when color conversion is needed.
@@ -219,7 +219,7 @@ status_t M4vH263Encoder::initCheck(const sp<MetaData>& meta) {
// XXX: Remove this restriction
if (mVideoWidth % 16 != 0 || mVideoHeight % 16 != 0) {
- LOGE("Video frame size %dx%d must be a multiple of 16",
+ ALOGE("Video frame size %dx%d must be a multiple of 16",
mVideoWidth, mVideoHeight);
return BAD_VALUE;
}
@@ -227,7 +227,7 @@ status_t M4vH263Encoder::initCheck(const sp<MetaData>& meta) {
mEncParams = new tagvideoEncOptions;
memset(mEncParams, 0, sizeof(tagvideoEncOptions));
if (!PVGetDefaultEncOption(mEncParams, 0)) {
- LOGE("Failed to get default encoding parameters");
+ ALOGE("Failed to get default encoding parameters");
return BAD_VALUE;
}
@@ -308,18 +308,18 @@ status_t M4vH263Encoder::initCheck(const sp<MetaData>& meta) {
}
status_t M4vH263Encoder::start(MetaData *params) {
- LOGV("start");
+ ALOGV("start");
if (mInitCheck != OK) {
return mInitCheck;
}
if (mStarted) {
- LOGW("Call start() when encoder already started");
+ ALOGW("Call start() when encoder already started");
return OK;
}
if (!PVInitVideoEncoder(mHandle, mEncParams)) {
- LOGE("Failed to initialize the encoder");
+ ALOGE("Failed to initialize the encoder");
return UNKNOWN_ERROR;
}
@@ -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,9 +339,9 @@ status_t M4vH263Encoder::start(MetaData *params) {
}
status_t M4vH263Encoder::stop() {
- LOGV("stop");
+ ALOGV("stop");
if (!mStarted) {
- LOGW("Call stop() when encoder has not started");
+ ALOGW("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;
}
@@ -386,10 +386,10 @@ status_t M4vH263Encoder::read(
// Output codec specific data
if (mNumInputFrames < 0) {
if (!PVGetVolHeader(mHandle, outPtr, &dataLength, 0)) {
- LOGE("Failed to get VOL header");
+ ALOGE("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;
@@ -401,7 +401,7 @@ status_t M4vH263Encoder::read(
status_t err = mSource->read(&mInputBuffer, options);
if (OK != err) {
if (err != ERROR_END_OF_STREAM) {
- LOGE("Failed to read from data source");
+ ALOGE("Failed to read from data source");
}
outputBuffer->release();
return err;
@@ -460,7 +460,7 @@ status_t M4vH263Encoder::read(
if (!PVEncodeVideoFrame(mHandle, &vin, &vout,
&modTimeMs, outPtr, &dataLength, &nLayer) ||
!PVGetHintTrack(mHandle, &hintTrack)) {
- LOGE("Failed to encode frame or get hink track at frame %lld",
+ ALOGE("Failed to encode frame or get hink track at frame %lld",
mNumInputFrames);
outputBuffer->release();
mInputBuffer->release();
diff --git a/media/libstagefright/codecs/mp3dec/SoftMP3.cpp b/media/libstagefright/codecs/mp3dec/SoftMP3.cpp
index 066c88e..ad55295 100644
--- a/media/libstagefright/codecs/mp3dec/SoftMP3.cpp
+++ b/media/libstagefright/codecs/mp3dec/SoftMP3.cpp
@@ -219,14 +219,14 @@ 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) {
- LOGE("mp3 decoder returned error %d", decoderErr);
+ ALOGE("mp3 decoder returned error %d", decoderErr);
if (mConfig->outputFrameSize == 0) {
- LOGE("Output frame size is 0");
+ ALOGE("Output frame size is 0");
}
notify(OMX_EventError, OMX_ErrorUndefined, decoderErr, NULL);
diff --git a/media/libstagefright/codecs/on2/dec/SoftVPX.cpp b/media/libstagefright/codecs/on2/dec/SoftVPX.cpp
index 61a02ac..bf9ab3a 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;
}
@@ -138,7 +138,7 @@ status_t SoftVPX::initDecoder() {
cfg.threads = GetCPUCoreCount();
if ((vpx_err = vpx_codec_dec_init(
(vpx_codec_ctx_t *)mCtx, &vpx_codec_vp8_dx_algo, &cfg, 0))) {
- LOGE("on2 decoder failed to initialize. (%d)", vpx_err);
+ ALOGE("on2 decoder failed to initialize. (%d)", vpx_err);
return UNKNOWN_ERROR;
}
@@ -254,7 +254,7 @@ void SoftVPX::onQueueFilled(OMX_U32 portIndex) {
inHeader->nFilledLen,
NULL,
0)) {
- LOGE("on2 decoder failed to decode frame.");
+ ALOGE("on2 decoder failed to decode frame.");
notify(OMX_EventError, OMX_ErrorUndefined, 0, NULL);
return;
diff --git a/media/libstagefright/codecs/on2/h264dec/SoftAVC.cpp b/media/libstagefright/codecs/on2/h264dec/SoftAVC.cpp
index dede3ac..6c3f834 100644
--- a/media/libstagefright/codecs/on2/h264dec/SoftAVC.cpp
+++ b/media/libstagefright/codecs/on2/h264dec/SoftAVC.cpp
@@ -204,7 +204,7 @@ OMX_ERRORTYPE SoftAVC::internalGetParameter(
(OMX_VIDEO_PARAM_PROFILELEVELTYPE *) params;
if (profileLevel->nPortIndex != kInputPortIndex) {
- LOGE("Invalid port index: %ld", profileLevel->nPortIndex);
+ ALOGE("Invalid port index: %ld", profileLevel->nPortIndex);
return OMX_ErrorUnsupportedIndex;
}
@@ -371,7 +371,7 @@ void SoftAVC::onQueueFilled(OMX_U32 portIndex) {
}
inPicture.dataLen = 0;
if (ret < 0) {
- LOGE("Decoder failed: %d", ret);
+ ALOGE("Decoder failed: %d", ret);
notify(OMX_EventError, OMX_ErrorUndefined,
ERROR_MALFORMED, NULL);
diff --git a/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp b/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp
index 4091111..ac88107 100644
--- a/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp
+++ b/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp
@@ -353,21 +353,21 @@ void SoftVorbis::onQueueFilled(OMX_U32 portIndex) {
int err = vorbis_dsp_synthesis(mState, &pack, 1);
if (err != 0) {
- LOGW("vorbis_dsp_synthesis returned %d", err);
+ ALOGW("vorbis_dsp_synthesis returned %d", err);
} else {
numFrames = vorbis_dsp_pcmout(
mState, (int16_t *)outHeader->pBuffer,
kMaxNumSamplesPerBuffer);
if (numFrames < 0) {
- LOGE("vorbis_dsp_pcmout returned %d", numFrames);
+ ALOGE("vorbis_dsp_pcmout returned %d", numFrames);
numFrames = 0;
}
}
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/colorconversion/SoftwareRenderer.cpp b/media/libstagefright/colorconversion/SoftwareRenderer.cpp
index 3246021..e892f92 100644
--- a/media/libstagefright/colorconversion/SoftwareRenderer.cpp
+++ b/media/libstagefright/colorconversion/SoftwareRenderer.cpp
@@ -135,7 +135,7 @@ void SoftwareRenderer::render(
ANativeWindowBuffer *buf;
int err;
if ((err = mNativeWindow->dequeueBuffer(mNativeWindow.get(), &buf)) != 0) {
- LOGW("Surface::dequeueBuffer returned error %d", err);
+ ALOGW("Surface::dequeueBuffer returned error %d", err);
return;
}
@@ -225,7 +225,7 @@ void SoftwareRenderer::render(
CHECK_EQ(0, mapper.unlock(buf->handle));
if ((err = mNativeWindow->queueBuffer(mNativeWindow.get(), buf)) != 0) {
- LOGW("Surface::queueBuffer returned error %d", err);
+ ALOGW("Surface::queueBuffer returned error %d", err);
}
buf = NULL;
}
diff --git a/media/libstagefright/foundation/AHierarchicalStateMachine.cpp b/media/libstagefright/foundation/AHierarchicalStateMachine.cpp
index 3b3f786..40c5a3c 100644
--- a/media/libstagefright/foundation/AHierarchicalStateMachine.cpp
+++ b/media/libstagefright/foundation/AHierarchicalStateMachine.cpp
@@ -63,7 +63,7 @@ void AHierarchicalStateMachine::onMessageReceived(const sp<AMessage> &msg) {
return;
}
- LOGW("Warning message %s unhandled in root state.",
+ ALOGW("Warning message %s unhandled in root state.",
msg->debugString().c_str());
}
diff --git a/media/libstagefright/foundation/ALooperRoster.cpp b/media/libstagefright/foundation/ALooperRoster.cpp
index e399f2f..dff931d 100644
--- a/media/libstagefright/foundation/ALooperRoster.cpp
+++ b/media/libstagefright/foundation/ALooperRoster.cpp
@@ -82,7 +82,7 @@ status_t ALooperRoster::postMessage_l(
ssize_t index = mHandlers.indexOfKey(msg->target());
if (index < 0) {
- LOGW("failed to post message. Target handler not registered.");
+ ALOGW("failed to post message. Target handler not registered.");
return -ENOENT;
}
@@ -91,7 +91,7 @@ status_t ALooperRoster::postMessage_l(
sp<ALooper> looper = info.mLooper.promote();
if (looper == NULL) {
- LOGW("failed to post message. "
+ ALOGW("failed to post message. "
"Target handler %d still registered, but object gone.",
msg->target());
@@ -113,7 +113,7 @@ void ALooperRoster::deliverMessage(const sp<AMessage> &msg) {
ssize_t index = mHandlers.indexOfKey(msg->target());
if (index < 0) {
- LOGW("failed to deliver message. Target handler not registered.");
+ ALOGW("failed to deliver message. Target handler not registered.");
return;
}
@@ -121,7 +121,7 @@ void ALooperRoster::deliverMessage(const sp<AMessage> &msg) {
handler = info.mHandler.promote();
if (handler == NULL) {
- LOGW("failed to deliver message. "
+ ALOGW("failed to deliver message. "
"Target handler %d registered, but object gone.",
msg->target());
diff --git a/media/libstagefright/foundation/AMessage.cpp b/media/libstagefright/foundation/AMessage.cpp
index f039bc1..0a6776e 100644
--- a/media/libstagefright/foundation/AMessage.cpp
+++ b/media/libstagefright/foundation/AMessage.cpp
@@ -471,7 +471,7 @@ sp<AMessage> AMessage::FromParcel(const Parcel &parcel) {
default:
{
- LOGE("This type of object cannot cross process boundaries.");
+ ALOGE("This type of object cannot cross process boundaries.");
TRESPASS();
}
}
@@ -535,7 +535,7 @@ void AMessage::writeToParcel(Parcel *parcel) const {
default:
{
- LOGE("This type of object cannot cross process boundaries.");
+ ALOGE("This type of object cannot cross process boundaries.");
TRESPASS();
}
}
diff --git a/media/libstagefright/foundation/hexdump.cpp b/media/libstagefright/foundation/hexdump.cpp
index 9f6bf9e..16c1ca5 100644
--- a/media/libstagefright/foundation/hexdump.cpp
+++ b/media/libstagefright/foundation/hexdump.cpp
@@ -67,7 +67,7 @@ void hexdump(const void *_data, size_t size) {
}
}
- LOGI("%s", line.c_str());
+ ALOGI("%s", line.c_str());
offset += 16;
}
diff --git a/media/libstagefright/httplive/LiveDataSource.cpp b/media/libstagefright/httplive/LiveDataSource.cpp
index 5f5c6d4..7560642 100644
--- a/media/libstagefright/httplive/LiveDataSource.cpp
+++ b/media/libstagefright/httplive/LiveDataSource.cpp
@@ -59,7 +59,7 @@ ssize_t LiveDataSource::readAtNonBlocking(
Mutex::Autolock autoLock(mLock);
if (offset != mOffset) {
- LOGE("Attempt at reading non-sequentially from LiveDataSource.");
+ ALOGE("Attempt at reading non-sequentially from LiveDataSource.");
return -EPIPE;
}
@@ -89,7 +89,7 @@ ssize_t LiveDataSource::readAt(off64_t offset, void *data, size_t size) {
ssize_t LiveDataSource::readAt_l(off64_t offset, void *data, size_t size) {
if (offset != mOffset) {
- LOGE("Attempt at reading non-sequentially from LiveDataSource.");
+ ALOGE("Attempt at reading non-sequentially from LiveDataSource.");
return -EPIPE;
}
diff --git a/media/libstagefright/httplive/LiveSession.cpp b/media/libstagefright/httplive/LiveSession.cpp
index f67cdac..0df66f1 100644
--- a/media/libstagefright/httplive/LiveSession.cpp
+++ b/media/libstagefright/httplive/LiveSession.cpp
@@ -168,9 +168,9 @@ void LiveSession::onConnect(const sp<AMessage> &msg) {
}
if (!(mFlags & kFlagIncognito)) {
- LOGI("onConnect '%s'", url.c_str());
+ ALOGI("onConnect '%s'", url.c_str());
} else {
- LOGI("onConnect <URL suppressed>");
+ ALOGI("onConnect <URL suppressed>");
}
mMasterURL = url;
@@ -179,7 +179,7 @@ void LiveSession::onConnect(const sp<AMessage> &msg) {
sp<M3UParser> playlist = fetchPlaylist(url.c_str(), &dummy);
if (playlist == NULL) {
- LOGE("unable to fetch master playlist '%s'.", url.c_str());
+ ALOGE("unable to fetch master playlist '%s'.", url.c_str());
mDataSource->queueEOS(ERROR_IO);
return;
@@ -207,7 +207,7 @@ void LiveSession::onConnect(const sp<AMessage> &msg) {
}
void LiveSession::onDisconnect() {
- LOGI("onDisconnect");
+ ALOGI("onDisconnect");
mDataSource->queueEOS(ERROR_END_OF_STREAM);
@@ -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;
@@ -336,7 +336,7 @@ sp<M3UParser> LiveSession::fetchPlaylist(const char *url, bool *unchanged) {
new M3UParser(url, buffer->data(), buffer->size());
if (playlist->initCheck() != OK) {
- LOGE("failed to parse .m3u8 playlist");
+ ALOGE("failed to parse .m3u8 playlist");
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;
}
}
@@ -507,7 +507,7 @@ rinse_repeat:
// We succeeded in fetching the playlist, but it was
// unchanged from the last time we tried.
} else {
- LOGE("failed to load playlist at url '%s'", url.c_str());
+ ALOGE("failed to load playlist at url '%s'", url.c_str());
mDataSource->queueEOS(ERROR_IO);
return;
}
@@ -572,7 +572,7 @@ rinse_repeat:
int32_t newSeqNumber = firstSeqNumberInPlaylist + index;
if (newSeqNumber != mSeqNumber) {
- LOGI("seeking to seq no %d", newSeqNumber);
+ ALOGI("seeking to seq no %d", newSeqNumber);
mSeqNumber = newSeqNumber;
@@ -609,7 +609,7 @@ rinse_repeat:
if (mPrevBandwidthIndex != (ssize_t)bandwidthIndex) {
// Go back to the previous bandwidth.
- LOGI("new bandwidth does not have the sequence number "
+ ALOGI("new bandwidth does not have the sequence number "
"we're looking for, switching back to previous bandwidth");
mLastPlaylistFetchTimeUs = -1;
@@ -629,13 +629,13 @@ rinse_repeat:
// we've missed the boat, let's start from the lowest sequence
// number available and signal a discontinuity.
- LOGI("We've missed the boat, restarting playback.");
+ ALOGI("We've missed the boat, restarting playback.");
mSeqNumber = lastSeqNumberInPlaylist;
explicitDiscontinuity = true;
// fall through
} else {
- LOGE("Cannot find sequence number %d in playlist "
+ ALOGE("Cannot find sequence number %d in playlist "
"(contains %d - %d)",
mSeqNumber, firstSeqNumberInPlaylist,
firstSeqNumberInPlaylist + mPlaylist->size() - 1);
@@ -662,7 +662,7 @@ rinse_repeat:
sp<ABuffer> buffer;
status_t err = fetchFile(uri.c_str(), &buffer);
if (err != OK) {
- LOGE("failed to fetch .ts segment at url '%s'", uri.c_str());
+ ALOGE("failed to fetch .ts segment at url '%s'", uri.c_str());
mDataSource->queueEOS(err);
return;
}
@@ -672,7 +672,7 @@ rinse_repeat:
err = decryptBuffer(mSeqNumber - firstSeqNumberInPlaylist, buffer);
if (err != OK) {
- LOGE("decryptBuffer failed w/ error %d", err);
+ ALOGE("decryptBuffer failed w/ error %d", err);
mDataSource->queueEOS(err);
return;
@@ -681,7 +681,7 @@ rinse_repeat:
if (buffer->size() == 0 || buffer->data()[0] != 0x47) {
// Not a transport stream???
- LOGE("This doesn't look like a transport stream...");
+ ALOGE("This doesn't look like a transport stream...");
mBandwidthItems.removeAt(bandwidthIndex);
@@ -690,7 +690,7 @@ rinse_repeat:
return;
}
- LOGI("Retrying with a different bandwidth stream.");
+ ALOGI("Retrying with a different bandwidth stream.");
mLastPlaylistFetchTimeUs = -1;
bandwidthIndex = getBandwidthIndex();
@@ -713,7 +713,7 @@ rinse_repeat:
if (seekDiscontinuity || explicitDiscontinuity || bandwidthChanged) {
// Signal discontinuity.
- LOGI("queueing discontinuity (seek=%d, explicit=%d, bandwidthChanged=%d)",
+ ALOGI("queueing discontinuity (seek=%d, explicit=%d, bandwidthChanged=%d)",
seekDiscontinuity, explicitDiscontinuity, bandwidthChanged);
sp<ABuffer> tmp = new ABuffer(188);
@@ -765,13 +765,13 @@ status_t LiveSession::decryptBuffer(
if (method == "NONE") {
return OK;
} else if (!(method == "AES-128")) {
- LOGE("Unsupported cipher method '%s'", method.c_str());
+ ALOGE("Unsupported cipher method '%s'", method.c_str());
return ERROR_UNSUPPORTED;
}
AString keyURI;
if (!itemMeta->findString("cipher-uri", &keyURI)) {
- LOGE("Missing key uri");
+ ALOGE("Missing key uri");
return ERROR_MALFORMED;
}
@@ -813,7 +813,7 @@ status_t LiveSession::decryptBuffer(
}
if (err != OK) {
- LOGE("failed to fetch cipher key from '%s'.", keyURI.c_str());
+ ALOGE("failed to fetch cipher key from '%s'.", keyURI.c_str());
return ERROR_IO;
}
@@ -822,7 +822,7 @@ status_t LiveSession::decryptBuffer(
AES_KEY aes_key;
if (AES_set_decrypt_key(key->data(), 128, &aes_key) != 0) {
- LOGE("failed to set AES decryption key.");
+ ALOGE("failed to set AES decryption key.");
return UNKNOWN_ERROR;
}
@@ -832,7 +832,7 @@ status_t LiveSession::decryptBuffer(
if (itemMeta->findString("cipher-iv", &iv)) {
if ((!iv.startsWith("0x") && !iv.startsWith("0X"))
|| iv.size() != 16 * 2 + 2) {
- LOGE("malformed cipher IV '%s'.", iv.c_str());
+ ALOGE("malformed cipher IV '%s'.", iv.c_str());
return ERROR_MALFORMED;
}
@@ -841,7 +841,7 @@ status_t LiveSession::decryptBuffer(
char c1 = tolower(iv.c_str()[2 + 2 * i]);
char c2 = tolower(iv.c_str()[3 + 2 * i]);
if (!isxdigit(c1) || !isxdigit(c2)) {
- LOGE("malformed cipher IV '%s'.", iv.c_str());
+ ALOGE("malformed cipher IV '%s'.", iv.c_str());
return ERROR_MALFORMED;
}
uint8_t nibble1 = isdigit(c1) ? c1 - '0' : c1 - 'a' + 10;
diff --git a/media/libstagefright/httplive/M3UParser.cpp b/media/libstagefright/httplive/M3UParser.cpp
index 9df9f59..5e30488 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;
}
@@ -168,7 +168,7 @@ status_t M3UParser::parse(const void *_data, size_t size) {
line.setTo(&data[offset], offsetLF - offset);
}
- // LOGI("#%s#", line.c_str());
+ // ALOGI("#%s#", line.c_str());
if (line.empty()) {
offset = offsetLF + 1;
@@ -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();
@@ -432,7 +432,7 @@ status_t M3UParser::parseCipherInfo(
if (MakeURL(baseURI.c_str(), val.c_str(), &absURI)) {
val = absURI;
} else {
- LOGE("failed to make absolute url for '%s'.",
+ ALOGE("failed to make absolute url for '%s'.",
val.c_str());
}
}
diff --git a/media/libstagefright/id3/ID3.cpp b/media/libstagefright/id3/ID3.cpp
index 45e018d..6dde9d8 100644
--- a/media/libstagefright/id3/ID3.cpp
+++ b/media/libstagefright/id3/ID3.cpp
@@ -129,7 +129,7 @@ struct id3_header {
}
if (size > kMaxMetadataSize) {
- LOGE("skipping huge ID3 metadata of size %d", size);
+ ALOGE("skipping huge ID3 metadata of size %d", size);
return false;
}
@@ -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..4fbf47e 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,12 +240,12 @@ 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
- LOGE("Cluster::Parse returned result %ld", res);
+ ALOGE("Cluster::Parse returned result %ld", res);
mCluster = NULL;
break;
@@ -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;
@@ -563,7 +563,7 @@ MatroskaExtractor::MatroskaExtractor(const sp<DataSource> &source)
#if 0
const mkvparser::SegmentInfo *info = mSegment->GetInfo();
- LOGI("muxing app: %s, writing app: %s",
+ ALOGI("muxing app: %s, writing app: %s",
info->GetMuxingAppAsUTF8(),
info->GetWritingAppAsUTF8());
#endif
@@ -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..3f4de1f 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);
@@ -282,7 +282,7 @@ status_t ATSParser::Program::parseProgramMap(ABitReader *br) {
ssize_t index = mStreams.indexOfKey(info.mPID);
if (index >= 0 && mStreams.editValueAt(index)->type() != info.mType) {
- LOGI("uh oh. stream PIDs have changed.");
+ ALOGI("uh oh. stream PIDs have changed.");
PIDsChanged = true;
break;
}
@@ -290,18 +290,18 @@ status_t ATSParser::Program::parseProgramMap(ABitReader *br) {
if (PIDsChanged) {
#if 0
- LOGI("before:");
+ ALOGI("before:");
for (size_t i = 0; i < mStreams.size(); ++i) {
sp<Stream> stream = mStreams.editValueAt(i);
- LOGI("PID 0x%08x => type 0x%02x", stream->pid(), stream->type());
+ ALOGI("PID 0x%08x => type 0x%02x", stream->pid(), stream->type());
}
- LOGI("after:");
+ ALOGI("after:");
for (size_t i = 0; i < infos.size(); ++i) {
StreamInfo &info = infos.editItemAt(i);
- LOGI("PID 0x%08x => type 0x%02x", info.mPID, info.mType);
+ ALOGI("PID 0x%08x => type 0x%02x", info.mPID, info.mType);
}
#endif
@@ -340,7 +340,7 @@ status_t ATSParser::Program::parseProgramMap(ABitReader *br) {
}
if (!success) {
- LOGI("Stream PIDs changed and we cannot recover.");
+ ALOGI("Stream PIDs changed and we cannot recover.");
return ERROR_MALFORMED;
}
}
@@ -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);
@@ -475,7 +475,7 @@ status_t ATSParser::Stream::parse(
// Increment in multiples of 64K.
neededSize = (neededSize + 65535) & ~65535;
- LOGI("resizing buffer to %d bytes", neededSize);
+ ALOGI("resizing buffer to %d bytes", neededSize);
sp<ABuffer> newBuffer = new ABuffer(neededSize);
memcpy(newBuffer->data(), mBuffer->data(), mBuffer->size());
@@ -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,8 +633,8 @@ status_t ATSParser::Stream::parsePES(ABitReader *br) {
PTS |= br->getBits(15);
CHECK_EQ(br->getBits(1), 1u);
- LOGV("PTS = %llu", PTS);
- // LOGI("PTS = %.2f secs", PTS / 90000.0f);
+ ALOGV("PTS = %llu", PTS);
+ // ALOGI("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);
@@ -697,7 +697,7 @@ status_t ATSParser::Stream::parsePES(ABitReader *br) {
PES_packet_length - 3 - PES_header_data_length;
if (br->numBitsLeft() < dataLength * 8) {
- LOGE("PES packet does not carry enough data to contain "
+ ALOGE("PES packet does not carry enough data to contain "
"payload. (numBitsLeft = %d, required = %d)",
br->numBitsLeft(), dataLength * 8);
@@ -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,22 +953,22 @@ 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);
+ // ALOGI("PID = 0x%04x, continuity_counter = %u", PID, continuity_counter);
if (adaptation_field_control == 2 || adaptation_field_control == 3) {
parseAdaptationField(br);
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..7fd99a8 100644
--- a/media/libstagefright/mpeg2ts/ESQueue.cpp
+++ b/media/libstagefright/mpeg2ts/ESQueue.cpp
@@ -144,7 +144,7 @@ status_t ElementaryStreamQueue::appendData(
}
if (startOffset > 0) {
- LOGI("found something resembling an H.264/MPEG syncword at "
+ ALOGI("found something resembling an H.264/MPEG syncword at "
"offset %ld",
startOffset);
}
@@ -177,7 +177,7 @@ status_t ElementaryStreamQueue::appendData(
}
if (startOffset > 0) {
- LOGI("found something resembling an H.264/MPEG syncword at "
+ ALOGI("found something resembling an H.264/MPEG syncword at "
"offset %ld",
startOffset);
}
@@ -210,7 +210,7 @@ status_t ElementaryStreamQueue::appendData(
}
if (startOffset > 0) {
- LOGI("found something resembling an AAC syncword at offset %ld",
+ ALOGI("found something resembling an AAC syncword at offset %ld",
startOffset);
}
@@ -237,7 +237,7 @@ status_t ElementaryStreamQueue::appendData(
}
if (startOffset > 0) {
- LOGI("found something resembling an MPEG audio "
+ ALOGI("found something resembling an MPEG audio "
"syncword at offset %ld",
startOffset);
}
@@ -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) {
@@ -280,7 +280,7 @@ status_t ElementaryStreamQueue::appendData(
#if 0
if (mMode == AAC) {
- LOGI("size = %d, timeUs = %.2f secs", size, timeUs / 1E6);
+ ALOGI("size = %d, timeUs = %.2f secs", size, timeUs / 1E6);
hexdump(data, size);
}
#endif
@@ -337,7 +337,7 @@ sp<ABuffer> ElementaryStreamQueue::dequeueAccessUnitAAC() {
CHECK(mFormat->findInt32(kKeySampleRate, &sampleRate));
CHECK(mFormat->findInt32(kKeyChannelCount, &numChannels));
- LOGI("found AAC codec config (%d Hz, %d channels)",
+ ALOGI("found AAC codec config (%d Hz, %d channels)",
sampleRate, numChannels);
} else {
// profile_ObjectType, sampling_frequency_index, private_bits,
@@ -408,7 +408,7 @@ sp<ABuffer> ElementaryStreamQueue::dequeueAccessUnitAAC() {
if (timeUs >= 0) {
accessUnit->meta()->setInt64("timeUs", timeUs);
} else {
- LOGW("no time for AAC access unit");
+ ALOGW("no time for AAC access unit");
}
return accessUnit;
@@ -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;
@@ -714,7 +714,7 @@ sp<ABuffer> ElementaryStreamQueue::dequeueAccessUnitMPEGVideo() {
mFormat->setInt32(kKeyWidth, width);
mFormat->setInt32(kKeyHeight, height);
- LOGI("found MPEG2 video codec config (%d x %d)", width, height);
+ ALOGI("found MPEG2 video codec config (%d x %d)", width, height);
sp<ABuffer> csd = new ABuffer(offset);
memcpy(csd->data(), data, offset);
@@ -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());
@@ -880,7 +880,7 @@ sp<ABuffer> ElementaryStreamQueue::dequeueAccessUnitMPEG4Video() {
mFormat->setInt32(kKeyWidth, width);
mFormat->setInt32(kKeyHeight, height);
- LOGI("found MPEG4 video codec config (%d x %d)",
+ ALOGI("found MPEG4 video codec config (%d x %d)",
width, height);
sp<ABuffer> csd = new ABuffer(offset);
@@ -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..dd714c9 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);
@@ -315,7 +315,7 @@ ssize_t MPEG2PSExtractor::dequeuePES() {
unsigned descriptor_tag = br.getBits(8);
unsigned descriptor_length = br.getBits(8);
- LOGI("found descriptor tag 0x%02x of length %u",
+ ALOGI("found descriptor tag 0x%02x of length %u",
descriptor_tag, descriptor_length);
if (offset + 2 + descriptor_length > program_stream_info_length) {
@@ -338,7 +338,7 @@ ssize_t MPEG2PSExtractor::dequeuePES() {
unsigned stream_type = br.getBits(8);
unsigned elementary_stream_id = br.getBits(8);
- LOGI("elementary stream id 0x%02x has stream type 0x%02x",
+ ALOGI("elementary stream id 0x%02x has stream type 0x%02x",
elementary_stream_id, stream_type);
mStreamTypeByESID.add(elementary_stream_id, stream_type);
@@ -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,8 +408,8 @@ ssize_t MPEG2PSExtractor::dequeuePES() {
PTS |= br.getBits(15);
CHECK_EQ(br.getBits(1), 1u);
- LOGV("PTS = %llu", PTS);
- // LOGI("PTS = %.2f secs", PTS / 90000.0f);
+ ALOGV("PTS = %llu", PTS);
+ // ALOGI("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);
@@ -471,7 +471,7 @@ ssize_t MPEG2PSExtractor::dequeuePES() {
PES_packet_length - 3 - PES_header_data_length;
if (br.numBitsLeft() < dataLength * 8) {
- LOGE("PES packet does not carry enough data to contain "
+ ALOGE("PES packet does not carry enough data to contain "
"payload. (numBitsLeft = %d, required = %d)",
br.numBitsLeft(), dataLength * 8);
@@ -568,7 +568,7 @@ MPEG2PSExtractor::Track::Track(
if (supported) {
mQueue = new ElementaryStreamQueue(mode);
} else {
- LOGI("unsupported stream ID 0x%02x", stream_id);
+ ALOGI("unsupported stream ID 0x%02x", stream_id);
}
}
@@ -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/mpeg2ts/MPEG2TSExtractor.cpp b/media/libstagefright/mpeg2ts/MPEG2TSExtractor.cpp
index 17cf45a..03033f5 100644
--- a/media/libstagefright/mpeg2ts/MPEG2TSExtractor.cpp
+++ b/media/libstagefright/mpeg2ts/MPEG2TSExtractor.cpp
@@ -199,7 +199,7 @@ void MPEG2TSExtractor::init() {
}
}
- LOGI("haveAudio=%d, haveVideo=%d", haveAudio, haveVideo);
+ ALOGI("haveAudio=%d, haveVideo=%d", haveAudio, haveVideo);
}
status_t MPEG2TSExtractor::feedMore() {
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/OMXMaster.cpp b/media/libstagefright/omx/OMXMaster.cpp
index c8278ab..d698939 100644
--- a/media/libstagefright/omx/OMXMaster.cpp
+++ b/media/libstagefright/omx/OMXMaster.cpp
@@ -81,7 +81,7 @@ void OMXMaster::addPlugin(OMXPluginBase *plugin) {
String8 name8(name);
if (mPluginByComponentName.indexOfKey(name8) >= 0) {
- LOGE("A component of name '%s' already exists, ignoring this one.",
+ ALOGE("A component of name '%s' already exists, ignoring this one.",
name8.string());
continue;
@@ -91,7 +91,7 @@ void OMXMaster::addPlugin(OMXPluginBase *plugin) {
}
if (err != OMX_ErrorNoMore) {
- LOGE("OMX plugin failed w/ error 0x%08x after registering %d "
+ ALOGE("OMX plugin failed w/ error 0x%08x after registering %d "
"components", err, mPluginByComponentName.size());
}
}
diff --git a/media/libstagefright/omx/OMXNodeInstance.cpp b/media/libstagefright/omx/OMXNodeInstance.cpp
index 0ff398a..8938e33 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;
@@ -150,7 +150,7 @@ status_t OMXNodeInstance::freeNode(OMXMaster *master) {
&& state != OMX_StateIdle
&& state != OMX_StateInvalid) {
if (++iteration > kMaxNumIterations) {
- LOGE("component failed to enter Idle state, aborting.");
+ ALOGE("component failed to enter Idle state, aborting.");
state = OMX_StateInvalid;
break;
}
@@ -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();
@@ -179,12 +179,12 @@ status_t OMXNodeInstance::freeNode(OMXMaster *master) {
&& state != OMX_StateLoaded
&& state != OMX_StateInvalid) {
if (++iteration > kMaxNumIterations) {
- LOGE("component failed to enter Loaded state, aborting.");
+ ALOGE("component failed to enter Loaded state, aborting.");
state = OMX_StateInvalid;
break;
}
- LOGV("waiting for Loaded state...");
+ ALOGV("waiting for Loaded state...");
usleep(100000);
}
CHECK_EQ(err, OMX_ErrorNone);
@@ -201,21 +201,21 @@ 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;
if (err != OMX_ErrorNone) {
- LOGE("FreeHandle FAILED with error 0x%08x.", err);
+ ALOGE("FreeHandle FAILED with error 0x%08x.", err);
}
mOwner->invalidateNodeID(mNodeID);
mNodeID = NULL;
- LOGV("OMXNodeInstance going away.");
+ ALOGV("OMXNodeInstance going away.");
delete this;
return StatusFromOMXError(err);
@@ -285,7 +285,7 @@ status_t OMXNodeInstance::enableGraphicBuffers(
&index);
if (err != OMX_ErrorNone) {
- LOGE("OMX_GetExtensionIndex failed");
+ ALOGE("OMX_GetExtensionIndex failed");
return StatusFromOMXError(err);
}
@@ -302,7 +302,7 @@ status_t OMXNodeInstance::enableGraphicBuffers(
err = OMX_SetParameter(mHandle, index, &params);
if (err != OMX_ErrorNone) {
- LOGE("OMX_EnableAndroidNativeBuffers failed with error %d (0x%08x)",
+ ALOGE("OMX_EnableAndroidNativeBuffers failed with error %d (0x%08x)",
err, err);
return UNKNOWN_ERROR;
@@ -323,7 +323,7 @@ status_t OMXNodeInstance::getGraphicBufferUsage(
&index);
if (err != OMX_ErrorNone) {
- LOGE("OMX_GetExtensionIndex failed");
+ ALOGE("OMX_GetExtensionIndex failed");
return StatusFromOMXError(err);
}
@@ -340,7 +340,7 @@ status_t OMXNodeInstance::getGraphicBufferUsage(
err = OMX_GetParameter(mHandle, index, &params);
if (err != OMX_ErrorNone) {
- LOGE("OMX_GetAndroidNativeBufferUsage failed with error %d (0x%08x)",
+ ALOGE("OMX_GetAndroidNativeBufferUsage failed with error %d (0x%08x)",
err, err);
return UNKNOWN_ERROR;
}
@@ -361,7 +361,7 @@ status_t OMXNodeInstance::storeMetaDataInBuffers(
OMX_ERRORTYPE err = OMX_GetExtensionIndex(mHandle, name, &index);
if (err != OMX_ErrorNone) {
- LOGE("OMX_GetExtensionIndex %s failed", name);
+ ALOGE("OMX_GetExtensionIndex %s failed", name);
return StatusFromOMXError(err);
}
@@ -375,7 +375,7 @@ status_t OMXNodeInstance::storeMetaDataInBuffers(
params.nPortIndex = portIndex;
params.bStoreMetaData = enable;
if ((err = OMX_SetParameter(mHandle, index, &params)) != OMX_ErrorNone) {
- LOGE("OMX_SetParameter() failed for StoreMetaDataInBuffers: 0x%08x", err);
+ ALOGE("OMX_SetParameter() failed for StoreMetaDataInBuffers: 0x%08x", err);
return UNKNOWN_ERROR;
}
return err;
@@ -395,7 +395,7 @@ status_t OMXNodeInstance::useBuffer(
params->size(), static_cast<OMX_U8 *>(params->pointer()));
if (err != OMX_ErrorNone) {
- LOGE("OMX_UseBuffer failed with error %d (0x%08x)", err, err);
+ ALOGE("OMX_UseBuffer failed with error %d (0x%08x)", err, err);
delete buffer_meta;
buffer_meta = NULL;
@@ -429,7 +429,7 @@ status_t OMXNodeInstance::useGraphicBuffer2_l(
OMX_ERRORTYPE err = OMX_GetParameter(mHandle, OMX_IndexParamPortDefinition, &def);
if (err != OMX_ErrorNone)
{
- LOGE("%s::%d:Error getting OMX_IndexParamPortDefinition", __FUNCTION__, __LINE__);
+ ALOGE("%s::%d:Error getting OMX_IndexParamPortDefinition", __FUNCTION__, __LINE__);
return err;
}
@@ -448,7 +448,7 @@ status_t OMXNodeInstance::useGraphicBuffer2_l(
bufferHandle);
if (err != OMX_ErrorNone) {
- LOGE("OMX_UseBuffer failed with error %d (0x%08x)", err, err);
+ ALOGE("OMX_UseBuffer failed with error %d (0x%08x)", err, err);
delete bufferMeta;
bufferMeta = NULL;
*buffer = 0;
@@ -488,7 +488,7 @@ status_t OMXNodeInstance::useGraphicBuffer(
&index);
if (err != OMX_ErrorNone) {
- LOGE("OMX_GetExtensionIndex failed");
+ ALOGE("OMX_GetExtensionIndex failed");
return StatusFromOMXError(err);
}
@@ -510,7 +510,7 @@ status_t OMXNodeInstance::useGraphicBuffer(
err = OMX_SetParameter(mHandle, index, &params);
if (err != OMX_ErrorNone) {
- LOGE("OMX_UseAndroidNativeBuffer failed with error %d (0x%08x)", err,
+ ALOGE("OMX_UseAndroidNativeBuffer failed with error %d (0x%08x)", err,
err);
delete bufferMeta;
@@ -543,7 +543,7 @@ status_t OMXNodeInstance::allocateBuffer(
mHandle, &header, portIndex, buffer_meta, size);
if (err != OMX_ErrorNone) {
- LOGE("OMX_AllocateBuffer failed with error %d (0x%08x)", err, err);
+ ALOGE("OMX_AllocateBuffer failed with error %d (0x%08x)", err, err);
delete buffer_meta;
buffer_meta = NULL;
@@ -576,7 +576,7 @@ status_t OMXNodeInstance::allocateBufferWithBackup(
mHandle, &header, portIndex, buffer_meta, params->size());
if (err != OMX_ErrorNone) {
- LOGE("OMX_AllocateBuffer failed with error %d (0x%08x)", err, err);
+ ALOGE("OMX_AllocateBuffer failed with error %d (0x%08x)", err, err);
delete buffer_meta;
buffer_meta = NULL;
@@ -672,7 +672,7 @@ void OMXNodeInstance::onMessage(const omx_message &msg) {
}
void OMXNodeInstance::onObserverDied(OMXMaster *master) {
- LOGE("!!! Observer died. Quickly, do something, ... anything...");
+ ALOGE("!!! Observer died. Quickly, do something, ... anything...");
// Try to force shutdown of the node and hope for the best.
freeNode(master);
@@ -742,7 +742,7 @@ void OMXNodeInstance::removeActiveBuffer(
}
if (!found) {
- LOGW("Attempt to remove an active buffer we know nothing about...");
+ ALOGW("Attempt to remove an active buffer we know nothing about...");
}
}
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..da3ae42 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)) {
@@ -72,7 +72,7 @@ OMX_ERRORTYPE SoftOMXPlugin::makeComponentInstance(
void *libHandle = dlopen(libName.c_str(), RTLD_NOW);
if (libHandle == NULL) {
- LOGE("unable to dlopen %s", libName.c_str());
+ ALOGE("unable to dlopen %s", libName.c_str());
return OMX_ErrorComponentNotFound;
}
diff --git a/media/libstagefright/omx/tests/OMXHarness.cpp b/media/libstagefright/omx/tests/OMXHarness.cpp
index d4354db..8faf544 100644
--- a/media/libstagefright/omx/tests/OMXHarness.cpp
+++ b/media/libstagefright/omx/tests/OMXHarness.cpp
@@ -174,7 +174,7 @@ status_t Harness::getPortDefinition(
#define EXPECT(condition, info) \
if (!(condition)) { \
- LOGE(info); printf("\n * " info "\n"); return UNKNOWN_ERROR; \
+ ALOGE(info); printf("\n * " info "\n"); return UNKNOWN_ERROR; \
}
#define EXPECT_SUCCESS(err, info) \
@@ -571,7 +571,7 @@ status_t Harness::testSeek(
const char *mime = GetMimeFromComponentRole(componentRole);
if (!mime) {
- LOGI("Cannot perform seek test with this componentRole (%s)",
+ ALOGI("Cannot perform seek test with this componentRole (%s)",
componentRole);
return OK;
@@ -597,7 +597,7 @@ status_t Harness::testSeek(
int64_t durationUs;
CHECK(source->getFormat()->findInt64(kKeyDuration, &durationUs));
- LOGI("stream duration is %lld us (%.2f secs)",
+ ALOGI("stream duration is %lld us (%.2f secs)",
durationUs, durationUs / 1E6);
static const int32_t kNumIterations = 5000;
@@ -617,19 +617,19 @@ status_t Harness::testSeek(
requestedSeekTimeUs = -1;
- LOGI("requesting linear read");
+ ALOGI("requesting linear read");
} else {
if (i == 0 || r < 0.55) {
// 5% chance of seeking beyond end of stream.
requestedSeekTimeUs = durationUs;
- LOGI("requesting seek beyond EOF");
+ ALOGI("requesting seek beyond EOF");
} else {
requestedSeekTimeUs =
(int64_t)(uniform_rand() * durationUs);
- LOGI("requesting seek to %lld us (%.2f secs)",
+ ALOGI("requesting seek to %lld us (%.2f secs)",
requestedSeekTimeUs, requestedSeekTimeUs / 1E6);
}
@@ -649,7 +649,7 @@ status_t Harness::testSeek(
buffer = NULL;
}
- LOGI("nearest keyframe is at %lld us (%.2f secs)",
+ ALOGI("nearest keyframe is at %lld us (%.2f secs)",
actualSeekTimeUs, actualSeekTimeUs / 1E6);
}
@@ -733,7 +733,7 @@ status_t Harness::testSeek(
status_t Harness::test(
const char *componentName, const char *componentRole) {
printf("testing %s [%s] ... ", componentName, componentRole);
- LOGI("testing %s [%s].", componentName, componentRole);
+ ALOGI("testing %s [%s].", componentName, componentRole);
status_t err1 = testStateTransitions(componentName, componentRole);
status_t err2 = testSeek(componentName, componentRole);
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/AMPEG4AudioAssembler.cpp b/media/libstagefright/rtsp/AMPEG4AudioAssembler.cpp
index 11d9c22..b0c7007 100644
--- a/media/libstagefright/rtsp/AMPEG4AudioAssembler.cpp
+++ b/media/libstagefright/rtsp/AMPEG4AudioAssembler.cpp
@@ -196,7 +196,7 @@ static status_t parseAudioSpecificConfig(ABitReader *bits, sp<ABuffer> *asc) {
unsigned syncExtensionType = bits->getBits(11);
if (syncExtensionType == 0x2b7) {
- LOGI("found syncExtension");
+ ALOGI("found syncExtension");
CHECK_EQ(parseAudioObjectType(bits, &extensionAudioObjectType),
(status_t)OK);
@@ -217,7 +217,7 @@ static status_t parseAudioSpecificConfig(ABitReader *bits, sp<ABuffer> *asc) {
// Apparently an extension is always considered an even
// multiple of 8 bits long.
- LOGI("Skipping %d bits after sync extension",
+ ALOGI("Skipping %d bits after sync extension",
8 - (numBitsInExtension & 7));
bits->skipBits(8 - (numBitsInExtension & 7));
@@ -424,7 +424,7 @@ sp<ABuffer> AMPEG4AudioAssembler::removeLATMFraming(const sp<ABuffer> &buffer) {
}
if (offset < buffer->size()) {
- LOGI("ignoring %d bytes of trailing data", buffer->size() - offset);
+ ALOGI("ignoring %d bytes of trailing data", buffer->size() - offset);
}
CHECK_LE(offset, buffer->size());
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/APacketSource.cpp b/media/libstagefright/rtsp/APacketSource.cpp
index 3f4cdb5..6cf1301 100644
--- a/media/libstagefright/rtsp/APacketSource.cpp
+++ b/media/libstagefright/rtsp/APacketSource.cpp
@@ -193,7 +193,7 @@ static sp<ABuffer> MakeAVCCodecSpecificData(
if (i == 0) {
FindAVCDimensions(nal, width, height);
- LOGI("dimensions %dx%d", *width, *height);
+ ALOGI("dimensions %dx%d", *width, *height);
}
}
@@ -371,7 +371,7 @@ static sp<ABuffer> MakeMPEG4VideoCodecSpecificData(
return NULL;
}
- LOGI("VOL dimensions = %dx%d", *width, *height);
+ ALOGI("VOL dimensions = %dx%d", *width, *height);
size_t len1 = config->size() + GetSizeWidth(config->size()) + 1;
size_t len2 = len1 + GetSizeWidth(len1) + 1 + 13;
diff --git a/media/libstagefright/rtsp/ARTPConnection.cpp b/media/libstagefright/rtsp/ARTPConnection.cpp
index cd374e2..8c9dd8d 100644
--- a/media/libstagefright/rtsp/ARTPConnection.cpp
+++ b/media/libstagefright/rtsp/ARTPConnection.cpp
@@ -294,7 +294,7 @@ void ARTPConnection::onPollStreams() {
if (err == -ECONNRESET) {
// socket failure, this stream is dead, Jim.
- LOGW("failed to receive RTP/RTCP datagram.");
+ ALOGW("failed to receive RTP/RTCP datagram.");
it = mStreams.erase(it);
continue;
}
@@ -336,7 +336,7 @@ void ARTPConnection::onPollStreams() {
}
if (buffer->size() > 0) {
- LOGV("Sending RR...");
+ ALOGV("Sending RR...");
ssize_t n;
do {
@@ -347,7 +347,7 @@ void ARTPConnection::onPollStreams() {
} while (n < 0 && errno == EINTR);
if (n <= 0) {
- LOGW("failed to send RTCP receiver report (%s).",
+ ALOGW("failed to send RTCP receiver report (%s).",
n == 0 ? "connection gone" : strerror(errno));
it = mStreams.erase(it);
@@ -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);
@@ -396,7 +396,7 @@ status_t ARTPConnection::receive(StreamInfo *s, bool receiveRTP) {
buffer->setRange(0, nbytes);
- // LOGI("received %d bytes.", buffer->size());
+ // ALOGI("received %d bytes.", buffer->size());
status_t err;
if (receiveRTP) {
@@ -561,7 +561,7 @@ status_t ARTPConnection::parseRTCP(StreamInfo *s, const sp<ABuffer> &buffer) {
default:
{
- LOGW("Unknown RTCP packet type %u of size %d",
+ ALOGW("Unknown RTCP packet type %u of size %d",
(unsigned)data[1], headerLength);
break;
}
@@ -606,7 +606,7 @@ status_t ARTPConnection::parseSR(
uint32_t rtpTime = u32at(&data[16]);
#if 0
- LOGI("XXX timeUpdate: ssrc=0x%08x, rtpTime %u == ntpTime %.3f",
+ ALOGI("XXX timeUpdate: ssrc=0x%08x, rtpTime %u == ntpTime %.3f",
id,
rtpTime,
(ntpTime >> 32) + (double)(ntpTime & 0xffffffff) / (1ll << 32));
diff --git a/media/libstagefright/rtsp/ARTPSession.cpp b/media/libstagefright/rtsp/ARTPSession.cpp
index c6bcb12..7a05b88 100644
--- a/media/libstagefright/rtsp/ARTPSession.cpp
+++ b/media/libstagefright/rtsp/ARTPSession.cpp
@@ -53,24 +53,24 @@ status_t ARTPSession::setup(const sp<ASessionDescription> &desc) {
if (!mDesc->findAttribute(i, "c=", &connection)) {
// No per-stream connection information, try global fallback.
if (!mDesc->findAttribute(0, "c=", &connection)) {
- LOGE("Unable to find connection attribute.");
+ ALOGE("Unable to find connection attribute.");
return mInitCheck;
}
}
if (!(connection == "IN IP4 127.0.0.1")) {
- LOGE("We only support localhost connections for now.");
+ ALOGE("We only support localhost connections for now.");
return mInitCheck;
}
unsigned port;
if (!validateMediaFormat(i, &port) || (port & 1) != 0) {
- LOGE("Invalid media format.");
+ ALOGE("Invalid media format.");
return mInitCheck;
}
sp<APacketSource> source = new APacketSource(mDesc, i);
if (source->initCheck() != OK) {
- LOGE("Unsupported format.");
+ ALOGE("Unsupported format.");
return mInitCheck;
}
@@ -159,7 +159,7 @@ void ARTPSession::onMessageReceived(const sp<AMessage> &msg) {
printf("access unit complete size=%d\tntp-time=0x%016llx\n",
accessUnit->size(), ntpTime);
#else
- LOGI("access unit complete, size=%d, ntp-time=%llu",
+ ALOGI("access unit complete, size=%d, ntp-time=%llu",
accessUnit->size(), ntpTime);
hexdump(accessUnit->data(), accessUnit->size());
#endif
@@ -170,7 +170,7 @@ void ARTPSession::onMessageReceived(const sp<AMessage> &msg) {
CHECK(!memcmp("\x00\x00\x00\x01", accessUnit->data(), 4));
unsigned x = accessUnit->data()[4];
- LOGI("access unit complete: nalType=0x%02x, nalRefIdc=0x%02x",
+ ALOGI("access unit complete: nalType=0x%02x, nalRefIdc=0x%02x",
x & 0x1f, (x & 0x60) >> 5);
#endif
@@ -181,7 +181,7 @@ void ARTPSession::onMessageReceived(const sp<AMessage> &msg) {
int32_t damaged;
if (accessUnit->meta()->findInt32("damaged", &damaged)
&& damaged != 0) {
- LOGI("ignoring damaged AU");
+ ALOGI("ignoring damaged AU");
} else
#endif
{
diff --git a/media/libstagefright/rtsp/ARTPSource.cpp b/media/libstagefright/rtsp/ARTPSource.cpp
index 3aa07ce..ed68790 100644
--- a/media/libstagefright/rtsp/ARTPSource.cpp
+++ b/media/libstagefright/rtsp/ARTPSource.cpp
@@ -147,7 +147,7 @@ bool ARTPSource::queuePacket(const sp<ABuffer> &buffer) {
}
if (it != mQueue.end() && (uint32_t)(*it)->int32Data() == seqNum) {
- LOGW("Discarding duplicate buffer");
+ ALOGW("Discarding duplicate buffer");
return false;
}
@@ -174,7 +174,7 @@ void ARTPSource::addFIR(const sp<ABuffer> &buffer) {
mLastFIRRequestUs = nowUs;
if (buffer->size() + 20 > buffer->capacity()) {
- LOGW("RTCP buffer too small to accomodate FIR.");
+ ALOGW("RTCP buffer too small to accomodate FIR.");
return;
}
@@ -207,12 +207,12 @@ 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) {
if (buffer->size() + 32 > buffer->capacity()) {
- LOGW("RTCP buffer too small to accomodate RR.");
+ ALOGW("RTCP buffer too small to accomodate RR.");
return;
}
diff --git a/media/libstagefright/rtsp/ARTPWriter.cpp b/media/libstagefright/rtsp/ARTPWriter.cpp
index 5a033e1..0d07043 100644
--- a/media/libstagefright/rtsp/ARTPWriter.cpp
+++ b/media/libstagefright/rtsp/ARTPWriter.cpp
@@ -269,7 +269,7 @@ void ARTPWriter::onRead(const sp<AMessage> &msg) {
status_t err = mSource->read(&mediaBuf);
if (err != OK) {
- LOGI("reached EOS.");
+ ALOGI("reached EOS.");
Mutex::Autolock autoLock(mLock);
mFlags |= kFlagEOS;
@@ -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);
@@ -520,7 +520,7 @@ void ARTPWriter::dumpSessionDesc() {
sdp.append("a=fmtp:" PT_STR " octed-align\r\n");
}
- LOGI("%s", sdp.c_str());
+ ALOGI("%s", sdp.c_str());
}
void ARTPWriter::makeH264SPropParamSets(MediaBuffer *buffer) {
diff --git a/media/libstagefright/rtsp/ARTSPConnection.cpp b/media/libstagefright/rtsp/ARTSPConnection.cpp
index 380b3dc..80a010e 100644
--- a/media/libstagefright/rtsp/ARTSPConnection.cpp
+++ b/media/libstagefright/rtsp/ARTSPConnection.cpp
@@ -55,7 +55,7 @@ ARTSPConnection::ARTSPConnection(bool uidValid, uid_t uid)
ARTSPConnection::~ARTSPConnection() {
if (mSocket >= 0) {
- LOGE("Connection is still open, closing the socket.");
+ ALOGE("Connection is still open, closing the socket.");
if (mUIDValid) {
HTTPBase::UnRegisterSocketUserTag(mSocket);
}
@@ -235,7 +235,7 @@ void ARTSPConnection::onConnect(const sp<AMessage> &msg) {
// right here, since we currently have no way of asking the user
// for this information.
- LOGE("Malformed rtsp url %s", url.c_str());
+ ALOGE("Malformed rtsp url %s", url.c_str());
reply->setInt32("result", ERROR_MALFORMED);
reply->post();
@@ -245,12 +245,12 @@ 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());
if (ent == NULL) {
- LOGE("Unknown host %s", host.c_str());
+ ALOGE("Unknown host %s", host.c_str());
reply->setInt32("result", -ENOENT);
reply->post();
@@ -376,7 +376,7 @@ void ARTSPConnection::onCompleteConnection(const sp<AMessage> &msg) {
CHECK_EQ(optionLen, (socklen_t)sizeof(err));
if (err != 0) {
- LOGE("err = %d (%s)", err, strerror(err));
+ ALOGE("err = %d (%s)", err, strerror(err));
reply->setInt32("result", -err);
@@ -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()) {
@@ -446,12 +446,12 @@ void ARTSPConnection::onSendRequest(const sp<AMessage> &msg) {
if (n == 0) {
// Server closed the connection.
- LOGE("Server unexpectedly closed the connection.");
+ ALOGE("Server unexpectedly closed the connection.");
reply->setInt32("result", ERROR_IO);
reply->post();
} else {
- LOGE("Error sending rtsp request. (%s)", strerror(errno));
+ ALOGE("Error sending rtsp request. (%s)", strerror(errno));
reply->setInt32("result", -errno);
reply->post();
}
@@ -536,10 +536,10 @@ status_t ARTSPConnection::receive(void *data, size_t size) {
if (n == 0) {
// Server closed the connection.
- LOGE("Server unexpectedly closed the connection.");
+ ALOGE("Server unexpectedly closed the connection.");
return ERROR_IO;
} else {
- LOGE("Error reading rtsp response. (%s)", strerror(errno));
+ ALOGE("Error reading rtsp response. (%s)", strerror(errno));
return -errno;
}
}
@@ -615,7 +615,7 @@ bool ARTSPConnection::receiveRTSPReponse() {
notify->setObject("buffer", buffer);
notify->post();
} else {
- LOGW("received binary data, but no one cares.");
+ ALOGW("received binary data, but no one cares.");
}
return true;
@@ -624,7 +624,7 @@ bool ARTSPConnection::receiveRTSPReponse() {
sp<ARTSPResponse> response = new ARTSPResponse;
response->mStatusLine = statusLine;
- LOGI("status: %s", response->mStatusLine.c_str());
+ ALOGI("status: %s", response->mStatusLine.c_str());
ssize_t space1 = response->mStatusLine.find(" ");
if (space1 < 0) {
@@ -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.
@@ -740,7 +740,7 @@ bool ARTSPConnection::receiveRTSPReponse() {
msg->setMessage("reply", reply);
msg->setString("request", request.c_str(), request.size());
- LOGI("re-sending request with authentication headers...");
+ ALOGI("re-sending request with authentication headers...");
onSendRequest(msg);
return true;
@@ -793,9 +793,9 @@ bool ARTSPConnection::handleServerRequest(const sp<ARTSPResponse> &request) {
if (n <= 0) {
if (n == 0) {
// Server closed the connection.
- LOGE("Server unexpectedly closed the connection.");
+ ALOGE("Server unexpectedly closed the connection.");
} else {
- LOGE("Error sending rtsp response (%s).", strerror(errno));
+ ALOGE("Error sending rtsp response (%s).", strerror(errno));
}
performDisconnect();
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..a9b3330 100644
--- a/media/libstagefright/rtsp/ASessionDescription.cpp
+++ b/media/libstagefright/rtsp/ASessionDescription.cpp
@@ -80,7 +80,7 @@ bool ASessionDescription::parse(const void *data, size_t size) {
return false;
}
- LOGI("%s", line.c_str());
+ ALOGI("%s", line.c_str());
switch (line.c_str()[0]) {
case 'v':
@@ -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..2391c5c 100644
--- a/media/libstagefright/rtsp/MyHandler.h
+++ b/media/libstagefright/rtsp/MyHandler.h
@@ -155,7 +155,7 @@ struct MyHandler : public AHandler {
mSessionURL.append(StringPrintf("%u", port));
mSessionURL.append(path);
- LOGI("rewritten session url: '%s'", mSessionURL.c_str());
+ ALOGI("rewritten session url: '%s'", mSessionURL.c_str());
}
mSessionHost = host;
@@ -264,12 +264,12 @@ struct MyHandler : public AHandler {
if (!GetAttribute(transport.c_str(),
"source",
&source)) {
- LOGW("Missing 'source' field in Transport response. Using "
+ ALOGW("Missing 'source' field in Transport response. Using "
"RTSP endpoint address.");
struct hostent *ent = gethostbyname(mSessionHost.c_str());
if (ent == NULL) {
- LOGE("Failed to look up address of session host '%s'",
+ ALOGE("Failed to look up address of session host '%s'",
mSessionHost.c_str());
return false;
@@ -283,7 +283,7 @@ struct MyHandler : public AHandler {
if (!GetAttribute(transport.c_str(),
"server_port",
&server_port)) {
- LOGI("Missing 'server_port' field in Transport response.");
+ ALOGI("Missing 'server_port' field in Transport response.");
return false;
}
@@ -292,7 +292,7 @@ struct MyHandler : public AHandler {
|| rtpPort <= 0 || rtpPort > 65535
|| rtcpPort <=0 || rtcpPort > 65535
|| rtcpPort != rtpPort + 1) {
- LOGE("Server picked invalid RTP/RTCP port pair %s,"
+ ALOGE("Server picked invalid RTP/RTCP port pair %s,"
" RTP port must be even, RTCP port must be one higher.",
server_port.c_str());
@@ -300,7 +300,7 @@ struct MyHandler : public AHandler {
}
if (rtpPort & 1) {
- LOGW("Server picked an odd RTP port, it should've picked an "
+ ALOGW("Server picked an odd RTP port, it should've picked an "
"even one, we'll let it pass for now, but this may break "
"in the future.");
}
@@ -327,7 +327,7 @@ struct MyHandler : public AHandler {
(const sockaddr *)&addr, sizeof(addr));
if (n < (ssize_t)buf->size()) {
- LOGE("failed to poke a hole for RTP packets");
+ ALOGE("failed to poke a hole for RTP packets");
return false;
}
@@ -338,11 +338,11 @@ struct MyHandler : public AHandler {
(const sockaddr *)&addr, sizeof(addr));
if (n < (ssize_t)buf->size()) {
- LOGE("failed to poke a hole for RTCP packets");
+ ALOGE("failed to poke a hole for RTCP packets");
return false;
}
- LOGV("successfully poked holes.");
+ ALOGV("successfully poked holes.");
return true;
}
@@ -354,7 +354,7 @@ struct MyHandler : public AHandler {
int32_t result;
CHECK(msg->findInt32("result", &result));
- LOGI("connection request completed with result %d (%s)",
+ ALOGI("connection request completed with result %d (%s)",
result, strerror(-result));
if (result == OK) {
@@ -392,7 +392,7 @@ struct MyHandler : public AHandler {
int32_t result;
CHECK(msg->findInt32("result", &result));
- LOGI("DESCRIBE completed with result %d (%s)",
+ ALOGI("DESCRIBE completed with result %d (%s)",
result, strerror(-result));
if (result == OK) {
@@ -429,7 +429,7 @@ struct MyHandler : public AHandler {
response->mContent->size());
if (!mSessionDesc->isValid()) {
- LOGE("Failed to parse session description.");
+ ALOGE("Failed to parse session description.");
result = ERROR_MALFORMED;
} else {
ssize_t i = response->mHeaders.indexOfKey("content-base");
@@ -450,7 +450,7 @@ struct MyHandler : public AHandler {
// it with the absolute session URL to get
// something usable...
- LOGW("Server specified a non-absolute base URL"
+ ALOGW("Server specified a non-absolute base URL"
", combining it with the session URL to "
"get something usable...");
@@ -468,7 +468,7 @@ struct MyHandler : public AHandler {
// The first "track" is merely session meta
// data.
- LOGW("Session doesn't contain any playable "
+ ALOGW("Session doesn't contain any playable "
"tracks. Aborting.");
result = ERROR_UNSUPPORTED;
} else {
@@ -499,7 +499,7 @@ struct MyHandler : public AHandler {
int32_t result;
CHECK(msg->findInt32("result", &result));
- LOGI("SETUP(%d) completed with result %d (%s)",
+ ALOGI("SETUP(%d) completed with result %d (%s)",
index, result, strerror(-result));
if (result == OK) {
@@ -527,12 +527,12 @@ struct MyHandler : public AHandler {
strtoul(timeoutStr.c_str(), &end, 10);
if (end == timeoutStr.c_str() || *end != '\0') {
- LOGW("server specified malformed timeout '%s'",
+ ALOGW("server specified malformed timeout '%s'",
timeoutStr.c_str());
mKeepAliveTimeoutUs = kDefaultKeepAliveTimeoutUs;
} else if (timeoutSecs < 15) {
- LOGW("server specified too short a timeout "
+ ALOGW("server specified too short a timeout "
"(%lu secs), using default.",
timeoutSecs);
@@ -540,7 +540,7 @@ struct MyHandler : public AHandler {
} else {
mKeepAliveTimeoutUs = timeoutSecs * 1000000ll;
- LOGI("server specified timeout of %lu secs.",
+ ALOGI("server specified timeout of %lu secs.",
timeoutSecs);
}
}
@@ -625,7 +625,7 @@ struct MyHandler : public AHandler {
int32_t result;
CHECK(msg->findInt32("result", &result));
- LOGI("PLAY completed with result %d (%s)",
+ ALOGI("PLAY completed with result %d (%s)",
result, strerror(-result));
if (result == OK) {
@@ -682,7 +682,7 @@ struct MyHandler : public AHandler {
int32_t result;
CHECK(msg->findInt32("result", &result));
- LOGI("OPTIONS completed with result %d (%s)",
+ ALOGI("OPTIONS completed with result %d (%s)",
result, strerror(-result));
int32_t generation;
@@ -759,7 +759,7 @@ struct MyHandler : public AHandler {
int32_t result;
CHECK(msg->findInt32("result", &result));
- LOGI("TEARDOWN completed with result %d (%s)",
+ ALOGI("TEARDOWN completed with result %d (%s)",
result, strerror(-result));
sp<AMessage> reply = new AMessage('disc', id());
@@ -793,11 +793,11 @@ struct MyHandler : public AHandler {
if (mNumAccessUnitsReceived == 0) {
#if 1
- LOGI("stream ended? aborting.");
+ ALOGI("stream ended? aborting.");
(new AMessage('abor', id()))->post();
break;
#else
- LOGI("haven't seen an AU in a looong time.");
+ ALOGI("haven't seen an AU in a looong time.");
#endif
}
@@ -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;
}
@@ -848,7 +848,7 @@ struct MyHandler : public AHandler {
int32_t eos;
if (msg->findInt32("eos", &eos)) {
- LOGI("received BYE on track index %d", trackIndex);
+ ALOGI("received BYE on track index %d", trackIndex);
#if 0
track->mPacketSource->signalEOS(ERROR_END_OF_STREAM);
#endif
@@ -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;
}
@@ -884,7 +884,7 @@ struct MyHandler : public AHandler {
case 'seek':
{
if (!mSeekable) {
- LOGW("This is a live stream, ignoring seek request.");
+ ALOGW("This is a live stream, ignoring seek request.");
sp<AMessage> msg = mNotify->dup();
msg->setInt32("what", kWhatSeekDone);
@@ -961,7 +961,7 @@ struct MyHandler : public AHandler {
int32_t result;
CHECK(msg->findInt32("result", &result));
- LOGI("PLAY completed with result %d (%s)",
+ ALOGI("PLAY completed with result %d (%s)",
result, strerror(-result));
mCheckPending = false;
@@ -981,14 +981,14 @@ 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.");
+ ALOGI("seek completed.");
}
}
if (result != OK) {
- LOGE("seek failed, aborting.");
+ ALOGE("seek failed, aborting.");
(new AMessage('abor', id()))->post();
}
@@ -1017,7 +1017,7 @@ struct MyHandler : public AHandler {
{
if (!mReceivedFirstRTCPPacket) {
if (mReceivedFirstRTPPacket && !mTryFakeRTCP) {
- LOGW("We received RTP packets but no RTCP packets, "
+ ALOGW("We received RTP packets but no RTCP packets, "
"using fake timestamps.");
mTryFakeRTCP = true;
@@ -1026,7 +1026,7 @@ struct MyHandler : public AHandler {
fakeTimestamps();
} else if (!mReceivedFirstRTPPacket && !mTryTCPInterleaving) {
- LOGW("Never received any data, switching transports.");
+ ALOGW("Never received any data, switching transports.");
mTryTCPInterleaving = true;
@@ -1034,7 +1034,7 @@ struct MyHandler : public AHandler {
msg->setInt32("reconnect", true);
msg->post();
} else {
- LOGW("Never received any data, disconnecting.");
+ ALOGW("Never received any data, disconnecting.");
(new AMessage('abor', id()))->post();
}
}
@@ -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));
@@ -1101,7 +1101,7 @@ struct MyHandler : public AHandler {
if (!ASessionDescription::parseNTPRange(val.c_str(), &npt1, &npt2)) {
// This is a live stream and therefore not seekable.
- LOGI("This is a live stream");
+ ALOGI("This is a live stream");
return;
}
@@ -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);
@@ -1233,7 +1233,7 @@ private:
new APacketSource(mSessionDesc, index);
if (source->initCheck() != OK) {
- LOGW("Unsupported format. Ignoring track #%d.", index);
+ ALOGW("Unsupported format. Ignoring track #%d.", index);
sp<AMessage> reply = new AMessage('setu', id());
reply->setSize("index", index);
@@ -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/rtsp/UDPPusher.cpp b/media/libstagefright/rtsp/UDPPusher.cpp
index 576b3ca..47ea6f1 100644
--- a/media/libstagefright/rtsp/UDPPusher.cpp
+++ b/media/libstagefright/rtsp/UDPPusher.cpp
@@ -71,7 +71,7 @@ void UDPPusher::start() {
bool UDPPusher::onPush() {
uint32_t length;
if (fread(&length, 1, sizeof(length), mFile) < sizeof(length)) {
- LOGI("No more data to push.");
+ ALOGI("No more data to push.");
return false;
}
@@ -81,7 +81,7 @@ bool UDPPusher::onPush() {
sp<ABuffer> buffer = new ABuffer(length);
if (fread(buffer->data(), 1, length, mFile) < length) {
- LOGE("File truncated?.");
+ ALOGE("File truncated?.");
return false;
}
@@ -93,7 +93,7 @@ bool UDPPusher::onPush() {
uint32_t timeMs;
if (fread(&timeMs, 1, sizeof(timeMs), mFile) < sizeof(timeMs)) {
- LOGI("No more data to push.");
+ ALOGI("No more data to push.");
return false;
}
@@ -113,7 +113,7 @@ void UDPPusher::onMessageReceived(const sp<AMessage> &msg) {
case kWhatPush:
{
if (!onPush() && !(ntohs(mRemoteAddr.sin_port) & 1)) {
- LOGI("emulating BYE packet");
+ ALOGI("emulating BYE packet");
sp<ABuffer> buffer = new ABuffer(8);
uint8_t *data = buffer->data();
diff --git a/media/libstagefright/rtsp/rtp_test.cpp b/media/libstagefright/rtsp/rtp_test.cpp
index f0cb5a5..d43cd2a 100644
--- a/media/libstagefright/rtsp/rtp_test.cpp
+++ b/media/libstagefright/rtsp/rtp_test.cpp
@@ -204,7 +204,7 @@ int main(int argc, char **argv) {
continue;
}
- LOGE("decoder returned error 0x%08x", err);
+ ALOGE("decoder returned error 0x%08x", err);
break;
}
diff --git a/media/libstagefright/tests/DummyRecorder.cpp b/media/libstagefright/tests/DummyRecorder.cpp
index 8d75d6b..ac37b28 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();
@@ -47,7 +47,7 @@ status_t DummyRecorder::start() {
pthread_attr_destroy(&attr);
if (err) {
- LOGE("Error creating thread!");
+ ALOGE("Error creating thread!");
return -ENODEV;
}
return OK;
@@ -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..76b507f 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,14 +724,14 @@ 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);
if (fd < 0) {
- LOGE("ERROR: Could not open the the file %s, fd = %d !!", fileName, fd);
+ ALOGE("ERROR: Could not open the the file %s, fd = %d !!", fileName, fd);
}
CHECK(fd >= 0);
@@ -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,16 +852,16 @@ 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.
const char *fileName = "/sdcard/outputSurfEncMSourceGL.mp4";
int fd = open(fileName, O_RDWR | O_CREAT, 0744);
if (fd < 0) {
- LOGE("ERROR: Could not open the the file %s, fd = %d !!", fileName, fd);
+ ALOGE("ERROR: Could not open the the file %s, fd = %d !!", fileName, fd);
}
CHECK(fd >= 0);
@@ -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,16 +895,16 @@ 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.
const char *fileName = "/sdcard/outputSurfEncMSourceGLDiff.mp4";
int fd = open(fileName, O_RDWR | O_CREAT, 0744);
if (fd < 0) {
- LOGE("ERROR: Could not open the the file %s, fd = %d !!", fileName, fd);
+ ALOGE("ERROR: Could not open the the file %s, fd = %d !!", fileName, fd);
}
CHECK(fd >= 0);
@@ -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/libstagefright/timedtext/TimedTextPlayer.cpp b/media/libstagefright/timedtext/TimedTextPlayer.cpp
index 7c8a747..3014b0b 100644
--- a/media/libstagefright/timedtext/TimedTextPlayer.cpp
+++ b/media/libstagefright/timedtext/TimedTextPlayer.cpp
@@ -91,7 +91,7 @@ status_t TimedTextPlayer::start(uint8_t index) {
if (index >=
mTextTrackVector.size() + mTextOutOfBandVector.size()) {
- LOGE("Incorrect text track index: %d", index);
+ ALOGE("Incorrect text track index: %d", index);
return BAD_VALUE;
}
diff --git a/media/libstagefright/yuv/YUVImage.cpp b/media/libstagefright/yuv/YUVImage.cpp
index b712062..0d67c96 100644
--- a/media/libstagefright/yuv/YUVImage.cpp
+++ b/media/libstagefright/yuv/YUVImage.cpp
@@ -54,7 +54,7 @@ size_t YUVImage::bufferSize(YUVFormat yuvFormat, int32_t width, int32_t height)
// Y takes numberOfPixels bytes and U/V take numberOfPixels/4 bytes each.
numberOfBytes = (size_t)(numberOfPixels + (numberOfPixels >> 1));
} else {
- LOGE("Format not supported");
+ ALOGE("Format not supported");
}
return numberOfBytes;
}
@@ -74,7 +74,7 @@ bool YUVImage::initializeYUVPointers() {
mVdata = mYdata + numberOfPixels;
mUdata = mVdata + 1;
} else {
- LOGE("Format not supported");
+ ALOGE("Format not supported");
return false;
}
return true;
@@ -98,7 +98,7 @@ bool YUVImage::getOffsets(int32_t x, int32_t y,
*uOffset = 2*uvOffset;
*vOffset = 2*uvOffset;
} else {
- LOGE("Format not supported");
+ ALOGE("Format not supported");
return false;
}
@@ -122,7 +122,7 @@ bool YUVImage::getOffsetIncrementsPerDataRow(
*uDataOffsetIncrement = 2*uvDataOffsetIncrement;
*vDataOffsetIncrement = 2*uvDataOffsetIncrement;
} else {
- LOGE("Format not supported");
+ ALOGE("Format not supported");
return false;
}
diff --git a/media/mediaserver/main_mediaserver.cpp b/media/mediaserver/main_mediaserver.cpp
index 7094cfa..f078192 100644
--- a/media/mediaserver/main_mediaserver.cpp
+++ b/media/mediaserver/main_mediaserver.cpp
@@ -37,7 +37,7 @@ int main(int argc, char** argv)
{
sp<ProcessState> proc(ProcessState::self());
sp<IServiceManager> sm = defaultServiceManager();
- LOGI("ServiceManager: %p", sm.get());
+ ALOGI("ServiceManager: %p", sm.get());
AudioFlinger::instantiate();
MediaPlayerService::instantiate();
CameraService::instantiate();
diff --git a/media/mtp/MtpDataPacket.cpp b/media/mtp/MtpDataPacket.cpp
index cfea7e8..930f0b0 100644
--- a/media/mtp/MtpDataPacket.cpp
+++ b/media/mtp/MtpDataPacket.cpp
@@ -418,7 +418,7 @@ int MtpDataPacket::readData(struct usb_request *request, void* buffer, int lengt
// Queue a read request. Call readDataWait to wait for result
int MtpDataPacket::readDataAsync(struct usb_request *req) {
if (usb_request_queue(req)) {
- LOGE("usb_endpoint_queue failed, errno: %d", errno);
+ ALOGE("usb_endpoint_queue failed, errno: %d", errno);
return -1;
}
return 0;
diff --git a/media/mtp/MtpDevice.cpp b/media/mtp/MtpDevice.cpp
index 2e86159..bf7795c 100644
--- a/media/mtp/MtpDevice.cpp
+++ b/media/mtp/MtpDevice.cpp
@@ -53,7 +53,7 @@ static bool isMtpDevice(uint16_t vendor, uint16_t product) {
MtpDevice* MtpDevice::open(const char* deviceName, int fd) {
struct usb_device *device = usb_device_new(deviceName, fd);
if (!device) {
- LOGE("usb_device_new failed for %s", deviceName);
+ ALOGE("usb_device_new failed for %s", deviceName);
return NULL;
}
@@ -72,7 +72,7 @@ MtpDevice* MtpDevice::open(const char* deviceName, int fd) {
{
char* manufacturerName = usb_device_get_manufacturer_name(device);
char* productName = usb_device_get_product_name(device);
- LOGD("Found camera: \"%s\" \"%s\"\n", manufacturerName, productName);
+ ALOGD("Found camera: \"%s\" \"%s\"\n", manufacturerName, productName);
free(manufacturerName);
free(productName);
} else if (interface->bInterfaceClass == 0xFF &&
@@ -90,7 +90,7 @@ MtpDevice* MtpDevice::open(const char* deviceName, int fd) {
// Looks like an android style MTP device
char* manufacturerName = usb_device_get_manufacturer_name(device);
char* productName = usb_device_get_product_name(device);
- LOGD("Found MTP device: \"%s\" \"%s\"\n", manufacturerName, productName);
+ ALOGD("Found MTP device: \"%s\" \"%s\"\n", manufacturerName, productName);
free(manufacturerName);
free(productName);
}
@@ -134,7 +134,7 @@ MtpDevice* MtpDevice::open(const char* deviceName, int fd) {
for (int i = 0; i < 3; i++) {
ep = (struct usb_endpoint_descriptor *)usb_descriptor_iter_next(&iter);
if (!ep || ep->bDescriptorType != USB_DT_ENDPOINT) {
- LOGE("endpoints not found\n");
+ ALOGE("endpoints not found\n");
usb_device_close(device);
return NULL;
}
@@ -149,13 +149,13 @@ MtpDevice* MtpDevice::open(const char* deviceName, int fd) {
}
}
if (!ep_in_desc || !ep_out_desc || !ep_intr_desc) {
- LOGE("endpoints not found\n");
+ ALOGE("endpoints not found\n");
usb_device_close(device);
return NULL;
}
if (usb_device_claim_interface(device, interface->bInterfaceNumber)) {
- LOGE("usb_device_claim_interface failed errno: %d\n", errno);
+ ALOGE("usb_device_claim_interface failed errno: %d\n", errno);
usb_device_close(device);
return NULL;
}
@@ -168,7 +168,7 @@ MtpDevice* MtpDevice::open(const char* deviceName, int fd) {
}
usb_device_close(device);
- LOGE("device not found");
+ ALOGE("device not found");
return NULL;
}
@@ -232,7 +232,7 @@ void MtpDevice::print() {
mDeviceInfo->print();
if (mDeviceInfo->mDeviceProperties) {
- LOGI("***** DEVICE PROPERTIES *****\n");
+ ALOGI("***** DEVICE PROPERTIES *****\n");
int count = mDeviceInfo->mDeviceProperties->size();
for (int i = 0; i < count; i++) {
MtpDeviceProperty propCode = (*mDeviceInfo->mDeviceProperties)[i];
@@ -246,11 +246,11 @@ void MtpDevice::print() {
}
if (mDeviceInfo->mPlaybackFormats) {
- LOGI("***** OBJECT PROPERTIES *****\n");
+ ALOGI("***** OBJECT PROPERTIES *****\n");
int count = mDeviceInfo->mPlaybackFormats->size();
for (int i = 0; i < count; i++) {
MtpObjectFormat format = (*mDeviceInfo->mPlaybackFormats)[i];
- LOGI("*** FORMAT: %s\n", MtpDebug::getFormatCodeName(format));
+ ALOGI("*** FORMAT: %s\n", MtpDebug::getFormatCodeName(format));
MtpObjectPropertyList* props = getObjectPropsSupported(format);
if (props) {
for (int j = 0; j < props->size(); j++) {
@@ -260,7 +260,7 @@ void MtpDevice::print() {
property->print();
delete property;
} else {
- LOGE("could not fetch property: %s",
+ ALOGE("could not fetch property: %s",
MtpDebug::getObjectPropCodeName(prop));
}
}
@@ -584,7 +584,7 @@ bool MtpDevice::readObject(MtpObjectHandle handle,
&& mData.readDataHeader(mRequestIn1)) {
uint32_t length = mData.getContainerLength();
if (length - MTP_CONTAINER_HEADER_SIZE != objectSize) {
- LOGE("readObject error objectSize: %d, length: %d",
+ ALOGE("readObject error objectSize: %d, length: %d",
objectSize, length);
goto fail;
}
@@ -617,7 +617,7 @@ bool MtpDevice::readObject(MtpObjectHandle handle,
// queue up a read request
req->buffer_length = (remaining > sizeof(buffer1) ? sizeof(buffer1) : remaining);
if (mData.readDataAsync(req)) {
- LOGE("readDataAsync failed");
+ ALOGE("readDataAsync failed");
goto fail;
}
} else {
@@ -627,7 +627,7 @@ bool MtpDevice::readObject(MtpObjectHandle handle,
if (writeBuffer) {
// write previous buffer
if (!callback(writeBuffer, offset, writeLength, clientData)) {
- LOGE("write failed");
+ ALOGE("write failed");
// wait for pending read before failing
if (req)
mData.readDataWait(mDevice);
@@ -666,10 +666,10 @@ fail:
// reads the object's data and writes it to the specified file path
bool MtpDevice::readObject(MtpObjectHandle handle, const char* destPath, int group, int perm) {
- LOGD("readObject: %s", destPath);
+ ALOGD("readObject: %s", destPath);
int fd = ::open(destPath, O_RDWR | O_CREAT | O_TRUNC);
if (fd < 0) {
- LOGE("open failed for %s", destPath);
+ ALOGE("open failed for %s", destPath);
return false;
}
@@ -718,7 +718,7 @@ bool MtpDevice::readObject(MtpObjectHandle handle, const char* destPath, int gro
// queue up a read request
req->buffer_length = (remaining > sizeof(buffer1) ? sizeof(buffer1) : remaining);
if (mData.readDataAsync(req)) {
- LOGE("readDataAsync failed");
+ ALOGE("readDataAsync failed");
goto fail;
}
} else {
@@ -728,7 +728,7 @@ bool MtpDevice::readObject(MtpObjectHandle handle, const char* destPath, int gro
if (writeBuffer) {
// write previous buffer
if (write(fd, writeBuffer, writeLength) != writeLength) {
- LOGE("write failed");
+ ALOGE("write failed");
// wait for pending read before failing
if (req)
mData.readDataWait(mDevice);
@@ -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,10 +787,10 @@ 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");
+ ALOGD("got response packet instead of data packet");
// we got a response packet rather than data
// copy it to mResponse
mResponse.copyFrom(mData);
@@ -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();
@@ -827,7 +827,7 @@ MtpResponseCode MtpDevice::readResponse() {
mResponse.dump();
return mResponse.getResponseCode();
} else {
- LOGD("readResponse failed\n");
+ ALOGD("readResponse failed\n");
return -1;
}
}
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/MtpObjectInfo.cpp b/media/mtp/MtpObjectInfo.cpp
index ea68c3b..cd15343 100644
--- a/media/mtp/MtpObjectInfo.cpp
+++ b/media/mtp/MtpObjectInfo.cpp
@@ -91,17 +91,17 @@ void MtpObjectInfo::read(MtpDataPacket& packet) {
}
void MtpObjectInfo::print() {
- LOGD("MtpObject Info %08X: %s\n", mHandle, mName);
- LOGD(" mStorageID: %08X mFormat: %04X mProtectionStatus: %d\n",
+ ALOGD("MtpObject Info %08X: %s\n", mHandle, mName);
+ ALOGD(" mStorageID: %08X mFormat: %04X mProtectionStatus: %d\n",
mStorageID, mFormat, mProtectionStatus);
- LOGD(" mCompressedSize: %d mThumbFormat: %04X mThumbCompressedSize: %d\n",
+ ALOGD(" mCompressedSize: %d mThumbFormat: %04X mThumbCompressedSize: %d\n",
mCompressedSize, mFormat, mThumbCompressedSize);
- LOGD(" mThumbPixWidth: %d mThumbPixHeight: %d\n", mThumbPixWidth, mThumbPixHeight);
- LOGD(" mImagePixWidth: %d mImagePixHeight: %d mImagePixDepth: %d\n",
+ ALOGD(" mThumbPixWidth: %d mThumbPixHeight: %d\n", mThumbPixWidth, mThumbPixHeight);
+ ALOGD(" mImagePixWidth: %d mImagePixHeight: %d mImagePixDepth: %d\n",
mImagePixWidth, mImagePixHeight, mImagePixDepth);
- LOGD(" mParent: %08X mAssociationType: %04X mAssociationDesc: %04X\n",
+ ALOGD(" mParent: %08X mAssociationType: %04X mAssociationDesc: %04X\n",
mParent, mAssociationType, mAssociationDesc);
- LOGD(" mSequenceNumber: %d mDateCreated: %ld mDateModified: %ld mKeywords: %s\n",
+ ALOGD(" mSequenceNumber: %d mDateCreated: %ld mDateModified: %ld mKeywords: %s\n",
mSequenceNumber, mDateCreated, mDateModified, mKeywords);
}
diff --git a/media/mtp/MtpPacket.cpp b/media/mtp/MtpPacket.cpp
index baf99e5..dd07843 100644
--- a/media/mtp/MtpPacket.cpp
+++ b/media/mtp/MtpPacket.cpp
@@ -36,7 +36,7 @@ MtpPacket::MtpPacket(int bufferSize)
{
mBuffer = (uint8_t *)malloc(bufferSize);
if (!mBuffer) {
- LOGE("out of memory!");
+ ALOGE("out of memory!");
abort();
}
}
@@ -57,7 +57,7 @@ void MtpPacket::allocate(int length) {
int newLength = length + mAllocationIncrement;
mBuffer = (uint8_t *)realloc(mBuffer, newLength);
if (!mBuffer) {
- LOGE("out of memory!");
+ ALOGE("out of memory!");
abort();
}
mBufferSize = newLength;
@@ -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) {
@@ -134,7 +134,7 @@ void MtpPacket::setTransactionID(MtpTransactionID id) {
uint32_t MtpPacket::getParameter(int index) const {
if (index < 1 || index > 5) {
- LOGE("index %d out of range in MtpPacket::getParameter", index);
+ ALOGE("index %d out of range in MtpPacket::getParameter", index);
return 0;
}
return getUInt32(MTP_CONTAINER_PARAMETER_OFFSET + (index - 1) * sizeof(uint32_t));
@@ -142,7 +142,7 @@ uint32_t MtpPacket::getParameter(int index) const {
void MtpPacket::setParameter(int index, uint32_t value) {
if (index < 1 || index > 5) {
- LOGE("index %d out of range in MtpPacket::setParameter", index);
+ ALOGE("index %d out of range in MtpPacket::setParameter", index);
return;
}
int offset = MTP_CONTAINER_PARAMETER_OFFSET + (index - 1) * sizeof(uint32_t);
diff --git a/media/mtp/MtpProperty.cpp b/media/mtp/MtpProperty.cpp
index 8016c35..64dd45b 100644
--- a/media/mtp/MtpProperty.cpp
+++ b/media/mtp/MtpProperty.cpp
@@ -91,7 +91,7 @@ MtpProperty::MtpProperty(MtpPropertyCode propCode,
mDefaultValue.u.u64 = defaultValue;
break;
default:
- LOGE("unknown type %04X in MtpProperty::MtpProperty", type);
+ ALOGE("unknown type %04X in MtpProperty::MtpProperty", type);
}
}
}
@@ -267,7 +267,7 @@ void MtpProperty::setFormRange(int min, int max, int step) {
mStepSize.u.u64 = step;
break;
default:
- LOGE("unsupported type for MtpProperty::setRange");
+ ALOGE("unsupported type for MtpProperty::setRange");
break;
}
}
@@ -306,7 +306,7 @@ void MtpProperty::setFormEnum(const int* values, int count) {
mEnumValues[i].u.u64 = value;
break;
default:
- LOGE("unsupported type for MtpProperty::setEnum");
+ ALOGE("unsupported type for MtpProperty::setEnum");
break;
}
}
@@ -320,18 +320,18 @@ void MtpProperty::print() {
MtpString buffer;
bool deviceProp = isDeviceProperty();
if (deviceProp)
- LOGI(" %s (%04X)", MtpDebug::getDevicePropCodeName(mCode), mCode);
+ ALOGI(" %s (%04X)", MtpDebug::getDevicePropCodeName(mCode), mCode);
else
- LOGI(" %s (%04X)", MtpDebug::getObjectPropCodeName(mCode), mCode);
- LOGI(" type %04X", mType);
- LOGI(" writeable %s", (mWriteable ? "true" : "false"));
+ ALOGI(" %s (%04X)", MtpDebug::getObjectPropCodeName(mCode), mCode);
+ ALOGI(" type %04X", mType);
+ ALOGI(" writeable %s", (mWriteable ? "true" : "false"));
buffer = " default value: ";
print(mDefaultValue, buffer);
- LOGI("%s", (const char *)buffer);
+ ALOGI("%s", (const char *)buffer);
if (deviceProp) {
buffer = " current value: ";
print(mCurrentValue, buffer);
- LOGI("%s", (const char *)buffer);
+ ALOGI("%s", (const char *)buffer);
}
switch (mFormFlag) {
case kFormNone:
@@ -344,7 +344,7 @@ void MtpProperty::print() {
buffer += ", ";
print(mStepSize, buffer);
buffer += ")";
- LOGI("%s", (const char *)buffer);
+ ALOGI("%s", (const char *)buffer);
break;
case kFormEnum:
buffer = " Enum { ";
@@ -353,13 +353,13 @@ void MtpProperty::print() {
buffer += " ";
}
buffer += "}";
- LOGI("%s", (const char *)buffer);
+ ALOGI("%s", (const char *)buffer);
break;
case kFormDateTime:
- LOGI(" DateTime\n");
+ ALOGI(" DateTime\n");
break;
default:
- LOGI(" form %d\n", mFormFlag);
+ ALOGI(" form %d\n", mFormFlag);
break;
}
}
@@ -402,7 +402,7 @@ void MtpProperty::print(MtpPropertyValue& value, MtpString& buffer) {
buffer.appendFormat("%s", value.str);
break;
default:
- LOGE("unsupported type for MtpProperty::print\n");
+ ALOGE("unsupported type for MtpProperty::print\n");
break;
}
}
@@ -456,7 +456,7 @@ void MtpProperty::readValue(MtpDataPacket& packet, MtpPropertyValue& value) {
value.str = strdup(stringBuffer);
break;
default:
- LOGE("unknown type %04X in MtpProperty::readValue", mType);
+ ALOGE("unknown type %04X in MtpProperty::readValue", mType);
}
}
@@ -511,7 +511,7 @@ void MtpProperty::writeValue(MtpDataPacket& packet, MtpPropertyValue& value) {
packet.putEmptyString();
break;
default:
- LOGE("unknown type %04X in MtpProperty::writeValue", mType);
+ ALOGE("unknown type %04X in MtpProperty::writeValue", mType);
}
}
diff --git a/media/mtp/MtpServer.cpp b/media/mtp/MtpServer.cpp
index 1dcfb74..5606187 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
@@ -179,14 +179,14 @@ void MtpServer::run() {
if (dataIn) {
int ret = mData.read(fd);
if (ret < 0) {
- LOGE("data read returned %d, errno: %d", ret, errno);
+ ALOGE("data read returned %d, errno: %d", ret, errno);
if (errno == ECANCELED) {
// return to top of loop and wait for next command
continue;
}
break;
}
- LOGV("received data:");
+ ALOGV("received data:");
mData.dump();
} else {
mData.reset();
@@ -196,11 +196,11 @@ 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) {
- LOGE("request write returned %d, errno: %d", ret, errno);
+ ALOGE("request write returned %d, errno: %d", ret, errno);
if (errno == ECANCELED) {
// return to top of loop and wait for next command
continue;
@@ -210,11 +210,11 @@ 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) {
- LOGE("request write returned %d, errno: %d", ret, errno);
+ ALOGE("request write returned %d, errno: %d", ret, errno);
if (errno == ECANCELED) {
// return to top of loop and wait for next command
continue;
@@ -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);
}
}
@@ -296,7 +296,7 @@ void MtpServer::removeEditObject(MtpObjectHandle handle) {
return;
}
}
- LOGE("ObjectEdit not found in removeEditObject");
+ ALOGE("ObjectEdit not found in removeEditObject");
}
void MtpServer::commitEdit(ObjectEdit* edit) {
@@ -314,7 +314,7 @@ bool MtpServer::handleRequest() {
if (mSendObjectHandle != kInvalidObjectHandle && operation != MTP_OPERATION_SEND_OBJECT) {
// FIXME - need to delete mSendObjectHandle from the database
- LOGE("expected SendObject after SendObjectInfo");
+ ALOGE("expected SendObject after SendObjectInfo");
mSendObjectHandle = kInvalidObjectHandle;
}
@@ -408,7 +408,7 @@ bool MtpServer::handleRequest() {
response = doEndEditObject();
break;
default:
- LOGE("got unsupported command %s", MtpDebug::getOperationCodeName(operation));
+ ALOGE("got unsupported command %s", MtpDebug::getOperationCodeName(operation));
response = MTP_RESPONSE_OPERATION_NOT_SUPPORTED;
break;
}
@@ -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;
@@ -878,7 +878,7 @@ MtpResponseCode MtpServer::doSendObjectInfo() {
return MTP_RESPONSE_OBJECT_TOO_LARGE;
}
-LOGD("path: %s parent: %d storageID: %08X", (const char*)path, parent, storageID);
+ ALOGD("path: %s parent: %d storageID: %08X", (const char*)path, parent, storageID);
MtpObjectHandle handle = mDatabase->beginSendObject((const char*)path,
format, parent, storageID, mSendObjectFileSize, modifiedTime);
if (handle == kInvalidObjectHandle) {
@@ -917,7 +917,7 @@ MtpResponseCode MtpServer::doSendObject() {
int ret, initialData;
if (mSendObjectHandle == kInvalidObjectHandle) {
- LOGE("Expected SendObjectInfo before SendObject");
+ ALOGE("Expected SendObjectInfo before SendObject");
result = MTP_RESPONSE_NO_VALID_OBJECT_INFO;
goto done;
}
@@ -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);
@@ -984,7 +984,7 @@ static void deleteRecursive(const char* path) {
char pathbuf[PATH_MAX];
int pathLength = strlen(path);
if (pathLength >= sizeof(pathbuf) - 1) {
- LOGE("path too long: %s\n", path);
+ ALOGE("path too long: %s\n", path);
}
strcpy(pathbuf, path);
if (pathbuf[pathLength - 1] != '/') {
@@ -995,7 +995,7 @@ static void deleteRecursive(const char* path) {
DIR* dir = opendir(path);
if (!dir) {
- LOGE("opendir %s failed: %s", path, strerror(errno));
+ ALOGE("opendir %s failed: %s", path, strerror(errno));
return;
}
@@ -1010,7 +1010,7 @@ static void deleteRecursive(const char* path) {
int nameLength = strlen(name);
if (nameLength > pathRemaining) {
- LOGE("path %s/%s too long\n", path, name);
+ ALOGE("path %s/%s too long\n", path, name);
continue;
}
strcpy(fileSpot, name);
@@ -1036,7 +1036,7 @@ static void deletePath(const char* path) {
unlink(path);
}
} else {
- LOGE("deletePath stat failed for %s: %s", path, strerror(errno));
+ ALOGE("deletePath stat failed for %s: %s", path, strerror(errno));
}
}
@@ -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;
@@ -1098,18 +1098,18 @@ MtpResponseCode MtpServer::doSendPartialObject() {
ObjectEdit* edit = getEditObject(handle);
if (!edit) {
- LOGE("object not open for edit in doSendPartialObject");
+ ALOGE("object not open for edit in doSendPartialObject");
return MTP_RESPONSE_GENERAL_ERROR;
}
// can't start writing past the end of the file
if (offset > edit->mSize) {
- LOGD("writing past end of object, offset: %lld, edit->mSize: %lld", offset, edit->mSize);
+ ALOGD("writing past end of object, offset: %lld, edit->mSize: %lld", offset, edit->mSize);
return MTP_RESPONSE_GENERAL_ERROR;
}
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);
@@ -1155,7 +1155,7 @@ MtpResponseCode MtpServer::doTruncateObject() {
MtpObjectHandle handle = mRequest.getParameter(1);
ObjectEdit* edit = getEditObject(handle);
if (!edit) {
- LOGE("object not open for edit in doTruncateObject");
+ ALOGE("object not open for edit in doTruncateObject");
return MTP_RESPONSE_GENERAL_ERROR;
}
@@ -1173,7 +1173,7 @@ MtpResponseCode MtpServer::doTruncateObject() {
MtpResponseCode MtpServer::doBeginEditObject() {
MtpObjectHandle handle = mRequest.getParameter(1);
if (getEditObject(handle)) {
- LOGE("object already open for edit in doBeginEditObject");
+ ALOGE("object already open for edit in doBeginEditObject");
return MTP_RESPONSE_GENERAL_ERROR;
}
@@ -1186,7 +1186,7 @@ MtpResponseCode MtpServer::doBeginEditObject() {
int fd = open((const char *)path, O_RDWR | O_EXCL);
if (fd < 0) {
- LOGE("open failed for %s in doBeginEditObject (%d)", (const char *)path, errno);
+ ALOGE("open failed for %s in doBeginEditObject (%d)", (const char *)path, errno);
return MTP_RESPONSE_GENERAL_ERROR;
}
@@ -1198,7 +1198,7 @@ MtpResponseCode MtpServer::doEndEditObject() {
MtpObjectHandle handle = mRequest.getParameter(1);
ObjectEdit* edit = getEditObject(handle);
if (!edit) {
- LOGE("object not open for edit in doEndEditObject");
+ ALOGE("object not open for edit in doEndEditObject");
return MTP_RESPONSE_GENERAL_ERROR;
}
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() {
diff --git a/media/mtp/MtpStorageInfo.cpp b/media/mtp/MtpStorageInfo.cpp
index ca64ac0..dcd37cd 100644
--- a/media/mtp/MtpStorageInfo.cpp
+++ b/media/mtp/MtpStorageInfo.cpp
@@ -61,11 +61,11 @@ void MtpStorageInfo::read(MtpDataPacket& packet) {
}
void MtpStorageInfo::print() {
- LOGD("Storage Info %08X:\n\tmStorageType: %d\n\tmFileSystemType: %d\n\tmAccessCapability: %d\n",
+ ALOGD("Storage Info %08X:\n\tmStorageType: %d\n\tmFileSystemType: %d\n\tmAccessCapability: %d\n",
mStorageID, mStorageType, mFileSystemType, mAccessCapability);
- LOGD("\tmMaxCapacity: %lld\n\tmFreeSpaceBytes: %lld\n\tmFreeSpaceObjects: %d\n",
+ ALOGD("\tmMaxCapacity: %lld\n\tmFreeSpaceBytes: %lld\n\tmFreeSpaceObjects: %d\n",
mMaxCapacity, mFreeSpaceBytes, mFreeSpaceObjects);
- LOGD("\tmStorageDescription: %s\n\tmVolumeIdentifier: %s\n",
+ ALOGD("\tmStorageDescription: %s\n\tmVolumeIdentifier: %s\n",
mStorageDescription, mVolumeIdentifier);
}