Commit graph

764 commits

Author SHA1 Message Date
Tim-Philipp Müller
4b1f43ebe3 Moving mpg123 plugin from -ugly 2017-08-20 13:48:48 +01:00
Sebastian Dröge
7e718d6039 Revert "matroskamux: adjust unit test to modified behaviour"
This reverts commit 8fe478c8a7.

We're back to previous behaviour
2017-07-18 10:08:33 +03:00
Olivier Crête
96e71b0286 rtpsession: Send EOS if all internal sources sent bye
The ones which are not internal should not matter, and we should
wait for all sources to have sent their BYEs.

And add unit test

https://bugzilla.gnome.org/show_bug.cgi?id=773218
2017-07-04 21:14:10 -04:00
Jan Alexander Steffens (heftig)
aa8ac28d86 tests: souphttpsrc: Avoid deprecated ssl-ca-file property
SoupSession's ssl-ca-file property is deprecated. Use the recommended
tls-database property.

This is a bit more complex as it requires creating a GTlsFileDatabase
object for an absolute (!) path to the CA certificates file.

https://bugzilla.gnome.org/show_bug.cgi?id=784005
2017-06-29 15:32:30 -04:00
Jan Alexander Steffens (heftig)
9922091f1b tests: souphttpsrc: Avoid deprecated server ssl properties
The ssl-cert-file and ssl-key-file properties are deprecated. Use the
soup_server_set_ssl_cert_file function to load the files.

https://bugzilla.gnome.org/show_bug.cgi?id=784005
2017-06-29 15:32:30 -04:00
Jan Alexander Steffens (heftig)
27a0ea8cf5 tests: souphttpsrc: Make ssl_cert/key_file static
Just a bit of cleanup.

https://bugzilla.gnome.org/show_bug.cgi?id=784005
2017-06-29 15:32:30 -04:00
Tim-Philipp Müller
dd23afb6d4 sys: remove sunaudio plugin
Even though hooked up to the build system, it's clear that no one
has ever built or used this with GStreamer 1.x. It wants to link
against libgstinterfaces, which no longer exists. And uses 0.10-style
raw audio caps. And the last meaningful change was done in 2009.
Let's just remove it.
2017-06-23 20:02:43 +01:00
Tim-Philipp Müller
c35292505b meson: add options to set package name and origin
https://bugzilla.gnome.org/show_bug.cgi?id=782172
2017-05-20 14:53:42 +01:00
Tim-Philipp Müller
4df3669c0c tests: rtp-payloading: add test for rtph264depay avc/byte-stream output
Make sure avc output doesn't contain SPS/PPS inline, but
byte-stream output does.
2017-04-24 17:31:04 +01:00
Edward Hervey
7e9b7658e5 tests: Add vp9enc to gitignore 2017-04-12 11:33:05 +02:00
George Kiagiadakis
21f532f1c6 tests/check/rtprtx: add checks for rtprtxqueue's max-size-{time,packets} properties
https://bugzilla.gnome.org/show_bug.cgi?id=780867
2017-04-11 09:44:33 +03:00
Vincent Penquerc'h
d7212dac2e tests: fix leak in splitmux test
https://bugzilla.gnome.org/show_bug.cgi?id=781025
2017-04-09 11:19:56 +03:00
Jan Schmidt
57939fd98a splitmux test: Use passed first/last timestamps
Don't hard-code the expected timestamp range, use the
values the caller is passing in.
2017-03-14 15:48:08 +11:00
Nicolas Dufresne
27303b5904 tests: Add missing LDADD for libm in tests using math.h
Also, remove the math.h include for the one that just prentend to need
it.
2017-03-08 22:55:09 -05:00
Jan Schmidt
4335c4c160 splitmux: Add unit test for reverse playback
Ensure that reverse playback works and generates the range
of timestamps (0-3s) we expect, in monotonically descending order.
2017-03-04 00:35:32 +11:00
Sebastian Dröge
eefcdc9ee1 rtp-payloading: Add new test for Vorbis renegotiation
Check if encoding, payloading, depayloading and decoding works if the
stream configuration (and thus the headers) change.
2017-02-27 19:25:35 +02:00
George Kiagiadakis
e6bd2a5c18 tests: splitmux: add unit test for content with sparse streams
https://bugzilla.gnome.org/show_bug.cgi?id=761086
2017-02-27 12:58:21 +02:00
Guillaume Desmottes
0f719af307 tests: matroskamux, qtmux: don't add codec_data buffers to template caps
streamheader and codec_data buffers fields are only meant to be
in the negotiated caps, not the template caps.

