After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 796624 - rtspclientsink: doesn't wait for all streams to be blocked
rtspclientsink: doesn't wait for all streams to be blocked
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-rtsp-server
unspecified
Other Linux
: Normal blocker
: 1.14.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-06-19 04:44 UTC by Matthew Waters (ystreet00)
Modified: 2018-06-21 11:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
rtspclientsink: fix waiting for multiple streams (2.60 KB, patch)
2018-06-19 04:55 UTC, Matthew Waters (ystreet00)
committed Details | Review

Description Matthew Waters (ystreet00) 2018-06-19 04:44:20 UTC
Test pipeline:

audiotestsrc ! queue ! audioresample ! queue ! faac ! rsink. videotestsrc ! queue ! videoconvert ! queue ! x264enc tune=zerolatency ! video/x-h264,profile=baseline,width=1280,height=720,framerate=30/1 ! rsink. rtspclientsink name=rsink location=rtsp://127.0.0.1:8554/test debug=1

produces

ERROR default rtsp-sdp.c:585:gst_rtsp_sdp_from_stream: stream 0x7f02c01f13a0 has no caps

against

./examples/test-record '( decodebin name=depay0 ! autovideosink decodebin name=depay1 ! autoaudiosink )'

ERROR rtspmedia rtsp-media.c:3788:default_handle_sdp: 0x7fda00034290: Media has more or less streams than SDP (2 /= 1)
ERROR rtspclient rtsp-client.c:2764:handle_sdp: client 0x5650b908a190: could not handle SDP
ERROR rtspclient rtsp-client.c:2941:handle_announce_request: client 0x5650b908a190: can't handle SDP
ERROR rtspclient rtsp-client.c:1497:handle_pause_request: client 0x5650b908a2a0: no session

Results in rtspcliensink sending an SDP with only one media in it around 95% of the time as evidenced by the errors above.

The problem is that the GstRTSPStreamBlocking message is sent multiple times for multiple streams but only the first is used to unblock all the streams.

This works in 1.12 as expected so is a regression.
Comment 1 Matthew Waters (ystreet00) 2018-06-19 04:55:26 UTC
Created attachment 372719 [details] [review]
rtspclientsink: fix waiting for multiple streams
Comment 2 Jan Schmidt 2018-06-20 12:50:42 UTC
This doesn't look quite complete (neither did the code it's replacing) - there's no way to exit this waiting loop early if the element state is changed. I guess that's what you mean by the FIXME.

I also notice that #64f1a3 (that added this blocking logic) also quietly removed the sink->in_async = TRUE; line in gst_rtsp_client_sink_start(), so probably none of the async logic is working properly right now.
Comment 3 Matthew Waters (ystreet00) 2018-06-21 11:04:46 UTC
commit ebefb77db1b013041302ea3f2958daa6803dc696
Author: Matthew Waters <matthew@centricular.com>
Date:   Tue Jun 19 14:53:02 2018 +1000

    rtspclientsink: fix waiting for multiple streams
    
    We were previously only ever waiting for a single stream to notify it's
    blocked status through GstRTSPStreamBlocking.  Actually count streams to
    wait for.
    
    Fixes rtspclientsink sending SDP's without out some of the input
    streams.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=796624

1.14 ebefb77db1b013041302ea3f2958daa6803dc696