Commit 3d2280be authored by Thiago Santos's avatar Thiago Santos Committed by Tim-Philipp Müller

test: qtmux: Tests qtmux reuse

Forces the use of qtmux after it has been put to PLAYING and back
to NULL once
parent 20e4bdee
......@@ -355,6 +355,36 @@ GST_START_TEST (test_audio_pad_frag_streamable)
GST_START_TEST (test_reuse)
GstElement *qtmux = setup_qtmux (&srcvideotemplate, "video_%d");
GstBuffer *inbuffer;
GstCaps *caps;
gst_element_set_state (qtmux, GST_STATE_PLAYING);
gst_element_set_state (qtmux, GST_STATE_NULL);
gst_element_set_state (qtmux, GST_STATE_PLAYING);
gst_pad_set_active (mysrcpad, TRUE);
gst_pad_set_active (mysinkpad, TRUE);
inbuffer = gst_buffer_new_and_alloc (1);
fail_unless (inbuffer != NULL);
caps = gst_caps_copy (gst_pad_get_pad_template_caps (mysrcpad));
gst_buffer_set_caps (inbuffer, caps);
gst_caps_unref (caps);
GST_BUFFER_TIMESTAMP (inbuffer) = 0;
ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
/* send eos to have all written */
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()) == TRUE);
cleanup_qtmux (qtmux, "video_%d");
static Suite *
qtmux_suite (void)
......@@ -369,6 +399,8 @@ qtmux_suite (void)
tcase_add_test (tc_chain, test_video_pad_frag_streamable);
tcase_add_test (tc_chain, test_audio_pad_frag_streamable);
tcase_add_test (tc_chain, test_reuse);
return s;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment