mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
check: drop caps argument from gst_check_setup_{src,sink}_pad
Calling set_caps at that point is not useful in 0.10 (FIXME comment!), and in 0.11 it is totally pointless: the caps event doesn't stick to a flushing pad.
This commit is contained in:
parent
e9ac94cffb
commit
f6e992cb06
10 changed files with 18 additions and 36 deletions
|
@ -197,19 +197,10 @@ gst_check_teardown_element (GstElement * element)
|
|||
gst_object_unref (element);
|
||||
}
|
||||
|
||||
/* FIXME: set_caps isn't that useful
|
||||
*/
|
||||
GstPad *
|
||||
gst_check_setup_src_pad (GstElement * element,
|
||||
GstStaticPadTemplate * tmpl, GstCaps * caps)
|
||||
gst_check_setup_src_pad (GstElement * element, GstStaticPadTemplate * tmpl)
|
||||
{
|
||||
GstPad *srcpad;
|
||||
|
||||
srcpad = gst_check_setup_src_pad_by_name (element, tmpl, "sink");
|
||||
if (caps)
|
||||
fail_unless (gst_pad_push_event (srcpad, gst_event_new_caps (caps)),
|
||||
"could not set caps on pad");
|
||||
return srcpad;
|
||||
return gst_check_setup_src_pad_by_name (element, tmpl, "sink");
|
||||
}
|
||||
|
||||
GstPad *
|
||||
|
@ -277,19 +268,10 @@ gst_check_teardown_src_pad (GstElement * element)
|
|||
gst_check_teardown_pad_by_name (element, "sink");
|
||||
}
|
||||
|
||||
/* FIXME: set_caps isn't that useful; might want to check if fixed,
|
||||
* then use set_use_fixed or somesuch */
|
||||
GstPad *
|
||||
gst_check_setup_sink_pad (GstElement * element, GstStaticPadTemplate * tmpl,
|
||||
GstCaps * caps)
|
||||
gst_check_setup_sink_pad (GstElement * element, GstStaticPadTemplate * tmpl)
|
||||
{
|
||||
GstPad *sinkpad;
|
||||
|
||||
sinkpad = gst_check_setup_sink_pad_by_name (element, tmpl, "src");
|
||||
if (caps)
|
||||
fail_unless (gst_pad_send_event (sinkpad, gst_event_new_caps (caps)),
|
||||
"Could not set pad caps");
|
||||
return sinkpad;
|
||||
return gst_check_setup_sink_pad_by_name (element, tmpl, "src");
|
||||
}
|
||||
|
||||
GstPad *
|
||||
|
|
|
@ -72,7 +72,7 @@ void gst_check_message_error (GstMessage * message, GstMessageType type,
|
|||
GstElement *gst_check_setup_element (const gchar * factory);
|
||||
void gst_check_teardown_element (GstElement * element);
|
||||
GstPad *gst_check_setup_src_pad (GstElement * element,
|
||||
GstStaticPadTemplate * tmpl, GstCaps * caps);
|
||||
GstStaticPadTemplate * tmpl);
|
||||
GstPad * gst_check_setup_src_pad_by_name (GstElement * element,
|
||||
GstStaticPadTemplate * tmpl, const gchar *name);
|
||||
GstPad * gst_check_setup_sink_pad_by_name (GstElement * element,
|
||||
|
@ -87,7 +87,7 @@ void gst_check_element_push_buffer_list (const gchar * element_name,
|
|||
void gst_check_element_push_buffer (const gchar * element_name,
|
||||
GstBuffer * buffer_in, GstBuffer * buffer_out);
|
||||
GstPad *gst_check_setup_sink_pad (GstElement * element,
|
||||
GstStaticPadTemplate * tmpl, GstCaps * caps);
|
||||
GstStaticPadTemplate * tmpl);
|
||||
void gst_check_teardown_sink_pad (GstElement * element);
|
||||
void gst_check_abi_list (GstCheckABIStruct list[], gboolean have_abi_sizes);
|
||||
gint gst_check_run_suite (Suite * suite, const gchar * name,
|
||||
|
|
|
@ -50,7 +50,7 @@ GST_START_TEST (test_unfixed_downstream_caps)
|
|||
gst_bin_add_many (GST_BIN (pipe), src, filter, NULL);
|
||||
fail_unless (gst_element_link (src, filter));
|
||||
|
||||
mysinkpad = gst_check_setup_sink_pad (filter, &sinktemplate, NULL);
|
||||
mysinkpad = gst_check_setup_sink_pad (filter, &sinktemplate);
|
||||
gst_pad_set_active (mysinkpad, TRUE);
|
||||
|
||||
fail_unless_equals_int (gst_element_set_state (pipe, GST_STATE_PLAYING),
|
||||
|
|
|
@ -53,7 +53,7 @@ setup_fakesrc (void)
|
|||
|
||||
GST_DEBUG ("setup_fakesrc");
|
||||
fakesrc = gst_check_setup_element ("fakesrc");
|
||||
mysinkpad = gst_check_setup_sink_pad (fakesrc, &sinktemplate, NULL);
|
||||
mysinkpad = gst_check_setup_sink_pad (fakesrc, &sinktemplate);
|
||||
gst_pad_set_event_function (mysinkpad, event_func);
|
||||
gst_pad_set_active (mysinkpad, TRUE);
|
||||
have_eos = FALSE;
|
||||
|
|
|
@ -56,7 +56,7 @@ setup_fdsrc (void)
|
|||
|
||||
GST_DEBUG ("setup_fdsrc");
|
||||
fdsrc = gst_check_setup_element ("fdsrc");
|
||||
mysinkpad = gst_check_setup_sink_pad (fdsrc, &sinktemplate, NULL);
|
||||
mysinkpad = gst_check_setup_sink_pad (fdsrc, &sinktemplate);
|
||||
gst_pad_set_event_function (mysinkpad, event_func);
|
||||
gst_pad_set_active (mysinkpad, TRUE);
|
||||
return fdsrc;
|
||||
|
|
|
@ -48,7 +48,7 @@ setup_filesink (void)
|
|||
|
||||
GST_DEBUG ("setup_filesink");
|
||||
filesink = gst_check_setup_element ("filesink");
|
||||
mysrcpad = gst_check_setup_src_pad (filesink, &srctemplate, NULL);
|
||||
mysrcpad = gst_check_setup_src_pad (filesink, &srctemplate);
|
||||
gst_pad_set_active (mysrcpad, TRUE);
|
||||
return filesink;
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ setup_filesrc (void)
|
|||
|
||||
GST_DEBUG ("setup_filesrc");
|
||||
filesrc = gst_check_setup_element ("filesrc");
|
||||
mysinkpad = gst_check_setup_sink_pad (filesrc, &sinktemplate, NULL);
|
||||
mysinkpad = gst_check_setup_sink_pad (filesrc, &sinktemplate);
|
||||
gst_pad_set_event_function (mysinkpad, event_func);
|
||||
gst_pad_set_active (mysinkpad, TRUE);
|
||||
|
||||
|
|
|
@ -62,8 +62,8 @@ setup_identity (void)
|
|||
GST_DEBUG ("setup_identity");
|
||||
|
||||
identity = gst_check_setup_element ("identity");
|
||||
mysrcpad = gst_check_setup_src_pad (identity, &srctemplate, NULL);
|
||||
mysinkpad = gst_check_setup_sink_pad (identity, &sinktemplate, NULL);
|
||||
mysrcpad = gst_check_setup_src_pad (identity, &srctemplate);
|
||||
mysinkpad = gst_check_setup_sink_pad (identity, &sinktemplate);
|
||||
gst_pad_set_event_function (mysinkpad, event_func);
|
||||
gst_pad_set_active (mysrcpad, TRUE);
|
||||
gst_pad_set_active (mysinkpad, TRUE);
|
||||
|
|
|
@ -97,7 +97,7 @@ setup (void)
|
|||
queue = gst_check_setup_element ("queue");
|
||||
g_signal_connect (queue, "underrun", G_CALLBACK (queue_underrun), NULL);
|
||||
|
||||
mysrcpad = gst_check_setup_src_pad (queue, &srctemplate, NULL);
|
||||
mysrcpad = gst_check_setup_src_pad (queue, &srctemplate);
|
||||
gst_pad_set_active (mysrcpad, TRUE);
|
||||
|
||||
mysinkpad = NULL;
|
||||
|
@ -167,7 +167,7 @@ GST_START_TEST (test_non_leaky_underrun)
|
|||
{
|
||||
g_signal_connect (queue, "overrun", G_CALLBACK (queue_overrun), NULL);
|
||||
g_object_set (G_OBJECT (queue), "max-size-buffers", 2, NULL);
|
||||
mysinkpad = gst_check_setup_sink_pad (queue, &sinktemplate, NULL);
|
||||
mysinkpad = gst_check_setup_sink_pad (queue, &sinktemplate);
|
||||
gst_pad_set_active (mysinkpad, TRUE);
|
||||
|
||||
GST_DEBUG ("starting");
|
||||
|
|
|
@ -241,7 +241,7 @@ run_output_selector_buffer_count (gint num_output_pads,
|
|||
gint i = 0;
|
||||
GList *output_pads = NULL, *input_pads = NULL;
|
||||
GstElement *sel = gst_check_setup_element ("output-selector");
|
||||
GstPad *input_pad = gst_check_setup_src_pad (sel, &srctemplate, NULL);
|
||||
GstPad *input_pad = gst_check_setup_src_pad (sel, &srctemplate);
|
||||
|
||||
input_pads = g_list_append (input_pads, input_pad);
|
||||
gst_pad_set_active (input_pad, TRUE);
|
||||
|
@ -308,7 +308,7 @@ run_input_selector_buffer_count (gint num_input_pads,
|
|||
gint i = 0, probe_id = 0;
|
||||
GList *input_pads = NULL, *output_pads = NULL;
|
||||
GstElement *sel = gst_check_setup_element ("input-selector");
|
||||
GstPad *output_pad = gst_check_setup_sink_pad (sel, &sinktemplate, NULL);
|
||||
GstPad *output_pad = gst_check_setup_sink_pad (sel, &sinktemplate);
|
||||
|
||||
output_pads = g_list_append (output_pads, output_pad);
|
||||
gst_pad_set_active (output_pad, TRUE);
|
||||
|
@ -434,7 +434,7 @@ static void
|
|||
setup_output_selector (void)
|
||||
{
|
||||
sel = gst_check_setup_element ("output-selector");
|
||||
input_pad = gst_check_setup_src_pad (sel, &srctemplate, NULL);
|
||||
input_pad = gst_check_setup_src_pad (sel, &srctemplate);
|
||||
gst_pad_set_active (input_pad, TRUE);
|
||||
|
||||
output_pads = g_list_append (output_pads, setup_output_pad (sel,
|
||||
|
|
Loading…
Reference in a new issue