Commit graph

1103 commits

Author SHA1 Message Date
Olivier Crête
efed059b9a rtp session: Add test for collision loopback detection
Ignore further collisions if the remote SSRC change with ours, it's
probably because someone is sending us back the packets we send out.
2019-07-06 14:23:20 +00:00
Olivier Crête
b5faed910e rtpsession tests: Add test for third-party collision detection
Add tests to validate the code that ignores the same packets coming
from 2 different sources (an third-party collision).
2019-07-06 14:23:20 +00:00
Olivier Crête
3574e6c176 rtpsession: Add test for collision on incoming packets
Make sure that the collision is properly detected on incoming packets.
2019-07-06 14:23:20 +00:00
Olivier Crête
4e18567863 rtpsession test: Verify that on-ssrc-collision message is emitted 2019-07-06 14:23:20 +00:00
Olivier Crête
9d9d543d5c rtpsession: Also send conflict event when sending packet
If the conflict is detected when sending a packet, then also send an
upstream event to tell the source to reconfigure itself.

Also ignore the collision if we see more than one collision from the same
remote source to avoid problems on loops.
2019-07-06 14:23:20 +00:00
Olivier Crête
061afa33ee rtph265pay: Also immediately send packet if it is a suffix NAL
Immediately send packet if it contains any suffix NAL, this is required
in case they come after the VCL nal to not have to wait until the next frame.
2019-07-03 19:05:29 +00:00
Olivier Crête
97f2fb4cc8 rtph26xpay: Wait until there is a VCL or suffix NAL to send
With unit tests.
2019-07-03 19:05:29 +00:00
Olivier Crête
4810c93222 rtph265pay test: Add unit tests for aggregation 2019-07-03 19:05:29 +00:00
Olivier Crête
1b32cb1eae rtph265pay: Implement Aggregation packets
Align with rtph264pay
2019-07-03 19:05:29 +00:00
Olivier Crête
42d775dfbe rtph264pay test: Add unit tests for aggregation 2019-07-03 19:05:29 +00:00
Olivier Crête
cede4f993d rtph264pay: Default to not adding latency when aggregating
Send the bundle as soon as there is one VCL unit in the packet at
the end of an incoming buffer.

The DELTA_UNIT flag is not reliable, so ignore it.
2019-07-03 19:05:29 +00:00
Olivier Crête
0c094612be rtp-payloading test: Fix working to 1.0 buffers instead of groups 2019-07-03 19:05:29 +00:00
Jan Alexander Steffens (heftig)
b46dab13d2 rtph264pay: Support STAP-A bundling
Add a new property "do-aggregate"* to the H.264 RTP payloader which
enables STAP-A aggregation as per [RFC-6184][1]. With aggregation enabled,
packets are bundled instead of sent immediately, up until the MTU size.
Bundles also end at access unit boundaries or when packets have to be
fragmented.

*: The property-name is kept generic since it might apply more widely,
   e.g. STAP-B or MTAP.
[1]: https://tools.ietf.org/html/rfc6184#section-5.7

Closes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/434
2019-07-03 19:05:29 +00:00
Havard Graff
4d4e8f99b9 rtpjitterbuffer: Add unit test for unsolicited rtx affecting skew 2019-07-03 06:23:07 -06:00
Thomas Bluemel
8d955fc32b rtpjitterbuffer: Only calculate skew or reset if no gap.
In the case of reordered packets, calculating skew would cause
pts values to be off. Only calculate skew when packets come
in as expected. Also, late RTX packets should not trigger
clock skew adjustments.

Fixes #612
2019-07-03 06:23:07 -06:00
Jan Alexander Steffens (heftig)
91e858dcbe
test: flvmux: Test changing caps with one sinkpad
These tests segfault without the preceding crash fix.
2019-06-19 14:36:21 +02:00
Jan Alexander Steffens (heftig)
daafce54ac
test: flvmux: Use gst_harness_sink_push_many
And check its return value.
2019-06-19 14:36:21 +02:00
Mathieu Duponchelle
ebe2756434 jitterbuffer: unset DTS on output buffers 2019-06-14 16:02:59 +02:00
Mikhail Fludkov
ec5fa49631 rtpjitterbuffer: late packets shouldn't affect PTS of the following packet
If, say, a rtx-packet arrives really late, this can have a dramatic
effect on the jitterbuffer clock-skew logic, having it being reset
and losing track of the current dts-to-pts calculations, directly affecting
the packets that arrive later.

This is demonstrated in the test, where a RTX packet is pushed in really
late, and without this patch the last packet will have its PTS affected
by this, where as a late RTX packet should be redundant information, and
not affect anything.
2019-06-13 11:55:10 +02:00
Mikhail Fludkov
b9c3e354ee rtpjitterbuffer: fix rtx delay calulation when large packet spacing 2019-06-12 11:39:32 +02:00
Stian Selnes
6269ed49ab rtpjitterbuffer: Fix delay for EXPECTED timers added by gaps
This patch corrects the delay set on EXPECTED timers that are added when
processing gaps. Previously the delay could be too small so that
'timout + delay' was much less than 'now', causing the following retries
to be scheduled too early. (They were sent earlier than
rtx-retry-timeout after the previous timeout.)
2019-06-12 11:39:32 +02:00
Havard Graff
8ed7ab178b rtpjitterbuffer: don't try and calculate packet-rate if seqnum are jumping
Turns out that the "big-gap"-logic of the jitterbuffer has been horribly
broken.

For people using lost-events, an RTP-stream with a gap in sequencenumbers,
would produce exactly that many lost-events immediately.
So if your sequence-numbers jumped 20000, you would get 20000 lost-events
in your pipeline...

The test that looks after this logic "test_push_big_gap", basically
incremented the DTS of the buffer equal to the gap that was introduced,
so that in fact this would be more of a "large pause" test, than an
actual gap/discontinuity in the sequencenumbers.

Once the test was modified to not increment DTS (buffer arrival time) with
a similar gap, all sorts of crazy started happening, including adding
thousands of timers, and the logic that should have kicked in, the
"handle_big_gap_buffer"-logic, was not called at all, why?

Because the number max_dropout is calculated using the packet-rate, and
the packet-rate logic would, in this particular test, report that
the new packet rate was over 400000 packets per second!!!

I believe the right fix is to don't try and update the packet-rate if
there is any jumps in the sequence-numbers, and only do these calculations
for nice, sequential streams.
2019-06-12 11:39:31 +02:00
Havard Graff
dd422f0b7f rtpjitterbuffer: fix unused variables 2019-06-12 11:39:31 +02:00
Nicolas Dufresne
f227f65947 supp: Ignore leaks caused by shout/sethostent
sethostent() seems to be using a global state and we endup with leaks from
that API when called through shout_init(). We had the option to only
ignore the shout case, but the impression is that if we have shout and
another sethostend user, as it's a global state, we may endup with a
different stack trace for the same leak. So in the end, we just ignore
memory allocated by sethostent in general.
2019-06-04 13:41:30 -04:00
Nicolas Dufresne
f7c712d0b8 rtpssrcdemux: Avoid taking streamlock out-of-band
In this change we now protect the internal srcpads list using the
stream lock and limit usage of the internal stream lock to
preventing data flowing on the other src pad type while creating
and signalling the new pad.

This fixes a deadlock with RTPBin shutdown lock. These two locks would
end up being taken in two different order, which caused a deadlock. More
generally, we should not rely on a streamlock when handling out-of-band
data, so as a side effect, we should not take a stream lock when
iterating internal links.
2019-06-04 09:26:06 -04:00
Nicolas Dufresne
947a37f3c8 rtpsession: Always keep at least one NACK on early RTCP
We recently added code to remove outdate NACK to avoid using bandwidth
for packet that have no chance of arriving on time. Though, this had a
side effect, which is that it was to get an early RTCP packet with no
feedback into it. This was pretty useless but also had a side effect,
which is that the RTX RTT value would never be updated. So we we stared
having late RTX request due to high RTT, we'd never manage to recover.

This fixes the regression by making sure we keep at least one NACK in
this situation. This is really light on the bandwidth and allow for
quick recover after the RTT have spiked higher then the jitterbuffer
capacity.
2019-05-17 19:13:22 +00:00
Nicolas Dufresne
84c102b6fe rtpsession: Call on-new-ssrc earlier
Right now, we may call on-new-ssrc after we have processed the first
RTP packet. This prevents properly configuring the source as some
property like "probation" are copied internally for use as a
decreasing counter. For this specific property, it prevents the
application from disabling probation on auxiliary sparse stream.

