<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;">I’ve faced with a following issue, while testing different network connectivity scenarios: </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;">If iPhone has lost network connection while Pipeline was running, it is impossible to stop such 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 test was performed by simple going into “Airplane mode” while streaming (Camera->RTMP). After that, calling to gst_element_set_state(pipeline, GST_STATE_PAUSED) causes a mutex lock, that wouldn’t be released until network is recovered. </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;">Target scenario: Pause a pipeline if network was lost, wait (30s), stop it and release, if network is still unreachable after timeout.</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;">I’d really appreciate any help with this one.</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;">This issue appears with 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;">Here’s a pipeline: </div><div id="bloop_customfont" style="margin: 0px;">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’</div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">From what I see, if I pause the execution:</div><div id="bloop_customfont" style="margin: 0px;"><div id="bloop_customfont" style="margin: 0px;">g_mutex_lock <- locks here</div><div id="bloop_customfont" style="margin: 0px;">gst_base_sink_change_state</div><div id="bloop_customfont" style="margin: 0px;">gst_element_change_state</div><div id="bloop_customfont" style="margin: 0px;">gst_element_set_state_func</div><div id="bloop_customfont" style="margin: 0px;">gst_bin_element_set_state[inlined]</div><div id="bloop_customfont" style="margin: 0px;">gst_bin_change_state_func</div><div id="bloop_customfont" style="margin: 0px;">gst_pipeline_change_state</div><div id="bloop_customfont" style="margin: 0px;">gst_element_change_state</div><div id="bloop_customfont" style="margin: 0px;">gst_element_set_state_func</div></div><br><div id="bloop_sign_1423492749603003904" class="bloop_sign"><div style="font-family:helvetica,arial;font-size:13px">Thanks,<br>Dmytro Kabyshev<br></div></div></body></html>