[gst-devel] Capsnego not happening enough?

Erik Walthinsen omega at temple-baptist.com
Tue May 15 11:29:01 CEST 2001


Now that I've got the dynamic autoplugger kinda working (more on that
soon), I'm starting to push the boundaries of what people have tried
before, because it's now my job to make it work automatically <g>

Specifically I'm not convinced that capsnego is happening in the
circumstances it needs to.  The code is:

  if (GST_PAD_CAPS (srcpad)) {
    negotiated = gst_pad_renegotiate (srcpad);
  }
  else if (GST_PAD_CAPS (sinkpad)) {
    negotiated = gst_pad_renegotiate (sinkpad);
  }
  else
    negotiated = TRUE;

I have intentionally mangled both the default caps and padtemplate for
osssink.  It is only 'capable' of mono, and the default is mono at
11KHz.  This not only forces negotiation to bring the osssink back up to
normal caps, but the padtemplate restriction is then useful for testing of
the autoplugger's ability to match caps and do the required stereo2mono
insertion.

If you then run the following pipeline:

./gstreamer-launch disksrc location=vorbisfile.ogg ! vorbisdec ! osssink

You'll get really odd results.  That's because for some reason capsnego
doesn't trigger.  That makes sense, given the code above.  It only
triggers if either the source or sink pads have caps.  Now, it could be
argued that in this case both vorbisdec and osssink should have caps set
on their pads, or at least osssink.  vorbisdec could be excused because it
may not know what the exact parameteres are yet.  osssink on the other
already knows what its current parameters are set to.

Regardless, both vorbisdec and osssink have padtemplates, so I would think
the negotiation would occur based on that.  Then again, I might be
misunderstanding the point of padtemplates within the current capsnego
structure.

So there are two problems here that need to be addressed regardless of
what the correct capsnego scenario is:

a) vorbisdec doesn't seem to be even trying to set caps
b) osssink doesn't set any default caps

So, we'll have to fix those, but...

Thoughts?

      Erik Walthinsen <omega at temple-baptist.com> - System Administrator
        __
       /  \                GStreamer - The only way to stream!
      |    | M E G A        ***** http://gstreamer.net/ *****
      _\  /_







More information about the gstreamer-devel mailing list