[Android] Error messages cleanup
Jean-Baptiste Kempf
git at videolan.org
Sun May 6 18:45:05 CEST 2012
android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun May 6 18:44:49 2012 +0200| [d95617c5072675578e6e178b35b08879683e684b] | committer: Jean-Baptiste Kempf
Error messages cleanup
> http://git.videolan.org/gitweb.cgi/android.git/?a=commit;h=d95617c5072675578e6e178b35b08879683e684b
---
vlc-android/jni/aout.c | 10 +++++-----
vlc-android/jni/libvlcjni.c | 16 ++++++++--------
vlc-android/jni/thumbnailer.c | 14 +++++++-------
3 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/vlc-android/jni/aout.c b/vlc-android/jni/aout.c
index 21b0807..45d095f 100644
--- a/vlc-android/jni/aout.c
+++ b/vlc-android/jni/aout.c
@@ -47,7 +47,7 @@ extern JavaVM *myVm;
int aout_open(void **opaque, char *format, unsigned *rate, unsigned *nb_channels)
{
- LOGI("Opening the JNI audio output");
+ LOGI ("Opening the JNI audio output");
aout_sys_t *p_sys = calloc (1, sizeof (*p_sys));
if (!p_sys)
@@ -62,7 +62,7 @@ int aout_open(void **opaque, char *format, unsigned *rate, unsigned *nb_channels
JNIEnv *p_env;
if ((*myVm)->AttachCurrentThread (myVm, &p_env, NULL) != 0)
{
- LOGE("Couldn't attach the display thread to the JVM !");
+ LOGE("Could not attach the display thread to the JVM !");
return -1;
}
@@ -76,7 +76,7 @@ int aout_open(void **opaque, char *format, unsigned *rate, unsigned *nb_channels
goto error;
}
- LOGV ("Fixed number of channels to 2, number of samples to %d", FRAME_SIZE);
+ LOGV ("Number of channels forced to 2, number of samples to %d", FRAME_SIZE);
*nb_channels = 2;
(*p_env)->CallVoidMethod (p_env, p_sys->j_libVlc, methodIdInitAout,
@@ -98,7 +98,7 @@ int aout_open(void **opaque, char *format, unsigned *rate, unsigned *nb_channels
sizeof (uint16_t) /* =2 */);
if (buffer == NULL)
{
- LOGE("Couldn't allocate the Java byte array to store the audio data!");
+ LOGE ("Could not allocate the Java byte array to store the audio data!");
goto error;
}
@@ -109,7 +109,7 @@ int aout_open(void **opaque, char *format, unsigned *rate, unsigned *nb_channels
(*p_env)->DeleteLocalRef (p_env, buffer);
if (p_sys->buffer == NULL)
{
- LOGE ("Couldn't create the global reference!");
+ LOGE ("Could not create the global reference!");
goto error;
}
diff --git a/vlc-android/jni/libvlcjni.c b/vlc-android/jni/libvlcjni.c
index 264b3b6..b6c0d18 100644
--- a/vlc-android/jni/libvlcjni.c
+++ b/vlc-android/jni/libvlcjni.c
@@ -283,7 +283,7 @@ int currentSdk( JNIEnv *p_env, jobject thiz )
jclass cls = (*p_env)->FindClass( p_env, "org/videolan/vlc/Util" );
if ( !cls )
{
- LOGE( "Failed to load util class (org/videolan/vlc/Util)" );
+ LOGE("Failed to load util class (org/videolan/vlc/Util)" );
return 0;
}
jmethodID methodSdkVersion = (*p_env)->GetStaticMethodID( p_env, cls,
@@ -294,7 +294,7 @@ int currentSdk( JNIEnv *p_env, jobject thiz )
return 0;
}
int version = (*p_env)->CallStaticIntMethod( p_env, cls, methodSdkVersion );
- LOGI("Got version: %d\n", version );
+ LOGI("Phone running on API level %d\n", version );
return version;
}
@@ -391,7 +391,7 @@ jobjectArray Java_org_videolan_vlc_LibVLC_readMediaMeta(JNIEnv *env,
libvlc_media_t *m = new_media(instance, env, thiz, mrl, false);
if (!m)
{
- LOGE("readMediaMeta: Couldn't create the media!");
+ LOGE("readMediaMeta: Could not create the media!");
return array;
}
@@ -433,7 +433,7 @@ void Java_org_videolan_vlc_LibVLC_readMedia(JNIEnv *env, jobject thiz,
libvlc_media_t *m = new_media(instance, env, thiz, mrl, false);
if (!m)
{
- LOGE("readMedia: Couldn't create the media!");
+ LOGE("readMedia: Could not create the media!");
return;
}
@@ -482,7 +482,7 @@ jboolean Java_org_videolan_vlc_LibVLC_hasVideoTrack(JNIEnv *env, jobject thiz,
libvlc_media_t *p_m = new_media(i_instance, env, thiz, fileLocation, false);
if (p_m == NULL)
{
- LOGE("Couldn't create the media!");
+ LOGE("Could not create the media!");
return JNI_FALSE;
}
@@ -513,7 +513,7 @@ jobjectArray Java_org_videolan_vlc_LibVLC_readTracksInfo(JNIEnv *env, jobject th
jclass cls = (*env)->FindClass( env, "org/videolan/vlc/TrackInfo" );
if ( !cls )
{
- LOGE( "Failed to load class (org/videolan/vlc/TrackInfo)" );
+ LOGE("Failed to load class (org/videolan/vlc/TrackInfo)" );
return NULL;
}
@@ -529,7 +529,7 @@ jobjectArray Java_org_videolan_vlc_LibVLC_readTracksInfo(JNIEnv *env, jobject th
libvlc_media_t *p_m = new_media(instance, env, thiz, mrl, false);
if (p_m == NULL)
{
- LOGE("Couldn't create the media!");
+ LOGE("Could not create the media!");
return NULL;
}
@@ -606,7 +606,7 @@ jlong Java_org_videolan_vlc_LibVLC_getLengthFromLocation(JNIEnv *env, jobject th
libvlc_media_t *m = new_media(i_instance, env, thiz, fileLocation, false);
if (m == NULL)
{
- LOGE("Couldn't create the media to play!");
+ LOGE("Could not create the media to play!");
goto end;
}
diff --git a/vlc-android/jni/thumbnailer.c b/vlc-android/jni/thumbnailer.c
index 0231155..fab1cad 100644
--- a/vlc-android/jni/thumbnailer.c
+++ b/vlc-android/jni/thumbnailer.c
@@ -122,7 +122,7 @@ jbyteArray Java_org_videolan_vlc_LibVLC_getThumbnail(JNIEnv *env, jobject thiz,
thumbnailer_sys_t *sys = calloc(1, sizeof(thumbnailer_sys_t));
if (sys == NULL)
{
- LOGE("Couldn't create the thumbnailer data structure!");
+ LOGE("Could not create the thumbnailer data structure!");
return NULL;
}
@@ -136,7 +136,7 @@ jbyteArray Java_org_videolan_vlc_LibVLC_getThumbnail(JNIEnv *env, jobject thiz,
libvlc_media_t *m = new_media(instance, env, thiz, filePath, true);
if (m == NULL)
{
- LOGE("Couldn't create the media to play!");
+ LOGE("Could not create the media to play!");
goto end;
}
libvlc_media_add_option( m, ":no-audio" );
@@ -167,14 +167,14 @@ jbyteArray Java_org_videolan_vlc_LibVLC_getThumbnail(JNIEnv *env, jobject thiz,
/* Abord if we have not found a video track. */
if (!hasVideoTrack)
{
- LOGE("Could not find a video track in this file.\n");
+ LOGE("Could not find any video track in this file.\n");
goto end;
}
/* VLC could not tell us the size */
if( videoWidth == 0 || videoHeight == 0 )
{
- LOGE("Could not find correct dimensions.\n");
+ LOGE("Could not find the video dimensions.\n");
goto end;
}
@@ -203,7 +203,7 @@ jbyteArray Java_org_videolan_vlc_LibVLC_getThumbnail(JNIEnv *env, jobject thiz,
sys->frameData = malloc(picSize);
if (sys->frameData == NULL)
{
- LOGE("Couldn't allocate the memory to store the frame!");
+ LOGE("Could not allocate the memory to store the frame!");
goto end;
}
@@ -212,7 +212,7 @@ jbyteArray Java_org_videolan_vlc_LibVLC_getThumbnail(JNIEnv *env, jobject thiz,
sys->thumbnail = calloc(thumbnailSize, 1);
if (sys->thumbnail == NULL)
{
- LOGE("Couldn't allocate the memory to store the thumbnail!");
+ LOGE("Could not allocate the memory to store the thumbnail!");
goto end;
}
@@ -239,7 +239,7 @@ jbyteArray Java_org_videolan_vlc_LibVLC_getThumbnail(JNIEnv *env, jobject thiz,
byteArray = (*env)->NewByteArray(env, thumbnailSize);
if (byteArray == NULL)
{
- LOGE("Couldn't allocate the Java byte array to store the frame!");
+ LOGE("Could not allocate the Java byte array to store the frame!");
goto end;
}
More information about the Android
mailing list