GNOME Bugzilla – Bug 453630
Rtspsrc invokes GST_ELEMENT_ERROR in eos when streaming over tcp
Last modified: 2007-08-16 13:29:22 UTC
It seems in rtsp there's no end-of-stream signaling from a server when stream ends, but server just stops sending data. So a timeout will be triggered in rtspsrc in eos. Currently when streaming over tcp rtspsrc timeout also invokes GST_ELEMENT_ERROR: ERROR: from element /playbin0/source: Could not read from resource. Additional debug info: gstrtspsrc.c(2312): gst_rtspsrc_loop_interleaved (): /playbin0/source: Could not receive message. (Timeout while waiting for server response) Could this error be suppressed to a warning like when streaming over udp, or do you know better ways for rtsp end-of-stream handling?
I could not find a specification for EOS. I think you are supposed to EOS when the RTP session times out.
Created attachment 91301 [details] [review] rtspsrc.c.patch Ok. When playing over tcp there's GST_ELEMENT_ERROR invoked every time in eos, attaching patch to suppress this into warning
* gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_class_init), (gst_rtspsrc_set_property), (gst_rtspsrc_get_property), (find_stream), (gst_rtspsrc_create_stream), (new_session_pad), (request_pt_map), (gst_rtspsrc_do_stream_eos), (on_bye_ssrc), (on_timeout), (gst_rtspsrc_stream_configure_manager), (gst_rtspsrc_stream_push_event), (gst_rtspsrc_push_event), (gst_rtspsrc_loop_interleaved), (gst_rtspsrc_parse_rtpinfo), (gst_rtspsrc_handle_message), (gst_rtspsrc_change_state): * gst/rtsp/gstrtspsrc.h: Add connection-speed property. Add find_stream helper functions. Handle stream EOS based on BYE messages or SSRC timeout. Returns SUCCESS from the state change function as we hide our async elements from the parent.