Commit graph

807 commits

Author SHA1 Message Date
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
Tim-Philipp Müller
8e2c1d1de5 tests: fix spurious souphttpsrc test timouts
Set GSETTINGS_BACKEND=memory, apparently there's something
about fork() and the dconf backend (or whatever else that
drags in or activates) that messes up locking and causes
timeouts due to deadlocks in g_mutex_lock(), since
everything works fine with CK_FORK=no as well.
2016-02-18 13:46:45 +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
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
Thiago Santos
522de42381 tests: extend the AM_TESTS_ENVIRONMENT from check.mak
To get the CK_DEFAULT_TIMEOUT defined for all tests

https://bugzilla.gnome.org/show_bug.cgi?id=761472
2016-02-05 20:00:57 -03: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
Antonio Ospite
be5f94734a tests: fix a thinko in the wavenc example
The code is supposed to follow somehow what the comment above says, that
is to have one channel with a wave of freq 440 and the other channel
with a wave of freq 880, but an off by one error results in frequencies
of 0 and 440.

https://bugzilla.gnome.org/show_bug.cgi?id=735673
2016-01-12 22:20:33 +00: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
Tim-Philipp Müller
7f112af657 tests: add GST_PLUGINS_BASE_LIBS for flvdemux check
So it pulls in the right libgsttag-1.0.
2015-10-12 18:57:22 +01:00
Edward Hervey
0ece1f0c49 check: Don't forget base CFLAGS for flvdemux check
elements/flvdemux.c:25:25: fatal error: gst/tag/tag.h: No such file or directory
2015-10-11 16:40:01 +02: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
Edward Hervey
933004579d check: Rename states unit test
Makes it easier to differentiate from other modules states unit test
2015-08-14 11:13:01 +02: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