#include #define ITERS 100000 #include "mem.h" static void print_pad_props (GstPad *pad) { g_print ("name %s\n", gst_pad_get_name (pad)); g_print ("flags 0x%08x\n", GST_FLAGS (pad)); } static GstElement* create_element (gchar *padname, GstPadDirection dir) { GstElement *element; GstPad *pad; element = gst_element_new (); pad = gst_pad_new (padname, dir); gst_element_add_pad (element, pad); return element; } int main (int argc, gchar *argv[]) { GstElement *element; GstElement *element2; GstPad *pad; long usage1; gint i; gst_init (&argc, &argv); g_print ("creating new element\n"); element = gst_element_new (); usage1 = vmsize(); pad = gst_pad_new ("sink", GST_PAD_SINK); print_pad_props (pad); gst_element_add_pad (element, pad); print_pad_props (pad); g_print ("unref new element %ld\n", vmsize()-usage1); gst_object_unref (GST_OBJECT (element)); for (i=0; i