From a5fa136c0b15a815b0a87914dfb465d467b6aee9 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 2 Nov 2011 12:08:22 +0100 Subject: [PATCH] update for tag API removal --- ext/ogg/gstoggdemux.c | 10 ++++++---- ext/ogg/gstogmparse.c | 4 ++-- ext/theora/gsttheoradec.c | 3 +-- ext/vorbis/gstvorbisdec.c | 4 ++-- gst-libs/gst/audio/gstaudiodecoder.c | 4 ++-- gst-libs/gst/audio/gstaudioencoder.c | 2 +- gst-libs/gst/cdda/gstcddabasesrc.c | 3 +-- gst/subparse/gstssaparse.c | 2 +- gst/subparse/gstsubparse.c | 8 +++++--- 9 files changed, 21 insertions(+), 19 deletions(-) diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c index ea42dd5..af61a26 100644 --- a/ext/ogg/gstoggdemux.c +++ b/ext/ogg/gstoggdemux.c @@ -2403,10 +2403,12 @@ gst_ogg_demux_activate_chain (GstOggDemux * ogg, GstOggChain * chain, /* FIXME, must be sent from the streaming thread */ if (event) { + GstTagList *tags; + gst_ogg_demux_send_event (ogg, event); - gst_element_found_tags (GST_ELEMENT_CAST (ogg), - gst_tag_list_new (GST_TAG_CONTAINER_FORMAT, "Ogg", NULL)); + tags = gst_tag_list_new (GST_TAG_CONTAINER_FORMAT, "Ogg", NULL); + gst_ogg_demux_send_event (ogg, gst_event_new_tag (tags)); } GST_DEBUG_OBJECT (ogg, "starting chain"); @@ -2421,8 +2423,8 @@ gst_ogg_demux_activate_chain (GstOggDemux * ogg, GstOggChain * chain, /* FIXME also streaming thread */ if (pad->map.taglist) { GST_DEBUG_OBJECT (ogg, "pushing tags"); - gst_element_found_tags_for_pad (GST_ELEMENT_CAST (ogg), - GST_PAD_CAST (pad), pad->map.taglist); + gst_pad_push_event (GST_PAD_CAST (pad), + gst_event_new_tag (pad->map.taglist)); pad->map.taglist = NULL; } diff --git a/ext/ogg/gstogmparse.c b/ext/ogg/gstogmparse.c index b06c1ab..e2e0d82 100644 --- a/ext/ogg/gstogmparse.c +++ b/ext/ogg/gstogmparse.c @@ -669,7 +669,7 @@ gst_ogm_parse_stream_header (GstOgmParse * ogm, const guint8 * data, guint size) GstTagList *tags; tags = gst_tag_list_new (GST_TAG_SUBTITLE_CODEC, "Ogm", NULL); - gst_element_found_tags_for_pad (GST_ELEMENT (ogm), ogm->srcpad, tags); + gst_pad_push_event (ogm->srcpad, gst_event_new_tag (tags)); } } @@ -711,7 +711,7 @@ gst_ogm_parse_comment_packet (GstOgmParse * ogm, GstBuffer * buf) if (tags) { GST_DEBUG_OBJECT (ogm, "tags = %" GST_PTR_FORMAT, tags); - gst_element_found_tags_for_pad (GST_ELEMENT (ogm), ogm->srcpad, tags); + gst_pad_push_event (ogm->srcpad, gst_event_new_tag (tags)); } else { GST_DEBUG_OBJECT (ogm, "failed to extract tags from vorbis comment"); } diff --git a/ext/theora/gsttheoradec.c b/ext/theora/gsttheoradec.c index a73a811..b10e841 100644 --- a/ext/theora/gsttheoradec.c +++ b/ext/theora/gsttheoradec.c @@ -992,8 +992,7 @@ theora_handle_type_packet (GstTheoraDec * dec, ogg_packet * packet) } if (dec->tags) { - gst_element_found_tags_for_pad (GST_ELEMENT_CAST (dec), dec->srcpad, - dec->tags); + gst_pad_push_event (dec->srcpad, gst_event_new_tag (dec->tags)); dec->tags = NULL; } diff --git a/ext/vorbis/gstvorbisdec.c b/ext/vorbis/gstvorbisdec.c index 910eb6d..c467748 100644 --- a/ext/vorbis/gstvorbisdec.c +++ b/ext/vorbis/gstvorbisdec.c @@ -338,8 +338,8 @@ vorbis_handle_comment_packet (GstVorbisDec * vd, ogg_packet * packet) } if (vd->initialized) { - gst_element_found_tags_for_pad (GST_ELEMENT_CAST (vd), - GST_AUDIO_DECODER_SRC_PAD (vd), vd->taglist); + gst_pad_push_event (GST_AUDIO_DECODER_SRC_PAD (vd), + gst_event_new_tag (vd->taglist)); vd->taglist = NULL; } else { /* Only post them as messages for the time being. * diff --git a/gst-libs/gst/audio/gstaudiodecoder.c b/gst-libs/gst/audio/gstaudiodecoder.c index 93e8fb0..ffd9839 100644 --- a/gst-libs/gst/audio/gstaudiodecoder.c +++ b/gst-libs/gst/audio/gstaudiodecoder.c @@ -580,7 +580,7 @@ gst_audio_decoder_setup (GstAudioDecoder * dec) gst_query_unref (query); /* normalize to bool */ - dec->priv->agg = ! !res; + dec->priv->agg = !!res; } /* mini aggregator combining output buffers into fewer larger ones, @@ -845,7 +845,7 @@ gst_audio_decoder_finish_frame (GstAudioDecoder * dec, GstBuffer * buf, if (gst_tag_list_is_empty (priv->taglist)) { gst_tag_list_free (priv->taglist); } else { - gst_element_found_tags (GST_ELEMENT (dec), priv->taglist); + gst_pad_push_event (dec->srcpad, gst_event_new_tag (priv->taglist)); } priv->taglist = NULL; } diff --git a/gst-libs/gst/audio/gstaudioencoder.c b/gst-libs/gst/audio/gstaudioencoder.c index 3d1112a..cfd5455 100644 --- a/gst-libs/gst/audio/gstaudioencoder.c +++ b/gst-libs/gst/audio/gstaudioencoder.c @@ -524,7 +524,7 @@ gst_audio_encoder_finish_frame (GstAudioEncoder * enc, GstBuffer * buf, caps); #endif GST_DEBUG_OBJECT (enc, "sending tags %" GST_PTR_FORMAT, tags); - gst_element_found_tags_for_pad (GST_ELEMENT (enc), enc->srcpad, tags); + gst_pad_push_event (enc->srcpad, gst_event_new_tag (tags)); } /* remove corresponding samples from input */ diff --git a/gst-libs/gst/cdda/gstcddabasesrc.c b/gst-libs/gst/cdda/gstcddabasesrc.c index 6768df0..4fd69c3 100644 --- a/gst-libs/gst/cdda/gstcddabasesrc.c +++ b/gst-libs/gst/cdda/gstcddabasesrc.c @@ -1588,8 +1588,7 @@ gst_cdda_base_src_create (GstPushSrc * pushsrc, GstBuffer ** buffer) tags = gst_tag_list_merge (src->tags, src->tracks[src->cur_track].tags, GST_TAG_MERGE_REPLACE); GST_LOG_OBJECT (src, "announcing tags: %" GST_PTR_FORMAT, tags); - gst_element_found_tags_for_pad (GST_ELEMENT (src), - GST_BASE_SRC_PAD (src), tags); + gst_pad_push_event (GST_BASE_SRC_PAD (src), gst_event_new_tag (tags)); src->prev_track = src->cur_track; gst_cdda_base_src_update_duration (src); diff --git a/gst/subparse/gstssaparse.c b/gst/subparse/gstssaparse.c index 6eb80f2..48c83f7 100644 --- a/gst/subparse/gstssaparse.c +++ b/gst/subparse/gstssaparse.c @@ -322,7 +322,7 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstBuffer * buf) tags = gst_tag_list_new_empty (); gst_tag_list_add (tags, GST_TAG_MERGE_APPEND, GST_TAG_SUBTITLE_CODEC, "SubStation Alpha", NULL); - gst_element_found_tags_for_pad (GST_ELEMENT (parse), parse->srcpad, tags); + gst_pad_push_event (parse->srcpad, gst_event_new_tag (tags)); parse->send_tags = FALSE; } diff --git a/gst/subparse/gstsubparse.c b/gst/subparse/gstsubparse.c index 712e4db..579faef 100644 --- a/gst/subparse/gstsubparse.c +++ b/gst/subparse/gstsubparse.c @@ -1461,9 +1461,11 @@ handle_buffer (GstSubParse * self, GstBuffer * buf) /* push tags */ if (self->subtitle_codec != NULL) { - gst_element_found_tags_for_pad (GST_ELEMENT (self), self->srcpad, - gst_tag_list_new (GST_TAG_SUBTITLE_CODEC, self->subtitle_codec, - NULL)); + GstTagList *tags; + + tags = gst_tag_list_new (GST_TAG_SUBTITLE_CODEC, self->subtitle_codec, + NULL); + gst_pad_push_event (self->srcpad, gst_event_new_tag (tags)); } } -- 2.7.4