update for tag API removal
authorWim Taymans <wim.taymans@collabora.co.uk>
Wed, 2 Nov 2011 11:08:22 +0000 (12:08 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Wed, 2 Nov 2011 11:11:16 +0000 (12:11 +0100)
ext/ogg/gstoggdemux.c
ext/ogg/gstogmparse.c
ext/theora/gsttheoradec.c
ext/vorbis/gstvorbisdec.c
gst-libs/gst/audio/gstaudiodecoder.c
gst-libs/gst/audio/gstaudioencoder.c
gst-libs/gst/cdda/gstcddabasesrc.c
gst/subparse/gstssaparse.c
gst/subparse/gstsubparse.c

index ea42dd5..af61a26 100644 (file)
@@ -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;
     }
 
index b06c1ab..e2e0d82 100644 (file)
@@ -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");
     }
index a73a811..b10e841 100644 (file)
@@ -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;
   }
 
index 910eb6d..c467748 100644 (file)
@@ -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. *
index 93e8fb0..ffd9839 100644 (file)
@@ -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;
   }
index 3d1112a..cfd5455 100644 (file)
@@ -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 */
index 6768df0..4fd69c3 100644 (file)
@@ -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);
index 6eb80f2..48c83f7 100644 (file)
@@ -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;
   }
 
index 712e4db..579faef 100644 (file)
@@ -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));
     }
   }