audiowsinclimit: Test should send segment after CAPS

This makes the unit test pass again.

https://bugzilla.gnome.org/show_bug.cgi?id=699966
This commit is contained in:
Nicolas Dufresne 2013-05-08 19:00:28 -04:00 committed by Sebastian Dröge
parent 2d53229a86
commit 22d64ea3be

View file

@ -129,15 +129,15 @@ GST_START_TEST (test_32_lp_0hz)
in[i] = 1.0;
gst_buffer_unmap (inbuffer, &map);
/* ensure segment (format) properly setup */
gst_segment_init (&segment, GST_FORMAT_TIME);
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment)));
caps = gst_caps_from_string (AUDIO_WSINC_LIMIT_CAPS_STRING_32);
gst_pad_set_caps (mysrcpad, caps);
gst_caps_unref (caps);
ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
/* ensure segment (format) properly setup */
gst_segment_init (&segment, GST_FORMAT_TIME);
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment)));
/* pushing gives away my reference ... */
fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
@ -200,15 +200,15 @@ GST_START_TEST (test_32_lp_22050hz)
}
gst_buffer_unmap (inbuffer, &map);
/* ensure segment (format) properly setup */
gst_segment_init (&segment, GST_FORMAT_TIME);
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment)));
caps = gst_caps_from_string (AUDIO_WSINC_LIMIT_CAPS_STRING_32);
gst_pad_set_caps (mysrcpad, caps);
gst_caps_unref (caps);
ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
/* ensure segment (format) properly setup */
gst_segment_init (&segment, GST_FORMAT_TIME);
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment)));
/* pushing gives away my reference ... */
fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
@ -269,15 +269,15 @@ GST_START_TEST (test_32_hp_0hz)
in[i] = 1.0;
gst_buffer_unmap (inbuffer, &map);
/* ensure segment (format) properly setup */
gst_segment_init (&segment, GST_FORMAT_TIME);
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment)));
caps = gst_caps_from_string (AUDIO_WSINC_LIMIT_CAPS_STRING_32);
gst_pad_set_caps (mysrcpad, caps);
gst_caps_unref (caps);
ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
/* ensure segment (format) properly setup */
gst_segment_init (&segment, GST_FORMAT_TIME);
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment)));
/* pushing gives away my reference ... */
fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
@ -340,15 +340,15 @@ GST_START_TEST (test_32_hp_22050hz)
}
gst_buffer_unmap (inbuffer, &map);
/* ensure segment (format) properly setup */
gst_segment_init (&segment, GST_FORMAT_TIME);
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment)));
caps = gst_caps_from_string (AUDIO_WSINC_LIMIT_CAPS_STRING_32);
gst_pad_set_caps (mysrcpad, caps);
gst_caps_unref (caps);
ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
/* ensure segment (format) properly setup */
gst_segment_init (&segment, GST_FORMAT_TIME);
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment)));
/* pushing gives away my reference ... */
fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
@ -408,15 +408,15 @@ GST_START_TEST (test_32_small_buffer)
in[i] = 1.0;
gst_buffer_unmap (inbuffer, &map);
/* ensure segment (format) properly setup */
gst_segment_init (&segment, GST_FORMAT_TIME);
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment)));
caps = gst_caps_from_string (AUDIO_WSINC_LIMIT_CAPS_STRING_32);
gst_pad_set_caps (mysrcpad, caps);
gst_caps_unref (caps);
ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
/* ensure segment (format) properly setup */
gst_segment_init (&segment, GST_FORMAT_TIME);
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment)));
/* pushing gives away my reference ... */
fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
@ -463,15 +463,15 @@ GST_START_TEST (test_64_lp_0hz)
in[i] = 1.0;
gst_buffer_unmap (inbuffer, &map);
/* ensure segment (format) properly setup */
gst_segment_init (&segment, GST_FORMAT_TIME);
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment)));
caps = gst_caps_from_string (AUDIO_WSINC_LIMIT_CAPS_STRING_64);
gst_pad_set_caps (mysrcpad, caps);
gst_caps_unref (caps);
ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
/* ensure segment (format) properly setup */
gst_segment_init (&segment, GST_FORMAT_TIME);
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment)));
/* pushing gives away my reference ... */
fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
@ -534,15 +534,15 @@ GST_START_TEST (test_64_lp_22050hz)
}
gst_buffer_unmap (inbuffer, &map);
/* ensure segment (format) properly setup */
gst_segment_init (&segment, GST_FORMAT_TIME);
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment)));
caps = gst_caps_from_string (AUDIO_WSINC_LIMIT_CAPS_STRING_64);
gst_pad_set_caps (mysrcpad, caps);
gst_caps_unref (caps);
ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
/* ensure segment (format) properly setup */
gst_segment_init (&segment, GST_FORMAT_TIME);
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment)));
/* pushing gives away my reference ... */
fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
@ -603,15 +603,15 @@ GST_START_TEST (test_64_hp_0hz)
in[i] = 1.0;
gst_buffer_unmap (inbuffer, &map);
/* ensure segment (format) properly setup */
gst_segment_init (&segment, GST_FORMAT_TIME);
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment)));
caps = gst_caps_from_string (AUDIO_WSINC_LIMIT_CAPS_STRING_64);
gst_pad_set_caps (mysrcpad, caps);
gst_caps_unref (caps);
ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
/* ensure segment (format) properly setup */
gst_segment_init (&segment, GST_FORMAT_TIME);
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment)));
/* pushing gives away my reference ... */
fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
@ -674,15 +674,15 @@ GST_START_TEST (test_64_hp_22050hz)
}
gst_buffer_unmap (inbuffer, &map);
/* ensure segment (format) properly setup */
gst_segment_init (&segment, GST_FORMAT_TIME);
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment)));
caps = gst_caps_from_string (AUDIO_WSINC_LIMIT_CAPS_STRING_64);
gst_pad_set_caps (mysrcpad, caps);
gst_caps_unref (caps);
ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
/* ensure segment (format) properly setup */
gst_segment_init (&segment, GST_FORMAT_TIME);
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment)));
/* pushing gives away my reference ... */
fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
@ -742,15 +742,15 @@ GST_START_TEST (test_64_small_buffer)
in[i] = 1.0;
gst_buffer_unmap (inbuffer, &map);
/* ensure segment (format) properly setup */
gst_segment_init (&segment, GST_FORMAT_TIME);
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment)));
caps = gst_caps_from_string (AUDIO_WSINC_LIMIT_CAPS_STRING_64);
gst_pad_set_caps (mysrcpad, caps);
gst_caps_unref (caps);
ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
/* ensure segment (format) properly setup */
gst_segment_init (&segment, GST_FORMAT_TIME);
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment)));
/* pushing gives away my reference ... */
fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));