gst_object_unref (element);
}
+/* FIXME: set_caps isn't that useful
+ */
GstPad *
gst_check_setup_src_pad (GstElement * element,
GstStaticPadTemplate * srctemplate, GstCaps * caps)
{
GstPad *srcpad, *sinkpad;
+ GST_DEBUG_OBJECT (element, "setting up sending pad");
/* sending pad */
srcpad =
gst_pad_new_from_template (gst_static_pad_template_get (srctemplate),
fail_if (sinkpad == NULL, "Could not get sink pad from %s",
GST_ELEMENT_NAME (element));
ASSERT_OBJECT_REFCOUNT (sinkpad, "sinkpad", 2);
- gst_pad_set_caps (srcpad, caps);
+ fail_unless (gst_pad_set_caps (srcpad, caps));
fail_unless (gst_pad_link (srcpad, sinkpad) == GST_PAD_LINK_OK,
"Could not link source and %s sink pads", GST_ELEMENT_NAME (element));
gst_object_unref (sinkpad); /* because we got it higher up */
gst_object_unref (srcpad);
}
+/* 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 * template,
GstCaps * caps)
{
GstPad *srcpad, *sinkpad;
+ GST_DEBUG_OBJECT (element, "setting up receiving pad");
/* receiving pad */
sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get (template),
srcpad = gst_element_get_pad (element, "src");
fail_if (srcpad == NULL, "Could not get source pad from %s",
GST_ELEMENT_NAME (element));
- gst_pad_set_caps (sinkpad, caps);
+ fail_unless (gst_pad_set_caps (sinkpad, caps));
gst_pad_set_chain_function (sinkpad, gst_check_chain_func);
fail_unless (gst_pad_link (srcpad, sinkpad) == GST_PAD_LINK_OK,
"'" #a "' (%d) is not equal to '" #b"' (%d)", first, second); \
} G_STMT_END;
+#define fail_unless_equals_uint64(a, b) \
+G_STMT_START { \
+ guint64 first = a; \
+ guint64 second = b; \
+ fail_unless(first == second, \
+ "'" #a "' (%" G_GUINT64_FORMAT ") is not equal to '" #b"' (%" \
+ G_GUINT64_FORMAT ")", first, second); \
+} G_STMT_END;
+
#define fail_unless_equals_string(a, b) \
G_STMT_START { \
gchar * first = a; \
gst_object_unref (element);
}
+/* FIXME: set_caps isn't that useful
+ */
GstPad *
gst_check_setup_src_pad (GstElement * element,
GstStaticPadTemplate * srctemplate, GstCaps * caps)
{
GstPad *srcpad, *sinkpad;
+ GST_DEBUG_OBJECT (element, "setting up sending pad");
/* sending pad */
srcpad =
gst_pad_new_from_template (gst_static_pad_template_get (srctemplate),
fail_if (sinkpad == NULL, "Could not get sink pad from %s",
GST_ELEMENT_NAME (element));
ASSERT_OBJECT_REFCOUNT (sinkpad, "sinkpad", 2);
- gst_pad_set_caps (srcpad, caps);
+ fail_unless (gst_pad_set_caps (srcpad, caps));
fail_unless (gst_pad_link (srcpad, sinkpad) == GST_PAD_LINK_OK,
"Could not link source and %s sink pads", GST_ELEMENT_NAME (element));
gst_object_unref (sinkpad); /* because we got it higher up */
gst_object_unref (srcpad);
}
+/* 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 * template,
GstCaps * caps)
{
GstPad *srcpad, *sinkpad;
+ GST_DEBUG_OBJECT (element, "setting up receiving pad");
/* receiving pad */
sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get (template),
srcpad = gst_element_get_pad (element, "src");
fail_if (srcpad == NULL, "Could not get source pad from %s",
GST_ELEMENT_NAME (element));
- gst_pad_set_caps (sinkpad, caps);
+ fail_unless (gst_pad_set_caps (sinkpad, caps));
gst_pad_set_chain_function (sinkpad, gst_check_chain_func);
fail_unless (gst_pad_link (srcpad, sinkpad) == GST_PAD_LINK_OK,
"'" #a "' (%d) is not equal to '" #b"' (%d)", first, second); \
} G_STMT_END;
+#define fail_unless_equals_uint64(a, b) \
+G_STMT_START { \
+ guint64 first = a; \
+ guint64 second = b; \
+ fail_unless(first == second, \
+ "'" #a "' (%" G_GUINT64_FORMAT ") is not equal to '" #b"' (%" \
+ G_GUINT64_FORMAT ")", first, second); \
+} G_STMT_END;
+
#define fail_unless_equals_string(a, b) \
G_STMT_START { \
gchar * first = a; \