fix request pad

Make all request pads take _%u in the template.
Fix up unit tests.
This commit is contained in:
Wim Taymans 2011-11-03 17:49:45 +01:00
parent 555d7f384f
commit d169fa8728
12 changed files with 54 additions and 53 deletions

View file

@ -94,7 +94,7 @@ gst_funnel_pad_init (GstFunnelPad * pad)
} }
static GstStaticPadTemplate funnel_sink_template = static GstStaticPadTemplate funnel_sink_template =
GST_STATIC_PAD_TEMPLATE ("sink%d", GST_STATIC_PAD_TEMPLATE ("sink_%u",
GST_PAD_SINK, GST_PAD_SINK,
GST_PAD_REQUEST, GST_PAD_REQUEST,
GST_STATIC_CAPS_ANY); GST_STATIC_CAPS_ANY);

View file

@ -80,7 +80,7 @@ static GStaticRecMutex notify_mutex = G_STATIC_REC_MUTEX_INIT;
#define GST_INPUT_SELECTOR_BROADCAST(sel) (g_cond_broadcast (GST_INPUT_SELECTOR_GET_COND(sel))) #define GST_INPUT_SELECTOR_BROADCAST(sel) (g_cond_broadcast (GST_INPUT_SELECTOR_GET_COND(sel)))
static GstStaticPadTemplate gst_input_selector_sink_factory = static GstStaticPadTemplate gst_input_selector_sink_factory =
GST_STATIC_PAD_TEMPLATE ("sink%d", GST_STATIC_PAD_TEMPLATE ("sink_%u",
GST_PAD_SINK, GST_PAD_SINK,
GST_PAD_REQUEST, GST_PAD_REQUEST,
GST_STATIC_CAPS_ANY); GST_STATIC_CAPS_ANY);
@ -1286,7 +1286,7 @@ gst_input_selector_request_new_pad (GstElement * element,
GST_INPUT_SELECTOR_LOCK (sel); GST_INPUT_SELECTOR_LOCK (sel);
GST_LOG_OBJECT (sel, "Creating new pad %d", sel->padcount); GST_LOG_OBJECT (sel, "Creating new pad %d", sel->padcount);
name = g_strdup_printf ("sink%d", sel->padcount++); name = g_strdup_printf ("sink_%u", sel->padcount++);
sinkpad = g_object_new (GST_TYPE_SELECTOR_PAD, sinkpad = g_object_new (GST_TYPE_SELECTOR_PAD,
"name", name, "direction", templ->direction, "template", templ, NULL); "name", name, "direction", templ->direction, "template", templ, NULL);
g_free (name); g_free (name);

View file

@ -177,7 +177,7 @@ struct _GstMultiQueueItem
guint32 posid; guint32 posid;
}; };
static GstSingleQueue *gst_single_queue_new (GstMultiQueue * mqueue, gint id); static GstSingleQueue *gst_single_queue_new (GstMultiQueue * mqueue, guint id);
static void gst_single_queue_free (GstSingleQueue * squeue); static void gst_single_queue_free (GstSingleQueue * squeue);
static void wake_up_next_non_linked (GstMultiQueue * mq); static void wake_up_next_non_linked (GstMultiQueue * mq);
@ -186,12 +186,12 @@ static void compute_high_time (GstMultiQueue * mq);
static void single_queue_overrun_cb (GstDataQueue * dq, GstSingleQueue * sq); static void single_queue_overrun_cb (GstDataQueue * dq, GstSingleQueue * sq);
static void single_queue_underrun_cb (GstDataQueue * dq, GstSingleQueue * sq); static void single_queue_underrun_cb (GstDataQueue * dq, GstSingleQueue * sq);
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink%d", static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink_%u",
GST_PAD_SINK, GST_PAD_SINK,
GST_PAD_REQUEST, GST_PAD_REQUEST,
GST_STATIC_CAPS_ANY); GST_STATIC_CAPS_ANY);
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src%d", static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src_%u",
GST_PAD_SRC, GST_PAD_SRC,
GST_PAD_SOMETIMES, GST_PAD_SOMETIMES,
GST_STATIC_CAPS_ANY); GST_STATIC_CAPS_ANY);
@ -620,10 +620,10 @@ gst_multi_queue_request_new_pad (GstElement * element, GstPadTemplate * temp,
{ {
GstMultiQueue *mqueue = GST_MULTI_QUEUE (element); GstMultiQueue *mqueue = GST_MULTI_QUEUE (element);
GstSingleQueue *squeue; GstSingleQueue *squeue;
gint temp_id = -1; guint temp_id = -1;
if (name) { if (name) {
sscanf (name + 4, "%d", &temp_id); sscanf (name + 4, "_%u", &temp_id);
GST_LOG_OBJECT (element, "name : %s (id %d)", GST_STR_NULL (name), temp_id); GST_LOG_OBJECT (element, "name : %s (id %d)", GST_STR_NULL (name), temp_id);
} }
@ -1871,12 +1871,12 @@ gst_single_queue_free (GstSingleQueue * sq)
} }
static GstSingleQueue * static GstSingleQueue *
gst_single_queue_new (GstMultiQueue * mqueue, gint id) gst_single_queue_new (GstMultiQueue * mqueue, guint id)
{ {
GstSingleQueue *sq; GstSingleQueue *sq;
gchar *name; gchar *name;
GList *tmp; GList *tmp;
gint temp_id = (id == -1) ? 0 : id; guint temp_id = (id == -1) ? 0 : id;
GST_MULTI_QUEUE_MUTEX_LOCK (mqueue); GST_MULTI_QUEUE_MUTEX_LOCK (mqueue);
@ -1937,7 +1937,7 @@ gst_single_queue_new (GstMultiQueue * mqueue, gint id)
sq->sink_tainted = TRUE; sq->sink_tainted = TRUE;
sq->src_tainted = TRUE; sq->src_tainted = TRUE;
name = g_strdup_printf ("sink%d", sq->id); name = g_strdup_printf ("sink_%u", sq->id);
sq->sinkpad = gst_pad_new_from_static_template (&sinktemplate, name); sq->sinkpad = gst_pad_new_from_static_template (&sinktemplate, name);
g_free (name); g_free (name);
@ -1954,7 +1954,7 @@ gst_single_queue_new (GstMultiQueue * mqueue, gint id)
gst_pad_set_iterate_internal_links_function (sq->sinkpad, gst_pad_set_iterate_internal_links_function (sq->sinkpad,
GST_DEBUG_FUNCPTR (gst_multi_queue_iterate_internal_links)); GST_DEBUG_FUNCPTR (gst_multi_queue_iterate_internal_links));
name = g_strdup_printf ("src%d", sq->id); name = g_strdup_printf ("src_%u", sq->id);
sq->srcpad = gst_pad_new_from_static_template (&srctemplate, name); sq->srcpad = gst_pad_new_from_static_template (&srctemplate, name);
g_free (name); g_free (name);

View file

@ -44,7 +44,7 @@ GST_STATIC_PAD_TEMPLATE ("sink",
GST_STATIC_CAPS_ANY); GST_STATIC_CAPS_ANY);
static GstStaticPadTemplate gst_output_selector_src_factory = static GstStaticPadTemplate gst_output_selector_src_factory =
GST_STATIC_PAD_TEMPLATE ("src%d", GST_STATIC_PAD_TEMPLATE ("src_%u",
GST_PAD_SRC, GST_PAD_SRC,
GST_PAD_REQUEST, GST_PAD_REQUEST,
GST_STATIC_CAPS_ANY); GST_STATIC_CAPS_ANY);
@ -347,7 +347,7 @@ gst_output_selector_request_new_pad (GstElement * element,
GST_DEBUG_OBJECT (osel, "requesting pad"); GST_DEBUG_OBJECT (osel, "requesting pad");
GST_OBJECT_LOCK (osel); GST_OBJECT_LOCK (osel);
padname = g_strdup_printf ("src%d", osel->nb_srcpads++); padname = g_strdup_printf ("src_%u", osel->nb_srcpads++);
srcpad = gst_pad_new_from_template (templ, padname); srcpad = gst_pad_new_from_template (templ, padname);
GST_OBJECT_UNLOCK (osel); GST_OBJECT_UNLOCK (osel);

View file

@ -100,7 +100,8 @@ enum
PROP_ALLOC_PAD, PROP_ALLOC_PAD,
}; };
static GstStaticPadTemplate tee_src_template = GST_STATIC_PAD_TEMPLATE ("src%d", static GstStaticPadTemplate tee_src_template =
GST_STATIC_PAD_TEMPLATE ("src_%u",
GST_PAD_SRC, GST_PAD_SRC,
GST_PAD_REQUEST, GST_PAD_REQUEST,
GST_STATIC_CAPS_ANY); GST_STATIC_CAPS_ANY);
@ -298,7 +299,7 @@ gst_tee_request_new_pad (GstElement * element, GstPadTemplate * templ,
GST_DEBUG_OBJECT (tee, "requesting pad"); GST_DEBUG_OBJECT (tee, "requesting pad");
GST_OBJECT_LOCK (tee); GST_OBJECT_LOCK (tee);
name = g_strdup_printf ("src%d", tee->pad_counter++); name = g_strdup_printf ("src_%u", tee->pad_counter++);
srcpad = gst_pad_new_from_template (templ, name); srcpad = gst_pad_new_from_template (templ, name);
g_free (name); g_free (name);

View file

@ -71,7 +71,7 @@ struct _GstTee {
GstPad *sinkpad; GstPad *sinkpad;
GstPad *allocpad; GstPad *allocpad;
gint pad_counter; guint pad_counter;
gboolean has_chain; gboolean has_chain;
gboolean has_sink_loop; gboolean has_sink_loop;

View file

@ -43,13 +43,13 @@ setup_test_objects (struct TestData *td, GstPadChainFunction chain_func)
td->funnelsrc = gst_element_get_static_pad (td->funnel, "src"); td->funnelsrc = gst_element_get_static_pad (td->funnel, "src");
fail_unless (td->funnelsrc != NULL); fail_unless (td->funnelsrc != NULL);
td->funnelsink11 = gst_element_get_request_pad (td->funnel, "sink11"); td->funnelsink11 = gst_element_get_request_pad (td->funnel, "sink_11");
fail_unless (td->funnelsink11 != NULL); fail_unless (td->funnelsink11 != NULL);
fail_unless (!strcmp (GST_OBJECT_NAME (td->funnelsink11), "sink11")); fail_unless (!strcmp (GST_OBJECT_NAME (td->funnelsink11), "sink_11"));
td->funnelsink22 = gst_element_get_request_pad (td->funnel, "sink22"); td->funnelsink22 = gst_element_get_request_pad (td->funnel, "sink_22");
fail_unless (td->funnelsink22 != NULL); fail_unless (td->funnelsink22 != NULL);
fail_unless (!strcmp (GST_OBJECT_NAME (td->funnelsink22), "sink22")); fail_unless (!strcmp (GST_OBJECT_NAME (td->funnelsink22), "sink_22"));
fail_unless (gst_element_set_state (td->funnel, GST_STATE_PLAYING) == fail_unless (gst_element_set_state (td->funnel, GST_STATE_PLAYING) ==
GST_STATE_CHANGE_SUCCESS); GST_STATE_CHANGE_SUCCESS);

View file

@ -41,7 +41,7 @@ setup_multiqueue (GstElement * pipe, GstElement * inputs[],
GstPad *srcpad = NULL; GstPad *srcpad = NULL;
/* create multiqueue sink (and source) pad */ /* create multiqueue sink (and source) pad */
sinkpad = gst_element_get_request_pad (mq, "sink%d"); sinkpad = gst_element_get_request_pad (mq, "sink_%u");
fail_unless (sinkpad != NULL, fail_unless (sinkpad != NULL,
"failed to create multiqueue request pad #%u", i); "failed to create multiqueue request pad #%u", i);
@ -66,10 +66,10 @@ setup_multiqueue (GstElement * pipe, GstElement * inputs[],
/* only the sink pads are by request, the source pads are sometimes pads, /* only the sink pads are by request, the source pads are sometimes pads,
* so this should return NULL */ * so this should return NULL */
srcpad = gst_element_get_request_pad (mq, "src%d"); srcpad = gst_element_get_request_pad (mq, "src_%u");
fail_unless (srcpad == NULL); fail_unless (srcpad == NULL);
g_snprintf (padname, sizeof (padname), "src%d", i); g_snprintf (padname, sizeof (padname), "src_%u", i);
srcpad = gst_element_get_static_pad (mq, padname); srcpad = gst_element_get_static_pad (mq, padname);
fail_unless (srcpad != NULL, "failed to get multiqueue src pad #%u", i); fail_unless (srcpad != NULL, "failed to get multiqueue src pad #%u", i);
fail_unless (GST_PAD_IS_SRC (srcpad), fail_unless (GST_PAD_IS_SRC (srcpad),
@ -193,21 +193,21 @@ GST_START_TEST (test_request_pads)
mq = gst_element_factory_make ("multiqueue", NULL); mq = gst_element_factory_make ("multiqueue", NULL);
sink1 = gst_element_get_request_pad (mq, "foo%d"); sink1 = gst_element_get_request_pad (mq, "foo_%u");
fail_unless (sink1 == NULL, fail_unless (sink1 == NULL,
"Expected NULL pad, as there is no request pad template for 'foo%%d'"); "Expected NULL pad, as there is no request pad template for 'foo_%%u'");
sink1 = gst_element_get_request_pad (mq, "src%d"); sink1 = gst_element_get_request_pad (mq, "src_%u");
fail_unless (sink1 == NULL, fail_unless (sink1 == NULL,
"Expected NULL pad, as there is no request pad template for 'src%%d'"); "Expected NULL pad, as there is no request pad template for 'src_%%u'");
sink1 = gst_element_get_request_pad (mq, "sink%d"); sink1 = gst_element_get_request_pad (mq, "sink_%u");
fail_unless (sink1 != NULL); fail_unless (sink1 != NULL);
fail_unless (GST_IS_PAD (sink1)); fail_unless (GST_IS_PAD (sink1));
fail_unless (GST_PAD_IS_SINK (sink1)); fail_unless (GST_PAD_IS_SINK (sink1));
GST_LOG ("Got pad %s:%s", GST_DEBUG_PAD_NAME (sink1)); GST_LOG ("Got pad %s:%s", GST_DEBUG_PAD_NAME (sink1));
sink2 = gst_element_get_request_pad (mq, "sink%d"); sink2 = gst_element_get_request_pad (mq, "sink_%u");
fail_unless (sink2 != NULL); fail_unless (sink2 != NULL);
fail_unless (GST_IS_PAD (sink2)); fail_unless (GST_IS_PAD (sink2));
fail_unless (GST_PAD_IS_SINK (sink2)); fail_unless (GST_PAD_IS_SINK (sink2));
@ -233,7 +233,7 @@ mq_sinkpad_to_srcpad (GstElement * mq, GstPad * sink)
mq_sinkpad_name = gst_pad_get_name (sink); mq_sinkpad_name = gst_pad_get_name (sink);
fail_unless (g_str_has_prefix (mq_sinkpad_name, "sink")); fail_unless (g_str_has_prefix (mq_sinkpad_name, "sink"));
mq_srcpad_name = g_strdup_printf ("src%s", mq_sinkpad_name + 4); mq_srcpad_name = g_strdup_printf ("src_%s", mq_sinkpad_name + 5);
srcpad = gst_element_get_static_pad (mq, mq_srcpad_name); srcpad = gst_element_get_static_pad (mq, mq_srcpad_name);
fail_unless (srcpad != NULL); fail_unless (srcpad != NULL);
@ -250,33 +250,33 @@ GST_START_TEST (test_request_pads_named)
mq = gst_element_factory_make ("multiqueue", NULL); mq = gst_element_factory_make ("multiqueue", NULL);
sink1 = gst_element_get_request_pad (mq, "sink1"); sink1 = gst_element_get_request_pad (mq, "sink_1");
fail_unless (sink1 != NULL); fail_unless (sink1 != NULL);
fail_unless (GST_IS_PAD (sink1)); fail_unless (GST_IS_PAD (sink1));
fail_unless (GST_PAD_IS_SINK (sink1)); fail_unless (GST_PAD_IS_SINK (sink1));
fail_unless_equals_string (GST_PAD_NAME (sink1), "sink1"); fail_unless_equals_string (GST_PAD_NAME (sink1), "sink_1");
GST_LOG ("Got pad %s:%s", GST_DEBUG_PAD_NAME (sink1)); GST_LOG ("Got pad %s:%s", GST_DEBUG_PAD_NAME (sink1));
sink3 = gst_element_get_request_pad (mq, "sink3"); sink3 = gst_element_get_request_pad (mq, "sink_3");
fail_unless (sink3 != NULL); fail_unless (sink3 != NULL);
fail_unless (GST_IS_PAD (sink3)); fail_unless (GST_IS_PAD (sink3));
fail_unless (GST_PAD_IS_SINK (sink3)); fail_unless (GST_PAD_IS_SINK (sink3));
fail_unless_equals_string (GST_PAD_NAME (sink3), "sink3"); fail_unless_equals_string (GST_PAD_NAME (sink3), "sink_3");
GST_LOG ("Got pad %s:%s", GST_DEBUG_PAD_NAME (sink3)); GST_LOG ("Got pad %s:%s", GST_DEBUG_PAD_NAME (sink3));
sink2 = gst_element_get_request_pad (mq, "sink2"); sink2 = gst_element_get_request_pad (mq, "sink_2");
fail_unless (sink2 != NULL); fail_unless (sink2 != NULL);
fail_unless (GST_IS_PAD (sink2)); fail_unless (GST_IS_PAD (sink2));
fail_unless (GST_PAD_IS_SINK (sink2)); fail_unless (GST_PAD_IS_SINK (sink2));
fail_unless_equals_string (GST_PAD_NAME (sink2), "sink2"); fail_unless_equals_string (GST_PAD_NAME (sink2), "sink_2");
GST_LOG ("Got pad %s:%s", GST_DEBUG_PAD_NAME (sink2)); GST_LOG ("Got pad %s:%s", GST_DEBUG_PAD_NAME (sink2));
/* This gets us the first unused id, sink0 */ /* This gets us the first unused id, sink0 */
sink4 = gst_element_get_request_pad (mq, "sink%d"); sink4 = gst_element_get_request_pad (mq, "sink_%u");
fail_unless (sink4 != NULL); fail_unless (sink4 != NULL);
fail_unless (GST_IS_PAD (sink4)); fail_unless (GST_IS_PAD (sink4));
fail_unless (GST_PAD_IS_SINK (sink4)); fail_unless (GST_PAD_IS_SINK (sink4));
fail_unless_equals_string (GST_PAD_NAME (sink4), "sink0"); fail_unless_equals_string (GST_PAD_NAME (sink4), "sink_0");
GST_LOG ("Got pad %s:%s", GST_DEBUG_PAD_NAME (sink4)); GST_LOG ("Got pad %s:%s", GST_DEBUG_PAD_NAME (sink4));
GST_LOG ("Cleaning up"); GST_LOG ("Cleaning up");
@ -434,7 +434,7 @@ run_output_order_test (gint n_linked)
g_free (name); g_free (name);
gst_pad_set_getcaps_function (inputpads[i], mq_dummypad_getcaps); gst_pad_set_getcaps_function (inputpads[i], mq_dummypad_getcaps);
mq_sinkpad = gst_element_get_request_pad (mq, "sink%d"); mq_sinkpad = gst_element_get_request_pad (mq, "sink_%u");
fail_unless (mq_sinkpad != NULL); fail_unless (mq_sinkpad != NULL);
gst_pad_link (inputpads[i], mq_sinkpad); gst_pad_link (inputpads[i], mq_sinkpad);
@ -590,7 +590,7 @@ GST_START_TEST (test_sparse_stream)
g_free (name); g_free (name);
gst_pad_set_getcaps_function (inputpads[i], mq_dummypad_getcaps); gst_pad_set_getcaps_function (inputpads[i], mq_dummypad_getcaps);
mq_sinkpad = gst_element_get_request_pad (mq, "sink%d"); mq_sinkpad = gst_element_get_request_pad (mq, "sink_%u");
fail_unless (mq_sinkpad != NULL); fail_unless (mq_sinkpad != NULL);
gst_pad_link (inputpads[i], mq_sinkpad); gst_pad_link (inputpads[i], mq_sinkpad);

View file

@ -82,7 +82,7 @@ setup_output_pad (GstElement * element, GstStaticPadTemplate * tmpl)
GINT_TO_POINTER (probe_id)); GINT_TO_POINTER (probe_id));
/* request src pad */ /* request src pad */
srcpad = gst_element_get_request_pad (element, "src%d"); srcpad = gst_element_get_request_pad (element, "src_%u");
fail_if (srcpad == NULL, "Could not get source pad from %s", fail_if (srcpad == NULL, "Could not get source pad from %s",
GST_ELEMENT_NAME (element)); GST_ELEMENT_NAME (element));
@ -278,7 +278,7 @@ setup_input_pad (GstElement * element)
fail_if (input_pad == NULL, "Could not create a input_pad"); fail_if (input_pad == NULL, "Could not create a input_pad");
/* request sink pad */ /* request sink pad */
sinkpad = gst_element_get_request_pad (element, "sink%d"); sinkpad = gst_element_get_request_pad (element, "sink_%u");
fail_if (sinkpad == NULL, "Could not get sink pad from %s", fail_if (sinkpad == NULL, "Could not get sink pad from %s",
GST_ELEMENT_NAME (element)); GST_ELEMENT_NAME (element));

View file

@ -78,7 +78,7 @@ GST_START_TEST (test_num_buffers)
g_object_set (sinks[i], "signal-handoffs", TRUE, NULL); g_object_set (sinks[i], "signal-handoffs", TRUE, NULL);
g_signal_connect (sinks[i], "handoff", (GCallback) handoff, &counts[i]); g_signal_connect (sinks[i], "handoff", (GCallback) handoff, &counts[i]);
req_pads[i] = gst_element_get_request_pad (tee, "src%d"); req_pads[i] = gst_element_get_request_pad (tee, "src_%u");
fail_unless (req_pads[i] != NULL); fail_unless (req_pads[i] != NULL);
qpad = gst_element_get_static_pad (queues[i], "sink"); qpad = gst_element_get_static_pad (queues[i], "sink");
@ -144,7 +144,7 @@ GST_START_TEST (test_stress)
for (i = 0; i < 50000; i++) { for (i = 0; i < 50000; i++) {
GstPad *pad; GstPad *pad;
pad = gst_element_get_request_pad (tee, "src%d"); pad = gst_element_get_request_pad (tee, "src_%u");
gst_element_release_request_pad (tee, pad); gst_element_release_request_pad (tee, pad);
gst_object_unref (pad); gst_object_unref (pad);
@ -203,7 +203,7 @@ buffer_alloc_harness_setup (BufferAllocHarness * h, gint countdown)
h->tee_sinkpad = gst_element_get_static_pad (h->tee, "sink"); h->tee_sinkpad = gst_element_get_static_pad (h->tee, "sink");
fail_if (h->tee_sinkpad == NULL); fail_if (h->tee_sinkpad == NULL);
h->tee_srcpad = gst_element_get_request_pad (h->tee, "src%d"); h->tee_srcpad = gst_element_get_request_pad (h->tee, "src_%u");
fail_if (h->tee_srcpad == NULL); fail_if (h->tee_srcpad == NULL);
h->final_sinkpad = gst_pad_new ("sink", GST_PAD_SINK); h->final_sinkpad = gst_pad_new ("sink", GST_PAD_SINK);
@ -355,7 +355,7 @@ GST_START_TEST (test_internal_links)
fail_unless (res == GST_ITERATOR_DONE); fail_unless (res == GST_ITERATOR_DONE);
fail_unless (g_value_get_object (&val1) == NULL); fail_unless (g_value_get_object (&val1) == NULL);
srcpad1 = gst_element_get_request_pad (tee, "src%d"); srcpad1 = gst_element_get_request_pad (tee, "src_%u");
fail_unless (srcpad1 != NULL); fail_unless (srcpad1 != NULL);
/* iterator should resync */ /* iterator should resync */
@ -375,7 +375,7 @@ GST_START_TEST (test_internal_links)
fail_unless (res == GST_ITERATOR_DONE); fail_unless (res == GST_ITERATOR_DONE);
fail_unless (g_value_get_object (&val1) == NULL); fail_unless (g_value_get_object (&val1) == NULL);
srcpad2 = gst_element_get_request_pad (tee, "src%d"); srcpad2 = gst_element_get_request_pad (tee, "src_%u");
fail_unless (srcpad2 != NULL); fail_unless (srcpad2 != NULL);
/* iterator should resync */ /* iterator should resync */
@ -468,9 +468,9 @@ GST_START_TEST (test_flow_aggregation)
fail_unless (tee != NULL); fail_unless (tee != NULL);
teesink = gst_element_get_static_pad (tee, "sink"); teesink = gst_element_get_static_pad (tee, "sink");
fail_unless (teesink != NULL); fail_unless (teesink != NULL);
teesrc1 = gst_element_get_request_pad (tee, "src%d"); teesrc1 = gst_element_get_request_pad (tee, "src_%u");
fail_unless (teesrc1 != NULL); fail_unless (teesrc1 != NULL);
teesrc2 = gst_element_get_request_pad (tee, "src%d"); teesrc2 = gst_element_get_request_pad (tee, "src_%u");
fail_unless (teesrc2 != NULL); fail_unless (teesrc2 != NULL);
GST_DEBUG ("Creating mysink1"); GST_DEBUG ("Creating mysink1");

View file

@ -985,12 +985,12 @@ GST_START_TEST (test_pad_proxy_getcaps_aggregation)
tee = gst_element_factory_make ("tee", "tee"); tee = gst_element_factory_make ("tee", "tee");
sink1 = gst_element_factory_make ("fakesink", "sink1"); sink1 = gst_element_factory_make ("fakesink", "sink1");
tee_src1 = gst_element_get_request_pad (tee, "src%d"); tee_src1 = gst_element_get_request_pad (tee, "src_%u");
sink1_sink = gst_element_get_static_pad (sink1, "sink"); sink1_sink = gst_element_get_static_pad (sink1, "sink");
fail_unless_equals_int (gst_pad_link (tee_src1, sink1_sink), GST_PAD_LINK_OK); fail_unless_equals_int (gst_pad_link (tee_src1, sink1_sink), GST_PAD_LINK_OK);
sink2 = gst_element_factory_make ("fakesink", "sink2"); sink2 = gst_element_factory_make ("fakesink", "sink2");
tee_src2 = gst_element_get_request_pad (tee, "src%d"); tee_src2 = gst_element_get_request_pad (tee, "src_%u");
sink2_sink = gst_element_get_static_pad (sink2, "sink"); sink2_sink = gst_element_get_static_pad (sink2, "sink");
fail_unless_equals_int (gst_pad_link (tee_src2, sink2_sink), GST_PAD_LINK_OK); fail_unless_equals_int (gst_pad_link (tee_src2, sink2_sink), GST_PAD_LINK_OK);

View file

@ -135,7 +135,7 @@ GST_END_TEST;
#define PIPELINE4 "fakesrc num-buffers=4 .src ! identity silent=true !.sink identity silent=true .src ! .sink fakesink silent=true" #define PIPELINE4 "fakesrc num-buffers=4 .src ! identity silent=true !.sink identity silent=true .src ! .sink fakesink silent=true"
#define PIPELINE5 "fakesrc num-buffers=4 name=src identity silent=true name=id1 identity silent=true name = id2 fakesink silent=true name =sink src. ! id1. id1.! id2.sink id2.src!sink.sink" #define PIPELINE5 "fakesrc num-buffers=4 name=src identity silent=true name=id1 identity silent=true name = id2 fakesink silent=true name =sink src. ! id1. id1.! id2.sink id2.src!sink.sink"
#define PIPELINE6 "pipeline.(name=\"john\" fakesrc num-buffers=4 ( bin. ( ! queue ! identity silent=true !( queue ! fakesink silent=true )) ))" #define PIPELINE6 "pipeline.(name=\"john\" fakesrc num-buffers=4 ( bin. ( ! queue ! identity silent=true !( queue ! fakesink silent=true )) ))"
#define PIPELINE7 "fakesrc num-buffers=4 ! tee name=tee .src%d! queue ! fakesink silent=true tee.src%d ! queue ! fakesink silent=true queue name =\"foo\" ! fakesink silent=true tee.src%d ! foo." #define PIPELINE7 "fakesrc num-buffers=4 ! tee name=tee .src_%u! queue ! fakesink silent=true tee.src_%u ! queue ! fakesink silent=true queue name =\"foo\" ! fakesink silent=true tee.src_%u ! foo."
/* aggregator is borked /* aggregator is borked
* #define PIPELINE8 "fakesrc num-buffers=4 ! tee name=tee1 .src0,src1 ! .sink0, sink1 aggregator ! fakesink silent=true" * #define PIPELINE8 "fakesrc num-buffers=4 ! tee name=tee1 .src0,src1 ! .sink0, sink1 aggregator ! fakesink silent=true"
* */ * */