tcpserversink fails to set_state

Krutskikh Ivan stein.hak at gmail.com
Tue Apr 18 08:46:10 UTC 2017


Hi, everyone

The thing I want to accomplish is this:

Parse pipeline from template like:

rtspsrc name=source latency=100 ! queue ! rtph264depay  ! mpegtsmux
name=mux !  tcpserversink port=0  name=sink

Connect client_added to code:

def add_client(self, sink, gsock):
   print 'Adding client for input:', self.input
   self.mainbin.set_state(Gst.State.PLAYING)
   state = self.mainbin.get_state(5 * Gst.SECOND)  # Wait 5 seconds
for pipeline to become playing. If not- panic
   if state[1] != Gst.State.PLAYING:
      print 'Failed to start pipeline in time'
      self.interrupt = 1
   else:
      self.clients[gsock] = time.time()

and set mainbin to state Gst.State.READY.

So in theory pipeline would be set to Gst.State.PLAYING upon
connection of the first client. But something diffetent is happening:



0:00:10.181936142 22902      0x2fd3720 INFO              GST_STATES
gstbin.c:2316:gst_bin_element_set_state:<sink0> current READY pending
VOID_PENDING, desired next PAUSED
0:00:10.181958384 22902      0x2fd3720 INFO              GST_STATES
gstelement.c:2657:gst_element_change_state:<sink0> have FAILURE
change_state return
0:00:10.181964597 22902      0x2fd3720 INFO              GST_STATES
gstelement.c:2247:gst_element_abort_state:<sink0> aborting state from READY
to PAUSED
0:00:10.181970952 22902      0x2fd3720 INFO              GST_STATES
gstbin.c:2780:gst_bin_change_state_func:<pipeline0> child 'sink0' failed to
go to state 3(PAUSED)
0:00:10.181982111 22902      0x2fd3720 INFO              GST_STATES
gstelement.c:2657:gst_element_change_state:<sink0> have FAILURE
change_state return
0:00:10.181986271 22902      0x2fd3720 INFO              GST_STATES
gstelement.c:2247:gst_element_abort_state:<sink0> aborting state from READY
to READY
0:00:10.181991927 22902      0x2fd3720 WARN                     bin
gstbin.c:2642:reset_state:<sink0> Failed to switch back down to READY

Is my scenario possible and what can I do about it?

Thanks in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170418/5e0ed289/attachment-0001.html>


More information about the gstreamer-devel mailing list