summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2012-06-25 19:52:44 +0100
committerTim-Philipp Müller <tim@centricular.net>2012-06-25 20:18:32 +0100
commit03ac16c1d8e1641c5323340c5b8f91e7ab401535 (patch)
treea0f802cc0776c7354d3b043200aa6a4e08e375d1 /tests
parent17022f7ad11569bb75319bcccc6ad12a0a7576f8 (diff)
tocsetter: clean up and update API for refcounted TOCs
Let's keep it simple for now: gst_toc_setter_reset_toc() -> gst_toc_setter_reset() gst_toc_setter_get_toc_copy() -> removed gst_toc_setter_get_toc() -> returns a ref now gst_toc_setter_get_toc_entry_copy() -> removed, use TOC functions instead gst_toc_setter_get_toc_entry() -> removed, use TOC functions instead gst_toc_setter_add_toc_entry() -> removed, to avoid problems with (refcount-dependent) writability of TOC; use TOC functions instead
Diffstat (limited to 'tests')
-rw-r--r--tests/check/gst/gsttocsetter.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/tests/check/gst/gsttocsetter.c b/tests/check/gst/gsttocsetter.c
index 52c8f1e88..fae08d4c2 100644
--- a/tests/check/gst/gsttocsetter.c
+++ b/tests/check/gst/gsttocsetter.c
@@ -240,7 +240,9 @@ create_toc (void)
GST_START_TEST (test_set)
{
GstToc *toc;
+#if 0
GstTocEntry *entry, *ed;
+#endif
GstTocSetter *setter;
GstElement *enc;
@@ -255,10 +257,11 @@ GST_START_TEST (test_set)
gst_toc_setter_set_toc (setter, toc);
gst_toc_unref (toc);
- toc = gst_toc_setter_get_toc_copy (setter);
+ toc = gst_toc_setter_get_toc (setter);
CHECK_TOC (toc);
+#if 0
/* test entry adding into the root TOC */
entry = g_list_last (toc->entries)->data;
toc->entries = g_list_remove (toc->entries, entry);
@@ -268,10 +271,12 @@ GST_START_TEST (test_set)
gst_toc_unref (toc);
gst_toc_entry_unref (entry);
- toc = gst_toc_setter_get_toc_copy (setter);
+ toc = gst_toc_setter_get_toc (setter);
CHECK_TOC (toc);
+#endif
+#if 0
/* test entry adding into the arbitrary entry */
entry = gst_toc_find_entry (toc, ENTRY_CH2);
fail_if (entry == NULL);
@@ -282,10 +287,11 @@ GST_START_TEST (test_set)
gst_toc_setter_add_toc_entry (setter, ed->uid, entry);
CHECK_TOC (toc);
+#endif
gst_toc_unref (toc);
- gst_toc_setter_reset_toc (setter);
- toc = gst_toc_setter_get_toc_copy (setter);
+ gst_toc_setter_reset (setter);
+ toc = gst_toc_setter_get_toc (setter);
fail_unless (toc == NULL);
@@ -367,7 +373,7 @@ test_threads_thread_func3 (gpointer data)
g_timer_start (timer);
while (g_timer_elapsed (timer, NULL) < THREADS_TEST_SECONDS) {
- gst_toc_setter_reset_toc (setter);
+ gst_toc_setter_reset (setter);
}
g_timer_destroy (timer);