mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
docs/libs/gstreamer-libs-sections.txt: Add new API to doc
Original commit message from CVS: * docs/libs/gstreamer-libs-sections.txt: Add new API to doc * libs/gst/check/gstcheck.c: * libs/gst/check/gstcheck.h: API: gst_check_teardown_pad_by_name
This commit is contained in:
parent
46b1c45181
commit
8442b73552
4 changed files with 34 additions and 29 deletions
|
@ -1,3 +1,11 @@
|
|||
2008-06-21 Thijs Vermeir <thijsvermeir@gmail.com>
|
||||
|
||||
* docs/libs/gstreamer-libs-sections.txt:
|
||||
Add new API to doc
|
||||
* libs/gst/check/gstcheck.c:
|
||||
* libs/gst/check/gstcheck.h:
|
||||
API: gst_check_teardown_pad_by_name
|
||||
|
||||
2008-06-21 Thijs Vermeir <thijsvermeir@gmail.com>
|
||||
|
||||
* libs/gst/check/gstcheck.c:
|
||||
|
|
|
@ -521,6 +521,9 @@ gst_check_message_error
|
|||
gst_check_setup_element
|
||||
gst_check_setup_sink_pad
|
||||
gst_check_setup_src_pad
|
||||
gst_check_setup_sink_pad_by_name
|
||||
gst_check_setup_src_pad_by_name
|
||||
gst_check_teardown_pad_by_name
|
||||
gst_check_teardown_element
|
||||
gst_check_teardown_sink_pad
|
||||
gst_check_teardown_src_pad
|
||||
|
|
|
@ -297,29 +297,38 @@ gst_check_setup_src_pad_by_name (GstElement * element,
|
|||
}
|
||||
|
||||
void
|
||||
gst_check_teardown_src_pad (GstElement * element)
|
||||
gst_check_teardown_pad_by_name (GstElement * element, gchar * name)
|
||||
{
|
||||
GstPad *srcpad, *sinkpad;
|
||||
GstPad *pad_peer, *pad_element;
|
||||
|
||||
/* clean up floating src pad */
|
||||
sinkpad = gst_element_get_static_pad (element, "sink");
|
||||
ASSERT_OBJECT_REFCOUNT (sinkpad, "sinkpad", 2);
|
||||
srcpad = gst_pad_get_peer (sinkpad);
|
||||
pad_element = gst_element_get_static_pad (element, name);
|
||||
ASSERT_OBJECT_REFCOUNT (pad_element, "pad", 2);
|
||||
pad_peer = gst_pad_get_peer (pad_element);
|
||||
|
||||
gst_pad_unlink (srcpad, sinkpad);
|
||||
if (gst_pad_get_direction (pad_element) == GST_PAD_SINK)
|
||||
gst_pad_unlink (pad_peer, pad_element);
|
||||
else
|
||||
gst_pad_unlink (pad_element, pad_peer);
|
||||
|
||||
/* caps could have been set, make sure they get unset */
|
||||
gst_pad_set_caps (srcpad, NULL);
|
||||
gst_pad_set_caps (pad_peer, NULL);
|
||||
|
||||
/* pad refs held by both creator and this function (through _get) */
|
||||
ASSERT_OBJECT_REFCOUNT (sinkpad, "element sinkpad", 2);
|
||||
gst_object_unref (sinkpad);
|
||||
ASSERT_OBJECT_REFCOUNT (pad_element, "element pad_element", 2);
|
||||
gst_object_unref (pad_element);
|
||||
/* one more ref is held by element itself */
|
||||
|
||||
/* pad refs held by both creator and this function (through _get_peer) */
|
||||
ASSERT_OBJECT_REFCOUNT (srcpad, "check srcpad", 2);
|
||||
gst_object_unref (srcpad);
|
||||
gst_object_unref (srcpad);
|
||||
ASSERT_OBJECT_REFCOUNT (pad_peer, "check pad_peer", 2);
|
||||
gst_object_unref (pad_peer);
|
||||
gst_object_unref (pad_peer);
|
||||
}
|
||||
|
||||
void
|
||||
gst_check_teardown_src_pad (GstElement * element)
|
||||
{
|
||||
gst_check_teardown_pad_by_name (element, "sink");
|
||||
}
|
||||
|
||||
/* FIXME: set_caps isn't that useful; might want to check if fixed,
|
||||
|
@ -367,23 +376,7 @@ gst_check_setup_sink_pad_by_name (GstElement * element,
|
|||
void
|
||||
gst_check_teardown_sink_pad (GstElement * element)
|
||||
{
|
||||
GstPad *srcpad, *sinkpad;
|
||||
|
||||
/* clean up floating sink pad */
|
||||
srcpad = gst_element_get_static_pad (element, "src");
|
||||
sinkpad = gst_pad_get_peer (srcpad);
|
||||
|
||||
gst_pad_unlink (srcpad, sinkpad);
|
||||
|
||||
/* pad refs held by both creator and this function (through _get_pad) */
|
||||
ASSERT_OBJECT_REFCOUNT (srcpad, "element srcpad", 2);
|
||||
gst_object_unref (srcpad);
|
||||
/* one more ref is held by element itself */
|
||||
|
||||
/* pad refs held by both creator and this function (through _get_peer) */
|
||||
ASSERT_OBJECT_REFCOUNT (sinkpad, "check sinkpad", 2);
|
||||
gst_object_unref (sinkpad);
|
||||
gst_object_unref (sinkpad);
|
||||
gst_check_teardown_pad_by_name (element, "src");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -77,6 +77,7 @@ GstPad * gst_check_setup_src_pad_by_name (GstElement * element,
|
|||
GstStaticPadTemplate * template, gchar *name);
|
||||
GstPad * gst_check_setup_sink_pad_by_name (GstElement * element,
|
||||
GstStaticPadTemplate * template, gchar *name);
|
||||
void gst_check_teardown_pad_by_name (GstElement * element, gchar *name);
|
||||
void gst_check_teardown_src_pad (GstElement * element);
|
||||
void gst_check_drop_buffers ();
|
||||
void gst_check_caps_equal (GstCaps * caps1, GstCaps * caps2);
|
||||
|
|
Loading…
Reference in a new issue