utils: remove _found_tags_ API

remove gst_element_found_tags() and gst_element_found_tags_for_pad(), they are
nothing more than a wrapper around gst_pad_push_event()
This commit is contained in:
Wim Taymans 2011-11-02 12:06:47 +01:00
parent f1b07c580e
commit 6c627481b3
6 changed files with 9 additions and 71 deletions

View file

@ -68,6 +68,9 @@ The 0.11 porting guide
request_new_pad_full() -> request_new_pad()
gst_element_found_tags() and gst_element_found_tags_for_pad() are gone, just
push the tag event.
* GstPad:
gst_pad_get_caps() does not return writable caps anymore and an explicit
gst_caps_make_writable() needs to be performed. This was the functionality
@ -380,3 +383,4 @@ The 0.11 porting guide
gst_tag_list_new() has been renamed to gst_tag_list_new_empty().
gst_tag_list_new_full*() have been renamed to gst_tag_list_new*().

View file

@ -3021,64 +3021,6 @@ gst_pad_query_peer_convert (GstPad * pad, GstFormat src_format, gint64 src_val,
return ret;
}
/**
* gst_element_found_tags_for_pad:
* @element: element for which to post taglist to bus.
* @pad: (transfer none): pad on which to push tag-event
* @list: (transfer full): the taglist to post on the bus and create event from
*
* Posts a message to the bus that new tags were found and pushes the
* tags as event. Takes ownership of the @list.
*
* This is a utility method for elements. Applications should use the
* #GstTagSetter interface.
*/
void
gst_element_found_tags_for_pad (GstElement * element,
GstPad * pad, GstTagList * list)
{
g_return_if_fail (element != NULL);
g_return_if_fail (pad != NULL);
g_return_if_fail (list != NULL);
gst_pad_push_event (pad, gst_event_new_tag (gst_tag_list_copy (list)));
}
static void
push_and_ref (const GValue * vpad, GstEvent * event)
{
GstPad *pad = g_value_get_object (vpad);
gst_pad_push_event (pad, gst_event_ref (event));
}
/**
* gst_element_found_tags:
* @element: element for which we found the tags.
* @list: (transfer full): list of tags.
*
* Posts a message to the bus that new tags were found, and pushes an event
* to all sourcepads. Takes ownership of the @list.
*
* This is a utility method for elements. Applications should use the
* #GstTagSetter interface.
*/
void
gst_element_found_tags (GstElement * element, GstTagList * list)
{
GstIterator *iter;
GstEvent *event;
g_return_if_fail (element != NULL);
g_return_if_fail (list != NULL);
iter = gst_element_iterate_src_pads (element);
event = gst_event_new_tag (gst_tag_list_copy (list));
gst_iterator_foreach (iter, (GstIteratorForeachFunction) push_and_ref, event);
gst_iterator_free (iter);
gst_event_unref (event);
}
static GstPad *
element_find_unlinked_pad (GstElement * element, GstPadDirection direction)
{

View file

@ -915,13 +915,6 @@ GstPad * gst_bin_find_unlinked_pad (GstBin *bin, GstPadDire
GstBuffer * gst_buffer_merge (GstBuffer * buf1, GstBuffer * buf2);
GstBuffer * gst_buffer_join (GstBuffer * buf1, GstBuffer * buf2);
/* tag emission utility functions */
void gst_element_found_tags_for_pad (GstElement * element,
GstPad * pad,
GstTagList * list);
void gst_element_found_tags (GstElement * element,
GstTagList * list);
/* parse utility functions */
GstElement * gst_parse_bin_from_description (const gchar * bin_description,
gboolean ghost_unlinked_pads,

View file

@ -1344,8 +1344,7 @@ gst_base_parse_post_bitrates (GstBaseParse * parse, gboolean post_min,
parse->priv->max_bitrate);
if (taglist != NULL) {
gst_element_found_tags_for_pad (GST_ELEMENT_CAST (parse), parse->srcpad,
taglist);
gst_pad_push_event (parse->srcpad, gst_event_new_tag (taglist));
}
}

View file

@ -490,6 +490,7 @@ GST_START_TEST (test_element_found_tags)
GstTagList *list;
GstBus *bus;
GstMessage *message;
GstPad *srcpad;
pipeline = gst_element_factory_make ("pipeline", NULL);
fakesrc = gst_element_factory_make ("fakesrc", NULL);
@ -503,8 +504,9 @@ GST_START_TEST (test_element_found_tags)
gst_element_set_state (pipeline, GST_STATE_PLAYING);
gst_element_found_tags (GST_ELEMENT (fakesrc), list);
gst_tag_list_free (list);
srcpad = gst_element_get_static_pad (fakesrc, "src");
gst_pad_push_event (srcpad, gst_event_new_tag (list));
gst_object_unref (srcpad);
bus = gst_element_get_bus (pipeline);
message = gst_bus_poll (bus, GST_MESSAGE_EOS, -1);

View file

@ -335,8 +335,6 @@ EXPORTS
gst_element_factory_list_is_type
gst_element_factory_make
gst_element_flags_get_type
gst_element_found_tags
gst_element_found_tags_for_pad
gst_element_get_base_time
gst_element_get_bus
gst_element_get_clock