iOS: pausing video streaming pipeline before dispose graphical context

Sebastian Dröge sebastian at centricular.com
Sun Mar 6 08:05:14 UTC 2016


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?

Setting it to NULL state. If that hangs, you found a bug and should
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160306/458620fa/attachment.sig>


More information about the gstreamer-devel mailing list