GstTocData *data = (GstTocData *) p;
if (data->toc)
- gst_toc_free (data->toc);
+ gst_toc_unref (data->toc);
g_mutex_clear (&data->lock);
g_mutex_lock (&data->lock);
if (data->toc) {
- gst_toc_free (data->toc);
+ gst_toc_unref (data->toc);
data->toc = NULL;
}
g_mutex_unlock (&data->lock);
* Return current TOC the setter uses. The difference between this
* function and gst_toc_setter_get_toc() is that this function returns deep
* copy of the TOC, so you can modify it in any way. This function is thread-safe.
- * Free it when done with gst_toc_free().
+ * Free it when done with gst_toc_unref().
*
* Returns: a copy of the current snapshot of the TOC used in the setter
* or NULL if none is used.
g_mutex_lock (&data->lock);
if (data->toc)
- gst_toc_free (data->toc);
+ gst_toc_unref (data->toc);
data->toc = gst_toc_copy (toc);
test_toc = gst_toc_copy (toc);
fail_if (test_toc == NULL);
CHECK_TOC (test_toc);
- gst_toc_free (test_toc);
+ gst_toc_unref (test_toc);
test_toc = NULL;
/* check TOC event handling */
fail_unless (updated == TRUE);
fail_if (test_toc == NULL);
CHECK_TOC (test_toc);
- gst_toc_free (test_toc);
+ gst_toc_unref (test_toc);
gst_event_unref (event);
updated = FALSE;
test_toc = NULL;
fail_unless (updated == TRUE);
fail_if (test_toc == NULL);
CHECK_TOC (test_toc);
- gst_toc_free (test_toc);
+ gst_toc_unref (test_toc);
gst_message_unref (message);
test_toc = NULL;
fail_unless_equals_string (uid, TEST_UID);
fail_if (test_toc == NULL);
CHECK_TOC (test_toc);
- gst_toc_free (test_toc);
+ gst_toc_unref (test_toc);
gst_query_unref (query);
g_free (uid);
/* and yet another one */
toc->entries = g_list_remove (toc->entries, ch);
- gst_toc_entry_free (ch);
+ gst_toc_entry_unref (ch);
ed = gst_toc_entry_new (GST_TOC_ENTRY_TYPE_EDITION, ENTRY_ED3);
ch = (GstTocEntry *) (toc->entries->data);
ch->subentries = g_list_prepend (ch->subentries, ed);
ASSERT_WARNING (message = gst_message_new_toc (NULL, toc, TRUE));
- gst_toc_free (toc);
+ gst_toc_unref (toc);
}
GST_END_TEST;
gst_toc_setter_set_toc (setter, toc);
- gst_toc_free (toc);
+ gst_toc_unref (toc);
toc = gst_toc_setter_get_toc_copy (setter);
CHECK_TOC (toc);
gst_toc_setter_set_toc (setter, toc);
gst_toc_setter_add_toc_entry (setter, "0", entry);
- gst_toc_free (toc);
- gst_toc_entry_free (entry);
+ gst_toc_unref (toc);
+ gst_toc_entry_unref (entry);
toc = gst_toc_setter_get_toc_copy (setter);
CHECK_TOC (toc);
CHECK_TOC (toc);
- gst_toc_free (toc);
+ gst_toc_unref (toc);
gst_toc_setter_reset_toc (setter);
toc = gst_toc_setter_get_toc_copy (setter);
while (g_timer_elapsed (timer, NULL) < THREADS_TEST_SECONDS)
gst_toc_setter_set_toc (setter, toc);
- gst_toc_free (toc);
+ gst_toc_unref (toc);
g_timer_destroy (timer);
GST_INFO ("Done");
while (g_timer_elapsed (timer, NULL) < THREADS_TEST_SECONDS)
gst_toc_setter_set_toc (setter, toc);
- gst_toc_free (toc);
+ gst_toc_unref (toc);
g_timer_destroy (timer);
GST_INFO ("Done");
/* recursively loop over toc entries */
g_list_foreach (toc_msg->entries, print_toc_entry,
GUINT_TO_POINTER (0));
- gst_toc_free (toc_msg);
+ gst_toc_unref (toc_msg);
}
break;
case GST_MESSAGE_INFO:{