After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 781632 - test: dashdemux: Use real dash segments for unit test
test: dashdemux: Use real dash segments for unit test
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 774844 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-04-23 11:46 UTC by Seungha Yang
Modified: 2018-11-03 14:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test: dashdemux: Use real dash segments for unit test (105.98 KB, patch)
2017-04-23 11:48 UTC, Seungha Yang
none Details | Review
adaptive_demux: tests: fix usage of test lock (10.83 KB, patch)
2017-08-18 15:24 UTC, A Ashley
none Details | Review
tests: adaptivedemux: check entire received expected_data (5.22 KB, patch)
2017-08-18 15:26 UTC, A Ashley
none Details | Review
test: dashdemux: Use real dash segments for unit tests (147.80 KB, patch)
2017-08-18 15:28 UTC, A Ashley
none Details | Review
tests: hlsdemux: Fix generation of expected data (3.02 KB, patch)
2017-08-18 15:29 UTC, A Ashley
none Details | Review
test: dashdemux: Use real dash segments for unit tests (147.39 KB, patch)
2017-08-21 14:02 UTC, A Ashley
none Details | Review
tests: hlsdemux: Fix generation of expected data (8.00 KB, patch)
2017-08-21 14:03 UTC, A Ashley
none Details | Review
test: mssdemux: Use real isobmff segments for unit tests (31.75 KB, patch)
2017-08-21 14:06 UTC, A Ashley
none Details | Review
tests: dashdemux: Use real dash segments for unit tests (148.48 KB, patch)
2017-08-30 14:48 UTC, A Ashley
none Details | Review
tests: mssdemux: Use real isobmff segments for unit tests (32.04 KB, patch)
2017-08-30 14:50 UTC, A Ashley
none Details | Review
tests: dashdemux: Use real dash segments for unit tests (157.78 KB, patch)
2017-08-31 10:26 UTC, A Ashley
none Details | Review
adaptive_demux: tests: fix usage of test lock (10.83 KB, patch)
2017-10-31 14:48 UTC, A Ashley
none Details | Review
tests: adaptivedemux: check entire received expected_data (5.27 KB, patch)
2017-10-31 14:48 UTC, A Ashley
none Details | Review
tests: dashdemux: Use real isobmff segments for unit tests (159.59 KB, patch)
2017-10-31 14:50 UTC, A Ashley
none Details | Review
tests: hlsdemux: Fix generation of expected data (8.05 KB, patch)
2017-10-31 14:51 UTC, A Ashley
none Details | Review
tests: mssdemux: Use real isobmff segments for unit tests (33.42 KB, patch)
2017-10-31 14:52 UTC, A Ashley
none Details | Review

Description Seungha Yang 2017-04-23 11:46:27 UTC
Until now, dashdemux has been improved with several features such as
header parsing for efficient trick-play and etc.
But unit test uses fake isobmff segments for unit test,
and it causes test failure due to segment parsing error by dashdemux.
Comment 1 Seungha Yang 2017-04-23 11:48:52 UTC
Created attachment 350260 [details] [review]
test: dashdemux: Use real dash segments for unit test

