#include <gst/gst.h>
#include <gst/base/gstcollectpads.h>
#include <gst/check/gsttestclock.h>
#include <gst/controller/gstinterpolationcontrolsource.h>
#include <gst/controller/gstlfocontrolsource.h>
#include <gst/controller/gsttriggercontrolsource.h>

GstStaticPadTemplate static_template = GST_STATIC_PAD_TEMPLATE ("static_template", GST_PAD_SINK, GST_PAD_ALWAYS, GST_STATIC_CAPS_NONE);

#define TEST(function, ...) \
do { \
    GstObject* object = GST_OBJECT(function (__VA_ARGS__)); \
    g_print (#function " returns %s\n", g_object_is_floating (object) ? "floating" : "transfer full"); \
    gst_object_unref (object); \
} while (0);

int main(int argc, char** argv) {
    gst_init (&argc, &argv);
    GstPadTemplate* template = gst_pad_template_new ("template", GST_PAD_SRC, GST_PAD_ALWAYS, GST_CAPS_NONE);

    TEST(gst_buffer_pool_new);
    TEST(gst_bus_new);
    TEST(gst_task_new, 0, 0, 0);
    TEST(gst_task_pool_new);
    TEST(gst_collect_pads_new);
    TEST(gst_test_clock_new);
    TEST(gst_interpolation_control_source_new);
    TEST(gst_lfo_control_source_new);
    TEST(gst_trigger_control_source_new);
    TEST(gst_pad_new, 0, GST_PAD_SINK);
    TEST(gst_pad_new_from_template, template, 0);
    TEST(gst_pad_new_from_static_template, &static_template, 0);

    gst_object_unref (template);
    return 0;
};
