Confused about GST_PAD_SET_PROXY_CAPS and negotiation

Guillaume POIRIER poirierg at gmail.com
Mon Jan 26 08:33:00 PST 2015


Hi Tim, Hi everyone,

On Sun, Jan 25, 2015 at 1:32 PM, Guillaume POIRIER <poirierg at gmail.com> wrote:

> On Sat, Jan 24, 2015 at 4:47 PM, Tim Müller <tim at centricular.com> wrote:
>> On Fri, 2015-01-23 at 17:46 +0100, Guillaume POIRIER wrote:
[..]
>>> Then, just calling GST_PAD_SET_PROXY_CAPS() on each of my pads did
>>> allow me to get a pipeline that seemed to have negotiated a format,
>>> ... but the verbose output of gst-launch-1.0 does not show that my src
>>> pad has been seen as ARGB64. When I look at the documentation of
>>> GST_PAD_SET_PROXY_CAPS() states 'Set this if the element always
>>> outputs data in the exact same format as it receives as input."
>>
>> This won't work in your case, since your output caps are different than
>> your input caps.
>>
>>
>>> My question is: what is the simplest way to have a filter take fixed
>>> format in input, what do I need to do negotiation-wise (if any)?
>>
>> Derive from GstVideoFilter, and override
>> GstBaseTransformClass::transform_caps() in your class_init function.
>>
>> In your transform_caps function you check the direction of the
>> transform, and depending on it, you copy the caps (to make them
>> writable), and loop over all caps structures, and for each set the
>> "format" field to "RGB" or "ARGB64" (depending on the direction), but
>> leave all other fields untouched.
>>
>> The base class should then handle everything else for you.
>
>
> Many thanks! I will do that and hopefully quickly get something working.


Well, now it does seem to do what I was trying to do for several days,
and it only took me a few hours to get it working (instead of days
going in circles). Thanks a lot again for the help. The negociation
part of GStreamer seems a bit unnatural to me still, but at least
thanks to you I have video frames that are of the right format!

Cheers,

Guillaume

-- 
Wearing a Rolex is like driving an Audi: It says you've got some
money, but nothing to say.
John Lefèvre


More information about the gstreamer-devel mailing list