<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Hello,</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Found on GStreamer 1.4.5, iOS 8.1.2. </div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">While testing our application on iOS, we’ve faced with a crash when going to background with a running pipeline.</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">The crash happened inside draw_cb (OpenGL ES related code).</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">I assume this is because Apple’s strict rules regarding background task:</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">“</div><ul class="ul" style="list-style-position: outside; list-style-image: initial; margin: 0px 0px 0.833em 1.35em; padding: 0px 0px 0.5em; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif;"><li class="li" style="margin-top: 0.583em;"><p style="margin-top: 0.667em; margin-bottom: 0.833em; display: inline;"><span style="font-weight: 700;">Do not make any OpenGL ES calls from your code.</span> You must not create an <code style="font-size: 13.3900003433228px; font-family: Courier, Consolas, monospace; color: rgb(102, 102, 102);"><a href="https://developer.apple.com/library/ios/documentation/OpenGLES/Reference/EAGLContext_ClassRef/index.html#//apple_ref/occ/cl/EAGLContext" target="_self" style="color: rgb(51, 102, 204); text-decoration: none;">EAGLContext</a></code> object or issue any OpenGL ES drawing commands of any kind while running in the background. Using these calls causes your app to be killed immediately. Apps must also ensure that any previously submitted commands have completed before moving to the background. For information about how to handle OpenGL ES when moving to and from the background, see <span class="content_text" style="margin-top: 0px; margin-bottom: 0.833em; padding-bottom: 0.833em;"><a href="https://developer.apple.com/library/ios/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/ImplementingaMultitasking-awareOpenGLESApplication/ImplementingaMultitasking-awareOpenGLESApplication.html#//apple_ref/doc/uid/TP40008793-CH5" target="_self" style="color: rgb(51, 102, 204); text-decoration: none;">Implementing a Multitasking-aware OpenGL ES Application</a></span> in <em><a href="https://developer.apple.com/library/ios/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40008793" target="_self" style="color: rgb(51, 102, 204); text-decoration: none;">OpenGL ES Programming Guide for iOS</a></em>.</p></li></ul><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">“</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Link to guide: <a href="https://developer.apple.com/library/ios/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/ImplementingaMultitasking-awareOpenGLESApplication/ImplementingaMultitasking-awareOpenGLESApplication.html#//apple_ref/doc/uid/TP40008793-CH5">https://developer.apple.com/library/ios/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/ImplementingaMultitasking-awareOpenGLESApplication/ImplementingaMultitasking-awareOpenGLESApplication.html#//apple_ref/doc/uid/TP40008793-CH5</a></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Could you please help me with some instructions how we could overcome this.</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">We can’t stop the pipeline, because it is a Lifestream. </div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Here’s a pipeline:</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><pre style="white-space: pre-wrap;">avfvideosrc ! video/x-raw,format=NV12,width=960,height=540,framerate=30/1 ! tee name=tp tp. ! queue ! autovideosink tp. ! queue ! videoconvert ! vtenc_h264 bitrate=2500 max-keyframe-interval-duration=2000000000 max-keyframe-interval=60 allow-frame-reordering=false realtime=true quality=0.5 ! h264parse ! video/x-h264,framerate=30/1,width=960,height=540,stream-format=(string)avc,level=(string)3.1,profile=(string)main ! queue ! mux. autoaudiosrc ! audioconvert ! voaacenc bitrate=64000 ! aacparse ! queue max-size-buffers=0 max-size-time=0 max-size-bytes=0 ! flvmux streamable=true name=mux ! queue max-size-buffers=0 max-size-time=0 max-size-bytes=0 ! rtmpsink location=‘%url_was_here% live=1’</pre></div><br><div id="bloop_sign_1423549000447129088" class="bloop_sign"><div style="font-family:helvetica,arial;font-size:13px">Thanks,<br>Dmytro Kabyshev<br></div></div></body></html>