GNOME Bugzilla – Bug 720162
tests: Add test for rtpbasepayload/-depayload
Last modified: 2013-12-10 13:47:28 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.
Created attachment 263877 [details] [review] Proposed patch adding support for subbuffering of empty buffers
Created attachment 263878 [details] [review] Proposed patch for adding unit test for basepayload/-depayload
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.
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 ?
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
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