|
I just got to see the below function in pwg ( advance filter concepts)
static gboolean gst_my_filter_setcaps (GstPad *pad, GstCaps *caps)
{
GstMyFilter *filter = GST_MY_FILTER (GST_OBJECT_PARENT (pad));
GstStructure *s;
/* forward-negotiate */
if (!gst_pad_set_caps (filter->srcpad, caps))
return FALSE;
/* negotiation succeeded, so now configure ourselves */
s = gst_caps_get_structure (caps, 0);
gst_structure_get_int (s, "rate", &filter->samplerate);
gst_structure_get_int (s, "channels", &filter->channels);
return TRUE;
}
It looks like "caps" is not my filter cap and is coming from other element. who will call gst_my_filter_setcaps() ? is there some baseclass who will do so ?
Why I am saying so is because I see that once the negotiation goes fine we are extracting GstStructure in "s" using "caps" and thereafter fixing our filter parameters(&filter->samplerate etc). Is this "filter" my filter or this is also coming from other element ?
I am really confused now ?
|