GNOME Bugzilla – Bug 737868
rtspsrc: set stream caps on internal src TCP pads
Last modified: 2014-10-24 19:55:37 UTC
If SRTP is enabled and the protocol is TCP, we need to make sure request_pt_map returns a valid caps (application/x-rtp or application/x-rdt). Otherwise it will return application/x-srtp used in the rtspsrc source pads and there not link to next element expecting application/x-rtp.
Created attachment 287700 [details] [review] make sure source pad has application/x-rtp caps
The patch actually seems like a bad hack, so I'll check if there's some other nice way to do this.
For some reason that I still not understand, a query caps is not propagated and "notify::caps" from session->recv_rtp_sink (caps_changed callback in rtpbin.c) never happens. Because we have the srtp decoder which would return application/x-rtp and that is not returned, we end up in request_pt_map in rtspsrc which returns the caps from the stream (application/x-srtp) and those will be always wrong when dealing with SRTP. My guess is something related to the internalsrc_%u pads. But I can't see what's wrong. So, my questions are: (1) Why query caps is not propagated so srtpdec returns application/x-rtp and "notify::caps" is emitted? (2) Is (1) always supposed to work? If so, why do we need to implement request_pt_map in the rtspsrc? I assume it's not suppose to always work...
Created attachment 287991 [details] [review] set stream caps on TCP pads I think this is a better patch and it solves the problem. Caps are now properly propagated downstream so ptdemux caps_changed is called.
However, I still don't understand in what cases request_pt_map in gstrtspsrc will be executed.
Created attachment 287992 [details] [review] set stream caps on TCP pads Forgot to remove the code from the old pad. This should be good now.
commit bd392d72ee45b0311e4379a4910b27cfaefa1be8 Author: Aleix Conchillo Flaqué <aleix@oblong.com> Date: Fri Oct 3 17:28:06 2014 -0700 rtspsrc: set full stream caps on internal src TCP pads Set the complete stream caps on the TCP internal src pads. Otherwise, ptdemux will not properly detect the caps change. https://bugzilla.gnome.org/show_bug.cgi?id=737868
Cherry-picked into 1.4 branch as well.