tcpserversink fails to set_state

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

tcpserversink fails to set_state

Krutskikh Ivan
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!


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: tcpserversink fails to set_state

Krutskikh Ivan
I'm still stumbled with this one. Any help would be appreciated.

2017-04-18 11:46 GMT+03:00 Krutskikh Ivan <[hidden email]>:
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!



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: tcpserversink fails to set_state

Krutskikh Ivan
Anyone?

2017-05-16 10:01 GMT+03:00 Krutskikh Ivan <[hidden email]>:
I'm still stumbled with this one. Any help would be appreciated.

2017-04-18 11:46 GMT+03:00 Krutskikh Ivan <[hidden email]>:
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!




_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: tcpserversink fails to set_state

BGraaf
In reply to this post by Krutskikh Ivan
Why Port 0?



Von meinem Samsung Galaxy Smartphone gesendet.

-------- Ursprüngliche Nachricht --------
Von: Krutskikh Ivan <[hidden email]>
Datum: 23.05.17 13:39 (GMT+01:00)
An: Discussion of the development of and with GStreamer <[hidden email]>
Betreff: Re: tcpserversink fails to set_state

Anyone?

2017-05-16 10:01 GMT+03:00 Krutskikh Ivan <[hidden email]>:
I'm still stumbled with this one. Any help would be appreciated.

2017-04-18 11:46 GMT+03:00 Krutskikh Ivan <[hidden email]>:
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!




_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: tcpserversink fails to set_state

Krutskikh Ivan
Because I want my pipeline to auto locate unused port.

2017-05-23 14:58 GMT+03:00 bernhard.graaf <[hidden email]>:
Why Port 0?



Von meinem Samsung Galaxy Smartphone gesendet.

-------- Ursprüngliche Nachricht --------
Von: Krutskikh Ivan <[hidden email]>
Datum: 23.05.17 13:39 (GMT+01:00)
An: Discussion of the development of and with GStreamer <[hidden email]>
Betreff: Re: tcpserversink fails to set_state

Anyone?

2017-05-16 10:01 GMT+03:00 Krutskikh Ivan <[hidden email]>:
I'm still stumbled with this one. Any help would be appreciated.

2017-04-18 11:46 GMT+03:00 Krutskikh Ivan <[hidden email]>:
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!




_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: tcpserversink fails to set_state

Stephenwei
Hi,
What's your h264 stream-format, byte-stream or avc?

Stephen
Reply | Threaded
Open this post in threaded view
|

Re: tcpserversink fails to set_state

Krutskikh Ivan
Hi,

does that matter? I tried both h264/mpegts and mjpeg/ multipartmux with the same result

2017-05-25 6:50 GMT+03:00 Stephenwei <[hidden email]>:
Hi,
What's your h264 stream-format, byte-stream or avc?

Stephen



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/tcpserversink-fails-to-set-state-tp4682699p4683093.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel