Cannot change cameras
Caveat: I'm using the latest OpenWebRTC-SDK for iOS but also a build of OpenWebRTC.framework using the latest source (commit 43aada0)
Whenever I call setVideoCaptureSourceByName: or terminateCall I see the following lines in the console log:
(
If I am trying to change cameras, then the local preview either freezes and eventually changes (but without actually changing what is being streamed out) or fails to do anything.
If I am trying to terminate the call, the preview just freezes.
Is it correct that it works with the version 0.3.1 of the OpenWebRTC pod?
I'm using the 0.3.1 pod but with a build of the very latest OpenWebRTC.framework code. It looks like changes in the framework have broken the current implementations of setVideoCaptureSourceByName and terminateCall
@superdump @sdroege I saw this problem as well when building from current master. We need to look in to it.
Can you run with G_DEBUG=fatal-criticals and publish the backtrace? It may provide some clues.
Right-click on app Scheme and choose Edit Scheme:
Here you go...
* thread #8: tid = 0x2aac, 0x00000001003a9de8 ios-pocapp`_g_log_abort(breakpoint=<unavailable>) + 40 at gmessages.c:324, name = 'owr_main_loop', stop reason = EXC_BREAKPOINT (code=1, subcode=0x1003a9de8)
* frame #0: 0x00000001003a9de8 ios-pocapp`_g_log_abort(breakpoint=<unavailable>) + 40 at gmessages.c:324 [opt]
frame #1: 0x00000001003a9758 ios-pocapp`g_logv(log_domain=<unavailable>, log_level=<unavailable>, format=<unavailable>, args=<unavailable>) + 932 at gmessages.c:1081 [opt]
frame #2: 0x00000001003a93a8 ios-pocapp`g_log(log_domain=<unavailable>, log_level=<unavailable>, format=<unavailable>) + 28 at gmessages.c:1119 [opt]
frame #3: 0x00000001003a91b0 ios-pocapp`g_return_if_fail_warning(log_domain=<unavailable>, pretty_function=<unavailable>, expression=<unavailable>) + 32 at gmessages.c:1128 [opt]
frame #4: 0x0000000100625554 ios-pocapp`owr_inter_src_dispose(object=0x0000000106d68220) + 72 at owr_inter_src.c:106 [opt]
frame #5: 0x00000001004374f8 ios-pocapp`g_object_unref(_object=0x0000000106d68220) + 236 at gobject.c:3142 [opt]
frame #6: 0x0000000100515808 ios-pocapp`gst_bin_remove_func(bin=0x0000000106d34390, element=0x0000000106d68220) + 1436 at gstbin.c:1638 [opt]
frame #7: 0x00000001005120f0 ios-pocapp`gst_bin_remove(bin=0x0000000106d34390, element=0x0000000106d68220) + 344 at gstbin.c:1700 [opt]
frame #8: 0x0000000100512e9c ios-pocapp`gst_bin_dispose(object=<unavailable>) + 144 at gstbin.c:527 [opt]
frame #9: 0x00000001004374f8 ios-pocapp`g_object_unref(_object=0x0000000106d34390) + 236 at gobject.c:3142 [opt]
frame #10: 0x000000010052aee4 ios-pocapp`_gst_message_free(message=0x0000000108485290) + 60 at gstmessage.c:202 [opt]
frame #11: 0x00000001004f9040 ios-pocapp`gst_bus_source_dispatch [inlined] gst_message_unref(msg=<unavailable>) + 160 at gstmessage.h:364 [opt]
frame #12: 0x00000001004f9038 ios-pocapp`gst_bus_source_dispatch(source=0x000000013b345390, callback=<unavailable>, user_data=0x0000000106d24290) + 152 at gstbus.c:792 [opt]
frame #13: 0x00000001003be39c ios-pocapp`g_main_context_dispatch + 192 at gmain.c:3242 [opt]
frame #14: 0x00000001003be2dc ios-pocapp`g_main_context_dispatch(context=0x0000000136f38840) + 52 at gmain.c:3906 [opt]
frame #15: 0x00000001003be6dc ios-pocapp`g_main_context_iterate(context=<unavailable>, block=<unavailable>, dispatch=<unavailable>, self=<unavailable>) + 440 at gmain.c:3977 [opt]
frame #16: 0x00000001003be9d0 ios-pocapp`g_main_loop_run(loop=0x0000000136ec54c0) + 244 at gmain.c:4171 [opt]
frame #17: 0x000000010061f5fc ios-pocapp`owr_run + 56 at owr.c:359 [opt]
frame #18: 0x000000010061f738 ios-pocapp`owr_run_thread_func(msg_queue=<unavailable>) + 92 at owr.c:341 [opt]
frame #19: 0x00000001003a8b48 ios-pocapp`g_thread_proxy(data=0x00000001034ab480) + 92 at gthread.c:778 [opt]
frame #20: 0x000000019ae9bb28 libsystem_pthread.dylib`_pthread_body + 156
frame #21: 0x000000019ae9ba8c libsystem_pthread.dylib`_pthread_start + 156
Apparently there is work ongoing in GStreamer (the underlying framework) handling of OpenGL. I was going to try out the latest changes but ran in to a build problem https://github.com/EricssonResearch/cerbero/issues/39
Would be great if you also tried rebuilding.
I got the framework built ok but still having similar issues.
The change takes several seconds during which the video is frozen. No warnings or errors though, until I try to change the camera once more. Then I get this:
==== Error message start ====
Error in element video-source.
Error: Internal data flow error.
Debugging info: gstbasesrc.c(2943): void gst_base_src_loop(GstPad *) (): /GstPipeline:local-video-capture-source-bin-2/GstAVFVideoSrc:video-source:
streaming task paused, reason error (-5)
==== Error message stop ====
==== Error message start ====
Error in element sink-queue-2.
Error: Internal data flow error.
Debugging info: gstqueue.c(970): gboolean gst_queue_handle_sink_event(GstPad *, GstObject *, GstEvent *) (): /GstPipeline:local-video-capture-source-bin-2/GstBin:source-sink-bin-2/GstQueue:sink-queue-2:
streaming task paused, reason error (-5)
==== Error message stop ====
Bump, also experiences getting a green screen after changing cameras couple times during a call...
The non-functioning back camera streaming is a big problem, i used to had it work in an older version of the SDK by editing the function prepare_media_sessions_for_local_sources in the development pod of OWR.
@superdump @stefanalund Any chances of a fix here? (especially the back camera streaming problem)