Commit graph

833 commits

Author SHA1 Message Date
Jan Alexander Steffens (heftig)
8f8de410c5 test: rtph265pay: Verify we only mark the last fragment 2019-01-09 15:36:40 +00:00
Jan Alexander Steffens (heftig)
03d138985f test: rtph265pay: Use a bigger test frame
The existing frame's last slice is too small to be used for
fragmentation tests.
2019-01-09 15:36:40 +00:00
Jan Alexander Steffens (heftig)
791711f9be test: rtph264pay: Verify we only mark the last fragment 2019-01-09 15:36:40 +00:00
Seungha Yang
cc5ee5f673 tests: Remove pointless unistd.h include 2018-12-30 21:54:44 +09:00
Mathieu Duponchelle
f52e16ceb8 Revert "rtpbin: receive bundle support"
This reverts commit dcd3ce9751.

This functionality was implemented for gstopenwebrtc, but it
turned out this was not actually needed for webrtc bundling
support, as shown in webrtcbin. It also doesn't correspond
to any standards.

This is an API break, but nothing should actually depend on
this, at least not for its initial purpose.

Changes in rtpbin.c were reverted manually, to preserve some
refactoring that had occurred in the original commit.

Fixes #537
2018-12-20 13:25:10 +00:00
Nicolas Dufresne
6941079d8d test: rtph265: Copy and port tests from rtph264
This copy and port all the relevant tests from rtph264.
2018-12-18 13:39:54 -05:00
Nicolas Dufresne
a0c58a77dc test: rtph264depay: Check the marker is converted to flag 2018-12-18 13:39:54 -05:00
Nicolas Dufresne
6b89144c9c test: rtph264depay: Check that EOS drains the depayloaded
In AU mode, the depayloader may have accumulated NALs, test that
these NALs are drained and not dropped.
2018-12-18 13:39:54 -05:00
Nicolas Dufresne
aa7e78b8e4 test: rtph264pay: Add tests for marker bit
Test that marker bit is transferred when input buffer has the
marker flag set but also that it's set whenever the payloader
receives complete AU.
2018-12-18 13:39:54 -05:00
Nicolas Dufresne
73ee9cdea2 test: rtph264pay: Verify slices timestamp
This test make sure that timestamps are properly transfered
to each NALU.
2018-12-18 13:39:54 -05:00
Nicolas Dufresne
cd09a3103f test: rtph264pay: Add reserved nals test 2018-12-18 13:39:54 -05:00
Jonny Lamb
9a3e8ad2d7 rtpulpfec: stop and start the harness when setting error-after
gstreamer!55 makes some changes to how the `error-after` counter works
which breaks this test. This change makes the test not rely on the
ability to alter `error-after` at runtime and explicitly stops and
starts the harness before pushing data.

An alternative would be to add another argument to
`harness_rtpulpfecdec` to set `error-after` on construction but that's
slightly more long-winded. so I went for this approach instead.

Fixes #532, even though that's already closed.
2018-12-18 12:32:48 +00:00
Mathieu Duponchelle
306d5021e5 tests: remove rtpaux test
The initial mission statement for this test was:

* demonstrate usage of the request-aux-* signals in rtpbin
* test the rtx elements

We have examples that serve the first use case, and better
(harnessed) tests for the second use case.

This test is slow and racy, it served its purpose but can now
be removed.

Fixes #533
2018-12-18 11:08:50 +00:00
Olivier Crête
59d398b66c rtpjitterbuffer tests: Validate the number of buffers 2018-12-14 12:10:16 +00:00
Olivier Crête
d857522237 rtpjitterbuffer: Run all timers immediately on EOS
When the EOS event is received, run all timers immediately and avoid
pushing the EOS downstream before this has been run. This ensures that
the lost packet statistics are accurate.
2018-12-14 12:10:16 +00:00
Olivier Crête
c6e8325945 rtpjitterbuffer test: Stop jitterbuffer before pads to avoid race
The teardown of the pads checks the refcount, but there are timers
inside the jitterbuffer that can push things, so if we're not lucky,
things could be pushed while the pads are being shut down. Putting the
jitterbuffer to NULL first avoids this.
2018-12-14 12:10:16 +00:00
Nicolas Dufresne
c596bdda38 test: rtpssrcdemux: Test event forwarding
This the first unit test of this element. It adds a test that verify
that events are forwarded correctly.
2018-11-29 15:19:17 -05:00
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
Havard Graff
65a7d39bd4 flvmux: Test that timestamps are always increasing
Decreasing timestamps break rtmpsink.

With contributions from Olivier Crête.

https://bugzilla.gnome.org/show_bug.cgi?id=796382
2018-11-05 18:17:04 -05: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
Yeongjin Jeong
301142604e tests: flvmux: Fix pushing invalid audio caps in tests
Previous commit created caps with incorrect aac codec data
that did not match the audio channel.

https://bugzilla.gnome.org/show_bug.cgi?id=797256
2018-10-21 02:44:24 -04: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
53a45b1222 Initial commit of GstRtpFunnel
For funneling together rtp-streams into a single session.
Use-cases include multiplexing and bundle.
2018-10-15 14:20:58 +02:00
Yeongjin Jeong
afa4be4b3b tests: flvdemux: Add new test for channel detect using aac codec-data
https://bugzilla.gnome.org/show_bug.cgi?id=797275
2018-10-12 14:35:37 -04:00
Yeongjin Jeong
7b5f7249e8 tests: flvmux: Add new test for caps change after starting to write headers
https://bugzilla.gnome.org/show_bug.cgi?id=797256
2018-10-11 15:35:24 -04:00
Havard Graff
6c05180dc5 rtpmux: respect downstream "timestamp-offset" in caps.
https://bugzilla.gnome.org/show_bug.cgi?id=795162
2018-10-10 15:39:02 -04:00
Havard Graff
6f37bd8f19 rtpmux: cleanup ssrc-handling code a bit
And add some better logging.

https://bugzilla.gnome.org/show_bug.cgi?id=795162
2018-10-10 15:38:57 -04:00
Havard Graff
7cd36d2914 rtpmux: property should overrule both upstream and downstream
https://bugzilla.gnome.org/show_bug.cgi?id=762213

https://bugzilla.gnome.org/show_bug.cgi?id=795162
2018-10-10 15:35:31 -04: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
Seungha Yang
aecc17251d tests: qtdemux: Add checking exposed segment event
https://bugzilla.gnome.org/show_bug.cgi?id=796480
2018-06-06 11:19:25 -04:00
Thiago Santos
0de143fa3e tests: qtdemux: Avoid using data beyond array and improve error msg
Makes it easier to debug the failures as well as prevents problems
reading out of bounds data.
2018-05-28 11:25:13 -07:00
Tim-Philipp Müller
48dd93662d tests: rtpstorage: fix potential crashes / test failures on 32-bit
Pass 64 bits to g_object_set() for 64-bit integer properties like
rtpstorage's "size-time" property.

https://bugzilla.gnome.org/show_bug.cgi?id=796429
2018-05-27 20:30:46 +01:00
Vivia Nikolaidou
d11339d616 splitmuxsink: Added new async-finalize mode
This mode is useful for muxers that can take a long time to finalize a
file. Instead of blocking the whole upstream pipeline while the muxer is
doing its stuff, we can unlink it and spawn a new muxer+sink combination
to continue running normally.

This requires us to receive the muxer and sink (if needed) as factories,
optionally accompanied by their respective properties structures. Also
added the muxer-added and sink-added signals, in case custom code has to
be called for them.

https://bugzilla.gnome.org/show_bug.cgi?id=783754
2018-05-24 12:47:24 +03: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
Seungha Yang
3f090be2d1 tests: qtdemux: Add test for stream change
Add test case to verify track-id change and stream change

https://bugzilla.gnome.org/show_bug.cgi?id=684790
2018-05-10 08:09:20 +02:00
Olivier Crête
168fae813b flvmux: Wait for caps from both srcs before writing header
Wait for caps on all pads to start writing data even when source is live.

Includes unit test by Havard Graff that simulates it.

https://bugzilla.gnome.org/show_bug.cgi?id=794722
2018-04-26 15:41:54 -04:00
Mathieu Duponchelle
90f5ae8f45 ulpfecdec: output perfect seqnums
ULP FEC, as defined in RFC 5109, has the protected and protection
packets sharing the same ssrc, and a different payload type, and
implies rewriting the seqnums of the protected stream when encoding
the protection packets. This has the unfortunate drawback of not
being able to tell whether a lost packet was a protection packet.

rtpbasedepayload relies on gaps in the seqnums to set the DISCONT
flag on buffers it outputs. Before that commit, this created two
problems:

* The protection packets don't make it as far as the depayloader,
  which means it will mark buffers as DISCONT every time the previous
  packets were protected

* While we could work around the previous issue by looking at
  the protection packets ignored and dropped in rtpptdemux, we
  would still mark buffers as DISCONT when a FEC packet was lost,
  as we cannot know that it was indeed a FEC packet, even though
  this should have no impact on the decoding of the stream

With this commit, we consider that when using ULPFEC, gaps in
the seqnums are not a reliable indicator of whether buffers should
be marked as DISCONT or not, and thus rewrite the seqnums on
the decoding side as well to form a perfect sequence, this
obviously doesn't prevent the jitterbuffer from doing its job
as the ulpfec decoder is downstream from it.

https://bugzilla.gnome.org/show_bug.cgi?id=794909
2018-04-19 18:17:39 +02:00
Mathieu Duponchelle
9b1aec0f79 flvmux test: refactor looped test.
Looping the test 500 times to only execute the test once every
33 times means we inited and deinited gstreamer 467 times
for no reason at all, which was annoying when running the test
with valgrind.
2018-04-13 23:02:26 +02:00
Mathieu Duponchelle
ec3c49e958 souphttpsrc test: free g_get_current_dir return 2018-04-13 20:35:24 +02:00
Mathieu Duponchelle
cc9fe814d6 rtpulpfec tests: Fix leaks 2018-04-13 17:37:47 +02:00
Sebastian Dröge
ed2ccb1a60 rtp: Fix compilation with non-C99 compilers
By moving variable declarations out of loop headers.
2018-03-20 12:08:28 +02:00
Olivier Crête
96261ce220 flvmux: Duration & unit tests
The muxed buffers will not carry the duration of the
incoming buffers.

https://bugzilla.gnome.org/show_bug.cgi?id=793457
2018-03-01 18:25:02 -05:00
Mathieu Duponchelle
b0dd092ea6 tests: fix redenc tests
The default of the allow-no-red-blocks property was changed in a
previous commit, thus breaking the test assumptions
2018-02-27 16:34:51 +01:00
Tim-Philipp Müller
7f6aa7c344 .gitignore more test binaries 2018-02-22 10:54:02 +00:00