[gst-devel] about caps negotiation
yuri noferini
yurix at picsi.it
Tue Aug 30 04:19:04 CEST 2005
Il giorno mar, 30/08/2005 alle 11.44 +0200, Thomas Vander Stichele ha
scritto:
> Hi,
> > today i've tried to add some more fun to my pipeline:
> > v4lsrc | ffmpegcolorspace | vertigoTV | ximagesink
> >
> > but the caps negotiation produces strange border line effect:
> > my simple original pipeline was
> > v4lsrc | ffmpegcolorspace | ximagesink
> > and produced 320x160 at 5fps frame
> > with vertigoTV or any other effectv filter, i got 160x120 at 5fps
> >
> > trying to link with a filter doesn't risolve.
> > can somebody explain the details of caps negotiation?
>
> Is this in 0.8 or 0.9 ?
>
0.8 from debian unstable
> In 0.8, caps nego is something of a black art - depending on which links
> the core chooses to negotiate first and the element's fixation
> functions, anything can happen. Typically if you have more than three
> elements inbetween sources and sinks, you're just better off fixating
> the links by filtering. So tell us what the actual problem was when
> doing that. Remember that for the two most common types of webcams (pwc
> and quickcam) your fps needs to be a multiple of 15/16 - so your 5 fps
> wouldn't work. 7.5 should.
well, i'm not sure about 5 fps....maybe it is as you sayed.
coming back to linking problem:
this is my code (just a cut&paste from the doc) for linking with filter
static void link_with_filter(GstElement *src,GstElement *sink){
GstCaps *caps;
GstPad *src_pad,*sink_pad;
src_pad = gst_element_get_pad(src,"src");
sink_pad = gst_element_get_pad(sink,"sink");
caps = gst_caps_new_full (
gst_structure_new ("video",
"width", G_TYPE_INT, 320,
"height", G_TYPE_INT, 160,
NULL),
gst_structure_new ("video",
"width", G_TYPE_INT, 640,
"height", G_TYPE_INT, 480,
NULL),
NULL);
gst_pad_link_filtered (src_pad, sink_pad, caps);
}
i've made several tests trying to link different elements using the
function above, the resulting outcome is a random variable distributed
over [program failure, 16X16 black window].
In other words, changing the position of the filtered link the result
changes. I can't be more preciuos cause i forgot the combination->result
mapping.
probably i was wrong in filter definition, but i'm not interested in fps
at the moment but just in size, and the video format is fixed by the
videofilter to be rgb,32 bpp,24 depth.
just another question: the negotiation is at pipeline level or, as i
think, at element-to-element level?
My english is too poor to be clear, so let me explain:
let be A,B and C 3 element of the pipeline P, the negotiation fixes the
data format for ABC or for the links A-B and B-C indipendently each
other?
thanks for your reply
>
> Thomas
>
>
> Dave/Dina : future TV today ! - http://www.davedina.org/
> <-*- thomas (dot) apestaart (dot) org -*->
> If you're looking for trouble
> you can find me on the internet
> motherfucker
> <-*- thomas (at) apestaart (dot) org -*->
> URGent, best radio on the net - 24/7 ! - http://urgent.fm/
>
>
>
More information about the gstreamer-devel
mailing list