Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NativeDemo crashes when app goes to background #27

Open
SR3u opened this issue Sep 14, 2015 · 10 comments
Open

NativeDemo crashes when app goes to background #27

SR3u opened this issue Sep 14, 2015 · 10 comments
Labels

Comments

@SR3u
Copy link

SR3u commented Sep 14, 2015

NativeDemo crashes with segfault when app goes to background or screen is locked.
2015-09-14 13 48 27
2015-09-14 13 48 12
2015-09-14 13 49 27
2015-09-14 13 49 39

@stefanalund
Copy link
Contributor

Looks like an OpenGL rendering issue, probably caused by not cleaning up resources properly. Feel free to propose a fix :)

@xelven
Copy link

xelven commented Nov 17, 2015

I not sure my way is right or not, what I do is set owr_media_renderer_set_source(renderer, NULL);
when the app enter background, otherwise use original method.
is works for me, no crash anymore.

@xelven
Copy link

xelven commented Nov 17, 2015

Just one problem for my solutions, after enter foreground, the selfview and remoteview source set will show error below and the video are freeze.
0:00:50.379715000 �[332m 7345�[00m 0x1844a430 �[31;01mERROR �[00m �[00;04m default gstglcontext_eagl.m:205:gst_gl_context_eagl_update_layer:�[00m Failed to make complete framebuffer object 8cd6
0:00:50.554057000 �[332m 7345�[00m 0x184bdb10 �[31;01mERROR �[00m �[00;04m default gstglcontext_eagl.m:205:gst_gl_context_eagl_update_layer:�[00m Failed to make complete framebuffer object 8cd6

@xelven
Copy link

xelven commented Nov 19, 2015

one more issue of my way:

** (<unknown>:7884): CRITICAL **: _owr_media_source_release_source: assertion 'GST_IS_ELEMENT(source)' failed

(<unknown>:7884): GStreamer-CRITICAL **: gst_element_set_state: assertion 'GST_IS_ELEMENT (element)' failed

(<unknown>:7884): GStreamer-CRITICAL **: gst_bin_remove: assertion 'GST_IS_ELEMENT (element)' failed

0:11:24.417375000 �[331m 7884�[00m 0x16cbc468 �[31;01mERROR  �[00m �[00;04m             default gstglcontext_eagl.m:205:gst_gl_context_eagl_update_layer:�[00m Failed to make complete framebuffer object 8cd6

@xelven
Copy link

xelven commented Dec 3, 2015

@stefanalund @SR3u
Hi guys, I fixed this issue, just call the GStream API let it stop render such as below:

gst_element_set_state(priv->pipeline, GST_STATE_PAUSED);

when in the video call , enter background the audio will keep connect and render, and video stoped.
after resume call GST_STATE_PLAYING the video will keep render again.
my test all fine in iOS 9.

@stefanalund
Copy link
Contributor

@xelven nice! Sounds like you have had to do changes to OpenWebRTC, right? Can you provide a Pull Request? Thanks in advance.

@xelven
Copy link

xelven commented Dec 4, 2015

@stefanalund I did look the openwebrtc take a while and I used very dirty way to doing this.. haha.
I copy the private struct to OpenWebRTCNativeHandler then I can control it from outside.
is should be modify from openwebrtc will better way, give me some time for re-struct and download latest code from git and merge it, I plan next week provide a Pull request, it that ok?

@stefanalund
Copy link
Contributor

@xelven absolutely, we are happy for any help we get.

@xelven
Copy link

xelven commented Dec 9, 2015

Dear @stefanalund ,
just let you know the status of this, after that merge to openwebrtc, I also will pull request to openwebrtc-ios-sdk then will works : )

@stefanalund
Copy link
Contributor

Much appreciated @xelven!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants