tags: update for tag API removal

This commit is contained in:
Wim Taymans 2011-11-02 12:09:20 +01:00
parent 22eb0d2300
commit e038ab5a0b
11 changed files with 43 additions and 43 deletions

View file

@ -584,7 +584,7 @@ gst_cmml_dec_parse_head (GstCmmlDec * dec, GstCmmlTagHead * head)
gst_tag_list_add_values (tags, GST_TAG_MERGE_APPEND, gst_tag_list_add_values (tags, GST_TAG_MERGE_APPEND,
GST_TAG_TITLE, &title_val, NULL); GST_TAG_TITLE, &title_val, NULL);
gst_tag_list_add (tags, GST_TAG_MERGE_APPEND, GST_TAG_CMML_HEAD, head, NULL); gst_tag_list_add (tags, GST_TAG_MERGE_APPEND, GST_TAG_CMML_HEAD, head, NULL);
gst_element_found_tags_for_pad (GST_ELEMENT (dec), dec->srcpad, tags); gst_pad_push_event (dec->srcpad, gst_event_new_tag (tags));
g_value_unset (&str_val); g_value_unset (&str_val);
g_value_unset (&title_val); g_value_unset (&title_val);
@ -609,7 +609,7 @@ gst_cmml_dec_send_clip_tag (GstCmmlDec * dec, GstCmmlTagClip * clip)
GST_DEBUG_OBJECT (dec, "sending clip tag %s", clip->id); GST_DEBUG_OBJECT (dec, "sending clip tag %s", clip->id);
tags = gst_tag_list_new (GST_TAG_CMML_CLIP, clip, NULL); tags = gst_tag_list_new (GST_TAG_CMML_CLIP, clip, NULL);
gst_element_found_tags_for_pad (GST_ELEMENT (dec), dec->srcpad, tags); gst_pad_push_event (dec->srcpad, gst_event_new_tag (tags));
} }
/* push the string representation of a clip */ /* push the string representation of a clip */

View file

@ -315,8 +315,8 @@ gst_flac_tag_chain (GstPad * pad, GstBuffer * buffer)
tag->tags = gst_tag_list_from_vorbiscomment_buffer (tag->vorbiscomment, tag->tags = gst_tag_list_from_vorbiscomment_buffer (tag->vorbiscomment,
id_data, 4, NULL); id_data, 4, NULL);
if (tag->tags != NULL) { if (tag->tags != NULL) {
gst_element_found_tags (GST_ELEMENT (tag), gst_pad_push_event (tag->srcpad,
gst_tag_list_copy (tag->tags)); gst_event_new_tag (gst_tag_list_copy (tag->tags)));
} }
gst_buffer_unref (tag->vorbiscomment); gst_buffer_unref (tag->vorbiscomment);

View file

@ -839,7 +839,7 @@ gst_soup_http_src_got_headers_cb (SoupMessage * msg, GstSoupHTTPSrc * src)
if (!gst_tag_list_is_empty (tag_list)) { if (!gst_tag_list_is_empty (tag_list)) {
GST_DEBUG_OBJECT (src, GST_DEBUG_OBJECT (src,
"calling gst_element_found_tags with %" GST_PTR_FORMAT, tag_list); "calling gst_element_found_tags with %" GST_PTR_FORMAT, tag_list);
gst_element_found_tags (GST_ELEMENT_CAST (src), tag_list); gst_pad_push_event (GST_BASE_SRC_PAD (src), gst_event_new_tag (tag_list));
} else { } else {
gst_tag_list_free (tag_list); gst_tag_list_free (tag_list);
} }

View file

@ -306,8 +306,8 @@ gst_speex_dec_parse_comments (GstSpeexDec * dec, GstBuffer * buf)
GST_INFO_OBJECT (dec, "tags: %" GST_PTR_FORMAT, list); GST_INFO_OBJECT (dec, "tags: %" GST_PTR_FORMAT, list);
gst_element_found_tags_for_pad (GST_ELEMENT (dec), gst_pad_push_event (GST_AUDIO_DECODER_SRC_PAD (dec),
GST_AUDIO_DECODER_SRC_PAD (dec), list); gst_event_new_tag (list));
g_free (encoder); g_free (encoder);
g_free (ver); g_free (ver);

View file

@ -1423,7 +1423,8 @@ gst_flac_parse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
/* Push tags */ /* Push tags */
if (flacparse->tags) { if (flacparse->tags) {
gst_element_found_tags (GST_ELEMENT (flacparse), flacparse->tags); gst_pad_push_event (GST_BASE_PARSE_SRC_PAD (flacparse),
gst_event_new_tag (flacparse->tags));
flacparse->tags = NULL; flacparse->tags = NULL;
} }

View file

@ -1240,8 +1240,8 @@ gst_mpeg_audio_parse_pre_push_frame (GstBaseParse * parse,
gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE, gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE,
GST_TAG_NOMINAL_BITRATE, mp3parse->hdr_bitrate, NULL); GST_TAG_NOMINAL_BITRATE, mp3parse->hdr_bitrate, NULL);
} }
gst_element_found_tags_for_pad (GST_ELEMENT (mp3parse), gst_pad_push_event (GST_BASE_PARSE_SRC_PAD (mp3parse),
GST_BASE_PARSE_SRC_PAD (mp3parse), taglist); gst_event_new_tag (taglist));
g_free (codec); g_free (codec);
/* also signals the end of first-frame processing */ /* also signals the end of first-frame processing */
@ -1279,8 +1279,8 @@ gst_mpeg_audio_parse_pre_push_frame (GstBaseParse * parse,
/* if the taglist exists, we need to send it */ /* if the taglist exists, we need to send it */
if (taglist) { if (taglist) {
gst_element_found_tags_for_pad (GST_ELEMENT (mp3parse), gst_pad_push_event (GST_BASE_PARSE_SRC_PAD (mp3parse),
GST_BASE_PARSE_SRC_PAD (mp3parse), taglist); gst_event_new_tag (taglist));
} }
/* usual clipping applies */ /* usual clipping applies */

View file

@ -5052,7 +5052,7 @@ push_tag_lists (GstAviDemux * avi)
if (pad && tags) { if (pad && tags) {
GST_DEBUG_OBJECT (pad, "Tags: %" GST_PTR_FORMAT, tags); GST_DEBUG_OBJECT (pad, "Tags: %" GST_PTR_FORMAT, tags);
gst_element_found_tags_for_pad (GST_ELEMENT_CAST (avi), pad, tags); gst_pad_push_event (pad, gst_event_new_tag (tags));
stream->taglist = NULL; stream->taglist = NULL;
} }
} }
@ -5064,7 +5064,7 @@ push_tag_lists (GstAviDemux * avi)
GST_TAG_CONTAINER_FORMAT, "AVI", NULL); GST_TAG_CONTAINER_FORMAT, "AVI", NULL);
GST_DEBUG_OBJECT (avi, "Global tags: %" GST_PTR_FORMAT, tags); GST_DEBUG_OBJECT (avi, "Global tags: %" GST_PTR_FORMAT, tags);
gst_element_found_tags (GST_ELEMENT_CAST (avi), tags); gst_avi_demux_push_event (avi, gst_event_new_tag (tags));
avi->globaltags = NULL; avi->globaltags = NULL;
avi->got_tags = FALSE; avi->got_tags = FALSE;
} }

View file

@ -143,8 +143,8 @@ gst_tag_inject_transform_ip (GstBaseTransform * trans, GstBuffer * buf)
/* send tags */ /* send tags */
if (self->tags && !gst_tag_list_is_empty (self->tags)) { if (self->tags && !gst_tag_list_is_empty (self->tags)) {
GST_DEBUG ("tag event :%" GST_PTR_FORMAT, self->tags); GST_DEBUG ("tag event :%" GST_PTR_FORMAT, self->tags);
gst_element_found_tags (GST_ELEMENT (trans), gst_pad_push_event (GST_BASE_TRANSFORM_SRC_PAD (trans),
gst_tag_list_copy (self->tags)); gst_event_new_tag (gst_tag_list_copy (self->tags)));
} }
} }

View file

@ -750,6 +750,22 @@ beach:
return ret; return ret;
} }
static gboolean
gst_flv_demux_push_src_event (GstFlvDemux * demux, GstEvent * event)
{
gboolean ret = TRUE;
if (demux->audio_pad)
ret |= gst_pad_push_event (demux->audio_pad, gst_event_ref (event));
if (demux->video_pad)
ret |= gst_pad_push_event (demux->video_pad, gst_event_ref (event));
gst_event_unref (event);
return ret;
}
static void static void
gst_flv_demux_push_tags (GstFlvDemux * demux) gst_flv_demux_push_tags (GstFlvDemux * demux)
{ {
@ -766,7 +782,7 @@ gst_flv_demux_push_tags (GstFlvDemux * demux)
if (demux->taglist) { if (demux->taglist) {
GST_DEBUG_OBJECT (demux, "pushing tags out %" GST_PTR_FORMAT, GST_DEBUG_OBJECT (demux, "pushing tags out %" GST_PTR_FORMAT,
demux->taglist); demux->taglist);
gst_element_found_tags (GST_ELEMENT (demux), demux->taglist); gst_flv_demux_push_src_event (demux, gst_event_new_tag (demux->taglist));
demux->taglist = gst_tag_list_new_empty (); demux->taglist = gst_tag_list_new_empty ();
demux->push_tags = FALSE; demux->push_tags = FALSE;
} }
@ -2174,22 +2190,6 @@ done:
return ret; return ret;
} }
static gboolean
gst_flv_demux_push_src_event (GstFlvDemux * demux, GstEvent * event)
{
gboolean ret = TRUE;
if (demux->audio_pad)
ret |= gst_pad_push_event (demux->audio_pad, gst_event_ref (event));
if (demux->video_pad)
ret |= gst_pad_push_event (demux->video_pad, gst_event_ref (event));
gst_event_unref (event);
return ret;
}
static GstFlowReturn static GstFlowReturn
gst_flv_demux_create_index (GstFlvDemux * demux, gint64 pos, GstClockTime ts) gst_flv_demux_create_index (GstFlvDemux * demux, gint64 pos, GstClockTime ts)
{ {

View file

@ -625,8 +625,8 @@ gst_rg_analysis_handle_eos (GstRgAnalysis * filter)
gst_tag_list_add (tag_list, GST_TAG_MERGE_APPEND, gst_tag_list_add (tag_list, GST_TAG_MERGE_APPEND,
GST_TAG_REFERENCE_LEVEL, filter->reference_level, NULL); GST_TAG_REFERENCE_LEVEL, filter->reference_level, NULL);
/* This steals our reference to the list: */ /* This steals our reference to the list: */
gst_element_found_tags_for_pad (GST_ELEMENT (filter), gst_pad_push_event (GST_BASE_TRANSFORM_SRC_PAD (GST_BASE_TRANSFORM
GST_BASE_TRANSFORM_SRC_PAD (GST_BASE_TRANSFORM (filter)), tag_list); (filter)), gst_event_new_tag (tag_list));
} }
} }

View file

@ -1776,8 +1776,7 @@ gst_wavparse_add_src_pad (GstWavParse * wav, GstBuffer * buf)
} }
if (wav->tags) { if (wav->tags) {
gst_element_found_tags_for_pad (GST_ELEMENT_CAST (wav), wav->srcpad, gst_pad_push_event (wav->srcpad, gst_event_new_tag (wav->tags));
wav->tags);
wav->tags = NULL; wav->tags = NULL;
} }
} }