Probation is harmful on sparse streams since the probation algorithm
assume frequent and contiguous RTP packets.
2019-05-02 14:44:58 -04:00
Nicolas Dufresne
a8ea9f0d05 test: rtpsession: Verify on-sending-nacks callback 2019-04-07 12:00:49 -04:00
Mathieu Duponchelle
280d86a841 rtpsession: Add disable-sr-timestamp property
The Onvif Streaming Spec, in section 6.11, mandates that when
Rate-Control is disabled potential RTCP packets shall have
their timestamps set to 0.

<https://www.onvif.org/specs/stream/ONVIF-Streaming-Spec.pdf>
2019-04-05 20:23:08 +02:00
Nicolas Dufresne
464ada3f29 test: rtpsession: Test FB Nack packing
We used to split the NACK if a smaller seqnum of a range of seqnum was
submited. This test also make sure that the three operations (append,
prepend, update) works properly.
2019-04-05 14:53:09 +00:00
Nicolas Dufresne
a31569713f test: rtpsession: Test handling of NACK surplus
This test verify that NACKs that didn't fit in one packet are properly
filtered and inserted into the following pipeline.
2019-04-05 14:53:09 +00:00
John Bassett
74a74bfc99 rtpsession: Fix race when sending PLI, FIR and NACK packets
Calling rtp_session_send_rtcp before marking the source as requiring a
pli/fir/nack meant the rtcp_thread could be scheduled and start running
before the source was updated. This meant the request would not be sent
early but instead was transmitted with the next regular RTCP packet.

Add test for nack generation.
2019-04-05 14:53:09 +00:00
Antonio Ospite
6f12f1cecc 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.
2019-04-02 13:02:28 +02:00
Antonio Ospite
a330012d6a test: rtpbin_buffer_list: move buffer list creation next to its validation
The tests create a buffer list and then use the chain_list callback to
verify that the correct packets have been pushed.

Move the creation and validation code next to each other so that the
reader can more easily understand what is going on.

While at it add some comments to introduce the two related functions.
2019-04-01 18:42:32 +00:00
Antonio Ospite
af8698e656 test: rtpbin_buffer_list: set the chain_list function directly in the test
The helper function set_chain_function does not really do anything useful, remove it.
2019-04-01 18:42:32 +00:00
Antonio Ospite
5567066bff test: rtpbin_buffer_list: make check_packet more flexible
Make it possible to differentiate between the position in the list and
the packet index in the global structures in check_packet, in some
future case the list may change, in case some element removes a buffer
from the list, and the two indices may not coincide.
2019-04-01 18:42:32 +00:00
Antonio Ospite
5807d79a9d test: rtpbin_buffer_list: factor out a function to create packets buffers 2019-04-01 18:42:32 +00:00
Antonio Ospite
6ab13c19b6 test: rtpbin_buffer_list: check if the chain_list function has been called
Make the test more useful to verify that the chain list function has
actually been called.
2019-04-01 18:42:32 +00:00
Antonio Ospite
623d3b930e test: rtpbin_buffer_list: port to GStreamer 1.0
Port the rtpbin_buffer_list test to GStreamer 1.0 and re-enable it.

Some other changes include:
  - the check on the caps has been moved from the buffer level to the
    pad level;
  - remove underscore prefix from static functions names, this is not
    idiomatic in C and rarely used in the other tests;
  - the unused header_buffer variable has been removed;
  - check_group() has been renamed to check_packet() because in
    GStreamer 1.0 there is no concept of "group" anymore, the comments
    have also been updated to reflect this.
