Commit graph

960 commits

Author SHA1 Message Date
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
Mikhail Fludkov
880f494050 tests/rtprtx: refactor the tests to use gstharness
The functionality of all the tests was kept exactly the same. Some tests
were renamed:
test_push_forward_seq -> test_rtxsend_rtxreceive
test_drop_one_sender -> test_rtxsend_rtxreceive_with_packet_loss
test_drop_multiple_sender -> test_multi_rtxsend_rtxreceive_with_packet_loss

test_rtxreceive_data_reconstruction was testing that retransmitted
buffer produced by rtxsend was correctly transformed to the original
buffer by rtxreceive. Now we are checking for this in all the tests
where both rtxsend & rtxreceive are involved. That's why the test was
removed.
2016-08-25 18:21:10 -04:00
Sebastian Dröge
a1eefe23de rtpjitterbuffer: Fix unit test by disabling adaptive misorder/dropout calculations
Need to set max-misorder-time and max-dropout-time to 0 so the
jitterbuffer does not base them on packet rate calculations.
If it does, out gap is big enough to be considered a new stream and
we wait for a few consecutive packets just to be sure

https://bugzilla.gnome.org/show_bug.cgi?id=751311
2016-08-18 09:58:58 +03:00
Guillaume Desmottes
7da2bac2e3 tests: qtdemux: fix element and pad leak
https://bugzilla.gnome.org/show_bug.cgi?id=768739
2016-07-18 10:54:59 +01:00
Guillaume Desmottes
94232da665 tests: fix bus leaks
gst_bus_add_signal_watch() takes a ref on the bus which should be
released using gst_bus_remove_signal_watch().

https://bugzilla.gnome.org/show_bug.cgi?id=768739
2016-07-18 10:53:19 +01:00
Jonas Holmberg
833c530553 rtph265pay: Accept array_completeness=1
When parsing NAL unit type in codec_data, check the 6bits of
NAL_unit_type only and do not require the array_completeness bit to be
0, since the default and mandatory value of array_completeness is 1 for
hvc1.

https://bugzilla.gnome.org/show_bug.cgi?id=768653
2016-07-11 11:49:41 +03:00
Jonas Holmberg
a06152c40a rtph265pay/depay: Sync against RFC 7798
Handle sprop-vps, sprop-sps and sprop-pps in caps instead of
sprop-parameter-sets.

rtph265pay works with byte-stream and hvc1 formats but not hev1 yet. It
handles profile-id, tier-flag and level-id in caps query.

https://bugzilla.gnome.org/show_bug.cgi?id=753760
2016-07-07 14:59:50 +03:00
Sebastian Dröge
6289280535 qtmux: Use complete AAC caps with codec_data in the tests 2016-07-04 17:45:40 +02:00
Edward Hervey
e3923df800 qtdemux: Handle upstream GAP in push-mode/time segment
This is to handle cases where upstream handles the fragmented streaming in TIME
segments and sends us data with gaps within fragments. This would happen when dealing
with trick-modes.

When upstream (push-based, TIME SEGMENT) wishes to send discontinuous samples,
it must obey the following rules:
* The buffer containing the [moof] must have a valid GST_BUFFER_OFFSET
* The buffers containing the first sample after a gap:
 * MUST start at the beginning of a sample,
 * MUST have the DISCONT flag set,
 * MUST have a valid GST_BUFFER_OFFSET relative to the beginning of the fragment.

https://bugzilla.gnome.org/show_bug.cgi?id=767354
2016-07-01 14:21:04 +02:00
Tim-Philipp Müller
c68b7f944a tests: splitmux: skip tests if theora or ogg plugins are not available
https://bugzilla.gnome.org/show_bug.cgi?id=767861
2016-06-21 17:54:21 +01:00
Guillaume Desmottes
6ae9c23fa3 fix buffer leaks in tests
Need to call gst_check_drop_buffers() to release the buffers exchanged
during the test.

https://bugzilla.gnome.org/show_bug.cgi?id=766561
2016-06-21 10:51:08 +03:00
Guillaume Desmottes
fb41b307a6 interleave: fix message leaks in test
Flush the bus when cleaning up so pending messages are destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=766561
2016-06-21 10:51:08 +03:00
Guillaume Desmottes
23c8f7128b videomixer: fix event leaks in test
https://bugzilla.gnome.org/show_bug.cgi?id=766561
2016-06-21 10:51:08 +03:00
Guillaume Desmottes
c7621e24ec deinterleave: fix leaks
- Flush the bus so messages aren't leaked
- Fix pad leak

https://bugzilla.gnome.org/show_bug.cgi?id=766561
2016-06-21 10:51:08 +03:00
Guillaume Desmottes
57eb9fec72 tests: rtpbin: fix caps leak
https://bugzilla.gnome.org/show_bug.cgi?id=767156
2016-06-02 14:19:02 +01:00
Guillaume Desmottes
507e99cb96 tests: amrparse: clean up test
- use GST_CHECK_MAIN() to reduce boilerplate
- unref the input caps using a teardown function to prevent leaks

https://bugzilla.gnome.org/show_bug.cgi?id=767156
2016-06-02 14:18:53 +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
Thiago Santos
79e52b9f81 tests: souphttpsrc: replace deprecated API
Avoid using soup_server_run_async and old get_port() APIs,
replace with me soup_server_listen and get the port through the
URIs list returned from the server.
2016-05-14 08:40:12 -03:00
Havard Graff
8f7962e1c3 rtpjitterbuffer: Fix stall when receiving already lost packet
When a packet arrives that has already been considered lost as part of a
large gap the "lost timer" for this will be cancelled. If the remaining
packets of this large gap never arrives, there will be missing entries
in the queue and the loop function will keep waiting for these packets
to arrive and never push another packet, effectively stalling the
pipeline.

The proposed fix conciders parts of a large gap definitely lost (since
they are calculated from latency) and ignores the late arrivals.

In practice the issue is rare since large gaps are scheduled immediately,
and for the stall to happen the late arrival needs to be processed
before this times out.

