am 23ebc24e: am 08467c57: am 9bc6acf2: Merge "AArch64: Use long for pointers in VideoEditor classes"

* commit '23ebc24eee4bf8b58405daab177e46d8e3da790f':
  AArch64: Use long for pointers in VideoEditor classes
This commit is contained in:
Narayan Kamath
2014-01-07 13:04:14 +00:00
committed by Android Git Automerger
3 changed files with 37 additions and 37 deletions

View File

@ -118,7 +118,7 @@ class MediaArtistNativeHelper {
private boolean mErrorFlagSet = false; private boolean mErrorFlagSet = false;
@SuppressWarnings("unused") @SuppressWarnings("unused")
private int mManualEditContext; private long mManualEditContext;
/* Listeners */ /* Listeners */

View File

@ -609,7 +609,7 @@ VIDEOEDIT_JAVA_DEFINE_FIELD_CLASS(EffectSettings, EFFECT_SETTINGS_CLASS_NAME)
VIDEOEDIT_JAVA_DEFINE_FIELDS(Engine) VIDEOEDIT_JAVA_DEFINE_FIELDS(Engine)
{ {
VIDEOEDIT_JAVA_FIELD_INIT("mManualEditContext", "I") VIDEOEDIT_JAVA_FIELD_INIT("mManualEditContext", "J")
}; };
VIDEOEDIT_JAVA_DEFINE_FIELD_CLASS(Engine, MANUAL_EDIT_ENGINE_CLASS_NAME) VIDEOEDIT_JAVA_DEFINE_FIELD_CLASS(Engine, MANUAL_EDIT_ENGINE_CLASS_NAME)
@ -3096,7 +3096,7 @@ videoEditClasses_getContext(
if (*pResult) if (*pResult)
{ {
// Retrieve the context pointer. // Retrieve the context pointer.
pContext = (void *)pEnv->GetIntField(object, fieldIds.context); pContext = (void *)pEnv->GetLongField(object, fieldIds.context);
} }
// Return the context pointer. // Return the context pointer.
@ -3132,15 +3132,15 @@ videoEditClasses_setContext(
{ {
// Set the context field. // Set the context field.
VIDEOEDIT_LOG_FUNCTION(ANDROID_LOG_INFO, "VIDEO_EDITOR_CLASSES", VIDEOEDIT_LOG_FUNCTION(ANDROID_LOG_INFO, "VIDEO_EDITOR_CLASSES",
"The context value from JAVA before setting is = 0x%x", "The context value from JAVA before setting is = %p",
pEnv->GetIntField(object, fieldIds.context)); (void *)pEnv->GetLongField(object, fieldIds.context));
pEnv->SetIntField(object, fieldIds.context, (int)pContext); pEnv->SetLongField(object, fieldIds.context, (jlong)pContext);
M4OSA_TRACE1_1("The context value in JNI is = 0x%x",pContext); M4OSA_TRACE1_1("The context value in JNI is = %p",pContext);
VIDEOEDIT_LOG_FUNCTION(ANDROID_LOG_INFO, "VIDEO_EDITOR_CLASSES", VIDEOEDIT_LOG_FUNCTION(ANDROID_LOG_INFO, "VIDEO_EDITOR_CLASSES",
"The context value from JAVA after setting is = 0x%x", "The context value from JAVA after setting is = %p",
pEnv->GetIntField(object, fieldIds.context)); (void *)pEnv->GetLongField(object, fieldIds.context));
} }
} }

View File

@ -170,7 +170,7 @@ static void videoEditor_stopEncoding(
static void videoEditor_release( static void videoEditor_release(
JNIEnv* pEnv, JNIEnv* pEnv,
jobject thiz); jobject thiz);
static int videoEditor_getPixels( static jint videoEditor_getPixels(
JNIEnv* env, JNIEnv* env,
jobject thiz, jobject thiz,
jstring path, jstring path,
@ -178,7 +178,7 @@ static int videoEditor_getPixels(
M4OSA_UInt32 width, M4OSA_UInt32 width,
M4OSA_UInt32 height, M4OSA_UInt32 height,
M4OSA_UInt32 timeMS); M4OSA_UInt32 timeMS);
static int videoEditor_getPixelsList( static jint videoEditor_getPixelsList(
JNIEnv* env, JNIEnv* env,
jobject thiz, jobject thiz,
jstring path, jstring path,
@ -209,7 +209,7 @@ videoEditor_populateSettings(
jobject object, jobject object,
jobject audioSettingObject); jobject audioSettingObject);
static int videoEditor_stopPreview(JNIEnv* pEnv, static jint videoEditor_stopPreview(JNIEnv* pEnv,
jobject thiz); jobject thiz);
static jobject static jobject
@ -218,7 +218,7 @@ videoEditor_getProperties(
jobject thiz, jobject thiz,
jstring file); jstring file);
static int videoEditor_renderPreviewFrame(JNIEnv* pEnv, static jint videoEditor_renderPreviewFrame(JNIEnv* pEnv,
jobject thiz, jobject thiz,
jobject mSurface, jobject mSurface,
jlong fromMs, jlong fromMs,
@ -231,7 +231,7 @@ static int videoEditor_registerManualEditMethods(
static void jniPreviewProgressCallback(void* cookie, M4OSA_UInt32 msgType, static void jniPreviewProgressCallback(void* cookie, M4OSA_UInt32 msgType,
void *argc); void *argc);
static int videoEditor_renderMediaItemPreviewFrame(JNIEnv* pEnv, static jint videoEditor_renderMediaItemPreviewFrame(JNIEnv* pEnv,
jobject thiz, jobject thiz,
jobject mSurface, jobject mSurface,
jstring filePath, jstring filePath,
@ -241,7 +241,7 @@ static int videoEditor_renderMediaItemPreviewFrame(JNIEnv* pEnv,
jint surfaceHeight, jint surfaceHeight,
jlong fromMs); jlong fromMs);
static int videoEditor_generateAudioWaveFormSync ( JNIEnv* pEnv, static jint videoEditor_generateAudioWaveFormSync ( JNIEnv* pEnv,
jobject thiz, jobject thiz,
jstring pcmfilePath, jstring pcmfilePath,
jstring outGraphfilePath, jstring outGraphfilePath,
@ -258,7 +258,7 @@ M4OSA_ERR videoEditor_generateAudio(JNIEnv* pEnv,ManualEditContext* pContext,
M4OSA_Char* infilePath, M4OSA_Char* infilePath,
M4OSA_Char* pcmfilePath ); M4OSA_Char* pcmfilePath );
static int static jint
videoEditor_generateClip( videoEditor_generateClip(
JNIEnv* pEnv, JNIEnv* pEnv,
jobject thiz, jobject thiz,
@ -572,7 +572,7 @@ static M4OSA_ERR checkClipVideoProfileAndLevel(M4DECODER_VideoDecoders *pDecoder
return result; return result;
} }
static int videoEditor_stopPreview(JNIEnv* pEnv, static jint videoEditor_stopPreview(JNIEnv* pEnv,
jobject thiz) jobject thiz)
{ {
ManualEditContext* pContext = M4OSA_NULL; ManualEditContext* pContext = M4OSA_NULL;
@ -594,7 +594,7 @@ static int videoEditor_stopPreview(JNIEnv* pEnv,
pContext->mOverlayFileName = NULL; pContext->mOverlayFileName = NULL;
} }
return lastProgressTimeMs; return (jint)lastProgressTimeMs;
} }
static void videoEditor_clearSurface(JNIEnv* pEnv, static void videoEditor_clearSurface(JNIEnv* pEnv,
@ -654,7 +654,7 @@ static void videoEditor_clearSurface(JNIEnv* pEnv,
} }
static int videoEditor_renderPreviewFrame(JNIEnv* pEnv, static jint videoEditor_renderPreviewFrame(JNIEnv* pEnv,
jobject thiz, jobject thiz,
jobject mSurface, jobject mSurface,
jlong fromMs, jlong fromMs,
@ -976,10 +976,10 @@ static int videoEditor_renderPreviewFrame(JNIEnv* pEnv,
free(yuvPlane); free(yuvPlane);
} }
return tnTimeMs; return (jint)tnTimeMs;
} }
static int videoEditor_renderMediaItemPreviewFrame(JNIEnv* pEnv, static jint videoEditor_renderMediaItemPreviewFrame(JNIEnv* pEnv,
jobject thiz, jobject thiz,
jobject mSurface, jobject mSurface,
jstring filePath, jstring filePath,
@ -1033,7 +1033,7 @@ static int videoEditor_renderMediaItemPreviewFrame(JNIEnv* pEnv,
/* get thumbnail*/ /* get thumbnail*/
result = ThumbnailOpen(&tnContext,(const M4OSA_Char*)pString, M4OSA_TRUE); result = ThumbnailOpen(&tnContext,(const M4OSA_Char*)pString, M4OSA_TRUE);
if (result != M4NO_ERROR || tnContext == M4OSA_NULL) { if (result != M4NO_ERROR || tnContext == M4OSA_NULL) {
return timeMs; return (jint)timeMs;
} }
framesizeYuv = ((frameWidth)*(frameHeight)*1.5); framesizeYuv = ((frameWidth)*(frameHeight)*1.5);
@ -1046,7 +1046,7 @@ static int videoEditor_renderMediaItemPreviewFrame(JNIEnv* pEnv,
ThumbnailClose(tnContext); ThumbnailClose(tnContext);
pMessage = videoEditJava_getErrorName(M4ERR_ALLOC); pMessage = videoEditJava_getErrorName(M4ERR_ALLOC);
jniThrowException(pEnv, "java/lang/RuntimeException", pMessage); jniThrowException(pEnv, "java/lang/RuntimeException", pMessage);
return timeMs; return (jint)timeMs;
} }
result = ThumbnailGetPixels16(tnContext, (M4OSA_Int16 *)pixelArray, result = ThumbnailGetPixels16(tnContext, (M4OSA_Int16 *)pixelArray,
@ -1055,7 +1055,7 @@ static int videoEditor_renderMediaItemPreviewFrame(JNIEnv* pEnv,
if (result != M4NO_ERROR) { if (result != M4NO_ERROR) {
free(pixelArray); free(pixelArray);
ThumbnailClose(tnContext); ThumbnailClose(tnContext);
return fromMs; return (jint)fromMs;
} }
#ifdef DUMPTOFILESYSTEM #ifdef DUMPTOFILESYSTEM
@ -1131,10 +1131,10 @@ static int videoEditor_renderMediaItemPreviewFrame(JNIEnv* pEnv,
pEnv->ReleaseStringUTFChars(filePath, pString); pEnv->ReleaseStringUTFChars(filePath, pString);
} }
return timeMs; return (jint)timeMs;
} }
int videoEditor_generateAudioRawFile( JNIEnv* pEnv, jint videoEditor_generateAudioRawFile( JNIEnv* pEnv,
jobject thiz, jobject thiz,
jstring infilePath, jstring infilePath,
jstring pcmfilePath) jstring pcmfilePath)
@ -1178,7 +1178,7 @@ int videoEditor_generateAudioRawFile( JNIEnv* pEnv,
pEnv->ReleaseStringUTFChars(pcmfilePath, pStringOutPCMFilePath); pEnv->ReleaseStringUTFChars(pcmfilePath, pStringOutPCMFilePath);
} }
return result; return (jint)result;
} }
M4OSA_ERR videoEditor_generateAudio(JNIEnv* pEnv,ManualEditContext* pContext, M4OSA_ERR videoEditor_generateAudio(JNIEnv* pEnv,ManualEditContext* pContext,
@ -2182,7 +2182,7 @@ videoEditor_getProperties(
return object; return object;
} }
static int videoEditor_getPixels( static jint videoEditor_getPixels(
JNIEnv* env, JNIEnv* env,
jobject thiz, jobject thiz,
jstring path, jstring path,
@ -2234,10 +2234,10 @@ static int videoEditor_getPixels(
env->ReleaseStringUTFChars(path, pString); env->ReleaseStringUTFChars(path, pString);
} }
return timeMS; return (jint)timeMS;
} }
static int videoEditor_getPixelsList( static jint videoEditor_getPixelsList(
JNIEnv* env, JNIEnv* env,
jobject thiz, jobject thiz,
jstring path, jstring path,
@ -2257,7 +2257,7 @@ static int videoEditor_getPixelsList(
const char *pString = env->GetStringUTFChars(path, NULL); const char *pString = env->GetStringUTFChars(path, NULL);
if (pString == M4OSA_NULL) { if (pString == M4OSA_NULL) {
jniThrowException(env, "java/lang/RuntimeException", "Input string null"); jniThrowException(env, "java/lang/RuntimeException", "Input string null");
return M4ERR_ALLOC; return (jint)M4ERR_ALLOC;
} }
err = ThumbnailOpen(&mContext,(const M4OSA_Char*)pString, M4OSA_FALSE); err = ThumbnailOpen(&mContext,(const M4OSA_Char*)pString, M4OSA_FALSE);
@ -2266,7 +2266,7 @@ static int videoEditor_getPixelsList(
if (pString != NULL) { if (pString != NULL) {
env->ReleaseStringUTFChars(path, pString); env->ReleaseStringUTFChars(path, pString);
} }
return err; return (jint)err;
} }
jlong duration = (endTime - startTime); jlong duration = (endTime - startTime);
@ -2307,7 +2307,7 @@ static int videoEditor_getPixelsList(
"ThumbnailGetPixels32 failed"); "ThumbnailGetPixels32 failed");
} }
return err; return (jint)err;
} }
static M4OSA_ERR static M4OSA_ERR
@ -2892,7 +2892,7 @@ M4OSA_ERR videoEditor_processClip(
} }
/*+ PROGRESS CB */ /*+ PROGRESS CB */
static int static jint
videoEditor_generateClip( videoEditor_generateClip(
JNIEnv* pEnv, JNIEnv* pEnv,
jobject thiz, jobject thiz,
@ -2934,7 +2934,7 @@ videoEditor_generateClip(
} }
ALOGV("videoEditor_generateClip END 0x%x", (unsigned int) result); ALOGV("videoEditor_generateClip END 0x%x", (unsigned int) result);
return result; return (jint)result;
} }
static void static void
@ -3556,7 +3556,7 @@ M4OSA_ERR M4MA_generateAudioGraphFile(JNIEnv* pEnv, M4OSA_Char* pInputFileURL,
return err; return err;
} }
static int videoEditor_generateAudioWaveFormSync (JNIEnv* pEnv, jobject thiz, static jint videoEditor_generateAudioWaveFormSync (JNIEnv* pEnv, jobject thiz,
jstring pcmfilePath, jstring pcmfilePath,
jstring outGraphfilePath, jstring outGraphfilePath,
jint frameDuration, jint channels, jint frameDuration, jint channels,
@ -3619,7 +3619,7 @@ out:
VIDEOEDIT_LOG_FUNCTION(ANDROID_LOG_INFO, "VIDEO_EDITOR", VIDEOEDIT_LOG_FUNCTION(ANDROID_LOG_INFO, "VIDEO_EDITOR",
"videoEditor_generateAudioWaveFormSync pContext->bSkipState "); "videoEditor_generateAudioWaveFormSync pContext->bSkipState ");
return result; return (jint)result;
} }
/******** End Audio Graph *******/ /******** End Audio Graph *******/