Dealing with unwanted source pads.

Tim-Philipp Müller t.i.m at zen.co.uk
Thu May 16 11:32:59 PDT 2013


On Thu, 2013-05-16 at 13:13 -0400, Stirling Westrup wrote:
> This might be a real dumb question, but I've run into an issue where
> my pipeline refuses to play, and I suspect its because my source has
> multiple audio streams.
> 
> 
> Right now in my pad-added handler I attach an audio sink to the first
> audio pad that shows up, and a video sink to the first video pad, and
> simply ignore all other pads.
> 
> 
> Right now I'm getting a 'Not-negotiated' error in a pipeline where it
> turns out the source has six separate audio tracks AND a subtitle
> track. I'm just ignoring most of these and I'm wondering if that's
> correct, or if there is something I'm supposed to do in my pad-added
> handler to indicate that I don't want what a pad has to offer.

Just not linking pads should be fine. If an element has multiple source
pads, it will usually 'aggregate' the various flow return values, and
continue to work as long as at least one pad is connected.

A not-negotiated error should never be the result of some pad not being
linked. It indicates a negotiation issue between two elements (missing
converter, wrong caps, no caps, or somesuch).

Cheers
 -Tim




More information about the gstreamer-devel mailing list