diff options
Diffstat (limited to 'media/jni')
-rw-r--r-- | media/jni/android_media_MediaRecorder.cpp | 2 | ||||
-rw-r--r-- | media/jni/android_media_MediaScanner.cpp | 7 | ||||
-rw-r--r-- | media/jni/android_mtp_MtpServer.cpp | 10 | ||||
-rw-r--r-- | media/jni/audioeffect/Android.mk | 3 | ||||
-rwxr-xr-x | media/jni/mediaeditor/VideoEditorClasses.cpp | 2 | ||||
-rwxr-xr-x | media/jni/mediaeditor/VideoEditorOsal.cpp | 1 |
6 files changed, 13 insertions, 12 deletions
diff --git a/media/jni/android_media_MediaRecorder.cpp b/media/jni/android_media_MediaRecorder.cpp index 2f7d7ee..12391c8 100644 --- a/media/jni/android_media_MediaRecorder.cpp +++ b/media/jni/android_media_MediaRecorder.cpp @@ -158,7 +158,7 @@ static void android_media_MediaRecorder_setCamera(JNIEnv* env, jobject thiz, job } sp<Camera> c = get_native_camera(env, camera, NULL); sp<MediaRecorder> mr = getMediaRecorder(env, thiz); - process_media_recorder_call(env, mr->setCamera(c->remote()), + process_media_recorder_call(env, mr->setCamera(c->remote(), c->getRecordingProxy()), "java/lang/RuntimeException", "setCamera failed."); } diff --git a/media/jni/android_media_MediaScanner.cpp b/media/jni/android_media_MediaScanner.cpp index 9151799..d0d2d1e 100644 --- a/media/jni/android_media_MediaScanner.cpp +++ b/media/jni/android_media_MediaScanner.cpp @@ -45,7 +45,6 @@ struct fields_t { jfieldID context; }; static fields_t fields; -static Mutex sLock; class MyMediaScannerClient : public MediaScannerClient { @@ -159,13 +158,11 @@ static bool ExceptionCheck(void* env) return ((JNIEnv *)env)->ExceptionCheck(); } -// Call this method with sLock hold static MediaScanner *getNativeScanner_l(JNIEnv* env, jobject thiz) { return (MediaScanner *) env->GetIntField(thiz, fields.context); } -// Call this method with sLock hold static void setNativeScanner_l(JNIEnv* env, jobject thiz, MediaScanner *s) { env->SetIntField(thiz, fields.context, (int)s); @@ -176,7 +173,6 @@ android_media_MediaScanner_processDirectory( JNIEnv *env, jobject thiz, jstring path, jobject client) { LOGV("processDirectory"); - Mutex::Autolock l(sLock); MediaScanner *mp = getNativeScanner_l(env, thiz); if (mp == NULL) { jniThrowException(env, kRunTimeException, "No scanner available"); @@ -243,7 +239,6 @@ android_media_MediaScanner_setLocale( JNIEnv *env, jobject thiz, jstring locale) { LOGV("setLocale"); - Mutex::Autolock l(sLock); MediaScanner *mp = getNativeScanner_l(env, thiz); if (mp == NULL) { jniThrowException(env, kRunTimeException, "No scanner available"); @@ -268,7 +263,6 @@ android_media_MediaScanner_extractAlbumArt( JNIEnv *env, jobject thiz, jobject fileDescriptor) { LOGV("extractAlbumArt"); - Mutex::Autolock l(sLock); MediaScanner *mp = getNativeScanner_l(env, thiz); if (mp == NULL) { jniThrowException(env, kRunTimeException, "No scanner available"); @@ -339,7 +333,6 @@ static void android_media_MediaScanner_native_finalize(JNIEnv *env, jobject thiz) { LOGV("native_finalize"); - Mutex::Autolock l(sLock); MediaScanner *mp = getNativeScanner_l(env, thiz); if (mp == 0) { return; diff --git a/media/jni/android_mtp_MtpServer.cpp b/media/jni/android_mtp_MtpServer.cpp index aaf85c3..446b630 100644 --- a/media/jni/android_mtp_MtpServer.cpp +++ b/media/jni/android_mtp_MtpServer.cpp @@ -48,6 +48,7 @@ static jfieldID field_MtpStorage_path; static jfieldID field_MtpStorage_description; static jfieldID field_MtpStorage_reserveSpace; static jfieldID field_MtpStorage_removable; +static jfieldID field_MtpStorage_maxFileSize; static Mutex sMutex; @@ -228,12 +229,14 @@ android_mtp_MtpServer_add_storage(JNIEnv *env, jobject thiz, jobject jstorage) jstring description = (jstring)env->GetObjectField(jstorage, field_MtpStorage_description); jlong reserveSpace = env->GetLongField(jstorage, field_MtpStorage_reserveSpace); jboolean removable = env->GetBooleanField(jstorage, field_MtpStorage_removable); + jlong maxFileSize = env->GetLongField(jstorage, field_MtpStorage_maxFileSize); const char *pathStr = env->GetStringUTFChars(path, NULL); if (pathStr != NULL) { const char *descriptionStr = env->GetStringUTFChars(description, NULL); if (descriptionStr != NULL) { - MtpStorage* storage = new MtpStorage(storageID, pathStr, descriptionStr, reserveSpace, removable); + MtpStorage* storage = new MtpStorage(storageID, pathStr, descriptionStr, + reserveSpace, removable, maxFileSize); thread->addStorage(storage); env->ReleaseStringUTFChars(path, pathStr); env->ReleaseStringUTFChars(description, descriptionStr); @@ -312,6 +315,11 @@ int register_android_mtp_MtpServer(JNIEnv *env) LOGE("Can't find MtpStorage.mRemovable"); return -1; } + field_MtpStorage_maxFileSize = env->GetFieldID(clazz, "mMaxFileSize", "J"); + if (field_MtpStorage_maxFileSize == NULL) { + LOGE("Can't find MtpStorage.mMaxFileSize"); + return -1; + } clazz_MtpStorage = (jclass)env->NewGlobalRef(clazz); clazz = env->FindClass("android/mtp/MtpServer"); diff --git a/media/jni/audioeffect/Android.mk b/media/jni/audioeffect/Android.mk index 4c5cf71..3e493b1 100644 --- a/media/jni/audioeffect/Android.mk +++ b/media/jni/audioeffect/Android.mk @@ -12,6 +12,9 @@ LOCAL_SHARED_LIBRARIES := \ libnativehelper \ libmedia +LOCAL_C_INCLUDES := \ + system/media/audio_effects/include + LOCAL_MODULE:= libaudioeffect_jni include $(BUILD_SHARED_LIBRARY) diff --git a/media/jni/mediaeditor/VideoEditorClasses.cpp b/media/jni/mediaeditor/VideoEditorClasses.cpp index d43a562..277e16c 100755 --- a/media/jni/mediaeditor/VideoEditorClasses.cpp +++ b/media/jni/mediaeditor/VideoEditorClasses.cpp @@ -378,9 +378,7 @@ VIDEOEDIT_JAVA_DEFINE_CONSTANTS(VideoEffect) { VIDEOEDIT_JAVA_CONSTANT_INIT("NONE", M4VSS3GPP_kVideoEffectType_None), VIDEOEDIT_JAVA_CONSTANT_INIT("FADE_FROM_BLACK", M4VSS3GPP_kVideoEffectType_FadeFromBlack), - VIDEOEDIT_JAVA_CONSTANT_INIT("CURTAIN_OPENING", M4VSS3GPP_kVideoEffectType_CurtainOpening), VIDEOEDIT_JAVA_CONSTANT_INIT("FADE_TO_BLACK", M4VSS3GPP_kVideoEffectType_FadeToBlack), - VIDEOEDIT_JAVA_CONSTANT_INIT("CURTAIN_CLOSING", M4VSS3GPP_kVideoEffectType_CurtainClosing), VIDEOEDIT_JAVA_CONSTANT_INIT("EXTERNAL", M4VSS3GPP_kVideoEffectType_External), VIDEOEDIT_JAVA_CONSTANT_INIT("BLACK_AND_WHITE", M4xVSS_kVideoEffectType_BlackAndWhite), VIDEOEDIT_JAVA_CONSTANT_INIT("PINK", M4xVSS_kVideoEffectType_Pink), diff --git a/media/jni/mediaeditor/VideoEditorOsal.cpp b/media/jni/mediaeditor/VideoEditorOsal.cpp index 53e7de1..a8c08ac 100755 --- a/media/jni/mediaeditor/VideoEditorOsal.cpp +++ b/media/jni/mediaeditor/VideoEditorOsal.cpp @@ -166,7 +166,6 @@ static const VideoEdit_Osal_Result gkRESULTS[] = VIDEOEDIT_OSAL_RESULT_INIT(M4VSS3GPP_ERR_NO_SUPPORTED_VIDEO_STREAM_IN_FILE ), VIDEOEDIT_OSAL_RESULT_INIT(M4VSS3GPP_ERR_INTERNAL_STATE ), VIDEOEDIT_OSAL_RESULT_INIT(M4VSS3GPP_ERR_LUMA_FILTER_ERROR ), - VIDEOEDIT_OSAL_RESULT_INIT(M4VSS3GPP_ERR_CURTAIN_FILTER_ERROR ), VIDEOEDIT_OSAL_RESULT_INIT(M4VSS3GPP_ERR_TRANSITION_FILTER_ERROR ), VIDEOEDIT_OSAL_RESULT_INIT(M4VSS3GPP_ERR_AUDIO_DECODER_INIT_FAILED ), VIDEOEDIT_OSAL_RESULT_INIT(M4VSS3GPP_ERR_AUDIO_DECODED_PCM_SIZE_ISSUE ), |