Small fixes, most notably the GST_PAD_CONNECTED macro that didn't work for ghostpads.

Original commit message from CVS:
Small fixes, most notably the GST_PAD_CONNECTED macro that didn't work
for ghostpads.
This commit is contained in:
Wim Taymans 2001-03-11 19:31:14 +00:00
parent 8060026270
commit b2a8888398
4 changed files with 8 additions and 4 deletions

View file

@ -148,7 +148,7 @@ gst_autoplug_pads_autoplug_func (GstElement *src, GstPad *pad, GstElement *sink)
GstPad *sinkpad = (GstPad *)sinkpads->data;
// if we have a match, connect the pads
if (gst_pad_get_direction(sinkpad) == GST_PAD_SINK &&
if (gst_pad_get_direction(sinkpad) == GST_PAD_SINK &&
!GST_PAD_CONNECTED (pad) && !GST_PAD_CONNECTED(sinkpad))
{
if ((connected = gst_pad_connect (pad, sinkpad))) {

View file

@ -540,6 +540,9 @@ gst_pad_connect (GstPad *srcpad,
g_return_val_if_fail(sinkpad != NULL, FALSE);
g_return_val_if_fail(GST_IS_PAD(sinkpad), FALSE);
GST_INFO (GST_CAT_ELEMENT_PADS, "about to connect %s:%s and %s:%s",
GST_DEBUG_PAD_NAME(srcpad), GST_DEBUG_PAD_NAME(sinkpad));
// now we need to deal with the real/ghost stuff
realsrc = GST_PAD_REALIZE(srcpad);
realsink = GST_PAD_REALIZE(sinkpad);
@ -918,7 +921,7 @@ gst_pad_renegotiate (GstPad *pad)
peerpad = GST_PAD_PEER (pad);
currentpad = GST_REAL_PAD (pad);
currentpad = GST_PAD_REALIZE (pad);
if (!peerpad) {
GST_DEBUG (GST_CAT_ELEMENT_PADS, "no peer pad for pad %s:%s\n",
@ -962,7 +965,7 @@ gst_pad_renegotiate (GstPad *pad)
}
/* we have a caps structure now */
/* check it the other pad wants to negotiate */
/* check if the other pad wants to negotiate */
if (!otherpad->negotiatefunc) {
/* the pad doesn't want to negotiate, so we check if the caps
* we got from the current pad are compatible */

View file

@ -205,7 +205,7 @@ struct _GstGhostPadClass {
#define GST_PAD_PEER(pad) GST_RPAD_PEER(GST_PAD_REALIZE(pad))
/* Some check functions (unused?) */
#define GST_PAD_CONNECTED(pad) (GST_IS_REAL_PAD(pad) && GST_REAL_PAD(pad)->peer != NULL)
#define GST_PAD_CONNECTED(pad) (GST_PAD_PEER(pad) != NULL)
#define GST_PAD_CAN_PULL(pad) (GST_IS_REAL_PAD(pad) && GST_REAL_PAD(pad)->pullfunc != NULL)

1
tests/.gitignore vendored
View file

@ -26,3 +26,4 @@ padfactory
tee
autoplug2
autoplug3
capsconnect