summaryrefslogtreecommitdiffstats
path: root/media/jni
diff options
context:
space:
mode:
Diffstat (limited to 'media/jni')
-rw-r--r--media/jni/android_media_MediaMetadataRetriever.cpp36
-rw-r--r--media/jni/android_media_MediaPlayer.cpp80
-rw-r--r--media/jni/android_media_MediaProfiles.cpp38
-rw-r--r--media/jni/android_media_MediaRecorder.cpp54
-rw-r--r--media/jni/android_media_MediaScanner.cpp32
-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.cpp88
-rw-r--r--media/jni/android_mtp_MtpServer.cpp32
-rw-r--r--media/jni/audioeffect/android_media_AudioEffect.cpp82
-rw-r--r--media/jni/audioeffect/android_media_Visualizer.cpp38
-rwxr-xr-xmedia/jni/mediaeditor/VideoEditorLogging.h2
-rwxr-xr-xmedia/jni/mediaeditor/VideoEditorMain.cpp110
-rw-r--r--media/jni/soundpool/SoundPool.cpp122
-rw-r--r--media/jni/soundpool/SoundPoolThread.cpp12
-rw-r--r--media/jni/soundpool/android_media_SoundPool.cpp40
16 files changed, 421 insertions, 421 deletions
diff --git a/media/jni/android_media_MediaMetadataRetriever.cpp b/media/jni/android_media_MediaMetadataRetriever.cpp
index 73aea2a..0dc3b65 100644
--- a/media/jni/android_media_MediaMetadataRetriever.cpp
+++ b/media/jni/android_media_MediaMetadataRetriever.cpp
@@ -83,7 +83,7 @@ android_media_MediaMetadataRetriever_setDataSourceAndHeaders(
JNIEnv *env, jobject thiz, jstring path,
jobjectArray keys, jobjectArray values) {
- LOGV("setDataSource");
+ ALOGV("setDataSource");
MediaMetadataRetriever* retriever = getRetriever(env, thiz);
if (retriever == 0) {
jniThrowException(
@@ -140,7 +140,7 @@ static void android_media_MediaMetadataRetriever_setDataSource(
static void android_media_MediaMetadataRetriever_setDataSourceFD(JNIEnv *env, jobject thiz, jobject fileDescriptor, jlong offset, jlong length)
{
- LOGV("setDataSource");
+ ALOGV("setDataSource");
MediaMetadataRetriever* retriever = getRetriever(env, thiz);
if (retriever == 0) {
jniThrowException(env, "java/lang/IllegalStateException", "No retriever available");
@@ -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;
@@ -224,7 +224,7 @@ static void rotate(T *dst, const T *src, size_t width, size_t height, int angle)
static jobject android_media_MediaMetadataRetriever_getFrameAtTime(JNIEnv *env, jobject thiz, jlong timeUs, jint option)
{
- LOGV("getFrameAtTime: %lld us option: %d", timeUs, option);
+ ALOGV("getFrameAtTime: %lld us option: %d", timeUs, option);
MediaMetadataRetriever* retriever = getRetriever(env, thiz);
if (retriever == 0) {
jniThrowException(env, "java/lang/IllegalStateException", "No retriever available");
@@ -238,11 +238,11 @@ 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;
}
- LOGV("Dimension = %dx%d and bytes = %d",
+ ALOGV("Dimension = %dx%d and bytes = %d",
videoFrame->mDisplayWidth,
videoFrame->mDisplayHeight,
videoFrame->mSize);
@@ -289,7 +289,7 @@ static jobject android_media_MediaMetadataRetriever_getFrameAtTime(JNIEnv *env,
displayWidth = videoFrame->mDisplayHeight;
displayHeight = videoFrame->mDisplayWidth;
}
- LOGV("Bitmap dimension is scaled from %dx%d to %dx%d",
+ ALOGV("Bitmap dimension is scaled from %dx%d to %dx%d",
width, height, displayWidth, displayHeight);
jobject scaledBitmap = env->CallStaticObjectMethod(fields.bitmapClazz,
fields.createScaledBitmapMethod,
@@ -306,7 +306,7 @@ static jobject android_media_MediaMetadataRetriever_getFrameAtTime(JNIEnv *env,
static jbyteArray android_media_MediaMetadataRetriever_getEmbeddedPicture(
JNIEnv *env, jobject thiz, jint pictureType)
{
- LOGV("getEmbeddedPicture: %d", pictureType);
+ ALOGV("getEmbeddedPicture: %d", pictureType);
MediaMetadataRetriever* retriever = getRetriever(env, thiz);
if (retriever == 0) {
jniThrowException(env, "java/lang/IllegalStateException", "No retriever available");
@@ -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) {
@@ -345,7 +345,7 @@ static jbyteArray android_media_MediaMetadataRetriever_getEmbeddedPicture(
static jobject android_media_MediaMetadataRetriever_extractMetadata(JNIEnv *env, jobject thiz, jint keyCode)
{
- LOGV("extractMetadata");
+ ALOGV("extractMetadata");
MediaMetadataRetriever* retriever = getRetriever(env, thiz);
if (retriever == 0) {
jniThrowException(env, "java/lang/IllegalStateException", "No retriever available");
@@ -353,16 +353,16 @@ static jobject android_media_MediaMetadataRetriever_extractMetadata(JNIEnv *env,
}
const char* value = retriever->extractMetadata(keyCode);
if (!value) {
- LOGV("extractMetadata: Metadata is not found");
+ ALOGV("extractMetadata: Metadata is not found");
return NULL;
}
- LOGV("extractMetadata: value (%s) for keyCode(%d)", value, keyCode);
+ ALOGV("extractMetadata: value (%s) for keyCode(%d)", value, keyCode);
return env->NewStringUTF(value);
}
static void android_media_MediaMetadataRetriever_release(JNIEnv *env, jobject thiz)
{
- LOGV("release");
+ ALOGV("release");
Mutex::Autolock lock(sLock);
MediaMetadataRetriever* retriever = getRetriever(env, thiz);
delete retriever;
@@ -371,7 +371,7 @@ static void android_media_MediaMetadataRetriever_release(JNIEnv *env, jobject th
static void android_media_MediaMetadataRetriever_native_finalize(JNIEnv *env, jobject thiz)
{
- LOGV("native_finalize");
+ ALOGV("native_finalize");
// No lock is needed, since android_media_MediaMetadataRetriever_release() is protected
android_media_MediaMetadataRetriever_release(env, thiz);
}
@@ -436,7 +436,7 @@ static void android_media_MediaMetadataRetriever_native_init(JNIEnv *env)
static void android_media_MediaMetadataRetriever_native_setup(JNIEnv *env, jobject thiz)
{
- LOGV("native_setup");
+ ALOGV("native_setup");
MediaMetadataRetriever* retriever = new MediaMetadataRetriever();
if (retriever == 0) {
jniThrowException(env, "java/lang/RuntimeException", "Out of memory");
diff --git a/media/jni/android_media_MediaPlayer.cpp b/media/jni/android_media_MediaPlayer.cpp
index 63cbf5e..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;
}
@@ -191,7 +191,7 @@ android_media_MediaPlayer_setDataSourceAndHeaders(
if (tmp == NULL) { // Out of memory
return;
}
- LOGV("setDataSource: path %s", tmp);
+ ALOGV("setDataSource: path %s", tmp);
String8 pathStr(tmp);
env->ReleaseStringUTFChars(path, tmp);
@@ -234,7 +234,7 @@ android_media_MediaPlayer_setDataSourceFD(JNIEnv *env, jobject thiz, jobject fil
return;
}
int fd = jniGetFDFromFileDescriptor(env, fileDescriptor);
- LOGV("setDataSourceFD: fd %d", fd);
+ ALOGV("setDataSourceFD: fd %d", fd);
process_media_player_call( env, thiz, mp->setDataSource(fd, offset, length), "java/io/IOException", "setDataSourceFD failed." );
}
@@ -336,7 +336,7 @@ android_media_MediaPlayer_prepareAsync(JNIEnv *env, jobject thiz)
static void
android_media_MediaPlayer_start(JNIEnv *env, jobject thiz)
{
- LOGV("start");
+ ALOGV("start");
sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
if (mp == NULL ) {
jniThrowException(env, "java/lang/IllegalStateException", NULL);
@@ -348,7 +348,7 @@ android_media_MediaPlayer_start(JNIEnv *env, jobject thiz)
static void
android_media_MediaPlayer_stop(JNIEnv *env, jobject thiz)
{
- LOGV("stop");
+ ALOGV("stop");
sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
if (mp == NULL ) {
jniThrowException(env, "java/lang/IllegalStateException", NULL);
@@ -360,7 +360,7 @@ android_media_MediaPlayer_stop(JNIEnv *env, jobject thiz)
static void
android_media_MediaPlayer_pause(JNIEnv *env, jobject thiz)
{
- LOGV("pause");
+ ALOGV("pause");
sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
if (mp == NULL ) {
jniThrowException(env, "java/lang/IllegalStateException", NULL);
@@ -379,7 +379,7 @@ android_media_MediaPlayer_isPlaying(JNIEnv *env, jobject thiz)
}
const jboolean is_playing = mp->isPlaying();
- LOGV("isPlaying: %d", is_playing);
+ ALOGV("isPlaying: %d", is_playing);
return is_playing;
}
@@ -391,7 +391,7 @@ android_media_MediaPlayer_seekTo(JNIEnv *env, jobject thiz, int msec)
jniThrowException(env, "java/lang/IllegalStateException", NULL);
return;
}
- LOGV("seekTo: %d(msec)", msec);
+ ALOGV("seekTo: %d(msec)", msec);
process_media_player_call( env, thiz, mp->seekTo(msec), NULL, NULL );
}
@@ -405,10 +405,10 @@ android_media_MediaPlayer_getVideoWidth(JNIEnv *env, jobject thiz)
}
int w;
if (0 != mp->getVideoWidth(&w)) {
- LOGE("getVideoWidth failed");
+ ALOGE("getVideoWidth failed");
w = 0;
}
- LOGV("getVideoWidth: %d", w);
+ ALOGV("getVideoWidth: %d", w);
return w;
}
@@ -422,10 +422,10 @@ android_media_MediaPlayer_getVideoHeight(JNIEnv *env, jobject thiz)
}
int h;
if (0 != mp->getVideoHeight(&h)) {
- LOGE("getVideoHeight failed");
+ ALOGE("getVideoHeight failed");
h = 0;
}
- LOGV("getVideoHeight: %d", h);
+ ALOGV("getVideoHeight: %d", h);
return h;
}
@@ -440,7 +440,7 @@ android_media_MediaPlayer_getCurrentPosition(JNIEnv *env, jobject thiz)
}
int msec;
process_media_player_call( env, thiz, mp->getCurrentPosition(&msec), NULL, NULL );
- LOGV("getCurrentPosition: %d (msec)", msec);
+ ALOGV("getCurrentPosition: %d (msec)", msec);
return msec;
}
@@ -454,14 +454,14 @@ android_media_MediaPlayer_getDuration(JNIEnv *env, jobject thiz)
}
int msec;
process_media_player_call( env, thiz, mp->getDuration(&msec), NULL, NULL );
- LOGV("getDuration: %d (msec)", msec);
+ ALOGV("getDuration: %d (msec)", msec);
return msec;
}
static void
android_media_MediaPlayer_reset(JNIEnv *env, jobject thiz)
{
- LOGV("reset");
+ ALOGV("reset");
sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
if (mp == NULL ) {
jniThrowException(env, "java/lang/IllegalStateException", NULL);
@@ -473,7 +473,7 @@ android_media_MediaPlayer_reset(JNIEnv *env, jobject thiz)
static void
android_media_MediaPlayer_setAudioStreamType(JNIEnv *env, jobject thiz, int streamtype)
{
- LOGV("setAudioStreamType: %d", streamtype);
+ ALOGV("setAudioStreamType: %d", streamtype);
sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
if (mp == NULL ) {
jniThrowException(env, "java/lang/IllegalStateException", NULL);
@@ -485,7 +485,7 @@ android_media_MediaPlayer_setAudioStreamType(JNIEnv *env, jobject thiz, int stre
static void
android_media_MediaPlayer_setLooping(JNIEnv *env, jobject thiz, jboolean looping)
{
- LOGV("setLooping: %d", looping);
+ ALOGV("setLooping: %d", looping);
sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
if (mp == NULL ) {
jniThrowException(env, "java/lang/IllegalStateException", NULL);
@@ -497,7 +497,7 @@ android_media_MediaPlayer_setLooping(JNIEnv *env, jobject thiz, jboolean looping
static jboolean
android_media_MediaPlayer_isLooping(JNIEnv *env, jobject thiz)
{
- LOGV("isLooping");
+ ALOGV("isLooping");
sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
if (mp == NULL ) {
jniThrowException(env, "java/lang/IllegalStateException", NULL);
@@ -509,7 +509,7 @@ android_media_MediaPlayer_isLooping(JNIEnv *env, jobject thiz)
static void
android_media_MediaPlayer_setVolume(JNIEnv *env, jobject thiz, float leftVolume, float rightVolume)
{
- LOGV("setVolume: left %f right %f", leftVolume, rightVolume);
+ ALOGV("setVolume: left %f right %f", leftVolume, rightVolume);
sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
if (mp == NULL ) {
jniThrowException(env, "java/lang/IllegalStateException", NULL);
@@ -625,7 +625,7 @@ android_media_MediaPlayer_native_init(JNIEnv *env)
static void
android_media_MediaPlayer_native_setup(JNIEnv *env, jobject thiz, jobject weak_this)
{
- LOGV("native_setup");
+ ALOGV("native_setup");
sp<MediaPlayer> mp = new MediaPlayer();
if (mp == NULL) {
jniThrowException(env, "java/lang/RuntimeException", "Out of memory");
@@ -643,7 +643,7 @@ android_media_MediaPlayer_native_setup(JNIEnv *env, jobject thiz, jobject weak_t
static void
android_media_MediaPlayer_release(JNIEnv *env, jobject thiz)
{
- LOGV("release");
+ ALOGV("release");
decVideoSurfaceRef(env, thiz);
sp<MediaPlayer> mp = setMediaPlayer(env, thiz, 0);
if (mp != NULL) {
@@ -656,16 +656,16 @@ android_media_MediaPlayer_release(JNIEnv *env, jobject thiz)
static void
android_media_MediaPlayer_native_finalize(JNIEnv *env, jobject thiz)
{
- LOGV("native_finalize");
+ ALOGV("native_finalize");
sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
if (mp != NULL) {
- LOGW("MediaPlayer finalized without being released");
+ ALOGW("MediaPlayer finalized without being released");
}
android_media_MediaPlayer_release(env, thiz);
}
static void android_media_MediaPlayer_set_audio_session_id(JNIEnv *env, jobject thiz, jint sessionId) {
- LOGV("set_session_id(): %d", sessionId);
+ ALOGV("set_session_id(): %d", sessionId);
sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
if (mp == NULL ) {
jniThrowException(env, "java/lang/IllegalStateException", NULL);
@@ -675,7 +675,7 @@ static void android_media_MediaPlayer_set_audio_session_id(JNIEnv *env, jobject
}
static jint android_media_MediaPlayer_get_audio_session_id(JNIEnv *env, jobject thiz) {
- LOGV("get_session_id()");
+ ALOGV("get_session_id()");
sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
if (mp == NULL ) {
jniThrowException(env, "java/lang/IllegalStateException", NULL);
@@ -688,7 +688,7 @@ static jint android_media_MediaPlayer_get_audio_session_id(JNIEnv *env, jobject
static void
android_media_MediaPlayer_setAuxEffectSendLevel(JNIEnv *env, jobject thiz, jfloat level)
{
- LOGV("setAuxEffectSendLevel: level %f", level);
+ ALOGV("setAuxEffectSendLevel: level %f", level);
sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
if (mp == NULL ) {
jniThrowException(env, "java/lang/IllegalStateException", NULL);
@@ -698,7 +698,7 @@ android_media_MediaPlayer_setAuxEffectSendLevel(JNIEnv *env, jobject thiz, jfloa
}
static void android_media_MediaPlayer_attachAuxEffect(JNIEnv *env, jobject thiz, jint effectId) {
- LOGV("attachAuxEffect(): %d", effectId);
+ ALOGV("attachAuxEffect(): %d", effectId);
sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
if (mp == NULL ) {
jniThrowException(env, "java/lang/IllegalStateException", NULL);
@@ -725,7 +725,7 @@ android_media_MediaPlayer_pullBatteryData(JNIEnv *env, jobject thiz, jobject jav
static jboolean
android_media_MediaPlayer_setParameter(JNIEnv *env, jobject thiz, jint key, jobject java_request)
{
- LOGV("setParameter: key %d", key);
+ ALOGV("setParameter: key %d", key);
sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
if (mp == NULL ) {
jniThrowException(env, "java/lang/IllegalStateException", NULL);
@@ -744,7 +744,7 @@ android_media_MediaPlayer_setParameter(JNIEnv *env, jobject thiz, jint key, jobj
static void
android_media_MediaPlayer_getParameter(JNIEnv *env, jobject thiz, jint key, jobject java_reply)
{
- LOGV("getParameter: key %d", key);
+ ALOGV("getParameter: key %d", key);
sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
if (mp == NULL ) {
jniThrowException(env, "java/lang/IllegalStateException", NULL);
@@ -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_MediaProfiles.cpp b/media/jni/android_media_MediaProfiles.cpp
index 7ed0050..3fbb8ba 100644
--- a/media/jni/android_media_MediaProfiles.cpp
+++ b/media/jni/android_media_MediaProfiles.cpp
@@ -36,7 +36,7 @@ MediaProfiles *sProfiles = NULL;
static void
android_media_MediaProfiles_native_init(JNIEnv *env)
{
- LOGV("native_init");
+ ALOGV("native_init");
Mutex::Autolock lock(sLock);
if (sProfiles == NULL) {
@@ -47,14 +47,14 @@ android_media_MediaProfiles_native_init(JNIEnv *env)
static jint
android_media_MediaProfiles_native_get_num_file_formats(JNIEnv *env, jobject thiz)
{
- LOGV("native_get_num_file_formats");
+ ALOGV("native_get_num_file_formats");
return sProfiles->getOutputFileFormats().size();
}
static jint
android_media_MediaProfiles_native_get_file_format(JNIEnv *env, jobject thiz, jint index)
{
- LOGV("native_get_file_format: %d", index);
+ ALOGV("native_get_file_format: %d", index);
Vector<output_format> formats = sProfiles->getOutputFileFormats();
int nSize = formats.size();
if (index < 0 || index >= nSize) {
@@ -67,14 +67,14 @@ android_media_MediaProfiles_native_get_file_format(JNIEnv *env, jobject thiz, ji
static jint
android_media_MediaProfiles_native_get_num_video_encoders(JNIEnv *env, jobject thiz)
{
- LOGV("native_get_num_video_encoders");
+ ALOGV("native_get_num_video_encoders");
return sProfiles->getVideoEncoders().size();
}
static jobject
android_media_MediaProfiles_native_get_video_encoder_cap(JNIEnv *env, jobject thiz, jint index)
{
- LOGV("native_get_video_encoder_cap: %d", index);
+ ALOGV("native_get_video_encoder_cap: %d", index);
Vector<video_encoder> encoders = sProfiles->getVideoEncoders();
int nSize = encoders.size();
if (index < 0 || index >= nSize) {
@@ -118,14 +118,14 @@ android_media_MediaProfiles_native_get_video_encoder_cap(JNIEnv *env, jobject th
static jint
android_media_MediaProfiles_native_get_num_audio_encoders(JNIEnv *env, jobject thiz)
{
- LOGV("native_get_num_audio_encoders");
+ ALOGV("native_get_num_audio_encoders");
return sProfiles->getAudioEncoders().size();
}
static jobject
android_media_MediaProfiles_native_get_audio_encoder_cap(JNIEnv *env, jobject thiz, jint index)
{
- LOGV("native_get_audio_encoder_cap: %d", index);
+ ALOGV("native_get_audio_encoder_cap: %d", index);
Vector<audio_encoder> encoders = sProfiles->getAudioEncoders();
int nSize = encoders.size();
if (index < 0 || index >= nSize) {
@@ -172,7 +172,7 @@ static bool isCamcorderQualityKnown(int quality)
static jobject
android_media_MediaProfiles_native_get_camcorder_profile(JNIEnv *env, jobject thiz, jint id, jint quality)
{
- LOGV("native_get_camcorder_profile: %d %d", id, quality);
+ ALOGV("native_get_camcorder_profile: %d %d", id, quality);
if (!isCamcorderQualityKnown(quality)) {
jniThrowException(env, "java/lang/RuntimeException", "Unknown camcorder profile quality");
return NULL;
@@ -221,7 +221,7 @@ android_media_MediaProfiles_native_get_camcorder_profile(JNIEnv *env, jobject th
static jboolean
android_media_MediaProfiles_native_has_camcorder_profile(JNIEnv *env, jobject thiz, jint id, jint quality)
{
- LOGV("native_has_camcorder_profile: %d %d", id, quality);
+ ALOGV("native_has_camcorder_profile: %d %d", id, quality);
if (!isCamcorderQualityKnown(quality)) {
return false;
}
@@ -233,14 +233,14 @@ android_media_MediaProfiles_native_has_camcorder_profile(JNIEnv *env, jobject th
static jint
android_media_MediaProfiles_native_get_num_video_decoders(JNIEnv *env, jobject thiz)
{
- LOGV("native_get_num_video_decoders");
+ ALOGV("native_get_num_video_decoders");
return sProfiles->getVideoDecoders().size();
}
static jint
android_media_MediaProfiles_native_get_video_decoder_type(JNIEnv *env, jobject thiz, jint index)
{
- LOGV("native_get_video_decoder_type: %d", index);
+ ALOGV("native_get_video_decoder_type: %d", index);
Vector<video_decoder> decoders = sProfiles->getVideoDecoders();
int nSize = decoders.size();
if (index < 0 || index >= nSize) {
@@ -254,14 +254,14 @@ android_media_MediaProfiles_native_get_video_decoder_type(JNIEnv *env, jobject t
static jint
android_media_MediaProfiles_native_get_num_audio_decoders(JNIEnv *env, jobject thiz)
{
- LOGV("native_get_num_audio_decoders");
+ ALOGV("native_get_num_audio_decoders");
return sProfiles->getAudioDecoders().size();
}
static jint
android_media_MediaProfiles_native_get_audio_decoder_type(JNIEnv *env, jobject thiz, jint index)
{
- LOGV("native_get_audio_decoder_type: %d", index);
+ ALOGV("native_get_audio_decoder_type: %d", index);
Vector<audio_decoder> decoders = sProfiles->getAudioDecoders();
int nSize = decoders.size();
if (index < 0 || index >= nSize) {
@@ -275,14 +275,14 @@ android_media_MediaProfiles_native_get_audio_decoder_type(JNIEnv *env, jobject t
static jint
android_media_MediaProfiles_native_get_num_image_encoding_quality_levels(JNIEnv *env, jobject thiz, jint cameraId)
{
- LOGV("native_get_num_image_encoding_quality_levels");
+ ALOGV("native_get_num_image_encoding_quality_levels");
return sProfiles->getImageEncodingQualityLevels(cameraId).size();
}
static jint
android_media_MediaProfiles_native_get_image_encoding_quality_level(JNIEnv *env, jobject thiz, jint cameraId, jint index)
{
- LOGV("native_get_image_encoding_quality_level");
+ ALOGV("native_get_image_encoding_quality_level");
Vector<int> levels = sProfiles->getImageEncodingQualityLevels(cameraId);
if (index < 0 || index >= levels.size()) {
jniThrowException(env, "java/lang/IllegalArgumentException", "out of array boundary");
@@ -293,7 +293,7 @@ android_media_MediaProfiles_native_get_image_encoding_quality_level(JNIEnv *env,
static jobject
android_media_MediaProfiles_native_get_videoeditor_profile(JNIEnv *env, jobject thiz)
{
- LOGV("native_get_videoeditor_profile");
+ ALOGV("native_get_videoeditor_profile");
int maxInputFrameWidth =
sProfiles->getVideoEditorCapParamByName("videoeditor.input.width.max");
@@ -312,7 +312,7 @@ android_media_MediaProfiles_native_get_videoeditor_profile(JNIEnv *env, jobject
"Error retrieving videoeditor profile params");
return NULL;
}
- LOGV("native_get_videoeditor_profile \
+ ALOGV("native_get_videoeditor_profile \
inWidth:%d inHeight:%d,outWidth:%d, outHeight:%d",\
maxInputFrameWidth,maxInputFrameHeight,\
maxOutputFrameWidth,maxOutputFrameHeight);
@@ -332,7 +332,7 @@ static jint
android_media_MediaProfiles_native_get_videoeditor_export_profile(
JNIEnv *env, jobject thiz, jint codec)
{
- LOGV("android_media_MediaProfiles_native_get_export_profile index ");
+ ALOGV("android_media_MediaProfiles_native_get_export_profile index ");
int profile =0;
profile = sProfiles->getVideoEditorExportParamByName("videoeditor.export.profile", codec);
// Check the values retrieved
@@ -348,7 +348,7 @@ static jint
android_media_MediaProfiles_native_get_videoeditor_export_level(
JNIEnv *env, jobject thiz, jint codec)
{
- LOGV("android_media_MediaProfiles_native_get_export_level");
+ ALOGV("android_media_MediaProfiles_native_get_export_level");
int level =0;
level = sProfiles->getVideoEditorExportParamByName("videoeditor.export.level", codec);
// Check the values retrieved
diff --git a/media/jni/android_media_MediaRecorder.cpp b/media/jni/android_media_MediaRecorder.cpp
index e1d3219..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;
}
@@ -98,7 +98,7 @@ JNIMediaRecorderListener::~JNIMediaRecorderListener()
void JNIMediaRecorderListener::notify(int msg, int ext1, int ext2)
{
- LOGV("JNIMediaRecorderListener::notify");
+ ALOGV("JNIMediaRecorderListener::notify");
JNIEnv *env = AndroidRuntime::getJNIEnv();
env->CallStaticVoidMethod(mClass, fields.post_event, mObject, msg, ext1, ext2, 0);
@@ -108,7 +108,7 @@ void JNIMediaRecorderListener::notify(int msg, int ext1, int ext2)
static sp<Surface> get_surface(JNIEnv* env, jobject clazz)
{
- LOGV("get_surface");
+ ALOGV("get_surface");
Surface* const p = (Surface*)env->GetIntField(clazz, fields.surface_native);
return sp<Surface>(p);
}
@@ -116,7 +116,7 @@ static sp<Surface> get_surface(JNIEnv* env, jobject clazz)
// Returns true if it throws an exception.
static bool process_media_recorder_call(JNIEnv *env, status_t opStatus, const char* exception, const char* message)
{
- LOGV("process_media_recorder_call");
+ ALOGV("process_media_recorder_call");
if (opStatus == (status_t)INVALID_OPERATION) {
jniThrowException(env, "java/lang/IllegalStateException", NULL);
return true;
@@ -165,7 +165,7 @@ static void android_media_MediaRecorder_setCamera(JNIEnv* env, jobject thiz, job
static void
android_media_MediaRecorder_setVideoSource(JNIEnv *env, jobject thiz, jint vs)
{
- LOGV("setVideoSource(%d)", vs);
+ ALOGV("setVideoSource(%d)", vs);
if (vs < VIDEO_SOURCE_DEFAULT || vs >= VIDEO_SOURCE_LIST_END) {
jniThrowException(env, "java/lang/IllegalArgumentException", "Invalid video source");
return;
@@ -177,7 +177,7 @@ android_media_MediaRecorder_setVideoSource(JNIEnv *env, jobject thiz, jint vs)
static void
android_media_MediaRecorder_setAudioSource(JNIEnv *env, jobject thiz, jint as)
{
- LOGV("setAudioSource(%d)", as);
+ ALOGV("setAudioSource(%d)", as);
if (as < AUDIO_SOURCE_DEFAULT || as >= AUDIO_SOURCE_CNT) {
jniThrowException(env, "java/lang/IllegalArgumentException", "Invalid audio source");
return;
@@ -190,7 +190,7 @@ android_media_MediaRecorder_setAudioSource(JNIEnv *env, jobject thiz, jint as)
static void
android_media_MediaRecorder_setOutputFormat(JNIEnv *env, jobject thiz, jint of)
{
- LOGV("setOutputFormat(%d)", of);
+ ALOGV("setOutputFormat(%d)", of);
if (of < OUTPUT_FORMAT_DEFAULT || of >= OUTPUT_FORMAT_LIST_END) {
jniThrowException(env, "java/lang/IllegalArgumentException", "Invalid output format");
return;
@@ -202,7 +202,7 @@ android_media_MediaRecorder_setOutputFormat(JNIEnv *env, jobject thiz, jint of)
static void
android_media_MediaRecorder_setVideoEncoder(JNIEnv *env, jobject thiz, jint ve)
{
- LOGV("setVideoEncoder(%d)", ve);
+ ALOGV("setVideoEncoder(%d)", ve);
if (ve < VIDEO_ENCODER_DEFAULT || ve >= VIDEO_ENCODER_LIST_END) {
jniThrowException(env, "java/lang/IllegalArgumentException", "Invalid video encoder");
return;
@@ -214,7 +214,7 @@ android_media_MediaRecorder_setVideoEncoder(JNIEnv *env, jobject thiz, jint ve)
static void
android_media_MediaRecorder_setAudioEncoder(JNIEnv *env, jobject thiz, jint ae)
{
- LOGV("setAudioEncoder(%d)", ae);
+ ALOGV("setAudioEncoder(%d)", ae);
if (ae < AUDIO_ENCODER_DEFAULT || ae >= AUDIO_ENCODER_LIST_END) {
jniThrowException(env, "java/lang/IllegalArgumentException", "Invalid audio encoder");
return;
@@ -226,10 +226,10 @@ android_media_MediaRecorder_setAudioEncoder(JNIEnv *env, jobject thiz, jint ae)
static void
android_media_MediaRecorder_setParameter(JNIEnv *env, jobject thiz, jstring params)
{
- LOGV("setParameter()");
+ 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;
}
@@ -249,7 +249,7 @@ android_media_MediaRecorder_setParameter(JNIEnv *env, jobject thiz, jstring para
static void
android_media_MediaRecorder_setOutputFileFD(JNIEnv *env, jobject thiz, jobject fileDescriptor, jlong offset, jlong length)
{
- LOGV("setOutputFile");
+ ALOGV("setOutputFile");
if (fileDescriptor == NULL) {
jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
return;
@@ -263,7 +263,7 @@ android_media_MediaRecorder_setOutputFileFD(JNIEnv *env, jobject thiz, jobject f
static void
android_media_MediaRecorder_setVideoSize(JNIEnv *env, jobject thiz, jint width, jint height)
{
- LOGV("setVideoSize(%d, %d)", width, height);
+ ALOGV("setVideoSize(%d, %d)", width, height);
sp<MediaRecorder> mr = getMediaRecorder(env, thiz);
if (width <= 0 || height <= 0) {
@@ -276,7 +276,7 @@ android_media_MediaRecorder_setVideoSize(JNIEnv *env, jobject thiz, jint width,
static void
android_media_MediaRecorder_setVideoFrameRate(JNIEnv *env, jobject thiz, jint rate)
{
- LOGV("setVideoFrameRate(%d)", rate);
+ ALOGV("setVideoFrameRate(%d)", rate);
if (rate <= 0) {
jniThrowException(env, "java/lang/IllegalArgumentException", "invalid frame rate");
return;
@@ -288,7 +288,7 @@ android_media_MediaRecorder_setVideoFrameRate(JNIEnv *env, jobject thiz, jint ra
static void
android_media_MediaRecorder_setMaxDuration(JNIEnv *env, jobject thiz, jint max_duration_ms)
{
- LOGV("setMaxDuration(%d)", max_duration_ms);
+ ALOGV("setMaxDuration(%d)", max_duration_ms);
sp<MediaRecorder> mr = getMediaRecorder(env, thiz);
char params[64];
@@ -301,7 +301,7 @@ static void
android_media_MediaRecorder_setMaxFileSize(
JNIEnv *env, jobject thiz, jlong max_filesize_bytes)
{
- LOGV("setMaxFileSize(%lld)", max_filesize_bytes);
+ ALOGV("setMaxFileSize(%lld)", max_filesize_bytes);
sp<MediaRecorder> mr = getMediaRecorder(env, thiz);
char params[64];
@@ -313,7 +313,7 @@ android_media_MediaRecorder_setMaxFileSize(
static void
android_media_MediaRecorder_prepare(JNIEnv *env, jobject thiz)
{
- LOGV("prepare");
+ ALOGV("prepare");
sp<MediaRecorder> mr = getMediaRecorder(env, thiz);
jobject surface = env->GetObjectField(thiz, fields.surface);
@@ -323,12 +323,12 @@ 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;
}
- LOGI("prepare: surface=%p (identity=%d)", native_surface.get(), native_surface->getIdentity());
+ ALOGI("prepare: surface=%p (identity=%d)", native_surface.get(), native_surface->getIdentity());
if (process_media_recorder_call(env, mr->setPreviewSurface(native_surface), "java/lang/RuntimeException", "setPreviewSurface failed.")) {
return;
}
@@ -339,7 +339,7 @@ android_media_MediaRecorder_prepare(JNIEnv *env, jobject thiz)
static int
android_media_MediaRecorder_native_getMaxAmplitude(JNIEnv *env, jobject thiz)
{
- LOGV("getMaxAmplitude");
+ ALOGV("getMaxAmplitude");
sp<MediaRecorder> mr = getMediaRecorder(env, thiz);
int result = 0;
process_media_recorder_call(env, mr->getMaxAmplitude(&result), "java/lang/RuntimeException", "getMaxAmplitude failed.");
@@ -349,7 +349,7 @@ android_media_MediaRecorder_native_getMaxAmplitude(JNIEnv *env, jobject thiz)
static void
android_media_MediaRecorder_start(JNIEnv *env, jobject thiz)
{
- LOGV("start");
+ ALOGV("start");
sp<MediaRecorder> mr = getMediaRecorder(env, thiz);
process_media_recorder_call(env, mr->start(), "java/lang/RuntimeException", "start failed.");
}
@@ -357,7 +357,7 @@ android_media_MediaRecorder_start(JNIEnv *env, jobject thiz)
static void
android_media_MediaRecorder_stop(JNIEnv *env, jobject thiz)
{
- LOGV("stop");
+ ALOGV("stop");
sp<MediaRecorder> mr = getMediaRecorder(env, thiz);
process_media_recorder_call(env, mr->stop(), "java/lang/RuntimeException", "stop failed.");
}
@@ -365,7 +365,7 @@ android_media_MediaRecorder_stop(JNIEnv *env, jobject thiz)
static void
android_media_MediaRecorder_native_reset(JNIEnv *env, jobject thiz)
{
- LOGV("native_reset");
+ ALOGV("native_reset");
sp<MediaRecorder> mr = getMediaRecorder(env, thiz);
process_media_recorder_call(env, mr->reset(), "java/lang/RuntimeException", "native_reset failed.");
}
@@ -373,7 +373,7 @@ android_media_MediaRecorder_native_reset(JNIEnv *env, jobject thiz)
static void
android_media_MediaRecorder_release(JNIEnv *env, jobject thiz)
{
- LOGV("release");
+ ALOGV("release");
sp<MediaRecorder> mr = setMediaRecorder(env, thiz, 0);
if (mr != NULL) {
mr->setListener(NULL);
@@ -425,7 +425,7 @@ android_media_MediaRecorder_native_init(JNIEnv *env)
static void
android_media_MediaRecorder_native_setup(JNIEnv *env, jobject thiz, jobject weak_this)
{
- LOGV("setup");
+ ALOGV("setup");
sp<MediaRecorder> mr = new MediaRecorder();
if (mr == NULL) {
jniThrowException(env, "java/lang/RuntimeException", "Out of memory");
@@ -446,7 +446,7 @@ android_media_MediaRecorder_native_setup(JNIEnv *env, jobject thiz, jobject weak
static void
android_media_MediaRecorder_native_finalize(JNIEnv *env, jobject thiz)
{
- LOGV("finalize");
+ ALOGV("finalize");
android_media_MediaRecorder_release(env, thiz);
}
diff --git a/media/jni/android_media_MediaScanner.cpp b/media/jni/android_media_MediaScanner.cpp
index 09152f5..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;
@@ -113,12 +113,12 @@ public:
mHandleStringTagMethodID(0),
mSetMimeTypeMethodID(0)
{
- LOGV("MyMediaScannerClient constructor");
+ ALOGV("MyMediaScannerClient constructor");
jclass mediaScannerClientInterface =
env->FindClass(kClassMediaScannerClient);
if (mediaScannerClientInterface == NULL) {
- LOGE("Class %s not found", kClassMediaScannerClient);
+ ALOGE("Class %s not found", kClassMediaScannerClient);
} else {
mScanFileMethodID = env->GetMethodID(
mediaScannerClientInterface,
@@ -139,14 +139,14 @@ public:
virtual ~MyMediaScannerClient()
{
- LOGV("MyMediaScannerClient destructor");
+ ALOGV("MyMediaScannerClient destructor");
mEnv->DeleteGlobalRef(mClient);
}
virtual status_t scanFile(const char* path, long long lastModified,
long long fileSize, bool isDirectory, bool noMedia)
{
- LOGV("scanFile: path(%s), time(%lld), size(%lld) and isDir(%d)",
+ ALOGV("scanFile: path(%s), time(%lld), size(%lld) and isDir(%d)",
path, lastModified, fileSize, isDirectory);
jstring pathStr;
@@ -164,7 +164,7 @@ public:
virtual status_t handleStringTag(const char* name, const char* value)
{
- LOGV("handleStringTag: name(%s) and value(%s)", name, value);
+ ALOGV("handleStringTag: name(%s) and value(%s)", name, value);
jstring nameStr, valueStr;
if ((nameStr = mEnv->NewStringUTF(name)) == NULL) {
mEnv->ExceptionClear();
@@ -201,7 +201,7 @@ public:
virtual status_t setMimeType(const char* mimeType)
{
- LOGV("setMimeType: %s", mimeType);
+ ALOGV("setMimeType: %s", mimeType);
jstring mimeTypeStr;
if ((mimeTypeStr = mEnv->NewStringUTF(mimeType)) == NULL) {
mEnv->ExceptionClear();
@@ -237,7 +237,7 @@ static void
android_media_MediaScanner_processDirectory(
JNIEnv *env, jobject thiz, jstring path, jobject client)
{
- LOGV("processDirectory");
+ ALOGV("processDirectory");
MediaScanner *mp = getNativeScanner_l(env, thiz);
if (mp == NULL) {
jniThrowException(env, kRunTimeException, "No scanner available");
@@ -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);
}
@@ -267,7 +267,7 @@ android_media_MediaScanner_processFile(
JNIEnv *env, jobject thiz, jstring path,
jstring mimeType, jobject client)
{
- LOGV("processFile");
+ ALOGV("processFile");
// Lock already hold by processDirectory
MediaScanner *mp = getNativeScanner_l(env, thiz);
@@ -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) {
@@ -309,7 +309,7 @@ static void
android_media_MediaScanner_setLocale(
JNIEnv *env, jobject thiz, jstring locale)
{
- LOGV("setLocale");
+ ALOGV("setLocale");
MediaScanner *mp = getNativeScanner_l(env, thiz);
if (mp == NULL) {
jniThrowException(env, kRunTimeException, "No scanner available");
@@ -333,7 +333,7 @@ static jbyteArray
android_media_MediaScanner_extractAlbumArt(
JNIEnv *env, jobject thiz, jobject fileDescriptor)
{
- LOGV("extractAlbumArt");
+ ALOGV("extractAlbumArt");
MediaScanner *mp = getNativeScanner_l(env, thiz);
if (mp == NULL) {
jniThrowException(env, kRunTimeException, "No scanner available");
@@ -374,7 +374,7 @@ done:
static void
android_media_MediaScanner_native_init(JNIEnv *env)
{
- LOGV("native_init");
+ ALOGV("native_init");
jclass clazz = env->FindClass(kClassMediaScanner);
if (clazz == NULL) {
return;
@@ -389,7 +389,7 @@ android_media_MediaScanner_native_init(JNIEnv *env)
static void
android_media_MediaScanner_native_setup(JNIEnv *env, jobject thiz)
{
- LOGV("native_setup");
+ ALOGV("native_setup");
MediaScanner *mp = new StagefrightMediaScanner;
if (mp == NULL) {
@@ -403,7 +403,7 @@ android_media_MediaScanner_native_setup(JNIEnv *env, jobject thiz)
static void
android_media_MediaScanner_native_finalize(JNIEnv *env, jobject thiz)
{
- LOGV("native_finalize");
+ ALOGV("native_finalize");
MediaScanner *mp = getNativeScanner_l(env, thiz);
if (mp == 0) {
return;
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 6b73f6c..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();
}
@@ -132,17 +132,17 @@ android_mtp_MtpDevice_get_device_info(JNIEnv *env, jobject thiz)
{
MtpDevice* device = get_device_from_object(env, thiz);
if (!device) {
- LOGD("android_mtp_MtpDevice_get_device_info device is null");
+ ALOGD("android_mtp_MtpDevice_get_device_info device is null");
return NULL;
}
MtpDeviceInfo* deviceInfo = device->getDeviceInfo();
if (!deviceInfo) {
- LOGD("android_mtp_MtpDevice_get_device_info deviceInfo is null");
+ ALOGD("android_mtp_MtpDevice_get_device_info deviceInfo is null");
return NULL;
}
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;
}
@@ -429,197 +429,197 @@ int register_android_mtp_MtpDevice(JNIEnv *env)
{
jclass clazz;
- LOGD("register_android_mtp_MtpDevice\n");
+ ALOGD("register_android_mtp_MtpDevice\n");
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 277ea55..3b325b7 100644
--- a/media/jni/audioeffect/android_media_AudioEffect.cpp
+++ b/media/jni/audioeffect/android_media_AudioEffect.cpp
@@ -106,38 +106,38 @@ static void effectCallback(int event, void* user, void *info) {
effect_callback_cookie *callbackInfo = (effect_callback_cookie *)user;
JNIEnv *env = AndroidRuntime::getJNIEnv();
- LOGV("effectCallback: callbackInfo %p, audioEffect_ref %p audioEffect_class %p",
+ ALOGV("effectCallback: callbackInfo %p, audioEffect_ref %p audioEffect_class %p",
callbackInfo,
callbackInfo->audioEffect_ref,
callbackInfo->audioEffect_class);
if (!user || !env) {
- LOGW("effectCallback error user %p, env %p", user, env);
+ ALOGW("effectCallback error user %p, env %p", user, env);
return;
}
switch (event) {
case AudioEffect::EVENT_CONTROL_STATUS_CHANGED:
if (info == 0) {
- LOGW("EVENT_CONTROL_STATUS_CHANGED info == NULL");
+ ALOGW("EVENT_CONTROL_STATUS_CHANGED info == NULL");
goto effectCallback_Exit;
}
param = *(bool *)info;
arg1 = (int)param;
- LOGV("EVENT_CONTROL_STATUS_CHANGED");
+ ALOGV("EVENT_CONTROL_STATUS_CHANGED");
break;
case AudioEffect::EVENT_ENABLE_STATUS_CHANGED:
if (info == 0) {
- LOGW("EVENT_ENABLE_STATUS_CHANGED info == NULL");
+ ALOGW("EVENT_ENABLE_STATUS_CHANGED info == NULL");
goto effectCallback_Exit;
}
param = *(bool *)info;
arg1 = (int)param;
- LOGV("EVENT_ENABLE_STATUS_CHANGED");
+ ALOGV("EVENT_ENABLE_STATUS_CHANGED");
break;
case AudioEffect::EVENT_PARAMETER_CHANGED:
if (info == 0) {
- LOGW("EVENT_PARAMETER_CHANGED info == NULL");
+ ALOGW("EVENT_PARAMETER_CHANGED info == NULL");
goto effectCallback_Exit;
}
p = (effect_param_t *)info;
@@ -149,17 +149,17 @@ 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);
memcpy(bytes, p, size);
env->ReleaseByteArrayElements(array, bytes, 0);
obj = array;
- LOGV("EVENT_PARAMETER_CHANGED");
+ ALOGV("EVENT_PARAMETER_CHANGED");
break;
case AudioEffect::EVENT_ERROR:
- LOGW("EVENT_ERROR");
+ ALOGW("EVENT_ERROR");
break;
}
@@ -187,7 +187,7 @@ static void
android_media_AudioEffect_native_init(JNIEnv *env)
{
- LOGV("android_media_AudioEffect_native_init");
+ ALOGV("android_media_AudioEffect_native_init");
fields.clazzEffect = NULL;
fields.clazzDesc = 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;
}
}
@@ -251,7 +251,7 @@ static jint
android_media_AudioEffect_native_setup(JNIEnv *env, jobject thiz, jobject weak_this,
jstring type, jstring uuid, jint priority, jint sessionId, jintArray jId, jobjectArray javadesc)
{
- LOGV("android_media_AudioEffect_native_setup");
+ ALOGV("android_media_AudioEffect_native_setup");
AudioEffectJniStorage* lpJniStorage = NULL;
int lStatus = AUDIOEFFECT_ERROR_NO_MEMORY;
AudioEffect* lpAudioEffect = NULL;
@@ -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;
}
@@ -298,14 +298,14 @@ android_media_AudioEffect_native_setup(JNIEnv *env, jobject thiz, jobject weak_t
// we use a weak reference so the AudioEffect object can be garbage collected.
lpJniStorage->mCallbackData.audioEffect_ref = env->NewGlobalRef(weak_this);
- LOGV("setup: lpJniStorage: %p audioEffect_ref %p audioEffect_class %p, &mCallbackData %p",
+ ALOGV("setup: lpJniStorage: %p audioEffect_ref %p audioEffect_class %p, &mCallbackData %p",
lpJniStorage,
lpJniStorage->mCallbackData.audioEffect_ref,
lpJniStorage->mCallbackData.audioEffect_class,
&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;
}
@@ -425,13 +425,13 @@ setup_failure:
// ----------------------------------------------------------------------------
static void android_media_AudioEffect_native_finalize(JNIEnv *env, jobject thiz) {
- LOGV("android_media_AudioEffect_native_finalize jobject: %x\n", (int)thiz);
+ ALOGV("android_media_AudioEffect_native_finalize jobject: %x\n", (int)thiz);
// delete the AudioEffect object
AudioEffect* lpAudioEffect = (AudioEffect *)env->GetIntField(
thiz, fields.fidNativeAudioEffect);
if (lpAudioEffect) {
- LOGV("deleting AudioEffect: %x\n", (int)lpAudioEffect);
+ ALOGV("deleting AudioEffect: %x\n", (int)lpAudioEffect);
delete lpAudioEffect;
}
@@ -439,7 +439,7 @@ static void android_media_AudioEffect_native_finalize(JNIEnv *env, jobject thiz
AudioEffectJniStorage* lpJniStorage = (AudioEffectJniStorage *)env->GetIntField(
thiz, fields.fidJniData);
if (lpJniStorage) {
- LOGV("deleting pJniStorage: %x\n", (int)lpJniStorage);
+ ALOGV("deleting pJniStorage: %x\n", (int)lpJniStorage);
delete lpJniStorage;
}
}
@@ -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;
}
}
@@ -720,7 +720,7 @@ android_media_AudioEffect_native_queryEffects(JNIEnv *env, jclass clazz)
return ret;
}
- LOGV("queryEffects() numEffects: %d", numEffects);
+ ALOGV("queryEffects() numEffects: %d", numEffects);
for (i = 0; i < numEffects; i++) {
if (AudioEffect::queryEffect(i, &desc) != NO_ERROR) {
@@ -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;
}
@@ -808,7 +808,7 @@ android_media_AudioEffect_native_queryPreProcessings(JNIEnv *env, jclass clazz,
delete[] descriptors;
return NULL;
}
- LOGV("queryDefaultPreProcessing() got %d effects", numEffects);
+ ALOGV("queryDefaultPreProcessing() got %d effects", numEffects);
jobjectArray ret = env->NewObjectArray(numEffects, fields.clazzDesc, NULL);
if (ret == NULL) {
@@ -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 27b28ee..ecd4d07 100644
--- a/media/jni/audioeffect/android_media_Visualizer.cpp
+++ b/media/jni/audioeffect/android_media_Visualizer.cpp
@@ -107,13 +107,13 @@ static void captureCallback(void* user,
visualizer_callback_cookie *callbackInfo = (visualizer_callback_cookie *)user;
JNIEnv *env = AndroidRuntime::getJNIEnv();
- LOGV("captureCallback: callbackInfo %p, visualizer_ref %p visualizer_class %p",
+ ALOGV("captureCallback: callbackInfo %p, visualizer_ref %p visualizer_class %p",
callbackInfo,
callbackInfo->visualizer_ref,
callbackInfo->visualizer_class);
if (!user || !env) {
- LOGW("captureCallback error user %p, env %p", user, env);
+ ALOGW("captureCallback error user %p, env %p", user, env);
return;
}
@@ -178,14 +178,14 @@ static void
android_media_visualizer_native_init(JNIEnv *env)
{
- LOGV("android_media_visualizer_native_init");
+ ALOGV("android_media_visualizer_native_init");
fields.clazzEffect = NULL;
// 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;
}
@@ -225,7 +225,7 @@ static jint
android_media_visualizer_native_setup(JNIEnv *env, jobject thiz, jobject weak_this,
jint sessionId, jintArray jId)
{
- LOGV("android_media_visualizer_native_setup");
+ ALOGV("android_media_visualizer_native_setup");
visualizerJniStorage* lpJniStorage = NULL;
int lStatus = VISUALIZER_ERROR_NO_MEMORY;
Visualizer* lpVisualizer = NULL;
@@ -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;
}
@@ -241,14 +241,14 @@ android_media_visualizer_native_setup(JNIEnv *env, jobject thiz, jobject weak_th
// we use a weak reference so the Visualizer object can be garbage collected.
lpJniStorage->mCallbackData.visualizer_ref = env->NewGlobalRef(weak_this);
- LOGV("setup: lpJniStorage: %p visualizer_ref %p visualizer_class %p, &mCallbackData %p",
+ ALOGV("setup: lpJniStorage: %p visualizer_ref %p visualizer_class %p, &mCallbackData %p",
lpJniStorage,
lpJniStorage->mCallbackData.visualizer_ref,
lpJniStorage->mCallbackData.visualizer_class,
&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;
}
@@ -307,13 +307,13 @@ setup_failure:
// ----------------------------------------------------------------------------
static void android_media_visualizer_native_finalize(JNIEnv *env, jobject thiz) {
- LOGV("android_media_visualizer_native_finalize jobject: %x\n", (int)thiz);
+ ALOGV("android_media_visualizer_native_finalize jobject: %x\n", (int)thiz);
// delete the Visualizer object
Visualizer* lpVisualizer = (Visualizer *)env->GetIntField(
thiz, fields.fidNativeVisualizer);
if (lpVisualizer) {
- LOGV("deleting Visualizer: %x\n", (int)lpVisualizer);
+ ALOGV("deleting Visualizer: %x\n", (int)lpVisualizer);
delete lpVisualizer;
}
@@ -321,7 +321,7 @@ static void android_media_visualizer_native_finalize(JNIEnv *env, jobject thiz)
visualizerJniStorage* lpJniStorage = (visualizerJniStorage *)env->GetIntField(
thiz, fields.fidJniData);
if (lpJniStorage) {
- LOGV("deleting pJniStorage: %x\n", (int)lpJniStorage);
+ ALOGV("deleting pJniStorage: %x\n", (int)lpJniStorage);
delete lpJniStorage;
}
}
@@ -366,7 +366,7 @@ android_media_visualizer_native_getCaptureSizeRange(JNIEnv *env, jobject thiz)
jint *nRange = env->GetIntArrayElements(jRange, NULL);
nRange[0] = Visualizer::getMinCaptureSize();
nRange[1] = Visualizer::getMaxCaptureSize();
- LOGV("getCaptureSizeRange() min %d max %d", nRange[0], nRange[1]);
+ ALOGV("getCaptureSizeRange() min %d max %d", nRange[0], nRange[1]);
env->ReleaseIntArrayElements(jRange, nRange, 0);
return jRange;
}
@@ -458,7 +458,7 @@ android_media_setPeriodicCapture(JNIEnv *env, jobject thiz, jint rate, jboolean
return VISUALIZER_ERROR_NO_INIT;
}
- LOGV("setPeriodicCapture: rate %d, jWaveform %d jFft %d",
+ ALOGV("setPeriodicCapture: rate %d, jWaveform %d jFft %d",
rate,
jWaveform,
jFft);
diff --git a/media/jni/mediaeditor/VideoEditorLogging.h b/media/jni/mediaeditor/VideoEditorLogging.h
index c13f6ff..479d8b6 100755
--- a/media/jni/mediaeditor/VideoEditorLogging.h
+++ b/media/jni/mediaeditor/VideoEditorLogging.h
@@ -29,7 +29,7 @@
#define VIDEOEDIT_LOG_ALLOCATION __android_log_print
#define VIDEOEDIT_LOG_API __android_log_print
#define VIDEOEDIT_LOG_FUNCTION __android_log_print
-#define VIDEOEDIT_LOG_RESULT(x,y, ...) LOGI(y, __VA_ARGS__ )
+#define VIDEOEDIT_LOG_RESULT(x,y, ...) ALOGI(y, __VA_ARGS__ )
#define VIDEOEDIT_LOG_SETTING __android_log_print
#define VIDEOEDIT_LOG_EDIT_SETTINGS(m_settings) videoEditClasses_logEditSettings\
(m_settings, VIDEOEDIT_LOG_INDENTATION)
diff --git a/media/jni/mediaeditor/VideoEditorMain.cpp b/media/jni/mediaeditor/VideoEditorMain.cpp
index 3d6d857..c84a883 100755
--- a/media/jni/mediaeditor/VideoEditorMain.cpp
+++ b/media/jni/mediaeditor/VideoEditorMain.cpp
@@ -419,7 +419,7 @@ static void jniPreviewProgressCallback (void* cookie, M4OSA_UInt32 msgType,
pContext->mIsUpdateOverlay = true;
pCurrEditInfo = (VideoEditorCurretEditInfo*)argc;
overlayEffectIndex = pCurrEditInfo->overlaySettingsIndex;
- LOGV("MSG_TYPE_OVERLAY_UPDATE");
+ ALOGV("MSG_TYPE_OVERLAY_UPDATE");
if (pContext->mOverlayFileName != NULL) {
free(pContext->mOverlayFileName);
@@ -441,16 +441,16 @@ 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");
- LOGV("Conv string is %s", pContext->mOverlayFileName);
- LOGV("Current Clip index = %d", pCurrEditInfo->clipIndex);
+ ALOGV("Conv string is %s", pContext->mOverlayFileName);
+ ALOGV("Current Clip index = %d", pCurrEditInfo->clipIndex);
pContext->mOverlayRenderingMode = pContext->pEditSettings->\
pClipList[pCurrEditInfo->clipIndex]->xVSS.MediaRendering;
- LOGV("rendering mode %d ", pContext->mOverlayRenderingMode);
+ ALOGV("rendering mode %d ", pContext->mOverlayRenderingMode);
}
@@ -464,7 +464,7 @@ static void jniPreviewProgressCallback (void* cookie, M4OSA_UInt32 msgType,
pContext->mOverlayFileName = NULL;
}
- LOGV("MSG_TYPE_OVERLAY_CLEAR");
+ ALOGV("MSG_TYPE_OVERLAY_CLEAR");
//argc is not used
pContext->mIsUpdateOverlay = true;
break;
@@ -499,7 +499,7 @@ static M4OSA_ERR checkClipVideoProfileAndLevel(M4DECODER_VideoDecoders *pDecoder
M4OSA_Bool foundCodec = M4OSA_FALSE;
M4OSA_ERR result = M4VSS3GPP_ERR_EDITING_UNSUPPORTED_VIDEO_PROFILE;
M4OSA_Bool foundProfile = M4OSA_FALSE;
- LOGV("checkClipVideoProfileAndLevel format %d profile;%d level:0x%x",
+ ALOGV("checkClipVideoProfileAndLevel format %d profile;%d level:0x%x",
format, profile, level);
switch (format) {
@@ -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");
@@ -1431,7 +1431,7 @@ M4OSA_ERR videoEditor_generateAudio(JNIEnv* pEnv,ManualEditContext* pContext,
M4OSA_UInt8 curProgress = 0;
int lastProgress = 0;
- LOGV("LVME_generateAudio Current progress is =%d", curProgress);
+ ALOGV("LVME_generateAudio Current progress is =%d", curProgress);
pEnv->CallVoidMethod(pContext->engine,
pContext->onProgressUpdateMethodId, 1/*task status*/,
curProgress/*progress*/);
@@ -1439,17 +1439,17 @@ M4OSA_ERR videoEditor_generateAudio(JNIEnv* pEnv,ManualEditContext* pContext,
result = M4MCS_step(mcsContext, &curProgress);
if (result != M4NO_ERROR) {
- LOGV("LVME_generateAudio M4MCS_step returned 0x%x",result);
+ ALOGV("LVME_generateAudio M4MCS_step returned 0x%x",result);
if (result == M4MCS_WAR_TRANSCODING_DONE) {
- LOGV("LVME_generateAudio MCS process ended");
+ ALOGV("LVME_generateAudio MCS process ended");
// Send a progress notification.
curProgress = 100;
pEnv->CallVoidMethod(pContext->engine,
pContext->onProgressUpdateMethodId, 1/*task status*/,
curProgress);
- LOGV("LVME_generateAudio Current progress is =%d", curProgress);
+ ALOGV("LVME_generateAudio Current progress is =%d", curProgress);
}
} else {
// Send a progress notification if needed
@@ -1458,7 +1458,7 @@ M4OSA_ERR videoEditor_generateAudio(JNIEnv* pEnv,ManualEditContext* pContext,
pEnv->CallVoidMethod(pContext->engine,
pContext->onProgressUpdateMethodId, 0/*task status*/,
curProgress/*progress*/);
- LOGV("LVME_generateAudio Current progress is =%d",curProgress);
+ ALOGV("LVME_generateAudio Current progress is =%d",curProgress);
}
}
} while (result == M4NO_ERROR);
@@ -1506,11 +1506,11 @@ static int removeAlphafromRGB8888 (
M4OSA_Context lImageFileFp = M4OSA_NULL;
M4OSA_ERR err = M4NO_ERROR;
- LOGV("removeAlphafromRGB8888: width %d", pFramingCtx->width);
+ ALOGV("removeAlphafromRGB8888: width %d", pFramingCtx->width);
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;
}
@@ -2786,9 +2786,9 @@ M4OSA_ERR videoEditor_processClip(
}
// Send the command.
- LOGV("videoEditor_processClip ITEM %d Calling M4xVSS_SendCommand()", unuseditemID);
+ ALOGV("videoEditor_processClip ITEM %d Calling M4xVSS_SendCommand()", unuseditemID);
result = M4xVSS_SendCommand(pContext->engineContext, pContext->pEditSettings);
- LOGV("videoEditor_processClip ITEM %d M4xVSS_SendCommand() returned 0x%x",
+ ALOGV("videoEditor_processClip ITEM %d M4xVSS_SendCommand() returned 0x%x",
unuseditemID, (unsigned int) result);
// Remove warnings indications (we only care about errors here)
@@ -2798,21 +2798,21 @@ M4OSA_ERR videoEditor_processClip(
}
// Send the first progress indication (=0)
- LOGV("VERY FIRST PROGRESS videoEditor_processClip ITEM %d Progress indication %d",
+ ALOGV("VERY FIRST PROGRESS videoEditor_processClip ITEM %d Progress indication %d",
unuseditemID, progress);
pEnv->CallVoidMethod(pContext->engine, pContext->onProgressUpdateMethodId,
unuseditemID, progress);
// Check if a task is being performed.
// ??? ADD STOPPING MECHANISM
- LOGV("videoEditor_processClip Entering processing loop");
+ ALOGV("videoEditor_processClip Entering processing loop");
M4OSA_UInt8 prevReportedProgress = 0;
while((result == M4NO_ERROR)
&&(pContext->state!=ManualEditState_SAVED)
&&(pContext->state!=ManualEditState_STOPPING)) {
// Perform the next processing step.
- //LOGV("LVME_processClip Entering M4xVSS_Step()");
+ //ALOGV("LVME_processClip Entering M4xVSS_Step()");
result = M4xVSS_Step(pContext->engineContext, &progress);
if (progress != prevReportedProgress) {
@@ -2836,7 +2836,7 @@ M4OSA_ERR videoEditor_processClip(
if (progress > lastProgress)
{
// Send a progress notification.
- LOGV("videoEditor_processClip ITEM %d Progress indication %d",
+ ALOGV("videoEditor_processClip ITEM %d Progress indication %d",
unuseditemID, progress);
pEnv->CallVoidMethod(pContext->engine,
pContext->onProgressUpdateMethodId,
@@ -2850,7 +2850,7 @@ M4OSA_ERR videoEditor_processClip(
{
// Set the state to the completions state.
pContext->state = completionState;
- LOGV("videoEditor_processClip ITEM %d STATE changed to %d",
+ ALOGV("videoEditor_processClip ITEM %d STATE changed to %d",
unuseditemID, pContext->state);
// Reset progress indication, as we switch to next state
@@ -2862,11 +2862,11 @@ M4OSA_ERR videoEditor_processClip(
// Check if we are analyzing input
if (pContext->state == ManualEditState_OPENED) {
// File is opened, we must start saving it
- LOGV("videoEditor_processClip Calling M4xVSS_SaveStart()");
+ ALOGV("videoEditor_processClip Calling M4xVSS_SaveStart()");
result = M4xVSS_SaveStart(pContext->engineContext,
(M4OSA_Char*)pContext->pEditSettings->pOutputFile,
(M4OSA_UInt32)pContext->pEditSettings->uiOutputPathSize);
- LOGV("videoEditor_processClip ITEM %d SaveStart() returned 0x%x",
+ ALOGV("videoEditor_processClip ITEM %d SaveStart() returned 0x%x",
unuseditemID, (unsigned int) result);
// Set the state to saving.
@@ -2889,7 +2889,7 @@ M4OSA_ERR videoEditor_processClip(
// Send a progress notification.
progress = 100;
- LOGV("videoEditor_processClip ITEM %d Last progress indication %d",
+ ALOGV("videoEditor_processClip ITEM %d Last progress indication %d",
unuseditemID, progress);
pEnv->CallVoidMethod(pContext->engine,
pContext->onProgressUpdateMethodId,
@@ -2897,14 +2897,14 @@ M4OSA_ERR videoEditor_processClip(
// Stop the encoding.
- LOGV("videoEditor_processClip Calling M4xVSS_SaveStop()");
+ ALOGV("videoEditor_processClip Calling M4xVSS_SaveStop()");
result = M4xVSS_SaveStop(pContext->engineContext);
- LOGV("videoEditor_processClip M4xVSS_SaveStop() returned 0x%x", result);
+ ALOGV("videoEditor_processClip M4xVSS_SaveStop() returned 0x%x", result);
}
// 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 */
@@ -2936,7 +2936,7 @@ videoEditor_generateClip(
ManualEditContext* pContext = M4OSA_NULL;
M4OSA_ERR result = M4NO_ERROR;
- LOGV("videoEditor_generateClip START");
+ ALOGV("videoEditor_generateClip START");
// Get the context.
pContext = (ManualEditContext*)videoEditClasses_getContext(&loaded, pEnv, thiz);
@@ -2954,21 +2954,21 @@ videoEditor_generateClip(
"not initialized");
// Load the clip settings
- LOGV("videoEditor_generateClip Calling videoEditor_loadSettings");
+ ALOGV("videoEditor_generateClip Calling videoEditor_loadSettings");
videoEditor_loadSettings(pEnv, thiz, settings);
- LOGV("videoEditor_generateClip videoEditor_loadSettings returned");
+ ALOGV("videoEditor_generateClip videoEditor_loadSettings returned");
// Generate the clip
- LOGV("videoEditor_generateClip Calling LVME_processClip");
+ ALOGV("videoEditor_generateClip Calling LVME_processClip");
result = videoEditor_processClip(pEnv, thiz, 0 /*item id is unused*/);
- LOGV("videoEditor_generateClip videoEditor_processClip returned 0x%x", result);
+ ALOGV("videoEditor_generateClip videoEditor_processClip returned 0x%x", result);
if (pContext->state != ManualEditState_INITIALIZED) {
// Free up memory (whatever the result)
videoEditor_unloadSettings(pEnv, thiz);
}
- LOGV("videoEditor_generateClip END 0x%x", (unsigned int) result);
+ ALOGV("videoEditor_generateClip END 0x%x", (unsigned int) result);
return result;
}
@@ -3024,7 +3024,7 @@ videoEditor_loadSettings(
VIDEOEDIT_LOG_API(ANDROID_LOG_INFO, "VIDEO_EDITOR", "inside load settings");
VIDEOEDIT_LOG_EDIT_SETTINGS(pContext->pEditSettings);
}
- LOGV("videoEditor_loadSettings END");
+ ALOGV("videoEditor_loadSettings END");
}
@@ -3051,7 +3051,7 @@ videoEditor_unloadSettings(
// Check if the context is valid (required because the context is dereferenced).
if (needToBeUnLoaded)
{
- LOGV("videoEditor_unloadSettings state %d", pContext->state);
+ ALOGV("videoEditor_unloadSettings state %d", pContext->state);
// Make sure that we are in a correct state.
videoEditJava_checkAndThrowIllegalStateException(&needToBeUnLoaded, pEnv,
((pContext->state != ManualEditState_ANALYZING ) &&
@@ -3070,9 +3070,9 @@ videoEditor_unloadSettings(
if (needToBeUnLoaded)
{
// Close the command.
- LOGV("videoEditor_unloadSettings Calling M4xVSS_CloseCommand()");
+ ALOGV("videoEditor_unloadSettings Calling M4xVSS_CloseCommand()");
result = M4xVSS_CloseCommand(pContext->engineContext);
- LOGV("videoEditor_unloadSettings M4xVSS_CloseCommand() returned 0x%x",
+ ALOGV("videoEditor_unloadSettings M4xVSS_CloseCommand() returned 0x%x",
(unsigned int)result);
// Check if the command could be closed.
@@ -3107,7 +3107,7 @@ videoEditor_stopEncoding(
ManualEditContext* pContext = M4OSA_NULL;
M4OSA_ERR result = M4NO_ERROR;
- LOGV("videoEditor_stopEncoding START");
+ ALOGV("videoEditor_stopEncoding START");
// Get the context.
pContext = (ManualEditContext*)videoEditClasses_getContext(&stopped, pEnv, thiz);
@@ -3128,9 +3128,9 @@ videoEditor_stopEncoding(
if (pContext->state != ManualEditState_INITIALIZED)
{
// Close the command.
- LOGV("videoEditor_stopEncoding Calling M4xVSS_CloseCommand()");
+ ALOGV("videoEditor_stopEncoding Calling M4xVSS_CloseCommand()");
result = M4xVSS_CloseCommand(pContext->engineContext);
- LOGV("videoEditor_stopEncoding M4xVSS_CloseCommand() returned 0x%x",
+ ALOGV("videoEditor_stopEncoding M4xVSS_CloseCommand() returned 0x%x",
(unsigned int)result);
}
@@ -3166,7 +3166,7 @@ videoEditor_release(
// If context is not set, return (we consider release already happened)
if (pContext == NULL) {
- LOGV("videoEditor_release Nothing to do, context is aleady NULL");
+ ALOGV("videoEditor_release Nothing to do, context is aleady NULL");
return;
}
@@ -3189,10 +3189,10 @@ videoEditor_release(
if (pContext->state != ManualEditState_INITIALIZED)
{
// Close the command.
- LOGV("videoEditor_release Calling M4xVSS_CloseCommand() state =%d",
+ ALOGV("videoEditor_release Calling M4xVSS_CloseCommand() state =%d",
pContext->state);
result = M4xVSS_CloseCommand(pContext->engineContext);
- LOGV("videoEditor_release M4xVSS_CloseCommand() returned 0x%x",
+ ALOGV("videoEditor_release M4xVSS_CloseCommand() returned 0x%x",
(unsigned int)result);
// Check if the command could be closed.
@@ -3201,9 +3201,9 @@ videoEditor_release(
}
// Cleanup the engine.
- LOGV("videoEditor_release Calling M4xVSS_CleanUp()");
+ ALOGV("videoEditor_release Calling M4xVSS_CleanUp()");
result = M4xVSS_CleanUp(pContext->engineContext);
- LOGV("videoEditor_release M4xVSS_CleanUp() returned 0x%x", (unsigned int)result);
+ ALOGV("videoEditor_release M4xVSS_CleanUp() returned 0x%x", (unsigned int)result);
// Check if the cleanup succeeded.
videoEditJava_checkAndThrowRuntimeException(&released, pEnv,
@@ -3245,17 +3245,17 @@ videoEditor_release(
pDecoder = pContext->decoders->decoder;
for (int32_t k = 0; k < decoderNumber; k++) {
// free each component
- LOGV("decoder index :%d",k);
+ ALOGV("decoder index :%d",k);
if (pDecoder != NULL &&
pDecoder->component != NULL &&
pDecoder->componentNumber > 0) {
- LOGV("component number %d",pDecoder->componentNumber);
+ ALOGV("component number %d",pDecoder->componentNumber);
int32_t componentNumber =
pDecoder->componentNumber;
pComponents = pDecoder->component;
for (int32_t i = 0; i< componentNumber; i++) {
- LOGV("component index :%d",i);
+ ALOGV("component index :%d",i);
if (pComponents != NULL &&
pComponents->profileLevel != NULL) {
free(pComponents->profileLevel);
diff --git a/media/jni/soundpool/SoundPool.cpp b/media/jni/soundpool/SoundPool.cpp
index 4ffb2c0..14a5309 100644
--- a/media/jni/soundpool/SoundPool.cpp
+++ b/media/jni/soundpool/SoundPool.cpp
@@ -41,7 +41,7 @@ uint32_t kDefaultFrameCount = 1200;
SoundPool::SoundPool(int maxChannels, int streamType, int srcQuality)
{
- LOGV("SoundPool constructor: maxChannels=%d, streamType=%d, srcQuality=%d",
+ ALOGV("SoundPool constructor: maxChannels=%d, streamType=%d, srcQuality=%d",
maxChannels, streamType, srcQuality);
// check limits
@@ -52,7 +52,7 @@ SoundPool::SoundPool(int maxChannels, int streamType, int srcQuality)
else if (mMaxChannels > 32) {
mMaxChannels = 32;
}
- LOGW_IF(maxChannels != mMaxChannels, "App requested %d channels", maxChannels);
+ ALOGW_IF(maxChannels != mMaxChannels, "App requested %d channels", maxChannels);
mQuit = false;
mDecodeThread = 0;
@@ -77,7 +77,7 @@ SoundPool::SoundPool(int maxChannels, int streamType, int srcQuality)
SoundPool::~SoundPool()
{
- LOGV("SoundPool destructor");
+ ALOGV("SoundPool destructor");
mDecodeThread->quit();
quit();
@@ -87,7 +87,7 @@ SoundPool::~SoundPool()
if (mChannelPool)
delete [] mChannelPool;
// clean up samples
- LOGV("clear samples");
+ ALOGV("clear samples");
mSamples.clear();
if (mDecodeThread)
@@ -123,12 +123,12 @@ int SoundPool::run()
mRestartLock.lock();
while (!mQuit) {
mCondition.wait(mRestartLock);
- LOGV("awake");
+ ALOGV("awake");
if (mQuit) break;
while (!mStop.empty()) {
SoundChannel* channel;
- LOGV("Getting channel from stop list");
+ ALOGV("Getting channel from stop list");
List<SoundChannel* >::iterator iter = mStop.begin();
channel = *iter;
mStop.erase(iter);
@@ -143,7 +143,7 @@ int SoundPool::run()
while (!mRestart.empty()) {
SoundChannel* channel;
- LOGV("Getting channel from list");
+ ALOGV("Getting channel from list");
List<SoundChannel*>::iterator iter = mRestart.begin();
channel = *iter;
mRestart.erase(iter);
@@ -161,7 +161,7 @@ int SoundPool::run()
mRestart.clear();
mCondition.signal();
mRestartLock.unlock();
- LOGV("goodbye");
+ ALOGV("goodbye");
return 0;
}
@@ -171,7 +171,7 @@ void SoundPool::quit()
mQuit = true;
mCondition.signal();
mCondition.wait(mRestartLock);
- LOGV("return from quit");
+ ALOGV("return from quit");
mRestartLock.unlock();
}
@@ -205,7 +205,7 @@ SoundChannel* SoundPool::findNextChannel(int channelID)
int SoundPool::load(const char* path, int priority)
{
- LOGV("load: path=%s, priority=%d", path, priority);
+ ALOGV("load: path=%s, priority=%d", path, priority);
Mutex::Autolock lock(&mLock);
sp<Sample> sample = new Sample(++mNextSampleID, path);
mSamples.add(sample->sampleID(), sample);
@@ -215,7 +215,7 @@ int SoundPool::load(const char* path, int priority)
int SoundPool::load(int fd, int64_t offset, int64_t length, int priority)
{
- LOGV("load: fd=%d, offset=%lld, length=%lld, priority=%d",
+ ALOGV("load: fd=%d, offset=%lld, length=%lld, priority=%d",
fd, offset, length, priority);
Mutex::Autolock lock(&mLock);
sp<Sample> sample = new Sample(++mNextSampleID, fd, offset, length);
@@ -226,14 +226,14 @@ int SoundPool::load(int fd, int64_t offset, int64_t length, int priority)
void SoundPool::doLoad(sp<Sample>& sample)
{
- LOGV("doLoad: loading sample sampleID=%d", sample->sampleID());
+ ALOGV("doLoad: loading sample sampleID=%d", sample->sampleID());
sample->startLoad();
mDecodeThread->loadSample(sample->sampleID());
}
bool SoundPool::unload(int sampleID)
{
- LOGV("unload: sampleID=%d", sampleID);
+ ALOGV("unload: sampleID=%d", sampleID);
Mutex::Autolock lock(&mLock);
return mSamples.removeItem(sampleID);
}
@@ -241,7 +241,7 @@ bool SoundPool::unload(int sampleID)
int SoundPool::play(int sampleID, float leftVolume, float rightVolume,
int priority, int loop, float rate)
{
- LOGV("play sampleID=%d, leftVolume=%f, rightVolume=%f, priority=%d, loop=%d, rate=%f",
+ ALOGV("play sampleID=%d, leftVolume=%f, rightVolume=%f, priority=%d, loop=%d, rate=%f",
sampleID, leftVolume, rightVolume, priority, loop, rate);
sp<Sample> sample;
SoundChannel* channel;
@@ -255,7 +255,7 @@ int SoundPool::play(int sampleID, float leftVolume, float rightVolume,
// is sample ready?
sample = findSample(sampleID);
if ((sample == 0) || (sample->state() != Sample::READY)) {
- LOGW(" sample %d not READY", sampleID);
+ ALOGW(" sample %d not READY", sampleID);
return 0;
}
@@ -266,13 +266,13 @@ int SoundPool::play(int sampleID, float leftVolume, float rightVolume,
// no channel allocated - return 0
if (!channel) {
- LOGV("No channel allocated");
+ ALOGV("No channel allocated");
return 0;
}
channelID = ++mNextChannelID;
- LOGV("play channel %p state = %d", channel, channel->state());
+ ALOGV("play channel %p state = %d", channel, channel->state());
channel->play(sample, channelID, leftVolume, rightVolume, priority, loop, rate);
return channelID;
}
@@ -288,7 +288,7 @@ SoundChannel* SoundPool::allocateChannel_l(int priority)
if (priority >= (*iter)->priority()) {
channel = *iter;
mChannels.erase(iter);
- LOGV("Allocated active channel");
+ ALOGV("Allocated active channel");
}
}
@@ -319,7 +319,7 @@ void SoundPool::moveToFront_l(SoundChannel* channel)
void SoundPool::pause(int channelID)
{
- LOGV("pause(%d)", channelID);
+ ALOGV("pause(%d)", channelID);
Mutex::Autolock lock(&mLock);
SoundChannel* channel = findChannel(channelID);
if (channel) {
@@ -329,7 +329,7 @@ void SoundPool::pause(int channelID)
void SoundPool::autoPause()
{
- LOGV("autoPause()");
+ ALOGV("autoPause()");
Mutex::Autolock lock(&mLock);
for (int i = 0; i < mMaxChannels; ++i) {
SoundChannel* channel = &mChannelPool[i];
@@ -339,7 +339,7 @@ void SoundPool::autoPause()
void SoundPool::resume(int channelID)
{
- LOGV("resume(%d)", channelID);
+ ALOGV("resume(%d)", channelID);
Mutex::Autolock lock(&mLock);
SoundChannel* channel = findChannel(channelID);
if (channel) {
@@ -349,7 +349,7 @@ void SoundPool::resume(int channelID)
void SoundPool::autoResume()
{
- LOGV("autoResume()");
+ ALOGV("autoResume()");
Mutex::Autolock lock(&mLock);
for (int i = 0; i < mMaxChannels; ++i) {
SoundChannel* channel = &mChannelPool[i];
@@ -359,7 +359,7 @@ void SoundPool::autoResume()
void SoundPool::stop(int channelID)
{
- LOGV("stop(%d)", channelID);
+ ALOGV("stop(%d)", channelID);
Mutex::Autolock lock(&mLock);
SoundChannel* channel = findChannel(channelID);
if (channel) {
@@ -382,7 +382,7 @@ void SoundPool::setVolume(int channelID, float leftVolume, float rightVolume)
void SoundPool::setPriority(int channelID, int priority)
{
- LOGV("setPriority(%d, %d)", channelID, priority);
+ ALOGV("setPriority(%d, %d)", channelID, priority);
Mutex::Autolock lock(&mLock);
SoundChannel* channel = findChannel(channelID);
if (channel) {
@@ -392,7 +392,7 @@ void SoundPool::setPriority(int channelID, int priority)
void SoundPool::setLoop(int channelID, int loop)
{
- LOGV("setLoop(%d, %d)", channelID, loop);
+ ALOGV("setLoop(%d, %d)", channelID, loop);
Mutex::Autolock lock(&mLock);
SoundChannel* channel = findChannel(channelID);
if (channel) {
@@ -402,7 +402,7 @@ void SoundPool::setLoop(int channelID, int loop)
void SoundPool::setRate(int channelID, float rate)
{
- LOGV("setRate(%d, %f)", channelID, rate);
+ ALOGV("setRate(%d, %f)", channelID, rate);
Mutex::Autolock lock(&mLock);
SoundChannel* channel = findChannel(channelID);
if (channel) {
@@ -413,16 +413,16 @@ void SoundPool::setRate(int channelID, float rate)
// call with lock held
void SoundPool::done_l(SoundChannel* channel)
{
- LOGV("done_l(%d)", channel->channelID());
+ ALOGV("done_l(%d)", channel->channelID());
// if "stolen", play next event
if (channel->nextChannelID() != 0) {
- LOGV("add to restart list");
+ ALOGV("add to restart list");
addToRestartList(channel);
}
// return to idle state
else {
- LOGV("move to front");
+ ALOGV("move to front");
moveToFront_l(channel);
}
}
@@ -455,7 +455,7 @@ Sample::Sample(int sampleID, const char* url)
init();
mSampleID = sampleID;
mUrl = strdup(url);
- LOGV("create sampleID=%d, url=%s", mSampleID, mUrl);
+ ALOGV("create sampleID=%d, url=%s", mSampleID, mUrl);
}
Sample::Sample(int sampleID, int fd, int64_t offset, int64_t length)
@@ -465,7 +465,7 @@ Sample::Sample(int sampleID, int fd, int64_t offset, int64_t length)
mFd = dup(fd);
mOffset = offset;
mLength = length;
- LOGV("create sampleID=%d, fd=%d, offset=%lld, length=%lld", mSampleID, mFd, mLength, mOffset);
+ ALOGV("create sampleID=%d, fd=%d, offset=%lld, length=%lld", mSampleID, mFd, mLength, mOffset);
}
void Sample::init()
@@ -483,9 +483,9 @@ void Sample::init()
Sample::~Sample()
{
- LOGV("Sample::destructor sampleID=%d, fd=%d", mSampleID, mFd);
+ ALOGV("Sample::destructor sampleID=%d, fd=%d", mSampleID, mFd);
if (mFd > 0) {
- LOGV("close(%d)", mFd);
+ ALOGV("close(%d)", mFd);
::close(mFd);
}
mData.clear();
@@ -498,29 +498,29 @@ status_t Sample::doLoad()
int numChannels;
int format;
sp<IMemory> p;
- LOGV("Start decode");
+ ALOGV("Start decode");
if (mUrl) {
p = MediaPlayer::decode(mUrl, &sampleRate, &numChannels, &format);
} else {
p = MediaPlayer::decode(mFd, mOffset, mLength, &sampleRate, &numChannels, &format);
- LOGV("close(%d)", mFd);
+ ALOGV("close(%d)", mFd);
::close(mFd);
mFd = -1;
}
if (p == 0) {
- LOGE("Unable to load sample: %s", mUrl);
+ ALOGE("Unable to load sample: %s", mUrl);
return -1;
}
- LOGV("pointer = %p, size = %u, sampleRate = %u, numChannels = %d",
+ 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;
}
@@ -554,14 +554,14 @@ void SoundChannel::play(const sp<Sample>& sample, int nextChannelID, float leftV
{ // scope for the lock
Mutex::Autolock lock(&mLock);
- LOGV("SoundChannel::play %p: sampleID=%d, channelID=%d, leftVolume=%f, rightVolume=%f,"
+ ALOGV("SoundChannel::play %p: sampleID=%d, channelID=%d, leftVolume=%f, rightVolume=%f,"
" priority=%d, loop=%d, rate=%f",
this, sample->sampleID(), nextChannelID, leftVolume, rightVolume,
priority, loop, rate);
// if not idle, this voice is being stolen
if (mState != IDLE) {
- LOGV("channel %d stolen - event queued for channel %d", channelID(), nextChannelID);
+ ALOGV("channel %d stolen - event queued for channel %d", channelID(), nextChannelID);
mNextEvent.set(sample, nextChannelID, leftVolume, rightVolume, priority, loop, rate);
stop_l();
return;
@@ -616,10 +616,10 @@ 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;
}
- LOGV("setVolume %p", newTrack);
+ ALOGV("setVolume %p", newTrack);
newTrack->setVolume(leftVolume, rightVolume);
newTrack->setLoop(0, frameCount, loop);
@@ -642,7 +642,7 @@ void SoundChannel::play(const sp<Sample>& sample, int nextChannelID, float leftV
}
exit:
- LOGV("delete oldTrack %p", oldTrack);
+ ALOGV("delete oldTrack %p", oldTrack);
delete oldTrack;
if (status != NO_ERROR) {
delete newTrack;
@@ -665,7 +665,7 @@ void SoundChannel::nextEvent()
Mutex::Autolock lock(&mLock);
nextChannelID = mNextEvent.channelID();
if (nextChannelID == 0) {
- LOGV("stolen channel has no event");
+ ALOGV("stolen channel has no event");
return;
}
@@ -677,7 +677,7 @@ void SoundChannel::nextEvent()
rate = mNextEvent.rate();
}
- LOGV("Starting stolen channel %d -> %d", channelID(), nextChannelID);
+ ALOGV("Starting stolen channel %d -> %d", channelID(), nextChannelID);
play(sample, nextChannelID, leftVolume, rightVolume, priority, loop, rate);
}
@@ -690,7 +690,7 @@ void SoundChannel::callback(int event, void* user, void *info)
void SoundChannel::process(int event, void *info, unsigned long toggle)
{
- //LOGV("process(%d)", mChannelID);
+ //ALOGV("process(%d)", mChannelID);
Mutex::Autolock lock(&mLock);
@@ -700,7 +700,7 @@ void SoundChannel::process(int event, void *info, unsigned long toggle)
}
if (mToggle != toggle) {
- LOGV("process wrong toggle %p channel %d", this, mChannelID);
+ ALOGV("process wrong toggle %p channel %d", this, mChannelID);
if (b != NULL) {
b->size = 0;
}
@@ -709,7 +709,7 @@ void SoundChannel::process(int event, void *info, unsigned long toggle)
sp<Sample> sample = mSample;
-// LOGV("SoundChannel::process event %d", event);
+// ALOGV("SoundChannel::process event %d", event);
if (event == AudioTrack::EVENT_MORE_DATA) {
@@ -733,25 +733,25 @@ void SoundChannel::process(int event, void *info, unsigned long toggle)
count = b->size;
}
memcpy(q, p, count);
-// LOGV("fill: q=%p, p=%p, mPos=%u, b->size=%u, count=%d", q, p, mPos, b->size, count);
+// ALOGV("fill: q=%p, p=%p, mPos=%u, b->size=%u, count=%d", q, p, mPos, b->size, count);
} else if (mPos < mAudioBufferSize) {
count = mAudioBufferSize - mPos;
if (count > b->size) {
count = b->size;
}
memset(q, 0, count);
-// LOGV("fill extra: q=%p, mPos=%u, b->size=%u, count=%d", q, mPos, b->size, count);
+// ALOGV("fill extra: q=%p, mPos=%u, b->size=%u, count=%d", q, mPos, b->size, count);
}
mPos += count;
b->size = count;
- //LOGV("buffer=%p, [0]=%d", b->i16, b->i16[0]);
+ //ALOGV("buffer=%p, [0]=%d", b->i16, b->i16[0]);
}
} else if (event == AudioTrack::EVENT_UNDERRUN) {
- LOGV("process %p channel %d EVENT_UNDERRUN", this, mChannelID);
+ ALOGV("process %p channel %d EVENT_UNDERRUN", this, mChannelID);
mSoundPool->addToStopList(this);
} else if (event == AudioTrack::EVENT_LOOP_END) {
- LOGV("End loop %p channel %d count %d", this, mChannelID, *(int *)info);
+ ALOGV("End loop %p channel %d count %d", this, mChannelID, *(int *)info);
}
}
@@ -761,7 +761,7 @@ bool SoundChannel::doStop_l()
{
if (mState != IDLE) {
setVolume_l(0, 0);
- LOGV("stop");
+ ALOGV("stop");
mAudioTrack->stop();
mSample.clear();
mState = IDLE;
@@ -798,7 +798,7 @@ void SoundChannel::pause()
{
Mutex::Autolock lock(&mLock);
if (mState == PLAYING) {
- LOGV("pause track");
+ ALOGV("pause track");
mState = PAUSED;
mAudioTrack->pause();
}
@@ -808,7 +808,7 @@ void SoundChannel::autoPause()
{
Mutex::Autolock lock(&mLock);
if (mState == PLAYING) {
- LOGV("pause track");
+ ALOGV("pause track");
mState = PAUSED;
mAutoPaused = true;
mAudioTrack->pause();
@@ -819,7 +819,7 @@ void SoundChannel::resume()
{
Mutex::Autolock lock(&mLock);
if (mState == PAUSED) {
- LOGV("resume track");
+ ALOGV("resume track");
mState = PLAYING;
mAutoPaused = false;
mAudioTrack->start();
@@ -830,7 +830,7 @@ void SoundChannel::autoResume()
{
Mutex::Autolock lock(&mLock);
if (mAutoPaused && (mState == PAUSED)) {
- LOGV("resume track");
+ ALOGV("resume track");
mState = PLAYING;
mAutoPaused = false;
mAudioTrack->start();
@@ -874,7 +874,7 @@ void SoundChannel::setLoop(int loop)
SoundChannel::~SoundChannel()
{
- LOGV("SoundChannel destructor %p", this);
+ ALOGV("SoundChannel destructor %p", this);
{
Mutex::Autolock lock(&mLock);
clearNextEvent();
@@ -887,7 +887,7 @@ SoundChannel::~SoundChannel()
void SoundChannel::dump()
{
- LOGV("mState = %d mChannelID=%d, mNumChannels=%d, mPos = %d, mPriority=%d, mLoop=%d",
+ ALOGV("mState = %d mChannelID=%d, mNumChannels=%d, mPos = %d, mPriority=%d, mLoop=%d",
mState, mChannelID, mNumChannels, mPos, mPriority, mLoop);
}
diff --git a/media/jni/soundpool/SoundPoolThread.cpp b/media/jni/soundpool/SoundPoolThread.cpp
index 275c519..ba3b482 100644
--- a/media/jni/soundpool/SoundPoolThread.cpp
+++ b/media/jni/soundpool/SoundPoolThread.cpp
@@ -55,7 +55,7 @@ void SoundPoolThread::quit() {
mCondition.signal();
mCondition.wait(mLock);
}
- LOGV("return from quit");
+ ALOGV("return from quit");
}
SoundPoolThread::SoundPoolThread(SoundPool* soundPool) :
@@ -73,25 +73,25 @@ SoundPoolThread::~SoundPoolThread()
}
int SoundPoolThread::beginThread(void* arg) {
- LOGV("beginThread");
+ ALOGV("beginThread");
SoundPoolThread* soundPoolThread = (SoundPoolThread*)arg;
return soundPoolThread->run();
}
int SoundPoolThread::run() {
- LOGV("run");
+ ALOGV("run");
for (;;) {
SoundPoolMsg msg = read();
- LOGV("Got message m=%d, mData=%d", msg.mMessageType, msg.mData);
+ ALOGV("Got message m=%d, mData=%d", msg.mMessageType, msg.mData);
switch (msg.mMessageType) {
case SoundPoolMsg::KILL:
- LOGV("goodbye");
+ ALOGV("goodbye");
return NO_ERROR;
case SoundPoolMsg::LOAD_SAMPLE:
doLoadSample(msg.mData);
break;
default:
- LOGW("run: Unrecognized message %d\n",
+ ALOGW("run: Unrecognized message %d\n",
msg.mMessageType);
break;
}
diff --git a/media/jni/soundpool/android_media_SoundPool.cpp b/media/jni/soundpool/android_media_SoundPool.cpp
index 03d3388..fe1c20a 100644
--- a/media/jni/soundpool/android_media_SoundPool.cpp
+++ b/media/jni/soundpool/android_media_SoundPool.cpp
@@ -41,7 +41,7 @@ static inline SoundPool* MusterSoundPool(JNIEnv *env, jobject thiz) {
static int
android_media_SoundPool_load_URL(JNIEnv *env, jobject thiz, jstring path, jint priority)
{
- LOGV("android_media_SoundPool_load_URL");
+ ALOGV("android_media_SoundPool_load_URL");
SoundPool *ap = MusterSoundPool(env, thiz);
if (path == NULL) {
jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
@@ -57,7 +57,7 @@ static int
android_media_SoundPool_load_FD(JNIEnv *env, jobject thiz, jobject fileDescriptor,
jlong offset, jlong length, jint priority)
{
- LOGV("android_media_SoundPool_load_FD");
+ ALOGV("android_media_SoundPool_load_FD");
SoundPool *ap = MusterSoundPool(env, thiz);
if (ap == NULL) return 0;
return ap->load(jniGetFDFromFileDescriptor(env, fileDescriptor),
@@ -66,7 +66,7 @@ android_media_SoundPool_load_FD(JNIEnv *env, jobject thiz, jobject fileDescripto
static bool
android_media_SoundPool_unload(JNIEnv *env, jobject thiz, jint sampleID) {
- LOGV("android_media_SoundPool_unload\n");
+ ALOGV("android_media_SoundPool_unload\n");
SoundPool *ap = MusterSoundPool(env, thiz);
if (ap == NULL) return 0;
return ap->unload(sampleID);
@@ -77,7 +77,7 @@ android_media_SoundPool_play(JNIEnv *env, jobject thiz, jint sampleID,
jfloat leftVolume, jfloat rightVolume, jint priority, jint loop,
jfloat rate)
{
- LOGV("android_media_SoundPool_play\n");
+ ALOGV("android_media_SoundPool_play\n");
SoundPool *ap = MusterSoundPool(env, thiz);
if (ap == NULL) return 0;
return ap->play(sampleID, leftVolume, rightVolume, priority, loop, rate);
@@ -86,7 +86,7 @@ android_media_SoundPool_play(JNIEnv *env, jobject thiz, jint sampleID,
static void
android_media_SoundPool_pause(JNIEnv *env, jobject thiz, jint channelID)
{
- LOGV("android_media_SoundPool_pause");
+ ALOGV("android_media_SoundPool_pause");
SoundPool *ap = MusterSoundPool(env, thiz);
if (ap == NULL) return;
ap->pause(channelID);
@@ -95,7 +95,7 @@ android_media_SoundPool_pause(JNIEnv *env, jobject thiz, jint channelID)
static void
android_media_SoundPool_resume(JNIEnv *env, jobject thiz, jint channelID)
{
- LOGV("android_media_SoundPool_resume");
+ ALOGV("android_media_SoundPool_resume");
SoundPool *ap = MusterSoundPool(env, thiz);
if (ap == NULL) return;
ap->resume(channelID);
@@ -104,7 +104,7 @@ android_media_SoundPool_resume(JNIEnv *env, jobject thiz, jint channelID)
static void
android_media_SoundPool_autoPause(JNIEnv *env, jobject thiz)
{
- LOGV("android_media_SoundPool_autoPause");
+ ALOGV("android_media_SoundPool_autoPause");
SoundPool *ap = MusterSoundPool(env, thiz);
if (ap == NULL) return;
ap->autoPause();
@@ -113,7 +113,7 @@ android_media_SoundPool_autoPause(JNIEnv *env, jobject thiz)
static void
android_media_SoundPool_autoResume(JNIEnv *env, jobject thiz)
{
- LOGV("android_media_SoundPool_autoResume");
+ ALOGV("android_media_SoundPool_autoResume");
SoundPool *ap = MusterSoundPool(env, thiz);
if (ap == NULL) return;
ap->autoResume();
@@ -122,7 +122,7 @@ android_media_SoundPool_autoResume(JNIEnv *env, jobject thiz)
static void
android_media_SoundPool_stop(JNIEnv *env, jobject thiz, jint channelID)
{
- LOGV("android_media_SoundPool_stop");
+ ALOGV("android_media_SoundPool_stop");
SoundPool *ap = MusterSoundPool(env, thiz);
if (ap == NULL) return;
ap->stop(channelID);
@@ -132,7 +132,7 @@ static void
android_media_SoundPool_setVolume(JNIEnv *env, jobject thiz, jint channelID,
float leftVolume, float rightVolume)
{
- LOGV("android_media_SoundPool_setVolume");
+ ALOGV("android_media_SoundPool_setVolume");
SoundPool *ap = MusterSoundPool(env, thiz);
if (ap == NULL) return;
ap->setVolume(channelID, leftVolume, rightVolume);
@@ -142,7 +142,7 @@ static void
android_media_SoundPool_setPriority(JNIEnv *env, jobject thiz, jint channelID,
int priority)
{
- LOGV("android_media_SoundPool_setPriority");
+ ALOGV("android_media_SoundPool_setPriority");
SoundPool *ap = MusterSoundPool(env, thiz);
if (ap == NULL) return;
ap->setPriority(channelID, priority);
@@ -152,7 +152,7 @@ static void
android_media_SoundPool_setLoop(JNIEnv *env, jobject thiz, jint channelID,
int loop)
{
- LOGV("android_media_SoundPool_setLoop");
+ ALOGV("android_media_SoundPool_setLoop");
SoundPool *ap = MusterSoundPool(env, thiz);
if (ap == NULL) return;
ap->setLoop(channelID, loop);
@@ -162,7 +162,7 @@ static void
android_media_SoundPool_setRate(JNIEnv *env, jobject thiz, jint channelID,
float rate)
{
- LOGV("android_media_SoundPool_setRate");
+ ALOGV("android_media_SoundPool_setRate");
SoundPool *ap = MusterSoundPool(env, thiz);
if (ap == NULL) return;
ap->setRate(channelID, rate);
@@ -170,7 +170,7 @@ android_media_SoundPool_setRate(JNIEnv *env, jobject thiz, jint channelID,
static void android_media_callback(SoundPoolEvent event, SoundPool* soundPool, void* user)
{
- LOGV("callback: (%d, %d, %d, %p, %p)", event.mMsg, event.mArg1, event.mArg2, soundPool, user);
+ ALOGV("callback: (%d, %d, %d, %p, %p)", event.mMsg, event.mArg1, event.mArg2, soundPool, user);
JNIEnv *env = AndroidRuntime::getJNIEnv();
env->CallStaticVoidMethod(fields.mSoundPoolClass, fields.mPostEvent, user, event.mMsg, event.mArg1, event.mArg2, NULL);
}
@@ -178,7 +178,7 @@ static void android_media_callback(SoundPoolEvent event, SoundPool* soundPool, v
static jint
android_media_SoundPool_native_setup(JNIEnv *env, jobject thiz, jobject weakRef, jint maxChannels, jint streamType, jint srcQuality)
{
- LOGV("android_media_SoundPool_native_setup");
+ ALOGV("android_media_SoundPool_native_setup");
SoundPool *ap = new SoundPool(maxChannels, streamType, srcQuality);
if (ap == NULL) {
return -1;
@@ -196,7 +196,7 @@ android_media_SoundPool_native_setup(JNIEnv *env, jobject thiz, jobject weakRef,
static void
android_media_SoundPool_release(JNIEnv *env, jobject thiz)
{
- LOGV("android_media_SoundPool_release");
+ ALOGV("android_media_SoundPool_release");
SoundPool *ap = MusterSoundPool(env, thiz);
if (ap != NULL) {
@@ -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;
}