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 769698 - sdp: add support for rtcp-fb attributes
sdp: add support for rtcp-fb attributes
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other All
: Normal enhancement
: 1.11.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-08-10 08:03 UTC by Tomasz Zajac
Modified: 2016-11-01 17:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Set of patches (4.35 KB, patch)
2016-08-10 08:03 UTC, Tomasz Zajac
none Details | Review
RTSP server: add rtcp-fb SDP attributes based on caps (1.96 KB, patch)
2016-08-10 08:13 UTC, Tomasz Zajac
none Details | Review
Client: parse rtcp-fb media attributes (2.30 KB, patch)
2016-08-10 08:15 UTC, Tomasz Zajac
none Details | Review
gstrtpvp8pay: add rtcp-fb-nack-pli & recp-fb-ccm-fir (5.16 KB, patch)
2016-08-10 08:17 UTC, Tomasz Zajac
none Details | Review
Server: add rtcp-fb media attributes based on caps (2.56 KB, patch)
2016-08-10 10:45 UTC, Tomasz Zajac
none Details | Review
Add rtcp-fb media attributes based on caps (2.50 KB, patch)
2016-09-08 09:38 UTC, Tomasz Zajac
committed Details | Review
Parse rtcp-fb media attributes (2.39 KB, patch)
2016-09-08 09:38 UTC, Tomasz Zajac
none Details | Review
Add tests for rtcp-fb parsing (6.12 KB, patch)
2016-09-08 09:39 UTC, Tomasz Zajac
none Details | Review
Parse rtcp-fb media attributes (2.58 KB, patch)
2016-10-28 07:14 UTC, Tomasz Zajac
committed Details | Review
Add tests for rtcp-fb parsing (8.65 KB, patch)
2016-10-28 07:16 UTC, Tomasz Zajac
committed Details | Review

Description Tomasz Zajac 2016-08-10 08:03:03 UTC
Created attachment 333045 [details] [review]
Set of patches

There is no implementation for rtcp-fb-nack-pli and rtcp-fb-ccm-fir (rfc5104) in both RTSP client and server. I have implemented it in following patches:

1) 0001-Parse-rtcp-fb-media-attributes.patch (sdpmessage, for rtsp client)
Adds parsing a=rtcp-fb SDP media attributes into relevant RTP CAPS (like rtcp-fb-nack-pli)
See: https://bugzilla.gnome.org/show_bug.cgi?id=769628

2) 0001-Add-rtcp-fb-SDP-attributes-based-on-caps.patch (rtsp-server)
Adds rtcp-fb media attributes based on RTP CAPS.

3) 0001-gstrtpvp8pay-add-rtcp-fb-nack-pli-recp-fb-ccm-fir.patch (rtpvp8pay)
Adds rtcp-fb-nack-pli and rtcp-fb-ccm-fir into vp8 payloader. Similiar patches are needed for other codes, perhaps it should be implemented in RTP payloader base class.

With above set of patches user is able to create end-to-end RTSP connection with correctly working nack-pli with VP8 codec. Since I am relatively new to gstreamer, I am not sure how my changes fit into architecture and whether it is a desired way of implementing it.
Alternatively I was thinking about adding new property to RTSPMediaFactory to control adding these SDP attributes, but I guess that looking for this in CAPS is cleaner.
Comment 1 Tomasz Zajac 2016-08-10 08:13:53 UTC
Created attachment 333046 [details] [review]
RTSP server: add rtcp-fb SDP attributes based on caps
Comment 2 Tomasz Zajac 2016-08-10 08:15:25 UTC
Created attachment 333047 [details] [review]
Client: parse rtcp-fb media attributes
Comment 3 Tomasz Zajac 2016-08-10 08:17:06 UTC
Created attachment 333048 [details] [review]
gstrtpvp8pay: add rtcp-fb-nack-pli & recp-fb-ccm-fir
Comment 4 Olivier Crête 2016-08-10 08:47:21 UTC
Review of attachment 333048 [details] [review]:

Doing this in every payloader makes no sense, you should just add a capsfilter after the payloader to set those.
Comment 5 Olivier Crête 2016-08-10 08:53:14 UTC
Review of attachment 333047 [details] [review]:

This patch looks fine, but having a couple unit tests for both valid and slightly invalid SDPs, therre are already some in tests/check/libs/sdp.c
Comment 6 Olivier Crête 2016-08-10 08:55:01 UTC
Review of attachment 333046 [details] [review]:

