mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
gst_tag_list_free -> gst_tag_list_unref
This commit is contained in:
parent
a7037cd0e3
commit
489b102a43
22 changed files with 51 additions and 51 deletions
|
@ -424,7 +424,7 @@ gst_celt_enc_create_metadata_buffer (GstCeltEnc * enc)
|
|||
GST_BUFFER_OFFSET_END (comments) = 0;
|
||||
|
||||
if (empty_tags)
|
||||
gst_tag_list_free (empty_tags);
|
||||
gst_tag_list_unref (empty_tags);
|
||||
|
||||
return comments;
|
||||
}
|
||||
|
|
|
@ -497,7 +497,7 @@ gst_kate_enc_set_metadata (GstKateEnc * ke)
|
|||
if (merged_tags) {
|
||||
GST_DEBUG_OBJECT (ke, "merged tags = %" GST_PTR_FORMAT, merged_tags);
|
||||
gst_tag_list_foreach (merged_tags, gst_kate_enc_metadata_set1, ke);
|
||||
gst_tag_list_free (merged_tags);
|
||||
gst_tag_list_unref (merged_tags);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1081,7 +1081,7 @@ gst_kate_enc_change_state (GstElement * element, GstStateChange transition)
|
|||
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
||||
break;
|
||||
case GST_STATE_CHANGE_READY_TO_NULL:
|
||||
gst_tag_list_free (ke->tags);
|
||||
gst_tag_list_unref (ke->tags);
|
||||
ke->tags = NULL;
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -316,14 +316,14 @@ gst_kate_tag_parse_packet (GstKateParse * parse, GstBuffer * buffer)
|
|||
/* build new tag list */
|
||||
new_tags = gst_tag_list_merge (user_tags, old_tags,
|
||||
gst_tag_setter_get_tag_merge_mode (GST_TAG_SETTER (kt)));
|
||||
gst_tag_list_free (old_tags);
|
||||
gst_tag_list_unref (old_tags);
|
||||
|
||||
new_buf =
|
||||
gst_tag_list_to_vorbiscomment_buffer (new_tags,
|
||||
(const guint8 *) "\201kate\0\0\0\0", 9, encoder);
|
||||
gst_buffer_copy_into (new_buf, buffer, GST_BUFFER_COPY_TIMESTAMPS, 0, -1);
|
||||
|
||||
gst_tag_list_free (new_tags);
|
||||
gst_tag_list_unref (new_tags);
|
||||
g_free (encoder);
|
||||
gst_buffer_unref (buffer);
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@ gst_kate_util_decode_base_reset (GstKateDecoderBase * decoder)
|
|||
g_free (decoder->category);
|
||||
decoder->category = NULL;
|
||||
if (decoder->tags) {
|
||||
gst_tag_list_free (decoder->tags);
|
||||
gst_tag_list_unref (decoder->tags);
|
||||
decoder->tags = NULL;
|
||||
}
|
||||
decoder->original_canvas_width = 0;
|
||||
|
@ -325,9 +325,9 @@ gst_kate_util_decoder_base_chain_kate_packet (GstKateDecoderBase * decoder,
|
|||
/* TODO: category - where should it go ? */
|
||||
decoder->tags =
|
||||
gst_tag_list_merge (decoder->tags, tags, GST_TAG_MERGE_REPLACE);
|
||||
gst_tag_list_free (tags);
|
||||
gst_tag_list_unref (tags);
|
||||
if (old)
|
||||
gst_tag_list_free (old);
|
||||
gst_tag_list_unref (old);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -356,7 +356,7 @@ gst_kate_util_decoder_base_chain_kate_packet (GstKateDecoderBase * decoder,
|
|||
if (list) {
|
||||
decoder->tags =
|
||||
gst_tag_list_merge (decoder->tags, list, GST_TAG_MERGE_REPLACE);
|
||||
gst_tag_list_free (list);
|
||||
gst_tag_list_unref (list);
|
||||
}
|
||||
|
||||
if (!decoder->tags) {
|
||||
|
@ -375,7 +375,7 @@ gst_kate_util_decoder_base_chain_kate_packet (GstKateDecoderBase * decoder,
|
|||
NULL);
|
||||
|
||||
if (old)
|
||||
gst_tag_list_free (old);
|
||||
gst_tag_list_unref (old);
|
||||
|
||||
if (decoder->initialized) {
|
||||
gst_element_found_tags_for_pad (element, tagpad, decoder->tags);
|
||||
|
@ -422,7 +422,7 @@ gst_kate_util_decoder_base_chain_kate_packet (GstKateDecoderBase * decoder,
|
|||
}
|
||||
}
|
||||
if (gst_tag_list_is_empty (evtags))
|
||||
gst_tag_list_free (evtags);
|
||||
gst_tag_list_unref (evtags);
|
||||
else
|
||||
gst_element_found_tags_for_pad (element, tagpad, evtags);
|
||||
}
|
||||
|
|
|
@ -344,7 +344,7 @@ gst_opus_enc_stop (GstAudioEncoder * benc)
|
|||
opus_multistream_encoder_destroy (enc->state);
|
||||
enc->state = NULL;
|
||||
}
|
||||
gst_tag_list_free (enc->tags);
|
||||
gst_tag_list_unref (enc->tags);
|
||||
enc->tags = NULL;
|
||||
g_slist_foreach (enc->headers, (GFunc) gst_buffer_unref, NULL);
|
||||
g_slist_free (enc->headers);
|
||||
|
|
|
@ -88,7 +88,7 @@ gst_opus_enc_create_metadata_buffer (const GstTagList * tags)
|
|||
GST_BUFFER_OFFSET_END (comments) = 0;
|
||||
|
||||
if (empty_tags)
|
||||
gst_tag_list_free (empty_tags);
|
||||
gst_tag_list_unref (empty_tags);
|
||||
|
||||
return comments;
|
||||
}
|
||||
|
|
|
@ -179,7 +179,7 @@ gst_selector_pad_finalize (GObject * object)
|
|||
pad = GST_SELECTOR_PAD_CAST (object);
|
||||
|
||||
if (pad->tags)
|
||||
gst_tag_list_free (pad->tags);
|
||||
gst_tag_list_unref (pad->tags);
|
||||
|
||||
G_OBJECT_CLASS (selector_pad_parent_class)->finalize (object);
|
||||
}
|
||||
|
@ -268,7 +268,7 @@ gst_selector_pad_event (GstPad * pad, GstEvent * event)
|
|||
|
||||
GST_OBJECT_LOCK (selpad);
|
||||
if (selpad->tags)
|
||||
gst_tag_list_free (selpad->tags);
|
||||
gst_tag_list_unref (selpad->tags);
|
||||
gst_event_parse_tag (event, &tags);
|
||||
if (tags)
|
||||
tags = gst_tag_list_copy (tags);
|
||||
|
|
|
@ -171,7 +171,7 @@ gst_aiff_parse_reset (GstAiffParse * aiff)
|
|||
}
|
||||
|
||||
if (aiff->tags != NULL) {
|
||||
gst_tag_list_free (aiff->tags);
|
||||
gst_tag_list_unref (aiff->tags);
|
||||
aiff->tags = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -931,7 +931,7 @@ gst_aiff_parse_stream_headers (GstAiffParse * aiff)
|
|||
aiff->tags = tags;
|
||||
} else {
|
||||
gst_tag_list_insert (aiff->tags, tags, GST_TAG_MERGE_APPEND);
|
||||
gst_tag_list_free (tags);
|
||||
gst_tag_list_unref (tags);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -475,7 +475,7 @@ gst_asf_mux_get_content_description_tags (GstAsfMux * asfmux,
|
|||
tags = gst_tag_setter_get_tag_list (GST_TAG_SETTER (asfmux));
|
||||
if (tags && !gst_tag_list_is_empty (tags)) {
|
||||
if (asftags->tags != NULL) {
|
||||
gst_tag_list_free (asftags->tags);
|
||||
gst_tag_list_unref (asftags->tags);
|
||||
}
|
||||
asftags->tags = gst_tag_list_new_empty ();
|
||||
asftags->cont_desc_size = 0;
|
||||
|
@ -1323,7 +1323,7 @@ gst_asf_mux_start_file (GstAsfMux * asfmux)
|
|||
|
||||
if (asftags) {
|
||||
if (asftags->tags)
|
||||
gst_tag_list_free (asftags->tags);
|
||||
gst_tag_list_unref (asftags->tags);
|
||||
g_free (asftags);
|
||||
}
|
||||
|
||||
|
@ -2017,7 +2017,7 @@ gst_asf_mux_pad_reset (GstAsfPad * pad)
|
|||
gst_buffer_unref (pad->codec_data);
|
||||
pad->codec_data = NULL;
|
||||
if (pad->taglist)
|
||||
gst_tag_list_free (pad->taglist);
|
||||
gst_tag_list_unref (pad->taglist);
|
||||
pad->taglist = NULL;
|
||||
|
||||
pad->first_ts = GST_CLOCK_TIME_NONE;
|
||||
|
|
|
@ -1868,10 +1868,10 @@ fail:
|
|||
}
|
||||
|
||||
static void
|
||||
_gst_tag_list_free_maybe (GstTagList * taglist)
|
||||
_gst_tag_list_unref_maybe (GstTagList * taglist)
|
||||
{
|
||||
if (taglist)
|
||||
gst_tag_list_free (taglist);
|
||||
gst_tag_list_unref (taglist);
|
||||
}
|
||||
|
||||
static GstStateChangeReturn
|
||||
|
@ -1923,7 +1923,7 @@ gst_camera_bin_change_state (GstElement * element, GstStateChange trans)
|
|||
camera->image_location_list = NULL;
|
||||
|
||||
g_slist_foreach (camera->image_tags_list,
|
||||
(GFunc) _gst_tag_list_free_maybe, NULL);
|
||||
(GFunc) _gst_tag_list_unref_maybe, NULL);
|
||||
g_slist_free (camera->image_tags_list);
|
||||
camera->image_tags_list = NULL;
|
||||
g_mutex_unlock (&camera->image_capture_mutex);
|
||||
|
|
|
@ -638,7 +638,7 @@ gst_jif_mux_mangle_markers (GstJifMux * self)
|
|||
}
|
||||
|
||||
if (tags && cleanup_tags)
|
||||
gst_tag_list_free (tags);
|
||||
gst_tag_list_unref (tags);
|
||||
return modified;
|
||||
}
|
||||
|
||||
|
|
|
@ -585,7 +585,7 @@ extract_and_queue_tags (GstJpegParse * parse, guint size, guint8 * data,
|
|||
GstTagList *taglist = parse->priv->tags;
|
||||
if (taglist) {
|
||||
gst_tag_list_insert (taglist, tags, GST_TAG_MERGE_REPLACE);
|
||||
gst_tag_list_free (tags);
|
||||
gst_tag_list_unref (tags);
|
||||
} else {
|
||||
parse->priv->tags = tags;
|
||||
}
|
||||
|
@ -1060,7 +1060,7 @@ gst_jpeg_parse_change_state (GstElement * element, GstStateChange transition)
|
|||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||
gst_adapter_clear (parse->priv->adapter);
|
||||
if (parse->priv->tags) {
|
||||
gst_tag_list_free (parse->priv->tags);
|
||||
gst_tag_list_unref (parse->priv->tags);
|
||||
parse->priv->tags = NULL;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -498,7 +498,7 @@ mpegts_base_free_program (MpegTSBaseProgram * program)
|
|||
g_free (program->streams);
|
||||
|
||||
if (program->tags)
|
||||
gst_tag_list_free (program->tags);
|
||||
gst_tag_list_unref (program->tags);
|
||||
|
||||
g_free (program);
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ gst_mxf_demux_pad_finalize (GObject * object)
|
|||
GstMXFDemuxPad *pad = GST_MXF_DEMUX_PAD (object);
|
||||
|
||||
if (pad->tags) {
|
||||
gst_tag_list_free (pad->tags);
|
||||
gst_tag_list_unref (pad->tags);
|
||||
pad->tags = NULL;
|
||||
}
|
||||
|
||||
|
@ -171,7 +171,7 @@ gst_mxf_demux_reset_mxf_state (GstMXFDemux * demux)
|
|||
g_free (t->mapping_data);
|
||||
|
||||
if (t->tags)
|
||||
gst_tag_list_free (t->tags);
|
||||
gst_tag_list_unref (t->tags);
|
||||
|
||||
if (t->caps)
|
||||
gst_caps_unref (t->caps);
|
||||
|
@ -763,7 +763,7 @@ gst_mxf_demux_update_essence_tracks (GstMXFDemux * demux)
|
|||
etrack->handler = NULL;
|
||||
etrack->handle_func = NULL;
|
||||
if (etrack->tags)
|
||||
gst_tag_list_free (etrack->tags);
|
||||
gst_tag_list_unref (etrack->tags);
|
||||
etrack->tags = NULL;
|
||||
|
||||
etrack->handler = mxf_essence_element_handler_find (track);
|
||||
|
@ -828,7 +828,7 @@ gst_mxf_demux_update_essence_tracks (GstMXFDemux * demux)
|
|||
g_free (etrack->mapping_data);
|
||||
etrack->mapping_data = NULL;
|
||||
if (etrack->tags)
|
||||
gst_tag_list_free (etrack->tags);
|
||||
gst_tag_list_unref (etrack->tags);
|
||||
goto next;
|
||||
} else if (!caps) {
|
||||
GST_WARNING_OBJECT (demux, "Couldn't create updated caps for stream");
|
||||
|
@ -849,7 +849,7 @@ gst_mxf_demux_update_essence_tracks (GstMXFDemux * demux)
|
|||
if (new) {
|
||||
g_free (etrack->mapping_data);
|
||||
if (etrack->tags)
|
||||
gst_tag_list_free (etrack->tags);
|
||||
gst_tag_list_unref (etrack->tags);
|
||||
if (etrack->caps)
|
||||
gst_caps_unref (etrack->caps);
|
||||
|
||||
|
|
|
@ -211,7 +211,7 @@ gst_nsfdec_finalize (GObject * object)
|
|||
gst_buffer_unref (nsfdec->tune_buffer);
|
||||
|
||||
if (nsfdec->taglist)
|
||||
gst_tag_list_free (nsfdec->taglist);
|
||||
gst_tag_list_unref (nsfdec->taglist);
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
}
|
||||
|
|
|
@ -470,7 +470,7 @@ teardown (void)
|
|||
preview_filename = NULL;
|
||||
|
||||
if (tags_found)
|
||||
gst_tag_list_free (tags_found);
|
||||
gst_tag_list_unref (tags_found);
|
||||
tags_found = NULL;
|
||||
|
||||
g_free (video_filename);
|
||||
|
@ -511,7 +511,7 @@ validity_bus_cb (GstBus * bus, GstMessage * message, gpointer data)
|
|||
gst_message_parse_tag (message, &taglist);
|
||||
if (tags_found) {
|
||||
gst_tag_list_insert (tags_found, taglist, GST_TAG_MERGE_REPLACE);
|
||||
gst_tag_list_free (taglist);
|
||||
gst_tag_list_unref (taglist);
|
||||
} else {
|
||||
tags_found = taglist;
|
||||
}
|
||||
|
@ -1098,7 +1098,7 @@ GST_START_TEST (test_image_capture_with_tags)
|
|||
|
||||
for (i = 0; i < 3; i++) {
|
||||
check_file_validity (image_filename, i, taglists[i], 0, 0, NO_AUDIO);
|
||||
gst_tag_list_free (taglists[i]);
|
||||
gst_tag_list_unref (taglists[i]);
|
||||
remove_file (image_filename, i);
|
||||
}
|
||||
}
|
||||
|
@ -1176,7 +1176,7 @@ GST_START_TEST (test_video_capture_with_tags)
|
|||
|
||||
for (i = 0; i < 3; i++) {
|
||||
check_file_validity (video_filename, i, taglists[i], 0, 0, NO_AUDIO);
|
||||
gst_tag_list_free (taglists[i]);
|
||||
gst_tag_list_unref (taglists[i]);
|
||||
remove_file (video_filename, i);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -450,7 +450,7 @@ test_taglib_id3mux_with_tags (GstTagList * tags, guint32 mask, int v2version)
|
|||
|
||||
GST_LOG ("Got tags: %" GST_PTR_FORMAT, tags_read);
|
||||
test_taglib_id3mux_check_tags (tags_read, mask, v2version);
|
||||
gst_tag_list_free (tags_read);
|
||||
gst_tag_list_unref (tags_read);
|
||||
|
||||
fail_unless (tagbuf != NULL);
|
||||
test_taglib_id3mux_check_tag_buffer (tagbuf, mask, v2version);
|
||||
|
@ -494,7 +494,7 @@ run_id3mux_test (int v2version)
|
|||
/* internal consistency check */
|
||||
tags = test_taglib_id3mux_create_tags (0xFFFFFFFF);
|
||||
test_taglib_id3mux_check_tags (tags, 0xFFFFFFFF, v2version);
|
||||
gst_tag_list_free (tags);
|
||||
gst_tag_list_unref (tags);
|
||||
|
||||
/* now the real tests */
|
||||
for (i = 0; i < 50; ++i) {
|
||||
|
@ -517,7 +517,7 @@ run_id3mux_test (int v2version)
|
|||
test_taglib_id3mux_with_tags (tags, mask, v2version);
|
||||
|
||||
/* free tags */
|
||||
gst_tag_list_free (tags);
|
||||
gst_tag_list_unref (tags);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -976,7 +976,7 @@ generate_jif_file_with_tags (const gchar * tags, const gchar * filepath)
|
|||
taglist = gst_tag_list_new_from_string (tags);
|
||||
generate_jif_file_with_tags_from_taglist (taglist, filepath);
|
||||
|
||||
gst_tag_list_free (taglist);
|
||||
gst_tag_list_unref (taglist);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1010,7 +1010,7 @@ libexif_check_tags (const gchar * tags, const gchar * filepath)
|
|||
|
||||
libexif_check_tags_from_taglist (taglist, filepath);
|
||||
|
||||
gst_tag_list_free (taglist);
|
||||
gst_tag_list_unref (taglist);
|
||||
}
|
||||
|
||||
GST_START_TEST (test_jifmux_tags)
|
||||
|
@ -1069,7 +1069,7 @@ GST_START_TEST (test_jifmux_tags)
|
|||
gst_buffer_unref (buffer);
|
||||
generate_jif_file_with_tags_from_taglist (taglist, tmpfile);
|
||||
libexif_check_tags_from_taglist (taglist, tmpfile);
|
||||
gst_tag_list_free (taglist);
|
||||
gst_tag_list_unref (taglist);
|
||||
|
||||
#define IMAGE_ORIENTATION_TAG(t) "taglist," GST_TAG_IMAGE_ORIENTATION "=" t
|
||||
generate_jif_file_with_tags (IMAGE_ORIENTATION_TAG ("rotate-0"), tmpfile);
|
||||
|
|
|
@ -362,7 +362,7 @@ GST_START_TEST (test_kate_identification_header)
|
|||
fail_unless (gst_tag_list_get_string (tag_list, GST_TAG_TITLE, &title));
|
||||
fail_unless_equals_string (title, "Tiger");
|
||||
g_free (title);
|
||||
gst_tag_list_free (tag_list);
|
||||
gst_tag_list_unref (tag_list);
|
||||
gst_message_unref (message);
|
||||
|
||||
/* cleanup */
|
||||
|
|
|
@ -63,7 +63,7 @@ bus_handler (GstBus * bus, GstMessage * message, gpointer data)
|
|||
}
|
||||
|
||||
g_free (fpr);
|
||||
gst_tag_list_free (tag_list);
|
||||
gst_tag_list_unref (tag_list);
|
||||
|
||||
found_fingerprint = TRUE;
|
||||
|
||||
|
|
|
@ -154,7 +154,7 @@ on_message (GstBus * bus, GstMessage * message, gpointer data)
|
|||
g_value_unset (&v);
|
||||
}
|
||||
|
||||
gst_tag_list_free (tags);
|
||||
gst_tag_list_unref (tags);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
|
@ -486,7 +486,7 @@ on_buttonSaveFile_clicked (GtkButton * button, gpointer user_data)
|
|||
|
||||
/* view new file */
|
||||
if (tag_list) {
|
||||
gst_tag_list_free (tag_list);
|
||||
gst_tag_list_unref (tag_list);
|
||||
tag_list = NULL;
|
||||
}
|
||||
|
||||
|
@ -899,10 +899,10 @@ me_gst_bus_callback_view (GstBus * bus, GstMessage * message, gpointer data)
|
|||
if (tl) {
|
||||
ntl = gst_tag_list_merge (tag_list, tl, GST_TAG_MERGE_PREPEND);
|
||||
if (ntl) {
|
||||
gst_tag_list_free (tag_list);
|
||||
gst_tag_list_unref (tag_list);
|
||||
tag_list = ntl;
|
||||
}
|
||||
gst_tag_list_free (tl);
|
||||
gst_tag_list_unref (tl);
|
||||
}
|
||||
}
|
||||
/* remove whole chunk tags */
|
||||
|
@ -1314,7 +1314,7 @@ process_file(void)
|
|||
me_gst_cleanup_elements ();
|
||||
|
||||
if (tag_list) {
|
||||
gst_tag_list_free (tag_list);
|
||||
gst_tag_list_unref (tag_list);
|
||||
tag_list = NULL;
|
||||
}
|
||||
|
||||
|
@ -1357,7 +1357,7 @@ done:
|
|||
me_gst_cleanup_elements ();
|
||||
|
||||
if (tag_list) {
|
||||
gst_tag_list_free (tag_list);
|
||||
gst_tag_list_unref (tag_list);
|
||||
tag_list = NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue