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 demo error #17

Open wuyuancai opened 4 years ago

wuyuancai commented 4 years ago

I/Stuff ( 5434): {filePath=null, bitrate=1228800, textureId=0, enableAndroidOpenGL=false, url=rtmp://34.70.40.166:1935/LiveApp/815794454132232781694481} E/MethodChannel#plugins.flutter.io/camera_with_rtmp( 5434): Failed to handle method call E/MethodChannel#plugins.flutter.io/camera_with_rtmp( 5434): kotlin.KotlinNullPointerException E/MethodChannel#plugins.flutter.io/camera_with_rtmp( 5434): at com.whelksoft.camera_with_rtmp.MethodCallHandlerImpl.onMethodCall(MethodCallHandlerImpl.kt:93) E/MethodChannel#plugins.flutter.io/camera_with_rtmp( 5434): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:226) E/MethodChannel#plugins.flutter.io/camera_with_rtmp( 5434): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85) E/MethodChannel#plugins.flutter.io/camera_with_rtmp( 5434): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:631) E/MethodChannel#plugins.flutter.io/camera_with_rtmp( 5434): at android.os.MessageQueue.nativePollOnce(Native Method) E/MethodChannel#plugins.flutter.io/camera_with_rtmp( 5434): at android.os.MessageQueue.next(MessageQueue.java:335) E/MethodChannel#plugins.flutter.io/camera_with_rtmp( 5434): at android.os.Looper.loop(Looper.java:176) E/MethodChannel#plugins.flutter.io/camera_with_rtmp( 5434): at android.app.ActivityThread.main(ActivityThread.java:7464) E/MethodChannel#plugins.flutter.io/camera_with_rtmp( 5434): at java.lang.reflect.Method.invoke(Native Method) E/MethodChannel#plugins.flutter.io/camera_with_rtmp( 5434): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:549) E/MethodChannel#plugins.flutter.io/camera_with_rtmp( 5434): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:955) I/flutter ( 5434): Error: error I/flutter ( 5434): Error Message: null

pinkfish commented 4 years ago

Which method call was this? I think I finally got the android camera2 apis to work, they are annoyingly hard to work with.

pinkfish commented 4 years ago

Fixed the pause methods if that was the error you ran into?

wuyuancai commented 4 years ago

Which method call was this? I think I finally got the android camera2 apis to work, they are annoyingly hard to work with.

No detailed display, this error occurs when running the example. Locate the code location is below:

"startVideoRecordingAndStreaming" -> {
                Log.i("Stuff", call.arguments.toString())
                var bitrate: Int? = null
                if (call.hasArgument("bitrate")) {
                    bitrate = call.argument("bitrate")
                }
                var enableOpenGL = false
                if (call.hasArgument("enableAndroidOpenGL")) {
                    enableOpenGL = call.argument<Boolean>("enableAndroidOpenGL")!!
                }
                camera!!.startVideoRecordingAndStreaming(
                        call.argument("filePath")!!,
                        call.argument("url"),
                        bitrate,
                        enableOpenGL,
                        result)
            }