After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 311004 - ghostpad bugginess
ghostpad bugginess
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.9.2
Assigned To: Andy Wingo
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-07-20 13:37 UTC by Ronald Bultje
Modified: 2005-08-03 17:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for gst-plugins-base (2.60 KB, patch)
2005-07-20 13:37 UTC, Ronald Bultje
none Details | Review
patch for gst-plugins (1.61 KB, patch)
2005-07-20 13:37 UTC, Ronald Bultje
none Details | Review

Description Ronald Bultje 2005-07-20 13:37:00 UTC
Run gst-launch-0.9 videotestsrc ! gconfvideosink with the two attached patches
applied (they make gconfvideosink use autovideosink).

W/o the patches (which makes it use xvimagesink), or with autovideosink instead
of gconfvideosink in the pipeline, it works fine, so it's some ghostpad
recursiveness bug, it seems.
Comment 1 Ronald Bultje 2005-07-20 13:37:26 UTC
Created attachment 49461 [details] [review]
patch for gst-plugins-base
Comment 2 Ronald Bultje 2005-07-20 13:37:50 UTC
Created attachment 49462 [details] [review]
patch for gst-plugins
Comment 3 Ronald Bultje 2005-07-20 13:40:08 UTC
Backtrace:

Thread 1078440192 (LWP 20329)

  • #0 gst_base_sink_pad_getcaps
    at gstbasesink.c line 167
  • #1 gst_pad_get_caps_unlocked
    at gstpad.c line 1562
  • #2 gst_pad_get_caps
    at gstpad.c line 1651
  • #3 gst_proxy_pad_do_getcaps
    at gstghostpad.c line 266
  • #4 gst_pad_get_caps_unlocked
    at gstpad.c line 1562
  • #5 gst_pad_get_caps
    at gstpad.c line 1651
  • #6 gst_proxy_pad_do_getcaps
    at gstghostpad.c line 266
  • #7 gst_pad_get_caps_unlocked
    at gstpad.c line 1562
  • #8 gst_pad_get_caps
    at gstpad.c line 1651
  • #9 gst_pad_get_allowed_caps
    at gstpad.c line 2060
  • #10 gst_videotestsrc_negotiate
    at gstvideotestsrc.c line 297
  • #11 gst_base_src_start
    at gstbasesrc.c line 845
  • #12 gst_base_src_activate_push
    at gstbasesrc.c line 974
  • #13 gst_pad_activate_push
    at gstpad.c line 623
  • #14 gst_pad_activate_default
    at gstpad.c line 401
  • #15 gst_pad_set_active
    at gstpad.c line 471
  • #16 activate_pads
    at gstelement.c line 1891
  • #17 gst_iterator_fold
[..]
(gdb) print bsink
$1 = (GstBaseSink *) 0x0
(gdb)

The pad appears to be the pad of the old fakesink in the autovideosink...
Somehow the relinking doesn't relinking the actual pad, but only the ghostpad,
of the sink element's peer.
Comment 4 Andy Wingo 2005-07-22 11:56:14 UTC
I applied those patches and built, and it works for me. Can you verify this one
again?
Comment 5 Ronald Bultje 2005-07-22 13:56:02 UTC
You may have values in your gconf. If so, it'll use those, so make sure (using
gconf-editor) that those keys either don't exist or that they contain auto*sink,
also.
Comment 6 Andy Wingo 2005-07-22 17:01:34 UTC
OK can reproduce. What's happening is like this:

  +-----------------+   +----------------------------------+
  |           +-----+   +----+ +-------------------------+ |
  |           |src  |   |sin1| +----+                    | |
  |           +-----+   +----+ |sin2|   +---------------+| |
  |                 |   |      +----+   +----+          || |
  |                 |   |      |        |sin3|          || |
  |                 |   |      |        +----+          || |
  |                 |   |      |        +---------------+| |
  |                 |   |      +-------------------------+ |
  +-----------------+   +----------------------------------+

sin1 is the gconfvideosink's ghost pad, targeting sin2, the autovideosink's
ghost pad, and sin2 targets whatever's inside it (sin3). But because these
elements have fakesinks in NULL and then real sinks in READY, and they remove
their ghost pads whenever the inside element changes, sin1 is left pointing at
an old sin2, which was removed when xvimagesink was added to the autovideosink.

Trying to think up a solution, probably involves unsetting the target property
when a ghost pad's internal pad is unlinked. Something like that.
Comment 7 Andy Wingo 2005-07-22 17:08:53 UTC
Or more succinctly, that you did gst_ghost_pad_new("sin1", sin2old) when making
sin1, but sin2 changed since then.

Hm. In light of this interpretation, what would you expect to happen, Ronald?
Comment 8 Ronald Bultje 2005-07-22 17:15:48 UTC
gst_pad_unlink(src,sinany); should work, or it should be possible to re-assign a
ghostpad to a new target so I do not need to relink. The second is probably nicer.
Comment 9 Ronald Bultje 2005-08-03 17:19:57 UTC
Works now with some new API.