diff options
Diffstat (limited to 'media/jni')
-rw-r--r-- | media/jni/android_media_MediaCodec.cpp | 2 | ||||
-rw-r--r-- | media/jni/android_media_MediaRecorder.cpp | 14 | ||||
-rw-r--r-- | media/jni/mediaeditor/VideoEditorMain.cpp | 34 | ||||
-rw-r--r-- | media/jni/mediaeditor/VideoEditorPropertiesMain.cpp | 10 |
4 files changed, 15 insertions, 45 deletions
diff --git a/media/jni/android_media_MediaCodec.cpp b/media/jni/android_media_MediaCodec.cpp index 221ea57..5fd5dee 100644 --- a/media/jni/android_media_MediaCodec.cpp +++ b/media/jni/android_media_MediaCodec.cpp @@ -192,7 +192,7 @@ status_t JMediaCodec::dequeueOutputBuffer( env, env->FindClass("android/media/MediaCodec$BufferInfo")); jmethodID method = env->GetMethodID(clazz.get(), "set", "(IIJI)V"); - env->CallVoidMethod(bufferInfo, method, offset, size, timeUs, flags); + env->CallVoidMethod(bufferInfo, method, (jint)offset, (jint)size, timeUs, flags); return OK; } diff --git a/media/jni/android_media_MediaRecorder.cpp b/media/jni/android_media_MediaRecorder.cpp index 0cfd2ff..b74d0fb 100644 --- a/media/jni/android_media_MediaRecorder.cpp +++ b/media/jni/android_media_MediaRecorder.cpp @@ -14,6 +14,13 @@ * limitations under the License. */ +#include <assert.h> +#include <fcntl.h> +#include <inttypes.h> +#include <limits.h> +#include <stdio.h> +#include <unistd.h> + //#define LOG_NDEBUG 0 #define LOG_TAG "MediaRecorderJNI" #include <utils/Log.h> @@ -22,11 +29,6 @@ #include <camera/ICameraService.h> #include <camera/Camera.h> #include <media/mediarecorder.h> -#include <stdio.h> -#include <assert.h> -#include <limits.h> -#include <unistd.h> -#include <fcntl.h> #include <utils/threads.h> #include "jni.h" @@ -303,7 +305,7 @@ android_media_MediaRecorder_setMaxFileSize( sp<MediaRecorder> mr = getMediaRecorder(env, thiz); char params[64]; - sprintf(params, "max-filesize=%lld", max_filesize_bytes); + sprintf(params, "max-filesize=%" PRId64, max_filesize_bytes); process_media_recorder_call(env, mr->setParameters(String8(params)), "java/lang/RuntimeException", "setMaxFileSize failed."); } diff --git a/media/jni/mediaeditor/VideoEditorMain.cpp b/media/jni/mediaeditor/VideoEditorMain.cpp index 058012b..0894d74 100644 --- a/media/jni/mediaeditor/VideoEditorMain.cpp +++ b/media/jni/mediaeditor/VideoEditorMain.cpp @@ -16,6 +16,7 @@ #define LOG_NDEBUG 1 #define LOG_TAG "VideoEditorMain" #include <dlfcn.h> +#include <inttypes.h> #include <stdio.h> #include <unistd.h> #include <utils/Log.h> @@ -24,7 +25,6 @@ #include <VideoEditorJava.h> #include <VideoEditorOsal.h> #include <VideoEditorLogging.h> -#include <marker.h> #include <VideoEditorClasses.h> #include <VideoEditorThumbnailMain.h> #include <M4OSA_Debug.h> @@ -438,7 +438,7 @@ static void jniPreviewProgressCallback (void* cookie, M4OSA_UInt32 msgType, M4VS, (M4OSA_Char*)"videoEdito JNI overlayFile"); if (pContext->mOverlayFileName != NULL) { strncpy (pContext->mOverlayFileName, - (const char*)pContext->pEditSettings->\ + (const char*)pContext->pEditSettings-> Effects[overlayEffectIndex].xVSS.pFramingFilePath, overlayFileNameLen); //Change the name to png file extPos = strstr(pContext->mOverlayFileName, ".rgb"); @@ -1560,9 +1560,6 @@ videoEditor_populateSettings( int *pOverlayIndex = M4OSA_NULL; M4OSA_Char* pTempChar = M4OSA_NULL; - // Add a code marker (the condition must always be true). - ADD_CODE_MARKER_FUN(NULL != pEnv) - // Validate the settings parameter. videoEditJava_checkAndThrowIllegalArgumentException(&needToBeLoaded, pEnv, (NULL == settings), @@ -2196,10 +2193,6 @@ static jint videoEditor_getPixels( M4OSA_Context mContext = M4OSA_NULL; jint* m_dst32 = M4OSA_NULL; - - // Add a text marker (the condition must always be true). - ADD_TEXT_MARKER_FUN(NULL != env) - const char *pString = env->GetStringUTFChars(path, NULL); if (pString == M4OSA_NULL) { if (env != NULL) { @@ -2537,9 +2530,6 @@ videoEditor_init( VIDEOEDIT_LOG_API(ANDROID_LOG_INFO, "VIDEO_EDITOR", "videoEditor_init()"); - // Add a text marker (the condition must always be true). - ADD_TEXT_MARKER_FUN(NULL != pEnv) - // Get the context. pContext = (ManualEditContext*)videoEditClasses_getContext(&initialized, pEnv, thiz); @@ -2948,9 +2938,6 @@ videoEditor_loadSettings( VIDEOEDIT_LOG_API(ANDROID_LOG_INFO, "VIDEO_EDITOR", "videoEditor_loadSettings()"); - // Add a code marker (the condition must always be true). - ADD_CODE_MARKER_FUN(NULL != pEnv) - // Get the context. pContext = (ManualEditContext*)videoEditClasses_getContext(&needToBeLoaded, pEnv, thiz); @@ -3123,9 +3110,6 @@ videoEditor_release( VIDEOEDIT_LOG_API(ANDROID_LOG_INFO, "VIDEO_EDITOR", "videoEditor_release()"); - // Add a text marker (the condition must always be true). - ADD_TEXT_MARKER_FUN(NULL != pEnv) - // Get the context. pContext = (ManualEditContext*)videoEditClasses_getContext(&released, pEnv, thiz); @@ -3388,7 +3372,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%lx", err); + "M4MA_generateAudioGraphFile: Cannot open input file 0x%" PRIx32, err); return err; } @@ -3422,7 +3406,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%lx", + "M4MA_generateAudioGraphFile: Malloc failed for bufferIn.m_dataAddress 0x%" PRIx32, M4ERR_ALLOC); return M4ERR_ALLOC; } @@ -3462,7 +3446,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%lx", + VIDEOEDIT_LOG_ERROR(ANDROID_LOG_INFO, "VIDEO_EDITOR", "numBytesToRead 0x%" PRIx32, numBytesToRead); break; /* stop if file is empty or EOF */ } @@ -3514,7 +3498,7 @@ M4OSA_ERR M4MA_generateAudioGraphFile(JNIEnv* pEnv, M4OSA_Char* pInputFileURL, } while (numBytesToRead != 0); - VIDEOEDIT_LOG_ERROR(ANDROID_LOG_INFO, "VIDEO_EDITOR", "loop 0x%lx", volumeValuesCount); + VIDEOEDIT_LOG_ERROR(ANDROID_LOG_INFO, "VIDEO_EDITOR", "loop 0x%" PRIx32, volumeValuesCount); /* if some error occured in fwrite */ if (numBytesToRead != 0) { @@ -3633,15 +3617,9 @@ jint JNI_OnLoad( VIDEOEDIT_LOG_FUNCTION(ANDROID_LOG_INFO, "VIDEO_EDITOR", "JNI_OnLoad()"); - // Add a text marker (the condition must always be true). - ADD_TEXT_MARKER_FUN(NULL != pVm) - // Check the JNI version. if (pVm->GetEnv(&pEnv, JNI_VERSION_1_4) == JNI_OK) { - // Add a code marker (the condition must always be true). - ADD_CODE_MARKER_FUN(NULL != pEnv) - // Register the manual edit JNI methods. if (videoEditor_registerManualEditMethods((JNIEnv*)pEnv) == 0) { diff --git a/media/jni/mediaeditor/VideoEditorPropertiesMain.cpp b/media/jni/mediaeditor/VideoEditorPropertiesMain.cpp index 2f8e357..ae1a80e 100644 --- a/media/jni/mediaeditor/VideoEditorPropertiesMain.cpp +++ b/media/jni/mediaeditor/VideoEditorPropertiesMain.cpp @@ -26,7 +26,6 @@ #include <VideoEditorOsal.h> #include <VideoEditorLogging.h> #include <VideoEditorOsal.h> -#include <marker.h> extern "C" { #include <M4OSA_Clock.h> @@ -107,9 +106,6 @@ jobject videoEditProp_getProperties( ANDROID_LOG_INFO, "VIDEO_EDITOR_PROPERTIES", "videoEditProp_getProperties()"); - // Add a text marker (the condition must always be true). - ADD_TEXT_MARKER_FUN(NULL != pEnv) - // Initialize the classes. videoEditPropClass_init(&initialized, (JNIEnv*)pEnv); @@ -192,9 +188,6 @@ jobject videoEditProp_getProperties( // dereferencing of pClipProperties). if (gotten) { - // Add a code marker (the condition must always be true). - ADD_CODE_MARKER_FUN(NULL != pClipProperties) - // Log the API call. VIDEOEDIT_LOG_API( ANDROID_LOG_INFO, "VIDEO_EDITOR_PROPERTIES", @@ -316,9 +309,6 @@ jobject videoEditProp_getProperties( videoEditOsal_free(pFile); pFile = M4OSA_NULL; - // Add a text marker (the condition must always be true). - ADD_TEXT_MARKER_FUN(NULL != pEnv) - // Return the Properties object. return(properties); } |