Fixes false-positive leaks of those buffers detected by the leaks
tracer, as template caps are static, and we decided to not include
code in gstreamer core to handle this unusual case of template caps
having buffers in them.

https://bugzilla.gnome.org/show_bug.cgi?id=768762
2017-02-21 15:47:16 +00:00
Søren Juul
1184429e21 icydemux: reset tags on empty value
Some radio streams uses StreamTitle='' to reset the title after a
track stopped playing, e.g. while the host talks between tracks or
during news segments.
This change forces an empty tag object to be distributed if
StreamTitle or StreamUrl is received with empty value, thus allowing
downstream elements to get notified about this.

https://bugzilla.gnome.org/show_bug.cgi?id=778437
2017-02-14 12:24:13 +02:00
Tim-Philipp Müller
781b5ac781 tests: rtpjitterbuffer: fix compiler warning due to c99-ism
rtpjitterbuffer.c:592:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
2017-01-09 19:04:04 +00:00
Jan Schmidt
f7009eb5d7 splitmuxsink: Add format-location-full signal
Add a new signal for formatting the filename, which receives
a GstSample containing the first buffer from the reference
stream that will be muxed into that file.

Useful for creating filenames that are based on the
running time or other attributes of the buffer.

To make it work, opening of files and setting filenames is
now deferred until there is some data to write to it,
which also requires some changes to how async state changes
and gap events are handled.
2017-01-03 01:34:02 +11:00
Edward Hervey
3a4d4dcd27 check: Remove dead code 2017-01-02 15:06:33 +01:00
Nicola Murino
8fe478c8a7 matroskamux: adjust unit test to modified behaviour
Now matroskamux mark all packets of audio-only streams as keyframes so
in test_block_group after pushing the test audio data 4 buffers are produced
and not more 2. The last buffer is the original data and must match with what
pushed. The remaining ones are matroskamux headers

https://bugzilla.gnome.org/show_bug.cgi?id=754696
2016-12-21 16:58:42 +00:00
Havard Graff
0a81f71df5 tests/jitterbuffer: Major refactoring and cleanups
* Changed PCMU->TEST for common macros
* Changed verify-functions (lost & rtx) into macros.
* Remove option to add marker-bit for test-buffers (not used anywhere)
* Add new push_test_buffer function that makes sure there are correlation
  between dts and the time on the clock. (classic test-mistake)
* Established a generic starting-point for tests with the
  construct_deterministic_initial_state function and use it where
  applicable, which removes lots of "boilerplate" everywhere.
* Add basic lost-event test
* Remove as much "magic constants" as possible.
* Remove 3 tests that no longer are testing anything that others don't,
  and was completely unmaintainable.
* Remove unnecessary use of the testclock
* Verify each test is testing what it actually says it does (and modify
  where it doesn't)

In general, make the tests much smaller, better, more maintainable and
readable.

https://bugzilla.gnome.org/show_bug.cgi?id=774409
2016-12-14 15:00:37 +02:00
Sebastian Dröge
63938ef730 gst: Don't declare variables inside the for loop header
This is a C99 feature.
2016-12-13 22:32:46 +02:00
Philippe Normand
dcd3ce9751 rtpbin: receive bundle support
A new signal named on-bundled-ssrc is provided and can be
used by the application to redirect a stream to a different
GstRtpSession or to keep the RTX stream grouped within the
GstRtpSession of the same media type.

https://bugzilla.gnome.org/show_bug.cgi?id=772740
2016-11-16 08:56:34 +01:00
Havard Graff
1a4393fb4d rtpjitterbuffer: fix timer-reuse bug
When doing rtx, the jitterbuffer will always add an rtx-timer for the next
sequence number.

In the case of the packet corresponding to that sequence number arriving,
that same timer will be reused, and simply moved on to wait for the
following sequence number etc.

Once an rtx-timer expires (after all retries), it will be rescheduled as
a lost-timer instead for the same sequence number.

Now, if this particular sequence-number now arrives (after the timer has
become a lost-timer), the reuse mechanism *should* now set a new
rtx-timer for the next sequence number, but the bug is that it does
not change the timer-type, and hence schedules a lost-timer for that
following sequence number, with the result that you will have a very
early lost-event for a packet that might still arrive, and you will
never be able to send any rtx for this packet.

Found by Erlend Graff - erlend@pexip.com

https://bugzilla.gnome.org/show_bug.cgi?id=773891
2016-11-04 16:56:56 +02:00
Havard Graff
fb9c75db36 rtpjitterbuffer: fix lost-event using dts instead of pts
The lost-event was using a different time-domain (dts) than the outgoing
buffers (pts). Given certain network-conditions these two would become
sufficiently different and the lost-event contained timestamp/duration
that was really wrong. As an example GstAudioDecoder could produce
a stream that jumps back and forth in time after receiving a lost-event.

The previous behavior calculated the pts (based on the rtptime) inside the
rtp_jitter_buffer_insert function, but now this functionality has been
refactored into a new function rtp_jitter_buffer_calculate_pts that is
called much earlier in the _chain function to make pts available to
various calculations that wrongly used dts previously
(like the lost-event).

There are however two calculations where using dts is the right thing to
do: calculating the receive-jitter and the rtx-round-trip-time, where the
arrival time of the buffer from the network is the right metric
(and is what dts in fact is today).

The patch also adds two tests regarding B-frames or the
“rtptime-going-backwards”-scenario, as there were some concerns that this
patch might break this behavior (which the tests shows it does not).
2016-11-04 16:51:20 +02:00
Havard Graff
bea35f97c8 rtpjitterbuffer: fix bug in reschedule_timer
The new timeout is always going to be (timeout + delay), however, the
old behavior compared the current timeout to just (timeout), basically
being (delay) off.

This would happen if rtx-delay == rtx-retry-timeout, with the result that
a second rtx attempt for any buffers would be scheduled immediately instead
of after rtx-delay ms.

Simply calculate (new_timeout = timeout + delay) and then use that instead.

https://bugzilla.gnome.org/show_bug.cgi?id=773905
2016-11-04 16:40:14 +02:00
Tim-Philipp Müller
752dd15c54 tests: wavparse: add test for processing an actual .wav file
https://bugzilla.gnome.org/show_bug.cgi?id=773861
2016-11-03 15:42:29 +02:00
Havard Graff
78ab8cbdcd rtph263ppay: Fix caps leak
Fix leaking caps when downstream has not-fixed caps.

https://bugzilla.gnome.org/show_bug.cgi?id=773515
2016-11-01 20:20:47 +02:00
Tim-Philipp Müller
834339b773 tests: videomixer: disable racy flush_start_flush_stop test
It's been broken for years, and it's unlikely it will ever
be fixed for collectpads/videomixer now that there's compositor
which works fine. So let's disable it, since all it does
is that it creates noise that distracts from other failures.

Also see the corresponding adder bug as it failed in the same way:
 https://bugzilla.gnome.org/show_bug.cgi?id=708891
2016-10-20 22:08:14 +01:00
Jan Alexander Steffens (heftig)
6deab72e10 tests: Fix souphttpsrc tests without CK_FORK=no
It seems that the forked processes all attempt to handle the listening
socket from the server, and only one has to shutdown the socket to break
the server completely.

Create a new server inside each test to avoid this.

https://bugzilla.gnome.org/show_bug.cgi?id=772656
2016-10-20 13:29:07 +03:00
Jan Alexander Steffens (heftig)
22ced681af tests: Fix level test in CK_FORK=no mode
The tests accumulate buffers in GstCheck's buffers list, and the list is
not (consistently) reset between tests. Do that and remove the now
conflicting unrefs for outbuffers.

https://bugzilla.gnome.org/show_bug.cgi?id=772644
2016-10-20 13:23:30 +03:00
Tim-Philipp Müller
e6d188967a tests: fix indentation 2016-09-15 09:53:07 +01:00
Havard Graff
f440b074b1 rtpjitterbuffer: improved rtx-rtt averaging
The basic idea is this:
1. For *larger* rtx-rtt, weigh a new measurement as before
2. For *smaller* rtx-rtt, be a bit more conservative and weigh a bit less
3. For very large measurements, consider them "outliers"
   and count them a lot less

The idea being that reducing the rtx-rtt is much more harmful then
increasing it, since we don't want to be underestimating the rtt of the
network, and when using this number to estimate the latency you need for
you jitterbuffer, you would rather want it to be a bit larger then a bit
smaller, potentially losing rtx-packets. The "outlier-detector" is there
to prevent a single skewed measurement to affect the outcome too much.
On wireless networks, these are surprisingly common.

https://bugzilla.gnome.org/show_bug.cgi?id=769768
2016-09-14 19:37:50 -04:00
Stian Selnes
f8238f0a9f rtpjitterbuffer: Detect whether to assume equidistant spacing when loss
Assuming equidistant packet spacing when that's not true leads to more
loss than necessary in the case of reordering and jitter. Typically this
is true for video where one frame often consists of multiple packets
with the same rtp timestamp. In this case it's better to assume that the
missing packets have the same timestamp as the last received packet, so
that the scheduled lost timer does not time out too early causing the
packets to be considered lost even though they may arrive in time.

https://bugzilla.gnome.org/show_bug.cgi?id=769768
2016-09-14 19:37:50 -04:00
Stian Selnes
2eb7383816 rtpjitterbuffer: Don't request rtx if 'now' is past retry period
There is no need to schedule another EXPECTED timer if we're already
past the retry period. Under normal operation this won't happen, but if
there are more timers than the jitterbuffer is able to process in
real-time, scheduling more timers will just make the situation worse.
Instead, consider this packet as lost and move on. This scenario can
occur with high loss rate, low rtt and high configured latency.

https://bugzilla.gnome.org/show_bug.cgi?id=769768
2016-09-14 19:37:50 -04:00
Stian Selnes
ab49dfd0b2 rtpjitterbuffer: Fix lost duration when gap after lost timer
This patch fixes an issue with the estimated gap duration when there is
a gap immediately after a lost timer has been processed. Previously
there was a discrepancy beteen the gap in seqnum and gap in dts which
would cause wrong calculated duration. The issue would only be seen with
retranmission enabled since when it's disabled lost timers are only
created when a packet is received and the actual gap length and last dts
is known.

https://bugzilla.gnome.org/show_bug.cgi?id=769768
2016-09-14 19:37:50 -04:00
Havard Graff
8087a8a31c rtpjitterbuffer: Improved expected-timer handling when gap > 0
https://bugzilla.gnome.org/show_bug.cgi?id=769768
2016-09-14 19:37:50 -04:00
Stian Selnes
38a7545003 rtpjitterbuffer: Major improvements for RTX stats
Stats should also be collected for unsuccessful packets.

rtx-rtt is very important for determining the necessary configured
latency on the jitterbuffer. It's especially important to be able to
increase the latency when retransmitted packets arrive too late and are
considered lost. This patch includes these late packets in the
calculation of the various rtx stats, making them more correct and
useful.

Also in the case where the original packet arrives after a NACK is sent,
the received RTX packet should update the stats since it provides useful
information about RTT.

The RTT is only updated if and only if all requested retranmissions are
received. That way the RTT is guaranteed to make sense. If not we don't
know which request the packet is a response to and the RTT may be bogus.
A consequence of this patch is that RTT is not updated for a request
when one of the RTX packets for that seqnum is lost, but that since
measured RTT will be more accurate.

The implementation store the RTX information from the timed out timers
and use this when the retransmitted packet arrives. For performance
these timers are stored separately from the "normal" timers in order to
not impact performance (see attached performance test).

https://bugzilla.gnome.org/show_bug.cgi?id=769768
2016-09-14 19:37:50 -04:00
Havard Graff
1b868cc9b1 rtpjitterbuffer: Add and expose more stats and increase testing of it
Add num-pushed and num-lost.
Expose num-late, num-duplicates and avg-jitter.

https://bugzilla.gnome.org/show_bug.cgi?id=769768
2016-09-14 19:37:50 -04:00
Josep Torra
d40f007d61 gitignore: ignore qtdemux, rtph261 and rtpvp9 tests 2016-08-26 21:32:07 +02:00
Josep Torra
ccc7d7e5a3 tests: remove a wrong 'const' specifier
Fixes "error: duplicate 'const' declaration specifier"
2016-08-26 21:14:47 +02:00
Stian Selnes
8bf77e34f2 rtpvp9depay: Support flexible mode 2016-08-26 11:57:15 -04:00
Stian Selnes
195d181828 vp9enc: Fix leak of vpx_image_t 2016-08-26 11:57:15 -04:00
Stian Selnes
5f3b570d53 rtph263pdepay: Don't try to push empty frame
If the result of depayloading is an empty frame, just drop it. This is
likely the result of a buggy payloader.
2016-08-26 11:57:15 -04:00
Stian Selnes
11b7575cff rtph263pdepay: Fix picture header for non-writable payload
Under certain conditions gst_rtp_buffer_get_payload() returns a copy of
the payload. In this case the payload modifications will not affect the
rtp buffer. So instead of modifying the payload buffer directly we
should modify the buffer that actually gets pushed on the adapter.
2016-08-26 11:53:22 -04:00
Stian Selnes
793327cce2 rtph261depay: Fix check of valid payload length
Packets with no H.261 payload should be dropped to avoid invalid
write/reads.
2016-08-26 11:53:22 -04:00
Stian Selnes
64f9d08d3d rtph263pay: Fix double free, invalid reads and leak 2016-08-26 11:53:22 -04:00