Commit graph

592 commits

Author SHA1 Message Date
Florin Apostol
397fa37093 dashdemux: tests: corrected code layout
deleted the empty line between gst_mpd_parse call and its check so that
the assert is next to the function it is testing

https://bugzilla.gnome.org/show_bug.cgi?id=752027
2015-07-07 14:01:03 +03:00
Stian Selnes
158f8d5b68 tests: pcapparse: add unit test for frames with eth padding
https://bugzilla.gnome.org/show_bug.cgi?id=751879
2015-07-03 10:28:34 +01:00
Florin Apostol
e2d1126391 dashdemux: corrected recognition of $$$ in segment templates
fixed recognition of $$ after a $ that ends an identifier, eg $Time$$$

https://bugzilla.gnome.org/show_bug.cgi?id=751682
2015-06-29 19:28:56 -03:00
Florin Apostol
87a4d523b9 tests: dashdemux: renamed functions
Renamed 2 testcase functions:
- dash_mpdparser_program_information
- dash_mpdparser_base_URL
2015-06-25 10:13:23 +02:00
Florin Apostol
b8cb37f04d tests: dashdemux: added explicit type conversions
flexelint (http://www.gimpel.com/html/flex.htm) static code analyser
complained about implicit conversions from unsigned to signed, so I added
explicit conversions.

Ideally, the size parameter of gst_mpd_parse function should be unsigned,
but I don't want to change the API.
2015-06-24 12:22:44 +02:00
Florin Apostol
d02f9d30af tests: dashdemux: corrected return type for duration_to_ms function
The duration_to_ms function converts a time specified by year, month, day,
hour, minute, second, millisecond to a millisecond value. Because all the
arguments are positive numbers, the result must also be positive.

This patch changes the returned value from a gint64 to a guint64 type.
2015-06-24 12:22:33 +02:00
Florin Apostol
d310a1edcf tests: dashdemux: added parsing of period element
Improved dash_mpd unit tests by adding new tests that parse the Period element.

Code coverage reported by lcov for dash/gstmpdparser.c is:
  lines......: 43.0% (985 of 2290 lines)
  functions..: 47.5% (67 of 141 functions)
2015-06-22 18:22:57 +02:00
Florin Apostol
05198e2df1 tests: dashdemux: extended MPD element test to test xml namespaces
Extended the dash_mpdparser_mpd testcase to also test parsing the xml
namespace attribute.

https://bugzilla.gnome.org/show_bug.cgi?id=750863
2015-06-22 13:55:46 +02:00
Florin Apostol
8336d7a60b dashdemux: corrected computation of period's duration
According to ISO/IEC 23009-1:2014(E), chapter 5.3.2.1
"The Period extends until the PeriodStart of the next Period, or until
the end of the Media Presentation in the case of the last Period."

This means that a configured value for optional attribute period duration
should be ignored if the next period contains a start attribute or it is
the last period and the MPD contains a mediaPresentationDuration attribute.

https://bugzilla.gnome.org/show_bug.cgi?id=750797
2015-06-22 13:47:54 +02:00
Florin Apostol
9f56cc27ab dashdemux: fixed getting representation based on max bandwidth
The gst_mpdparser_get_rep_idx_with_max_bandwidth function assumes
representations are ordered by bandwidth and incorrectly returns the
first one when wanting the one with minimum bandwidth.

Corrected gst_mpdparser_get_rep_idx_with_max_bandwidth function to get the
correct representation in case max_bandwidth parameter is 0.

https://bugzilla.gnome.org/show_bug.cgi?id=751153
2015-06-18 11:29:45 -03:00
Florin Apostol
b23e4452a2 dashdemux: fixed segfault for missing default namespace
Added a check for a_node->ns before accessing a_node->ns->href in
gst_mpdparser_get_xml_node_namespace. This could happen if the xml
is missing the default namespace.

https://bugzilla.gnome.org/show_bug.cgi?id=750866
2015-06-12 22:45:51 +02:00
Nirbheek Chauhan
220a133479 tests: Add test for the 'ignore-eos' compositor sink pad property
When the 'ignore-eos' property is set on a pad, compositor will keep resending
the last buffer on the pad till the pad is unlinked. We count the buffers
received on appsink, and if it's more than the buffers sent by videotestsrc, the
test passes.
2015-06-12 19:45:41 +01:00
Florin Apostol
8b18be5bfb tests: dashdemux: add unit tests for checking the parsing of MPD element
Create a dash test target and add unit tests that check the parsing of
attributes of the MPD element and the following child elements:
 - baseURL
 - program information
 - location
 - metrics

These tests check the compliance of parts of the MPD parser in the
dashdemux element against the DASH specification [1].

    [1] http://standards.iso.org/ittf/PubliclyAvailableStandards/c065274_ISO_IEC_23009-1_2014_Electronic_inserts.zip
        http://standards.iso.org/ittf/PubliclyAvailableStandards/c065274_ISO_IEC_23009-1_2014.zip

https://bugzilla.gnome.org/show_bug.cgi?id=750390
2015-06-08 13:17:49 -03:00
Stefan Sauer
4243db850c zbar: split test
Lets not cram everything into a single test - this would render the test name
useless for quick diagnosis. Having separate tests for the optional feature is
also verifying the behaviour when the feature is off.
2015-06-07 16:27:13 +02:00
Thiago Santos
045bfa10fe Fix a common typo: retreive -> retrieve
Seems to have been copy pasted around a few places
2015-06-05 09:43:35 -03:00
Olivier Crête
06d9b61fc2 tests: audiointerleave: test not setting positions
Disable "channel-positions-from-input", but without actually giving
a position table, so every position should be NONE
2015-06-02 15:45:13 -04:00
Olivier Crête
8dcb1c6df6 tests: Fix indentation in audiointerleave test 2015-06-02 15:44:57 -04:00
Edward Hervey
e899abea14 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:04:40 +02:00
Reynaldo H. Verdejo Pinochet
8f2b65c74d tests: zbar: check for frame field on attach-frame=true
Also check for the sample to have a buffer and caps
associated with it.

Related to:

https://bugzilla.gnome.org/show_bug.cgi?id=747557
2015-06-01 12:33:41 -03:00
Matthew Waters
c519169052 compositor: fix rectangle obscure test to clamp against the output frame size
Rather than one of the input pad video info's.

The test checking this was not constraining the output frame size
to ensure that the out of frame stream was not being displayed.
2015-05-13 17:44:30 +10:00
Nirbheek Chauhan
105a5cce92 tests: Add a check for the new compositor pad-is-obscured optimization
We verify that all the buffers on an obscured sinkpad are skipped by overriding
the map() function in the GstVideoMeta of the buffers to set a variable when
called. We also test that the buffers do get mapped when they're not obscured.

Blame^WCredit for the GstVideoMeta map() idea goes to Tim.

https://bugzilla.gnome.org/show_bug.cgi?id=746147
2015-05-01 11:57:00 +01:00
Thiago Santos
dd2dba632e tests: camerabin: add tests for GstPhotography image capture
GstPhotography enables new paths in wrappercamerabinsrc that allows
the source to be notified about the capture caps and provide an
alternative caps if desired bypassing the negotiation (this doesn't
seem like a good idea these days). To make sure it keeps working
until we remove it from the API in favor of standard caps negotiation
features this test was added.

It adds 3 extra tests with a simple test source that will:
1) Test that capturing with ANY caps work
2) Test that capturing with a fixed caps work
3) Test that capturing with a fixed caps and having the source
   pick a different resolution from GstPhotography API works
   by having wrappercamerabinsrc crop the capture to the final
   requested dimensions
