Hello,
I have the following pipeline : autovideosrc ! video/x-raw ! queue ! x264enc key-int-max=30 bitrate=1048 ! video/x-h264,profile=baseline,width=1280,height=720,framerate=30/1 ! rtspclientsink location=server_url user=user user-pw=password protocols=tcp async-handling=false I'm running this pipeline in a python script in 2 different ways : 1. Using Tornado's process.Subprocess module gst_cmd = "gst-launch-1.0 autovideosrc ! queue ! x264enc key-int-max=30 bitrate=1048 !\ video/x-h264,profile=baseline,width=1280,height=720,framerate=30/1 !\ rtspclientsink user-id=user user-pw=password protocols=tcp location=server_url async-handling=false" gst_cmd = shlex.split(gst_cmd) self.stream_proc = process.Subprocess(gst_cmd) 2. Using the python Gst library pipeline = ''' autovideosrc ! video/x-raw ! queue ! x264enc key-int-max=30 bitrate=1048 ! video/x-h264,profile=baseline,width=1280,height=720,framerate=30/1 ! rtspclientsink name = rsink ''' self.video_pipeline = Gst.parse_launch(pipeline) rsink = self.video_pipeline.get_by_name('rsink') rsink.set_property('location', gw_url) rsink.set_property('user-id', 'user') rsink.set_property('user-pw', source_token) rsink.set_property('async-handling', False) rsink.set_property('protocols', 'tcp') if self.video_pipeline and self.video_pipeline.get_state(0).state == Gst.State.NULL: self.video_pipeline.set_state(Gst.State.PLAYING) when I set the pipeline state to PLAYING, video is sent to the server and I'm able to view the streamed video from webcam in both these cases. However, when the server sends a rtsp TEARDOWN message, the pipeline state DOES NOT change to NULL in Case-2 (which uses python Gst library). Instead there is a continuous stream of warnings in the debug logs until I kill the script manually. Debug logs for both cases are attached at the end. Any explanation on why there is a difference between using gst-launch-1.0 and Python Gst library would be highly appreciated. Cheers, Roshni ==================================================== Case - 1 : debug logs when using Tornado's process.Subprocess with gst-launch-1.0 ==================================================== 0:00:07.231205000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:1945:gst_rtsp_client_sink_loop_rx:<rtspclientsink0> we received a server message 0:00:07.231231000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:1819:gst_rtsp_client_sink_handle_request:<rtspclientsink0> got server request message 0:00:07.231242000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:1825:gst_rtsp_client_sink_handle_request:<rtspclientsink0> prepare OK reply 0:00:07.231520000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:1932:gst_rtsp_client_sink_loop_rx:<rtspclientsink0> doing receive with timeout 8634 seconds 0:00:07.240831000 42850 0x7fadc18088a0 DEBUG rtspclientsink gstrtspclientsink.c:2509:gst_rtsp_client_sink_try_send:<rtspclientsink0> sending message 0:00:07.240949000 42850 0x7fadc18088a0 DEBUG rtspclientsink gstrtspclientsink.c:2509:gst_rtsp_client_sink_try_send:<rtspclientsink0> sending message 0:00:07.253519000 42850 0x7fadc1808940 WARN rtspclientsink gstrtspclientsink.c:1976:gst_rtsp_client_sink_loop_rx:<rtspclientsink0> warning: Unhandled return value -7. 0:00:07.253628000 42850 0x7fadc1808940 WARN rtspclientsink gstrtspclientsink.c:2049:gst_rtsp_client_sink_loop_rx:<rtspclientsink0> error: Could not receive message. (System error) 0:00:07.253664000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:2312:gst_rtsp_client_sink_loop:<rtspclientsink0> pausing task, reason error 0:00:07.253676000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:2253:gst_rtsp_client_sink_loop_send_cmd:<rtspclientsink0> sending cmd WAIT 0:00:07.253684000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:2265:gst_rtsp_client_sink_loop_send_cmd:<rtspclientsink0> cancel previous request LOOP WARNING: from element /GstPipeline:pipeline0/GstRTSPClientSink:rtspclientsink0: Could not read from resource. 0:00:07.253691000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:2273:gst_rtsp_client_sink_loop_send_cmd:<rtspclientsink0> connection flush busy LOOP Additional debug info: gstrtspclientsink.c(1976): gst_rtsp_client_sink_loop_rx (): /GstPipeline:pipeline0/GstRTSPClientSink:rtspclientsink0: Unhandled return value -7. 0:00:07.253700000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:1774:gst_rtsp_client_sink_connection_flush:<rtspclientsink0> set flushing 1 0:00:07.253710000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:1777:gst_rtsp_client_sink_connection_flush:<rtspclientsink0> connection flush ERROR: from element /GstPipeline:pipeline0/GstRTSPClientSink:rtspclientsink0: Could not read from resource. Additional debug info: gstrtspclientsink.c(2049): gst_rtsp_client_sink_loop_rx (): /GstPipeline:pipeline0/GstRTSPClientSink:rtspclientsink0: Could not receive message. (System error) Execution ended after 0:00:07.001021000 Setting pipeline to PAUSED ... 0:00:07.253794000 42850 0x7fadc0e8eaa0 DEBUG rtspclientsink gstrtspclientsink.c:2253:gst_rtsp_client_sink_loop_send_cmd:<rtspclientsink0> sending cmd WAIT 0:00:07.253803000 42850 0x7fadc0e8eaa0 DEBUG rtspclientsink gstrtspclientsink.c:2278:gst_rtsp_client_sink_loop_send_cmd:<rtspclientsink0> not interrupting busy cmd WAIT 0:00:07.253825000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:4354:gst_rtsp_client_sink_thread:<rtspclientsink0> got command WAIT 0:00:07.253903000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:1774:gst_rtsp_client_sink_connection_flush:<rtspclientsink0> set flushing 0 0:00:07.253909000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:1777:gst_rtsp_client_sink_connection_flush:<rtspclientsink0> connection flush 0:00:07.253954000 42850 0x7fadc0e8eaa0 DEBUG rtspclientsink gstrtspclientsink.c:2253:gst_rtsp_client_sink_loop_send_cmd:<rtspclientsink0> sending cmd PAUSE 0:00:07.253999000 42850 0x7fadc0e8eaa0 DEBUG rtspclientsink gstrtspclientsink.c:2278:gst_rtsp_client_sink_loop_send_cmd:<rtspclientsink0> not interrupting busy cmd WAIT 0:00:07.254019000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:4354:gst_rtsp_client_sink_thread:<rtspclientsink0> got command PAUSE 0:00:07.254032000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:1774:gst_rtsp_client_sink_connection_flush:<rtspclientsink0> set flushing 0 0:00:07.254040000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:4108:gst_rtsp_client_sink_pause:<rtspclientsink0> PAUSE... 0:00:07.254046000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:4188:gst_rtsp_client_sink_pause:<rtspclientsink0> PAUSE is not supported 0:00:07.254060000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:4354:gst_rtsp_client_sink_thread:<rtspclientsink0> got command LOOP 0:00:07.254068000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:1774:gst_rtsp_client_sink_connection_flush:<rtspclientsink0> set flushing 0 0:00:07.254076000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:1932:gst_rtsp_client_sink_loop_rx:<rtspclientsink0> doing receive with timeout 8634 seconds Setting pipeline to READY ... 0:00:07.254112000 42850 0x7fadc1808940 WARN rtspclientsink gstrtspclientsink.c:1976:gst_rtsp_client_sink_loop_rx:<rtspclientsink0> warning: Unhandled return value -7. 0:00:07.254128000 42850 0x7fadc0e8eaa0 DEBUG rtspclientsink gstrtspclientsink.c:2656:gst_rtsp_client_sink_set_state:<rtspclientsink0> Setting internal state to READY 0:00:07.254148000 42850 0x7fadc1808940 WARN rtspclientsink gstrtspclientsink.c:2049:gst_rtsp_client_sink_loop_rx:<rtspclientsink0> error: Could not receive message. (System error) 0:00:07.254180000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:2312:gst_rtsp_client_sink_loop:<rtspclientsink0> pausing task, reason error 0:00:07.254193000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:2253:gst_rtsp_client_sink_loop_send_cmd:<rtspclientsink0> sending cmd WAIT 0:00:07.254203000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:2265:gst_rtsp_client_sink_loop_send_cmd:<rtspclientsink0> cancel previous request LOOP 0:00:07.254215000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:2273:gst_rtsp_client_sink_loop_send_cmd:<rtspclientsink0> connection flush busy LOOP 0:00:07.254226000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:1774:gst_rtsp_client_sink_connection_flush:<rtspclientsink0> set flushing 1 0:00:07.254237000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:1777:gst_rtsp_client_sink_connection_flush:<rtspclientsink0> connection flush 0:00:07.254410000 42850 0x7fadc0e8eaa0 DEBUG rtspclientsink gstrtspclientsink.c:4329:gst_rtsp_client_sink_handle_message:<rtspclientsink0> Internal bin changed state to PAUSED (pending READY). Prerolled now 0 0:00:07.254873000 42850 0x7fadc0e8eaa0 DEBUG rtspclientsink gstrtspclientsink.c:4329:gst_rtsp_client_sink_handle_message:<rtspclientsink0> Internal bin changed state to READY (pending VOID_PENDING). Prerolled now 0 0:00:07.254913000 42850 0x7fadc0e8eaa0 DEBUG rtspclientsink gstrtspclientsink.c:2253:gst_rtsp_client_sink_loop_send_cmd:<rtspclientsink0> sending cmd CLOSE 0:00:07.254922000 42850 0x7fadc0e8eaa0 DEBUG rtspclientsink gstrtspclientsink.c:2278:gst_rtsp_client_sink_loop_send_cmd:<rtspclientsink0> not interrupting busy cmd WAIT 0:00:07.254941000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:4354:gst_rtsp_client_sink_thread:<rtspclientsink0> got command CLOSE 0:00:07.254955000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:1774:gst_rtsp_client_sink_connection_flush:<rtspclientsink0> set flushing 0 0:00:07.254963000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:1777:gst_rtsp_client_sink_connection_flush:<rtspclientsink0> connection flush 0:00:07.254977000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:3023:gst_rtsp_client_sink_close:<rtspclientsink0> TEARDOWN... 0:00:07.254988000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:2656:gst_rtsp_client_sink_set_state:<rtspclientsink0> Setting internal state to NULL 0:00:07.255188000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:4329:gst_rtsp_client_sink_handle_message:<rtspclientsink0> Internal bin changed state to NULL (pending VOID_PENDING). Prerolled now 0 0:00:07.265378000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:3061:gst_rtsp_client_sink_close:<rtspclientsink0> Looking at stream 0x7fadc2025740 for teardown 0:00:07.265402000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:3084:gst_rtsp_client_sink_close:<rtspclientsink0> Sending teardown for stream 0x7fadc2025740 at URL rtsp://roshni-cloudbox.st-av.com:8556/eEvm18CWLmczsunkAHr0S 0:00:07.265424000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:2509:gst_rtsp_client_sink_try_send:<rtspclientsink0> sending message 0:00:07.265473000 42850 0x7fadc1808940 WARN rtspclientsink gstrtspclientsink.c:2599:gst_rtsp_client_sink_try_send:<rtspclientsink0> error: Could not send message. (System error) 0:00:07.265500000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:2735:gst_rtsp_client_sink_send:<rtspclientsink0> got error -7 0:00:07.265514000 42850 0x7fadc1808940 WARN rtspclientsink gstrtspclientsink.c:3145:gst_rtsp_client_sink_close:<rtspclientsink0> error: Could not send message. (System error) 0:00:07.265534000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:3111:gst_rtsp_client_sink_close:<rtspclientsink0> closing connection... 0:00:07.265542000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:1742:gst_rtsp_conninfo_close:<rtspclientsink0> closing connection... 0:00:07.265872000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:1748:gst_rtsp_conninfo_close:<rtspclientsink0> freeing connection... 0:00:07.265893000 42850 0x7fadc1808940 DEBUG rtspclientsink gstrtspclientsink.c:1551:gst_rtsp_client_sink_cleanup:<rtspclientsink0> cleanup Setting pipeline to NULL ... 0:00:08.216385000 42850 0x7fadc0e8eaa0 DEBUG rtspclientsink gstrtspclientsink.c:4437:gst_rtsp_client_sink_stop:<rtspclientsink0> stopping 0:00:08.216395000 42850 0x7fadc0e8eaa0 DEBUG rtspclientsink gstrtspclientsink.c:2253:gst_rtsp_client_sink_loop_send_cmd:<rtspclientsink0> sending cmd WAIT 0:00:08.216401000 42850 0x7fadc0e8eaa0 DEBUG rtspclientsink gstrtspclientsink.c:2273:gst_rtsp_client_sink_loop_send_cmd:<rtspclientsink0> connection flush busy WAIT 0:00:08.216407000 42850 0x7fadc0e8eaa0 DEBUG rtspclientsink gstrtspclientsink.c:1774:gst_rtsp_client_sink_connection_flush:<rtspclientsink0> set flushing 1 0:00:08.216434000 42850 0x7fadc0e8eaa0 DEBUG rtspclientsink gstrtspclientsink.c:3023:gst_rtsp_client_sink_close:<rtspclientsink0> TEARDOWN... 0:00:08.216440000 42850 0x7fadc0e8eaa0 DEBUG rtspclientsink gstrtspclientsink.c:2656:gst_rtsp_client_sink_set_state:<rtspclientsink0> Setting internal state to NULL 0:00:08.216453000 42850 0x7fadc0e8eaa0 DEBUG rtspclientsink gstrtspclientsink.c:3028:gst_rtsp_client_sink_close:<rtspclientsink0> not ready, doing cleanup 0:00:08.216457000 42850 0x7fadc0e8eaa0 DEBUG rtspclientsink gstrtspclientsink.c:3111:gst_rtsp_client_sink_close:<rtspclientsink0> closing connection... 0:00:08.216461000 42850 0x7fadc0e8eaa0 DEBUG rtspclientsink gstrtspclientsink.c:1551:gst_rtsp_client_sink_cleanup:<rtspclientsink0> cleanup ================================= Case - 2 : debug logs when using Python Gst Library ================================= 0:00:12.150424000 50236 0x7ff37080ba80 DEBUG rtspclientsink gstrtspclientsink.c:1945:gst_rtsp_client_sink_loop_rx:<rtspsink> we received a server message 0:00:12.150444000 50236 0x7ff37080ba80 DEBUG rtspclientsink gstrtspclientsink.c:1819:gst_rtsp_client_sink_handle_request:<rtspsink> got server request message 0:00:12.150451000 50236 0x7ff37080ba80 DEBUG rtspclientsink gstrtspclientsink.c:1825:gst_rtsp_client_sink_handle_request:<rtspsink> prepare OK reply 0:00:12.150501000 50236 0x7ff37080ba80 DEBUG rtspclientsink gstrtspclientsink.c:1932:gst_rtsp_client_sink_loop_rx:<rtspsink> doing receive with timeout 8634 seconds 0:00:12.168209000 50236 0x7ff370817cf0 DEBUG rtspclientsink gstrtspclientsink.c:2509:gst_rtsp_client_sink_try_send:<rtspsink> sending message 0:00:12.168314000 50236 0x7ff370817cf0 DEBUG rtspclientsink gstrtspclientsink.c:2509:gst_rtsp_client_sink_try_send:<rtspsink> sending message 0:00:12.168399000 50236 0x7ff370817cf0 DEBUG rtspclientsink gstrtspclientsink.c:2509:gst_rtsp_client_sink_try_send:<rtspsink> sending message 0:00:12.182392000 50236 0x7ff37080ba80 WARN rtspclientsink gstrtspclientsink.c:1976:gst_rtsp_client_sink_loop_rx:<rtspsink> warning: Unhandled return value -7. 0:00:12.182455000 50236 0x7ff37080ba80 WARN rtspclientsink gstrtspclientsink.c:2049:gst_rtsp_client_sink_loop_rx:<rtspsink> error: Could not receive message. (System error) 0:00:12.182480000 50236 0x7ff37080ba80 DEBUG rtspclientsink gstrtspclientsink.c:2312:gst_rtsp_client_sink_loop:<rtspsink> pausing task, reason error 0:00:12.182488000 50236 0x7ff37080ba80 DEBUG rtspclientsink gstrtspclientsink.c:2253:gst_rtsp_client_sink_loop_send_cmd:<rtspsink> sending cmd WAIT 0:00:12.182496000 50236 0x7ff37080ba80 DEBUG rtspclientsink gstrtspclientsink.c:2265:gst_rtsp_client_sink_loop_send_cmd:<rtspsink> cancel previous request LOOP 0:00:12.182503000 50236 0x7ff37080ba80 DEBUG rtspclientsink gstrtspclientsink.c:2273:gst_rtsp_client_sink_loop_send_cmd:<rtspsink> connection flush busy LOOP 0:00:12.182509000 50236 0x7ff37080ba80 DEBUG rtspclientsink gstrtspclientsink.c:1774:gst_rtsp_client_sink_connection_flush:<rtspsink> set flushing 1 0:00:12.182547000 50236 0x7ff37080ba80 DEBUG rtspclientsink gstrtspclientsink.c:1777:gst_rtsp_client_sink_connection_flush:<rtspsink> connection flush 0:00:12.199414000 50236 0x7ff370817cf0 DEBUG rtspclientsink gstrtspclientsink.c:2509:gst_rtsp_client_sink_try_send:<rtspsink> sending message 0:00:12.199482000 50236 0x7ff370817cf0 WARN rtspclientsink gstrtspclientsink.c:2601:gst_rtsp_client_sink_try_send:<rtspsink> send interrupted 0:00:12.199547000 50236 0x7ff370817cf0 DEBUG rtspclientsink gstrtspclientsink.c:2509:gst_rtsp_client_sink_try_send:<rtspsink> sending message 0:00:12.199577000 50236 0x7ff370817cf0 WARN rtspclientsink gstrtspclientsink.c:2601:gst_rtsp_client_sink_try_send:<rtspsink> send interrupted 0:00:12.199592000 50236 0x7ff370817cf0 DEBUG rtspclientsink gstrtspclientsink.c:2509:gst_rtsp_client_sink_try_send:<rtspsink> sending message 0:00:12.199608000 50236 0x7ff370817cf0 WARN rtspclientsink gstrtspclientsink.c:2601:gst_rtsp_client_sink_try_send:<rtspsink> send interrupted 0:00:12.244805000 50236 0x7ff370817cf0 DEBUG rtspclientsink gstrtspclientsink.c:2509:gst_rtsp_client_sink_try_send:<rtspsink> sending message 0:00:12.244899000 50236 0x7ff370817cf0 WARN rtspclientsink gstrtspclientsink.c:2601:gst_rtsp_client_sink_try_send:<rtspsink> send interrupted 0:00:12.244968000 50236 0x7ff370817cf0 DEBUG rtspclientsink gstrtspclientsink.c:2509:gst_rtsp_client_sink_try_send:<rtspsink> sending message 0:00:12.244997000 50236 0x7ff370817cf0 WARN rtspclientsink gstrtspclientsink.c:2601:gst_rtsp_client_sink_try_send:<rtspsink> send interrupted 0:00:12.278644000 50236 0x7ff370817cf0 DEBUG rtspclientsink gstrtspclientsink.c:2509:gst_rtsp_client_sink_try_send:<rtspsink> sending message 0:00:12.278710000 50236 0x7ff370817cf0 WARN rtspclientsink gstrtspclientsink.c:2601:gst_rtsp_client_sink_try_send:<rtspsink> send interrupted 0:00:12.278826000 50236 0x7ff370817cf0 DEBUG rtspclientsink gstrtspclientsink.c:2509:gst_rtsp_client_sink_try_send:<rtspsink> sending message 0:00:12.278863000 50236 0x7ff370817cf0 WARN rtspclientsink gstrtspclientsink.c:2601:gst_rtsp_client_sink_try_send:<rtspsink> send interrupted 0:00:12.278877000 50236 0x7ff370817cf0 DEBUG rtspclientsink gstrtspclientsink.c:2509:gst_rtsp_client_sink_try_send:<rtspsink> sending message 0:00:12.278893000 50236 0x7ff370817cf0 WARN rtspclientsink gstrtspclientsink.c:2601:gst_rtsp_client_sink_try_send:<rtspsink> send interrupted -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |