mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 12:41:05 +00:00
test: flvmux: Use gst_harness_sink_push_many
And check its return value.
This commit is contained in:
parent
9528bfd78f
commit
daafce54ac
1 changed files with 5 additions and 17 deletions
|
@ -480,7 +480,6 @@ GST_START_TEST (test_video_caps_late)
|
||||||
GstHarness *v_sink =
|
GstHarness *v_sink =
|
||||||
gst_harness_new_with_element (demux->element, NULL, NULL);
|
gst_harness_new_with_element (demux->element, NULL, NULL);
|
||||||
DemuxHarnesses harnesses = { a_sink, v_sink };
|
DemuxHarnesses harnesses = { a_sink, v_sink };
|
||||||
guint i;
|
|
||||||
GstTestClock *tclock;
|
GstTestClock *tclock;
|
||||||
|
|
||||||
g_object_set (mux->element, "streamable", TRUE,
|
g_object_set (mux->element, "streamable", TRUE,
|
||||||
|
@ -532,8 +531,7 @@ GST_START_TEST (test_video_caps_late)
|
||||||
|
|
||||||
|
|
||||||
/* push from flvmux to demux */
|
/* push from flvmux to demux */
|
||||||
for (i = 0; i < 6; i++)
|
fail_unless_equals_int (GST_FLOW_OK, gst_harness_sink_push_many (mux, 6));
|
||||||
gst_harness_push_to_sink (mux);
|
|
||||||
|
|
||||||
/* verify we got 2x audio and 1x video buffers out of flvdemux */
|
/* verify we got 2x audio and 1x video buffers out of flvdemux */
|
||||||
gst_buffer_unref (gst_harness_pull (a_sink));
|
gst_buffer_unref (gst_harness_pull (a_sink));
|
||||||
|
@ -572,7 +570,6 @@ GST_START_TEST (test_video_caps_change_streamable)
|
||||||
GstHarness *v_sink =
|
GstHarness *v_sink =
|
||||||
gst_harness_new_with_element (demux->element, NULL, NULL);
|
gst_harness_new_with_element (demux->element, NULL, NULL);
|
||||||
DemuxHarnesses harnesses = { a_sink, v_sink };
|
DemuxHarnesses harnesses = { a_sink, v_sink };
|
||||||
guint i;
|
|
||||||
|
|
||||||
const GstClockTime base_time = 123456789;
|
const GstClockTime base_time = 123456789;
|
||||||
const GstClockTime duration_ms = 20;
|
const GstClockTime duration_ms = 20;
|
||||||
|
@ -605,9 +602,7 @@ GST_START_TEST (test_video_caps_change_streamable)
|
||||||
gst_harness_crank_single_clock_wait (mux);
|
gst_harness_crank_single_clock_wait (mux);
|
||||||
|
|
||||||
/* push from flvmux to demux */
|
/* push from flvmux to demux */
|
||||||
for (i = 0; i < 6; i++) {
|
fail_unless_equals_int (GST_FLOW_OK, gst_harness_sink_push_many (mux, 6));
|
||||||
gst_harness_push_to_sink (mux);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* should accept without the constraint */
|
/* should accept without the constraint */
|
||||||
while ((event = gst_harness_try_pull_event (v_sink))) {
|
while ((event = gst_harness_try_pull_event (v_sink))) {
|
||||||
|
@ -633,9 +628,7 @@ GST_START_TEST (test_video_caps_change_streamable)
|
||||||
gst_harness_crank_single_clock_wait (mux);
|
gst_harness_crank_single_clock_wait (mux);
|
||||||
|
|
||||||
/* push from flvmux to demux */
|
/* push from flvmux to demux */
|
||||||
for (i = 0; i < 2; i++) {
|
fail_unless_equals_int (GST_FLOW_OK, gst_harness_sink_push_many (mux, 2));
|
||||||
gst_harness_push_to_sink (mux);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* should accept without the constraint */
|
/* should accept without the constraint */
|
||||||
while ((event = gst_harness_try_pull_event (v_sink))) {
|
while ((event = gst_harness_try_pull_event (v_sink))) {
|
||||||
|
@ -680,7 +673,6 @@ GST_START_TEST (test_audio_caps_change_streamable)
|
||||||
GstHarness *v_sink =
|
GstHarness *v_sink =
|
||||||
gst_harness_new_with_element (demux->element, NULL, NULL);
|
gst_harness_new_with_element (demux->element, NULL, NULL);
|
||||||
DemuxHarnesses harnesses = { a_sink, v_sink };
|
DemuxHarnesses harnesses = { a_sink, v_sink };
|
||||||
guint i;
|
|
||||||
|
|
||||||
const GstClockTime base_time = 123456789;
|
const GstClockTime base_time = 123456789;
|
||||||
const GstClockTime duration_ms = 20;
|
const GstClockTime duration_ms = 20;
|
||||||
|
@ -713,9 +705,7 @@ GST_START_TEST (test_audio_caps_change_streamable)
|
||||||
gst_harness_crank_single_clock_wait (mux);
|
gst_harness_crank_single_clock_wait (mux);
|
||||||
|
|
||||||
/* push from flvmux to demux */
|
/* push from flvmux to demux */
|
||||||
for (i = 0; i < 6; i++) {
|
fail_unless_equals_int (GST_FLOW_OK, gst_harness_sink_push_many (mux, 6));
|
||||||
gst_harness_push_to_sink (mux);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* should accept without the constraint */
|
/* should accept without the constraint */
|
||||||
while ((event = gst_harness_try_pull_event (a_sink))) {
|
while ((event = gst_harness_try_pull_event (a_sink))) {
|
||||||
|
@ -743,9 +733,7 @@ GST_START_TEST (test_audio_caps_change_streamable)
|
||||||
gst_harness_crank_single_clock_wait (mux);
|
gst_harness_crank_single_clock_wait (mux);
|
||||||
|
|
||||||
/* push from flvmux to demux */
|
/* push from flvmux to demux */
|
||||||
for (i = 0; i < 2; i++) {
|
fail_unless_equals_int (GST_FLOW_OK, gst_harness_sink_push_many (mux, 2));
|
||||||
gst_harness_push_to_sink (mux);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* should accept without the constraint */
|
/* should accept without the constraint */
|
||||||
while ((event = gst_harness_try_pull_event (a_sink))) {
|
while ((event = gst_harness_try_pull_event (a_sink))) {
|
||||||
|
|
Loading…
Reference in a new issue