summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2009-05-12 11:16:48 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2009-05-12 11:18:03 +0200
commit633c9403622285e55a722db7694c2ed78c267804 (patch)
treeebbdda390b81241569b2cc3a2fbe4649884b464a /tests
parent4cada0ca1a0c4fba0f32e62e8872d2b12337d2d4 (diff)
rganalysis: Remove invalid unit test
The test creates buffers with non-silence, sets the GAP flag on it and expects rganalysis to ignore the content and assume silence. That's not the way how GAP buffers should be used, if the GAP flag is set elements *can* assume that they only contain silence but they're not *required* to assume that. The GAP flag must only be set on silence buffers. Fixes bug #582252.
Diffstat (limited to 'tests')
-rw-r--r--tests/check/elements/rganalysis.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/tests/check/elements/rganalysis.c b/tests/check/elements/rganalysis.c
index 0045cb94..d9b4a85d 100644
--- a/tests/check/elements/rganalysis.c
+++ b/tests/check/elements/rganalysis.c
@@ -741,48 +741,6 @@ GST_START_TEST (test_empty_buffers)
GST_END_TEST;
-GST_START_TEST (test_gap_buffers)
-{
- GstElement *element = setup_rganalysis ();
- GstTagList *tag_list;
- GstBuffer *buf;
- gint accumulator = 0;
- gint i;
-
- set_playing_state (element);
-
- for (i = 0; i < 60; i++) {
- if (i % 3 == 0) {
- /* We are cheating here; the element cannot know that these GAP buffers
- * actually contain non-silence so it must skip them. */
- buf = test_buffer_square_float_mono (&accumulator, 44100, 512, 0.25);
- GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_GAP);
- push_buffer (buf);
-
- /* Verify that the base class does not lift the GAP flag: */
- fail_if (g_list_length (buffers) == 0);
- if (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_GAP))
- fail_unless (GST_BUFFER_FLAG_IS_SET (buffers->data,
- GST_BUFFER_FLAG_GAP));
- } else {
- push_buffer (test_buffer_const_float_mono (44100, 512, 0.0));
- }
- }
-
- send_eos_event (element);
- tag_list = poll_tags (element);
- /* We pushed faked GAP buffers with non-silence and non-GAP buffers with
- * silence, so the correct result is that the analysis only got silence: */
- fail_unless_track_peak (tag_list, 0.0);
- fail_unless_track_gain (tag_list, SILENCE_GAIN);
-
- gst_tag_list_free (tag_list);
-
- cleanup_rganalysis (element);
-}
-
-GST_END_TEST;
-
/* Tests for correctness of the peak values. */
/* Float peak test. For stereo, one channel has the constant value of -1.369,
@@ -1820,7 +1778,6 @@ rganalysis_suite (void)
tcase_add_test (tc_chain, test_no_buffer_album_1);
tcase_add_test (tc_chain, test_no_buffer_album_2);
tcase_add_test (tc_chain, test_empty_buffers);
- tcase_add_test (tc_chain, test_gap_buffers);
tcase_add_test (tc_chain, test_peak_float);
tcase_add_test (tc_chain, test_peak_int16_16);