summaryrefslogtreecommitdiff
path: root/libs/gst/base
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2009-10-28 09:26:32 +0100
committerEdward Hervey <bilboed@bilboed.com>2009-10-28 09:31:17 +0100
commit27284628e4123e85ae9719f0a2376a221940ae55 (patch)
tree722f9920935f9b5c501a71c50bb24fc65bea757c /libs/gst/base
parent118509af69be75c575a23838e1f9fe39eade31f9 (diff)
optimisation : Use g_object_newv where possible.
This avoids: * triple-checking for the GType when type-checking is enabled (see #597260) * Avoids going through an expensive no-argument checking which landed in glib-2.22 * Avoids going through 2 extrac functions (g_object_new -> g_object_new_valist)
Diffstat (limited to 'libs/gst/base')
-rw-r--r--libs/gst/base/gstadapter.c2
-rw-r--r--libs/gst/base/gstcollectpads.c2
-rw-r--r--libs/gst/base/gstdataqueue.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/libs/gst/base/gstadapter.c b/libs/gst/base/gstadapter.c
index d32655654..ae864d22d 100644
--- a/libs/gst/base/gstadapter.c
+++ b/libs/gst/base/gstadapter.c
@@ -192,7 +192,7 @@ gst_adapter_finalize (GObject * object)
GstAdapter *
gst_adapter_new (void)
{
- return g_object_new (GST_TYPE_ADAPTER, NULL);
+ return g_object_newv (GST_TYPE_ADAPTER, 0, NULL);
}
/**
diff --git a/libs/gst/base/gstcollectpads.c b/libs/gst/base/gstcollectpads.c
index 8f75e7e31..77a1ba3b0 100644
--- a/libs/gst/base/gstcollectpads.c
+++ b/libs/gst/base/gstcollectpads.c
@@ -164,7 +164,7 @@ gst_collect_pads_new (void)
{
GstCollectPads *newcoll;
- newcoll = g_object_new (GST_TYPE_COLLECT_PADS, NULL);
+ newcoll = g_object_newv (GST_TYPE_COLLECT_PADS, 0, NULL);
return newcoll;
}
diff --git a/libs/gst/base/gstdataqueue.c b/libs/gst/base/gstdataqueue.c
index 5dbd420c4..b408b425a 100644
--- a/libs/gst/base/gstdataqueue.c
+++ b/libs/gst/base/gstdataqueue.c
@@ -206,7 +206,7 @@ gst_data_queue_new_full (GstDataQueueCheckFullFunction checkfull,
g_return_val_if_fail (checkfull != NULL, NULL);
- ret = g_object_new (GST_TYPE_DATA_QUEUE, NULL);
+ ret = g_object_newv (GST_TYPE_DATA_QUEUE, 0, NULL);
ret->checkfull = checkfull;
ret->checkdata = checkdata;
ret->fullcallback = fullcallback;