https://bugzilla.gnome.org/show_bug.cgi?id=765933
2016-05-06 14:32:42 +03:00
George Kiagiadakis
c0dd2029e9 tests: add splitmuxsrc test for new "format-location" signal
https://bugzilla.gnome.org/show_bug.cgi?id=753625
2016-05-05 10:53:23 +01:00
Tim-Philipp Müller
03e2655f70 tests: add unit test for jpeg depayloader packet loss handling
Make sure it always outputs something that looks like a valid
JPEG frame, ie. starts with an SOI marker and ends with an EOI
marker.
2016-04-04 17:42:03 +01: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
Thiago Santos
d738fa0787 splitmuxsink: only try to create internal sink if it doesn't exist
This allows splitmuxsink to be reused after being put to NULL.

Test included

https://bugzilla.gnome.org/show_bug.cgi?id=762893
2016-03-24 20:10:25 -03:00
Edward Hervey
c4f06420b3 check: Fix indentation 2016-03-24 16:22:31 +01:00
Edward Hervey
f0a27084f9 tests: Remove unused variables 2016-03-24 16:22:28 +01:00
Vivia Nikolaidou
02a932d789 deinterlace: Added unit tests for field=auto
https://bugzilla.gnome.org/show_bug.cgi?id=763869
2016-03-24 14:34:11 +02:00
Havard Graff
bcbb8fc1da flvdemux: don't emit pad-added until caps are ready
In other words, gst_pad_get_current_caps should never return NULL
in a pad-added callback from the demuxer.

Added tests for the two special cases with AAC and H.264 where this
would happen every time.

https://bugzilla.gnome.org/show_bug.cgi?id=763780
2016-03-24 14:33:33 +02:00
Vineeth TM
1071309870 good: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763076
2016-03-24 14:32:20 +02:00
David Buchmann
2b8b5f2246 flvmux: Test to verify flvmux handles DTS with GST_CLOCK_TIME NONE
https://bugzilla.gnome.org/show_bug.cgi?id=762207
2016-03-24 14:30:21 +02:00
Tim-Philipp Müller
a4d64b5caa rgvolume: make tag list writable before modifying it
Making the event itself writable is not enough, it won't make
the actual taglist in the event writable as well. Instead, just
make a copy of the taglist and then create a new tag event from
that if required, replacing the old one. Before we would
inadvertently modify taglists upstream elements might still
be holding on to. Add unit test for this as well.

https://bugzilla.gnome.org/show_bug.cgi?id=762793
2016-02-28 14:44:39 +00:00
Tim-Philipp Müller
7335d03070 tests: fix indentation 2016-02-19 14:44:11 +00:00
Havard Graff
69436d5a61 tests: rtpjitterbuffer: port testharness to GstHarness and cleanup/improve
Probably found a bug as well, in that there are some timestamps in
there that are looking very wrong. (marked with FIXME)

https://bugzilla.gnome.org/show_bug.cgi?id=762267
2016-02-19 14:44:02 +00:00
Havard Graff
d52765fabb tests: rtpjitterbuffer: test cleanups/improvements
Use fail_unless and friends instead of g_assert
Factor seq-num checking out to separate function
Check more return-values from push and crank and others

https://bugzilla.gnome.org/show_bug.cgi?id=762254
2016-02-19 11:26:45 +00:00
Stian Selnes
fb4c2909ca tests: rtpjitterbuffer: fix leaks in unit test
https://bugzilla.gnome.org/show_bug.cgi?id=762214
2016-02-19 11:07:52 +00:00
Stian Selnes
3eeca9c7d2 rtpjitterbuffer: Add test for big seqnum gap handling
Make sure that the packets queued when detecting a big gap are pushed
after reset (5 consective seqnums) and not dropped.

https://bugzilla.gnome.org/show_bug.cgi?id=762211
2016-02-18 09:39:01 +02:00
Tim-Philipp Müller
52bd182e98 tests: fix mpg123audiodec test for big-endian architectures 2016-02-16 10:40:39 +00:00
Sebastian Dröge
265ecb5171 mpg123audiodec: Fix event handling in unit test 2016-02-16 10:40:39 +00:00
Vineeth TM
03e40efb65 tests: rtpmux: Fix element memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=762057
2016-02-15 09:55:30 +00:00
Sebastian Dröge
5d728b3ce5 deinterlace: Add negotiation unit tests for all 4 modes
These now check the output caps based on the input caps and a following
capsfilter and make sure the caps are exactly as expected.

https://bugzilla.gnome.org/show_bug.cgi?id=760995
https://bugzilla.gnome.org/show_bug.cgi?id=720388
2016-01-27 16:45:29 +01:00
Sebastian Dröge
98fddf090c rganalysis: Fix compiler warnings in the unit test
elements/rganalysis.c:919:66: error: shifting a negative signed value is undefined
      [-Werror,-Wshift-negative-value]
  push_buffer (test_buffer_const_int16_stereo (8000, 16, 512, -1 << 14, 0));
                                                              ~~ ^
elements/rganalysis.c:929:69: error: shifting a negative signed value is undefined
      [-Werror,-Wshift-negative-value]
  push_buffer (test_buffer_const_int16_stereo (8000, 16, 512, 0, -1 << 14));
                                                                 ~~ ^
elements/rganalysis.c:939:64: error: shifting a negative signed value is undefined
      [-Werror,-Wshift-negative-value]
  push_buffer (test_buffer_const_int16_mono (8000, 16, 512, -1 << 14));
                                                            ~~ ^
2016-01-08 15:32:47 +02:00
Reynaldo H. Verdejo Pinochet
0b234c9b54 tests: souphttpsrc: grammar fix 2015-12-01 11:27:17 -08:00
Reynaldo H. Verdejo Pinochet
f9b5271694 tests: souphttpsrc: switch shoutcast stream provider
Fixes failing ICY test. Previous provider has
streaming disabled outside UK.

https://bugzilla.gnome.org/show_bug.cgi?id=758114
2015-12-01 11:27:17 -08:00
Tim-Philipp Müller
3026d1094b rtph264pay: change config-interval property type from uint to int
This way we can use -1 as special value, which is nicer than MAXUINT.
This is backwards compatible even with the GValue API, as shown by
a unit test.

https://bugzilla.gnome.org/show_bug.cgi?id=757892
2015-11-27 12:48:09 +00:00
Josep Torra
f8b9360dad tests: rtp-payloading: Test for handling of custom events in rtpgst
Add a simple test that checks proper serialization/deserialization
of custom events with rtpgstpay and rtpgstdepay.
2015-11-17 17:24:28 -08:00
George Kiagiadakis
a4c8bdfb3c tests/check/splitmux: test that the release_pad vfunc of splitmuxsink actually releases pads
https://bugzilla.gnome.org/show_bug.cgi?id=753622
2015-10-28 22:39:44 +11:00
Thiago Santos
cf830a55b1 tests: deinterlace: fix small typo in comment 2015-10-25 10:55:55 -03:00
Havard Graff
240b0ac9f6 flvdemux: output speex vorbiscomment as a GstTagList
This is what speexdec expects.

https://bugzilla.gnome.org/show_bug.cgi?id=755478
2015-10-11 11:12:27 +01:00
Havard Graff
b6f133ba17 flvmux: GST_BUFFER_OFFSETs should be GST_BUFFER_OFFSET_NONE
Or else flvdemux don't understand it

https://bugzilla.gnome.org/show_bug.cgi?id=754435
2015-10-11 11:10:20 +01:00
Havard Graff
cf3a2294da flvmux: use time segment and copy timestamps when streamable
Add a basic test using speex data to verify timestamping.

https://bugzilla.gnome.org/show_bug.cgi?id=754435
2015-10-11 11:09:08 +01:00
Havard Graff
d5e26ab909 gstrtpmux: allow the ssrc-property to decide ssrc on outgoing buffers
By not doing this, the muxer is not effectively a rtpmuxer, rather a
funnel, since it should be a single stream that exists the muxer.

If not specified, take the first ssrc seen on a sinkpad, allowing upstream
to decide ssrc in "passthrough" with only one sinkpad.

Also, let downstream ssrc overrule internal configured one

We hence has the following order for determining the ssrc used by
rtpmux:

0. Suggestion from GstRTPCollision event
1. Downstream caps
2. ssrc-Property
3. (First) upstream caps containing ssrc
4. Randomly generated

https://bugzilla.gnome.org/show_bug.cgi?id=752694
2015-10-02 17:39:06 -04:00
Thiago Santos
5c7b051b90 deinterleave: implement accept-caps
Avoid using default accept-caps handler that will query downstream
and is more expensive. Just check if the caps is compatible with
the template and check if the channels are the same.
2015-09-30 17:35:33 -03:00
Thiago Santos
c0c8d503da tests: deinterleave: also check for caps query results 2015-09-30 12:48:30 -03:00
Tim-Philipp Müller
81a76853cf tests: gdkpixbufoverlay: add minimal unit test
https://bugzilla.gnome.org/show_bug.cgi?id=755773
2015-09-29 11:15:35 +01: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
Stefan Sauer
22443b2eed level: improve the test for multi-channel mode
Change the test to verify the read-index for multiple messages per buffer.
See https://bugzilla.gnome.org/show_bug.cgi?id=754144
2015-08-31 13:57:33 +02:00
Tim-Philipp Müller
dd1bd2beb3 tests: souphttpsrc: don't try to connect to dead radio server 2015-08-21 11:52:19 +01:00
Thiago Santos
2b1db23175 tests: aacparse: use caps query instead of accept-caps
The accept-caps query just does a shallow check at the current
element while at this test we want it to also look at downstream.
So use caps query there.

https://bugzilla.gnome.org/show_bug.cgi?id=753623
2015-08-14 13:42:27 -03:00
Thiago Santos
dac431ef3f tests: rtpaux: use a dynamic pt in the test
1) Tests that using dynamic PT instead of the default ones work
2) If we ever decide to change the codec here we don't need to
   worry about change the PT for the default one of the new codec
   in the test

https://bugzilla.gnome.org/show_bug.cgi?id=746445
2015-08-06 01:39:43 -03:00
Thiago Santos
5f9e5bf385 tests: rtpaux: fix test failure
The RTP PT for alaw is 8.
Less than 50 packets are received in the length of this test so it
would never drop a buffer or would drop only the last buffer and
it would fail sometimes when the received wouldn't receive the
retransmission packet in time.

https://bugzilla.gnome.org/show_bug.cgi?id=746445
2015-08-04 18:25:29 -03:00
Tim-Philipp Müller
c1382e97fa tests: add minmal matroskademux test for subtitle output
Some of the subtitle chunks will have embedded
NUL-terminators (last three), some don't (first three),
some will have markup, some won't, some will be valid
UTF-8 (all but last), some won't (last stanza).

https://bugzilla.gnome.org/show_bug.cgi?id=752421
2015-07-21 14:25:12 +01:00
Havard Graff
764bbf99a8 rtpmux: handle different ssrc's on sinkpads
Do this by not putting the ssrc from the src pads in the caps used to
probe other sinkpads, and then  intersecting with it later.

https://bugzilla.gnome.org/show_bug.cgi?id=752491
2015-07-16 16:46:11 -04:00
Thiago Santos
a1bee6eb46 gitignore: ignore rtph263 test 2015-07-09 09:26:09 -03:00
Thiago Santos
241e0c2722 rtpjitterbuffer: fix build error with gcc (Debian 4.9.2-21) 4.9.2
Replace static constants with macros to make gcc happy

  CC       elements/elements_rtpjitterbuffer-rtpjitterbuffer.o
elements/rtpjitterbuffer.c:387:1: error: initializer element is not constant
 static const GstClockTime PCMU_BUF_DURATION = PCMU_BUF_MS * GST_MSECOND;
 ^
elements/rtpjitterbuffer.c:388:1: error: initializer element is not constant
 static const guint PCMU_BUF_SIZE = 64000 * PCMU_BUF_MS / 1000;
 ^
elements/rtpjitterbuffer.c:390:5: error: initializer element is not constant
     PCMU_BUF_CLOCK_RATE * PCMU_BUF_MS / 1000;
2015-07-08 23:49:12 -03:00
Thiago Santos
3edf9e4f58 rtpjitterbuffer: run indent and fix some comments
Fix indent on this file and break some comment lines into two to make
it fit 80 chars per line
2015-07-08 23:49:09 -03:00
Havard Graff
ddd032f56b rtpjitterbuffer: fix gap-time calculation and remove "late"
The amount of time that is completely expired and not worth waiting for,
is the duration of the packets in the gap (gap * duration) - the
latency (size) of the jitterbuffer (priv->latency_ns). This is the duration
that we make a "multi-lost" packet for.

The "late" concept made some sense in 0.10 as it reflected that a buffer
coming in had not been waited for at all, but had a timestamp that was
outside the jitterbuffer to wait for. With the rewrite of the waiting
(timeout) mechanism in 1.0, this no longer makes any sense, and the
variable no longer reflects anything meaningful (num > 0 is useless,
the duration is what matters)

Fixed up the tests that had been slightly modified in 1.0 to allow faulty
behavior to sneak in, and port some of them to use GstHarness.

https://bugzilla.gnome.org/show_bug.cgi?id=738363
2015-07-08 23:18:48 +03:00
Stian Selnes
8a0dbff3f4 rtph263depay: Make sure payload is large enough
Plus new unit test.

https://bugzilla.gnome.org/show_bug.cgi?id=752112
2015-07-08 11:36:55 +01:00
Tim-Philipp Müller
4ed4d0b84c tests: rtp-payloading: add basic unit test for KLV payloading
Also make it so that the mtu is always set if specified, not
only in case of the rather weird bufferlist test code path.
This allows us to easily make the payloader fragment a payload
across multiple output packets by setting a small MTU on it.
2015-07-07 20:11:28 +01:00
Stian Selnes
ef8d630a59 rtp: add H.261 RTP payloader and depayloader
Implementation according to RFC 4587.

Payloader create fragments on MB boundaries in order to match MTU size
the best it can. Some decoders/depayloaders in the wild are very strict
about receiving a continuous bit-stream (e.g. no no-op bits between
frames), so the payloader will shift the compressed bit-stream of a
frame to align with the last significant bit of the previous frame.

Depayloader does not try to be fancy in case of packet loss. It simply
drops all packets for a frame if there is a loss, keeping it simple.

https://bugzilla.gnome.org/show_bug.cgi?id=751886
2015-07-03 11:48:41 +01:00
Sebastian Dröge
3df0cce65d rtpjitterbuffer: If possible, always update the current time before looping over all timers
If we have a clock, update "now" now with the very latest running time we have.
If timers are unscheduled below we otherwise wouldn't update now (it's only updated
when timers expire), and also for the very first loop iteration now would otherwise
always be 0.

Also the time is used for the timeout functions, e.g. to calculate any times
for the next timeouts and we would otherwise pass too old times there.

https://bugzilla.gnome.org/show_bug.cgi?id=751636
2015-07-02 16:45:59 +02:00
Nicolas Dufresne
db63796fd3 qtmux: Correctly test each segments
In presence of gaps, qtdemux will emit multiple segments. The
second segment start should match the CTTS.

https://bugzilla.gnome.org/show_bug.cgi?id=751361
2015-06-23 22:34:36 -04:00
Nicolas Dufresne
89104e35bf qtmux: Test gaps at start of stream
https://bugzilla.gnome.org/show_bug.cgi?id=751242
2015-06-22 17:45:30 -04:00
Thiago Santos
74dcd85de4 tests: qtmux: test for muxing with DTS outside the segment
https://bugzilla.gnome.org/show_bug.cgi?id=740575
2015-06-12 17:18:24 -04:00
Jan Schmidt
c16c381a89 tests: Update mp4 mux test for mdat placeholder change
The mp4 muxer now writes a place-holder mdat as a free
atom followed by a 0-byte mdat that covers the rest of the
file, making it possible to rewrite it as 64-bit, or leave
it as-is if nothing else is written afterward
2015-06-08 14:49:11 +10: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
Mark Nauwelaerts
692df969ea tests: wavpackparse: fix unit test
See also https://bugzilla.gnome.org/show_bug.cgi?id=738237
2015-05-10 14:22:43 +02:00
Sebastian Dröge
91c8688ed7 rtpjitterbuffer: Fix RTX unit test
The calculations were a bit off everywhere, even before the changes done
recently to the delay for RTX of expected future packets. It only worked by
accident, but now the calculations are all correct again. Hopefully.
2015-04-27 16:37:23 +02:00
Thiago Santos
9f7c659ff0 tests: qtmux: add tests to verify it handles non-0 segments
Both input streams in this test have a segment.start = 10s, so
output should start from 0 anyway.

Another test has both starting at non-0 segments, but the running
time of both streams should still start from 0
2015-04-10 10:05:24 -03:00
Thiago Santos
48c5c0c5b3 tests: qtmux: simple muxing test
Adds a new simple test that verifies that data is properly muxed
and preserved.  PTS, DTS, duration and caps are verified.
2015-04-10 10:05:24 -03:00
Ravi Kiran K N
a833084320 tests: add test suite for alpha
Added test suite for alpha element with test cases
1. alpha
2. chroma keying

https://bugzilla.gnome.org/show_bug.cgi?id=747595
2015-04-10 10:20:03 +01:00
Jan Schmidt
a51073c7de tests: Fix rtprtx test by handling buffer lists
Commit #1018aa made rtprtxsend handle buffer lists, breaking
the test which probes for buffers, but not buffer lists.

Use a utility function to run the probe callback on each buffer
in the list in turn and remove any buffers that are dropped.
2015-04-09 12:58:04 +10:00
Thiago Santos
00e5d90ffc tests: multifile: increment tests to check for multifile messages
Also verify that the multifilesink file messages are being correctly
posted to the bus
2015-04-04 11:45:07 -03:00
Thiago Santos
4bba05339c tests: multifile: handle FIXME for proper checking when test finished
Use a GstBus and wait for EOS to finish the tests instead of
relying on sleeping
2015-04-04 07:58:44 -03:00
Jan Schmidt
3d59b5f814 isomp4: Make non-seekable downstream an error in normal mode
When not in fast-start or fragmented mode, we need to be able
to rewrite the size of the mdat atom, or else the output just
won't be playable - the mdat placeholder with size == 0 will
cover the rest of the file, including any moov atom we write out.

https://bugzilla.gnome.org/show_bug.cgi?id=708808
2015-04-03 23:07:04 +11:00
Sebastian Rasmussen
cf54d4cc67 rtph263pay/-depay: add framesize SDP attribute
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=726416
2015-04-02 19:38:21 -04:00
Wim Taymans
13804eab7d check: add jitterbuffer unit test
See https://bugzilla.gnome.org/show_bug.cgi?id=745539
2015-03-06 11:40:53 +01:00
Nicolas Dufresne
96b218d939 splitmux-test: Parse error message
The test had a function to print the error, but was not parsing it.
This was causing warning about dbg_info being used uninitialized. If
the test was testing any errors, this would have crashed.
2015-02-15 21:45:24 -05:00
Jan Schmidt
8ceb58122e splitmux: Add unit test for file splitting
Add a unit test for file splitting, and fix the leaks in the
splitmuxsink it found
2015-02-07 03:58:30 +11:00
Jan Schmidt
aa4c29c5d6 splitmux: Fix memory leaks until the test valgrinds clean 2015-02-07 00:19:36 +11:00
Jan Schmidt
5e2214d309 splitmux: Implement new elements for splitting files at mux level.
Implement 2 new elements - splitmuxsink and splitmuxsrc.

splitmuxsink is a bin which wraps a muxer and takes 1 video stream,
plus audio/subtitle streams, and starts a new file
whenever necessary to avoid overrunning a threshold of either bytes
or time. New files are started at a keyframe, and corresponding audio
and subtitle streams are split at packet boundaries to match
video GOP timestamps.

splitmuxsrc is a corresponding source element which handles
the splitmux:// URL and plays back all component files,
reconstructing the original elementary streams as it goes.
2015-02-06 04:26:59 +11:00
Thiago Santos
59431f663a tests: souphttpsrc: update ssl key/cert pair
Our ones were expired. The new ones were copied from libsoup's
tests files.

Also sets the property to use our own cert to validate the
server, otherwise the default system certs would be used
and it would fail.
2015-02-04 21:37:50 -03:00
Tim-Philipp Müller
d67da4c8ae tests: rtpcollision: use alawenc/dec in these tests instead of Speex
They should always be built, while the speex elements are not.

Need to check for a smaller number of buffers then (7->4) because
speexenc will add 3 header buffers while alawenc will just output
as many buffers as it receives as input.

https://bugzilla.gnome.org/show_bug.cgi?id=742098
2014-12-30 17:19:59 +00:00
Tim-Philipp Müller
d416336a6e tests: rtpaux: use alawenc/dec in these tests instead of Speex
They should always be built, while the speex elements are not.

https://bugzilla.gnome.org/show_bug.cgi?id=742098
2014-12-30 14:58:02 +00:00
Tim-Philipp Müller
da51a99403 tests: don't use deprecated property in level unit test 2014-11-02 16:58:30 +00:00
Sebastian Dröge
543c8772cb aacparse: Fix unit test now that we always have profile/level in the caps 2014-10-27 11:08:40 +01:00
Tim-Philipp Müller
146702e226 tests: fix rgvolume test on big-endian systems 2014-10-25 11:09:57 +01:00
Tim-Philipp Müller
e6f6d9045c tests: fix mulawdec/mulawenc test for big endian systems 2014-10-25 11:09:57 +01:00
Sjoerd Simons
0ee384b251 rtpmux: Don't set PROXY_CAPS flag on the src pad
rtpmux behaves like a funnel in that it forwards whatever upstream is
sending buffers. So setting proxy caps doesn't make sense as the
upstream don't have to have compatible caps, thus resulting in an empty
caps set as a result of a caps query. Instead set fixed caps just
as funnel does.

https://bugzilla.gnome.org/show_bug.cgi?id=738722
2014-10-21 10:52:00 +02:00
Olivier Crête
155ed569c3 rtpdtmfsrc: clock-base and seqnum-base -> timestamp-offset and seqnum-offset
These were renamed in GstRTPBasePayload in 1.0
2014-10-10 18:12:32 -04:00
Olivier Crête
b3069634bd rtpmux: clock-base and seqnum-base -> timestamp-offset and seqnum-offset
These were renamed in GstRTPBasePayload in 1.0
2014-10-10 18:12:23 -04:00
Edward Hervey
5765db50a1 check/soup: Temporarily disable G_ENABLE_DIAGNOSTIC
The SOUP_SERVER_PORT property has been deprecated in recent libsoup
versions.
2014-09-23 09:48:27 +02:00
Edward Hervey
9e47ea2dc8 check/soup: Define minimum version required
To avoid deprecation warnings
2014-09-23 09:48:27 +02:00
Tim-Philipp Müller
d9a7954dc9 tests: udpsrc: add check to make sure multiple memory chunks are used 2014-09-09 17:42:02 +01:00
Tim-Philipp Müller
5c76255bc1 tests: udpsrc: wait for buffers with GCond instead of sleeping
Avoids half-second sleep for no reason.
2014-09-09 17:42:02 +01:00
Tim-Philipp Müller
7b1774513e tests: udpsrc: split out socket setup 2014-09-09 17:42:02 +01:00
Thiago Santos
0430ea87a3 tests: vp8dec: add test for caps renegotiation
Check that vp8dec can properly accept a new caps when upstream
changes it

https://bugzilla.gnome.org/show_bug.cgi?id=734266
2014-09-02 01:01:43 -03:00
Mark Nauwelaerts
6ea83d97c5 tests: rtp-payloading: adjust test data to avoid NAL chopping
... and correspondingly unexpected buffer sizes.
2014-08-10 12:32:38 +02:00
Philippe Normand
b8b5704445 interleave: set output caps layout to interleaved
Set output caps layout independently from input caps layout which can
be either non-interleaved or interleaved.

https://bugzilla.gnome.org/show_bug.cgi?id=733866
2014-07-29 11:49:32 +02:00
Tim-Philipp Müller
46f6687bf6 tests: qtmux: suppress glib criticals caused by testing deprecated dts methods 2014-07-04 19:46:41 +01:00
Sebastian Dröge
0e13172837 rtpsession: Fix memory leaks in unit test 2014-06-30 00:00:43 +02:00
Tim-Philipp Müller
4edbd4c368 tests: matroskaparse: fail on errors and disable pull mode test
Actually look for error messages on the bus and fail if there
is one before the EOS message. Disable pull mode test which is
pointless as long as matroskaparse only supports push mode
(pull mode support has not been ported over to 1.0).
2014-06-28 17:40:45 +01:00
Ravi Kiran K N
e4f0133cb1 videobox: Add unit test
https://bugzilla.gnome.org/show_bug.cgi?id=732144
2014-06-26 18:52:17 +02:00
Tim-Philipp Müller
f7aeb57858 tests: add udpsink test to check client add/remove 2014-06-24 10:48:39 +01:00
Tim-Philipp Müller
495dfe3c5b tests: port udpsink tests to 1.0
They all seem a bit pointless though.
2014-06-24 10:48:32 +01:00
Tim-Philipp Müller
c7c72c00b1 rtph264pay: push single buffer directly, no need to wrap it in a bufferlist
No point in a buffer list if we just have one single
buffer to push. Fix up unit test to handle that case
as well.
2014-06-18 14:54:58 +01:00
Olivier Crête
4377dfeadd rtprtx: Reset state on each iteration
Otherwise it didn't wait for the test to finish before checking the results.

https://bugzilla.gnome.org/show_bug.cgi?id=728501
2014-06-03 17:59:32 -04:00
George Kiagiadakis
b19c830a1c tests/check: rtpsession: test internal sources timing out 2014-05-14 16:01:50 +02:00
Wim Taymans
b2e1598e4a rtpjitterbuffer: increment accepted packets after loss
When we detect a lost packet, expect packets with higher
seqnum on the input.

Also update the unit test.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=729524
2014-05-09 18:10:32 +02:00
Jason Litzinger
9068e1bb8e Add new test case. 2014-05-09 18:10:32 +02:00
Wim Taymans
5c90f17cf0 shapewipe: no need to activate pads
Activation will happen in the state change
2014-05-09 18:10:31 +02:00
Tim-Philipp Müller
c3bd2bdcf4 tests: fix compilation of souphttpsrc test for libsoup 2.40 for real
https://bugzilla.gnome.org/show_bug.cgi?id=727329
2014-05-07 15:49:39 +01:00
Tim-Philipp Müller
cf94d498e6 tests: fix compilation of souphttpsrc test for libsoup 2.40
SOUP_CHECK_VERSION was only added in 2.41, but we only
depend on 2.40.

https://bugzilla.gnome.org/show_bug.cgi?id=727329
2014-05-07 13:27:10 +01:00
Olivier Crête
985897d8d9 rtpaux/rtprtx: Make tests non-racy
Fix the raciness by iterating on a condition instead of using the gmainloop.
Don't use the EOS as the target, otherwise the retransmission of the last
packets are lost. Also count the retranmissions requests that are dropped.
Check the condition before blocking on the GCond

https://bugzilla.gnome.org/show_bug.cgi?id=728501
2014-05-04 22:37:26 -04:00
Olivier Crête
0742a5a257 rtpmux: Always let upstream chose the ssrc if it wishes 2014-05-04 19:11:03 -04:00
Olivier Crête
2e54d38dd0 rtpsession: Keep local conflicting addresses in the session
As we now replace the local RTPSource on a conflict, it's no longer possible
to keep local conflicts in the RTPSource, so they instead need to be kept
in the RTPSession.

Also fix the rtpcollision test to generate multiple collisions instead of
one by change the address, as otherwise we detected that it was a single one.
2014-05-03 18:30:20 -04:00
Sebastian Dröge
3b5deb2b45 shapewipe: Send initial events after setting the elements to PLAYING
Otherwise we send them too early, and setting the elements to PLAYING
afterwards will drop all the events again.
2014-05-03 11:43:21 +02:00
Sebastian Dröge
2149d5a9bd rtprtx: Don't forget to unmap rtp buffer in the test 2014-04-17 18:07:09 +02:00
Sebastian Dröge
5dba8dfe59 rtprtx: Provide an ssrc in the test
And increase timeout to allow all tests to run in valgrind.
2014-04-17 17:43:12 +02:00
Sebastian Dröge
02d9b5e6f8 rtpsession: Fix memory leaks in test 2014-04-17 17:33:46 +02:00
Sebastian Dröge
02e62c139d rtpjitterbuffer: Fix hundreds of memory leaks in the test 2014-04-17 17:26:36 +02:00
Sebastian Dröge
0c073b2d1d rtpcollision: Fix memory leaks in unit test 2014-04-17 16:39:59 +02:00
Sebastian Dröge
cd4c17031b videomixer: Fix memory leak in unit test 2014-04-16 19:03:47 +02:00
Sebastian Dröge
6c02593386 aacparse: Fix memory leak in the test 2014-04-16 17:35:42 +02:00
Reynaldo H. Verdejo Pinochet
f187d9fc7c tests: souphttpsrc: use SoupKnownStatusCode if needed
From libsoup docs:

Prior to 2.44 SoupStatus was called SoupKnownStatusCode,
but the individual values have always had the names they
have now.

Fixes:
  https://bugzilla.gnome.org/show_bug.cgi?id=727329
2014-04-07 17:48:35 -03:00
Stefan Sauer
ce683b0031 autodetect: improve the tests
Add fake audio/video sinks. Previously running the test might be flaky due to
the use of real elements (hardware in use), which we don't want to test here.
Add two more tests that check that the fakes are chosen.
2014-02-19 21:07:28 +01:00
Stefan Sauer
02e59756a9 autodetect: fix the disabled test
Use a shared helper for both tests. It turns out that the valgrind variant is
fine (maybe due to picking up pulsesink though).
2014-02-19 11:26:22 +01:00
Stefan Sauer
c40e8b1210 autodetect: remove cruft from the test
Remove the obsolete version check and use the ignore macro for the disabled test.
2014-02-19 11:05:35 +01:00
Wim Taymans
6af234e29e tests: fix typecast to fix compilation 2014-02-14 15:53:55 +01:00
Sebastian Dröge
1a78a7eb22 souphttpsrc: Fix implicit enum conversion compiler warning
error: implicit conversion from enumeration type
'SoupStatus' to different enumeration type 'SoupKnownStatusCode'
2014-02-08 17:43:32 +01:00
Sebastian Dröge
ec1899e456 interleave: Fix unitialized variable compiler warning in test
error: variable 'mask' is used uninitialized
whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
2014-02-08 17:41:21 +01:00
Edward Hervey
ceb602073a check: Use fakesink sync=True instead of an audio sink
Ensures the test can run on systems without alsa (or any audio output for
that matter), and will avoid people running build slaves wondering what
the hell was beeping during the night :)
2014-01-29 10:37:53 +01:00
George Kiagiadakis
016e1562a6 tests: rtprtx::test_rtxreceive_data_reconstruction: remove useless code for triggering retransmission
There is no need anymore to push yet another buffer in rtxsend
in order to trigger the previously requested retransmissions
to actually happen.
2014-01-21 15:00:54 +01:00
George Kiagiadakis
184553151d tests: rtprtx::test_rtxreceive_data_reconstruction: fix race condition
Now with rtprtxsend pushing rtx buffers from a different thread,
this is necessary to ensure that the result of the test is deterministic.

This code makes use of GstCheck's global GMutex and GCond that are
being used inside GstCheck's sink pad chain() function in order
to synchronize with it.
2014-01-21 15:00:53 +01:00
George Kiagiadakis
7677aec2fa tests: rtprtx::test_rtxsender_packet_retention: fix race condition
Now with rtprtxsend pushing rtx buffers from a different thread,
this is necessary to ensure that the result of the test is deterministic.

This code makes use of GstCheck's global GMutex and GCond that are
being used inside GstCheck's sink pad chain() function in order
to synchronize with it.
2014-01-21 15:00:53 +01:00
George Kiagiadakis
7011f98d7e tests: rtprtx::test_push_forward_seq: fix race condition
Now with rtprtxsend pushing rtx buffers from a different thread,
this is necessary to ensure that the result of the test is deterministic.

This code makes use of GstCheck's global GMutex and GCond that are
being used inside GstCheck's sink pad chain() function in order
to synchronize with it.
2014-01-21 15:00:53 +01:00
George Kiagiadakis
c702e37091 tests: rtprtx::test_push_forward_seq: fix buffer refcounting 2014-01-21 15:00:53 +01:00
Olivier Crête
8a143dfcbc tests: Remove usage of the system clock from the rtprtx test 2014-01-15 10:13:12 +01:00
Olivier Crête
f0a4f26fa7 tests: Initial segment in rtpcollision test 2014-01-15 10:13:12 +01:00
Stefan Sauer
d1223ebd10 wavparse: split the test
This way one failure won't shadow the other test and also if one fails we get
better disgnostics through the test-name.
2014-01-06 21:13:37 +01:00
George Kiagiadakis
94e4cd203b test/check: Verify rtprtxsend::ssrc-map property works as expected 2014-01-03 20:48:29 +01:00
George Kiagiadakis
9226091235 rtprtxreceive: modify to use a payload-type map like rtprtxsend 2014-01-03 20:48:29 +01:00
Wim Taymans
130ad1b1fa rtprtxsend: Allow SSRC-multiplexing and multiple payload types in the original stream
Conflicts:
	tests/examples/rtp/server-rtpaux.c
2014-01-03 20:48:29 +01:00
Julien Isorce
5f360f3b13 tests/check: add rtpaux::test_simple_rtpbin_aux
It shows how to use "set-aux-receive" and "set-aux-send"
properties of rtpbin to set rtprtxsend and rtprtxreceive

Build 2 pipelines, one for rtpbin as a sender and one for
rtobin as a receive. Then transmit an audio stream.

It also drops some packets to activate restransmission and
check they are actually retransmited.
2014-01-03 20:48:29 +01:00
Julien Isorce
68149d14e1 tests/check: add rtpcollision::test_rtx_ssrc_collision unit test
check that rtxrtpsend changes its retransmission ssrc when
collision happens
2014-01-03 20:48:28 +01:00
George Kiagiadakis
123bc46b60 tests/check: add rtprtx::test_rtxreceive_data_reconstruction
This unit test verifies that retransmitted rtp packets coming out
of rtprtxreceive are the same as the original ones.
2014-01-03 20:48:28 +01:00
George Kiagiadakis
487fa8c989 rtprtxsend: retransmit packets in the same order as the rtx requests 2014-01-03 20:48:28 +01:00
George Kiagiadakis
3e818e218b tests/check: Add unit test for rtxsend's max_size_time property 2014-01-03 20:48:28 +01:00
George Kiagiadakis
f7277db9e4 tests/check: Add rtprtx::test_rtxsender_packet_retention
This unit test verifies that the rtxsend element correctly maintains
a buffer of already transmitted rtp packets and that it can
re-transmit all of them correctly on demand. It also verifies
that the limit of this buffer (max-size-packets property) is respected.
2014-01-03 20:48:28 +01:00
Julien Isorce
71bdb5e088 tests/check: add rtprtx::test_drop_multiple_sender unit test
Several senders / one receiver

Similar than test_drop_one_sender but with multiple senders
mixed through the funnel element.
It drops some packets and checks that they are retransmited
correctly.
2014-01-03 20:48:28 +01:00
Julien Isorce
2a2fa7ebc0 tests/check: add rtprtx::test_drop_one_sender unit test
Test for one sender / one receiver

Build the pipeline
videotestsrc ! rtpvrawpay ! rtprtxsend ! rtprtxreceive ! fakesink
and drop some buffers between rtprtxsend and rtprtxreceive
Then it checks that every dropped packet has been re-sent.
It also checks that not too much requests has been sent.
2014-01-03 20:48:27 +01:00
Julien Isorce
2e4ce28443 tests/check: add rtprtx::test_push_forward_seq
add simple unit test that manually push buffers
in rtprtxsend connected to rtprtxreceive.
Drops some buffers and make sure they are retransmisted.
2014-01-03 20:48:27 +01:00
Wim Taymans
c83ed4f61e tests: add AUX receiver unit test 2013-12-31 15:08:49 +01:00
Wim Taymans
b91e0096b7 tests: improve rtpbin test 2013-12-31 15:08:49 +01:00
Wim Taymans
3e83e6a33d tests: add AUX sender unit test 2013-12-31 15:08:49 +01:00
Wim Taymans
841f9ad050 tests: add decoder test 2013-12-31 15:08:48 +01:00
Wim Taymans
3f3b2d0886 rtpbin: handle multiple encoder instances
Keep track of elements that are added to multiple sessions and make sure
we only add them to the rtpbin once and that we clean them when no
session refers to them anymore.
2013-12-30 16:28:57 +01:00
Wim Taymans
76e4cbc753 tests: add unit test for encoder element 2013-12-30 15:17:05 +01:00
Wim Taymans
bcd1589a91 tests: fix leak 2013-12-30 15:17:05 +01:00
Sebastian Dröge
29840bfd96 wavpackdec: Send a CAPS event in the unit test 2013-12-30 11:07:03 +01:00
Olivier Crête
dc845c1899 tests: Initialize segment in rtpcollision test 2013-12-13 16:05:41 -05: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
Julien Isorce
d562263852 tests/check: improve rtpcollision::test_master_ssrc_collision to ensure that a collision does not BYE the whole session
Conflicts:
	tests/check/elements/rtpcollision.c
