mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-03 05:59:10 +00:00
if pad has no parent, return NULL as list of internal links
Original commit message from CVS: * check/gst/gstpad.c: * check/gstcheck.c: * gst/gstpad.c: (gst_pad_get_internal_links_default): if pad has no parent, return NULL as list of internal links
This commit is contained in:
parent
0675bff0fc
commit
b9f6a4d4ee
4 changed files with 32 additions and 12 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2005-07-06 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
|
* check/gst/gstpad.c:
|
||||||
|
* check/gstcheck.c:
|
||||||
|
* gst/gstpad.c: (gst_pad_get_internal_links_default):
|
||||||
|
if pad has no parent, return NULL as list of internal links
|
||||||
|
|
||||||
2005-07-05 Andy Wingo <wingo@pobox.com>
|
2005-07-05 Andy Wingo <wingo@pobox.com>
|
||||||
|
|
||||||
* gst/elements/gstfilesrc.c:
|
* gst/elements/gstfilesrc.c:
|
||||||
|
|
|
@ -48,10 +48,11 @@ START_TEST (test_link)
|
||||||
fail_unless (srct == NULL);
|
fail_unless (srct == NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
END_TEST
|
END_TEST;
|
||||||
|
|
||||||
/* threaded link/unlink */
|
/* threaded link/unlink */
|
||||||
/* use globals */
|
/* use globals */
|
||||||
GstPad * src, *sink;
|
GstPad *src, *sink;
|
||||||
|
|
||||||
void
|
void
|
||||||
thread_link_unlink (gpointer data)
|
thread_link_unlink (gpointer data)
|
||||||
|
@ -88,7 +89,8 @@ START_TEST (test_link_unlink_threaded)
|
||||||
MAIN_STOP_THREADS ();
|
MAIN_STOP_THREADS ();
|
||||||
}
|
}
|
||||||
|
|
||||||
END_TEST
|
END_TEST;
|
||||||
|
|
||||||
START_TEST (test_refcount)
|
START_TEST (test_refcount)
|
||||||
{
|
{
|
||||||
GstPad *src, *sink;
|
GstPad *src, *sink;
|
||||||
|
@ -125,7 +127,8 @@ START_TEST (test_refcount)
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
}
|
}
|
||||||
|
|
||||||
END_TEST
|
END_TEST;
|
||||||
|
|
||||||
START_TEST (test_get_allowed_caps)
|
START_TEST (test_get_allowed_caps)
|
||||||
{
|
{
|
||||||
GstPad *src, *sink;
|
GstPad *src, *sink;
|
||||||
|
@ -177,7 +180,9 @@ START_TEST (test_get_allowed_caps)
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
}
|
}
|
||||||
|
|
||||||
END_TEST Suite *
|
END_TEST;
|
||||||
|
|
||||||
|
Suite *
|
||||||
gst_pad_suite (void)
|
gst_pad_suite (void)
|
||||||
{
|
{
|
||||||
Suite *s = suite_create ("GstPad");
|
Suite *s = suite_create ("GstPad");
|
||||||
|
|
|
@ -2270,7 +2270,7 @@ peer_error:
|
||||||
* pads inside the parent element with opposite direction.
|
* pads inside the parent element with opposite direction.
|
||||||
* The caller must free this list after use.
|
* The caller must free this list after use.
|
||||||
*
|
*
|
||||||
* Returns: a newly allocated #GList of pads.
|
* Returns: a newly allocated #GList of pads, or NULL if the pad has no parent.
|
||||||
*
|
*
|
||||||
* Not MT safe.
|
* Not MT safe.
|
||||||
*/
|
*/
|
||||||
|
@ -2287,6 +2287,9 @@ gst_pad_get_internal_links_default (GstPad * pad)
|
||||||
direction = pad->direction;
|
direction = pad->direction;
|
||||||
|
|
||||||
parent = GST_PAD_PARENT (pad);
|
parent = GST_PAD_PARENT (pad);
|
||||||
|
if (!parent)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
parent_pads = parent->pads;
|
parent_pads = parent->pads;
|
||||||
|
|
||||||
while (parent_pads) {
|
while (parent_pads) {
|
||||||
|
|
|
@ -48,10 +48,11 @@ START_TEST (test_link)
|
||||||
fail_unless (srct == NULL);
|
fail_unless (srct == NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
END_TEST
|
END_TEST;
|
||||||
|
|
||||||
/* threaded link/unlink */
|
/* threaded link/unlink */
|
||||||
/* use globals */
|
/* use globals */
|
||||||
GstPad * src, *sink;
|
GstPad *src, *sink;
|
||||||
|
|
||||||
void
|
void
|
||||||
thread_link_unlink (gpointer data)
|
thread_link_unlink (gpointer data)
|
||||||
|
@ -88,7 +89,8 @@ START_TEST (test_link_unlink_threaded)
|
||||||
MAIN_STOP_THREADS ();
|
MAIN_STOP_THREADS ();
|
||||||
}
|
}
|
||||||
|
|
||||||
END_TEST
|
END_TEST;
|
||||||
|
|
||||||
START_TEST (test_refcount)
|
START_TEST (test_refcount)
|
||||||
{
|
{
|
||||||
GstPad *src, *sink;
|
GstPad *src, *sink;
|
||||||
|
@ -125,7 +127,8 @@ START_TEST (test_refcount)
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
}
|
}
|
||||||
|
|
||||||
END_TEST
|
END_TEST;
|
||||||
|
|
||||||
START_TEST (test_get_allowed_caps)
|
START_TEST (test_get_allowed_caps)
|
||||||
{
|
{
|
||||||
GstPad *src, *sink;
|
GstPad *src, *sink;
|
||||||
|
@ -177,7 +180,9 @@ START_TEST (test_get_allowed_caps)
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
}
|
}
|
||||||
|
|
||||||
END_TEST Suite *
|
END_TEST;
|
||||||
|
|
||||||
|
Suite *
|
||||||
gst_pad_suite (void)
|
gst_pad_suite (void)
|
||||||
{
|
{
|
||||||
Suite *s = suite_create ("GstPad");
|
Suite *s = suite_create ("GstPad");
|
||||||
|
|
Loading…
Reference in a new issue