base: GstBaseSrc/GstBaseSink::get_caps: add (nullable) to filter

The virtual method named `get_caps` in both `GstBaseSrc` and
`GstBaseSink` has a `filter` parameter which can be `NULL` (the
default implementation in GstBaseSrc already considers the case).
Before this commit, there was no gtk-doc annotation representing this
fact, which caused the corresponding entry in the GIR file to also
miss this fact.

This caused bugs in other places, such inducing the Vala compiler to
introduce a wrongly assert on `(filter != NULL)` in every
implementation of the `get_caps` method implemented in Vala.
This commit is contained in:
Sebastiano Barrera 2019-09-10 12:31:40 +02:00
parent 4812c4087f
commit 89dfda56e3
2 changed files with 12 additions and 2 deletions

View file

@ -151,7 +151,12 @@ struct _GstBaseSink {
struct _GstBaseSinkClass {
GstElementClass parent_class;
/* get caps from subclass */
/**
* GstBaseSink::get_caps:
* @filter: (in) (nullable):
*
* Called to get sink pad caps from the subclass.
*/
GstCaps* (*get_caps) (GstBaseSink *sink, GstCaps *filter);
/* notify subclass of new caps */
gboolean (*set_caps) (GstBaseSink *sink, GstCaps *caps);

View file

@ -174,7 +174,12 @@ struct _GstBaseSrcClass {
/*< public >*/
/* virtual methods for subclasses */
/* get caps from subclass */
/**
* GstBaseSrcClass::get_caps:
* @filter: (in) (nullable):
*
* Called to get the caps to report.
*/
GstCaps* (*get_caps) (GstBaseSrc *src, GstCaps *filter);
/* decide on caps */
gboolean (*negotiate) (GstBaseSrc *src);