Commit graph

698 commits

Author SHA1 Message Date
Branko Subasic
fd0ca0a972 rtponvif: split unit tests in several files
Split the unit tests for rtponviftimestamp and rtponvifparse
elements in separate files.
Setup and cleanup the element and pads in fixures. Make the tests work
with CK_FORK=no as well, by cleaning up the 'buffers' list when needed.
Make unit tests work when run in valgrind by unreffing all buffers,
and by not allocating any payload in RTP buffers. Since we're not
doing anything with the payload part, but we're memcmp-aring the
complete buffer memory, valgrind complained about non-initialized
memory being used.

https://bugzilla.gnome.org/show_bug.cgi?id=757688
2015-11-06 12:55:25 -05:00
Sebastian Dröge
0b9aea86f8 opus: Remove invalid unit test
Opus headers should never be in-band, so don't test for correct
handling of that.
2015-11-04 00:14:13 +02:00
Vincent Penquerc'h
2f8efd1ce3 tests: add a test for MPD file duration parsing
https://bugzilla.gnome.org/show_bug.cgi?id=752336
2015-11-02 11:36:12 +00:00
Vincent Penquerc'h
e48e68416c mpdparser: make durations unsigned where appropriate
The standard does not seem to make any particular explicit not
implicit reference to the signedness of durations, and the code
does not rely on such, nor on the negativity of the -1 value
that's used as a placeholder when a duration property is not
present in the XML.

https://bugzilla.gnome.org/show_bug.cgi?id=750847
2015-10-30 16:29:46 +00:00
Florin Apostol
d6e805a283 dashdemux: inherit bitstreamSwitching from Period to AdaptationSet
https://bugzilla.gnome.org/show_bug.cgi?id=752340
2015-10-30 15:58:36 +00:00
Florin Apostol
590df23cb1 dashdemux: unit testing reproducing inherited segment duration overflow
unit test reproducing https://bugzilla.gnome.org/show_bug.cgi?id=751832
2015-10-30 15:05:28 +00:00
Florin Apostol
013655d886 dashdemux: inherited segment URLs are ignored if they are defined again in a lower SegmentList
According to the standard:
"SegmentBase, SegmentTemplate and SegmentList shall inherit
attributes and elements from the same element on a higher level.
If the same attribute or element is present on both levels,
the one on the lower level shall take precedence over the one
on the higher level."

gst_mpdparser_parse_segment_list_node will now discard any inherited
segment URLs if the parsed element defines some too.

https://bugzilla.gnome.org/show_bug.cgi?id=751832
2015-10-30 14:31:21 +00:00
Florin Apostol
77f4776acb adaptivedemux: tests: added test for fragment download error
https://bugzilla.gnome.org/show_bug.cgi?id=757361
2015-10-30 13:28:09 +00:00
Florin Apostol
695ec674c6 adaptivedemux: tests: made adaptive demux test thread safe
https://bugzilla.gnome.org/show_bug.cgi?id=757361
2015-10-30 13:28:04 +00:00
Florin Apostol
7254747bbe adaptivedemux: tests: added query test
Testing if adaptive demux responds to queries.

https://bugzilla.gnome.org/show_bug.cgi?id=757361
2015-10-30 13:27:54 +00:00
Florin Apostol
dc04d3d261 dashdemux: tests: added test for multiple BaseURL entries
https://bugzilla.gnome.org/show_bug.cgi?id=757245
2015-10-30 13:00:53 +00:00
Florin Apostol
4632dbe3ae dashdemux: tests: added unit test for 6d1eda9391
Commit 6d1eda9391 fixed the period start
time scaling. This patch updates the unit tests to cover that scenario.

