- if (data->toc)
- gst_toc_free (data->toc);
-
- data->toc = gst_toc_copy (toc);
-
- g_mutex_unlock (&data->lock);
-}
-
-/**
- * gst_toc_setter_get_toc_entry:
- * @setter: a #GstTocSetter.
- * @uid: UID to find entry with.
- *
- * Return #GstTocEntry (if any) with given @uid. Returned entry should
- * not be modified or freed.
- *
- * This function is not thread-safe. Use gst_toc_setter_get_toc_entry_copy() instead.
- *
- * Returns: a TOC entry with given @uid from the TOC in the setter
- * or NULL if none entry with such @uid was found.
- *
- * Since: 0.10.37
- */
-const GstTocEntry *
-gst_toc_setter_get_toc_entry (GstTocSetter * setter, const gchar * uid)
-{
- GstTocData *data;
- const GstTocEntry *ret;
-
- g_return_val_if_fail (GST_IS_TOC_SETTER (setter), NULL);
- g_return_val_if_fail (uid != NULL, NULL);
-
- data = gst_toc_setter_get_data (setter);
-
- g_mutex_lock (&data->lock);
-
- ret = gst_toc_find_entry (data->toc, uid);
-
- g_mutex_unlock (&data->lock);
-
- return ret;
-}
-
-/**
- * gst_toc_setter_get_toc_entry_copy:
- * @setter: a #GstTocSetter.
- * @uid: UID to find entry with.
- *
- * Return #GstTocEntry (if any) with given @uid. It perform a deep copying,
- * so you can modify returned value. Free it when done with gst_toc_entry_free().
- * This function is thread-safe.
- *
- * Returns: a TOC entry with given @uid from the TOC in the setter
- * or NULL if none entry with such @uid was found.
- *
- * Since: 0.10.37
- */
-GstTocEntry *
-gst_toc_setter_get_toc_entry_copy (GstTocSetter * setter, const gchar * uid)
-{
- GstTocData *data;
- GstTocEntry *ret = NULL;
- const GstTocEntry *search;
-
- g_return_val_if_fail (GST_IS_TOC_SETTER (setter), NULL);
- g_return_val_if_fail (uid != NULL, NULL);
-
- data = gst_toc_setter_get_data (setter);
-
- g_mutex_lock (&data->lock);
-
- search = gst_toc_find_entry (data->toc, uid);
- if (search != NULL)
- ret = gst_toc_entry_copy (search);