diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-13 13:04:22 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-13 13:04:22 -0700 |
commit | ba87e3e6c985e7175152993b5efcc7dd2f0e1c93 (patch) | |
tree | ee35f76532767dc29411a8738a434d1d88d330f2 /media/jni | |
parent | c39a6e0c51e182338deb8b63d07933b585134929 (diff) | |
download | frameworks_base-ba87e3e6c985e7175152993b5efcc7dd2f0e1c93.zip frameworks_base-ba87e3e6c985e7175152993b5efcc7dd2f0e1c93.tar.gz frameworks_base-ba87e3e6c985e7175152993b5efcc7dd2f0e1c93.tar.bz2 |
auto import from //branches/cupcake_rel/...@138607
Diffstat (limited to 'media/jni')
-rw-r--r-- | media/jni/android_media_MediaRecorder.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/media/jni/android_media_MediaRecorder.cpp b/media/jni/android_media_MediaRecorder.cpp index 5f6f754..1e508d2 100644 --- a/media/jni/android_media_MediaRecorder.cpp +++ b/media/jni/android_media_MediaRecorder.cpp @@ -256,6 +256,18 @@ android_media_MediaRecorder_setVideoFrameRate(JNIEnv *env, jobject thiz, jint ra } static void +android_media_MediaRecorder_setMaxDuration(JNIEnv *env, jobject thiz, jint max_duration_ms) +{ + LOGV("setMaxDuration(%d)", max_duration_ms); + sp<MediaRecorder> mr = getMediaRecorder(env, thiz); + + char params[64]; + sprintf(params, "max-duration=%d", max_duration_ms); + + process_media_recorder_call(env, mr->setParameters(String8(params)), "java/lang/RuntimeException", "setMaxDuration failed."); +} + +static void android_media_MediaRecorder_prepare(JNIEnv *env, jobject thiz) { LOGV("prepare"); @@ -357,6 +369,7 @@ static JNINativeMethod gMethods[] = { {"_setOutputFile", "(Ljava/io/FileDescriptor;JJ)V", (void *)android_media_MediaRecorder_setOutputFileFD}, {"setVideoSize", "(II)V", (void *)android_media_MediaRecorder_setVideoSize}, {"setVideoFrameRate", "(I)V", (void *)android_media_MediaRecorder_setVideoFrameRate}, + {"setMaxDuration", "(I)V", (void *)android_media_MediaRecorder_setMaxDuration}, {"_prepare", "()V", (void *)android_media_MediaRecorder_prepare}, {"getMaxAmplitude", "()I", (void *)android_media_MediaRecorder_native_getMaxAmplitude}, {"start", "()V", (void *)android_media_MediaRecorder_start}, |