Hi all,
I'm facing a crash with my iOS application. It seems the pipeline tries to draw video when graphical context is already disposed and the application crashes. I solved executing in applicationWillResignActive (immediately before the graphical context is destroyed gst_element_set_state (pPipeline, GST_STATE_PAUSED); This is the pseudocode:
- (void)applicationWillResignActive:(UIApplication *)application { It is not the best solution to solve the issue because sometimes my pipeline hangs pausing and the iOS application crashes due to WATCHDOG in the main thread.. How can I solve this issue? Is there a best way to stop immediately the pipeline? Thanks Elio _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
On Sa, 2016-03-05 at 18:24 +0100, elio francesconi wrote:
> Hi all, > I'm facing a crash with my iOS application. It seems the pipeline > tries to draw video when graphical context is already disposed and > the application crashes. > I solved executing in applicationWillResignActive (immediately before > the graphical context is destroyed gst_element_set_state (pPipeline, > GST_STATE_PAUSED); > This is the pseudocode: > - (void)applicationWillResignActive:(UIApplication *)application { > gst_element_set_state (pPipeline, GST_STATE_PAUSED); > } > It is not the best solution to solve the issue because sometimes my > pipeline hangs pausing and the iOS application crashes due to > WATCHDOG in the main thread.. > > How can I solve this issue? > > Is there a best way to stop immediately the pipeline? report that. It should never ever hang :) Setting the pipeline to NULL state also generally seems the right thing to do when the application shuts down (I assume that's what "will resign active" means?). Independent of that there are also similar problems if the application goes into the background, suspend, etc. These things need to be handled currently in the application to prevent crashes and it's not clear yet how we should handle that from GStreamer as AFAIU you need to install application callbacks to get notified about these things. -- Sebastian Dröge, Centricular Ltd · http://www.centricular.com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel signature.asc (968 bytes) Download Attachment |
Ok, I replaced PAUSED with NULL I hope to solve the issue. Thanks! Yes I was referring to problems when the application goes in background, suspend, etc... and according with Apple documentation: applicationWillResignActive: is called when leaving the foreground state(before the application is suspended.. ), Usually the right callback to use is applicationDidEnterBackground (Tells the delegate that the app is now in the background.) , but IMHO it's too late because the EGLContext is already disposed and it's too late to stop the pipeline. What do you think? Elio 2016-03-06 9:05 GMT+01:00 Sebastian Dröge <[hidden email]>: On Sa, 2016-03-05 at 18:24 +0100, elio francesconi wrote: _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |