OSDN Git Service

Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE
authorSteve Block <steveblock@google.com>
Sun, 8 Jan 2012 10:37:59 +0000 (10:37 +0000)
committerSteve Block <steveblock@google.com>
Sun, 8 Jan 2012 10:41:35 +0000 (10:41 +0000)
See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: I584e6f6a3c52308b7a5a5c9980ca429c831f4320

16 files changed:
mca/filterfw/jni/jni_gl_environment.cpp
mca/filterfw/jni/jni_native_frame.cpp
mca/filterfw/jni/jni_native_program.cpp
mca/filterfw/jni/jni_shader_program.cpp
mca/filterfw/jni/jni_util.cpp
mca/filterfw/native/core/gl_env.cpp
mca/filterfw/native/core/gl_frame.cpp
mca/filterfw/native/core/native_program.cpp
mca/filterfw/native/core/shader_program.cpp
mca/filterfw/native/core/time_util.cpp
mca/filterfw/native/core/vertex_frame.cpp
mca/filterpacks/base/native/geometry.cpp
mca/filterpacks/base/native/time_util.cpp
wilhelm/src/android/VideoCodec_to_android.cpp
wilhelm/src/android/android_GenericMediaPlayer.h
wilhelm/tests/native-media/jni/native-media-jni.c

index ac752a7..3c596a4 100644 (file)
@@ -135,13 +135,13 @@ jint Java_android_filterfw_core_GLEnvironment_nativeAddSurface(JNIEnv* env,
                                                                jobject surface) {
   GLEnv* gl_env = ConvertFromJava<GLEnv>(env, thiz);
   if (!surface) {
-    LOGE("GLEnvironment: Null Surface passed!");
+    ALOGE("GLEnvironment: Null Surface passed!");
     return -1;
   } else if (gl_env) {
     // Get the ANativeWindow
     ANativeWindow* window = ANativeWindow_fromSurface(env, surface);
     if (!window) {
-      LOGE("GLEnvironment: Error creating window!");
+      ALOGE("GLEnvironment: Error creating window!");
       return -1;
     }
 
@@ -165,7 +165,7 @@ jint Java_android_filterfw_core_GLEnvironment_nativeAddSurface(JNIEnv* env,
 
       eglChooseConfig(gl_env->display(), configAttribs, &config, 1, &numConfigs);
       if (numConfigs < 1) {
-        LOGE("GLEnvironment: No suitable EGL configuration found for surface!");
+        ALOGE("GLEnvironment: No suitable EGL configuration found for surface!");
         return -1;
       }
 
@@ -176,7 +176,7 @@ jint Java_android_filterfw_core_GLEnvironment_nativeAddSurface(JNIEnv* env,
                                                       NULL);
 
       if (GLEnv::CheckEGLError("eglCreateWindowSurface")) {
-        LOGE("GLEnvironment: Error creating window surface!");
+        ALOGE("GLEnvironment: Error creating window surface!");
         return -1;
       }
 
@@ -197,13 +197,13 @@ jint Java_android_filterfw_core_GLEnvironment_nativeAddSurfaceWidthHeight(JNIEnv
                                                                       jint height) {
   GLEnv* gl_env = ConvertFromJava<GLEnv>(env, thiz);
   if (!surface) {
-    LOGE("GLEnvironment: Null SurfaceTexture passed!");
+    ALOGE("GLEnvironment: Null SurfaceTexture passed!");
     return -1;
   } else if (gl_env) {
     // Get the ANativeWindow
     ANativeWindow* window = ANativeWindow_fromSurface(env, surface);
     if (!window) {
-      LOGE("GLEnvironment: Error creating window!");
+      ALOGE("GLEnvironment: Error creating window!");
       return -1;
     }
 
@@ -234,7 +234,7 @@ jint Java_android_filterfw_core_GLEnvironment_nativeAddSurfaceWidthHeight(JNIEnv
 
       eglChooseConfig(gl_env->display(), configAttribs, &config, 1, &numConfigs);
       if (numConfigs < 1) {
-        LOGE("GLEnvironment: No suitable EGL configuration found for surface texture!");
+        ALOGE("GLEnvironment: No suitable EGL configuration found for surface texture!");
         return -1;
       }
 
@@ -245,7 +245,7 @@ jint Java_android_filterfw_core_GLEnvironment_nativeAddSurfaceWidthHeight(JNIEnv
                                                       NULL);
 
       if (GLEnv::CheckEGLError("eglCreateWindowSurface")) {
-        LOGE("GLEnvironment: Error creating window surface!");
+        ALOGE("GLEnvironment: Error creating window surface!");
         return -1;
       }
 
@@ -277,7 +277,7 @@ jint Java_android_filterfw_core_GLEnvironment_nativeAddSurfaceFromMediaRecorder(
     // get a native mediarecorder object from the java object
     sp<MediaRecorder> mr = getMediaRecorder(env, jmediarecorder);
     if (mr == NULL) {
-        LOGE("GLEnvironment: Error- MediaRecorder could not be initialized!");
+        ALOGE("GLEnvironment: Error- MediaRecorder could not be initialized!");
         return -1;
     }
 
@@ -286,7 +286,7 @@ jint Java_android_filterfw_core_GLEnvironment_nativeAddSurfaceFromMediaRecorder(
     // over binder calls
     sp<ISurfaceTexture> surfaceMS = mr->querySurfaceMediaSourceFromMediaServer();
     if (surfaceMS == NULL) {
-      LOGE("GLEnvironment: Error- MediaRecorder returned a null \
+      ALOGE("GLEnvironment: Error- MediaRecorder returned a null \
               <ISurfaceTexture> handle.");
       return -1;
     }
@@ -296,7 +296,7 @@ jint Java_android_filterfw_core_GLEnvironment_nativeAddSurfaceFromMediaRecorder(
 
 
     if (window == NULL) {
-      LOGE("GLEnvironment: Error creating window!");
+      ALOGE("GLEnvironment: Error creating window!");
       return -1;
     }
     window->incStrong((void*)ANativeWindow_acquire);
@@ -332,7 +332,7 @@ jint Java_android_filterfw_core_GLEnvironment_nativeAddSurfaceFromMediaRecorder(
 
     eglChooseConfig(gl_env->display(), configAttribs, &config, 1, &numConfigs);
     if (numConfigs < 1) {
-      LOGE("GLEnvironment: No suitable EGL configuration found for surface texture!");
+      ALOGE("GLEnvironment: No suitable EGL configuration found for surface texture!");
       delete winHandle;
       return -1;
     }
@@ -344,7 +344,7 @@ jint Java_android_filterfw_core_GLEnvironment_nativeAddSurfaceFromMediaRecorder(
                                                     NULL);
 
     if (GLEnv::CheckEGLError("eglCreateWindowSurface")) {
-      LOGE("GLEnvironment: Error creating window surface!");
+      ALOGE("GLEnvironment: Error creating window surface!");
       delete winHandle;
       return -1;
     }
index ccc0880..1dfa3e6 100644 (file)
@@ -172,7 +172,7 @@ jboolean Java_android_filterfw_core_NativeFrame_setNativeBitmap(JNIEnv* env,
   if (frame && bitmap) {
     // Make sure frame size matches bitmap size
     if ((size / 4) != (frame->Size() / bytes_per_sample)) {
-      LOGE("Size mismatch in native setBitmap()!");
+      ALOGE("Size mismatch in native setBitmap()!");
       return JNI_FALSE;
     }
 
@@ -204,7 +204,7 @@ jboolean Java_android_filterfw_core_NativeFrame_setNativeBitmap(JNIEnv* env,
           break;
         }
         default:
-          LOGE("Unsupported bytes-per-pixel %d in setBitmap!", bytes_per_sample);
+          ALOGE("Unsupported bytes-per-pixel %d in setBitmap!", bytes_per_sample);
           break;
       }
       return (AndroidBitmap_unlockPixels(env, bitmap) == ANDROID_BITMAP_RESUT_SUCCESS);
@@ -225,7 +225,7 @@ jboolean Java_android_filterfw_core_NativeFrame_getNativeBitmap(JNIEnv* env,
     if (result == ANDROID_BITMAP_RESUT_SUCCESS) {
       // Make sure frame size matches bitmap size
       if ((size / 4) != (frame->Size() / bytes_per_sample)) {
-        LOGE("Size mismatch in native getBitmap()!");
+        ALOGE("Size mismatch in native getBitmap()!");
         return JNI_FALSE;
       }
 
@@ -256,7 +256,7 @@ jboolean Java_android_filterfw_core_NativeFrame_getNativeBitmap(JNIEnv* env,
           break;
         }
         default:
-          LOGE("Unsupported bytes-per-pixel %d in getBitmap!", bytes_per_sample);
+          ALOGE("Unsupported bytes-per-pixel %d in getBitmap!", bytes_per_sample);
           break;
       }
       return (AndroidBitmap_unlockPixels(env, bitmap) == ANDROID_BITMAP_RESUT_SUCCESS);
index c53e67d..b30b769 100644 (file)
@@ -107,7 +107,7 @@ jboolean Java_android_filterfw_core_NativeProgram_callNativeSetValue(JNIEnv* env
                                                                      jstring key,
                                                                      jstring value) {
   if (!value) {
-    LOGE("Native Program: Attempting to set null value for key %s!",
+    ALOGE("Native Program: Attempting to set null value for key %s!",
          ToCppString(env, key).c_str());
   }
   NativeProgram* program = ConvertFromJava<NativeProgram>(env, thiz);
@@ -149,7 +149,7 @@ jboolean Java_android_filterfw_core_NativeProgram_callNativeProcess(JNIEnv* env,
     if (input) {
         NativeFrame* native_frame = ConvertFromJava<NativeFrame>(env, input);
         if (!native_frame) {
-          LOGE("NativeProgram: Could not grab NativeFrame input %d!", i);
+          ALOGE("NativeProgram: Could not grab NativeFrame input %d!", i);
           return JNI_FALSE;
         }
         input_data = reinterpret_cast<const char*>(native_frame->Data());
@@ -165,7 +165,7 @@ jboolean Java_android_filterfw_core_NativeProgram_callNativeProcess(JNIEnv* env,
   if (output) {
     NativeFrame* output_frame = ConvertFromJava<NativeFrame>(env, output);
     if (!output_frame) {
-      LOGE("NativeProgram: Could not grab NativeFrame output!");
+      ALOGE("NativeProgram: Could not grab NativeFrame output!");
       return JNI_FALSE;
     }
     output_data = reinterpret_cast<char*>(output_frame->MutableData());
index f804874..19f43cd 100644 (file)
@@ -82,7 +82,7 @@ jboolean Java_android_filterfw_core_ShaderProgram_setUniformValue(JNIEnv* env,
   if (c_value.value) {
     return ToJBool(program && program->SetUniformValue(c_key, c_value));
   } else {
-    LOGE("ShaderProgram: Could not convert java object value passed for key '%s'!", c_key.c_str());
+    ALOGE("ShaderProgram: Could not convert java object value passed for key '%s'!", c_key.c_str());
     return JNI_FALSE;
   }
 }
@@ -108,7 +108,7 @@ jboolean Java_android_filterfw_core_ShaderProgram_shaderProcess(JNIEnv* env,
       jobject input = env->GetObjectArrayElement(inputs, i);
       const GLFrame* input_frame = ConvertFromJava<GLFrame>(env, input);
       if (!input || !input_frame) {
-        LOGE("ShaderProgram: invalid input frame %d!", i);
+        ALOGE("ShaderProgram: invalid input frame %d!", i);
         return JNI_FALSE;
       }
       input_frames.push_back(input_frame);
@@ -117,13 +117,13 @@ jboolean Java_android_filterfw_core_ShaderProgram_shaderProcess(JNIEnv* env,
     // Get the output frame
     GLFrame* output_frame = ConvertFromJava<GLFrame>(env, output);
     if (!output_frame) {
-      LOGE("ShaderProgram: no output frame found!");
+      ALOGE("ShaderProgram: no output frame found!");
       return JNI_FALSE;
     }
 
     // Process the frames!
     if (!program->Process(input_frames, output_frame)) {
-      LOGE("ShaderProgram: error processing shader!");
+      ALOGE("ShaderProgram: error processing shader!");
       return JNI_FALSE;
     }
 
index acb0e8a..30c0898 100644 (file)
@@ -55,7 +55,7 @@ void JavaObject::Retain() {
   if (ref_count_)
     ++(*ref_count_);
   else
-    LOGE("JavaObject: Reference count is NULL! JavaObject may be corrupted.");
+    ALOGE("JavaObject: Reference count is NULL! JavaObject may be corrupted.");
 }
 
 void JavaObject::Release() {
@@ -65,14 +65,14 @@ void JavaObject::Release() {
     if (*ref_count_ == 0) {
       JNIEnv* env = GetCurrentJNIEnv();
       if (!env)
-        LOGE("JavaObject: Releasing outside of Java thread. Will just leak!");
+        ALOGE("JavaObject: Releasing outside of Java thread. Will just leak!");
       else if (object_)
         env->DeleteGlobalRef(object_);
       delete ref_count_;
       ref_count_ = NULL;
     }
   } else {
-    LOGE("JavaObject: Reference count is NULL! JavaObject may be corrupted.");
+    ALOGE("JavaObject: Reference count is NULL! JavaObject may be corrupted.");
   }
 }
 
index 6bb7e62..f11cba3 100644 (file)
@@ -71,7 +71,7 @@ GLEnv::~GLEnv() {
 
   // Log error if this did not work
   if (CheckEGLError("TearDown!"))
-    LOGE("GLEnv: Error tearing down GL Environment!");
+    ALOGE("GLEnv: Error tearing down GL Environment!");
 }
 
 bool GLEnv::IsInitialized() const {
@@ -123,7 +123,7 @@ bool GLEnv::InitWithCurrentContext() {
 
 bool GLEnv::InitWithNewContext() {
   if (IsInitialized()) {
-    LOGE("GLEnv: Attempting to reinitialize environment!");
+    ALOGE("GLEnv: Attempting to reinitialize environment!");
     return false;
   }
 
@@ -155,7 +155,7 @@ bool GLEnv::InitWithNewContext() {
 
   eglChooseConfig(display(), configAttribs, &config, 1, &numConfigs);
   if (numConfigs < 1) {
-    LOGE("GLEnv::Init: No suitable EGL configuration found!");
+    ALOGE("GLEnv::Init: No suitable EGL configuration found!");
     return false;
   }
 
@@ -296,7 +296,7 @@ void GLEnv::ReleaseContextId(int context_id) {
 bool GLEnv::CheckGLError(const std::string& op) {
   bool err = false;
   for (GLint error = glGetError(); error; error = glGetError()) {
-    LOGE("GL Error: Operation '%s' caused GL error (0x%x)\n",
+    ALOGE("GL Error: Operation '%s' caused GL error (0x%x)\n",
          op.c_str(),
          error);
     err = true;
@@ -309,7 +309,7 @@ bool GLEnv::CheckEGLError(const std::string& op) {
   for (EGLint error = eglGetError();
        error != EGL_SUCCESS;
        error = eglGetError()) {
-    LOGE("EGL Error: Operation '%s' caused EGL error (0x%x)\n",
+    ALOGE("EGL Error: Operation '%s' caused EGL error (0x%x)\n",
          op.c_str(),
          error);
     err = true;
@@ -324,17 +324,17 @@ bool GLEnv::CheckEGLMakeCurrentError() {
        error = eglGetError()) {
     switch (error) {
       case EGL_BAD_DISPLAY:
-        LOGE("EGL Error: Attempting to activate context with bad display!");
+        ALOGE("EGL Error: Attempting to activate context with bad display!");
         break;
       case EGL_BAD_SURFACE:
-        LOGE("EGL Error: Attempting to activate context with bad surface!");
+        ALOGE("EGL Error: Attempting to activate context with bad surface!");
         break;
       case EGL_BAD_ACCESS:
-        LOGE("EGL Error: Attempting to activate context, which is "
+        ALOGE("EGL Error: Attempting to activate context, which is "
              "already active in another thread!");
         break;
       default:
-        LOGE("EGL Error: Making EGL rendering context current caused "
+        ALOGE("EGL Error: Making EGL rendering context current caused "
              "error: 0x%x\n", error);
     }
     err = true;
index f95ae97..0f8b4a1 100644 (file)
@@ -284,7 +284,7 @@ bool GLFrame::GenerateTextureName() {
   if (texture_state_ == kStateUninitialized) {
     // Make sure texture not in use already
     if (glIsTexture(texture_id_)) {
-      LOGE("GLFrame: Cannot generate texture id %d, as it is in use already!", texture_id_);
+      ALOGE("GLFrame: Cannot generate texture id %d, as it is in use already!", texture_id_);
       return false;
     }
 
@@ -329,7 +329,7 @@ bool GLFrame::GenerateFboName() {
   if (fbo_state_ == kStateUninitialized) {
     // Make sure FBO not in use already
     if (glIsFramebuffer(fbo_id_)) {
-      LOGE("GLFrame: Cannot generate FBO id %d, as it is in use already!", fbo_id_);
+      ALOGE("GLFrame: Cannot generate FBO id %d, as it is in use already!", fbo_id_);
       return false;
     }
 
@@ -393,7 +393,7 @@ bool GLFrame::AttachTextureToFbo() {
   if (fbo_state_ == kStateComplete || texture_state_ == kStateUnmanaged) {
     return true;
   } else if (fbo_state_ != kStateGenerated) {
-    LOGE("Attempting to attach texture to FBO with no FBO in place!");
+    ALOGE("Attempting to attach texture to FBO with no FBO in place!");
     return false;
   }
 
index e67a58d..c46c46f 100644 (file)
@@ -46,7 +46,7 @@ bool NativeProgram::OpenLibrary(const std::string& lib_name) {
   if (!lib_handle_) {
     lib_handle_ = dlopen(lib_name.c_str(), RTLD_NOW);
     if (!lib_handle_) {
-      LOGE("NativeProgram: Error opening library: '%s': %s", lib_name.c_str(), dlerror());
+      ALOGE("NativeProgram: Error opening library: '%s': %s", lib_name.c_str(), dlerror());
       return false;
     }
     return true;
@@ -59,7 +59,7 @@ bool NativeProgram::BindProcessFunction(const std::string& func_name) {
     return false;
   process_function_ = reinterpret_cast<ProcessFunctionPtr>(dlsym(lib_handle_, func_name.c_str()));
   if (!process_function_) {
-    LOGE("NativeProgram: Could not find process function symbol: '%s'!", func_name.c_str());
+    ALOGE("NativeProgram: Could not find process function symbol: '%s'!", func_name.c_str());
     return false;
   }
   return true;
index 7db0ae3..d92eb31 100644 (file)
@@ -185,13 +185,13 @@ bool ShaderProgram::Process(const std::vector<const GLTextureHandle*>& input,
 
   // Abort if program did not successfully compile and link
   if (!IsExecutable()) {
-    LOGE("ShaderProgram: unexecutable program!");
+    ALOGE("ShaderProgram: unexecutable program!");
     return false;
   }
 
   // Focus the FBO of the output
   if (!output->FocusFrameBuffer()) {
-    LOGE("Unable to focus frame buffer");
+    ALOGE("Unable to focus frame buffer");
     return false;
   }
 
@@ -205,7 +205,7 @@ bool ShaderProgram::Process(const std::vector<const GLTextureHandle*>& input,
       const GLuint tex_id = input[i]->GetTextureId();
       const GLenum target = input[i]->GetTextureTarget();
       if (tex_id == 0) {
-        LOGE("ShaderProgram: invalid texture id at input: %d!", i);
+        ALOGE("ShaderProgram: invalid texture id at input: %d!", i);
         return false;
       }
       textures.push_back(tex_id);
@@ -215,7 +215,7 @@ bool ShaderProgram::Process(const std::vector<const GLTextureHandle*>& input,
 
   // And render!
   if (!RenderFrame(textures, targets)) {
-    LOGE("Unable to render frame");
+    ALOGE("Unable to render frame");
     return false;
   }
   return true;
@@ -262,7 +262,7 @@ void ShaderProgram::SetTargetRegion(const Quad& quad) {
 bool ShaderProgram::CompileAndLink() {
   // Make sure we haven't compiled and linked already
   if (vertex_shader_ != 0 || fragment_shader_ != 0 || program_ != 0) {
-    LOGE("Attempting to re-compile shaders!");
+    ALOGE("Attempting to re-compile shaders!");
     return false;
   }
 
@@ -270,7 +270,7 @@ bool ShaderProgram::CompileAndLink() {
   vertex_shader_ = CompileShader(GL_VERTEX_SHADER,
                                  vertex_shader_source_.c_str());
   if (!vertex_shader_) {
-    LOGE("Shader compilation failed!");
+    ALOGE("Shader compilation failed!");
     return false;
   }
 
@@ -293,7 +293,7 @@ bool ShaderProgram::CompileAndLink() {
     ProgramVar pos_coord_attr = glGetAttribLocation(program_, PositionAttributeName().c_str());
     manage_coordinates_ = (tex_coord_attr >= 0 && pos_coord_attr >= 0);
   } else {
-    LOGE("Could not link shader program!");
+    ALOGE("Could not link shader program!");
     return false;
   }
 
@@ -315,18 +315,18 @@ GLuint ShaderProgram::CompileShader(GLenum shader_type, const char* source) {
     glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled);
     if (!compiled) {
       // Log the compilation error messages
-      LOGE("Problem compiling shader! Source:");
-      LOGE("%s", source);
+      ALOGE("Problem compiling shader! Source:");
+      ALOGE("%s", source);
       std::string src(source);
       unsigned int cur_pos = 0;
       unsigned int next_pos = 0;
       int line_number = 1;
       while ( (next_pos = src.find_first_of('\n', cur_pos)) != std::string::npos) {
-        LOGE("%03d : %s", line_number, src.substr(cur_pos, next_pos-cur_pos).c_str());
+        ALOGE("%03d : %s", line_number, src.substr(cur_pos, next_pos-cur_pos).c_str());
         cur_pos = next_pos + 1;
         line_number++;
       }
-      LOGE("%03d : %s", line_number, src.substr(cur_pos, next_pos-cur_pos).c_str());
+      ALOGE("%03d : %s", line_number, src.substr(cur_pos, next_pos-cur_pos).c_str());
 
       GLint log_length = 0;
       glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &log_length);
@@ -334,7 +334,7 @@ GLuint ShaderProgram::CompileShader(GLenum shader_type, const char* source) {
         char* error_log = new char[log_length];
         if (error_log) {
           glGetShaderInfoLog(shader, log_length, NULL, error_log);
-          LOGE("Shader compilation error %d:\n%s\n", shader_type, error_log);
+          ALOGE("Shader compilation error %d:\n%s\n", shader_type, error_log);
           delete[] error_log;
         }
       }
@@ -368,7 +368,7 @@ GLuint ShaderProgram::LinkProgram(GLuint* shaders, GLuint count) {
         char* error_log = new char[log_length];
         if (error_log) {
           glGetProgramInfoLog(program, log_length, NULL, error_log);
-          LOGE("Program Linker Error:\n%s\n", error_log);
+          ALOGE("Program Linker Error:\n%s\n", error_log);
           delete[] error_log;
         }
       }
@@ -442,7 +442,7 @@ bool ShaderProgram::BindInputTextures(const std::vector<GLuint>& textures,
     if (tex_var >= 0) {
       glUniform1i(tex_var, i);
     } else {
-      LOGE("ShaderProgram: Shader does not seem to support %d number of "
+      ALOGE("ShaderProgram: Shader does not seem to support %d number of "
            "inputs! Missing uniform 'tex_sampler_%d'!", textures.size(), i);
       return false;
     }
@@ -467,20 +467,20 @@ bool ShaderProgram::RenderFrame(const std::vector<GLuint>& textures,
                                 const std::vector<GLenum>& targets) {
   // Make sure we have enough texture units to accomodate the textures
   if (textures.size() > static_cast<unsigned>(MaxTextureUnits())) {
-    LOGE("ShaderProgram: Number of input textures is unsupported on this "
+    ALOGE("ShaderProgram: Number of input textures is unsupported on this "
          "platform!");
     return false;
   }
 
   // Prepare to render
   if (!BeginDraw()) {
-    LOGE("ShaderProgram: couldn't initialize gl for drawing!");
+    ALOGE("ShaderProgram: couldn't initialize gl for drawing!");
     return false;
   }
 
   // Bind input textures
   if (!BindInputTextures(textures, targets)) {
-    LOGE("BindInputTextures failed");
+    ALOGE("BindInputTextures failed");
     return false;
   }
 
@@ -618,7 +618,7 @@ bool ShaderProgram::CheckValueCount(const std::string& var_type,
                                     int components,
                                     int value_size) {
   if (expected_count != (value_size / components)) {
-    LOGE("Shader Program: %s Value Error (%s): Expected value length %d "
+    ALOGE("Shader Program: %s Value Error (%s): Expected value length %d "
          "(%d components), but received length of %d (%d components)!",
          var_type.c_str(), var_name.c_str(),
          expected_count, components * expected_count,
@@ -633,7 +633,7 @@ bool ShaderProgram::CheckValueMult(const std::string& var_type,
                                    int components,
                                    int value_size) {
   if (value_size % components != 0) {
-    LOGE("Shader Program: %s Value Error (%s): Value must be multiple of %d, "
+    ALOGE("Shader Program: %s Value Error (%s): Value must be multiple of %d, "
          "but %d elements were passed!", var_type.c_str(), var_name.c_str(),
          components, value_size);
     return false;
@@ -643,7 +643,7 @@ bool ShaderProgram::CheckValueMult(const std::string& var_type,
 
 bool ShaderProgram::CheckVarValid(ProgramVar var) {
   if (!IsVarValid(var)) {
-    LOGE("Shader Program: Attempting to access invalid variable!");
+    ALOGE("Shader Program: Attempting to access invalid variable!");
     return false;
   }
   return true;
@@ -652,7 +652,7 @@ bool ShaderProgram::CheckVarValid(ProgramVar var) {
 // Uniforms ////////////////////////////////////////////////////////////////////
 bool ShaderProgram::CheckUniformValid(ProgramVar var) {
   if (!IsVarValid(var) || uniform_indices_.find(var) == uniform_indices_.end()) {
-    LOGE("Shader Program: Attempting to access unknown uniform %d!", var);
+    ALOGE("Shader Program: Attempting to access unknown uniform %d!", var);
     return false;
   }
   return true;
@@ -669,7 +669,7 @@ int ShaderProgram::MaxUniformCount() {
 
 ProgramVar ShaderProgram::GetUniform(const std::string& name) const {
   if (!IsExecutable()) {
-    LOGE("ShaderProgram: Error: Must link program before querying uniforms!");
+    ALOGE("ShaderProgram: Error: Must link program before querying uniforms!");
     return -1;
   }
   return glGetUniformLocation(program_, name.c_str());
@@ -940,7 +940,7 @@ int ShaderProgram::MaxAttributeCount() {
 
 ProgramVar ShaderProgram::GetAttribute(const std::string& name) const {
   if (!IsExecutable()) {
-    LOGE("ShaderProgram: Error: Must link program before querying attributes!");
+    ALOGE("ShaderProgram: Error: Must link program before querying attributes!");
     return -1;
   } else if (name == PositionAttributeName() || name == TexCoordAttributeName()) {
     ALOGW("ShaderProgram: Attempting to overwrite internal vertex attribute '%s'!", name.c_str());
@@ -1014,7 +1014,7 @@ bool ShaderProgram::SetAttributeValues(ProgramVar var,
 
   // Make sure the passed data vector has a valid size
   if (total  % components != 0) {
-    LOGE("ShaderProgram: Invalid attribute vector given! Specified a component "
+    ALOGE("ShaderProgram: Invalid attribute vector given! Specified a component "
          "count of %d, but passed a non-multiple vector of size %d!",
          components, total);
     return false;
index 4133413..c86c80d 100644 (file)
@@ -63,7 +63,7 @@ void NamedStopWatch::Stop() {
         mTotalUSec += stopUSec - mStartUSec;
         if (mNumCalls % mLoggingPeriodInFrames == 0) {
             const float mSec = TotalUSec() * 1.0E-3f / NumCalls();
-            LOGE("%s: %f ms", Name().c_str(), mSec);
+            ALOGE("%s: %f ms", Name().c_str(), mSec);
         }
     }
     mStartUSec = 0;
index e5e7f01..822573f 100644 (file)
@@ -47,7 +47,7 @@ bool VertexFrame::WriteData(const uint8_t* data, int size) {
   // Create buffer if not created already
   const bool first_upload = !HasVBO();
   if (first_upload && !CreateBuffer()) {
-    LOGE("VertexFrame: Could not create vertex buffer!");
+    ALOGE("VertexFrame: Could not create vertex buffer!");
     return false;
   }
 
@@ -61,7 +61,7 @@ bool VertexFrame::WriteData(const uint8_t* data, int size) {
   else if (!first_upload && size <= size_)
     glBufferSubData(GL_ARRAY_BUFFER, 0, size, data);
   else {
-    LOGE("VertexFrame: Attempting to upload more data (%d bytes) than fits "
+    ALOGE("VertexFrame: Attempting to upload more data (%d bytes) than fits "
          "inside the vertex frame (%d bytes)!", size, size_);
     return false;
   }
index d744a0f..7ea90c2 100644 (file)
@@ -137,7 +137,7 @@ bool SlantedRect::FromCenterAxisAndLengths(const Point& center,
                                            const Point& lengths) {
   Point dy = vert_axis;
   if (!dy.ScaleTo(lengths.y() / 2.0f)) {
-    LOGE("Illegal axis: %f %f", vert_axis.x(), vert_axis.y());
+    ALOGE("Illegal axis: %f %f", vert_axis.x(), vert_axis.y());
     return false;
   }
 
index 71ea9f1..1a78a95 100644 (file)
@@ -61,7 +61,7 @@ void NamedStopWatch::Stop() {
         mTotalUSec += stopUSec - mStartUSec;
         if (mNumCalls % mLoggingPeriodInFrames == 0) {
             const float mSec = TotalUSec() * 1.0E-3f / NumCalls();
-            LOGE("%s: %f ms", Name().c_str(), mSec);
+            ALOGE("%s: %f ms", Name().c_str(), mSec);
         }
     }
     mStartUSec = 0;
index 20aad28..01c3af2 100644 (file)
@@ -65,7 +65,7 @@ bool android_videoCodec_expose() {
 
     sp<IOMX> omx(service->getOMX());
     if (omx.get() == NULL) {
-        LOGE("android_videoCodec_expose() couldn't access OMX interface");
+        ALOGE("android_videoCodec_expose() couldn't access OMX interface");
         return false;
     }
 
index 3e8fe81..8ef66b2 100644 (file)
@@ -120,7 +120,7 @@ protected:
     // Receives notifications about death of media.player service
     const sp<MediaPlayerDeathNotifier> mPlayerDeathNotifier;
 
-    // Return a reference to the media player service, or LOGE and return NULL after retries fail
+    // Return a reference to the media player service, or ALOGE and return NULL after retries fail
     static const sp<IMediaPlayerService> getMediaPlayerService() {
         return IMediaDeathNotifier::getMediaPlayerService();
     }
index 2dbe295..a43cb9e 100644 (file)
@@ -301,7 +301,7 @@ static jboolean enqueueInitialBuffers(jboolean discontinuity)
     nbRead = fread(dataCache, BUFFER_SIZE, NB_BUFFERS, file);
     if (nbRead <= 0) {
         // could be premature EOF or I/O error
-        LOGE("Error filling cache, exiting\n");
+        ALOGE("Error filling cache, exiting\n");
         return JNI_FALSE;
     }
     assert(1 <= nbRead && nbRead <= NB_BUFFERS);
@@ -349,7 +349,7 @@ jboolean Java_com_example_nativemedia_NativeMedia_createStreamingMediaPlayer(JNI
     // open the file to play
     file = fopen(utf8, "rb");
     if (file == NULL) {
-        LOGE("Failed to open %s", utf8);
+        ALOGE("Failed to open %s", utf8);
         return JNI_FALSE;
     }