summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
Diffstat (limited to 'media')
-rw-r--r--media/jni/android_media_MediaMetadataRetriever.cpp12
-rw-r--r--media/jni/android_media_MediaPlayer.cpp28
-rw-r--r--media/jni/android_media_MediaRecorder.cpp8
-rw-r--r--media/jni/android_media_MediaScanner.cpp8
-rw-r--r--media/jni/android_media_Utils.cpp2
-rw-r--r--media/jni/android_mtp_MtpDatabase.cpp74
-rw-r--r--media/jni/android_mtp_MtpDevice.cpp82
-rw-r--r--media/jni/android_mtp_MtpServer.cpp32
-rw-r--r--media/jni/audioeffect/android_media_AudioEffect.cpp48
-rw-r--r--media/jni/audioeffect/android_media_Visualizer.cpp18
-rwxr-xr-xmedia/jni/mediaeditor/VideoEditorMain.cpp20
-rw-r--r--media/jni/soundpool/SoundPool.cpp8
-rw-r--r--media/jni/soundpool/android_media_SoundPool.cpp8
-rwxr-xr-xmedia/libeffects/preprocessing/PreProcessing.cpp6
-rw-r--r--media/libmedia/AudioEffect.cpp6
-rw-r--r--media/libmedia/AudioRecord.cpp18
-rw-r--r--media/libmedia/AudioSystem.cpp2
-rw-r--r--media/libmedia/AudioTrack.cpp30
-rw-r--r--media/libmedia/IAudioFlinger.cpp6
-rw-r--r--media/libmedia/IMediaDeathNotifier.cpp2
-rw-r--r--media/libmedia/JetPlayer.cpp20
-rw-r--r--media/libmedia/MediaProfiles.cpp26
-rw-r--r--media/libmedia/MediaScannerClient.cpp6
-rw-r--r--media/libmedia/Metadata.cpp4
-rw-r--r--media/libmedia/ToneGenerator.cpp14
-rw-r--r--media/libmedia/Visualizer.cpp4
-rw-r--r--media/libmedia/mediametadataretriever.cpp20
-rw-r--r--media/libmedia/mediaplayer.cpp36
-rw-r--r--media/libmedia/mediarecorder.cpp130
-rw-r--r--media/libmediaplayerservice/MediaPlayerService.cpp40
-rw-r--r--media/libmediaplayerservice/MediaRecorderClient.cpp44
-rw-r--r--media/libmediaplayerservice/MetadataRetrieverClient.cpp26
-rw-r--r--media/libmediaplayerservice/MidiFile.cpp28
-rw-r--r--media/libmediaplayerservice/MidiMetadataRetriever.cpp6
-rw-r--r--media/libmediaplayerservice/StagefrightRecorder.cpp74
-rw-r--r--media/libmediaplayerservice/TestPlayerStub.cpp6
-rw-r--r--media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp2
-rw-r--r--media/libmediaplayerservice/nuplayer/NuPlayer.cpp4
-rw-r--r--media/libmediaplayerservice/nuplayer/StreamingSource.cpp4
-rw-r--r--media/libstagefright/AACWriter.cpp4
-rw-r--r--media/libstagefright/ACodec.cpp24
-rw-r--r--media/libstagefright/AMRExtractor.cpp4
-rw-r--r--media/libstagefright/AVIExtractor.cpp2
-rw-r--r--media/libstagefright/AwesomePlayer.cpp6
-rwxr-xr-xmedia/libstagefright/CameraSource.cpp22
-rw-r--r--media/libstagefright/CameraSourceTimeLapse.cpp2
-rw-r--r--media/libstagefright/FLACExtractor.cpp28
-rw-r--r--media/libstagefright/FileSource.cpp2
-rw-r--r--media/libstagefright/HTTPBase.cpp6
-rw-r--r--media/libstagefright/MP3Extractor.cpp2
-rw-r--r--media/libstagefright/MPEG4Extractor.cpp8
-rwxr-xr-xmedia/libstagefright/MPEG4Writer.cpp44
-rw-r--r--media/libstagefright/MediaBuffer.cpp2
-rw-r--r--media/libstagefright/NuCachedSource2.cpp6
-rwxr-xr-xmedia/libstagefright/OMXCodec.cpp58
-rw-r--r--media/libstagefright/OggExtractor.cpp2
-rw-r--r--media/libstagefright/SampleIterator.cpp8
-rw-r--r--media/libstagefright/SampleTable.cpp2
-rw-r--r--media/libstagefright/StagefrightMediaScanner.cpp2
-rw-r--r--media/libstagefright/StagefrightMetadataRetriever.cpp6
-rw-r--r--media/libstagefright/SurfaceMediaSource.cpp32
-rw-r--r--media/libstagefright/WVMExtractor.cpp4
-rw-r--r--media/libstagefright/codecs/aacdec/SoftAAC.cpp2
-rw-r--r--media/libstagefright/codecs/aacenc/AACEncoder.cpp14
-rw-r--r--media/libstagefright/codecs/amrnb/dec/SoftAMR.cpp2
-rw-r--r--media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp2
-rw-r--r--media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp10
-rw-r--r--media/libstagefright/codecs/avc/enc/AVCEncoder.cpp14
-rw-r--r--media/libstagefright/codecs/g711/dec/SoftG711.cpp2
-rw-r--r--media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp4
-rw-r--r--media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp28
-rw-r--r--media/libstagefright/codecs/mp3dec/SoftMP3.cpp4
-rw-r--r--media/libstagefright/codecs/on2/dec/SoftVPX.cpp4
-rw-r--r--media/libstagefright/codecs/on2/h264dec/SoftAVC.cpp4
-rw-r--r--media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp2
-rw-r--r--media/libstagefright/foundation/AMessage.cpp4
-rw-r--r--media/libstagefright/httplive/LiveDataSource.cpp4
-rw-r--r--media/libstagefright/httplive/LiveSession.cpp26
-rw-r--r--media/libstagefright/httplive/M3UParser.cpp2
-rw-r--r--media/libstagefright/id3/ID3.cpp2
-rw-r--r--media/libstagefright/matroska/MatroskaExtractor.cpp2
-rw-r--r--media/libstagefright/mpeg2ts/ATSParser.cpp2
-rw-r--r--media/libstagefright/mpeg2ts/MPEG2PSExtractor.cpp2
-rw-r--r--media/libstagefright/omx/OMXMaster.cpp4
-rw-r--r--media/libstagefright/omx/OMXNodeInstance.cpp34
-rw-r--r--media/libstagefright/omx/SoftOMXPlugin.cpp2
-rw-r--r--media/libstagefright/omx/tests/OMXHarness.cpp2
-rw-r--r--media/libstagefright/rtsp/ARTPSession.cpp8
-rw-r--r--media/libstagefright/rtsp/ARTSPConnection.cpp20
-rw-r--r--media/libstagefright/rtsp/MyHandler.h12
-rw-r--r--media/libstagefright/rtsp/UDPPusher.cpp2
-rw-r--r--media/libstagefright/rtsp/rtp_test.cpp2
-rw-r--r--media/libstagefright/tests/DummyRecorder.cpp2
-rw-r--r--media/libstagefright/tests/SurfaceMediaSource_test.cpp6
-rw-r--r--media/libstagefright/timedtext/TimedTextPlayer.cpp2
-rw-r--r--media/libstagefright/yuv/YUVImage.cpp8
-rw-r--r--media/mtp/MtpDataPacket.cpp2
-rw-r--r--media/mtp/MtpDevice.cpp24
-rw-r--r--media/mtp/MtpPacket.cpp8
-rw-r--r--media/mtp/MtpProperty.cpp12
-rw-r--r--media/mtp/MtpServer.cpp32
-rw-r--r--media/tests/omxjpegdecoder/omx_jpeg_decoder.cpp2
102 files changed, 754 insertions, 754 deletions
diff --git a/media/jni/android_media_MediaMetadataRetriever.cpp b/media/jni/android_media_MediaMetadataRetriever.cpp
index f749d51..0dc3b65 100644
--- a/media/jni/android_media_MediaMetadataRetriever.cpp
+++ b/media/jni/android_media_MediaMetadataRetriever.cpp
@@ -153,13 +153,13 @@ static void android_media_MediaMetadataRetriever_setDataSourceFD(JNIEnv *env, jo
int fd = jniGetFDFromFileDescriptor(env, fileDescriptor);
if (offset < 0 || length < 0 || fd < 0) {
if (offset < 0) {
- LOGE("negative offset (%lld)", offset);
+ ALOGE("negative offset (%lld)", offset);
}
if (length < 0) {
- LOGE("negative length (%lld)", length);
+ ALOGE("negative length (%lld)", length);
}
if (fd < 0) {
- LOGE("invalid file descriptor");
+ ALOGE("invalid file descriptor");
}
jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
return;
@@ -238,7 +238,7 @@ static jobject android_media_MediaMetadataRetriever_getFrameAtTime(JNIEnv *env,
videoFrame = static_cast<VideoFrame *>(frameMemory->pointer());
}
if (videoFrame == NULL) {
- LOGE("getFrameAtTime: videoFrame is a NULL pointer");
+ ALOGE("getFrameAtTime: videoFrame is a NULL pointer");
return NULL;
}
@@ -322,7 +322,7 @@ static jbyteArray android_media_MediaMetadataRetriever_getEmbeddedPicture(
mediaAlbumArt = static_cast<MediaAlbumArt *>(albumArtMemory->pointer());
}
if (mediaAlbumArt == NULL) {
- LOGE("getEmbeddedPicture: Call to getEmbeddedPicture failed.");
+ ALOGE("getEmbeddedPicture: Call to getEmbeddedPicture failed.");
return NULL;
}
@@ -330,7 +330,7 @@ static jbyteArray android_media_MediaMetadataRetriever_getEmbeddedPicture(
char* data = (char*) mediaAlbumArt + sizeof(MediaAlbumArt);
jbyteArray array = env->NewByteArray(len);
if (!array) { // OutOfMemoryError exception has already been thrown.
- LOGE("getEmbeddedPicture: OutOfMemoryError is thrown.");
+ ALOGE("getEmbeddedPicture: OutOfMemoryError is thrown.");
} else {
jbyte* bytes = env->GetByteArrayElements(array, NULL);
if (bytes != NULL) {
diff --git a/media/jni/android_media_MediaPlayer.cpp b/media/jni/android_media_MediaPlayer.cpp
index 39f470f..39fd9a9 100644
--- a/media/jni/android_media_MediaPlayer.cpp
+++ b/media/jni/android_media_MediaPlayer.cpp
@@ -80,7 +80,7 @@ JNIMediaPlayerListener::JNIMediaPlayerListener(JNIEnv* env, jobject thiz, jobjec
// that posts events to the application thread.
jclass clazz = env->GetObjectClass(thiz);
if (clazz == NULL) {
- LOGE("Can't find android/media/MediaPlayer");
+ ALOGE("Can't find android/media/MediaPlayer");
jniThrowException(env, "java/lang/Exception", NULL);
return;
}
@@ -405,7 +405,7 @@ android_media_MediaPlayer_getVideoWidth(JNIEnv *env, jobject thiz)
}
int w;
if (0 != mp->getVideoWidth(&w)) {
- LOGE("getVideoWidth failed");
+ ALOGE("getVideoWidth failed");
w = 0;
}
ALOGV("getVideoWidth: %d", w);
@@ -422,7 +422,7 @@ android_media_MediaPlayer_getVideoHeight(JNIEnv *env, jobject thiz)
}
int h;
if (0 != mp->getVideoHeight(&h)) {
- LOGE("getVideoHeight failed");
+ ALOGE("getVideoHeight failed");
h = 0;
}
ALOGV("getVideoHeight: %d", h);
@@ -826,58 +826,58 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved)
jint result = -1;
if (vm->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK) {
- LOGE("ERROR: GetEnv failed\n");
+ ALOGE("ERROR: GetEnv failed\n");
goto bail;
}
assert(env != NULL);
if (register_android_media_MediaPlayer(env) < 0) {
- LOGE("ERROR: MediaPlayer native registration failed\n");
+ ALOGE("ERROR: MediaPlayer native registration failed\n");
goto bail;
}
if (register_android_media_MediaRecorder(env) < 0) {
- LOGE("ERROR: MediaRecorder native registration failed\n");
+ ALOGE("ERROR: MediaRecorder native registration failed\n");
goto bail;
}
if (register_android_media_MediaScanner(env) < 0) {
- LOGE("ERROR: MediaScanner native registration failed\n");
+ ALOGE("ERROR: MediaScanner native registration failed\n");
goto bail;
}
if (register_android_media_MediaMetadataRetriever(env) < 0) {
- LOGE("ERROR: MediaMetadataRetriever native registration failed\n");
+ ALOGE("ERROR: MediaMetadataRetriever native registration failed\n");
goto bail;
}
if (register_android_media_AmrInputStream(env) < 0) {
- LOGE("ERROR: AmrInputStream native registration failed\n");
+ ALOGE("ERROR: AmrInputStream native registration failed\n");
goto bail;
}
if (register_android_media_ResampleInputStream(env) < 0) {
- LOGE("ERROR: ResampleInputStream native registration failed\n");
+ ALOGE("ERROR: ResampleInputStream native registration failed\n");
goto bail;
}
if (register_android_media_MediaProfiles(env) < 0) {
- LOGE("ERROR: MediaProfiles native registration failed");
+ ALOGE("ERROR: MediaProfiles native registration failed");
goto bail;
}
if (register_android_mtp_MtpDatabase(env) < 0) {
- LOGE("ERROR: MtpDatabase native registration failed");
+ ALOGE("ERROR: MtpDatabase native registration failed");
goto bail;
}
if (register_android_mtp_MtpDevice(env) < 0) {
- LOGE("ERROR: MtpDevice native registration failed");
+ ALOGE("ERROR: MtpDevice native registration failed");
goto bail;
}
if (register_android_mtp_MtpServer(env) < 0) {
- LOGE("ERROR: MtpServer native registration failed");
+ ALOGE("ERROR: MtpServer native registration failed");
goto bail;
}
diff --git a/media/jni/android_media_MediaRecorder.cpp b/media/jni/android_media_MediaRecorder.cpp
index 3fc75ed..acc65f1 100644
--- a/media/jni/android_media_MediaRecorder.cpp
+++ b/media/jni/android_media_MediaRecorder.cpp
@@ -77,7 +77,7 @@ JNIMediaRecorderListener::JNIMediaRecorderListener(JNIEnv* env, jobject thiz, jo
// that posts events to the application thread.
jclass clazz = env->GetObjectClass(thiz);
if (clazz == NULL) {
- LOGE("Can't find android/media/MediaRecorder");
+ ALOGE("Can't find android/media/MediaRecorder");
jniThrowException(env, "java/lang/Exception", NULL);
return;
}
@@ -229,7 +229,7 @@ android_media_MediaRecorder_setParameter(JNIEnv *env, jobject thiz, jstring para
ALOGV("setParameter()");
if (params == NULL)
{
- LOGE("Invalid or empty params string. This parameter will be ignored.");
+ ALOGE("Invalid or empty params string. This parameter will be ignored.");
return;
}
@@ -238,7 +238,7 @@ android_media_MediaRecorder_setParameter(JNIEnv *env, jobject thiz, jstring para
const char* params8 = env->GetStringUTFChars(params, NULL);
if (params8 == NULL)
{
- LOGE("Failed to covert jstring to String8. This parameter will be ignored.");
+ ALOGE("Failed to covert jstring to String8. This parameter will be ignored.");
return;
}
@@ -323,7 +323,7 @@ android_media_MediaRecorder_prepare(JNIEnv *env, jobject thiz)
// The application may misbehave and
// the preview surface becomes unavailable
if (native_surface.get() == 0) {
- LOGE("Application lost the surface");
+ ALOGE("Application lost the surface");
jniThrowException(env, "java/io/IOException", "invalid preview surface");
return;
}
diff --git a/media/jni/android_media_MediaScanner.cpp b/media/jni/android_media_MediaScanner.cpp
index 67c85cc..5d27966 100644
--- a/media/jni/android_media_MediaScanner.cpp
+++ b/media/jni/android_media_MediaScanner.cpp
@@ -48,7 +48,7 @@ static fields_t fields;
static status_t checkAndClearExceptionFromCallback(JNIEnv* env, const char* methodName) {
if (env->ExceptionCheck()) {
- LOGE("An exception was thrown by callback '%s'.", methodName);
+ ALOGE("An exception was thrown by callback '%s'.", methodName);
LOGE_EX(env);
env->ExceptionClear();
return UNKNOWN_ERROR;
@@ -118,7 +118,7 @@ public:
env->FindClass(kClassMediaScannerClient);
if (mediaScannerClientInterface == NULL) {
- LOGE("Class %s not found", kClassMediaScannerClient);
+ ALOGE("Class %s not found", kClassMediaScannerClient);
} else {
mScanFileMethodID = env->GetMethodID(
mediaScannerClientInterface,
@@ -257,7 +257,7 @@ android_media_MediaScanner_processDirectory(
MyMediaScannerClient myClient(env, client);
MediaScanResult result = mp->processDirectory(pathStr, myClient);
if (result == MEDIA_SCAN_RESULT_ERROR) {
- LOGE("An error occurred while scanning directory '%s'.", pathStr);
+ ALOGE("An error occurred while scanning directory '%s'.", pathStr);
}
env->ReleaseStringUTFChars(path, pathStr);
}
@@ -297,7 +297,7 @@ android_media_MediaScanner_processFile(
MyMediaScannerClient myClient(env, client);
MediaScanResult result = mp->processFile(pathStr, mimeTypeStr, myClient);
if (result == MEDIA_SCAN_RESULT_ERROR) {
- LOGE("An error occurred while scanning file '%s'.", pathStr);
+ ALOGE("An error occurred while scanning file '%s'.", pathStr);
}
env->ReleaseStringUTFChars(path, pathStr);
if (mimeType) {
diff --git a/media/jni/android_media_Utils.cpp b/media/jni/android_media_Utils.cpp
index 27e46a4..47963b1 100644
--- a/media/jni/android_media_Utils.cpp
+++ b/media/jni/android_media_Utils.cpp
@@ -39,7 +39,7 @@ bool ConvertKeyValueArraysToKeyedVector(
}
if (failed) {
- LOGE("keys and values arrays have different length");
+ ALOGE("keys and values arrays have different length");
jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
return false;
}
diff --git a/media/jni/android_mtp_MtpDatabase.cpp b/media/jni/android_mtp_MtpDatabase.cpp
index 4dbcb90..99e543b 100644
--- a/media/jni/android_mtp_MtpDatabase.cpp
+++ b/media/jni/android_mtp_MtpDatabase.cpp
@@ -174,7 +174,7 @@ public:
static void checkAndClearExceptionFromCallback(JNIEnv* env, const char* methodName) {
if (env->ExceptionCheck()) {
- LOGE("An exception was thrown by callback '%s'.", methodName);
+ ALOGE("An exception was thrown by callback '%s'.", methodName);
LOGE_EX(env);
env->ExceptionClear();
}
@@ -439,7 +439,7 @@ MtpResponseCode MyMtpDatabase::getObjectPropertyValue(MtpObjectHandle handle,
break;
}
default:
- LOGE("unsupported type in getObjectPropertyValue\n");
+ ALOGE("unsupported type in getObjectPropertyValue\n");
result = MTP_RESPONSE_INVALID_OBJECT_PROP_FORMAT;
}
out:
@@ -508,7 +508,7 @@ MtpResponseCode MyMtpDatabase::setObjectPropertyValue(MtpObjectHandle handle,
break;
}
default:
- LOGE("unsupported type in getObjectPropertyValue\n");
+ ALOGE("unsupported type in getObjectPropertyValue\n");
return MTP_RESPONSE_INVALID_OBJECT_PROP_FORMAT;
}
@@ -579,7 +579,7 @@ MtpResponseCode MyMtpDatabase::getDevicePropertyValue(MtpDeviceProperty property
break;
}
default:
- LOGE("unsupported type in getDevicePropertyValue\n");
+ ALOGE("unsupported type in getDevicePropertyValue\n");
return MTP_RESPONSE_INVALID_DEVICE_PROP_FORMAT;
}
@@ -631,7 +631,7 @@ MtpResponseCode MyMtpDatabase::setDevicePropertyValue(MtpDeviceProperty property
break;
}
default:
- LOGE("unsupported type in setDevicePropertyValue\n");
+ ALOGE("unsupported type in setDevicePropertyValue\n");
return MTP_RESPONSE_INVALID_OBJECT_PROP_FORMAT;
}
@@ -724,7 +724,7 @@ MtpResponseCode MyMtpDatabase::getObjectPropertyList(MtpObjectHandle handle,
break;
}
default:
- LOGE("bad or unsupported data type in MyMtpDatabase::getObjectPropertyList");
+ ALOGE("bad or unsupported data type in MyMtpDatabase::getObjectPropertyList");
break;
}
}
@@ -957,7 +957,7 @@ MtpResponseCode MyMtpDatabase::setObjectReferences(MtpObjectHandle handle,
int count = references->size();
jintArray array = env->NewIntArray(count);
if (!array) {
- LOGE("out of memory in setObjectReferences");
+ ALOGE("out of memory in setObjectReferences");
return false;
}
jint* handles = env->GetIntArrayElements(array, 0);
@@ -1044,7 +1044,7 @@ MtpProperty* MyMtpDatabase::getDevicePropertyDesc(MtpDeviceProperty property) {
result->setDefaultValue(str);
env->ReleaseCharArrayElements(mStringBuffer, str, 0);
} else {
- LOGE("unable to read device property, response: %04X", ret);
+ ALOGE("unable to read device property, response: %04X", ret);
}
break;
}
@@ -1113,151 +1113,151 @@ int register_android_mtp_MtpDatabase(JNIEnv *env)
clazz = env->FindClass("android/mtp/MtpDatabase");
if (clazz == NULL) {
- LOGE("Can't find android/mtp/MtpDatabase");
+ ALOGE("Can't find android/mtp/MtpDatabase");
return -1;
}
method_beginSendObject = env->GetMethodID(clazz, "beginSendObject", "(Ljava/lang/String;IIIJJ)I");
if (method_beginSendObject == NULL) {
- LOGE("Can't find beginSendObject");
+ ALOGE("Can't find beginSendObject");
return -1;
}
method_endSendObject = env->GetMethodID(clazz, "endSendObject", "(Ljava/lang/String;IIZ)V");
if (method_endSendObject == NULL) {
- LOGE("Can't find endSendObject");
+ ALOGE("Can't find endSendObject");
return -1;
}
method_getObjectList = env->GetMethodID(clazz, "getObjectList", "(III)[I");
if (method_getObjectList == NULL) {
- LOGE("Can't find getObjectList");
+ ALOGE("Can't find getObjectList");
return -1;
}
method_getNumObjects = env->GetMethodID(clazz, "getNumObjects", "(III)I");
if (method_getNumObjects == NULL) {
- LOGE("Can't find getNumObjects");
+ ALOGE("Can't find getNumObjects");
return -1;
}
method_getSupportedPlaybackFormats = env->GetMethodID(clazz, "getSupportedPlaybackFormats", "()[I");
if (method_getSupportedPlaybackFormats == NULL) {
- LOGE("Can't find getSupportedPlaybackFormats");
+ ALOGE("Can't find getSupportedPlaybackFormats");
return -1;
}
method_getSupportedCaptureFormats = env->GetMethodID(clazz, "getSupportedCaptureFormats", "()[I");
if (method_getSupportedCaptureFormats == NULL) {
- LOGE("Can't find getSupportedCaptureFormats");
+ ALOGE("Can't find getSupportedCaptureFormats");
return -1;
}
method_getSupportedObjectProperties = env->GetMethodID(clazz, "getSupportedObjectProperties", "(I)[I");
if (method_getSupportedObjectProperties == NULL) {
- LOGE("Can't find getSupportedObjectProperties");
+ ALOGE("Can't find getSupportedObjectProperties");
return -1;
}
method_getSupportedDeviceProperties = env->GetMethodID(clazz, "getSupportedDeviceProperties", "()[I");
if (method_getSupportedDeviceProperties == NULL) {
- LOGE("Can't find getSupportedDeviceProperties");
+ ALOGE("Can't find getSupportedDeviceProperties");
return -1;
}
method_setObjectProperty = env->GetMethodID(clazz, "setObjectProperty", "(IIJLjava/lang/String;)I");
if (method_setObjectProperty == NULL) {
- LOGE("Can't find setObjectProperty");
+ ALOGE("Can't find setObjectProperty");
return -1;
}
method_getDeviceProperty = env->GetMethodID(clazz, "getDeviceProperty", "(I[J[C)I");
if (method_getDeviceProperty == NULL) {
- LOGE("Can't find getDeviceProperty");
+ ALOGE("Can't find getDeviceProperty");
return -1;
}
method_setDeviceProperty = env->GetMethodID(clazz, "setDeviceProperty", "(IJLjava/lang/String;)I");
if (method_setDeviceProperty == NULL) {
- LOGE("Can't find setDeviceProperty");
+ ALOGE("Can't find setDeviceProperty");
return -1;
}
method_getObjectPropertyList = env->GetMethodID(clazz, "getObjectPropertyList",
"(JIJII)Landroid/mtp/MtpPropertyList;");
if (method_getObjectPropertyList == NULL) {
- LOGE("Can't find getObjectPropertyList");
+ ALOGE("Can't find getObjectPropertyList");
return -1;
}
method_getObjectInfo = env->GetMethodID(clazz, "getObjectInfo", "(I[I[C[J)Z");
if (method_getObjectInfo == NULL) {
- LOGE("Can't find getObjectInfo");
+ ALOGE("Can't find getObjectInfo");
return -1;
}
method_getObjectFilePath = env->GetMethodID(clazz, "getObjectFilePath", "(I[C[J)I");
if (method_getObjectFilePath == NULL) {
- LOGE("Can't find getObjectFilePath");
+ ALOGE("Can't find getObjectFilePath");
return -1;
}
method_deleteFile = env->GetMethodID(clazz, "deleteFile", "(I)I");
if (method_deleteFile == NULL) {
- LOGE("Can't find deleteFile");
+ ALOGE("Can't find deleteFile");
return -1;
}
method_getObjectReferences = env->GetMethodID(clazz, "getObjectReferences", "(I)[I");
if (method_getObjectReferences == NULL) {
- LOGE("Can't find getObjectReferences");
+ ALOGE("Can't find getObjectReferences");
return -1;
}
method_setObjectReferences = env->GetMethodID(clazz, "setObjectReferences", "(I[I)I");
if (method_setObjectReferences == NULL) {
- LOGE("Can't find setObjectReferences");
+ ALOGE("Can't find setObjectReferences");
return -1;
}
method_sessionStarted = env->GetMethodID(clazz, "sessionStarted", "()V");
if (method_sessionStarted == NULL) {
- LOGE("Can't find sessionStarted");
+ ALOGE("Can't find sessionStarted");
return -1;
}
method_sessionEnded = env->GetMethodID(clazz, "sessionEnded", "()V");
if (method_sessionEnded == NULL) {
- LOGE("Can't find sessionEnded");
+ ALOGE("Can't find sessionEnded");
return -1;
}
field_context = env->GetFieldID(clazz, "mNativeContext", "I");
if (field_context == NULL) {
- LOGE("Can't find MtpDatabase.mNativeContext");
+ ALOGE("Can't find MtpDatabase.mNativeContext");
return -1;
}
// now set up fields for MtpPropertyList class
clazz = env->FindClass("android/mtp/MtpPropertyList");
if (clazz == NULL) {
- LOGE("Can't find android/mtp/MtpPropertyList");
+ ALOGE("Can't find android/mtp/MtpPropertyList");
return -1;
}
field_mCount = env->GetFieldID(clazz, "mCount", "I");
if (field_mCount == NULL) {
- LOGE("Can't find MtpPropertyList.mCount");
+ ALOGE("Can't find MtpPropertyList.mCount");
return -1;
}
field_mResult = env->GetFieldID(clazz, "mResult", "I");
if (field_mResult == NULL) {
- LOGE("Can't find MtpPropertyList.mResult");
+ ALOGE("Can't find MtpPropertyList.mResult");
return -1;
}
field_mObjectHandles = env->GetFieldID(clazz, "mObjectHandles", "[I");
if (field_mObjectHandles == NULL) {
- LOGE("Can't find MtpPropertyList.mObjectHandles");
+ ALOGE("Can't find MtpPropertyList.mObjectHandles");
return -1;
}
field_mPropertyCodes = env->GetFieldID(clazz, "mPropertyCodes", "[I");
if (field_mPropertyCodes == NULL) {
- LOGE("Can't find MtpPropertyList.mPropertyCodes");
+ ALOGE("Can't find MtpPropertyList.mPropertyCodes");
return -1;
}
field_mDataTypes = env->GetFieldID(clazz, "mDataTypes", "[I");
if (field_mDataTypes == NULL) {
- LOGE("Can't find MtpPropertyList.mDataTypes");
+ ALOGE("Can't find MtpPropertyList.mDataTypes");
return -1;
}
field_mLongValues = env->GetFieldID(clazz, "mLongValues", "[J");
if (field_mLongValues == NULL) {
- LOGE("Can't find MtpPropertyList.mLongValues");
+ ALOGE("Can't find MtpPropertyList.mLongValues");
return -1;
}
field_mStringValues = env->GetFieldID(clazz, "mStringValues", "[Ljava/lang/String;");
if (field_mStringValues == NULL) {
- LOGE("Can't find MtpPropertyList.mStringValues");
+ ALOGE("Can't find MtpPropertyList.mStringValues");
return -1;
}
diff --git a/media/jni/android_mtp_MtpDevice.cpp b/media/jni/android_mtp_MtpDevice.cpp
index c71410b..113784e 100644
--- a/media/jni/android_mtp_MtpDevice.cpp
+++ b/media/jni/android_mtp_MtpDevice.cpp
@@ -92,7 +92,7 @@ MtpDevice* get_device_from_object(JNIEnv* env, jobject javaDevice)
static void checkAndClearExceptionFromCallback(JNIEnv* env, const char* methodName) {
if (env->ExceptionCheck()) {
- LOGE("An exception was thrown by callback '%s'.", methodName);
+ ALOGE("An exception was thrown by callback '%s'.", methodName);
LOGE_EX(env);
env->ExceptionClear();
}
@@ -142,7 +142,7 @@ android_mtp_MtpDevice_get_device_info(JNIEnv *env, jobject thiz)
}
jobject info = env->NewObject(clazz_deviceInfo, constructor_deviceInfo);
if (info == NULL) {
- LOGE("Could not create a MtpDeviceInfo object");
+ ALOGE("Could not create a MtpDeviceInfo object");
delete deviceInfo;
return NULL;
}
@@ -195,7 +195,7 @@ android_mtp_MtpDevice_get_storage_info(JNIEnv *env, jobject thiz, jint storageID
jobject info = env->NewObject(clazz_storageInfo, constructor_storageInfo);
if (info == NULL) {
- LOGE("Could not create a MtpStorageInfo object");
+ ALOGE("Could not create a MtpStorageInfo object");
delete storageInfo;
return NULL;
}
@@ -248,7 +248,7 @@ android_mtp_MtpDevice_get_object_info(JNIEnv *env, jobject thiz, jint objectID)
return NULL;
jobject info = env->NewObject(clazz_objectInfo, constructor_objectInfo);
if (info == NULL) {
- LOGE("Could not create a MtpObjectInfo object");
+ ALOGE("Could not create a MtpObjectInfo object");
delete objectInfo;
return NULL;
}
@@ -433,193 +433,193 @@ int register_android_mtp_MtpDevice(JNIEnv *env)
clazz = env->FindClass("android/mtp/MtpDeviceInfo");
if (clazz == NULL) {
- LOGE("Can't find android/mtp/MtpDeviceInfo");
+ ALOGE("Can't find android/mtp/MtpDeviceInfo");
return -1;
}
constructor_deviceInfo = env->GetMethodID(clazz, "<init>", "()V");
if (constructor_deviceInfo == NULL) {
- LOGE("Can't find android/mtp/MtpDeviceInfo constructor");
+ ALOGE("Can't find android/mtp/MtpDeviceInfo constructor");
return -1;
}
field_deviceInfo_manufacturer = env->GetFieldID(clazz, "mManufacturer", "Ljava/lang/String;");
if (field_deviceInfo_manufacturer == NULL) {
- LOGE("Can't find MtpDeviceInfo.mManufacturer");
+ ALOGE("Can't find MtpDeviceInfo.mManufacturer");
return -1;
}
field_deviceInfo_model = env->GetFieldID(clazz, "mModel", "Ljava/lang/String;");
if (field_deviceInfo_model == NULL) {
- LOGE("Can't find MtpDeviceInfo.mModel");
+ ALOGE("Can't find MtpDeviceInfo.mModel");
return -1;
}
field_deviceInfo_version = env->GetFieldID(clazz, "mVersion", "Ljava/lang/String;");
if (field_deviceInfo_version == NULL) {
- LOGE("Can't find MtpDeviceInfo.mVersion");
+ ALOGE("Can't find MtpDeviceInfo.mVersion");
return -1;
}
field_deviceInfo_serialNumber = env->GetFieldID(clazz, "mSerialNumber", "Ljava/lang/String;");
if (field_deviceInfo_serialNumber == NULL) {
- LOGE("Can't find MtpDeviceInfo.mSerialNumber");
+ ALOGE("Can't find MtpDeviceInfo.mSerialNumber");
return -1;
}
clazz_deviceInfo = (jclass)env->NewGlobalRef(clazz);
clazz = env->FindClass("android/mtp/MtpStorageInfo");
if (clazz == NULL) {
- LOGE("Can't find android/mtp/MtpStorageInfo");
+ ALOGE("Can't find android/mtp/MtpStorageInfo");
return -1;
}
constructor_storageInfo = env->GetMethodID(clazz, "<init>", "()V");
if (constructor_storageInfo == NULL) {
- LOGE("Can't find android/mtp/MtpStorageInfo constructor");
+ ALOGE("Can't find android/mtp/MtpStorageInfo constructor");
return -1;
}
field_storageInfo_storageId = env->GetFieldID(clazz, "mStorageId", "I");
if (field_storageInfo_storageId == NULL) {
- LOGE("Can't find MtpStorageInfo.mStorageId");
+ ALOGE("Can't find MtpStorageInfo.mStorageId");
return -1;
}
field_storageInfo_maxCapacity = env->GetFieldID(clazz, "mMaxCapacity", "J");
if (field_storageInfo_maxCapacity == NULL) {
- LOGE("Can't find MtpStorageInfo.mMaxCapacity");
+ ALOGE("Can't find MtpStorageInfo.mMaxCapacity");
return -1;
}
field_storageInfo_freeSpace = env->GetFieldID(clazz, "mFreeSpace", "J");
if (field_storageInfo_freeSpace == NULL) {
- LOGE("Can't find MtpStorageInfo.mFreeSpace");
+ ALOGE("Can't find MtpStorageInfo.mFreeSpace");
return -1;
}
field_storageInfo_description = env->GetFieldID(clazz, "mDescription", "Ljava/lang/String;");
if (field_storageInfo_description == NULL) {
- LOGE("Can't find MtpStorageInfo.mDescription");
+ ALOGE("Can't find MtpStorageInfo.mDescription");
return -1;
}
field_storageInfo_volumeIdentifier = env->GetFieldID(clazz, "mVolumeIdentifier", "Ljava/lang/String;");
if (field_storageInfo_volumeIdentifier == NULL) {
- LOGE("Can't find MtpStorageInfo.mVolumeIdentifier");
+ ALOGE("Can't find MtpStorageInfo.mVolumeIdentifier");
return -1;
}
clazz_storageInfo = (jclass)env->NewGlobalRef(clazz);
clazz = env->FindClass("android/mtp/MtpObjectInfo");
if (clazz == NULL) {
- LOGE("Can't find android/mtp/MtpObjectInfo");
+ ALOGE("Can't find android/mtp/MtpObjectInfo");
return -1;
}
constructor_objectInfo = env->GetMethodID(clazz, "<init>", "()V");
if (constructor_objectInfo == NULL) {
- LOGE("Can't find android/mtp/MtpObjectInfo constructor");
+ ALOGE("Can't find android/mtp/MtpObjectInfo constructor");
return -1;
}
field_objectInfo_handle = env->GetFieldID(clazz, "mHandle", "I");
if (field_objectInfo_handle == NULL) {
- LOGE("Can't find MtpObjectInfo.mHandle");
+ ALOGE("Can't find MtpObjectInfo.mHandle");
return -1;
}
field_objectInfo_storageId = env->GetFieldID(clazz, "mStorageId", "I");
if (field_objectInfo_storageId == NULL) {
- LOGE("Can't find MtpObjectInfo.mStorageId");
+ ALOGE("Can't find MtpObjectInfo.mStorageId");
return -1;
}
field_objectInfo_format = env->GetFieldID(clazz, "mFormat", "I");
if (field_objectInfo_format == NULL) {
- LOGE("Can't find MtpObjectInfo.mFormat");
+ ALOGE("Can't find MtpObjectInfo.mFormat");
return -1;
}
field_objectInfo_protectionStatus = env->GetFieldID(clazz, "mProtectionStatus", "I");
if (field_objectInfo_protectionStatus == NULL) {
- LOGE("Can't find MtpObjectInfo.mProtectionStatus");
+ ALOGE("Can't find MtpObjectInfo.mProtectionStatus");
return -1;
}
field_objectInfo_compressedSize = env->GetFieldID(clazz, "mCompressedSize", "I");
if (field_objectInfo_compressedSize == NULL) {
- LOGE("Can't find MtpObjectInfo.mCompressedSize");
+ ALOGE("Can't find MtpObjectInfo.mCompressedSize");
return -1;
}
field_objectInfo_thumbFormat = env->GetFieldID(clazz, "mThumbFormat", "I");
if (field_objectInfo_thumbFormat == NULL) {
- LOGE("Can't find MtpObjectInfo.mThumbFormat");
+ ALOGE("Can't find MtpObjectInfo.mThumbFormat");
return -1;
}
field_objectInfo_thumbCompressedSize = env->GetFieldID(clazz, "mThumbCompressedSize", "I");
if (field_objectInfo_thumbCompressedSize == NULL) {
- LOGE("Can't find MtpObjectInfo.mThumbCompressedSize");
+ ALOGE("Can't find MtpObjectInfo.mThumbCompressedSize");
return -1;
}
field_objectInfo_thumbPixWidth = env->GetFieldID(clazz, "mThumbPixWidth", "I");
if (field_objectInfo_thumbPixWidth == NULL) {
- LOGE("Can't find MtpObjectInfo.mThumbPixWidth");
+ ALOGE("Can't find MtpObjectInfo.mThumbPixWidth");
return -1;
}
field_objectInfo_thumbPixHeight = env->GetFieldID(clazz, "mThumbPixHeight", "I");
if (field_objectInfo_thumbPixHeight == NULL) {
- LOGE("Can't find MtpObjectInfo.mThumbPixHeight");
+ ALOGE("Can't find MtpObjectInfo.mThumbPixHeight");
return -1;
}
field_objectInfo_imagePixWidth = env->GetFieldID(clazz, "mImagePixWidth", "I");
if (field_objectInfo_imagePixWidth == NULL) {
- LOGE("Can't find MtpObjectInfo.mImagePixWidth");
+ ALOGE("Can't find MtpObjectInfo.mImagePixWidth");
return -1;
}
field_objectInfo_imagePixHeight = env->GetFieldID(clazz, "mImagePixHeight", "I");
if (field_objectInfo_imagePixHeight == NULL) {
- LOGE("Can't find MtpObjectInfo.mImagePixHeight");
+ ALOGE("Can't find MtpObjectInfo.mImagePixHeight");
return -1;
}
field_objectInfo_imagePixDepth = env->GetFieldID(clazz, "mImagePixDepth", "I");
if (field_objectInfo_imagePixDepth == NULL) {
- LOGE("Can't find MtpObjectInfo.mImagePixDepth");
+ ALOGE("Can't find MtpObjectInfo.mImagePixDepth");
return -1;
}
field_objectInfo_parent = env->GetFieldID(clazz, "mParent", "I");
if (field_objectInfo_parent == NULL) {
- LOGE("Can't find MtpObjectInfo.mParent");
+ ALOGE("Can't find MtpObjectInfo.mParent");
return -1;
}
field_objectInfo_associationType = env->GetFieldID(clazz, "mAssociationType", "I");
if (field_objectInfo_associationType == NULL) {
- LOGE("Can't find MtpObjectInfo.mAssociationType");
+ ALOGE("Can't find MtpObjectInfo.mAssociationType");
return -1;
}
field_objectInfo_associationDesc = env->GetFieldID(clazz, "mAssociationDesc", "I");
if (field_objectInfo_associationDesc == NULL) {
- LOGE("Can't find MtpObjectInfo.mAssociationDesc");
+ ALOGE("Can't find MtpObjectInfo.mAssociationDesc");
return -1;
}
field_objectInfo_sequenceNumber = env->GetFieldID(clazz, "mSequenceNumber", "I");
if (field_objectInfo_sequenceNumber == NULL) {
- LOGE("Can't find MtpObjectInfo.mSequenceNumber");
+ ALOGE("Can't find MtpObjectInfo.mSequenceNumber");
return -1;
}
field_objectInfo_name = env->GetFieldID(clazz, "mName", "Ljava/lang/String;");
if (field_objectInfo_name == NULL) {
- LOGE("Can't find MtpObjectInfo.mName");
+ ALOGE("Can't find MtpObjectInfo.mName");
return -1;
}
field_objectInfo_dateCreated = env->GetFieldID(clazz, "mDateCreated", "J");
if (field_objectInfo_dateCreated == NULL) {
- LOGE("Can't find MtpObjectInfo.mDateCreated");
+ ALOGE("Can't find MtpObjectInfo.mDateCreated");
return -1;
}
field_objectInfo_dateModified = env->GetFieldID(clazz, "mDateModified", "J");
if (field_objectInfo_dateModified == NULL) {
- LOGE("Can't find MtpObjectInfo.mDateModified");
+ ALOGE("Can't find MtpObjectInfo.mDateModified");
return -1;
}
field_objectInfo_keywords = env->GetFieldID(clazz, "mKeywords", "Ljava/lang/String;");
if (field_objectInfo_keywords == NULL) {
- LOGE("Can't find MtpObjectInfo.mKeywords");
+ ALOGE("Can't find MtpObjectInfo.mKeywords");
return -1;
}
clazz_objectInfo = (jclass)env->NewGlobalRef(clazz);
clazz = env->FindClass("android/mtp/MtpDevice");
if (clazz == NULL) {
- LOGE("Can't find android/mtp/MtpDevice");
+ ALOGE("Can't find android/mtp/MtpDevice");
return -1;
}
field_context = env->GetFieldID(clazz, "mNativeContext", "I");
if (field_context == NULL) {
- LOGE("Can't find MtpDevice.mNativeContext");
+ ALOGE("Can't find MtpDevice.mNativeContext");
return -1;
}
diff --git a/media/jni/android_mtp_MtpServer.cpp b/media/jni/android_mtp_MtpServer.cpp
index 107db08..5252a3a 100644
--- a/media/jni/android_mtp_MtpServer.cpp
+++ b/media/jni/android_mtp_MtpServer.cpp
@@ -65,7 +65,7 @@ android_mtp_MtpServer_setup(JNIEnv *env, jobject thiz, jobject javaDatabase, jbo
usePtp, AID_MEDIA_RW, 0664, 0775);
env->SetIntField(thiz, field_MtpServer_nativeContext, (int)server);
} else {
- LOGE("could not open MTP driver, errno: %d", errno);
+ ALOGE("could not open MTP driver, errno: %d", errno);
}
}
@@ -76,7 +76,7 @@ android_mtp_MtpServer_run(JNIEnv *env, jobject thiz)
if (server)
server->run();
else
- LOGE("server is null in run");
+ ALOGE("server is null in run");
}
static void
@@ -89,7 +89,7 @@ android_mtp_MtpServer_cleanup(JNIEnv *env, jobject thiz)
delete server;
env->SetIntField(thiz, field_MtpServer_nativeContext, 0);
} else {
- LOGE("server is null in cleanup");
+ ALOGE("server is null in cleanup");
}
}
@@ -102,7 +102,7 @@ android_mtp_MtpServer_send_object_added(JNIEnv *env, jobject thiz, jint handle)
if (server)
server->sendObjectAdded(handle);
else
- LOGE("server is null in send_object_added");
+ ALOGE("server is null in send_object_added");
}
static void
@@ -114,7 +114,7 @@ android_mtp_MtpServer_send_object_removed(JNIEnv *env, jobject thiz, jint handle
if (server)
server->sendObjectRemoved(handle);
else
- LOGE("server is null in send_object_removed");
+ ALOGE("server is null in send_object_removed");
}
static void
@@ -145,7 +145,7 @@ android_mtp_MtpServer_add_storage(JNIEnv *env, jobject thiz, jobject jstorage)
}
}
} else {
- LOGE("server is null in add_storage");
+ ALOGE("server is null in add_storage");
}
}
@@ -162,7 +162,7 @@ android_mtp_MtpServer_remove_storage(JNIEnv *env, jobject thiz, jint storageId)
delete storage;
}
} else
- LOGE("server is null in remove_storage");
+ ALOGE("server is null in remove_storage");
}
// ----------------------------------------------------------------------------
@@ -187,48 +187,48 @@ int register_android_mtp_MtpServer(JNIEnv *env)
clazz = env->FindClass("android/mtp/MtpStorage");
if (clazz == NULL) {
- LOGE("Can't find android/mtp/MtpStorage");
+ ALOGE("Can't find android/mtp/MtpStorage");
return -1;
}
field_MtpStorage_storageId = env->GetFieldID(clazz, "mStorageId", "I");
if (field_MtpStorage_storageId == NULL) {
- LOGE("Can't find MtpStorage.mStorageId");
+ ALOGE("Can't find MtpStorage.mStorageId");
return -1;
}
field_MtpStorage_path = env->GetFieldID(clazz, "mPath", "Ljava/lang/String;");
if (field_MtpStorage_path == NULL) {
- LOGE("Can't find MtpStorage.mPath");
+ ALOGE("Can't find MtpStorage.mPath");
return -1;
}
field_MtpStorage_description = env->GetFieldID(clazz, "mDescription", "Ljava/lang/String;");
if (field_MtpStorage_description == NULL) {
- LOGE("Can't find MtpStorage.mDescription");
+ ALOGE("Can't find MtpStorage.mDescription");
return -1;
}
field_MtpStorage_reserveSpace = env->GetFieldID(clazz, "mReserveSpace", "J");
if (field_MtpStorage_reserveSpace == NULL) {
- LOGE("Can't find MtpStorage.mReserveSpace");
+ ALOGE("Can't find MtpStorage.mReserveSpace");
return -1;
}
field_MtpStorage_removable = env->GetFieldID(clazz, "mRemovable", "Z");
if (field_MtpStorage_removable == NULL) {
- LOGE("Can't find MtpStorage.mRemovable");
+ ALOGE("Can't find MtpStorage.mRemovable");
return -1;
}
field_MtpStorage_maxFileSize = env->GetFieldID(clazz, "mMaxFileSize", "J");
if (field_MtpStorage_maxFileSize == NULL) {
- LOGE("Can't find MtpStorage.mMaxFileSize");
+ ALOGE("Can't find MtpStorage.mMaxFileSize");
return -1;
}
clazz = env->FindClass("android/mtp/MtpServer");
if (clazz == NULL) {
- LOGE("Can't find android/mtp/MtpServer");
+ ALOGE("Can't find android/mtp/MtpServer");
return -1;
}
field_MtpServer_nativeContext = env->GetFieldID(clazz, "mNativeContext", "I");
if (field_MtpServer_nativeContext == NULL) {
- LOGE("Can't find MtpServer.mNativeContext");
+ ALOGE("Can't find MtpServer.mNativeContext");
return -1;
}
diff --git a/media/jni/audioeffect/android_media_AudioEffect.cpp b/media/jni/audioeffect/android_media_AudioEffect.cpp
index 0ce0277..3b325b7 100644
--- a/media/jni/audioeffect/android_media_AudioEffect.cpp
+++ b/media/jni/audioeffect/android_media_AudioEffect.cpp
@@ -149,7 +149,7 @@ static void effectCallback(int event, void* user, void *info) {
size = arg1 + p->vsize;
array = env->NewByteArray(size);
if (array == NULL) {
- LOGE("effectCallback: Couldn't allocate byte array for parameter data");
+ ALOGE("effectCallback: Couldn't allocate byte array for parameter data");
goto effectCallback_Exit;
}
bytes = env->GetByteArrayElements(array, NULL);
@@ -195,7 +195,7 @@ android_media_AudioEffect_native_init(JNIEnv *env)
// Get the AudioEffect class
jclass clazz = env->FindClass(kClassPathName);
if (clazz == NULL) {
- LOGE("Can't find %s", kClassPathName);
+ ALOGE("Can't find %s", kClassPathName);
return;
}
@@ -206,7 +206,7 @@ android_media_AudioEffect_native_init(JNIEnv *env)
fields.clazzEffect,
"postEventFromNative", "(Ljava/lang/Object;IIILjava/lang/Object;)V");
if (fields.midPostNativeEvent == NULL) {
- LOGE("Can't find AudioEffect.%s", "postEventFromNative");
+ ALOGE("Can't find AudioEffect.%s", "postEventFromNative");
return;
}
@@ -216,7 +216,7 @@ android_media_AudioEffect_native_init(JNIEnv *env)
fields.clazzEffect,
"mNativeAudioEffect", "I");
if (fields.fidNativeAudioEffect == NULL) {
- LOGE("Can't find AudioEffect.%s", "mNativeAudioEffect");
+ ALOGE("Can't find AudioEffect.%s", "mNativeAudioEffect");
return;
}
// fidJniData;
@@ -224,13 +224,13 @@ android_media_AudioEffect_native_init(JNIEnv *env)
fields.clazzEffect,
"mJniData", "I");
if (fields.fidJniData == NULL) {
- LOGE("Can't find AudioEffect.%s", "mJniData");
+ ALOGE("Can't find AudioEffect.%s", "mJniData");
return;
}
clazz = env->FindClass("android/media/audiofx/AudioEffect$Descriptor");
if (clazz == NULL) {
- LOGE("Can't find android/media/audiofx/AudioEffect$Descriptor class");
+ ALOGE("Can't find android/media/audiofx/AudioEffect$Descriptor class");
return;
}
fields.clazzDesc = (jclass)env->NewGlobalRef(clazz);
@@ -241,7 +241,7 @@ android_media_AudioEffect_native_init(JNIEnv *env)
"<init>",
"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V");
if (fields.midDescCstor == NULL) {
- LOGE("Can't find android/media/audiofx/AudioEffect$Descriptor class constructor");
+ ALOGE("Can't find android/media/audiofx/AudioEffect$Descriptor class constructor");
return;
}
}
@@ -290,7 +290,7 @@ android_media_AudioEffect_native_setup(JNIEnv *env, jobject thiz, jobject weak_t
lpJniStorage = new AudioEffectJniStorage();
if (lpJniStorage == NULL) {
- LOGE("setup: Error creating JNI Storage");
+ ALOGE("setup: Error creating JNI Storage");
goto setup_failure;
}
@@ -305,7 +305,7 @@ android_media_AudioEffect_native_setup(JNIEnv *env, jobject thiz, jobject weak_t
&lpJniStorage->mCallbackData);
if (jId == NULL) {
- LOGE("setup: NULL java array for id pointer");
+ ALOGE("setup: NULL java array for id pointer");
lStatus = AUDIOEFFECT_ERROR_BAD_VALUE;
goto setup_failure;
}
@@ -319,19 +319,19 @@ android_media_AudioEffect_native_setup(JNIEnv *env, jobject thiz, jobject weak_t
sessionId,
0);
if (lpAudioEffect == NULL) {
- LOGE("Error creating AudioEffect");
+ ALOGE("Error creating AudioEffect");
goto setup_failure;
}
lStatus = translateError(lpAudioEffect->initCheck());
if (lStatus != AUDIOEFFECT_SUCCESS && lStatus != AUDIOEFFECT_ERROR_ALREADY_EXISTS) {
- LOGE("AudioEffect initCheck failed %d", lStatus);
+ ALOGE("AudioEffect initCheck failed %d", lStatus);
goto setup_failure;
}
nId = (jint *) env->GetPrimitiveArrayCritical(jId, NULL);
if (nId == NULL) {
- LOGE("setup: Error retrieving id pointer");
+ ALOGE("setup: Error retrieving id pointer");
lStatus = AUDIOEFFECT_ERROR_BAD_VALUE;
goto setup_failure;
}
@@ -382,7 +382,7 @@ android_media_AudioEffect_native_setup(JNIEnv *env, jobject thiz, jobject weak_t
env->DeleteLocalRef(jdescName);
env->DeleteLocalRef(jdescImplementor);
if (jdesc == NULL) {
- LOGE("env->NewObject(fields.clazzDesc, fields.midDescCstor)");
+ ALOGE("env->NewObject(fields.clazzDesc, fields.midDescCstor)");
goto setup_failure;
}
@@ -534,14 +534,14 @@ static jint android_media_AudioEffect_native_setParameter(JNIEnv *env,
// get the pointer for the param from the java array
lpParam = (jbyte *) env->GetPrimitiveArrayCritical(pJavaParam, NULL);
if (lpParam == NULL) {
- LOGE("setParameter: Error retrieving param pointer");
+ ALOGE("setParameter: Error retrieving param pointer");
goto setParameter_Exit;
}
// get the pointer for the value from the java array
lpValue = (jbyte *) env->GetPrimitiveArrayCritical(pJavaValue, NULL);
if (lpValue == NULL) {
- LOGE("setParameter: Error retrieving value pointer");
+ ALOGE("setParameter: Error retrieving value pointer");
goto setParameter_Exit;
}
@@ -597,14 +597,14 @@ android_media_AudioEffect_native_getParameter(JNIEnv *env,
// get the pointer for the param from the java array
lpParam = (jbyte *) env->GetPrimitiveArrayCritical(pJavaParam, NULL);
if (lpParam == NULL) {
- LOGE("getParameter: Error retrieving param pointer");
+ ALOGE("getParameter: Error retrieving param pointer");
goto getParameter_Exit;
}
// get the pointer for the value from the java array
lpValue = (jbyte *) env->GetPrimitiveArrayCritical(pJavaValue, NULL);
if (lpValue == NULL) {
- LOGE("getParameter: Error retrieving value pointer");
+ ALOGE("getParameter: Error retrieving value pointer");
goto getParameter_Exit;
}
@@ -665,7 +665,7 @@ static jint android_media_AudioEffect_native_command(JNIEnv *env, jobject thiz,
if (cmdSize != 0) {
pCmdData = (jbyte *) env->GetPrimitiveArrayCritical(jCmdData, NULL);
if (pCmdData == NULL) {
- LOGE("setParameter: Error retrieving command pointer");
+ ALOGE("setParameter: Error retrieving command pointer");
goto command_Exit;
}
}
@@ -674,7 +674,7 @@ static jint android_media_AudioEffect_native_command(JNIEnv *env, jobject thiz,
if (replySize != 0 && jReplyData != NULL) {
pReplyData = (jbyte *) env->GetPrimitiveArrayCritical(jReplyData, NULL);
if (pReplyData == NULL) {
- LOGE("setParameter: Error retrieving reply pointer");
+ ALOGE("setParameter: Error retrieving reply pointer");
goto command_Exit;
}
}
@@ -759,7 +759,7 @@ android_media_AudioEffect_native_queryEffects(JNIEnv *env, jclass clazz)
env->DeleteLocalRef(jdescName);
env->DeleteLocalRef(jdescImplementor);
if (jdesc == NULL) {
- LOGE("env->NewObject(fields.clazzDesc, fields.midDescCstor)");
+ ALOGE("env->NewObject(fields.clazzDesc, fields.midDescCstor)");
goto queryEffects_failure;
}
@@ -847,7 +847,7 @@ android_media_AudioEffect_native_queryPreProcessings(JNIEnv *env, jclass clazz,
env->DeleteLocalRef(jdescName);
env->DeleteLocalRef(jdescImplementor);
if (jdesc == NULL) {
- LOGE("env->NewObject(fields.clazzDesc, fields.midDescCstor)");
+ ALOGE("env->NewObject(fields.clazzDesc, fields.midDescCstor)");
env->DeleteLocalRef(ret);
return NULL;;
}
@@ -895,18 +895,18 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved)
jint result = -1;
if (vm->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK) {
- LOGE("ERROR: GetEnv failed\n");
+ ALOGE("ERROR: GetEnv failed\n");
goto bail;
}
assert(env != NULL);
if (register_android_media_AudioEffect(env) < 0) {
- LOGE("ERROR: AudioEffect native registration failed\n");
+ ALOGE("ERROR: AudioEffect native registration failed\n");
goto bail;
}
if (register_android_media_visualizer(env) < 0) {
- LOGE("ERROR: Visualizer native registration failed\n");
+ ALOGE("ERROR: Visualizer native registration failed\n");
goto bail;
}
diff --git a/media/jni/audioeffect/android_media_Visualizer.cpp b/media/jni/audioeffect/android_media_Visualizer.cpp
index 53c90f3..ecd4d07 100644
--- a/media/jni/audioeffect/android_media_Visualizer.cpp
+++ b/media/jni/audioeffect/android_media_Visualizer.cpp
@@ -185,7 +185,7 @@ android_media_visualizer_native_init(JNIEnv *env)
// Get the Visualizer class
jclass clazz = env->FindClass(kClassPathName);
if (clazz == NULL) {
- LOGE("Can't find %s", kClassPathName);
+ ALOGE("Can't find %s", kClassPathName);
return;
}
@@ -196,7 +196,7 @@ android_media_visualizer_native_init(JNIEnv *env)
fields.clazzEffect,
"postEventFromNative", "(Ljava/lang/Object;IIILjava/lang/Object;)V");
if (fields.midPostNativeEvent == NULL) {
- LOGE("Can't find Visualizer.%s", "postEventFromNative");
+ ALOGE("Can't find Visualizer.%s", "postEventFromNative");
return;
}
@@ -206,7 +206,7 @@ android_media_visualizer_native_init(JNIEnv *env)
fields.clazzEffect,
"mNativeVisualizer", "I");
if (fields.fidNativeVisualizer == NULL) {
- LOGE("Can't find Visualizer.%s", "mNativeVisualizer");
+ ALOGE("Can't find Visualizer.%s", "mNativeVisualizer");
return;
}
// fidJniData;
@@ -214,7 +214,7 @@ android_media_visualizer_native_init(JNIEnv *env)
fields.clazzEffect,
"mJniData", "I");
if (fields.fidJniData == NULL) {
- LOGE("Can't find Visualizer.%s", "mJniData");
+ ALOGE("Can't find Visualizer.%s", "mJniData");
return;
}
@@ -233,7 +233,7 @@ android_media_visualizer_native_setup(JNIEnv *env, jobject thiz, jobject weak_th
lpJniStorage = new visualizerJniStorage();
if (lpJniStorage == NULL) {
- LOGE("setup: Error creating JNI Storage");
+ ALOGE("setup: Error creating JNI Storage");
goto setup_failure;
}
@@ -248,7 +248,7 @@ android_media_visualizer_native_setup(JNIEnv *env, jobject thiz, jobject weak_th
&lpJniStorage->mCallbackData);
if (jId == NULL) {
- LOGE("setup: NULL java array for id pointer");
+ ALOGE("setup: NULL java array for id pointer");
lStatus = VISUALIZER_ERROR_BAD_VALUE;
goto setup_failure;
}
@@ -259,19 +259,19 @@ android_media_visualizer_native_setup(JNIEnv *env, jobject thiz, jobject weak_th
NULL,
sessionId);
if (lpVisualizer == NULL) {
- LOGE("Error creating Visualizer");
+ ALOGE("Error creating Visualizer");
goto setup_failure;
}
lStatus = translateError(lpVisualizer->initCheck());
if (lStatus != VISUALIZER_SUCCESS && lStatus != VISUALIZER_ERROR_ALREADY_EXISTS) {
- LOGE("Visualizer initCheck failed %d", lStatus);
+ ALOGE("Visualizer initCheck failed %d", lStatus);
goto setup_failure;
}
nId = (jint *) env->GetPrimitiveArrayCritical(jId, NULL);
if (nId == NULL) {
- LOGE("setup: Error retrieving id pointer");
+ ALOGE("setup: Error retrieving id pointer");
lStatus = VISUALIZER_ERROR_BAD_VALUE;
goto setup_failure;
}
diff --git a/media/jni/mediaeditor/VideoEditorMain.cpp b/media/jni/mediaeditor/VideoEditorMain.cpp
index 7083a91..c84a883 100755
--- a/media/jni/mediaeditor/VideoEditorMain.cpp
+++ b/media/jni/mediaeditor/VideoEditorMain.cpp
@@ -441,7 +441,7 @@ static void jniPreviewProgressCallback (void* cookie, M4OSA_UInt32 msgType,
if (extPos != NULL) {
*extPos = '\0';
} else {
- LOGE("ERROR the overlay file is incorrect");
+ ALOGE("ERROR the overlay file is incorrect");
}
strcat(pContext->mOverlayFileName, ".png");
@@ -518,7 +518,7 @@ static M4OSA_ERR checkClipVideoProfileAndLevel(M4DECODER_VideoDecoders *pDecoder
// For these case we do not check the profile and level
return M4NO_ERROR;
default :
- LOGE("checkClipVideoProfileAndLevel unsupport Video format %ld", format);
+ ALOGE("checkClipVideoProfileAndLevel unsupport Video format %ld", format);
break;
}
@@ -971,7 +971,7 @@ static int videoEditor_renderPreviewFrame(JNIEnv* pEnv,
if (extPos != NULL) {
*extPos = '\0';
} else {
- LOGE("ERROR the overlay file is incorrect");
+ ALOGE("ERROR the overlay file is incorrect");
}
strcat(tmpOverlayFilename, ".png");
@@ -1510,7 +1510,7 @@ static int removeAlphafromRGB8888 (
M4OSA_UInt8 *pTmpData = (M4OSA_UInt8*) M4OSA_32bitAlignedMalloc(frameSize_argb, M4VS, (M4OSA_Char*)"Image argb data");
if (pTmpData == M4OSA_NULL) {
- LOGE("Failed to allocate memory for Image clip");
+ ALOGE("Failed to allocate memory for Image clip");
return M4ERR_ALLOC;
}
@@ -1520,7 +1520,7 @@ static int removeAlphafromRGB8888 (
if ((lerr != M4NO_ERROR) || (lImageFileFp == M4OSA_NULL))
{
- LOGE("removeAlphafromRGB8888: Can not open the file ");
+ ALOGE("removeAlphafromRGB8888: Can not open the file ");
free(pTmpData);
return M4ERR_FILE_NOT_FOUND;
}
@@ -1529,7 +1529,7 @@ static int removeAlphafromRGB8888 (
lerr = M4OSA_fileReadData(lImageFileFp, (M4OSA_MemAddr8)pTmpData, &frameSize_argb);
if (lerr != M4NO_ERROR)
{
- LOGE("removeAlphafromRGB8888: can not read the data ");
+ ALOGE("removeAlphafromRGB8888: can not read the data ");
M4OSA_fileReadClose(lImageFileFp);
free(pTmpData);
return lerr;
@@ -1545,7 +1545,7 @@ static int removeAlphafromRGB8888 (
if (pFramingCtx->FramingRgb == M4OSA_NULL)
{
- LOGE("Failed to allocate memory for Image clip");
+ ALOGE("Failed to allocate memory for Image clip");
free(pTmpData);
return M4ERR_ALLOC;
}
@@ -2904,7 +2904,7 @@ M4OSA_ERR videoEditor_processClip(
// Other states are unexpected
else {
result = M4ERR_STATE;
- LOGE("videoEditor_processClip ITEM %d State ERROR 0x%x",
+ ALOGE("videoEditor_processClip ITEM %d State ERROR 0x%x",
unuseditemID, (unsigned int) result);
}
}
@@ -2916,13 +2916,13 @@ M4OSA_ERR videoEditor_processClip(
pContext->state = errorState;
// Log the result.
- LOGE("videoEditor_processClip ITEM %d Processing ERROR 0x%x",
+ ALOGE("videoEditor_processClip ITEM %d Processing ERROR 0x%x",
unuseditemID, (unsigned int) result);
}
}
// Return the error result
- LOGE("videoEditor_processClip ITEM %d END 0x%x", unuseditemID, (unsigned int) result);
+ ALOGE("videoEditor_processClip ITEM %d END 0x%x", unuseditemID, (unsigned int) result);
return result;
}
/*+ PROGRESS CB */
diff --git a/media/jni/soundpool/SoundPool.cpp b/media/jni/soundpool/SoundPool.cpp
index ed63189..14a5309 100644
--- a/media/jni/soundpool/SoundPool.cpp
+++ b/media/jni/soundpool/SoundPool.cpp
@@ -508,19 +508,19 @@ status_t Sample::doLoad()
mFd = -1;
}
if (p == 0) {
- LOGE("Unable to load sample: %s", mUrl);
+ ALOGE("Unable to load sample: %s", mUrl);
return -1;
}
ALOGV("pointer = %p, size = %u, sampleRate = %u, numChannels = %d",
p->pointer(), p->size(), sampleRate, numChannels);
if (sampleRate > kMaxSampleRate) {
- LOGE("Sample rate (%u) out of range", sampleRate);
+ ALOGE("Sample rate (%u) out of range", sampleRate);
return - 1;
}
if ((numChannels < 1) || (numChannels > 2)) {
- LOGE("Sample channel count (%d) out of range", numChannels);
+ ALOGE("Sample channel count (%d) out of range", numChannels);
return - 1;
}
@@ -616,7 +616,7 @@ void SoundChannel::play(const sp<Sample>& sample, int nextChannelID, float leftV
oldTrack = mAudioTrack;
status = newTrack->initCheck();
if (status != NO_ERROR) {
- LOGE("Error creating AudioTrack");
+ ALOGE("Error creating AudioTrack");
goto exit;
}
ALOGV("setVolume %p", newTrack);
diff --git a/media/jni/soundpool/android_media_SoundPool.cpp b/media/jni/soundpool/android_media_SoundPool.cpp
index f86892f..fe1c20a 100644
--- a/media/jni/soundpool/android_media_SoundPool.cpp
+++ b/media/jni/soundpool/android_media_SoundPool.cpp
@@ -288,27 +288,27 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved)
jclass clazz;
if (vm->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK) {
- LOGE("ERROR: GetEnv failed\n");
+ ALOGE("ERROR: GetEnv failed\n");
goto bail;
}
assert(env != NULL);
clazz = env->FindClass(kClassPathName);
if (clazz == NULL) {
- LOGE("Can't find %s", kClassPathName);
+ ALOGE("Can't find %s", kClassPathName);
goto bail;
}
fields.mNativeContext = env->GetFieldID(clazz, "mNativeContext", "I");
if (fields.mNativeContext == NULL) {
- LOGE("Can't find SoundPool.mNativeContext");
+ ALOGE("Can't find SoundPool.mNativeContext");
goto bail;
}
fields.mPostEvent = env->GetStaticMethodID(clazz, "postEventFromNative",
"(Ljava/lang/Object;IIILjava/lang/Object;)V");
if (fields.mPostEvent == NULL) {
- LOGE("Can't find android/media/SoundPool.postEventFromNative");
+ ALOGE("Can't find android/media/SoundPool.postEventFromNative");
goto bail;
}
diff --git a/media/libeffects/preprocessing/PreProcessing.cpp b/media/libeffects/preprocessing/PreProcessing.cpp
index 032c5aa..6267d1d 100755
--- a/media/libeffects/preprocessing/PreProcessing.cpp
+++ b/media/libeffects/preprocessing/PreProcessing.cpp
@@ -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:
diff --git a/media/libmedia/AudioEffect.cpp b/media/libmedia/AudioEffect.cpp
index d74389d..6639d06 100644
--- a/media/libmedia/AudioEffect.cpp
+++ b/media/libmedia/AudioEffect.cpp
@@ -107,7 +107,7 @@ status_t AudioEffect::set(const effect_uuid_t *type,
const sp<IAudioFlinger>& audioFlinger = AudioSystem::get_audio_flinger();
if (audioFlinger == 0) {
- LOGE("set(): Could not get audioflinger");
+ ALOGE("set(): Could not get audioflinger");
return NO_INIT;
}
@@ -138,7 +138,7 @@ status_t AudioEffect::set(const effect_uuid_t *type,
mIEffectClient, priority, io, mSessionId, &mStatus, &mId, &enabled);
if (iEffect == 0 || (mStatus != NO_ERROR && mStatus != ALREADY_EXISTS)) {
- LOGE("set(): AudioFlinger could not create effect, status: %d", mStatus);
+ ALOGE("set(): AudioFlinger could not create effect, status: %d", mStatus);
return mStatus;
}
@@ -148,7 +148,7 @@ status_t AudioEffect::set(const effect_uuid_t *type,
cblk = iEffect->getCblk();
if (cblk == 0) {
mStatus = NO_INIT;
- LOGE("Could not get control block");
+ ALOGE("Could not get control block");
return mStatus;
}
diff --git a/media/libmedia/AudioRecord.cpp b/media/libmedia/AudioRecord.cpp
index 3e6d429..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;
}
@@ -153,7 +153,7 @@ status_t AudioRecord::set(
}
// validate parameters
if (!audio_is_valid_format(format)) {
- LOGE("Invalid format");
+ ALOGE("Invalid format");
return BAD_VALUE;
}
@@ -177,7 +177,7 @@ status_t AudioRecord::set(
(audio_in_acoustics_t)flags,
mSessionId);
if (input == 0) {
- LOGE("Could not get audio input for record source %d", inputSource);
+ ALOGE("Could not get audio input for record source %d", inputSource);
return BAD_VALUE;
}
@@ -292,7 +292,7 @@ status_t AudioRecord::start()
if (t != 0) {
if (t->exitPending()) {
if (t->requestExitAndWait() == WOULD_BLOCK) {
- LOGE("AudioRecord::start called from thread");
+ ALOGE("AudioRecord::start called from thread");
return WOULD_BLOCK;
}
}
@@ -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();
@@ -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;
diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp
index 0ef1885..f7f129c 100644
--- a/media/libmedia/AudioSystem.cpp
+++ b/media/libmedia/AudioSystem.cpp
@@ -70,7 +70,7 @@ const sp<IAudioFlinger>& AudioSystem::get_audio_flinger()
gAudioFlinger = interface_cast<IAudioFlinger>(binder);
gAudioFlinger->registerClient(gAudioFlingerClient);
}
- LOGE_IF(gAudioFlinger==0, "no AudioFlinger!?");
+ ALOGE_IF(gAudioFlinger==0, "no AudioFlinger!?");
return gAudioFlinger;
}
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp
index c6fc126..d51cd69 100644
--- a/media/libmedia/AudioTrack.cpp
+++ b/media/libmedia/AudioTrack.cpp
@@ -157,7 +157,7 @@ status_t AudioTrack::set(
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;
}
}
@@ -323,7 +323,7 @@ void AudioTrack::start()
if (t != 0) {
if (t->exitPending()) {
if (t->requestExitAndWait() == WOULD_BLOCK) {
- LOGE("AudioTrack::start called from thread");
+ ALOGE("AudioTrack::start called from thread");
return;
}
}
@@ -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;
}
@@ -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();
@@ -961,7 +961,7 @@ ssize_t AudioTrack::write(const void* buffer, size_t userSize)
if (ssize_t(userSize) < 0) {
// sanity-check. user is most-likely passing an error code.
- LOGE("AudioTrack::write(buffer=%p, size=%u (%d)",
+ ALOGE("AudioTrack::write(buffer=%p, size=%u (%d)",
buffer, userSize, userSize);
return BAD_VALUE;
}
@@ -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;
diff --git a/media/libmedia/IAudioFlinger.cpp b/media/libmedia/IAudioFlinger.cpp
index bedf8d3..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) {
@@ -632,7 +632,7 @@ public:
status_t lStatus = remote()->transact(CREATE_EFFECT, data, &reply);
if (lStatus != NO_ERROR) {
- LOGE("createEffect error: %s", strerror(-lStatus));
+ ALOGE("createEffect error: %s", strerror(-lStatus));
} else {
lStatus = reply.readInt32();
int tmp = reply.readInt32();
diff --git a/media/libmedia/IMediaDeathNotifier.cpp b/media/libmedia/IMediaDeathNotifier.cpp
index 08b2286..8525482 100644
--- a/media/libmedia/IMediaDeathNotifier.cpp
+++ b/media/libmedia/IMediaDeathNotifier.cpp
@@ -54,7 +54,7 @@ IMediaDeathNotifier::getMediaPlayerService()
binder->linkToDeath(sDeathNotifier);
sMediaPlayerService = interface_cast<IMediaPlayerService>(binder);
}
- LOGE_IF(sMediaPlayerService == 0, "no media player service!?");
+ ALOGE_IF(sMediaPlayerService == 0, "no media player service!?");
return sMediaPlayerService;
}
diff --git a/media/libmedia/JetPlayer.cpp b/media/libmedia/JetPlayer.cpp
index 3d94b49..fa5b67a 100644
--- a/media/libmedia/JetPlayer.cpp
+++ b/media/libmedia/JetPlayer.cpp
@@ -68,21 +68,21 @@ int JetPlayer::init()
if (pLibConfig == NULL)
pLibConfig = EAS_Config();
if (pLibConfig == NULL) {
- LOGE("JetPlayer::init(): EAS library configuration could not be retrieved, aborting.");
+ ALOGE("JetPlayer::init(): EAS library configuration could not be retrieved, aborting.");
return EAS_FAILURE;
}
// init the EAS library
result = EAS_Init(&mEasData);
if( result != EAS_SUCCESS) {
- LOGE("JetPlayer::init(): Error initializing Sonivox EAS library, aborting.");
+ ALOGE("JetPlayer::init(): Error initializing Sonivox EAS library, aborting.");
mState = EAS_STATE_ERROR;
return result;
}
// init the JET library with the default app event controller range
result = JET_Init(mEasData, NULL, sizeof(S_JET_CONFIG));
if( result != EAS_SUCCESS) {
- LOGE("JetPlayer::init(): Error initializing JET library, aborting.");
+ ALOGE("JetPlayer::init(): Error initializing JET library, aborting.");
mState = EAS_STATE_ERROR;
return result;
}
@@ -108,7 +108,7 @@ int JetPlayer::init()
ALOGV("JetPlayer::init(): render thread(%d) successfully started.", mTid);
mState = EAS_STATE_READY;
} else {
- LOGE("JetPlayer::init(): failed to start render thread.");
+ ALOGE("JetPlayer::init(): failed to start render thread.");
mState = EAS_STATE_ERROR;
return EAS_FAILURE;
}
@@ -174,7 +174,7 @@ int JetPlayer::render() {
mAudioBuffer =
new EAS_PCM[pLibConfig->mixBufferSize * pLibConfig->numChannels * MIX_NUM_BUFFERS];
if (!mAudioBuffer) {
- LOGE("JetPlayer::render(): mAudioBuffer allocate failed");
+ ALOGE("JetPlayer::render(): mAudioBuffer allocate failed");
goto threadExit;
}
@@ -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);
@@ -234,14 +234,14 @@ int JetPlayer::render() {
// check audio output track
if (mAudioTrack == NULL) {
- LOGE("JetPlayer::render(): output AudioTrack was not created");
+ ALOGE("JetPlayer::render(): output AudioTrack was not created");
goto threadExit;
}
// Write data to the audio hardware
//ALOGV("JetPlayer::render(): writing to audio output");
if ((temp = mAudioTrack->write(mAudioBuffer, num_output)) < 0) {
- LOGE("JetPlayer::render(): Error in writing:%d",temp);
+ ALOGE("JetPlayer::render(): Error in writing:%d",temp);
return temp;
}
@@ -474,7 +474,7 @@ int JetPlayer::clearQueue()
//-------------------------------------------------------------------------------------------------
void JetPlayer::dump()
{
- LOGE("JetPlayer dump: JET file=%s", mEasJetFileLoc->path);
+ ALOGE("JetPlayer dump: JET file=%s", mEasJetFileLoc->path);
}
void JetPlayer::dumpJetStatus(S_JET_STATUS* pJetStatus)
@@ -484,7 +484,7 @@ void JetPlayer::dumpJetStatus(S_JET_STATUS* pJetStatus)
pJetStatus->currentUserID, pJetStatus->segmentRepeatCount,
pJetStatus->numQueuedSegments, pJetStatus->paused);
else
- LOGE(">> JET player status is NULL");
+ ALOGE(">> JET player status is NULL");
}
diff --git a/media/libmedia/MediaProfiles.cpp b/media/libmedia/MediaProfiles.cpp
index c9e8bc2..c905762 100644
--- a/media/libmedia/MediaProfiles.cpp
+++ b/media/libmedia/MediaProfiles.cpp
@@ -903,7 +903,7 @@ MediaProfiles::createInstanceFromXmlFile(const char *xml)
expat is not compiled with -DXML_DTD. We don't have DTD parsing support.
if (!::XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS)) {
- LOGE("failed to enable DTD support in the xml file");
+ ALOGE("failed to enable DTD support in the xml file");
return UNKNOWN_ERROR;
}
@@ -913,7 +913,7 @@ MediaProfiles::createInstanceFromXmlFile(const char *xml)
for (;;) {
void *buff = ::XML_GetBuffer(parser, BUFF_SIZE);
if (buff == NULL) {
- LOGE("failed to in call to XML_GetBuffer()");
+ ALOGE("failed to in call to XML_GetBuffer()");
delete profiles;
profiles = NULL;
goto exit;
@@ -921,7 +921,7 @@ MediaProfiles::createInstanceFromXmlFile(const char *xml)
int bytes_read = ::fread(buff, 1, BUFF_SIZE, fp);
if (bytes_read < 0) {
- LOGE("failed in call to read");
+ ALOGE("failed in call to read");
delete profiles;
profiles = NULL;
goto exit;
@@ -963,7 +963,7 @@ int MediaProfiles::getVideoEncoderParamByName(const char *name, video_encoder co
}
}
if (index == -1) {
- LOGE("The given video encoder %d is not found", codec);
+ ALOGE("The given video encoder %d is not found", codec);
return -1;
}
@@ -976,7 +976,7 @@ int MediaProfiles::getVideoEncoderParamByName(const char *name, video_encoder co
if (!strcmp("enc.vid.fps.min", name)) return mVideoEncoders[index]->mMinFrameRate;
if (!strcmp("enc.vid.fps.max", name)) return mVideoEncoders[index]->mMaxFrameRate;
- LOGE("The given video encoder param name %s is not found", name);
+ ALOGE("The given video encoder param name %s is not found", name);
return -1;
}
int MediaProfiles::getVideoEditorExportParamByName(
@@ -993,7 +993,7 @@ int MediaProfiles::getVideoEditorExportParamByName(
}
}
if (index == -1) {
- LOGE("The given video decoder %d is not found", codec);
+ ALOGE("The given video decoder %d is not found", codec);
return -1;
}
if (!strcmp("videoeditor.export.profile", name))
@@ -1001,7 +1001,7 @@ int MediaProfiles::getVideoEditorExportParamByName(
if (!strcmp("videoeditor.export.level", name))
return exportProfile->mLevel;
- LOGE("The given video editor export param name %s is not found", name);
+ ALOGE("The given video editor export param name %s is not found", name);
return -1;
}
int MediaProfiles::getVideoEditorCapParamByName(const char *name) const
@@ -1009,7 +1009,7 @@ int MediaProfiles::getVideoEditorCapParamByName(const char *name) const
ALOGV("getVideoEditorCapParamByName: %s", name);
if (mVideoEditorCap == NULL) {
- LOGE("The mVideoEditorCap is not created, then create default cap.");
+ ALOGE("The mVideoEditorCap is not created, then create default cap.");
createDefaultVideoEditorCap(sInstance);
}
@@ -1024,7 +1024,7 @@ int MediaProfiles::getVideoEditorCapParamByName(const char *name) const
if (!strcmp("maxPrefetchYUVFrames", name))
return mVideoEditorCap->mMaxPrefetchYUVFrames;
- LOGE("The given video editor param name %s is not found", name);
+ ALOGE("The given video editor param name %s is not found", name);
return -1;
}
@@ -1048,7 +1048,7 @@ int MediaProfiles::getAudioEncoderParamByName(const char *name, audio_encoder co
}
}
if (index == -1) {
- LOGE("The given audio encoder %d is not found", codec);
+ ALOGE("The given audio encoder %d is not found", codec);
return -1;
}
@@ -1059,7 +1059,7 @@ int MediaProfiles::getAudioEncoderParamByName(const char *name, audio_encoder co
if (!strcmp("enc.aud.hz.min", name)) return mAudioEncoders[index]->mMinSampleRate;
if (!strcmp("enc.aud.hz.max", name)) return mAudioEncoders[index]->mMaxSampleRate;
- LOGE("The given audio encoder param name %s is not found", name);
+ ALOGE("The given audio encoder param name %s is not found", name);
return -1;
}
@@ -1103,7 +1103,7 @@ int MediaProfiles::getCamcorderProfileParamByName(const char *name,
int index = getCamcorderProfileIndex(cameraId, quality);
if (index == -1) {
- LOGE("The given camcorder profile camera %d quality %d is not found",
+ ALOGE("The given camcorder profile camera %d quality %d is not found",
cameraId, quality);
return -1;
}
@@ -1120,7 +1120,7 @@ int MediaProfiles::getCamcorderProfileParamByName(const char *name,
if (!strcmp("aud.ch", name)) return mCamcorderProfiles[index]->mAudioCodec->mChannels;
if (!strcmp("aud.hz", name)) return mCamcorderProfiles[index]->mAudioCodec->mSampleRate;
- LOGE("The given camcorder profile param id %d name %s is not found", cameraId, name);
+ ALOGE("The given camcorder profile param id %d name %s is not found", cameraId, name);
return -1;
}
diff --git a/media/libmedia/MediaScannerClient.cpp b/media/libmedia/MediaScannerClient.cpp
index 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 6a38ff1..35dfbb8 100644
--- a/media/libmedia/ToneGenerator.cpp
+++ b/media/libmedia/ToneGenerator.cpp
@@ -805,7 +805,7 @@ ToneGenerator::ToneGenerator(int streamType, float volume, bool threadCanCallJav
mState = TONE_IDLE;
if (AudioSystem::getOutputSamplingRate(&mSamplingRate, streamType) != NO_ERROR) {
- LOGE("Unable to marshal AudioFlinger");
+ ALOGE("Unable to marshal AudioFlinger");
return;
}
mThreadCanCallJava = threadCanCallJava;
@@ -906,7 +906,7 @@ bool ToneGenerator::startTone(int toneType, int durationMs) {
ALOGV("Start waiting for previous tone to stop");
lStatus = mWaitCbkCond.waitRelative(mLock, seconds(3));
if (lStatus != NO_ERROR) {
- LOGE("--- start wait for stop timed out, status %d", lStatus);
+ ALOGE("--- start wait for stop timed out, status %d", lStatus);
mState = TONE_IDLE;
mLock.unlock();
return lResult;
@@ -925,7 +925,7 @@ bool ToneGenerator::startTone(int toneType, int durationMs) {
ALOGV("Wait for start callback");
lStatus = mWaitCbkCond.waitRelative(mLock, seconds(3));
if (lStatus != NO_ERROR) {
- LOGE("--- Immediate start timed out, status %d", lStatus);
+ ALOGE("--- Immediate start timed out, status %d", lStatus);
mState = TONE_IDLE;
lResult = false;
}
@@ -943,7 +943,7 @@ bool ToneGenerator::startTone(int toneType, int durationMs) {
}
ALOGV("cond received");
} else {
- LOGE("--- Delayed start timed out, status %d", lStatus);
+ ALOGE("--- Delayed start timed out, status %d", lStatus);
mState = TONE_IDLE;
}
}
@@ -979,7 +979,7 @@ void ToneGenerator::stopTone() {
if (lStatus == NO_ERROR) {
ALOGV("track stop complete, time %d", (unsigned int)(systemTime()/1000000));
} else {
- LOGE("--- Stop timed out");
+ ALOGE("--- Stop timed out");
mState = TONE_IDLE;
mpAudioTrack->stop();
}
@@ -1018,7 +1018,7 @@ bool ToneGenerator::initAudioTrack() {
// Open audio track in mono, PCM 16bit, default sampling rate, default buffer size
mpAudioTrack = new AudioTrack();
if (mpAudioTrack == 0) {
- LOGE("AudioTrack allocation failed");
+ ALOGE("AudioTrack allocation failed");
goto initAudioTrack_exit;
}
ALOGV("Create Track: %p\n", mpAudioTrack);
@@ -1036,7 +1036,7 @@ bool ToneGenerator::initAudioTrack() {
mThreadCanCallJava);
if (mpAudioTrack->initCheck() != NO_ERROR) {
- LOGE("AudioTrack->initCheck failed");
+ ALOGE("AudioTrack->initCheck failed");
goto initAudioTrack_exit;
}
diff --git a/media/libmedia/Visualizer.cpp b/media/libmedia/Visualizer.cpp
index de40f98..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,7 +116,7 @@ status_t Visualizer::setCaptureCallBack(capture_cbk_t cbk, void* user, uint32_t
if (cbk != NULL) {
mCaptureThread = new CaptureThread(*this, rate, ((flags & CAPTURE_CALL_JAVA) != 0));
if (mCaptureThread == 0) {
- LOGE("Could not create callback thread");
+ ALOGE("Could not create callback thread");
return NO_INIT;
}
}
diff --git a/media/libmedia/mediametadataretriever.cpp b/media/libmedia/mediametadataretriever.cpp
index 1658f41..88e269f 100644
--- a/media/libmedia/mediametadataretriever.cpp
+++ b/media/libmedia/mediametadataretriever.cpp
@@ -52,7 +52,7 @@ const sp<IMediaPlayerService>& MediaMetadataRetriever::getService()
binder->linkToDeath(sDeathNotifier);
sService = interface_cast<IMediaPlayerService>(binder);
}
- LOGE_IF(sService == 0, "no MediaPlayerService!?");
+ ALOGE_IF(sService == 0, "no MediaPlayerService!?");
return sService;
}
@@ -61,12 +61,12 @@ MediaMetadataRetriever::MediaMetadataRetriever()
ALOGV("constructor");
const sp<IMediaPlayerService>& service(getService());
if (service == 0) {
- LOGE("failed to obtain MediaMetadataRetrieverService");
+ ALOGE("failed to obtain MediaMetadataRetrieverService");
return;
}
sp<IMediaMetadataRetriever> retriever(service->createMetadataRetriever(getpid()));
if (retriever == 0) {
- LOGE("failed to create IMediaMetadataRetriever object from server");
+ ALOGE("failed to create IMediaMetadataRetriever object from server");
}
mRetriever = retriever;
}
@@ -98,11 +98,11 @@ status_t MediaMetadataRetriever::setDataSource(
ALOGV("setDataSource");
Mutex::Autolock _l(mLock);
if (mRetriever == 0) {
- LOGE("retriever is not initialized");
+ ALOGE("retriever is not initialized");
return INVALID_OPERATION;
}
if (srcUrl == NULL) {
- LOGE("data source is a null pointer");
+ ALOGE("data source is a null pointer");
return UNKNOWN_ERROR;
}
ALOGV("data source (%s)", srcUrl);
@@ -114,11 +114,11 @@ status_t MediaMetadataRetriever::setDataSource(int fd, int64_t offset, int64_t l
ALOGV("setDataSource(%d, %lld, %lld)", fd, offset, length);
Mutex::Autolock _l(mLock);
if (mRetriever == 0) {
- LOGE("retriever is not initialized");
+ ALOGE("retriever is not initialized");
return INVALID_OPERATION;
}
if (fd < 0 || offset < 0 || length < 0) {
- LOGE("Invalid negative argument");
+ ALOGE("Invalid negative argument");
return UNKNOWN_ERROR;
}
return mRetriever->setDataSource(fd, offset, length);
@@ -129,7 +129,7 @@ sp<IMemory> MediaMetadataRetriever::getFrameAtTime(int64_t timeUs, int option)
ALOGV("getFrameAtTime: time(%lld us) option(%d)", timeUs, option);
Mutex::Autolock _l(mLock);
if (mRetriever == 0) {
- LOGE("retriever is not initialized");
+ ALOGE("retriever is not initialized");
return NULL;
}
return mRetriever->getFrameAtTime(timeUs, option);
@@ -140,7 +140,7 @@ const char* MediaMetadataRetriever::extractMetadata(int keyCode)
ALOGV("extractMetadata(%d)", keyCode);
Mutex::Autolock _l(mLock);
if (mRetriever == 0) {
- LOGE("retriever is not initialized");
+ ALOGE("retriever is not initialized");
return NULL;
}
return mRetriever->extractMetadata(keyCode);
@@ -151,7 +151,7 @@ sp<IMemory> MediaMetadataRetriever::extractAlbumArt()
ALOGV("extractAlbumArt");
Mutex::Autolock _l(mLock);
if (mRetriever == 0) {
- LOGE("retriever is not initialized");
+ ALOGE("retriever is not initialized");
return NULL;
}
return mRetriever->extractAlbumArt();
diff --git a/media/libmedia/mediaplayer.cpp b/media/libmedia/mediaplayer.cpp
index 6054749..2284927 100644
--- a/media/libmedia/mediaplayer.cpp
+++ b/media/libmedia/mediaplayer.cpp
@@ -115,7 +115,7 @@ status_t MediaPlayer::attachNewPlayer(const sp<IMediaPlayer>& player)
if ( !( (mCurrentState & MEDIA_PLAYER_IDLE) ||
(mCurrentState == MEDIA_PLAYER_STATE_ERROR ) ) ) {
- LOGE("attachNewPlayer called in state %d", mCurrentState);
+ ALOGE("attachNewPlayer called in state %d", mCurrentState);
return INVALID_OPERATION;
}
@@ -126,7 +126,7 @@ status_t MediaPlayer::attachNewPlayer(const sp<IMediaPlayer>& player)
mCurrentState = MEDIA_PLAYER_INITIALIZED;
err = NO_ERROR;
} else {
- LOGE("Unable to to create media player");
+ ALOGE("Unable to to create media player");
}
}
@@ -195,7 +195,7 @@ status_t MediaPlayer::invoke(const Parcel& request, Parcel *reply)
ALOGV("invoke %d", request.dataSize());
return mPlayer->invoke(request, reply);
}
- LOGE("invoke failed: wrong state %X", mCurrentState);
+ ALOGE("invoke failed: wrong state %X", mCurrentState);
return INVALID_OPERATION;
}
@@ -236,7 +236,7 @@ status_t MediaPlayer::prepareAsync_l()
mCurrentState = MEDIA_PLAYER_PREPARING;
return mPlayer->prepareAsync();
}
- LOGE("prepareAsync called in state %d", mCurrentState);
+ ALOGE("prepareAsync called in state %d", mCurrentState);
return INVALID_OPERATION;
}
@@ -298,7 +298,7 @@ status_t MediaPlayer::start()
}
return ret;
}
- LOGE("start called in state %d", mCurrentState);
+ ALOGE("start called in state %d", mCurrentState);
return INVALID_OPERATION;
}
@@ -317,7 +317,7 @@ status_t MediaPlayer::stop()
}
return ret;
}
- LOGE("stop called in state %d", mCurrentState);
+ ALOGE("stop called in state %d", mCurrentState);
return INVALID_OPERATION;
}
@@ -336,7 +336,7 @@ status_t MediaPlayer::pause()
}
return ret;
}
- LOGE("pause called in state %d", mCurrentState);
+ ALOGE("pause called in state %d", mCurrentState);
return INVALID_OPERATION;
}
@@ -348,7 +348,7 @@ bool MediaPlayer::isPlaying()
mPlayer->isPlaying(&temp);
ALOGV("isPlaying: %d", temp);
if ((mCurrentState & MEDIA_PLAYER_STARTED) && ! temp) {
- LOGE("internal/external state mismatch corrected");
+ ALOGE("internal/external state mismatch corrected");
mCurrentState = MEDIA_PLAYER_PAUSED;
}
return temp;
@@ -402,7 +402,7 @@ status_t MediaPlayer::getDuration_l(int *msec)
*msec = mDuration;
return ret;
}
- LOGE("Attempt to call getDuration without a valid mediaplayer");
+ ALOGE("Attempt to call getDuration without a valid mediaplayer");
return INVALID_OPERATION;
}
@@ -435,7 +435,7 @@ status_t MediaPlayer::seekTo_l(int msec)
return NO_ERROR;
}
}
- LOGE("Attempt to perform seekTo in wrong state: mPlayer=%p, mCurrentState=%u", mPlayer.get(), mCurrentState);
+ ALOGE("Attempt to perform seekTo in wrong state: mPlayer=%p, mCurrentState=%u", mPlayer.get(), mCurrentState);
return INVALID_OPERATION;
}
@@ -457,7 +457,7 @@ status_t MediaPlayer::reset_l()
if (mPlayer != 0) {
status_t ret = mPlayer->reset();
if (ret != NO_ERROR) {
- LOGE("reset() failed with return code (%d)", ret);
+ ALOGE("reset() failed with return code (%d)", ret);
mCurrentState = MEDIA_PLAYER_STATE_ERROR;
} else {
mCurrentState = MEDIA_PLAYER_IDLE;
@@ -486,7 +486,7 @@ status_t MediaPlayer::setAudioStreamType(int type)
if (mCurrentState & ( MEDIA_PLAYER_PREPARED | MEDIA_PLAYER_STARTED |
MEDIA_PLAYER_PAUSED | MEDIA_PLAYER_PLAYBACK_COMPLETE ) ) {
// Can't change the stream type after prepare
- LOGE("setAudioStream called in state %d", mCurrentState);
+ ALOGE("setAudioStream called in state %d", mCurrentState);
return INVALID_OPERATION;
}
// cache
@@ -532,7 +532,7 @@ status_t MediaPlayer::setAudioSessionId(int sessionId)
ALOGV("MediaPlayer::setAudioSessionId(%d)", sessionId);
Mutex::Autolock _l(mLock);
if (!(mCurrentState & MEDIA_PLAYER_IDLE)) {
- LOGE("setAudioSessionId called in state %d", mCurrentState);
+ ALOGE("setAudioSessionId called in state %d", mCurrentState);
return INVALID_OPERATION;
}
if (sessionId < 0) {
@@ -570,7 +570,7 @@ status_t MediaPlayer::attachAuxEffect(int effectId)
if (mPlayer == 0 ||
(mCurrentState & MEDIA_PLAYER_IDLE) ||
(mCurrentState == MEDIA_PLAYER_STATE_ERROR )) {
- LOGE("attachAuxEffect called in state %d", mCurrentState);
+ ALOGE("attachAuxEffect called in state %d", mCurrentState);
return INVALID_OPERATION;
}
@@ -641,7 +641,7 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj)
case MEDIA_PLAYBACK_COMPLETE:
ALOGV("playback complete");
if (mCurrentState == MEDIA_PLAYER_IDLE) {
- LOGE("playback complete in idle state");
+ ALOGE("playback complete in idle state");
}
if (!mLoop) {
mCurrentState = MEDIA_PLAYER_PLAYBACK_COMPLETE;
@@ -651,7 +651,7 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj)
// Always log errors.
// ext1: Media framework error code.
// ext2: Implementation dependant error code.
- LOGE("error (%d, %d)", ext1, ext2);
+ ALOGE("error (%d, %d)", ext1, ext2);
mCurrentState = MEDIA_PLAYER_STATE_ERROR;
if (mPrepareSync)
{
@@ -717,7 +717,7 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj)
if (service != 0) {
p = service->decode(url, pSampleRate, pNumChannels, pFormat);
} else {
- LOGE("Unable to locate media service");
+ ALOGE("Unable to locate media service");
}
return p;
@@ -737,7 +737,7 @@ void MediaPlayer::died()
if (service != 0) {
p = service->decode(fd, offset, length, pSampleRate, pNumChannels, pFormat);
} else {
- LOGE("Unable to locate media service");
+ ALOGE("Unable to locate media service");
}
return p;
diff --git a/media/libmedia/mediarecorder.cpp b/media/libmedia/mediarecorder.cpp
index ec62978..8d947d8 100644
--- a/media/libmedia/mediarecorder.cpp
+++ b/media/libmedia/mediarecorder.cpp
@@ -33,11 +33,11 @@ status_t MediaRecorder::setCamera(const sp<ICamera>& camera, const sp<ICameraRec
{
ALOGV("setCamera(%p,%p)", camera.get(), proxy.get());
if(mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_IDLE)) {
- LOGE("setCamera called in an invalid state(%d)", mCurrentState);
+ ALOGE("setCamera called in an invalid state(%d)", mCurrentState);
return INVALID_OPERATION;
}
@@ -54,15 +54,15 @@ status_t MediaRecorder::setPreviewSurface(const sp<Surface>& surface)
{
ALOGV("setPreviewSurface(%p)", surface.get());
if(mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) {
- LOGE("setPreviewSurface called in an invalid state(%d)", mCurrentState);
+ ALOGE("setPreviewSurface called in an invalid state(%d)", mCurrentState);
return INVALID_OPERATION;
}
if (!mIsVideoSourceSet) {
- LOGE("try to set preview surface without setting the video source first");
+ ALOGE("try to set preview surface without setting the video source first");
return INVALID_OPERATION;
}
@@ -79,11 +79,11 @@ status_t MediaRecorder::init()
{
ALOGV("init");
if(mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_IDLE)) {
- LOGE("init called in an invalid state(%d)", mCurrentState);
+ ALOGE("init called in an invalid state(%d)", mCurrentState);
return INVALID_OPERATION;
}
@@ -109,11 +109,11 @@ status_t MediaRecorder::setVideoSource(int vs)
{
ALOGV("setVideoSource(%d)", vs);
if(mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (mIsVideoSourceSet) {
- LOGE("video source has already been set");
+ ALOGE("video source has already been set");
return INVALID_OPERATION;
}
if (mCurrentState & MEDIA_RECORDER_IDLE) {
@@ -124,7 +124,7 @@ status_t MediaRecorder::setVideoSource(int vs)
}
}
if (!(mCurrentState & MEDIA_RECORDER_INITIALIZED)) {
- LOGE("setVideoSource called in an invalid state(%d)", mCurrentState);
+ ALOGE("setVideoSource called in an invalid state(%d)", mCurrentState);
return INVALID_OPERATION;
}
@@ -144,7 +144,7 @@ status_t MediaRecorder::setAudioSource(int as)
{
ALOGV("setAudioSource(%d)", as);
if(mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (mCurrentState & MEDIA_RECORDER_IDLE) {
@@ -155,11 +155,11 @@ status_t MediaRecorder::setAudioSource(int as)
}
}
if (mIsAudioSourceSet) {
- LOGE("audio source has already been set");
+ ALOGE("audio source has already been set");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_INITIALIZED)) {
- LOGE("setAudioSource called in an invalid state(%d)", mCurrentState);
+ ALOGE("setAudioSource called in an invalid state(%d)", mCurrentState);
return INVALID_OPERATION;
}
@@ -177,21 +177,21 @@ status_t MediaRecorder::setOutputFormat(int of)
{
ALOGV("setOutputFormat(%d)", of);
if(mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_INITIALIZED)) {
- LOGE("setOutputFormat called in an invalid state: %d", mCurrentState);
+ ALOGE("setOutputFormat called in an invalid state: %d", mCurrentState);
return INVALID_OPERATION;
}
if (mIsVideoSourceSet && of >= OUTPUT_FORMAT_AUDIO_ONLY_START && of != OUTPUT_FORMAT_RTP_AVP && of != OUTPUT_FORMAT_MPEG2TS) { //first non-video output format
- LOGE("output format (%d) is meant for audio recording only and incompatible with video recording", of);
+ ALOGE("output format (%d) is meant for audio recording only and incompatible with video recording", of);
return INVALID_OPERATION;
}
status_t ret = mMediaRecorder->setOutputFormat(of);
if (OK != ret) {
- LOGE("setOutputFormat failed: %d", ret);
+ ALOGE("setOutputFormat failed: %d", ret);
mCurrentState = MEDIA_RECORDER_ERROR;
return ret;
}
@@ -203,19 +203,19 @@ status_t MediaRecorder::setVideoEncoder(int ve)
{
ALOGV("setVideoEncoder(%d)", ve);
if(mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!mIsVideoSourceSet) {
- LOGE("try to set the video encoder without setting the video source first");
+ ALOGE("try to set the video encoder without setting the video source first");
return INVALID_OPERATION;
}
if (mIsVideoEncoderSet) {
- LOGE("video encoder has already been set");
+ ALOGE("video encoder has already been set");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) {
- LOGE("setVideoEncoder called in an invalid state(%d)", mCurrentState);
+ ALOGE("setVideoEncoder called in an invalid state(%d)", mCurrentState);
return INVALID_OPERATION;
}
@@ -233,19 +233,19 @@ status_t MediaRecorder::setAudioEncoder(int ae)
{
ALOGV("setAudioEncoder(%d)", ae);
if(mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!mIsAudioSourceSet) {
- LOGE("try to set the audio encoder without setting the audio source first");
+ ALOGE("try to set the audio encoder without setting the audio source first");
return INVALID_OPERATION;
}
if (mIsAudioEncoderSet) {
- LOGE("audio encoder has already been set");
+ ALOGE("audio encoder has already been set");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) {
- LOGE("setAudioEncoder called in an invalid state(%d)", mCurrentState);
+ ALOGE("setAudioEncoder called in an invalid state(%d)", mCurrentState);
return INVALID_OPERATION;
}
@@ -263,15 +263,15 @@ status_t MediaRecorder::setOutputFile(const char* path)
{
ALOGV("setOutputFile(%s)", path);
if(mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (mIsOutputFileSet) {
- LOGE("output file has already been set");
+ ALOGE("output file has already been set");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) {
- LOGE("setOutputFile called in an invalid state(%d)", mCurrentState);
+ ALOGE("setOutputFile called in an invalid state(%d)", mCurrentState);
return INVALID_OPERATION;
}
@@ -289,15 +289,15 @@ status_t MediaRecorder::setOutputFile(int fd, int64_t offset, int64_t length)
{
ALOGV("setOutputFile(%d, %lld, %lld)", fd, offset, length);
if(mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (mIsOutputFileSet) {
- LOGE("output file has already been set");
+ ALOGE("output file has already been set");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) {
- LOGE("setOutputFile called in an invalid state(%d)", mCurrentState);
+ ALOGE("setOutputFile called in an invalid state(%d)", mCurrentState);
return INVALID_OPERATION;
}
@@ -308,7 +308,7 @@ status_t MediaRecorder::setOutputFile(int fd, int64_t offset, int64_t length)
// this issue by checking the file descriptor first before passing
// it through binder call.
if (fd < 0) {
- LOGE("Invalid file descriptor: %d", fd);
+ ALOGE("Invalid file descriptor: %d", fd);
return BAD_VALUE;
}
@@ -326,21 +326,21 @@ status_t MediaRecorder::setVideoSize(int width, int height)
{
ALOGV("setVideoSize(%d, %d)", width, height);
if(mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) {
- LOGE("setVideoSize called in an invalid state: %d", mCurrentState);
+ ALOGE("setVideoSize called in an invalid state: %d", mCurrentState);
return INVALID_OPERATION;
}
if (!mIsVideoSourceSet) {
- LOGE("Cannot set video size without setting video source first");
+ ALOGE("Cannot set video size without setting video source first");
return INVALID_OPERATION;
}
status_t ret = mMediaRecorder->setVideoSize(width, height);
if (OK != ret) {
- LOGE("setVideoSize failed: %d", ret);
+ ALOGE("setVideoSize failed: %d", ret);
mCurrentState = MEDIA_RECORDER_ERROR;
return ret;
}
@@ -358,7 +358,7 @@ sp<ISurfaceTexture> MediaRecorder::
mSurfaceMediaSource =
mMediaRecorder->querySurfaceMediaSource();
if (mSurfaceMediaSource == NULL) {
- LOGE("SurfaceMediaSource could not be initialized!");
+ ALOGE("SurfaceMediaSource could not be initialized!");
}
return mSurfaceMediaSource;
}
@@ -369,21 +369,21 @@ status_t MediaRecorder::setVideoFrameRate(int frames_per_second)
{
ALOGV("setVideoFrameRate(%d)", frames_per_second);
if(mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) {
- LOGE("setVideoFrameRate called in an invalid state: %d", mCurrentState);
+ ALOGE("setVideoFrameRate called in an invalid state: %d", mCurrentState);
return INVALID_OPERATION;
}
if (!mIsVideoSourceSet) {
- LOGE("Cannot set video frame rate without setting video source first");
+ ALOGE("Cannot set video frame rate without setting video source first");
return INVALID_OPERATION;
}
status_t ret = mMediaRecorder->setVideoFrameRate(frames_per_second);
if (OK != ret) {
- LOGE("setVideoFrameRate failed: %d", ret);
+ ALOGE("setVideoFrameRate failed: %d", ret);
mCurrentState = MEDIA_RECORDER_ERROR;
return ret;
}
@@ -393,7 +393,7 @@ status_t MediaRecorder::setVideoFrameRate(int frames_per_second)
status_t MediaRecorder::setParameters(const String8& params) {
ALOGV("setParameters(%s)", params.string());
if(mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
@@ -402,13 +402,13 @@ status_t MediaRecorder::setParameters(const String8& params) {
MEDIA_RECORDER_RECORDING |
MEDIA_RECORDER_ERROR));
if (isInvalidState) {
- LOGE("setParameters is called in an invalid state: %d", mCurrentState);
+ ALOGE("setParameters is called in an invalid state: %d", mCurrentState);
return INVALID_OPERATION;
}
status_t ret = mMediaRecorder->setParameters(params);
if (OK != ret) {
- LOGE("setParameters(%s) failed: %d", params.string(), ret);
+ ALOGE("setParameters(%s) failed: %d", params.string(), ret);
// Do not change our current state to MEDIA_RECORDER_ERROR, failures
// of the only currently supported parameters, "max-duration" and
// "max-filesize" are _not_ fatal.
@@ -421,34 +421,34 @@ status_t MediaRecorder::prepare()
{
ALOGV("prepare");
if(mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) {
- LOGE("prepare called in an invalid state: %d", mCurrentState);
+ ALOGE("prepare called in an invalid state: %d", mCurrentState);
return INVALID_OPERATION;
}
if (mIsAudioSourceSet != mIsAudioEncoderSet) {
if (mIsAudioSourceSet) {
- LOGE("audio source is set, but audio encoder is not set");
+ ALOGE("audio source is set, but audio encoder is not set");
} else { // must not happen, since setAudioEncoder checks this already
- LOGE("audio encoder is set, but audio source is not set");
+ ALOGE("audio encoder is set, but audio source is not set");
}
return INVALID_OPERATION;
}
if (mIsVideoSourceSet != mIsVideoEncoderSet) {
if (mIsVideoSourceSet) {
- LOGE("video source is set, but video encoder is not set");
+ ALOGE("video source is set, but video encoder is not set");
} else { // must not happen, since setVideoEncoder checks this already
- LOGE("video encoder is set, but video source is not set");
+ ALOGE("video encoder is set, but video source is not set");
}
return INVALID_OPERATION;
}
status_t ret = mMediaRecorder->prepare();
if (OK != ret) {
- LOGE("prepare failed: %d", ret);
+ ALOGE("prepare failed: %d", ret);
mCurrentState = MEDIA_RECORDER_ERROR;
return ret;
}
@@ -460,17 +460,17 @@ status_t MediaRecorder::getMaxAmplitude(int* max)
{
ALOGV("getMaxAmplitude");
if(mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (mCurrentState & MEDIA_RECORDER_ERROR) {
- LOGE("getMaxAmplitude called in an invalid state: %d", mCurrentState);
+ ALOGE("getMaxAmplitude called in an invalid state: %d", mCurrentState);
return INVALID_OPERATION;
}
status_t ret = mMediaRecorder->getMaxAmplitude(max);
if (OK != ret) {
- LOGE("getMaxAmplitude failed: %d", ret);
+ ALOGE("getMaxAmplitude failed: %d", ret);
mCurrentState = MEDIA_RECORDER_ERROR;
return ret;
}
@@ -481,17 +481,17 @@ status_t MediaRecorder::start()
{
ALOGV("start");
if (mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_PREPARED)) {
- LOGE("start called in an invalid state: %d", mCurrentState);
+ ALOGE("start called in an invalid state: %d", mCurrentState);
return INVALID_OPERATION;
}
status_t ret = mMediaRecorder->start();
if (OK != ret) {
- LOGE("start failed: %d", ret);
+ ALOGE("start failed: %d", ret);
mCurrentState = MEDIA_RECORDER_ERROR;
return ret;
}
@@ -503,17 +503,17 @@ status_t MediaRecorder::stop()
{
ALOGV("stop");
if (mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_RECORDING)) {
- LOGE("stop called in an invalid state: %d", mCurrentState);
+ ALOGE("stop called in an invalid state: %d", mCurrentState);
return INVALID_OPERATION;
}
status_t ret = mMediaRecorder->stop();
if (OK != ret) {
- LOGE("stop failed: %d", ret);
+ ALOGE("stop failed: %d", ret);
mCurrentState = MEDIA_RECORDER_ERROR;
return ret;
}
@@ -531,7 +531,7 @@ status_t MediaRecorder::reset()
{
ALOGV("reset");
if (mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
@@ -556,7 +556,7 @@ status_t MediaRecorder::reset()
break;
default: {
- LOGE("Unexpected non-existing state: %d", mCurrentState);
+ ALOGE("Unexpected non-existing state: %d", mCurrentState);
break;
}
}
@@ -567,12 +567,12 @@ status_t MediaRecorder::close()
{
ALOGV("close");
if (!(mCurrentState & MEDIA_RECORDER_INITIALIZED)) {
- LOGE("close called in an invalid state: %d", mCurrentState);
+ ALOGE("close called in an invalid state: %d", mCurrentState);
return INVALID_OPERATION;
}
status_t ret = mMediaRecorder->close();
if (OK != ret) {
- LOGE("close failed: %d", ret);
+ ALOGE("close failed: %d", ret);
mCurrentState = MEDIA_RECORDER_ERROR;
return UNKNOWN_ERROR;
} else {
@@ -586,7 +586,7 @@ status_t MediaRecorder::doReset()
ALOGV("doReset");
status_t ret = mMediaRecorder->reset();
if (OK != ret) {
- LOGE("doReset failed: %d", ret);
+ ALOGE("doReset failed: %d", ret);
mCurrentState = MEDIA_RECORDER_ERROR;
return ret;
} else {
diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp
index 91221ac..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;
}
@@ -630,7 +630,7 @@ static sp<MediaPlayerBase> createPlayer(player_type playerType, void* cookie,
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;
}
@@ -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
@@ -713,7 +713,7 @@ status_t MediaPlayerService::Client::setDataSource(
if (mStatus == NO_ERROR) {
mPlayer = p;
} else {
- LOGE(" error: %d", mStatus);
+ ALOGE(" error: %d", mStatus);
}
return mStatus;
}
@@ -725,7 +725,7 @@ status_t MediaPlayerService::Client::setDataSource(int fd, int64_t offset, int64
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;
}
@@ -736,7 +736,7 @@ status_t MediaPlayerService::Client::setDataSource(int fd, int64_t offset, int64
ALOGV("st_size = %llu", sb.st_size);
if (offset >= sb.st_size) {
- LOGE("offset error");
+ ALOGE("offset error");
::close(fd);
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;
}
@@ -975,7 +975,7 @@ status_t MediaPlayerService::Client::getCurrentPosition(int *msec)
if (ret == NO_ERROR) {
ALOGV("[%d] getCurrentPosition = %d", mConnId, *msec);
} else {
- LOGE("getCurrentPosition returned %d", ret);
+ ALOGE("getCurrentPosition returned %d", ret);
}
return ret;
}
@@ -989,7 +989,7 @@ status_t MediaPlayerService::Client::getDuration(int *msec)
if (ret == NO_ERROR) {
ALOGV("[%d] getDuration = %d", mConnId, *msec);
} else {
- LOGE("getDuration returned %d", ret);
+ ALOGE("getDuration returned %d", ret);
}
return ret;
}
@@ -1394,7 +1394,7 @@ 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;
}
@@ -1652,7 +1652,7 @@ ssize_t MediaPlayerService::AudioCache::write(const void* buffer, size_t size)
p += mSize;
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);
@@ -1687,7 +1687,7 @@ void MediaPlayerService::AudioCache::notify(
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:
@@ -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;
}
}
@@ -1828,7 +1828,7 @@ void MediaPlayerService::addBatteryData(uint32_t params)
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 ca92c77..d219fc2 100644
--- a/media/libmediaplayerservice/MediaRecorderClient.cpp
+++ b/media/libmediaplayerservice/MediaRecorderClient.cpp
@@ -54,7 +54,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;
}
@@ -64,7 +64,7 @@ sp<ISurfaceTexture> MediaRecorderClient::querySurfaceMediaSource()
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();
@@ -78,7 +78,7 @@ status_t MediaRecorderClient::setCamera(const sp<ICamera>& camera,
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);
@@ -89,7 +89,7 @@ status_t MediaRecorderClient::setPreviewSurface(const sp<Surface>& surface)
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);
@@ -103,7 +103,7 @@ status_t MediaRecorderClient::setVideoSource(int vs)
}
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);
@@ -117,7 +117,7 @@ status_t MediaRecorderClient::setAudioSource(int as)
}
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);
@@ -128,7 +128,7 @@ status_t MediaRecorderClient::setOutputFormat(int 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);
@@ -139,7 +139,7 @@ status_t MediaRecorderClient::setVideoEncoder(int 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);
@@ -150,7 +150,7 @@ status_t MediaRecorderClient::setAudioEncoder(int 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);
@@ -161,7 +161,7 @@ status_t MediaRecorderClient::setOutputFile(const char* 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);
@@ -172,7 +172,7 @@ status_t MediaRecorderClient::setOutputFile(int fd, int64_t offset, int64_t leng
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);
@@ -183,7 +183,7 @@ status_t MediaRecorderClient::setVideoSize(int width, int 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);
@@ -194,7 +194,7 @@ status_t MediaRecorderClient::setVideoFrameRate(int 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);
@@ -204,7 +204,7 @@ status_t MediaRecorderClient::setParameters(const String8& params) {
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);
@@ -215,7 +215,7 @@ status_t MediaRecorderClient::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();
@@ -227,7 +227,7 @@ status_t MediaRecorderClient::getMaxAmplitude(int* max)
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);
@@ -238,7 +238,7 @@ status_t MediaRecorderClient::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();
@@ -250,7 +250,7 @@ status_t MediaRecorderClient::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();
@@ -261,7 +261,7 @@ status_t MediaRecorderClient::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();
@@ -272,7 +272,7 @@ status_t MediaRecorderClient::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();
@@ -284,7 +284,7 @@ status_t MediaRecorderClient::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();
@@ -322,7 +322,7 @@ status_t MediaRecorderClient::setListener(const sp<IMediaRecorderClient>& listen
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 f945c6a3..7dbb57f 100644
--- a/media/libmediaplayerservice/MetadataRetrieverClient.cpp
+++ b/media/libmediaplayerservice/MetadataRetrieverClient.cpp
@@ -98,11 +98,11 @@ static sp<MediaMetadataRetrieverBase> createRetriever(player_type playerType)
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;
}
@@ -131,7 +131,7 @@ status_t MetadataRetrieverClient::setDataSource(int fd, int64_t offset, int64_t
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;
}
ALOGV("st_dev = %llu", sb.st_dev);
@@ -141,7 +141,7 @@ status_t MetadataRetrieverClient::setDataSource(int fd, int64_t offset, int64_t
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;
}
@@ -169,24 +169,24 @@ sp<IMemory> MetadataRetrieverClient::getFrameAtTime(int64_t timeUs, int 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;
}
@@ -210,24 +210,24 @@ sp<IMemory> MetadataRetrieverClient::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;
}
@@ -244,7 +244,7 @@ const char* MetadataRetrieverClient::extractMetadata(int keyCode)
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 85b1f9d..d89b5f4 100644
--- a/media/libmediaplayerservice/MidiFile.cpp
+++ b/media/libmediaplayerservice/MidiFile.cpp
@@ -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;
}
@@ -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;
}
@@ -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;
}
@@ -180,7 +180,7 @@ status_t MidiFile::prepare()
}
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();
@@ -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;
}
}
@@ -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);
@@ -292,11 +292,11 @@ status_t MidiFile::getCurrentPosition(int* position)
{
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;
@@ -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;
@@ -443,7 +443,7 @@ int 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;
}
@@ -477,7 +477,7 @@ int MidiFile::render() {
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);
@@ -499,7 +499,7 @@ int MidiFile::render() {
// Write data to the audio hardware
// 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;
}
@@ -523,7 +523,7 @@ int MidiFile::render() {
}
case EAS_STATE_ERROR:
{
- LOGE("MidiFile::render - error");
+ ALOGE("MidiFile::render - error");
sendEvent(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN);
break;
}
diff --git a/media/libmediaplayerservice/MidiMetadataRetriever.cpp b/media/libmediaplayerservice/MidiMetadataRetriever.cpp
index bb65ed4..465209f 100644
--- a/media/libmediaplayerservice/MidiMetadataRetriever.cpp
+++ b/media/libmediaplayerservice/MidiMetadataRetriever.cpp
@@ -63,7 +63,7 @@ const char* MidiMetadataRetriever::extractMetadata(int 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,7 +72,7 @@ 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);
@@ -82,7 +82,7 @@ const char* MidiMetadataRetriever::extractMetadata(int keyCode)
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/StagefrightRecorder.cpp b/media/libmediaplayerservice/StagefrightRecorder.cpp
index 87305ee..4632016 100644
--- a/media/libmediaplayerservice/StagefrightRecorder.cpp
+++ b/media/libmediaplayerservice/StagefrightRecorder.cpp
@@ -97,7 +97,7 @@ status_t StagefrightRecorder::setAudioSource(audio_source_t 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;
}
@@ -114,7 +114,7 @@ status_t StagefrightRecorder::setVideoSource(video_source 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;
}
@@ -131,7 +131,7 @@ status_t StagefrightRecorder::setOutputFormat(output_format 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;
}
@@ -148,7 +148,7 @@ status_t StagefrightRecorder::setAudioEncoder(audio_encoder 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;
}
@@ -165,7 +165,7 @@ status_t StagefrightRecorder::setVideoEncoder(video_encoder 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;
}
@@ -181,7 +181,7 @@ status_t StagefrightRecorder::setVideoEncoder(video_encoder ve) {
status_t StagefrightRecorder::setVideoSize(int width, int 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;
}
@@ -196,7 +196,7 @@ status_t StagefrightRecorder::setVideoFrameRate(int 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;
}
@@ -210,11 +210,11 @@ status_t StagefrightRecorder::setCamera(const sp<ICamera> &camera,
const sp<ICameraRecordingProxy> &proxy) {
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;
}
@@ -231,7 +231,7 @@ status_t StagefrightRecorder::setPreviewSurface(const sp<Surface> &surface) {
}
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.
@@ -245,7 +245,7 @@ status_t StagefrightRecorder::setOutputFile(int fd, int64_t offset, int64_t leng
CHECK_EQ(length, 0);
if (fd < 0) {
- LOGE("Invalid file descriptor: %d", fd);
+ ALOGE("Invalid file descriptor: %d", fd);
return -EBADF;
}
@@ -315,7 +315,7 @@ static void TrimString(String8 *s) {
status_t StagefrightRecorder::setParamAudioSamplingRate(int32_t 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;
}
@@ -327,7 +327,7 @@ status_t StagefrightRecorder::setParamAudioSamplingRate(int32_t sampleRate) {
status_t StagefrightRecorder::setParamAudioNumberOfChannels(int32_t 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;
}
@@ -339,7 +339,7 @@ status_t StagefrightRecorder::setParamAudioNumberOfChannels(int32_t channels) {
status_t StagefrightRecorder::setParamAudioEncodingBitRate(int32_t 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;
}
@@ -354,7 +354,7 @@ status_t StagefrightRecorder::setParamAudioEncodingBitRate(int32_t bitRate) {
status_t StagefrightRecorder::setParamVideoEncodingBitRate(int32_t 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;
}
@@ -370,7 +370,7 @@ status_t StagefrightRecorder::setParamVideoEncodingBitRate(int32_t bitRate) {
status_t StagefrightRecorder::setParamVideoRotation(int32_t 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;
@@ -385,7 +385,7 @@ status_t StagefrightRecorder::setParamMaxFileDurationUs(int64_t 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;
}
@@ -405,7 +405,7 @@ status_t StagefrightRecorder::setParamMaxFileSizeBytes(int64_t 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;
}
@@ -423,13 +423,13 @@ status_t StagefrightRecorder::setParamInterleaveDuration(int32_t durationUs) {
// 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;
@@ -464,7 +464,7 @@ status_t StagefrightRecorder::setParamVideoCameraId(int32_t cameraId) {
status_t StagefrightRecorder::setParamTrackTimeStatus(int64_t 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;
@@ -495,7 +495,7 @@ status_t StagefrightRecorder::setParamMovieTimeScale(int32_t 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;
@@ -508,7 +508,7 @@ status_t StagefrightRecorder::setParamVideoTimeScale(int32_t 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;
@@ -520,7 +520,7 @@ status_t StagefrightRecorder::setParamAudioTimeScale(int32_t 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;
@@ -545,7 +545,7 @@ status_t StagefrightRecorder::setParamTimeBetweenTimeLapseFrameCapture(int64_t t
// 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;
}
@@ -683,7 +683,7 @@ 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;
}
@@ -695,13 +695,13 @@ status_t StagefrightRecorder::setParameters(const String8 &params) {
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;
}
@@ -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;
}
@@ -1667,7 +1667,7 @@ status_t StagefrightRecorder::getMaxAmplitude(int *max) {
ALOGV("getMaxAmplitude");
if (max == NULL) {
- LOGE("Null pointer argument");
+ ALOGE("Null pointer argument");
return BAD_VALUE;
}
diff --git a/media/libmediaplayerservice/TestPlayerStub.cpp b/media/libmediaplayerservice/TestPlayerStub.cpp
index 169e49a..0f0ff65 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;
}
diff --git a/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp b/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp
index 1612df0..22b8847 100644
--- a/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp
+++ b/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp
@@ -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 7d69052..a00aaa5 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
+++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
@@ -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);
@@ -417,7 +417,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) {
if (finalResult == ERROR_END_OF_STREAM) {
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(
diff --git a/media/libmediaplayerservice/nuplayer/StreamingSource.cpp b/media/libmediaplayerservice/nuplayer/StreamingSource.cpp
index c997942..7c9bc5e 100644
--- a/media/libmediaplayerservice/nuplayer/StreamingSource.cpp
+++ b/media/libmediaplayerservice/nuplayer/StreamingSource.cpp
@@ -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 03fb33b..1673ccd 100644
--- a/media/libstagefright/AACWriter.cpp
+++ b/media/libstagefright/AACWriter.cpp
@@ -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;
}
@@ -216,7 +216,7 @@ static bool getSampleRateTableIndex(int sampleRate, uint8_t* tableIndex) {
}
}
- LOGE("Sampling rate %d bps is not supported", sampleRate);
+ ALOGE("Sampling rate %d bps is not supported", sampleRate);
return false;
}
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index 8ca37b8..ca44ea3 100644
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -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;
}
@@ -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,7 +499,7 @@ 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;
}
@@ -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,7 +528,7 @@ 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;
}
@@ -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;
}
@@ -1367,7 +1367,7 @@ bool ACodec::BaseState::onOMXEvent(
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);
@@ -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;
@@ -1874,7 +1874,7 @@ void ACodec::LoadedToIdleState::stateEntered() {
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);
@@ -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);
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/AVIExtractor.cpp b/media/libstagefright/AVIExtractor.cpp
index 91555ba..a3187b7 100644
--- a/media/libstagefright/AVIExtractor.cpp
+++ b/media/libstagefright/AVIExtractor.cpp
@@ -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/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp
index 6fce890..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;
}
@@ -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;
}
@@ -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;
}
}
diff --git a/media/libstagefright/CameraSource.cpp b/media/libstagefright/CameraSource.cpp
index 94d18fa..1850c9c 100755
--- a/media/libstagefright/CameraSource.cpp
+++ b/media/libstagefright/CameraSource.cpp
@@ -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");
@@ -301,7 +301,7 @@ status_t CameraSource::configureCamera(
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.
@@ -330,7 +330,7 @@ status_t CameraSource::configureCamera(
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;
}
@@ -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;
@@ -425,14 +425,14 @@ status_t CameraSource::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;
}
@@ -489,7 +489,7 @@ status_t CameraSource::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());
@@ -579,7 +579,7 @@ status_t CameraSource::start(MetaData *meta) {
ALOGV("start");
CHECK(!mStarted);
if (mInitCheck != OK) {
- LOGE("CameraSource is not initialized yet");
+ ALOGE("CameraSource is not initialized yet");
return mInitCheck;
}
diff --git a/media/libstagefright/CameraSourceTimeLapse.cpp b/media/libstagefright/CameraSourceTimeLapse.cpp
index 8bf18b2..263ab50 100644
--- a/media/libstagefright/CameraSourceTimeLapse.cpp
+++ b/media/libstagefright/CameraSourceTimeLapse.cpp
@@ -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;
}
}
diff --git a/media/libstagefright/FLACExtractor.cpp b/media/libstagefright/FLACExtractor.cpp
index 381a2d1..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:
@@ -373,7 +373,7 @@ void FLACParser::metadataCallback(const FLAC__StreamMetadata *metadata)
void FLACParser::errorCallback(FLAC__StreamDecoderErrorStatus status)
{
- LOGE("FLACParser::errorCallback status=%d", status);
+ ALOGE("FLACParser::errorCallback status=%d", status);
mErrorStatus = status;
}
@@ -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,13 +603,13 @@ 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;
}
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;
}
}
@@ -620,13 +620,13 @@ MediaBuffer *FLACParser::readBuffer(bool doSeek, FLAC__uint64 sample)
// 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);
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 5950b37..d7eea3f 100644
--- a/media/libstagefright/HTTPBase.cpp
+++ b/media/libstagefright/HTTPBase.cpp
@@ -111,7 +111,7 @@ 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;
}
@@ -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 cb82deb..2215c07 100644
--- a/media/libstagefright/MP3Extractor.cpp
+++ b/media/libstagefright/MP3Extractor.cpp
@@ -487,7 +487,7 @@ status_t MP3Source::read(
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/MPEG4Extractor.cpp b/media/libstagefright/MPEG4Extractor.cpp
index 00f8718..22bdd95 100644
--- a/media/libstagefright/MPEG4Extractor.cpp
+++ b/media/libstagefright/MPEG4Extractor.cpp
@@ -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;
}
@@ -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;
}
@@ -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;
diff --git a/media/libstagefright/MPEG4Writer.cpp b/media/libstagefright/MPEG4Writer.cpp
index 8b270cb..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());
@@ -1525,7 +1525,7 @@ status_t MPEG4Writer::Track::pause() {
status_t MPEG4Writer::Track::stop() {
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;
}
@@ -1596,14 +1596,14 @@ const uint8_t *MPEG4Writer::Track::parseParamSet(
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;
}
}
@@ -1632,7 +1632,7 @@ status_t MPEG4Writer::Track::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;
}
@@ -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;
}
@@ -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;
}
@@ -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;
}
}
@@ -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.");
}
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/NuCachedSource2.cpp b/media/libstagefright/NuCachedSource2.cpp
index 6e5f8ab..249c298 100644
--- a/media/libstagefright/NuCachedSource2.cpp
+++ b/media/libstagefright/NuCachedSource2.cpp
@@ -317,7 +317,7 @@ 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) {
@@ -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;
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index 2244c6d..60d9bb7 100755
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -181,7 +181,7 @@ static const CodecInfo kEncoderInfo[] = {
#define CODEC_LOGI(x, ...) ALOGI("[%s] "x, mComponentName, ##__VA_ARGS__)
#define CODEC_LOGV(x, ...) ALOGV("[%s] "x, mComponentName, ##__VA_ARGS__)
-#define CODEC_LOGE(x, ...) LOGE("[%s] "x, mComponentName, ##__VA_ARGS__)
+#define CODEC_LOGE(x, ...) ALOGE("[%s] "x, mComponentName, ##__VA_ARGS__)
struct OMXCodecObserver : public BnOMXObserver {
OMXCodecObserver() {
@@ -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)) {
@@ -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.");
}
@@ -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.");
}
@@ -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;
}
@@ -1881,11 +1881,11 @@ 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;
}
}
@@ -1894,7 +1894,7 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() {
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;
}
diff --git a/media/libstagefright/OggExtractor.cpp b/media/libstagefright/OggExtractor.cpp
index b7a9faf..73efc27 100644
--- a/media/libstagefright/OggExtractor.cpp
+++ b/media/libstagefright/OggExtractor.cpp
@@ -899,7 +899,7 @@ static void extractAlbumArt(
uint8_t *flac = DecodeBase64((const char *)data, size, &flacSize);
if (flac == NULL) {
- LOGE("malformed base64 encoded data.");
+ ALOGE("malformed base64 encoded data.");
return;
}
diff --git a/media/libstagefright/SampleIterator.cpp b/media/libstagefright/SampleIterator.cpp
index 7b8e008..81ec5c1 100644
--- a/media/libstagefright/SampleIterator.cpp
+++ b/media/libstagefright/SampleIterator.cpp
@@ -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 59624d0..8d80d63 100644
--- a/media/libstagefright/SampleTable.cpp
+++ b/media/libstagefright/SampleTable.cpp
@@ -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 4345184..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;
diff --git a/media/libstagefright/StagefrightMetadataRetriever.cpp b/media/libstagefright/StagefrightMetadataRetriever.cpp
index 8875af0..43bfd9e 100644
--- a/media/libstagefright/StagefrightMetadataRetriever.cpp
+++ b/media/libstagefright/StagefrightMetadataRetriever.cpp
@@ -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;
}
@@ -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;
@@ -292,7 +292,7 @@ VideoFrame *StagefrightMetadataRetriever::getFrameAtTime(
int32_t drm = 0;
if (fileMeta->findInt32(kKeyIsDRM, &drm) && drm != 0) {
- LOGE("frame grab not allowed.");
+ ALOGE("frame grab not allowed.");
return NULL;
}
diff --git a/media/libstagefright/SurfaceMediaSource.cpp b/media/libstagefright/SurfaceMediaSource.cpp
index 9ab6552..48df058 100644
--- a/media/libstagefright/SurfaceMediaSource.cpp
+++ b/media/libstagefright/SurfaceMediaSource.cpp
@@ -110,7 +110,7 @@ status_t SurfaceMediaSource::setBufferCountServer(int bufferCount) {
status_t SurfaceMediaSource::setBufferCount(int bufferCount) {
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;
}
}
@@ -153,7 +153,7 @@ status_t SurfaceMediaSource::requestBuffer(int slot, sp<GraphicBuffer>* buf) {
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;
}
@@ -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;
}
@@ -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;
@@ -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;
}
@@ -388,7 +388,7 @@ status_t SurfaceMediaSource::connect(int api,
Mutex::Autolock lock(mMutex);
if (mStopped) {
- LOGE("Connect: SurfaceMediaSource has been stopped!");
+ ALOGE("Connect: SurfaceMediaSource has been stopped!");
return NO_INIT;
}
@@ -429,7 +429,7 @@ status_t SurfaceMediaSource::disconnect(int api) {
Mutex::Autolock lock(mMutex);
if (mStopped) {
- LOGE("disconnect: SurfaceMediaSoource is already stopped!");
+ ALOGE("disconnect: SurfaceMediaSoource is already stopped!");
return NO_INIT;
}
@@ -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;
}
@@ -559,11 +559,11 @@ void SurfaceMediaSource::cancelBuffer(int bufIndex) {
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;
}
@@ -812,7 +812,7 @@ void SurfaceMediaSource::passMetadataBufferLocked(MediaBuffer **buffer) {
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;
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/codecs/aacdec/SoftAAC.cpp b/media/libstagefright/codecs/aacdec/SoftAAC.cpp
index f3283a4..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;
}
diff --git a/media/libstagefright/codecs/aacenc/AACEncoder.cpp b/media/libstagefright/codecs/aacenc/AACEncoder.cpp
index a94ccab..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,7 +106,7 @@ 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;
}
@@ -117,7 +117,7 @@ status_t AACEncoder::setAudioSpecificConfigData() {
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;
}
@@ -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;
}
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 2f158b6..3afbc4f 100644
--- a/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp
+++ b/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp
@@ -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;
}
diff --git a/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp b/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp
index ebc2e5d..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;
}
@@ -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;
diff --git a/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp b/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp
index 40f6f1a..e202a2b 100644
--- a/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp
+++ b/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp
@@ -41,7 +41,7 @@ static status_t ConvertOmxAvcProfileToAvcSpecProfile(
*pvProfile = AVC_BASELINE;
return OK;
default:
- LOGE("Unsupported omx profile: %d", omxProfile);
+ ALOGE("Unsupported omx profile: %d", omxProfile);
}
return BAD_VALUE;
}
@@ -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;
@@ -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;
}
@@ -343,7 +343,7 @@ status_t AVCEncoder::start(MetaData *params) {
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;
}
@@ -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;
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 be669f2..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;
}
@@ -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;
diff --git a/media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp b/media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp
index 2c4b63d..d538603 100644
--- a/media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp
+++ b/media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp
@@ -43,7 +43,7 @@ static status_t ConvertOmxProfileLevel(
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 {
ALOGW("PV does not support level configuration for H263");
@@ -52,7 +52,7 @@ static status_t ConvertOmxProfileLevel(
}
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;
}
}
@@ -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;
}
@@ -319,7 +319,7 @@ status_t M4vH263Encoder::start(MetaData *params) {
}
if (!PVInitVideoEncoder(mHandle, mEncParams)) {
- LOGE("Failed to initialize the encoder");
+ ALOGE("Failed to initialize the encoder");
return UNKNOWN_ERROR;
}
@@ -386,7 +386,7 @@ 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;
}
ALOGV("Output VOL header: %d bytes", dataLength);
@@ -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 43fb30a..ad55295 100644
--- a/media/libstagefright/codecs/mp3dec/SoftMP3.cpp
+++ b/media/libstagefright/codecs/mp3dec/SoftMP3.cpp
@@ -223,10 +223,10 @@ void SoftMP3::onQueueFilled(OMX_U32 portIndex) {
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 c5fe199..bf9ab3a 100644
--- a/media/libstagefright/codecs/on2/dec/SoftVPX.cpp
+++ b/media/libstagefright/codecs/on2/dec/SoftVPX.cpp
@@ -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 74e893f..ac88107 100644
--- a/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp
+++ b/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp
@@ -360,7 +360,7 @@ void SoftVorbis::onQueueFilled(OMX_U32 portIndex) {
kMaxNumSamplesPerBuffer);
if (numFrames < 0) {
- LOGE("vorbis_dsp_pcmout returned %d", numFrames);
+ ALOGE("vorbis_dsp_pcmout returned %d", numFrames);
numFrames = 0;
}
}
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/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 d1d8eb2..0df66f1 100644
--- a/media/libstagefright/httplive/LiveSession.cpp
+++ b/media/libstagefright/httplive/LiveSession.cpp
@@ -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;
@@ -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;
}
@@ -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;
}
@@ -635,7 +635,7 @@ rinse_repeat:
// 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);
@@ -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 71f998c..5e30488 100644
--- a/media/libstagefright/httplive/M3UParser.cpp
+++ b/media/libstagefright/httplive/M3UParser.cpp
@@ -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 943a937..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;
}
diff --git a/media/libstagefright/matroska/MatroskaExtractor.cpp b/media/libstagefright/matroska/MatroskaExtractor.cpp
index f215f52..4fbf47e 100644
--- a/media/libstagefright/matroska/MatroskaExtractor.cpp
+++ b/media/libstagefright/matroska/MatroskaExtractor.cpp
@@ -245,7 +245,7 @@ void BlockIterator::advance_l() {
if (res < 0) {
// I/O error
- LOGE("Cluster::Parse returned result %ld", res);
+ ALOGE("Cluster::Parse returned result %ld", res);
mCluster = NULL;
break;
diff --git a/media/libstagefright/mpeg2ts/ATSParser.cpp b/media/libstagefright/mpeg2ts/ATSParser.cpp
index 576693a..3f4de1f 100644
--- a/media/libstagefright/mpeg2ts/ATSParser.cpp
+++ b/media/libstagefright/mpeg2ts/ATSParser.cpp
@@ -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);
diff --git a/media/libstagefright/mpeg2ts/MPEG2PSExtractor.cpp b/media/libstagefright/mpeg2ts/MPEG2PSExtractor.cpp
index 727c931..dd714c9 100644
--- a/media/libstagefright/mpeg2ts/MPEG2PSExtractor.cpp
+++ b/media/libstagefright/mpeg2ts/MPEG2PSExtractor.cpp
@@ -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);
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 31b1a2f..8938e33 100644
--- a/media/libstagefright/omx/OMXNodeInstance.cpp
+++ b/media/libstagefright/omx/OMXNodeInstance.cpp
@@ -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;
}
@@ -179,7 +179,7 @@ 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;
}
@@ -209,7 +209,7 @@ status_t OMXNodeInstance::freeNode(OMXMaster *master) {
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);
@@ -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);
diff --git a/media/libstagefright/omx/SoftOMXPlugin.cpp b/media/libstagefright/omx/SoftOMXPlugin.cpp
index 8aeb763..da3ae42 100644
--- a/media/libstagefright/omx/SoftOMXPlugin.cpp
+++ b/media/libstagefright/omx/SoftOMXPlugin.cpp
@@ -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 3a15a5e..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) \
diff --git a/media/libstagefright/rtsp/ARTPSession.cpp b/media/libstagefright/rtsp/ARTPSession.cpp
index 5783beb..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;
}
diff --git a/media/libstagefright/rtsp/ARTSPConnection.cpp b/media/libstagefright/rtsp/ARTSPConnection.cpp
index b5d2e9f..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();
@@ -250,7 +250,7 @@ void ARTSPConnection::onConnect(const sp<AMessage> &msg) {
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);
@@ -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;
}
}
@@ -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/MyHandler.h b/media/libstagefright/rtsp/MyHandler.h
index cda787e..2391c5c 100644
--- a/media/libstagefright/rtsp/MyHandler.h
+++ b/media/libstagefright/rtsp/MyHandler.h
@@ -269,7 +269,7 @@ struct MyHandler : public AHandler {
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;
@@ -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());
@@ -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,7 +338,7 @@ 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;
}
@@ -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");
@@ -988,7 +988,7 @@ struct MyHandler : public AHandler {
}
if (result != OK) {
- LOGE("seek failed, aborting.");
+ ALOGE("seek failed, aborting.");
(new AMessage('abor', id()))->post();
}
diff --git a/media/libstagefright/rtsp/UDPPusher.cpp b/media/libstagefright/rtsp/UDPPusher.cpp
index 6a4c87b..47ea6f1 100644
--- a/media/libstagefright/rtsp/UDPPusher.cpp
+++ b/media/libstagefright/rtsp/UDPPusher.cpp
@@ -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;
}
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 fbb606d..ac37b28 100644
--- a/media/libstagefright/tests/DummyRecorder.cpp
+++ b/media/libstagefright/tests/DummyRecorder.cpp
@@ -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;
diff --git a/media/libstagefright/tests/SurfaceMediaSource_test.cpp b/media/libstagefright/tests/SurfaceMediaSource_test.cpp
index 6be5e9a..76b507f 100644
--- a/media/libstagefright/tests/SurfaceMediaSource_test.cpp
+++ b/media/libstagefright/tests/SurfaceMediaSource_test.cpp
@@ -731,7 +731,7 @@ TEST_F(SurfaceMediaSourceTest, DISABLED_EncodingFromCpuYV12BufferNpotWriteMediaS
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);
@@ -861,7 +861,7 @@ TEST_F(SurfaceMediaSourceGLTest, EncodingFromGLRgbaSameImageEachBufNpotWrite) {
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);
@@ -904,7 +904,7 @@ TEST_F(SurfaceMediaSourceGLTest, EncodingFromGLRgbaDiffImageEachBufNpotWrite) {
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);
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/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 2fc6ba8..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;
}
@@ -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;
}
@@ -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);
@@ -669,7 +669,7 @@ bool MtpDevice::readObject(MtpObjectHandle handle, const char* destPath, int gro
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);
diff --git a/media/mtp/MtpPacket.cpp b/media/mtp/MtpPacket.cpp
index 39815d4..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;
@@ -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 d06f214..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;
}
}
@@ -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 838c13e..5606187 100644
--- a/media/mtp/MtpServer.cpp
+++ b/media/mtp/MtpServer.cpp
@@ -179,7 +179,7 @@ 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;
@@ -200,7 +200,7 @@ void MtpServer::run() {
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;
@@ -214,7 +214,7 @@ void MtpServer::run() {
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;
@@ -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;
}
@@ -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;
}
@@ -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));
}
}
@@ -1098,7 +1098,7 @@ 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;
}
@@ -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/tests/omxjpegdecoder/omx_jpeg_decoder.cpp b/media/tests/omxjpegdecoder/omx_jpeg_decoder.cpp
index 2735a55..42df66c 100644
--- a/media/tests/omxjpegdecoder/omx_jpeg_decoder.cpp
+++ b/media/tests/omxjpegdecoder/omx_jpeg_decoder.cpp
@@ -141,7 +141,7 @@ bool OmxJpegImageDecoder::decodeSource(sp<MediaSource> decoder,
const sp<MediaSource>& source, SkBitmap* bm) {
status_t rt = decoder->start();
if (rt != OK) {
- LOGE("Cannot start OMX Decoder!");
+ ALOGE("Cannot start OMX Decoder!");
return false;
}
int64_t startTime = getNowUs();