mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
update for tag API removal
This commit is contained in:
parent
dfc9d1658d
commit
a5fa136c0b
9 changed files with 21 additions and 19 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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. *
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue