test: rtpbin_buffer_list: add test to verify that stats are correct
authorAntonio Ospite <antonio.ospite@collabora.com>
Tue, 2 Apr 2019 10:51:04 +0000 (12:51 +0200)
committerAntonio Ospite <antonio.ospite@collabora.com>
Tue, 2 Apr 2019 11:02:28 +0000 (13:02 +0200)
commit6f12f1cecc6b48ea98aef7c3a9d285783b94bbd3
treefb90630824d4520f8f005e39e67876b0160d4bb0
parent0fae88b5fd15fd613aa8ae1cb9e8fb56746fddac
test: rtpbin_buffer_list: add test to verify that stats are correct

Add a test to verify that stats about sent and received packets are
correct even when using buffer lists.

NOTE: the newly introduced get_session_source_stats() selects the
desired source (sender or receiver) by filtering them by type (using the
get_sender parameter) rather than by ssrc because this simplifies the
code and it's good enough for testing purposes as there is usually one
source per type in the test setup.

Filtering by ssrc would have required handling asynchronous signals like
"on-new-sender-ssrc", with the relative locking, just to retrieve the
actual ssrc of the sender.
tests/check/elements/rtpbin_buffer_list.c