https://bugzilla.gnome.org/show_bug.cgi?id=755105
2015-10-30 12:57:54 +00:00
Florin Apostol
7aa81d78a7 adaptivedemux: tests: added download error test
Tests adaptive demux behaviour when the uri is wrong and download does
not happen.
2015-10-30 12:50:10 +00:00
Florin Apostol
78ce34b37f tests: fixed fake soup http src plugin
The soup http src changed the way it interprets the seek segment stop value.
Previously it was inclusive, now it is not (see commit
21c6da6764,
bug https://bugzilla.gnome.org/show_bug.cgi?id=748316)

Updated fake soup http src to also consider segment stop not inclusive.

https://bugzilla.gnome.org/show_bug.cgi?id=756322
2015-10-29 16:01:40 +00:00
Florin Apostol
0e1f5a0385 adaptivedemux: tests: added unit test for adaptivedemux
Created a unit test for dashdemux. It relies on a fake SOUP HTTP src plugin
that will feed data to dashdemux. The test controls the data to be
generated and checks the correct data was received for each expected
stream.

https://bugzilla.gnome.org/show_bug.cgi?id=756322
2015-10-29 16:01:34 +00:00
Alex Ashley
a38a9ba50d tests: added fake http src plugin
Added a fake http src plugin capable of generating data buffers for a
request of a http url. Can be used in tests to simulate http accesses.

https://bugzilla.gnome.org/show_bug.cgi?id=756322
2015-10-29 16:01:18 +00:00
Alex Ashley
c8ef39cac7 dashdemux: provide a default suggestedPresentationDelay
If MPD@suggestedPresentationDelay is not present in the manifest,
dashdemux selects the fragment closest to the most recently generated
fragment. This causes a playback issue because this choice does not allow
the DASH client to build up any buffer of downloaded fragments without
pausing playback. This is because by definition new fragments appear on
the server in real-time (e.g. if segment duration is 4 seconds, a new
fragment will appear on the server every 4 seconds). If the starting
playback position was n*segmentDuration seconds behind "now", the DASH
client could download up to 'n' fragments faster than realtime before it
reached the point where it needed to wait for fragments to appear on the
server.

The MPD@suggestedPresentationDelay attribute allows a content publisher
to provide a suggested starting position that is behind the current
"live" position.

If the MPD@suggestedPresentationDelay attribute is not present, provide
a suitable default value as a property of the dashdemux element. To
allow the default presentation delay to be specified either using
fragments or seconds, the property is a string that contains a number
and a unit (e.g. "10 seconds", "4 fragments", "2500ms").
2015-10-29 13:26:46 +00:00
Vincent Penquerc'h
7443f35249 dash_mpd: restrict segment template format strings to %0[0-9]*d as per spec
https://bugzilla.gnome.org/show_bug.cgi?id=751735
2015-10-29 12:04:31 +00:00
Florin Apostol
4eea6c3833 dashdemux: segment template parsing: added support for %d
Added support for %d in template identifier.
Added testcases for %d, %3d, %0-4d identifier formats.
2015-10-29 11:58:47 +00:00
Florin Apostol
933d367440 dashdemux: corrected parsing of segment templates
Corrected the parsing of a segment template string.
Added unit tests to test the segment template parsing.
All reported problems are now correctly handled.

https://bugzilla.gnome.org/show_bug.cgi?id=751735
2015-10-29 11:54:34 +00:00
Florin Apostol
566e84cec1 dashdemux: fixed crash when segment timeline list is greater than segment url list
When building the media segment list using a SegmentList node, the
gst_mpd_client_setup_representation function will iterate through the
list of S nodes and will expect to find a matching SegmentUrl node. If
one does not exist, the code made an illegal memory access.

https://bugzilla.gnome.org/show_bug.cgi?id=752496
2015-10-29 10:20:45 +00:00
Florin Apostol
84ff565c88 dashdemux: unit test for missing profiles 2015-10-29 10:20:45 +00:00
Florin Apostol
cdfec06092 dashdemux: parser rejects negative values for mediaPresentationDuration
https://bugzilla.gnome.org/show_bug.cgi?id=752326
2015-10-29 10:20:45 +00:00
Florin Apostol
7c2746f741 dashdemux: corrected parsing of negative values into unsigned data
https://bugzilla.gnome.org/show_bug.cgi?id=752429
2015-10-29 10:20:45 +00:00
Florin Apostol
c763d1e8fd dashdemux: parser rejects XMLs with negative period duration
https://bugzilla.gnome.org/show_bug.cgi?id=752329
2015-10-28 15:41:17 +00:00
Vincent Penquerc'h
60133b1472 mpdparser: check segment lists have either duration or timeline
And add error checking along the way.

Add duration where appropriate so unit tests still pass.

https://bugzilla.gnome.org/show_bug.cgi?id=751650
2015-10-28 15:34:29 +00:00
Vincent Penquerc'h
b8df6cc316 mpdparser: validate representation set identifier
It must have no whitespace, and must comply with RFC 1738 when
used to build a URL.

https://bugzilla.gnome.org/show_bug.cgi?id=750852
2015-10-28 15:11:50 +00:00
Tim-Philipp Müller
41ca1e48a0 tests: hlsdemux_m3u: add test for master playlist with missing variant list uri
https://bugzilla.gnome.org/show_bug.cgi?id=756861
2015-10-25 09:26:46 +00:00
Sebastian Dröge
f7f208de70 mxf: Add unit tests for H264/PCM 2015-10-21 19:54:15 +03:00
Sebastian Dröge
4624cae7c8 mxf: Properly enable unit tests again 2015-10-21 19:54:15 +03:00
Florin Apostol
ebf2a00926 dashdemux: test: added unit test for presentation time offset
https://bugzilla.gnome.org/show_bug.cgi?id=752409
2015-10-02 17:09:50 +03:00
Jan Schmidt
aeed184d97 Remove baseaudiovisualizer test.
The base class has moved into gst-plugins-base
2015-10-02 14:56:41 +10:00
Vineeth TM
7c09277cd7 audiointerleave: typecast bit-mask to guint64 to fix segmentation fault
While creating caps in audiointerleave tests, bitmask is being set as 0x9
This is resulting in segmentation fault. Fix the same by typecasting to guint64

https://bugzilla.gnome.org/show_bug.cgi?id=755840
2015-09-30 09:00:52 +01:00
Nirbheek Chauhan
7baa2736d9 check: Add test for videoaggregator sinkpads being sorted by zorder
https://bugzilla.gnome.org/show_bug.cgi?id=754285
2015-09-26 10:31:17 +01:00
Sebastian Dröge
8169ee8372 dash: Fix unit test after internal API change 2015-09-26 10:50:19 +02:00
Sebastian Dröge
93d85bd361 dashdemux: Implement lazy-loading of external periods
https://bugzilla.gnome.org/show_bug.cgi?id=752230
2015-09-25 23:52:28 +02:00
Sebastian Dröge
c9f60db2d4 mpdparser: Don't consider period start times in periods with segment lists either
https://bugzilla.gnome.org/show_bug.cgi?id=754222
2015-09-14 19:53:18 +02:00
Sebastian Dröge
d9c45e918f mpdparser: Fix unit test that assumed that fragment timestamps should include the period start timestamp
https://bugzilla.gnome.org/show_bug.cgi?id=754222
2015-09-14 19:53:18 +02:00
Nirbheek Chauhan
cf786a9399 compositor: Ensure all arguments to CLAMP are signed int
If any of the arguments to CLAMP are unsigned integers, the comparison causes
an automatic conversion of the signed int to unsigned, which causes -1 to become
UINT_MAX and get clamped to the high value of the CLAMP instead of 0.

See 716 at http://c0x.coding-guidelines.com/6.3.1.8.html

Also add a test for this.

https://bugzilla.gnome.org/show_bug.cgi?id=754576
2015-09-04 23:32:36 +02:00
Nirbheek Chauhan
9b59bb8630 compositor: Actually use the output resolution for clamping
The obscured check in compositor was using the dimensions of the pad to clamp
the h/w of the pad instead of the output resolution, and was doing an incorrect
calculation to do so. Fix that by simplifying the whole calculation by using
corner coordinates. Also add a test for this bug which fell through the cracks,
and just skip all the obscured tests if the pad's alpha is 0.0.

https://bugzilla.gnome.org/show_bug.cgi?id=754107
2015-08-26 15:03:05 +03:00
hoonhee.lee
04b006cd12 tests: audiomixer: remove duplicated word in comment
https://bugzilla.gnome.org/show_bug.cgi?id=753915
2015-08-21 11:12:04 +03:00
Alex Ashley
48fefd8c84 check: hlsdemux: make duration unit test robust to floating point rounding
The test_playlist_with_doubles_duration() test fails on some platforms
due to rounding errors that occur when m3u8.c converts from the floating
point value in the HLS manifest to a GstClockTime.

Using assert_equals_float() fixes this because this function handles
the rounding error issues by accepting almost equal.

https://bugzilla.gnome.org/show_bug.cgi?id=753881
2015-08-20 17:13:48 +03:00
Sebastian Dröge
551e7b97f3 dashdemux: Handle encoding specified in the <xml> element when dumping nodes
Previous patch did not handle the case where an encoding (e.g. UTF-8) is
specified in the <xml ?> element. Added an extra test for with and without
encoding.

https://bugzilla.gnome.org/show_bug.cgi?id=753813
2015-08-19 21:33:47 +03:00
Alex Ashley
2ebebdbfbb dashdemux: replace xmlNodeDump with xmlNodeDumpOutput
When running on an STB, the function
gst_mpdparser_get_xml_node_as_string causes a segmentation fault. This
code works correctly on a Linux desktop.

Looking at the libxml documentation, the xmlNodeDump is deprecated.
Replacing the use of xmlNodeDump with xmlNodeDumpOutput fixes the
segfault on the STB and removes the use of the deprecated function.
2015-08-19 16:30:58 +03:00
Edward Hervey
c90f6b990b checks: Ensure thread-safe libX11/GL when running tests 2015-08-15 19:04:42 +02:00
Alex Ashley
95c705ae8f dashdemux: add support for UTCTiming elements for clock drift compensation
Unless the DASH client can compensate for the difference between its
clock and the clock used by the server, the client might request
fragments that either not yet on the server or fragments that have
already been expired from the server. This is an issue because these
requests can propagate all the way back to the origin

ISO/IEC 23009-1:2014/Amd 1 [PDAM1] defines a new UTCTiming element to allow
a DASH client to track the clock used by the server generating the
DASH stream. Multiple UTCTiming elements might be present, to indicate
support for multiple methods of UTC time gathering. Each element can
contain a white space separated list of URLs that can be contacted
to discover the UTC time from the server's perspective.

This commit provides parsing of UTCTiming elements, unit tests of this
parsing and a function to poll a time server. This function
supports the following methods:
    urn:mpeg:dash:utc:ntp:2014
    urn:mpeg:dash:utc:http-xsdate:2014
    urn:mpeg:dash:utc:http-iso:2014
    urn:mpeg:dash:utc:http-ntp:2014

The manifest update task is used to poll the clock time server,
to save having to create a new thread.

When choosing the starting fragment number and when waiting for a
fragment to become available, the difference between the server's idea
of UTC and the client's idea of UTC is taken into account. For example,
if the server's time is behind the client's idea of UTC, we wait for
longer before requesting a fragment

[PDAM1]: http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=66068

dashdemux: support NTP time servers in UTCTiming elements

Use the gst_ntp_clock to support the use of an NTP server.

https://bugzilla.gnome.org/show_bug.cgi?id=752413
2015-08-14 06:47:20 -03:00
Thiago Santos
9d431e605f tests: dash_mpd: add check for segmenttemplate inheritance
Checks if the values are properly inherited and overwriten
2015-08-01 16:11:07 -03:00
Thiago Santos
9c291904f5 tests: dash_mpd: add one more baseURL test
This other type of baseURL test was replaced by a more complex one,
better have both to keep both options working

Also adds another 2 variations of how baseURL can be generated

https://bugzilla.gnome.org/show_bug.cgi?id=752776
2015-08-01 16:11:01 -03:00
Florin Apostol
6ce65709bd dashdemux: tests: added duration format test
https://bugzilla.gnome.org/show_bug.cgi?id=752776
2015-08-01 16:10:55 -03:00
Florin Apostol
86c12c7357 dashdemux: tests: update unit test for baseURL
Update the unit test for baseURL to test that it is properly
resolved taking into account parent baseURL elements.

https://bugzilla.gnome.org/show_bug.cgi?id=752776
2015-08-01 11:52:26 -03:00
Olivier Crête
ce6206388c tests: Add audiointerleave test to show that queuing works
This tests fails without the queuing patch because incoming buffers are
not delivered before they are needed.

https://bugzilla.gnome.org/show_bug.cgi?id=745768
2015-07-30 14:00:05 -04:00
Sebastian Dröge
b88d93ff7b compositor: Add unit tests for the new aggregator start-time-selection property
https://bugzilla.gnome.org/show_bug.cgi?id=749966
2015-07-29 14:35:50 +01:00
Nirbheek Chauhan
ad8cb458ba audioaggregator: Sync pad values before aggregating
We need to sync the pad values before taking the aggregator and pad locks
otherwise the element will just deadlock if there's any property changes
scheduled using GstController since that involves taking the aggregator and pad
locks.

Also add a test for this.

https://bugzilla.gnome.org/show_bug.cgi?id=749574
2015-07-22 19:50:38 +01:00
Sebastian Dröge
cd47556351 mpdparser: Fix some memory leaks in the MPD parser and unit test 2015-07-08 23:15:14 +03:00
Florin Apostol
d525d9c391 dashdemux: tests: added unit tests to test all functions
Added unit tests for all functions. Code coverage:
Overall coverage rate:
  lines......: 83.8% (1941 of 2316 lines)
  functions..: 100.0% (141 of 141 functions)
2015-07-08 23:15:14 +03:00
Florin Apostol
57042af9d6 dashdemux: tests: added indentation in xml strings to improve readability
https://bugzilla.gnome.org/show_bug.cgi?id=752027
2015-07-07 14:13:53 +03:00
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