2015-04-24 15:12:47 -03:00
Thiago Santos
de5f0dd221 camerabin: tests: remove unused macros
Those macros were with the wrong name (likely a copy n paste mistake)
and were unused.
2015-04-24 15:12:46 -03:00
Thiago Santos
7774126c5d tests: camerabin: remove obsolete check for 0.10 feature 2015-04-24 15:12:46 -03:00
Thiago Santos
87e306fe4a tests: camerabin: add test for capture with different caps
Adds a test to verify that viewfinder and image capture caps
can be set to non-intersecting caps and still work.

https://bugzilla.gnome.org/show_bug.cgi?id=724868
2015-04-21 10:00:44 -03:00
Vincent Penquerc'h
d8dd4bea00 tests: fix type mismatch in varargs passing
A bitmask is 64 bits, but integer immediates are passed as int
in varargs, which happen to be 32 bit with high probability.

This triggered a valgrind jump-relies-on-uninitalized-value
report well away from the site, since it doesn't trigger on
stack accesses, and there must have been enough zeroes to stop
g_object_set at the right place.
2015-04-09 16:20:44 +01:00
Olivier Crête
34a921c31b audiomixer: Allow downstream caps with a non-default channel-mask
Instead of failing, take the downstream channel mask if the channel
count is 1.
2015-04-01 20:32:41 -04:00
Olivier Crête
84eff5cca9 audiointerleave: Add unit tests
Almost a copy of the "interleave" unit tests, improved to support
the thread on the src pad on GstAggregator.

https://bugzilla.gnome.org/show_bug.cgi?id=740236
2015-03-16 16:44:03 -04:00
Tim-Philipp Müller
ec6e93d45f tests: mpegtsmux: add test for keyframe/delta flag propagation
The first output MPEG-TS packet that corresponds to a video input
buffer which had the delta flag cleared (i.e. was a keyframe)
should have the delta flag cleared as well.

This is needed e.g. by tcpserversink in order to keep track
of the last keyframe and be able to burst data to newly-
connected clients.

