Fixing up Mediarecorder for MFF
For using the MediaRecorder in MFF (Mobile Filter Framework),
getMediaRecorder method in mediarecorder jni was earlier changed to
a non static method. Changed it back to a static method.
Also, added a new source type to MediaRecorder.VideoSource for recording
GRalloc buffers.
Change-Id: I031fad45c12b0ac9602d9e451d4767e95a86234d
diff --git a/media/java/android/media/MediaRecorder.java b/media/java/android/media/MediaRecorder.java
index 72069ac..8f5d0e5 100644
--- a/media/java/android/media/MediaRecorder.java
+++ b/media/java/android/media/MediaRecorder.java
@@ -176,6 +176,8 @@
public static final int DEFAULT = 0;
/** Camera video source */
public static final int CAMERA = 1;
+ /** @hide */
+ public static final int GRALLOC_BUFFER = 2;
}
/**
diff --git a/media/jni/android_media_MediaRecorder.cpp b/media/jni/android_media_MediaRecorder.cpp
index 922f7ed..e1d3219 100644
--- a/media/jni/android_media_MediaRecorder.cpp
+++ b/media/jni/android_media_MediaRecorder.cpp
@@ -127,7 +127,7 @@
return false;
}
-sp<MediaRecorder> getMediaRecorder(JNIEnv* env, jobject thiz)
+static sp<MediaRecorder> getMediaRecorder(JNIEnv* env, jobject thiz)
{
Mutex::Autolock l(sLock);
MediaRecorder* const p = (MediaRecorder*)env->GetIntField(thiz, fields.context);