Commit graph

65 commits

Author SHA1 Message Date
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
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
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
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