2013-12-12 15:39:40 +01:00
Julien Isorce
7b001e35ed tests/check: add rtpcollision::test_master_ssrc_collision unit test
It checks the payloader changes its ssrc when collision happens
2013-12-12 15:39:39 +01:00
Wim Taymans
eee515cb2c rtpjitterbuffer: serialize events in the buffer
Serialize events into the jitterbuffer by inserting them with a -1
seqnum.
Update unit test to expect events from the streaming thread.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=652986
2013-12-10 11:57:37 +01:00
Wim Taymans
e0a5c07e8d audioparsers: use ACCEPT_INTERSECT flag
The parser can accept input that is not completely specified. Use the
ACCEPT_INTERSECT flag on the sinkpad to tweak the acceptcaps function to
check for intersection only. This allows us to proxy downstream
constraints while still allowing non-subset caps as input.
We can then also remove the appended template caps workaround.
Make a unit-test to check the new feature.

This reverts commit 26040ee38c

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=705024
2013-12-03 22:26:44 +01:00
Nicolas Dufresne
77833b886d videoflip: Add unit test for the 'automatic' method
These new tests send a tag event before seding the buffer. Tested case are an
empty tag list, a tag list with orientation-180 set and an invalid orientation value.

https://bugzilla.gnome.org/show_bug.cgi?id=719497
2013-11-28 11:59:05 -05:00
Wim Taymans
29d9b1e7de check: fix jitterbuffer check
Don't advance the clock to 240ms too early.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=710013
2013-11-25 17:39:52 +01:00
Wim Taymans
710d1f3a2a rtpjitterbuffer: improve clear-pt-map handling
Don't reset the expected output seqnum when clearing the pt map because this
could stall the jitterbuffer forever.
Add a unit test for this.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=709800
2013-11-25 15:52:22 +01:00
George Kiagiadakis
387e3b918a rtpjitterbuffer: Fix stats property field names and documentation 2013-11-15 16:23:34 +02:00
Torrie Fischer
22ceb80ba9 rtpjitterbuffer: implement rtx statistics 2013-11-14 09:24:26 +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
Thiago Santos
43602e2d8a tests: souphttpsrc: add explicit cast to silence warning
Silencing this warning:

elements/souphttpsrc.c:533:14: error: comparison between ‘SoupKnownStatusCode’ and ‘enum <anonymous>’ [-Werror=enum-compare]
   if (status != SOUP_STATUS_OK && !send_error_doc)

With gcc 4.8.2 (debian)
2013-10-31 13:22:40 -03:00
Wim Taymans
3c69d65b85 tests: add test for retransmission because of reordering 2013-09-23 14:45:27 +02:00
Wim Taymans
f40d6689f2 tests: remove timeouts from check
Timeouts make the test unreliable and are not needed.
2013-09-23 14:45:26 +02:00
Wim Taymans
a71014518c tests: add test for packet delay and retransmission 2013-09-23 14:45:24 +02:00
Wim Taymans
c959cdc8c1 tests: check both PTS and DTS 2013-09-23 14:45:24 +02:00
Wim Taymans
2e3346eff9 tests: add unit-test for multiple missing packets
Check if multiple missing packets generate retransmission events and that the
retranmission requests are canceled when the missing packet arrives.
2013-09-23 14:45:24 +02:00
Wim Taymans
3b9e2ee5a0 tests: improve debug 2013-09-23 14:45:23 +02:00
Wim Taymans
ee817363c7 tests: add retransmission jitterbuffer test
Store both DTS and PTS on buffers.
Make a queue for srcpad events.
Activate pads after linking so that we don't get RECONFIGURE events.
Add test for retransmission.
2013-09-19 14:32:48 +02:00
Wim Taymans
ee75d4b01e tests: fix comments 2013-09-18 15:08:45 +02:00
Wim Taymans
5c1f2f0045 rtpjitterbuffer: add another test
The test is modified slightly because the late lost packets are only
generated now when a large gap is received.
2013-09-18 14:23:55 +02:00
Wim Taymans
5d5fc03e04 rtpjitterbuffer: round gap duration to multiple of duration
Make sure the gap duration in the lost event is a multiple of the packet
duration.
Enable another test.
2013-09-18 14:12:47 +02:00
Wim Taymans
6e4a051d40 rtpjitterbuffer: keep track of duration
Keep track of the estimated duration of missing packets and use it in the lost
event.
Enable another unit test
2013-09-18 12:29:38 +02:00
Wim Taymans
ac3bb3acf6 rtpjitterbuffer: handle large gaps with one lost event
When we have a large number of missing packets, generate one lost event for all
the packets that have no chance of being pushed out in time.
Fix and activate unit test for large gaps.
2013-09-18 11:59:28 +02:00
David Holroyd
a956a6ceb2 rtp: add L24 pay and depayloader
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=707734
2013-09-09 15:13:46 +02:00
Tim-Philipp Müller
cc4f985332 tests: rganalysis: rename function for clarity 2013-09-02 22:50:58 +01:00
Christoph Reiter
92dde0760b tests: fix skipped rganalysis tests
In 0.10 elements would post tag messages on the bus
directly, and rganalysis would only post a tag message
when it changed tags. In 1.0, only sinks post tag
messages when they receive the serialised tag event.
This means that we get an additional tag message on
the bus now where we didn't expect one before.

https://bugzilla.gnome.org/show_bug.cgi?id=695090
2013-09-02 20:00:29 +01:00
Thibault Saunier
6c349d6ec3 videomixer: Send EOS if buf_end >= segment.stop
That means the whole segment is already played, and we are sure we
are EOS at that point.

Also handle segment seeks, and do not send EOS in that case.
2013-08-11 19:05:18 +02:00
Tim-Philipp Müller
67eb029a50 tests: skip https test if there's no TLS support in soup/glib 2013-08-04 14:32:47 +01:00
Tim-Philipp Müller
7a740479b9 tests: ignore new test binaries 2013-07-29 19:48:54 +01:00
Nicolas Dufresne
01b20ab901 videocrop: Fix unit for GRAY16 formats 2013-07-18 10:54:50 -04:00
Sebastian Dröge
1a11a9be0c rtp: Fail payloading unit test if an error message is received 2013-07-08 14:15:34 +02:00
Stefan Sauer
115b117878 audiopanorama: cleanup and expand the tests
Split out two more tests. Extract more common code into helpers. Add coverage for float.
2013-06-11 21:48:18 +02:00
Stefan Sauer
1602f50195 level: rework the tests to cover other formats too 2013-06-09 20:39:48 +02:00