[gst-devel] caps negotiation

Daniel Gazard dany42 at free.fr
Mon Mar 29 11:56:27 CEST 2004


David Schleef <ds at schleef.org> writes:

> [...]
> If your video sink can automatically scale, it should provide
> "width=(int)[16,4096],height=(int)[16,4096]", and accept any video
> size that comes in.

My video sink is unable to automatically scale (and won't be). For
being more precise he is unable to scale up but can display a video
with an inferior resolution by simply dislaying it in center of the
screen.

> When the user resizes the window, you should gst_pad_try_set_caps()
> on the sink pad, and if that is successful, use the new size.  If
> it is not successful, then you need to do something interesting with
> the knowledge that your video stream is not the same size as your
> window.

Yes, this how it is deals in ximagesink (IIRC). The issue is the
window in which my video is displayed is not resizable and I don't know
where can I use gst_pad_try_set_caps elsewhere a resize event.

> Video sinks use the size information obtained in the pad link function
> to determine the "preferred" size of the window.  The pad link function
> is called if a negotiation request comes from upstream (like, say, new
> media), but not for negotiation requests originating from the video
> sink (the user resizing the window).

Thanks for the clarification.

I don't know if my problem was really clear. Basically what I want is
when the plugin behind my video sink is gstvideoscale, I give it a
caps with a fixed resolution (equal to the maximal resolution
supported by my videosink) to force him to scale up the video and in
others cases (typically when the plugin on the other side of the pad
is a video decoder) I give it a range of resolution and I adapt myself to
video properties (by displaying just a part if the video resolution is
higher than what the video sink can support or by displaying it in the
center of the screen otherwise).

Regards.




More information about the gstreamer-devel mailing list