diff options
Diffstat (limited to 'media/jni')
-rw-r--r-- | media/jni/android_media_MediaMetadataRetriever.cpp | 12 | ||||
-rw-r--r-- | media/jni/android_media_MediaPlayer.cpp | 28 | ||||
-rw-r--r-- | media/jni/android_media_MediaRecorder.cpp | 8 | ||||
-rw-r--r-- | media/jni/android_media_MediaScanner.cpp | 8 | ||||
-rw-r--r-- | media/jni/android_media_Utils.cpp | 2 | ||||
-rw-r--r-- | media/jni/android_mtp_MtpDatabase.cpp | 74 | ||||
-rw-r--r-- | media/jni/android_mtp_MtpDevice.cpp | 82 | ||||
-rw-r--r-- | media/jni/android_mtp_MtpServer.cpp | 32 | ||||
-rw-r--r-- | media/jni/audioeffect/android_media_AudioEffect.cpp | 48 | ||||
-rw-r--r-- | media/jni/audioeffect/android_media_Visualizer.cpp | 18 | ||||
-rwxr-xr-x | media/jni/mediaeditor/VideoEditorMain.cpp | 20 | ||||
-rw-r--r-- | media/jni/soundpool/SoundPool.cpp | 8 | ||||
-rw-r--r-- | media/jni/soundpool/android_media_SoundPool.cpp | 8 |
13 files changed, 174 insertions, 174 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; } |