Gets the capabilities of the peer connected to this pad. Similar to Pad.queryCaps.
When called on srcpads filter contains the caps that upstream could produce in the order preferred by upstream. When called on sinkpads filter contains the caps accepted by downstream in the preferred order. filter might be NULL but if it is not NULL the returned caps will be a subset of filter.