[gst-devel] caps negotiation

Daniel Gazard dany42 at free.fr
Sun Mar 28 07:58:07 CEST 2004


Hi,

I'm currently writing a new videosink gstreamer plugin however I'm
getting a little confused about how caps negotiation is actually
proceed.

Suppose that my video sink support a fixed resolution (e.g. 800x600)
and I want to play a video with a resolution of, say, 320x240. I guess
it's the job of the video sink to adapt itself to the video by, for
example, displaying the video in the center of the screen. So the caps
intersection between the plugin which deals with video decodage and
the one which aimed to display the video had a resolution of
320x240. I'm getting this behavior by do not implementing the getcaps
method (and therefore giving a range value about the resolution I am
able to handle).

However, now suppose that between the plugin which proceed the video
decodage and the video sink one, there is a plugin which scale the
video (e.g. gstvideoscale). Here, the only way I found to force the
scale is to implement my own getcaps function which returns a caps
with a fixed resolution. The obvious issue with this method is I will
not be able to connect anymore my plugin directly with a video decoder
plugin which does not support the same resolution as mine. (I tried to
play with the _fixate method without any success.)

What I want to basically do here is, during caps negotiation, asking
if the other pad support a fixed resolution, if so I use his
resolution (I adapt myself to his caps); if not, I use mine (he adapt
itself to my caps). I had browse documentation and a few plugins
sources but I'm still unable to do what I want. I would be very
pleased if someone could give advice to do that.

Best regards.




More information about the gstreamer-devel mailing list