Currently lots of TC are failed, and with this patch, all of TCs are passed except for "testSeekSnapAfterSamePosition". It might be a bug in dashdemux.
Comment 2 Sebastian Dröge (slomo) 2017-04-23 11:58:10 UTC
Thanks but it would seem more useful to extend gst-validate with more (real) streams and add more checks of correctness. This will then also check the whole dashdemux/qtdemux/souphttpsrc combination, which is quite tightly integrated anyway.
Comment 3 Seungha Yang 2017-04-23 12:29:14 UTC
(In reply to Sebastian Dröge (slomo) from comment #2)
> Thanks but it would seem more useful to extend gst-validate with more (real)
> streams and add more checks of correctness. This will then also check the
> whole dashdemux/qtdemux/souphttpsrc combination, which is quite tightly
> integrated anyway.

Thanks for your comment. I thought both this unit-test and gst-validate are useful. Actually, I'd like to simulate preroll related bug (bug #778763) using unit-test and adding the preroll related TC into gst-validate seems to too much specific for me. So, this is a kind of pre-work for bug #778763
Umm... I'll try to add preroll related TC into gst-validate, anyway :)
Comment 4 A Ashley 2017-05-17 12:46:22 UTC
I agree that both the unit tests and the integration tests are useful, and that they are used to test different things.

There are cases where it would be difficult to control the server responses in quite the right way to trigger a particular code path in dashdemux. For example testing the clock drift logic (although alas those tests haven't been merged).
Comment 5 A Ashley 2017-08-18 15:24:59 UTC
Created attachment 357906 [details] [review]
adaptive_demux: tests: fix usage of test lock

Fixing locking problems in the test framework was required before the seek tests could be fixed.
Comment 6 A Ashley 2017-08-18 15:26:14 UTC
Created attachment 357908 [details] [review]
tests: adaptivedemux: check entire received expected_data

Another bug that needed fixing before the seek tests could be fixed.
Comment 7 A Ashley 2017-08-18 15:28:34 UTC
Created attachment 357909 [details] [review]
test: dashdemux: Use real dash segments for unit tests

This patch replaces
https://bugzilla.gnome.org/attachment.cgi?id=350260

When applied, all the dash_demux tests pass
Comment 8 A Ashley 2017-08-18 15:29:41 UTC
Created attachment 357910 [details] [review]
tests: hlsdemux: Fix generation of expected data

Fixing the check of received data uncovered a rather nasty buffer overrun bug in the hlsdemux tests.
Comment 9 A Ashley 2017-08-21 14:02:34 UTC
Created attachment 358074 [details] [review]
test: dashdemux: Use real dash segments for unit tests

Re-factored so that mssdemux tests can make use of the same MP4 fragments.
Comment 10 A Ashley 2017-08-21 14:03:49 UTC
Created attachment 358075 [details] [review]
tests: hlsdemux: Fix generation of expected data

Updated to reflect refactoring changes in "test: dashdemux: Use real dash segments for unit tests" patch
Comment 11 A Ashley 2017-08-21 14:06:15 UTC
Created attachment 358076 [details] [review]
test: mssdemux: Use real isobmff segments for unit tests

Fixing the bug in gst_adaptive_demux_test_check_received_data() caused the mssdemux tests to fail.

As SmoothStreaming is also based upon ISOBMFF files, these tests can use the same GstAdaptiveDemuxTestMedia code that is used in dash_demux tests.
Comment 12 Tim-Philipp Müller 2017-08-22 15:41:20 UTC
*** Bug 774844 has been marked as a duplicate of this bug. ***
Comment 13 A Ashley 2017-08-30 14:48:22 UTC
Created attachment 358762 [details] [review]
tests: dashdemux: Use real dash segments for unit tests

Modified the generation of input & output data so that each media segment has a unique finger print. This allows checking that it is downloading the segment that the test is expecting, rather than another media segment.
Comment 14 A Ashley 2017-08-30 14:50:15 UTC
Created attachment 358764 [details] [review]
tests: mssdemux: Use real isobmff segments for unit tests

The change in the "tests: dashdemux: Use real dash segments for unit tests" patch that made each segment unique exposed two bugs in the mssdemux seek tests.
Comment 15 Edward Hervey 2017-08-30 15:17:10 UTC
elements/adaptive_demux_media.c:890:21: error: ‘video_sidx’ defined but not used [-Werror=unused-const-variable=]
 static const guint8 video_sidx[] = {
                     ^~~~~~~~~~
elements/adaptive_demux_media.c:115:21: error: ‘audio_sidx’ defined but not used [-Werror=unused-const-variable=]
 static const guint8 audio_sidx[] = {
                     ^~~~~~~~~~
cc1: all warnings being treated as errors
Comment 16 A Ashley 2017-08-30 15:55:42 UTC
I'm surprised I didn't get that compilation error, as I am running in gst-uninstalled maintainer mode.

Anyway, at the moment the SIDX indexes are not used by any tests. I can either:

a) Add them to the map_filename_to_segment() function so that a future test could use them
b) Delete the SIDX arrays

Option (a) has the advantage of keeping the SIDX data with the media it indexes, however has the disadvantage of unused code that gets maintained when it is not needed.
Comment 17 Tim-Philipp Müller 2017-08-30 16:02:17 UTC
Or mark them with G_GNUC_UNUSED to suppress the warning if you think they may be useful in future.
Comment 18 A Ashley 2017-08-31 10:26:39 UTC
Created attachment 358841 [details] [review]
tests: dashdemux: Use real dash segments for unit tests

Fixed "unused variable" compile error for audio_sidx and video_sidx.

Added #defines for the filenames used for init, sidx and media files, to keep it DRY.
Comment 19 A Ashley 2017-10-31 14:48:06 UTC
Created attachment 362631 [details] [review]
adaptive_demux: tests: fix usage of test lock

updated to current master
Comment 20 A Ashley 2017-10-31 14:48:48 UTC
Created attachment 362632 [details] [review]
tests: adaptivedemux: check entire received expected_data

updated to master
added link to bugzilla ticket
Comment 21 A Ashley 2017-10-31 14:50:56 UTC
Created attachment 362633 [details] [review]
tests: dashdemux: Use real isobmff segments for unit tests

Change gst_adaptive_demux_test_case_test_media_info() to use an enum for media type.

Fixed bug in gst_adaptive_demux_test_case_test_media_info() that was causing it to return wrong segment sizes.

Fixed bug in testMediaDownloadErrorMiddleFragment test that made it unreliable.
Comment 22 A Ashley 2017-10-31 14:51:30 UTC
Created attachment 362634 [details] [review]
tests: hlsdemux: Fix generation of expected data

rebased to master
Comment 23 A Ashley 2017-10-31 14:52:33 UTC
Created attachment 362635 [details] [review]
tests: mssdemux: Use real isobmff segments for unit tests

Rebased to master.

Fixed bug in testFragmentDownloadError test that made it unreliable.
Comment 24 GStreamer system administrator 2018-11-03 14:07:42 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/548.