[gst-devel] caps negotiantion again

Michael Lausch mla at lausch.at
Thu Sep 1 16:31:20 CEST 2005


On Wed, 2005-08-31 at 08:21 -0400, Ronald S. Bultje wrote:
> On Wed, 2005-08-31 at 10:48 +0200, Jan Schmidt wrote:
> > On Wed, 2005-08-31 at 10:00 +0200, Michael Lausch wrote:
> > > 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. 
> 
> Very unlikely; you can test with gst-launch-0.8 -v to see what format is
> negotiated between your elements. Your decoder may not be setting a
> correct 'format' property in the caps that it sets on the pads, though,
> like Jan said. Can you show your decoder code?

of course. it's in python and my first encounter with gstreamer, so the
code is not very clean. 

this function is hhe signal callback, which is called as soon as the
demuxer has analyzed the stream. the demuxer is a ffdemux_mpeg element.

i do not connect the de-interlace filter yet, because i want to get the
colors right first.

    def link_video_chain(self, elem, pad):

        self.vdecoder = gst.element_factory_make('ffdec_mpegvideo');

        self.vsink = gst.element_factory_make('autovideosink');

        self.filter1 = gst.element_factory_make('ffdeinterlace');
        self.filter2 = gst.element_factory_make('ffmpegcolorspace');

        self.pipeline.add(self.vdecoder);
        self.pipeline.add(self.vsink);

        self.demuxer.link(self.vdecoder);
        self.vdecoder.link(self.self.filter2);
        self.filter2.link(self.vsink);
        self.pipeline.sync_children_state();

i assume i have to use a filter element when calling
"self.demuxer.link(self.vdecoder)" and 
"self.filter2.link(self.vsink)".

or when linking self.vdecoder.link(self.self.filter2) and
self.filter2.link(self.vsink)






More information about the gstreamer-devel mailing list