Commit 3b5deb2b authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

shapewipe: Send initial events after setting the elements to PLAYING

Otherwise we send them too early, and setting the elements to PLAYING
afterwards will drop all the events again.
parent cf817639
...@@ -96,16 +96,10 @@ GST_START_TEST (test_general) ...@@ -96,16 +96,10 @@ GST_START_TEST (test_general)
gst_pad_new_from_static_template (&videosrctemplate, "videosrc"); gst_pad_new_from_static_template (&videosrctemplate, "videosrc");
gst_element_add_pad (videosrc, myvideosrcpad); gst_element_add_pad (videosrc, myvideosrcpad);
gst_pad_set_active (myvideosrcpad, TRUE); gst_pad_set_active (myvideosrcpad, TRUE);
caps = gst_caps_from_string (SHAPEWIPE_VIDEO_CAPS_STRING);
gst_check_setup_events (myvideosrcpad, videosrc, caps, GST_FORMAT_TIME);
gst_caps_unref (caps);
mymasksrcpad = gst_pad_new_from_static_template (&masksrctemplate, "masksrc"); mymasksrcpad = gst_pad_new_from_static_template (&masksrctemplate, "masksrc");
gst_element_add_pad (masksrc, mymasksrcpad); gst_element_add_pad (masksrc, mymasksrcpad);
gst_pad_set_active (mymasksrcpad, TRUE); gst_pad_set_active (mymasksrcpad, TRUE);
caps = gst_caps_from_string (SHAPEWIPE_MASK_CAPS_STRING);
gst_check_setup_events (mymasksrcpad, masksrc, caps, GST_FORMAT_TIME);
gst_caps_unref (caps);
mysinkpad = gst_pad_new_from_static_template (&sinktemplate, "sink"); mysinkpad = gst_pad_new_from_static_template (&sinktemplate, "sink");
gst_element_add_pad (sink, mysinkpad); gst_element_add_pad (sink, mysinkpad);
...@@ -125,6 +119,14 @@ GST_START_TEST (test_general) ...@@ -125,6 +119,14 @@ GST_START_TEST (test_general)
fail_unless (gst_element_set_state (bin, fail_unless (gst_element_set_state (bin,
GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS); GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS);
caps = gst_caps_from_string (SHAPEWIPE_MASK_CAPS_STRING);
gst_check_setup_events (mymasksrcpad, masksrc, caps, GST_FORMAT_TIME);
gst_caps_unref (caps);
caps = gst_caps_from_string (SHAPEWIPE_VIDEO_CAPS_STRING);
gst_check_setup_events (myvideosrcpad, videosrc, caps, GST_FORMAT_TIME);
gst_caps_unref (caps);
mask = gst_buffer_new_and_alloc (400 * 400); mask = gst_buffer_new_and_alloc (400 * 400);
gst_buffer_map (mask, &map, GST_MAP_WRITE); gst_buffer_map (mask, &map, GST_MAP_WRITE);
data = map.data; data = map.data;
......
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