https://bugzilla.gnome.org/show_bug.cgi?id=706872
2015-03-15 15:54:01 +00:00
Tim-Philipp Müller
ab52bfbfa6 tests: mpegtsmux: add unit test for "alignment" property
https://bugzilla.gnome.org/show_bug.cgi?id=722129
2015-03-15 12:07:53 +00:00
Luis de Bethencourt
b383ae0fbd jpegparse: interlaced doesn't mean progressive scan
Removing interlaced variable since it is meant to mean progressive scan
and that isn't used.
2015-02-24 18:50:28 +00:00
Luis de Bethencourt
e45db8ca1e Revert "tests: check jpegparse for progressive marker"
This reverts commit 1c77d12ce8.

"interlaced" in the caps don't mean the same thing as the SOF2 marker in the
JPEG format. This test passes because of broken behaviour.
2015-02-24 18:38:31 +00:00
Luis de Bethencourt
1c77d12ce8 tests: check jpegparse for progressive marker 2015-02-24 17:42:15 +00:00
Alex Ashley
a08dd85608 hlsdemux: select correct starting position for live streams
When playing live HLS streams, the media playback starts from the
beginning of the media playlist. When playing a live HLS stream,
media playback should start from 3 fragments from the end of the
playlist.

See section 6.3.3. of the HLS draft [1]

This commit changes the logic to select 3 fragments from the end when
playing a live stream.

[1] http://tools.ietf.org/html/draft-pantos-http-live-streaming-12#page-29

https://bugzilla.gnome.org/show_bug.cgi?id=727742
2015-02-20 19:00:01 -03:00
Tim-Philipp Müller
9c21327a8d tests: remove GST_DISABLE_PARSE guards from two tests that don't require it 2015-02-13 16:25:14 +00:00
Tim-Philipp Müller
337bff3c82 tests: compositor: add unit test for proper segment.base handling
As adjusted by gst_pad_set_offset(), or when doing segment seeks
or looping for example.
2015-02-05 15:48:41 +00:00
Tim-Philipp Müller
689f627412 tests: audiomixer: add unit test for proper segment.base handling
As adjusted by gst_pad_set_offset(), or when doing segment seeks
or looping for example. See previous audiomixer commit.
2015-02-05 15:23:04 +00:00
Olivier Crête
fb6ba27ae5 audiomixer: Make flush start/stop test non-racy
The flush stop could have happened between the source trying
to push the segment event and the buffer, this would cause a warning.
Prevent that by taking the source's stream lock while flushing.

https://bugzilla.gnome.org/show_bug.cgi?id=742684
2015-01-29 10:24:18 +01:00
Olivier Crête
f98e457f99 audiomixer: Replace racy timeout based tested with drain query
Using the drain query, we can be certain that the buffer has done going
through the aggregator by taking the stream locks.

https://bugzilla.gnome.org/show_bug.cgi?id=742684
2015-01-29 10:24:18 +01:00
Olivier Crête
94e2d78479 audiomixer: Avoid race in caps negotiation
With the current audiomixer, the input caps need to be the same,
otherwise there is an unavoidable race in the caps negotiation. So
enforce that using capsfilters

https://bugzilla.gnome.org/show_bug.cgi?id=742684
2015-01-29 10:24:18 +01:00
Tim-Philipp Müller
ad25461dac tests: gdpdepay: update for internal gdp refactoring
This test uses some internal/private API, so needs to
be updated for recent changes.
2014-12-26 13:44:35 +00:00
Tim-Philipp Müller
c184a4bb04 gdppay: refactor a little
Get rid of now-useless packetizer struct and just
call internal functions directly. Also remove
version property which is now defunct, not least
because we create the packetizer with the
version in the init function before a version
can be set.
2014-12-26 13:44:32 +00:00
Tim-Philipp Müller
3e74746d72 tests: gdppay: initialise memory of buffers used in unit test 2014-12-26 13:44:32 +00:00
Sebastian Dröge
7c575af6df audiomixer: Change blocksize property to output-buffer-duration in time format
This makes the interface of audiomixer independent of the actual caps.
2014-12-23 11:45:50 +01:00
Sebastian Dröge
e82ec36863 audiomixer: Add queues after the (live) sources in the unit test 2014-12-17 18:41:41 +01:00
Olivier Crête
8cddfe6477 rtponviftimestamp: Automatically discover the ntp-offset by default.
This only works if no packets are pushed in before the pipeline goes
to playing. So it helps to have a live source.

https://bugzilla.gnome.org/show_bug.cgi?id=731769
2014-12-11 16:28:43 -05:00
Guillaume Desmottes
189005184c add rtponvifextract element
https://bugzilla.gnome.org/show_bug.cgi?id=731769
2014-12-11 14:00:59 -05:00
Guillaume Desmottes
b424b72df1 add rtponviftimestamp element
https://bugzilla.gnome.org/show_bug.cgi?id=731769
2014-12-11 14:00:59 -05:00
Julien Isorce
91efa58371 tests: add glimagesink unit test to .gitignore 2014-12-03 07:46:50 +00:00
Julien Isorce
7bb1ea7094 gl: add unit test that checks for glimagesink drain query handling
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=732694
2014-11-12 00:09:21 +00:00