android: do not stop/start Camera recording when setting preview window to 0

parent e0da8a8b
......@@ -199,6 +199,8 @@ static int video_set_native_preview_window(MSFilter *f, void *arg) {
ms_message("Preview capture window changed (rotation:%d)\n", d->rotation);
env->DeleteGlobalRef(d->androidCamera);
}
if (w) {
env->CallStaticVoidMethod(helperClass,
env->GetStaticMethodID(helperClass,"stopRecording", "(Ljava/lang/Object;)V"),
d->androidCamera);
......@@ -214,6 +216,7 @@ static int video_set_native_preview_window(MSFilter *f, void *arg) {
(jlong)d));
env->CallStaticVoidMethod(helperClass, method, d->androidCamera, w);
}
} else {
ms_message("Preview capture window set but camera not created yet; remembering it for later use\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment