summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@gnome.org>2015-06-25 11:03:12 +0200
committerThibault Saunier <tsaunier@gnome.org>2015-06-25 11:03:12 +0200
commit55f06012110b5ef2333599cc4f551b7817d368b9 (patch)
tree5764458e5b5a476527f09e868712cab34f1084de /tests
parent2994650f9e83709c29145c155bc4901e672aed34 (diff)
nle: Port tests to the "commit" action signals
Now that nle_object_commit symbol is hidden, we can't use it in the tests.
Diffstat (limited to 'tests')
-rw-r--r--tests/check/nle/common.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/tests/check/nle/common.c b/tests/check/nle/common.c
index 1862b2f74e..800e3c3a19 100644
--- a/tests/check/nle/common.c
+++ b/tests/check/nle/common.c
@@ -1,5 +1,4 @@
#include "common.h"
-#include "../../../ges/nle/nleobject.h"
void
poll_the_bus (GstBus * bus)
@@ -32,6 +31,16 @@ poll_the_bus (GstBus * bus)
}
}
+static gboolean
+nle_object_commit (GstElement * nlesource, gboolean recurse)
+{
+ gboolean ret;
+
+ g_signal_emit_by_name (nlesource, "commit", recurse, &ret);
+
+ return ret;
+}
+
GstElement *
gst_element_factory_make_or_warn (const gchar * factoryname, const gchar * name)
{
@@ -178,7 +187,7 @@ new_nle_src (const gchar * name, guint64 start, gint64 duration, gint priority)
g_object_set (G_OBJECT (nlesource),
"start", start,
"duration", duration, "inpoint", start, "priority", priority, NULL);
- nle_object_commit (NLE_OBJECT (nlesource), FALSE);
+ nle_object_commit (nlesource, FALSE);
return nlesource;
}
@@ -370,7 +379,7 @@ commit_and_wait (GstElement * comp, gboolean * ret)
gulong handler_id =
g_signal_connect (comp, "commited", (GCallback) commited_cb, NULL);
g_mutex_lock (&lock);
- *ret = nle_object_commit (NLE_OBJECT (comp), TRUE);
+ *ret = nle_object_commit (comp, TRUE);
g_cond_wait (&cond, &lock);
g_mutex_unlock (&lock);
g_signal_handler_disconnect (comp, handler_id);