2019-04-01 18:42:32 +00:00
Tim-Philipp Müller
abef4e4ea3 tests: jpegdec: bump discoverer timeout for valgrind
Tests might take a bit longer, esp. when run under valgrind
and/or they're running on the CI with other things going on,
so let's just bump the timeout to something higher and let
the test runner time us out if needed.
2019-04-01 18:20:53 +01:00
Olivier Crête
785219a317 rtpstorage: Make debug category available to sub objects 2019-03-26 19:41:06 -04:00
Antonio Ospite
2513edf229 test: imagefreeze: add test for the num-buffers property 2019-03-14 09:12:28 +01:00
Tim-Philipp Müller
a2d01b3a8b tests: rtpulpfec: fix buffer leak in unit test
This freed wrapped memory instead of the GstMemory or buffer.
2019-03-06 19:40:10 +00:00
Tim-Philipp Müller
081da67444 tests: rtpjitterbuffer: fix leaks in new test_push_eos() test 2019-03-06 17:28:57 +00:00
Tim-Philipp Müller
55d43dbbde tests: states: blacklist gtk sinks for state change test
gtk_init() throws GLib-GIO-WARNING **: unknown schema extension 'd'
unrelated to our test environment.
2019-03-06 17:27:32 +00:00
Tim-Philipp Müller
6b68b73341 tests: .gitignore more test and example binaries 2019-03-06 17:26:03 +00:00
Olivier Crête
6530fa53f2 rtp jitterbuffer test: Test for queue filling 2019-02-11 23:41:14 +00:00
Nirbheek Chauhan
062f2c46fa misc: Fix warnings on Cerbero's mingw (gcc 4.7)
error: this decimal constant is unsigned only in ISO C90 [-Werror]
2019-02-06 14:28:54 +00:00
Nicolas Dufresne
0725e54d6c test: h265depay: Add todo for testing aggregate packets with marker
We are missing a sample to test this, but a fix has been made, so add a
todo.
2019-01-31 19:30:14 +00:00
Nicolas Dufresne
cf3da6a443 test: rtph264depay: Check handling of STAP-A marker
Related to #557
2019-01-31 19:30:14 +00:00
Nirbheek Chauhan
ef118bd56e meson: orc-test is not required
This is especially never available on iOS.
2019-01-31 15:28:56 +05:30
Seungha Yang
fe7885b13e meson: Add support orc fallback
Allow fallback to orc subproject if any.
Additionally 'dependencies' keyword is removed from find_library,
because it's invalid keyword for find_library.
2019-01-30 19:44:37 +09:00
Victor Toso
4a33b083f1 tests: rtp-payloading avoid -Wmaybe-uninitialized
More false positives as both of them are initialized in the line
before they are used, wrapped with fail_unless() check.
2019-01-18 13:53:18 +00:00
Victor Toso
2f77d877c3 tests: matroskamux avoid -Wmaybe-uninitialized
False positive for the three variables but some warnings like:

   ../tests/check/elements/matroskamux.c:875:10:
    warning: 'chapters_offset' may be used uninitialized in this function [-Wmaybe-uninitialized]
   *index = chapters_offset;
   ~~~~~~~^~~~~~~~~~~~~~~~~

The above is false positive as there is a gboolean to check if it was
initialized or not (found_chapters_declaration).
2019-01-18 13:53:18 +00:00
Tim-Philipp Müller
6700c16989 meson: enable tests for orc code 2019-01-16 00:57:46 +00:00
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
ac8fc4419a tests: Enable more unit tests on Windows 2018-12-30 21:55:28 +09: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
KimTaeSoo
b01210c554 tagschecking: Use gst_message_parse_warning in case of GST_MESSAGE_WARNING
Bus message handler of tags checking unit test uses gst_message_parse_error()
in case of GST_MESSAGE_ERROR and GST_MESAGE_WARNING.
If gst_message_parse_error() is called in case of GST_MESSAGE_WARNING, assert occurs.
So modified to use gst_message_parse_warning() in case of GST_MESSAGE_WARNING.
2018-12-19 15:57:32 +00:00
Nicolas Dufresne
5ae917f62f test: rtph264/265: Add libgstrtp in auto-tool makefile 2018-12-19 09:51:10 -05: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
Seungha Yang
7aebe60809 tests: Enable unit test on Windows
Allow run some unit tests on Windows.
* Remove hardcoded path separator in whitelist env for Meson to choose
  OS-specific separator automatically (i.e., ';' for windows and ':' for *nix)
* Add dependency explicitly for some test cases, otherwise plugins couldn't be
  loaded on uninstalled environment of Windows.
2018-12-18 22:52:24 +09:00
Seungha Yang
16af121a86 meson: Prefer to use join_paths() over '/'
... to avoid mixing '/' and '\' in a path string on Windows.
2018-12-18 22:52:24 +09: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
Tim-Philipp Müller
193dbd20a8 tests: rtpssrcdemux: fix uninstalled autotools build and distcheck 2018-11-30 23:56:12 +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
Nirbheek Chauhan
21d5005688 meson: Cleanup old FIXMEs that relied on meson changes 2018-10-28 14:10:12 +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
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