[gst-devel] caps negotiantion again

Jan Schmidt thaytan at noraisin.net
Wed Aug 31 01:50:09 CEST 2005


On Wed, 2005-08-31 at 10:00 +0200, Michael Lausch wrote:
> hi,
> 
> how can i define the YUV ordering between pads which are using
> video/raw-yuv? 
> 
> I know the problem from transcode which has the option --uyvy to switch
> between different YUV colorspaces. I think my problem with distorted
> colors when playing VDR realtime video (using streamdev) via gstreamer
> derive from such a misunderstanding between the docer element and the
> xvimagesink element. 
> 
> neither the decoder (ffmpeg) nor the xvimagesink element have a property
> named format. do i have to use an ffmpegcolorspace element between them?
> how can i change the YUV format on it's pads? or on the ffmpegcolorspace
> element itself?

The caps that the elements use is decided by the caps negotiation
process. You can constrain the choice by using 'filtered caps'. In
gst-launch syntax, you do gst-launch videotestsrc !
video/x-raw-yuv,format='(fourcc)'I420,width=640,height=480 ! xvimagesink

Programmatically, you use gst_pad_link_filtered and supply a set of caps
to filter by.

If you don't filter the caps, elements attempt to determine any format
they can on their own, and in 0.8 often make poor or even broken
choices. This is improved in the 0.9 branch.

So if you want to force processing in a particular colourspace, connect
ffmpegcolorspace after the decoder, and filter the output pads from it
so that it is forced to choose the processing format you want.

J.
-- 
Jan Schmidt <thaytan at noraisin.net>





More information about the gstreamer-devel mailing list