diff options
author | Steve Block <steveblock@google.com> | 2011-10-20 11:56:00 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2011-10-26 09:57:54 +0100 |
commit | 71f2cf116aab893e224056c38ab146bd1538dd3e (patch) | |
tree | 75a9162a0ea00830184b12a9ca51d3a1a040a5bb /media/jni | |
parent | 1da79501066a74b630c8aa138db0f86ab6c690bb (diff) | |
download | frameworks_base-71f2cf116aab893e224056c38ab146bd1538dd3e.zip frameworks_base-71f2cf116aab893e224056c38ab146bd1538dd3e.tar.gz frameworks_base-71f2cf116aab893e224056c38ab146bd1538dd3e.tar.bz2 |
Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/#/c/143865
Bug: 5449033
Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
Diffstat (limited to 'media/jni')
-rw-r--r-- | media/jni/android_media_MediaMetadataRetriever.cpp | 24 | ||||
-rw-r--r-- | media/jni/android_media_MediaPlayer.cpp | 50 | ||||
-rw-r--r-- | media/jni/android_media_MediaProfiles.cpp | 38 | ||||
-rw-r--r-- | media/jni/android_media_MediaRecorder.cpp | 44 | ||||
-rw-r--r-- | media/jni/android_media_MediaScanner.cpp | 24 | ||||
-rw-r--r-- | media/jni/audioeffect/android_media_AudioEffect.cpp | 24 | ||||
-rw-r--r-- | media/jni/audioeffect/android_media_Visualizer.cpp | 18 | ||||
-rwxr-xr-x | media/jni/mediaeditor/VideoEditorMain.cpp | 90 | ||||
-rw-r--r-- | media/jni/soundpool/SoundPool.cpp | 110 | ||||
-rw-r--r-- | media/jni/soundpool/SoundPoolThread.cpp | 10 | ||||
-rw-r--r-- | media/jni/soundpool/android_media_SoundPool.cpp | 32 |
11 files changed, 232 insertions, 232 deletions
diff --git a/media/jni/android_media_MediaMetadataRetriever.cpp b/media/jni/android_media_MediaMetadataRetriever.cpp index 73aea2a..f749d51 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"); @@ -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"); @@ -242,7 +242,7 @@ static jobject android_media_MediaMetadataRetriever_getFrameAtTime(JNIEnv *env, 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"); @@ -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..0272a03 100644 --- a/media/jni/android_media_MediaPlayer.cpp +++ b/media/jni/android_media_MediaPlayer.cpp @@ -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 ); } @@ -408,7 +408,7 @@ android_media_MediaPlayer_getVideoWidth(JNIEnv *env, jobject thiz) LOGE("getVideoWidth failed"); w = 0; } - LOGV("getVideoWidth: %d", w); + ALOGV("getVideoWidth: %d", w); return w; } @@ -425,7 +425,7 @@ android_media_MediaPlayer_getVideoHeight(JNIEnv *env, jobject thiz) LOGE("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,7 +656,7 @@ 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"); @@ -665,7 +665,7 @@ android_media_MediaPlayer_native_finalize(JNIEnv *env, jobject 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); 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..31ef046 100644 --- a/media/jni/android_media_MediaRecorder.cpp +++ b/media/jni/android_media_MediaRecorder.cpp @@ -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,7 +226,7 @@ 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."); @@ -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); @@ -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 b88296f..6b56e1d 100644 --- a/media/jni/android_media_MediaScanner.cpp +++ b/media/jni/android_media_MediaScanner.cpp @@ -66,7 +66,7 @@ public: mHandleStringTagMethodID(0), mSetMimeTypeMethodID(0) { - LOGV("MyMediaScannerClient constructor"); + ALOGV("MyMediaScannerClient constructor"); jclass mediaScannerClientInterface = env->FindClass(kClassMediaScannerClient); @@ -92,14 +92,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; @@ -117,7 +117,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(); @@ -139,7 +139,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(); @@ -175,7 +175,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"); @@ -205,7 +205,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); @@ -247,7 +247,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"); @@ -271,7 +271,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"); @@ -312,7 +312,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; @@ -327,7 +327,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) { @@ -341,7 +341,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/audioeffect/android_media_AudioEffect.cpp b/media/jni/audioeffect/android_media_AudioEffect.cpp index 277ea55..d517a58 100644 --- a/media/jni/audioeffect/android_media_AudioEffect.cpp +++ b/media/jni/audioeffect/android_media_AudioEffect.cpp @@ -106,7 +106,7 @@ 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); @@ -124,7 +124,7 @@ static void effectCallback(int event, void* user, void *info) { } 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) { @@ -133,7 +133,7 @@ static void effectCallback(int event, void* user, void *info) { } 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) { @@ -156,7 +156,7 @@ static void effectCallback(int event, void* user, void *info) { 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"); @@ -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; @@ -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; @@ -298,7 +298,7 @@ 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, @@ -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; } } @@ -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) { @@ -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) { diff --git a/media/jni/audioeffect/android_media_Visualizer.cpp b/media/jni/audioeffect/android_media_Visualizer.cpp index 27b28ee..b64505c 100644 --- a/media/jni/audioeffect/android_media_Visualizer.cpp +++ b/media/jni/audioeffect/android_media_Visualizer.cpp @@ -107,7 +107,7 @@ 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); @@ -178,7 +178,7 @@ static void android_media_visualizer_native_init(JNIEnv *env) { - LOGV("android_media_visualizer_native_init"); + ALOGV("android_media_visualizer_native_init"); fields.clazzEffect = NULL; @@ -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; @@ -241,7 +241,7 @@ 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, @@ -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/VideoEditorMain.cpp b/media/jni/mediaeditor/VideoEditorMain.cpp index ed4e92e..d8f1587 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); @@ -445,12 +445,12 @@ static void jniPreviewProgressCallback (void* cookie, M4OSA_UInt32 msgType, } 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) { @@ -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,7 +1506,7 @@ 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) { @@ -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,9 +2897,9 @@ 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 { @@ -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..40db37f 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 @@ -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; @@ -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,12 +498,12 @@ 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; } @@ -511,7 +511,7 @@ status_t Sample::doLoad() LOGE("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) { @@ -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; @@ -619,7 +619,7 @@ void SoundChannel::play(const sp<Sample>& sample, int nextChannelID, float leftV LOGE("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..bbb56ff 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,19 +73,19 @@ 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); diff --git a/media/jni/soundpool/android_media_SoundPool.cpp b/media/jni/soundpool/android_media_SoundPool.cpp index 03d3388..f86892f 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) { |