Commit graph

25 commits

Author SHA1 Message Date
Jordan Petridis
515ada7e22
Run gst-indent through the files
This is required before we enabled an indent test in the CI.

https://gitlab.freedesktop.org/gstreamer/gstreamer-project/issues/33
2018-11-28 05:52:16 +02:00
Linus Svensson
ac94c706da rtpsession: test: Plug memory leak 2018-11-13 12:30:35 +00:00
Olivier Crête
cc69c876fe rtpsession: Allow changing the SDES at runtime
Make it possible to modify the SDES in a packet at runtime.

https://bugzilla.gnome.org/show_bug.cgi?id=763502
2018-10-28 12:10:36 +00:00
Havard Graff
13aa805943 rtpsession: fix up GHashTable-behavior dependent tests
GHashTable iteration order changed in recent GLib,
and tests were relying on that.

https://mail.gnome.org/archives/desktop-devel-list/2018-October/msg00016.html
2018-10-20 12:32:44 +01:00
Havard Graff
ac6e77acad rtpsession: Don't start the RTCP thread until it's needed
Always wait with starting the RTCP thread until either a RTP or RTCP
packet is sent or received. Special handling is needed to make sure the
RTCP thread is started when requesting an early RTCP packet.

We want to wait with starting the RTCP thread until it's needed in order
to not send RTCP packets for an inactive source.

https://bugzilla.gnome.org/show_bug.cgi?id=795139
2018-07-12 18:37:33 +02:00
Havard Graff
77f3ce2e45 rtpsession: Add tests for PLI and FIR
https://bugzilla.gnome.org/show_bug.cgi?id=795139
2018-05-15 11:52:45 +01:00
Stian Selnes
457fdf95c4 rtpsession: Drop packet if trying to send from non-internal source
If obtain_internal_source() returns a source that is not internal it
means there exists a non-internal source with the same ssrc. Such an
ssrc collision should be handled by sending a GstRTPCollision event
upstream and choose a new ssrc, but for now we simply drop the packet.
Trying to process the packet further will cause it to be pushed
usptream (!) since the source is not internal (see source_push_rtp()).

https://bugzilla.gnome.org/show_bug.cgi?id=795139
2018-05-15 10:34:29 +01:00
Havard Graff
b43ee8f5b1 rtpsession: Try media_ssrc if no src can be found for PLI sender_ssrc
Some RTP stacks out there does not set the sender_ssrc. In order to be
more robust, try to lookup the media_ssrc before dropping the PLI.

https://bugzilla.gnome.org/show_bug.cgi?id=795139
2018-05-13 20:41:39 +01:00
Mikhail Fludkov
386ca1d378 rtpsession: Fix on-feedback-rtcp race
If there is an external source which is about to timeout and be removed
from the source hashtable and we receive feedback RTCP packet with the
media ssrc of the source, we unlock the session in
rtp_session_process_feedback before emitting 'on-feedback-rtcp' signal
allowing rtcp timer to kick in and grab the lock. It will get rid of
the source and rtp_session_process_feedback will be left with RTPSource
with ref count 0.

The fix is to grab the ref to the RTPSource object in
rtp_session_process_feedback.

https://bugzilla.gnome.org/show_bug.cgi?id=795139
2018-05-13 20:33:56 +01:00
John-Mark Bell
0a2b55ac3c rtpsession: do not emit RBs for internal senders.
These are the sources we send from, so there is no reason to
report receive statistics for them (as we do not receive on them,
and the remote side has no knowledge of them).

https://bugzilla.gnome.org/show_bug.cgi?id=795139
2018-05-13 19:16:59 +01:00
Havard Graff
cd8c12f240 tests: rtpsession: fix indentation
https://bugzilla.gnome.org/show_bug.cgi?id=795139
2018-05-13 19:09:29 +01:00
Haakon Sporsheim
3c0d006c03 rtpsession: Handle zero length feedback packets
https://bugzilla.gnome.org/show_bug.cgi?id=791074
2017-12-02 13:58:34 +00:00
Havard Graff
96d837b301 tests: rtpsession: refactor tests to use GstHarness
This patch simplifies the tests (44% less code) and
makes them much more readable.

The provided SessionHarness also makes it much easier
to write new tests for rtpsession.

https://bugzilla.gnome.org/show_bug.cgi?id=791070
2017-12-02 13:05:01 +00:00
Tim-Philipp Müller
e6d188967a tests: fix indentation 2016-09-15 09:53:07 +01:00
Mikhail Fludkov
ee7e80d615 rtpsession: don't act on suspicious BYE RTCP
Some endpoints (like Tandberg E20) can send BYE packet containing our
internal SSRC. I this case we would detect SSRC collision and get rid
of the source at some point. But because we are still sending packets
with that SSRC the source will be recreated immediately.
This brand new internal source will not have some variables incorrectly
set in its state. For example 'seqnum-base` and `clock-rate` values will be
-1.
The fix is not to act on BYE RTCP if it contains internal or unknown
SSRC.

https://bugzilla.gnome.org/show_bug.cgi?id=762219
2016-05-20 09:28:39 +03:00
Mikhail Fludkov
fa1c711a2f rtpsession: Add test for locking of the stats signal
Keeping the lock while emitting the stats signal introduces potential
deadlock in those situations when the signal callback wants the access
to rtpsession's properties which also requre the lock.

https://bugzilla.gnome.org/show_bug.cgi?id=762216
2016-05-20 09:26:20 +03:00
Stian Selnes
4c0e509328 rtpsession: Add new signal 'on-app-rtcp'
Similar to the 'on-feedback-rtcp' signal, but emitted for RTCP APP
packets.

https://bugzilla.gnome.org/show_bug.cgi?id=762217
2016-03-30 15:42:01 +03:00
Olivier Crête
7cc59fcdf6 tests: Fix rtpsession test failure
The time of the first RTCP packet is semi-random, so
sometimes it was produced before enough packets from
the second SSRC were received. First drop queued RTCP
packets, then advance the clock enough to ensure
that at least one new RTCP packet is produced.

https://bugzilla.gnome.org/show_bug.cgi?id=750731
2015-08-31 16:42:30 -04:00
Sebastian Dröge
b549ebd066 rtpsession: Override the SSRC from the packets' SSRC if none was given via caps or property 2015-06-07 10:33:27 +02:00
Edward Hervey
d524439b35 check: Use GST_CHECK_MAIN () macro everywhere
Makes source code smaller, and ensures we go through common initialization
path (like the one that sets up XML unit test output ...)
2015-06-02 16:27:24 +02:00
Sebastian Dröge
0e13172837 rtpsession: Fix memory leaks in unit test 2014-06-30 00:00:43 +02:00
George Kiagiadakis
b19c830a1c tests/check: rtpsession: test internal sources timing out 2014-05-14 16:01:50 +02:00
Sebastian Dröge
02d9b5e6f8 rtpsession: Fix memory leaks in test 2014-04-17 17:33:46 +02:00
George Kiagiadakis
f9b7f44938 tests/check: add an rtpsession unit test to verify all RBs are included in all SRs, roundrobin
This test checks that when we have multiple internal sender sources
in rtpsession, SRs contain RBs for every other sender source, and that
they are included roundrobin when they exceed ST_RTCP_MAX_RB_COUNT,
which is the max number of RBs that can fit in a SR.
2013-12-12 16:02:56 +01:00
Wim Taymans
3623ebf01e check: add rtpsession test
Add a basic rtpsession test to ensure that RR blocks are generated when
multiple SSRC senders are active.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=711270
2013-11-11 14:28:52 +01:00