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 737868 - rtspsrc: set stream caps on internal src TCP pads
rtspsrc: set stream caps on internal src TCP pads
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-10-04 00:16 UTC by Aleix Conchillo Flaqué
Modified: 2014-10-24 19:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
make sure source pad has application/x-rtp caps (1.38 KB, patch)
2014-10-04 00:31 UTC, Aleix Conchillo Flaqué
none Details | Review
set stream caps on TCP pads (1.98 KB, patch)
2014-10-07 19:50 UTC, Aleix Conchillo Flaqué
none Details | Review
set stream caps on TCP pads (1.40 KB, patch)
2014-10-07 19:54 UTC, Aleix Conchillo Flaqué
none Details | Review

Description Aleix Conchillo Flaqué 2014-10-04 00:16:46 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.
Comment 1 Aleix Conchillo Flaqué 2014-10-04 00:31:16 UTC
Created attachment 287700 [details] [review]
make sure source pad has application/x-rtp caps
Comment 2 Aleix Conchillo Flaqué 2014-10-04 16:46:07 UTC
The patch actually seems like a bad hack, so I'll check if there's some other nice way to do this.
Comment 3 Aleix Conchillo Flaqué 2014-10-06 05:55:47 UTC
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...
Comment 4 Aleix Conchillo Flaqué 2014-10-07 19:50:42 UTC
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.
Comment 5 Aleix Conchillo Flaqué 2014-10-07 19:52:05 UTC
However, I still don't understand in what cases request_pt_map in gstrtspsrc will be executed.
Comment 6 Aleix Conchillo Flaqué 2014-10-07 19:54:19 UTC
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.
Comment 7 Wim Taymans 2014-10-21 09:33:29 UTC
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
Comment 8 Tim-Philipp Müller 2014-10-24 19:55:37 UTC
Cherry-picked into 1.4 branch as well.