mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
tocsetter, gst-launch, tests: update for GstToc API changes
This commit is contained in:
parent
f20efe23a3
commit
8590be2861
4 changed files with 17 additions and 17 deletions
|
@ -101,7 +101,7 @@ gst_toc_data_free (gpointer p)
|
|||
GstTocData *data = (GstTocData *) p;
|
||||
|
||||
if (data->toc)
|
||||
gst_toc_free (data->toc);
|
||||
gst_toc_unref (data->toc);
|
||||
|
||||
g_mutex_clear (&data->lock);
|
||||
|
||||
|
@ -153,7 +153,7 @@ gst_toc_setter_reset_toc (GstTocSetter * setter)
|
|||
|
||||
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);
|
||||
|
@ -188,7 +188,7 @@ gst_toc_setter_get_toc (GstTocSetter * setter)
|
|||
* 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.
|
||||
|
@ -235,7 +235,7 @@ gst_toc_setter_set_toc (GstTocSetter * setter, const GstToc * toc)
|
|||
|
||||
g_mutex_lock (&data->lock);
|
||||
if (data->toc)
|
||||
gst_toc_free (data->toc);
|
||||
gst_toc_unref (data->toc);
|
||||
|
||||
data->toc = gst_toc_copy (toc);
|
||||
|
||||
|
|
|
@ -274,7 +274,7 @@ GST_START_TEST (test_serializing)
|
|||
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 */
|
||||
|
@ -287,7 +287,7 @@ GST_START_TEST (test_serializing)
|
|||
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;
|
||||
|
@ -302,7 +302,7 @@ GST_START_TEST (test_serializing)
|
|||
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;
|
||||
|
||||
|
@ -328,7 +328,7 @@ GST_START_TEST (test_serializing)
|
|||
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);
|
||||
|
||||
|
@ -339,13 +339,13 @@ GST_START_TEST (test_serializing)
|
|||
|
||||
/* 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;
|
||||
|
|
|
@ -254,7 +254,7 @@ GST_START_TEST (test_set)
|
|||
|
||||
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);
|
||||
|
@ -266,8 +266,8 @@ GST_START_TEST (test_set)
|
|||
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);
|
||||
|
@ -283,7 +283,7 @@ GST_START_TEST (test_set)
|
|||
|
||||
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);
|
||||
|
||||
|
@ -317,7 +317,7 @@ test_threads_thread_func1 (gpointer data)
|
|||
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");
|
||||
|
||||
|
@ -344,7 +344,7 @@ test_threads_thread_func2 (gpointer data)
|
|||
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");
|
||||
|
||||
|
|
|
@ -685,7 +685,7 @@ event_loop (GstElement * pipeline, gboolean blocking, GstState target_state)
|
|||
/* 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:{
|
||||
|
|
Loading…
Reference in a new issue