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 720162 - tests: Add test for rtpbasepayload/-depayload
tests: Add test for rtpbasepayload/-depayload
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other All
: Normal enhancement
: 1.3.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-12-10 00:39 UTC by Sebastian Rasmussen
Modified: 2013-12-10 13:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch adding support for subbuffering of empty buffers (1.62 KB, patch)
2013-12-10 00:40 UTC, Sebastian Rasmussen
committed Details | Review
Proposed patch for adding unit test for basepayload/-depayload (12.24 KB, patch)
2013-12-10 00:40 UTC, Sebastian Rasmussen
committed Details | Review

Description Sebastian Rasmussen 2013-12-10 00:39:16 UTC
As an attempt to understand GstRTPBasePayload/-Depayload and more specifically perfect timestamps I wrote a simple unit test for these classes. Hopefully someone (me?) will extend the test in the future.

I opted to pass empty buffers through a pipeline on the form:
appsrc ! rtbasepayload ! rtpbasedepayload ! appsink

When doing so I ran into a problem in rtpbuffer which did not
handle empty buffers gracefully. I fixed this and two typos.
These changes are likely more controversial so I have put these
in a separate patch.
Comment 1 Sebastian Rasmussen 2013-12-10 00:40:25 UTC
Created attachment 263877 [details] [review]
Proposed patch adding support for subbuffering of empty buffers
Comment 2 Sebastian Rasmussen 2013-12-10 00:40:52 UTC
Created attachment 263878 [details] [review]
Proposed patch for adding unit test for basepayload/-depayload
Comment 3 Olivier Crête 2013-12-10 01:42:36 UTC
Review of attachment 263877 [details] [review]:

Is there any RTP format where it's valid to send an empty packet ? I can't think of any, so sending making it possible to send one doesn't seem like a great idea. It's probalby better to generate a 1-byte packet in your test.
Comment 4 Olivier Crête 2013-12-10 01:45:27 UTC
Review of attachment 263878 [details] [review]:

Is there any reason you don't use something like gst_check_element_push_buffer() or some of the other functions in the gstcheck library ?
Comment 5 Wim Taymans 2013-12-10 11:44:09 UTC
changed it slightly differently, also added a unit test for empty buffers. It's not so much about the empty payload, the error was in the subbuffer function, which failed to subbuffer the last 0 sized buffer from the payload (and that would be problem for theora.

commit c734f9fba8179e7978c0b03b83097a5e1b377c05
Author: Sebastian Rasmussen <sebras@hotmail.com>
Date:   Tue Dec 10 00:56:07 2013 +0100

    rtpbuffer: Allow subbuffering of empty buffers
    
    See https://bugzilla.gnome.org/show_bug.cgi?id=720162
Comment 6 Wim Taymans 2013-12-10 13:47:07 UTC
commit 1966b85b208174683810cd7c37ec6b0a5e9e2c88
Author: Sebastian Rasmussen <sebras@hotmail.com>
Date:   Tue Dec 10 00:13:55 2013 +0100

    tests: Add test for rtpbasepayload/-depayload
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=720162