pinkfish / flutter_rtmppublisher

Publisher to rtmp using the camera plugin as a basis to do all the basic camera/record management.
BSD 3-Clause "New" or "Revised" License
95 stars 121 forks source link

Example code on pub.dev - error after taking a photo #37

Open crumped opened 3 years ago

crumped commented 3 years ago

When I have been testing code I found one problem. After taking one photo I cannot take another or start a stream.

The error: E/MethodChannel#plugins.flutter.io/camera_with_rtmp(10631): Failed to handle method call E/MethodChannel#plugins.flutter.io/camera_with_rtmp(10631): java.lang.IllegalStateException: Session has been closed; further changes are illegal. E/MethodChannel#plugins.flutter.io/camera_with_rtmp(10631): at android.hardware.camera2.impl.CameraCaptureSessionImpl.checkNotClosed(CameraCaptureSessionImpl.java:834) E/MethodChannel#plugins.flutter.io/camera_with_rtmp(10631): at android.hardware.camera2.impl.CameraCaptureSessionImpl.capture(CameraCaptureSessionImpl.java:164) E/MethodChannel#plugins.flutter.io/camera_with_rtmp(10631): at com.whelksoft.camera_with_rtmp.Camera.takePicture(Camera.kt:200) E/MethodChannel#plugins.flutter.io/camera_with_rtmp(10631): at com.whelksoft.camera_with_rtmp.MethodCallHandlerImpl.onMethodCall(MethodCallHandlerImpl.kt:55) E/MethodChannel#plugins.flutter.io/camera_with_rtmp(10631): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233) E/MethodChannel#plugins.flutter.io/camera_with_rtmp(10631): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85) E/MethodChannel#plugins.flutter.io/camera_with_rtmp(10631): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:692) E/MethodChannel#plugins.flutter.io/camera_with_rtmp(10631): at android.os.MessageQueue.nativePollOnce(Native Method) E/MethodChannel#plugins.flutter.io/camera_with_rtmp(10631): at android.os.MessageQueue.next(MessageQueue.java:336) E/MethodChannel#plugins.flutter.io/camera_with_rtmp(10631): at android.os.Looper.loop(Looper.java:174) E/MethodChannel#plugins.flutter.io/camera_with_rtmp(10631): at android.app.ActivityThread.main(ActivityThread.java:7356) E/MethodChannel#plugins.flutter.io/camera_with_rtmp(10631): at java.lang.reflect.Method.invoke(Native Method) E/MethodChannel#plugins.flutter.io/camera_with_rtmp(10631): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) E/MethodChannel#plugins.flutter.io/camera_with_rtmp(10631): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) I/flutter (10631): Error: error I/flutter (10631): Error Message: Session has been closed; further changes are illegal.