summaryrefslogtreecommitdiffstats
path: root/media/jni/mediaeditor
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2011-01-19 11:35:06 -0800
committerJames Dong <jdong@google.com>2011-01-19 11:42:53 -0800
commit581cad2221cb367e9e3ef6991c565cd37ced994f (patch)
tree9e8b1d48400d5f943dce036fccb01ec80036958d /media/jni/mediaeditor
parentc7816cd6a1441cd46af57224c616c2d56ced5105 (diff)
downloadframeworks_base-581cad2221cb367e9e3ef6991c565cd37ced994f.zip
frameworks_base-581cad2221cb367e9e3ef6991c565cd37ced994f.tar.gz
frameworks_base-581cad2221cb367e9e3ef6991c565cd37ced994f.tar.bz2
Turn error/exception logging on at the native layer
o also fixed some compilation warnings Change-Id: I66fc1f9972e9fb4b9a25ff3e5835d744d6c71455
Diffstat (limited to 'media/jni/mediaeditor')
-rwxr-xr-xmedia/jni/mediaeditor/VideoEditorLogging.h7
-rwxr-xr-xmedia/jni/mediaeditor/VideoEditorMain.cpp14
2 files changed, 10 insertions, 11 deletions
diff --git a/media/jni/mediaeditor/VideoEditorLogging.h b/media/jni/mediaeditor/VideoEditorLogging.h
index ca8c047..c13f6ff 100755
--- a/media/jni/mediaeditor/VideoEditorLogging.h
+++ b/media/jni/mediaeditor/VideoEditorLogging.h
@@ -21,12 +21,13 @@
#define VIDEOEDIT_LOG_INDENTATION (3)
+#define VIDEOEDIT_LOG_ERROR __android_log_print
+#define VIDEOEDIT_LOG_EXCEPTION __android_log_print
+
#ifdef VIDEOEDIT_LOGGING_ENABLED
#define VIDEOEDIT_LOG_ALLOCATION __android_log_print
#define VIDEOEDIT_LOG_API __android_log_print
-#define VIDEOEDIT_LOG_ERROR __android_log_print
-#define VIDEOEDIT_LOG_EXCEPTION __android_log_print
#define VIDEOEDIT_LOG_FUNCTION __android_log_print
#define VIDEOEDIT_LOG_RESULT(x,y, ...) LOGI(y, __VA_ARGS__ )
#define VIDEOEDIT_LOG_SETTING __android_log_print
@@ -40,8 +41,6 @@
#define VIDEOEDIT_LOG_ALLOCATION (void)
#define VIDEOEDIT_LOG_API (void)
-#define VIDEOEDIT_LOG_ERROR (void)
-#define VIDEOEDIT_LOG_EXCEPTION (void)
#define VIDEOEDIT_LOG_FUNCTION (void)
#define VIDEOEDIT_LOG_RESULT (void)
#define VIDEOEDIT_LOG_SETTING (void)
diff --git a/media/jni/mediaeditor/VideoEditorMain.cpp b/media/jni/mediaeditor/VideoEditorMain.cpp
index e66e4b9..643f698 100755
--- a/media/jni/mediaeditor/VideoEditorMain.cpp
+++ b/media/jni/mediaeditor/VideoEditorMain.cpp
@@ -437,7 +437,7 @@ static int videoEditor_renderPreviewFrame(JNIEnv* pEnv,
VideoEditor_renderPreviewFrameStr frameStr;
M4OSA_Context tnContext = M4OSA_NULL;
const char* pMessage = NULL;
- M4VIFI_ImagePlane *yuvPlane;
+ M4VIFI_ImagePlane *yuvPlane = NULL;
VIDEOEDIT_LOG_FUNCTION(ANDROID_LOG_INFO,
"VIDEO_EDITOR", "surfaceWidth = %d",surfaceWidth);
@@ -1179,7 +1179,7 @@ static int removeAlphafromRGB8888 (
}
/** Remove the alpha channel */
- for (int i = 0, j = 0; i < frameSize_argb; i++) {
+ for (size_t i = 0, j = 0; i < frameSize_argb; i++) {
if ((i % 4) == 0) continue;
pFramingCtx->FramingRgb->pac_data[j] = pTmpData[i];
j++;
@@ -2729,7 +2729,7 @@ typedef struct
} M4AM_Buffer;
-M4OSA_UInt8 logLookUp[256]{
+M4OSA_UInt8 logLookUp[256] = {
0,120,137,146,154,159,163,167,171,173,176,178,181,182,184,186,188,189,190,192,193,
194,195,196,198,199,199,200,201,202,203,204,205,205,206,207,207,208,209,209,210,
211,211,212,212,213,213,214,215,215,216,216,216,217,217,218,218,219,219,220,220,
@@ -2788,7 +2788,7 @@ M4OSA_ERR M4MA_generateAudioGraphFile(JNIEnv* pEnv, M4OSA_Char* pInputFileURL,
err = M4OSA_fileReadOpen (&inputFileHandle, pInputFileURL, M4OSA_kFileRead);
if (inputFileHandle == M4OSA_NULL) {
VIDEOEDIT_LOG_ERROR(ANDROID_LOG_INFO, "VIDEO_EDITOR",
- "M4MA_generateAudioGraphFile: Cannot open input file 0x%x", err);
+ "M4MA_generateAudioGraphFile: Cannot open input file 0x%lx", err);
return err;
}
@@ -2822,7 +2822,7 @@ M4OSA_ERR M4MA_generateAudioGraphFile(JNIEnv* pEnv, M4OSA_Char* pInputFileURL,
bufferIn.m_bufferSize = samplesCountInBytes*sizeof(M4OSA_UInt16);
} else {
VIDEOEDIT_LOG_ERROR(ANDROID_LOG_INFO, "VIDEO_EDITOR",
- "M4MA_generateAudioGraphFile: Malloc failed for bufferIn.m_dataAddress 0x%x",\
+ "M4MA_generateAudioGraphFile: Malloc failed for bufferIn.m_dataAddress 0x%lx",
M4ERR_ALLOC);
return M4ERR_ALLOC;
}
@@ -2862,7 +2862,7 @@ M4OSA_ERR M4MA_generateAudioGraphFile(JNIEnv* pEnv, M4OSA_Char* pInputFileURL,
if (err != M4NO_ERROR) {
// if out value of bytes-read is 0, break
if ( numBytesToRead == 0) {
- VIDEOEDIT_LOG_ERROR(ANDROID_LOG_INFO, "VIDEO_EDITOR", "numBytesToRead 0x%x",\
+ VIDEOEDIT_LOG_ERROR(ANDROID_LOG_INFO, "VIDEO_EDITOR", "numBytesToRead 0x%lx",
numBytesToRead);
break; /* stop if file is empty or EOF */
}
@@ -2914,7 +2914,7 @@ M4OSA_ERR M4MA_generateAudioGraphFile(JNIEnv* pEnv, M4OSA_Char* pInputFileURL,
} while (numBytesToRead != 0);
- VIDEOEDIT_LOG_ERROR(ANDROID_LOG_INFO, "VIDEO_EDITOR", "loop 0x%x", volumeValuesCount);
+ VIDEOEDIT_LOG_ERROR(ANDROID_LOG_INFO, "VIDEO_EDITOR", "loop 0x%lx", volumeValuesCount);
/* if some error occured in fwrite */
if (numBytesToRead != 0) {