I wonmder if it wouldn't be better to just put this into gst_sdp_media_set_media_from_caps() instead to have symmetry with the other patch? And we should allow setting them even with the non-AVPF profiles, some "legacy" clients just ignore the profile and use it anyway.
.
Comment 7 Tomasz Zajac 2016-08-10 09:10:28 UTC
(In reply to Olivier Crête from comment #4)
> Review of attachment 333048 [details] [review] [review]:
> 
> Doing this in every payloader makes no sense, you should just add a
> capsfilter after the payloader to set those.

I agree, but I think it is currently not possible to insert capsfilter after the payloader with the RTSP server API as the payloader needs to be the last element of the pipeline. Either I am missing some way of setting it, or there is need for adding such capability into server's API then.
Comment 8 Tomasz Zajac 2016-08-10 10:45:38 UTC
Created attachment 333059 [details] [review]
Server: add rtcp-fb media attributes based on caps
Comment 9 Tomasz Zajac 2016-08-10 10:46:54 UTC
(In reply to Olivier Crête from comment #6)
> Review of attachment 333046 [details] [review] [review]:
> 
> I wonmder if it wouldn't be better to just put this into
> gst_sdp_media_set_media_from_caps() instead to have symmetry with the other
> patch? And we should allow setting them even with the non-AVPF profiles,
> some "legacy" clients just ignore the profile and use it anyway.
> .

You are absolutely right. Please check the new patch.
Comment 10 Olivier Crête 2016-08-10 13:20:24 UTC
Review of attachment 333059 [details] [review]:

Patch look good, would be nice to have unit tests, those could nicely be combined with the parser ones as they'll be super simple...
Comment 11 Tomasz Zajac 2016-09-08 09:38:13 UTC
Created attachment 335076 [details] [review]
Add rtcp-fb media attributes based on caps
Comment 12 Tomasz Zajac 2016-09-08 09:38:50 UTC
Created attachment 335077 [details] [review]
Parse rtcp-fb media attributes
Comment 13 Tomasz Zajac 2016-09-08 09:39:33 UTC
Created attachment 335078 [details] [review]
Add tests for rtcp-fb parsing
Comment 14 Tomasz Zajac 2016-09-08 09:43:50 UTC
(In reply to Olivier Crête from comment #10)
> Review of attachment 333059 [details] [review] [review]:
> 
> Patch look good, would be nice to have unit tests, those could nicely be
> combined with the parser ones as they'll be super simple...

I have uploaded new set of patches along with some simple unit tests. Please have a look.
Comment 15 Olivier Crête 2016-10-25 21:54:08 UTC
Review of attachment 335077 [details] [review]:

You're missing parsing of '*' meaning that it applies to all formats.
Comment 16 Olivier Crête 2016-10-25 21:54:56 UTC
Review of attachment 335076 [details] [review]:

Looks good
Comment 17 Olivier Crête 2016-10-25 21:55:23 UTC
Review of attachment 335078 [details] [review]:

Just missing a test for the '*' case, otherwise looks good.
Comment 18 Tomasz Zajac 2016-10-28 07:14:52 UTC
Created attachment 338672 [details] [review]
Parse rtcp-fb media attributes

Added '*' parsing for all formats
Comment 19 Tomasz Zajac 2016-10-28 07:16:00 UTC
Created attachment 338673 [details] [review]
Add tests for rtcp-fb parsing

Added '*' parsing for all formats
Comment 20 Tomasz Zajac 2016-10-28 07:17:15 UTC
(In reply to Olivier Crête from comment #15)
> Review of attachment 335077 [details] [review] [review]:
> 
> You're missing parsing of '*' meaning that it applies to all formats.

Thank you, I have added parsing all formats now.
Comment 21 Sebastian Dröge (slomo) 2016-11-01 17:57:53 UTC
commit 028b16bb673649ac35ced3904abe3ca9cc130f98
Author: Tomasz Zajac <tomasz.zajac@motorolasolutions.com>
Date:   Fri Oct 28 08:47:40 2016 +0200

    sdp: Add tests for rtcp-fb parsing
    
    https://bugzilla.gnome.org/show_bug.cgi?id=769698

commit 4d4f3c3cc4647b1534e3bbe857ecc4f7ebf8b979
Author: Tomasz Zajac <tomasz.zajac@motorolasolutions.com>
Date:   Fri Oct 28 08:47:01 2016 +0200

    sdp: Parse rtcp-fb media attributes
    
    https://bugzilla.gnome.org/show_bug.cgi?id=769698

commit 5424357ffa6e041fe773a9b5551ec738ff1bdca2
Author: Tomasz Zajac <tomasz.zajac@motorolasolutions.com>
Date:   Wed Aug 10 11:38:58 2016 +0200

    sdp: Add rtcp-fb media attributes based on caps
    
    https://bugzilla.gnome.org/show_bug.cgi?id=769698