RTP Depay Element Caps Negotation

Chuck Crisler ccrisler at mutualink.net
Mon Apr 22 09:10:42 PDT 2013

I think that (usually) demuxers and depayloaders have dynamic pads, so the
caps aren't known until after a buffer has been parsed and identified. You
need to register for the 'pad-added' signal. At that time the caps are
known/available and you can do whatever you need to do.

      // Connect the callback function to the demuxer to listen for the pad
      g_signal_connect(demuxer_, "pad-added", G_CALLBACK(newpad_Callback),

void Pipeline::newpad_Callback(GstElement *pElement, GstPad *pPad, gpointer
    gchar *PadName = gst_pad_get_name(pPad);
    gchar *ElementName = gst_element_get_name(pElement);
    GST_DEBUG("Element %s created pad: %s", ElementName, PadName);

You can query the pad for caps and then react accordingly.This is
documented in several places. Use google.

On Mon, Apr 22, 2013 at 10:23 AM, johnwesting
<john.blank.westing at gmail.com>wrote:

> I have an MPEG4-LATM RTP Depayload Element and don't understand how to set
> the output caps for the element. The problem is that the source pad's
> capabilities are not known until after I parse and decode a buffer, but the
> element is not given a buffer until the after caps negotiation has
> completed. If my explanation isn't clear, the following example pipelines
> might help:
> Broken Pipeline:
> gst-launch filesrc location=./example.wav ! wavparse ! faac ! ss1rtplatmpay
> ! ss1rtplatmdepay ! faad ! alsasink
> Working Pipeline:
> gst-launch filesrc location=./example.wav ! wavparse ! faac ! ss1rtplatmpay
> ! ss1rtplatmdepay ! "audio/mpeg, mpegversion=4, rate=44100, channels=2" !
> faad ! alsasink
> Is there any way I can peek at the sink pad's buffer before caps
> negotiation
> completes so that I can set the source caps of my element?
> --
> View this message in context:
> http://gstreamer-devel.966125.n4.nabble.com/RTP-Depay-Element-Caps-Negotation-tp4659591.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130422/6a044ac7/attachment.html>

More information about the gstreamer-devel mailing list